'daily'  => lang('Daily'),
		'weekly' => lang('Weekly')
	);
	create_select_box('Receive summary of appointments','summary',$summary,
		'Do you want to receive a regulary summary of your appointsments via email?<br>The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.<br>It is only sent when you have any appointments on that day or week.');
*/
$updates = array('no' => lang('Never'), 'add_cancel' => lang('on invitation / cancelation only'), 'time_change_4h' => lang('on time change of more than 4 hours too'), 'time_change' => lang('on any time change too'), 'modifications' => lang('on all modification, but responses'), 'responses' => lang('on participant responses too'));
create_select_box('Receive email updates', 'receive_updates', $updates, "Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.<br>You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too.");
$update_formats = array('none' => lang('None'), 'extended' => lang('Extended'), 'ical' => lang('iCal / rfc2445'));
create_select_box('Format of event updates', 'update_format', $update_formats, 'Extended updates always include the complete event-details. iCal\'s can be imported by certain other calendar-applications.');
$event_details = array('to-fullname' => lang('Fullname of person to notify'), 'to-firstname' => lang('Firstname of person to notify'), 'to-lastname' => lang('Lastname of person to notify'), 'title' => lang('Title of the event'), 'description' => lang('Description'), 'startdate' => lang('Start Date/Time'), 'enddate' => lang('End Date/Time'), 'olddate' => lang('Old Startdate'), 'category' => lang('Category'), 'location' => lang('Location'), 'priority' => lang('Priority'), 'participants' => lang('Participants'), 'owner' => lang('Owner'), 'repetition' => lang('Repetitiondetails (or empty)'), 'action' => lang('Action that caused the notify: Added, Canceled, Accepted, Rejected, ...'), 'link' => lang('Link to view the event'));
create_notify('Notification messages for added events ', 'notifyAdded', 5, 50, 'This message is sent to every participant of events you own, who has requested notifcations about new events.<br>You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.', '', $event_details);
create_notify('Notification messages for canceled events ', 'notifyCanceled', 5, 50, 'This message is sent for canceled or deleted events.', '', $event_details, False);
create_notify('Notification messages for modified events ', 'notifyModified', 5, 50, 'This message is sent for modified or moved events.', '', $event_details, False);
create_notify('Notification messages for your responses ', 'notifyResponse', 5, 50, 'This message is sent when you accept, tentative accept or reject an event.', '', $event_details, False);
create_notify('Notification messages for your alarms', 'notifyAlarm', 5, 50, 'This message is sent when you set an Alarm for a certain event. Include all information you might need.', '', $event_details, False);
create_check_box('Show invitations you rejected', 'show_rejected', 'Should invitations you rejected still be shown in your calendar ?<br>You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!');
create_check_box('Display status of events', 'display_status', 'Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ?');
$weekdaystarts = array('Monday' => lang('Monday'), 'Sunday' => lang('Sunday'), 'Saturday' => lang('Saturday'));
create_select_box('weekday starts on', 'weekdaystarts', $weekdaystarts, 'This day is shown as first day in the week or month view.');
for ($i = 0; $i < 24; ++$i) {
    $options[$i] = $GLOBALS['phpgw']->common->formattime($i, '00');
}
create_select_box('work day starts on', 'workdaystarts', $options, 'This defines the start of your dayview. Events before this time, are shown above the dayview.<br>This time is also used as a default starttime for new events.');
create_select_box('work day ends on', 'workdayends', $options, 'This defines the end of your dayview. Events after this time, are shown below the dayview.');
$intervals = array(5 => '5', 10 => '10', 15 => '15', 20 => '20', 30 => '30', 45 => '45', 60 => '60');
create_select_box('Intervals in day view', 'interval', $intervals, 'Defines the size in minutes of the lines in the day view.');
create_input_box('default appointment length (in minutes)', 'defaultlength', 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.', '', 3);
$groups = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']);
$options = array(-1 => lang('none'));
if (is_array($groups)) {
$this->bofelamimail->openConnection('', OP_HALFOPEN);
$folderList = $this->bofelamimail->getFolderList();
reset($folderList);
$this->bofelamimail->closeConnection();
$config = CreateObject('phpgwapi.config', 'felamimail');
$config->read_repository();
$felamimailConfig = $config->config_data;
#_debug_array($felamimailConfig);
unset($config);
#$boemailadmin = CreateObject('emailadmin.bo');
#$methodData = array($felamimailConfig['profileID']);
#_debug_array($methodData);
$felamimailConfig = ExecMethod('emailadmin.bo.getProfile', $felamimailConfig['profileID']);
$refreshTime = array('0' => lang('disabled'), '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '15' => '15', '20' => '20', '30' => '30');
create_select_box('Refresh time in minutes', 'refreshTime', $refreshTime);
create_notify('email signature', 'email_sig', 3, 50);
$sortOrder = array('0' => lang('date(newest first)'), '1' => lang('date(oldest first)'), '3' => lang('from(A->Z)'), '2' => lang('from(Z->A)'), '5' => lang('subject(A->Z)'), '4' => lang('subject(Z->A)'), '7' => lang('size(0->...)'), '6' => lang('size(...->0)'));
create_select_box('Default sorting order', 'sortOrder', $sortOrder);
$selectOptions = array('0' => lang('no'), '1' => lang('yes'), '2' => lang('yes') . ' - ' . lang('small view'));
create_select_box('show new messages on main screen', 'mainscreen_showmail', $selectOptions);
$selectOptions = array('0' => lang('no'), '1' => lang('yes'));
create_select_box('display message in new window', 'message_newwindow', $selectOptions);
$deleteOptions = array('move_to_trash' => lang('move to trash'), 'mark_as_deleted' => lang('mark as deleted'), 'remove_immediately' => lang('remove immediately'));
create_select_box('when deleting messages', 'deleteOptions', $deleteOptions);
$htmlOptions = array('never_display' => lang('never display html emails'), 'only_if_no_text' => lang('display only when no plain text is available'), 'always_display' => lang('always show html emails'));
create_select_box('display of html emails', 'htmlOptions', $htmlOptions);
$trashOptions = array_merge(array('none' => lang("Don't use Trash")), $folderList);
create_select_box('trash folder', 'trashFolder', $trashOptions);
$sentOptions = array_merge(array('none' => lang("Don't use Sent")), $folderList);
create_select_box('sent folder', 'sentFolder', $sentOptions);
if ($felamimailConfig['userDefinedAccounts'] == 'yes') {