void print_form_element ( int element , int cmd ) {
 time_t t ;
 int t_hour , t_min ;
 char buffer [ MAX_INPUT_BUFFER ] ;
 switch ( element ) {
 case PRINT_COMMON_HEADER : printf ( "<tr><td COLSPAN=\"2\">&nbsp;
</td></tr>\n" ) ;
 printf ( "<tr><td COLSPAN=\"2\" CLASS='sectionHeader'>Common Data</td></tr>\n" ) ;
 printf ( "<tr><td COLSPAN=\"2\">&nbsp;
</td></tr>\n" ) ;
 break ;
 case PRINT_AUTHOR : printf ( "<tr><td class=\"objectDescription descriptionleft\">Author (Your Name):</td><td align=\"left\">" ) ;
 if ( lock_author_names == TRUE ) printf ( "<INPUT TYPE='HIDDEN' NAME='com_author' VALUE='%s'>%s</td></tr>\n" , escape_string ( comment_author ) , escape_string ( comment_author ) ) ;
 else printf ( "<INPUT TYPE='INPUT' NAME='com_author' VALUE='%s'></td></tr>\n" , escape_string ( comment_author ) ) ;
 break ;
 case PRINT_COMMENT_BOX : strcpy ( help_text , "If you work with other administrators, you may find it useful to share information about a host/service " "that is having problems if more than one of you may be working on it. " "Make sure to enter a brief description of what you are doing." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Comment:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA ID=\"com_data\" NAME='com_data' COLS=25 ROWS=2 onkeyup=\"check_input();
\">%s</TEXTAREA>" , escape_string ( comment_data ) ) ;
 printf ( "<BR><DIV ID='com_data_error' class=\"inputError\" style=\"display:none;
\">Comment data can't be sent empty</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_CHECK_OUTPUT_BOX : snprintf ( help_text , sizeof ( help_text ) , "Fill in the exact output string which sould be sent to %s" , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Check Output:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA ID=\"plugin_output\" NAME='plugin_output' COLS=25 ROWS=2 onkeyup=\"check_input();
\"></TEXTAREA>" ) ;
 printf ( "<BR><DIV ID='plugin_output_error' class=\"inputError\" style=\"display:none;
\">Output string can't be send empty</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_PERFORMANCE_DATA_BOX : snprintf ( help_text , sizeof ( help_text ) , "Fill in the exact performance data string which sould be sent to %s" , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Performance Data:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA NAME='performance_data' COLS=25 ROWS=2></TEXTAREA></td></tr>\n" ) ;
 break ;
 case PRINT_STICKY_ACK : strcpy ( help_text , "If you want acknowledgement to disable notifications until the host/service recovers, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Sticky Acknowledgement:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='sticky_ack' %s></td></tr>\n" , ( sticky_ack == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_SEND_NOTFICATION : strcpy ( help_text , "If you do not want an acknowledgement notification sent out to the appropriate contacts, uncheck this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Send Notification:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='send_notification' %s></td></tr>\n" , ( send_notification == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_PERSISTENT : if ( cmd == CMD_ACKNOWLEDGE_HOST_PROBLEM || cmd == CMD_ACKNOWLEDGE_SVC_PROBLEM ) strcpy ( help_text , "If you would like the comment to remain once the acknowledgement is removed, check this checkbox." ) ;
 else {
 snprintf ( help_text , sizeof ( help_text ) , "If you uncheck this option, the comment will automatically be deleted the next time %s is restarted." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 }
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Persistent%s:" , ( cmd == CMD_ACKNOWLEDGE_HOST_PROBLEM || cmd == CMD_ACKNOWLEDGE_SVC_PROBLEM ) ? " Comment" : "" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='persistent' %s></td></tr>\n" , ( persistent_ack_comments == TRUE || cmd == CMD_ADD_HOST_COMMENT || cmd == CMD_ADD_SVC_COMMENT ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_NOTIFICATION_DELAY : strcpy ( help_text , "The notification delay will be disregarded if the host/service changes state before the next notification is scheduled to be sent out." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Notification Delay (minutes from now):" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='TEXT' ID='not_dly' NAME='not_dly' VALUE='%d' SIZE=\"4\">" , notification_delay ) ;
 printf ( "<BR><DIV ID='not_dly_error' class=\"inputError\" style=\"display:none;
\">Notification delay can't be zero</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_START_TIME : case PRINT_END_TIME : case PRINT_CHECK_TIME : time ( & t ) ;
 if ( element == PRINT_END_TIME ) t += ( unsigned long ) default_downtime_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">" ) ;
 if ( element == PRINT_START_TIME ) {
 strcpy ( help_text , "Set the start date/time for the downtime." ) ;
 printf ( "Start Time:" ) ;
 }
 else if ( element == PRINT_END_TIME ) {
 strcpy ( help_text , "Set the end date/time for the downtime." ) ;
 printf ( "End Time:" ) ;
 }
 else {
 strcpy ( help_text , "Set the date/time when this check should be schedule to." ) ;
 printf ( "Check Time:" ) ;
 }
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='%s_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , ( element == PRINT_END_TIME ) ? "end" : "start" , buffer ) ;
 break ;
 case PRINT_FIXED_FLEXIBLE_TYPE : default_downtime_duration = default_downtime_duration / 60 ;
 t_min = default_downtime_duration % 60 ;
 default_downtime_duration = default_downtime_duration - t_min ;
 t_hour = ( default_downtime_duration / 60 ) ;
 snprintf ( help_text , sizeof ( help_text ) , "If you select the <i>fixed</i> option, the downtime will be in effect between the start and end times you specify. If you do not select the <i>fixed</i> " "option, %s will treat this as <i>flexible</i> downtime. Flexible downtime starts when the host goes down or becomes unreachable / service becomes critical (sometime between the " "start and end times you specified) and lasts as long as the duration of time you enter. The duration fields do not apply for fixed downtime." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Type:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">\n" ) ;
 printf ( "\t<SELECT ID=\"flexible_selection\" NAME='fixed' onChange=\"if (document.getElementById('flexible_selection').selectedIndex == 0) document.getElementById('fd_row').style.display = 'none';
 else document.getElementById('fd_row').style.display = '';
\">\n" ) ;
 printf ( "\t\t<OPTION VALUE=1\">Fixed</OPTION>\n" ) ;
 printf ( "\t\t<OPTION VALUE=0\">Flexible</OPTION>\n" ) ;
 printf ( "\t</SELECT>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter here the duration of the downtime. %s will automatically delete the downtime after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr id=\"fd_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Flexible Duration:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">\n" ) ;
 printf ( "\t<table border=0 cellspacing=0 cellpadding=0>\n" ) ;
 printf ( "\t\t<tr>\n" ) ;
 printf ( "\t\t\t<td><INPUT TYPE='TEXT' NAME='hours' VALUE='%d' SIZE=4 MAXLENGTH=4></td>\n" , t_hour ) ;
 printf ( "\t\t\t<td width=\"50\">&nbsp;
Hours</td>\n" ) ;
 printf ( "\t\t\t<td><INPUT TYPE='TEXT' NAME='minutes' VALUE='%d' SIZE=2 MAXLENGTH=2></td>\n" , t_min ) ;
 printf ( "\t\t\t<td width=\"50\">&nbsp;
Minutes</td>\n" ) ;
 printf ( "\t\t</tr>\n" ) ;
 printf ( "\t</table>\n" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_EXPIRE_ACKNOWLEDGEMENT : strcpy ( help_text , "If you want to let the acknowledgement expire, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Use Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' ID='expire_checkbox' NAME='use_ack_end_time' onClick=\"if (document.getElementById('expire_checkbox').checked == true) document.getElementById('expired_date_row').style.display = '';
 else document.getElementById('expired_date_row').style.display = 'none';
\"></td></tr>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter here the expire date/time for this acknowledgement. %s will automatically delete the acknowledgement after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 time ( & t ) ;
 t += ( unsigned long ) default_expiring_acknowledgement_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr id=\"expired_date_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='end_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , buffer ) ;
 break ;
 case PRINT_EXPIRE_DISABLE_NOTIFICATIONS : strcpy ( help_text , "If you want to let the disabled notifications expire, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Use Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' ID='expire_checkbox' NAME='use_disabled_notif_end_time' onClick=\"if (document.getElementById('expire_checkbox').checked == true) document.getElementById('expired_date_row').style.display = '';
 else document.getElementById('expired_date_row').style.display = 'none';
\"></td></tr>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter the expire date/time for disabled notifications. %s will automatically re-enable all notifications after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 time ( & t ) ;
 t += ( unsigned long ) default_expiring_disabled_notifications_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr id=\"expired_date_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='end_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , buffer ) ;
 break ;
 case PRINT_FORCE_CHECK : snprintf ( help_text , sizeof ( help_text ) , "If you select this option, %s will force a check of the host/service regardless of both what time the scheduled check occurs and whether or not checks are enabled for the host/service." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Force Check:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='force_check' %s></td></tr>\n" , ( force_check == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_BROADCAST_NOTIFICATION : strcpy ( help_text , "Selecting this option causes the notification to be sent out to all normal (non-escalated) and escalated contacts. These options allow you to override the normal notification logic if you need to get an important message out." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Broadcast:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='broadcast_notification'></td></tr>\n" ) ;
 break ;
 case PRINT_FORCE_NOTIFICATION : snprintf ( help_text , sizeof ( help_text ) , "Custom notifications normally follow the regular notification logic in %s. Selecting this option will force the notification to be sent out, regardless of the time restrictions, whether or not notifications are enabled, etc." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Forced:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='force_notification'></td></tr>\n" ) ;
 break ;
 default : break ;
 }
 return ;
 }
void print_form_element ( int element , int cmd ) {
 time_t t ;
 int t_hour , t_min ;
 char buffer [ MAX_INPUT_BUFFER ] ;
 switch ( element ) {
 case PRINT_COMMON_HEADER : printf ( "<tr><td COLSPAN=\"2\">&nbsp;
</td></tr>\n" ) ;
 printf ( "<tr><td COLSPAN=\"2\" CLASS='sectionHeader'>Common Data</td></tr>\n" ) ;
 printf ( "<tr><td COLSPAN=\"2\">&nbsp;
</td></tr>\n" ) ;
 break ;
 case PRINT_AUTHOR : printf ( "<tr><td class=\"objectDescription descriptionleft\">Author (Your Name):</td><td align=\"left\">" ) ;
 if ( lock_author_names == TRUE ) printf ( "<INPUT TYPE='HIDDEN' NAME='com_author' VALUE='%s'>%s</td></tr>\n" , escape_string ( comment_author ) , escape_string ( comment_author ) ) ;
 else printf ( "<INPUT TYPE='INPUT' NAME='com_author' VALUE='%s'></td></tr>\n" , escape_string ( comment_author ) ) ;
 break ;
 case PRINT_COMMENT_BOX : strcpy ( help_text , "If you work with other administrators, you may find it useful to share information about a host/service " "that is having problems if more than one of you may be working on it. " "Make sure to enter a brief description of what you are doing." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Comment:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA ID=\"com_data\" NAME='com_data' COLS=25 ROWS=2 onkeyup=\"check_input();
\">%s</TEXTAREA>" , escape_string ( comment_data ) ) ;
 printf ( "<BR><DIV ID='com_data_error' class=\"inputError\" style=\"display:none;
\">Comment data can't be sent empty</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_CHECK_OUTPUT_BOX : snprintf ( help_text , sizeof ( help_text ) , "Fill in the exact output string which sould be sent to %s" , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Check Output:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA ID=\"plugin_output\" NAME='plugin_output' COLS=25 ROWS=2 onkeyup=\"check_input();
\"></TEXTAREA>" ) ;
 printf ( "<BR><DIV ID='plugin_output_error' class=\"inputError\" style=\"display:none;
\">Output string can't be send empty</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_PERFORMANCE_DATA_BOX : snprintf ( help_text , sizeof ( help_text ) , "Fill in the exact performance data string which sould be sent to %s" , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Performance Data:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<TEXTAREA NAME='performance_data' COLS=25 ROWS=2></TEXTAREA></td></tr>\n" ) ;
 break ;
 case PRINT_STICKY_ACK : strcpy ( help_text , "If you want acknowledgement to disable notifications until the host/service recovers, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Sticky Acknowledgement:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='sticky_ack' %s></td></tr>\n" , ( sticky_ack == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_SEND_NOTFICATION : strcpy ( help_text , "If you do not want an acknowledgement notification sent out to the appropriate contacts, uncheck this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Send Notification:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='send_notification' %s></td></tr>\n" , ( send_notification == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_PERSISTENT : if ( cmd == CMD_ACKNOWLEDGE_HOST_PROBLEM || cmd == CMD_ACKNOWLEDGE_SVC_PROBLEM ) strcpy ( help_text , "If you would like the comment to remain once the acknowledgement is removed, check this checkbox." ) ;
 else {
 snprintf ( help_text , sizeof ( help_text ) , "If you uncheck this option, the comment will automatically be deleted the next time %s is restarted." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 }
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Persistent%s:" , ( cmd == CMD_ACKNOWLEDGE_HOST_PROBLEM || cmd == CMD_ACKNOWLEDGE_SVC_PROBLEM ) ? " Comment" : "" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='persistent' %s></td></tr>\n" , ( persistent_ack_comments == TRUE || cmd == CMD_ADD_HOST_COMMENT || cmd == CMD_ADD_SVC_COMMENT ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_NOTIFICATION_DELAY : strcpy ( help_text , "The notification delay will be disregarded if the host/service changes state before the next notification is scheduled to be sent out." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Notification Delay (minutes from now):" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='TEXT' ID='not_dly' NAME='not_dly' VALUE='%d' SIZE=\"4\">" , notification_delay ) ;
 printf ( "<BR><DIV ID='not_dly_error' class=\"inputError\" style=\"display:none;
\">Notification delay can't be zero</DIV>" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_START_TIME : case PRINT_END_TIME : case PRINT_CHECK_TIME : time ( & t ) ;
 if ( element == PRINT_END_TIME ) t += ( unsigned long ) default_downtime_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">" ) ;
 if ( element == PRINT_START_TIME ) {
 strcpy ( help_text , "Set the start date/time for the downtime." ) ;
 printf ( "Start Time:" ) ;
 }
 else if ( element == PRINT_END_TIME ) {
 strcpy ( help_text , "Set the end date/time for the downtime." ) ;
 printf ( "End Time:" ) ;
 }
 else {
 strcpy ( help_text , "Set the date/time when this check should be schedule to." ) ;
 printf ( "Check Time:" ) ;
 }
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='%s_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , ( element == PRINT_END_TIME ) ? "end" : "start" , buffer ) ;
 break ;
 case PRINT_FIXED_FLEXIBLE_TYPE : default_downtime_duration = default_downtime_duration / 60 ;
 t_min = default_downtime_duration % 60 ;
 default_downtime_duration = default_downtime_duration - t_min ;
 t_hour = ( default_downtime_duration / 60 ) ;
 snprintf ( help_text , sizeof ( help_text ) , "If you select the <i>fixed</i> option, the downtime will be in effect between the start and end times you specify. If you do not select the <i>fixed</i> " "option, %s will treat this as <i>flexible</i> downtime. Flexible downtime starts when the host goes down or becomes unreachable / service becomes critical (sometime between the " "start and end times you specified) and lasts as long as the duration of time you enter. The duration fields do not apply for fixed downtime." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Type:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">\n" ) ;
 printf ( "\t<SELECT ID=\"flexible_selection\" NAME='fixed' onChange=\"if (document.getElementById('flexible_selection').selectedIndex == 0) document.getElementById('fd_row').style.display = 'none';
 else document.getElementById('fd_row').style.display = '';
\">\n" ) ;
 printf ( "\t\t<OPTION VALUE=1\">Fixed</OPTION>\n" ) ;
 printf ( "\t\t<OPTION VALUE=0\">Flexible</OPTION>\n" ) ;
 printf ( "\t</SELECT>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter here the duration of the downtime. %s will automatically delete the downtime after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr id=\"fd_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Flexible Duration:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">\n" ) ;
 printf ( "\t<table border=0 cellspacing=0 cellpadding=0>\n" ) ;
 printf ( "\t\t<tr>\n" ) ;
 printf ( "\t\t\t<td><INPUT TYPE='TEXT' NAME='hours' VALUE='%d' SIZE=4 MAXLENGTH=4></td>\n" , t_hour ) ;
 printf ( "\t\t\t<td width=\"50\">&nbsp;
Hours</td>\n" ) ;
 printf ( "\t\t\t<td><INPUT TYPE='TEXT' NAME='minutes' VALUE='%d' SIZE=2 MAXLENGTH=2></td>\n" , t_min ) ;
 printf ( "\t\t\t<td width=\"50\">&nbsp;
Minutes</td>\n" ) ;
 printf ( "\t\t</tr>\n" ) ;
 printf ( "\t</table>\n" ) ;
 printf ( "</td></tr>\n" ) ;
 break ;
 case PRINT_EXPIRE_ACKNOWLEDGEMENT : strcpy ( help_text , "If you want to let the acknowledgement expire, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Use Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' ID='expire_checkbox' NAME='use_ack_end_time' onClick=\"if (document.getElementById('expire_checkbox').checked == true) document.getElementById('expired_date_row').style.display = '';
 else document.getElementById('expired_date_row').style.display = 'none';
\"></td></tr>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter here the expire date/time for this acknowledgement. %s will automatically delete the acknowledgement after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 time ( & t ) ;
 t += ( unsigned long ) default_expiring_acknowledgement_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr id=\"expired_date_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='end_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , buffer ) ;
 break ;
 case PRINT_EXPIRE_DISABLE_NOTIFICATIONS : strcpy ( help_text , "If you want to let the disabled notifications expire, check this option." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Use Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' ID='expire_checkbox' NAME='use_disabled_notif_end_time' onClick=\"if (document.getElementById('expire_checkbox').checked == true) document.getElementById('expired_date_row').style.display = '';
 else document.getElementById('expired_date_row').style.display = 'none';
\"></td></tr>\n" ) ;
 snprintf ( help_text , sizeof ( help_text ) , "Enter the expire date/time for disabled notifications. %s will automatically re-enable all notifications after this time expired." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 time ( & t ) ;
 t += ( unsigned long ) default_expiring_disabled_notifications_duration ;
 get_time_string ( & t , buffer , sizeof ( buffer ) - 1 , SHORT_DATE_TIME ) ;
 printf ( "<tr id=\"expired_date_row\" style=\"display:none;
\"><td class=\"objectDescription descriptionleft\">Expire Time:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\"><INPUT TYPE='TEXT' class='timepicker' NAME='end_time' VALUE='%s' SIZE=\"25\"></td></tr>\n" , buffer ) ;
 break ;
 case PRINT_FORCE_CHECK : snprintf ( help_text , sizeof ( help_text ) , "If you select this option, %s will force a check of the host/service regardless of both what time the scheduled check occurs and whether or not checks are enabled for the host/service." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Force Check:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='force_check' %s></td></tr>\n" , ( force_check == TRUE ) ? "CHECKED" : "" ) ;
 break ;
 case PRINT_BROADCAST_NOTIFICATION : strcpy ( help_text , "Selecting this option causes the notification to be sent out to all normal (non-escalated) and escalated contacts. These options allow you to override the normal notification logic if you need to get an important message out." ) ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Broadcast:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='broadcast_notification'></td></tr>\n" ) ;
 break ;
 case PRINT_FORCE_NOTIFICATION : snprintf ( help_text , sizeof ( help_text ) , "Custom notifications normally follow the regular notification logic in %s. Selecting this option will force the notification to be sent out, regardless of the time restrictions, whether or not notifications are enabled, etc." , PROGRAM_NAME ) ;
 help_text [ sizeof ( help_text ) - 1 ] = '\x0' ;
 printf ( "<tr><td class=\"objectDescription descriptionleft\">Forced:" ) ;
 print_help_box ( help_text ) ;
 printf ( "</td><td align=\"left\">" ) ;
 printf ( "<INPUT TYPE='checkbox' NAME='force_notification'></td></tr>\n" ) ;
 break ;
 default : break ;
 }
 return ;
 }