{include file="$gentemplates/_header.tpl"}

<script language="javascript">
var err_no_start = "{$temp_err_no_start}";
var err_no_end = "{$temp_err_no_end}";
var err_end_before = "{$temp_err_end_before}";
var err_no_person = "{$temp_err_no_person}";
var err_thema_long = "{$temp_err_thema_long}";
var err_external_long = "{$temp_err_external_long}";

{literal}
<!-- NATYS -->

function fill_days(obj_day){
var label_i = '';
obj_day.length = 0;
for (i=0;i<31;i++)
	{
	if (i+1<10) label_i = '0'+(i+1);
	else label_i = i+1;	
	obj_day.options[i] = new Option(label_i,label_i);
	}
}

function is_leap_year(year){
    if (((year % 4) == 0 && (year % 100)!=0) || (year % 400)==0)
	return 1;
    else
	return 0;
}

function nb_day(month,year){
var nbday=0;
switch (month)
	{
	case '01':
        nbday = 31;
		break;
		
	case '03':
        nbday = 31;
		break;

	case '05':
        nbday = 31;
		break;

	case '07':
        nbday = 31;
		break;

	case '08':
        nbday = 31;
		break;

	case '10':
        nbday = 31;
		break;

	case '12':
        nbday = 31;
		break;
//-------------------
    case '04':
        nbday = 30;
		break;
		
	case '06':
        nbday = 30;
		break;
	
	case '09':
        nbday = 30;
		break;
	
	case '11':
        nbday = 30;
		break;
	
//-------------------	
    case '02':
		if (is_leap_year(year))
		nbday = 29;
		else
		nbday = 28;
		break;
	}
	return nbday;
}


function keep_nbday_coherence(when){
var obj_day = document.nd.elements[when+'_day'];
var obj_month = document.nd.elements[when+'_month'];
var obj_year = document.nd.elements[when+'_year'];


nbday = nb_day(obj_month.options[obj_month.selectedIndex].value, obj_year.options[obj_year.selectedIndex].value);

//save selected day:
var id_selected_day = obj_day.selectedIndex;

//fill days selectbox:
fill_days(obj_day);
//delete impossible days:
for (i=31;i>=nbday;i--)
	{
	 obj_day.options[i]=null;
	}
//re-select day
//if previous selected day is now impossible -> select the last day
if (id_selected_day+1 > nbday) id_selected_day = nbday-1;
obj_day.selectedIndex = id_selected_day;
	
/*alert(nbday);
alert(obj_month.selectedIndex);
alert(obj_month.options[0].value);
*/
}

function start_date_change(){
keep_nbday_coherence('serial_start');
}

function end_date_change(){
keep_nbday_coherence('serial_end');
}

function scheduling_time_click(){
	
	// memoriser les selected
	var id_start_sel = document.nd.appointment_start.options.selectedIndex;
	var id_end_sel = document.nd.appointment_end.options.selectedIndex;
	var id_end_sel_reversed = document.nd.appointment_end.length-document.nd.appointment_end.options.selectedIndex;
	//alert("start="+id_start_sel+" end="+id_end_sel+" length="+document.nd.appointment_end.length+" end_reversed="+id_end_sel_reversed);
	
	
	//----- réinitialiser les listes
	document.nd.appointment_start.length = 0;
	document.nd.appointment_start.options[0]=new Option(' ','0');
		
	{/literal}
	{php} $i=1; {/php}
	{section name=hour loop=$appointment_start_list}
	document.nd.appointment_start.options[{php} echo $i++; {/php}]=new Option('{$appointment_start_list[hour].time_label}','{$appointment_start_list[hour].timestamp}');
	{/section}
		
	document.nd.appointment_end.length = 0;
	document.nd.appointment_end.options[0]=new Option(' ','0');
	{php} $i=1; {/php}
	{section name=hour loop=$appointment_end_list}
	document.nd.appointment_end.options[{php} echo $i++; {/php}]=new Option('{$appointment_end_list[hour].time_label}','{$appointment_end_list[hour].timestamp}');
	{/section}
	id_end_sel = document.nd.appointment_end.length-id_end_sel_reversed;
	//alert("new end_sel ="+id_end_sel);
	{literal}

	//blanc:
	for (i=0; i<document.nd.appointment_end.length ; i++)
	{
	 document.nd.appointment_start.options[i].style.backgroundColor='#FFFFFF';
	 document.nd.appointment_end.options[i].style.backgroundColor='#FFFFFF';
	}
	//selectionnables:
	document.nd.appointment_start.disabled=false;
	document.nd.appointment_end.disabled=false;
	//----- fin réinit --
	
	
	//remettre les "selected"
	document.nd.appointment_start.options.selectedIndex = id_start_sel;
	document.nd.appointment_end.options.selectedIndex = id_end_sel;
}

function scheduling_morning_click(){
			
		scheduling_time_click();
	
	var id_middle=document.nd.appointment_end.length/2;

		// mettre en gris :
			//premier
			document.nd.appointment_start.options[1].style.backgroundColor='#E0E0E0';
			//dernier
			document.nd.appointment_end.options[id_middle].style.backgroundColor='#E0E0E0';
			
		//selectioner le 1er creneau	
		document.nd.appointment_start.options.selectedIndex=1;
		//selectionner le dernier creneau
		document.nd.appointment_end.options.selectedIndex=id_middle;
		
		//désactiver les selectbox
		document.nd.appointment_start.disabled=true;
		document.nd.appointment_end.disabled=true;
}

function scheduling_afternoon_click(){
		
		scheduling_time_click();
	
	var id_middle=document.nd.appointment_end.length/2 +1;
	var id_last=document.nd.appointment_end.length-1;
	
		// mettre en gris :
			//premier
			document.nd.appointment_start.options[id_middle].style.backgroundColor='#E0E0E0';
			//dernier
			document.nd.appointment_end.options[id_last].style.backgroundColor='#E0E0E0';
			
		//selectioner le 1er creneau	
		document.nd.appointment_start.options.selectedIndex=id_middle;
		//selectionner le dernier creneau
		document.nd.appointment_end.options.selectedIndex=id_last;
		
		//désactiver les selectbox
		document.nd.appointment_start.disabled=true;
		document.nd.appointment_end.disabled=true;
}

function scheduling_wholeday_click(){
		
	scheduling_time_click();
	
	var id_last=document.nd.appointment_end.length-1;
	
	// mettre en gris :
	//premier
		document.nd.appointment_start.options[1].style.backgroundColor='#E0E0E0';
	//dernier
		document.nd.appointment_end.options[id_last].style.backgroundColor='#E0E0E0';
			
	//selectioner le 1er creneau	
	document.nd.appointment_start.options.selectedIndex=1;
	//selectionner le dernier creneau
	document.nd.appointment_end.options.selectedIndex=id_last;
	
	//désactiver les selectbox
	document.nd.appointment_start.disabled=true;
	document.nd.appointment_end.disabled=true;
}


function keep_appt_end_coherence(){
	var j=0;

	//initialiser tout en blanc:
	scheduling_time_click();
	
	//eliminer tous les horaires de fin impossibles:
	id_start_sel = document.nd.appointment_start.options.selectedIndex;
	val_start_sel= document.nd.appointment_start.options[id_start_sel].value;
	
	//identifier l'indice de fin (j):
	for (i=0; i<document.nd.appointment_end.length ; i++)
	{
	 if (document.nd.appointment_end.options[i].value == val_start_sel) 
	 	{
		j=i;
		break;
		}
	}

	//éliminer les indices de 1 à j :
	d=1;
	for (i=1; i<=j ; i++)
	{
	//document.nd.appointment_end.options[i].style.backgroundColor='#000000';
	document.nd.appointment_end.options[d]=null;
	}
	
	//SI indice actuel est 0 ->  selectionner l'indice 1 :
	if (document.nd.appointment_end.options.selectedIndex==0)
		document.nd.appointment_end.options.selectedIndex=1;
	
}


function update_telephone_field(id_radio){
	if (id_radio == 1){ //available
		document.nd.telephone.style.backgroundColor='#FFFFFF'; 
		document.nd.telephone.disabled = false;
		}
	else{ //not available
		document.nd.telephone.style.backgroundColor='#E0E0E0';
		document.nd.telephone.disabled=true;
		}
}


<!-- -->
function selectItems(){
	var to_form = eval('document.nd.elements[\"participants[]\"]');
	for(i=0; i < to_form.length; i++) {
		to_form.options[i].selected = true;
	}
	if(i==0 /*&& document.nd.i_will.checked == false*/) {
		alert(err_no_participant);
		return false;
	}
	return true;
}
 
function check_form() {
	
	if (document.nd.appointment_start.value == 0) {
		alert (err_no_start);
		document.nd.appointment_start.focus();
		return false;
	} else if (document.nd.appointment_end.value == 0) {
		alert (err_no_end);
		document.nd.appointment_end.focus();
		return false;
	} else if (!document.nd.appointment_attribute[0].checked && (document.nd.appointment_end.value < document.nd.appointment_start.value)) {
		alert (err_end_before);
		document.nd.appointment_end.focus();
		return false;
	}
	
			
	if (document.nd.external.value.length > 200) {
		alert (err_external_long);
		return false;
	}

	return selectItems();
}

</script>
{/literal}

<form name="nd" action="{$phpself}" method="post">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">			
<input type="hidden" name="date" value="{$date}">			
<input type="hidden" name="id" value="{$id}">
{include file="$gentemplates/_navi.tpl"}
{include file="$gentemplates/_contentheader.tpl" title="$contentheader"}

<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	 <tr align="left">
	   <td class="category" height="20" width="10">&nbsp;</td>
	   <td class="category" width="130">{$temp_dateandtime}</td>
	   <td class="category" width="70%">&nbsp;</td>
	 </tr>
 
	<tr><td class="lines" height="2" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2" hspace="0" vspace="0" border="0"></td></tr>						
	<tr class="tab" align="left">
		<td class="tab" height="40" width="60"><img src="{$imgpathmaster}/space.gif" alt="" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead" width="70">{$temp_serialstart}</td>
		<td class="formhead">{$gentemp_day}&nbsp;{$serial_start_day|smarty:nodefaults}&nbsp;&nbsp;{$gentemp_month}&nbsp;{$serial_start_month|smarty:nodefaults}&nbsp;&nbsp;{$gentemp_year}&nbsp;{$serial_start_year|smarty:nodefaults}</td>
  		
	</tr>
	<tr><td class="lines" height="1" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2" hspace="0" vspace="0" border="0"></td></tr>						
	<tr class="tab" align="left">
		<td class="tab" height="40" width="60"><img src="{$imgpathmaster}/space.gif" alt="" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead" width="70">{$temp_serialend}</td>
		<td class="formhead">{$gentemp_day}&nbsp;{$serial_end_day|smarty:nodefaults}&nbsp;&nbsp;{$gentemp_month}&nbsp;{$serial_end_month|smarty:nodefaults}&nbsp;&nbsp;{$gentemp_year}&nbsp;{$serial_end_year|smarty:nodefaults}</td>
		
	</tr>
	<tr><td class="lines" height="1" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_fromto}</td>
		<td class="tab">
	      <select name="appointment_start" size="1" ONCHANGE="keep_appt_end_coherence();">
		<option value="0">&nbsp;</option>	
		  {section name=hour loop=$appointment_start_list}
		<option value="{$appointment_start_list[hour].timestamp}"{$appointment_start_list[hour].sel}>{$appointment_start_list[hour].time_label}</option>	
		  {/section}	    
	      </select>	
	      -
	      <select name="appointment_end" size="1">
		<option value="0">&nbsp;</option>	
		  {section name=hour loop=$appointment_end_list}
		<option value="{$appointment_end_list[hour].timestamp}"{$appointment_end_list[hour].sel}>{$appointment_end_list[hour].time_label}</option>	
		  {/section}	    
	      </select>
	      <img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" />
			<!--- NATYS : onclick ---->
	      {section name=scheduling_type loop=$scheduling_list}
			<INPUT TYPE="radio" NAME="scheduling" VALUE="{$scheduling_list[scheduling_type].id}" {$scheduling_list[scheduling_type].chk} id="scheduling_{$scheduling_list[scheduling_type].type}" ONCLICK="scheduling_{$scheduling_list[scheduling_type].type}_click();" > <label for="scheduling_{$scheduling_list[scheduling_type].type}">{$scheduling_list[scheduling_type].text}</label>&nbsp;&nbsp;&nbsp;
		    {if $scheduling_list[scheduling_type].chk != ""}
				{assign var="sched_type" value=$scheduling_list[scheduling_type].type}
				{* variable sched_type is used at the bottom of this file *}
			{/if}
		  {/section}
		  	  	  
	    </td>
		<!--
		<td class="formhead">
			<select name="appointment_start" size="1">
				<option value=0>&nbsp;</option>	
			{section name=hour loop=$appointment_start_list}
				<option value={$appointment_start_list[hour].timestamp}{$appointment_start_list[hour].sel}>{$appointment_start_list[hour].time_label}</option>	
			{/section}	    
			</select>	
			-
			<select name="appointment_end" size="1">
				<option value=0>&nbsp;</option>	
			{section name=hour loop=$appointment_end_list}
				<option value="{$appointment_end_list[hour].timestamp}"{$appointment_end_list[hour].sel}>{$appointment_end_list[hour].time_label}</option>	
			{/section}	    
			</select>
			<img src="{$imgpathmaster}/space.gif" alt="" width="20" height="1" hspace="0" vspace="0" border="0">
			<input type="checkbox" name="day" {$daysel}>{$gentemp_wholeday}<img src="{$imgpathmaster}/space.gif" alt="" width="20" height="1" hspace="0" vspace="0" border="0">
			<input type="checkbox" name="holiday" {$holisel}>{$gentemp_vacation}<img src="{$imgpathmaster}/space.gif" alt="" width="20" height="1" hspace="0" vspace="0" border="0">
			<input type="checkbox" name="private" {$prsel}>{$gentemp_private}
		</td>
		-->
	
	</tr>
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>						
	  <tr align="left">
	    <td class="category" height="20"><img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" /></td>
	    <td class="category" width="130">{$temp_appt_type|capitalize},&nbsp;{$temp_loc|lower},&nbsp;{$temp_availability|lower}</td>
	    <td class="category">&nbsp;</td>
	  </tr>
	  
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	  <tr class="tab" align="left">
	   {* type de rdv *}
	    <td class="tab" height="60"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
	    <td class="formhead">{$temp_appt_type}</td>
	    <td class="tab">
		
		<select name="id_appt_type" size="1" >
		  {section name=type loop=$appointment_type}
		<option value="{$appointment_type[type].id}" {$appointment_type[type].sel} >{$appointment_type[type].type}</option>	
		  {/section}	    
	      </select>
	  
	    <SCRIPT LANGUAGE="javascript">
			//declare and describe colorisation function :
			{$script_appt_type_color.script_code}
			
			//execute colorisation :
			{$script_appt_type_color.script_name}(document.nd.id_appt_type);		
		
		</SCRIPT>
		{* ********** *}
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="private"{$prsel} id="private_chk"><label for="private_chk">{$gentemp_private}</label>
		</td>
	
	  </tr>
	  
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	  <tr class="tab" align="left">
	    <td class="tab" height="40"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
	    <td class="formhead">{$temp_loc}</td>
	    <td class="tab">
		{* location type *}
		<select name="id_location_type" size="1" >
		  {section name=type loop=$appointment_location_type}
		<option value="{$appointment_location_type[type].id}" {$appointment_location_type[type].sel} >{$appointment_location_type[type].type}</option>	
		  {/section}	    
	      </select>
		{* ****** *}  
		&nbsp;&nbsp;=>&nbsp;&nbsp;<input class="form" style="width:45ex;height:3ex;" type="text" value="{$location|escape:"html"}" name="location" maxlength="100" size="80"></td>
	
	  </tr>
	  
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	  {* availability *}
	  <tr class="tab"  align="left">
	    <td class="tab" height="40"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
	    <td class="formhead">{$temp_availability}</td>
	    <td class="tab">
	      
	      {* <img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" /> *}
			
	      {section name=availability_type loop=$availability_list}
			<INPUT TYPE="radio" NAME="availability" VALUE="{$availability_list[availability_type].id}" {$availability_list[availability_type].chk} id="avail_{$availability_list[availability_type].id}" ONFOCUS="update_telephone_field({$availability_list[availability_type].id})"> <label for="avail_{$availability_list[availability_type].id}"> {$availability_list[availability_type].text}</label>
		    {* telephone : *}
			{if $availability_list[availability_type].id == 1} &nbsp;&nbsp;=>&nbsp;&nbsp;{$gentemp_telephone}:&nbsp; <input class="form" style="width:18ex;height:2ex;" type="text" value="{$telephone|escape:"html"}" name="telephone" maxlength="14" size="50">
			{/if}
			<BR>		
		  {/section}
		  
			<SCRIPT LANGUAGE="javascript">
				for(i=0;i<document.nd.availability.length;i++)
					if (document.nd.availability[i].checked) update_telephone_field(i);
			</SCRIPT>
			  
	    </td>
	
	  </tr>
	  
	  {* en-tête description *}
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>						
	  <tr align="left">
	    <td class="category" height="20"><img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" /></td>
	    <td class="category" width="130">{$temp_subject}</td>
	    <td class="category">&nbsp;</td>
	
	  </tr>
	   
	  {* résumé *}
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	  <tr class="tab" align="left">
	    <td class="tab" height="60"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
	    <td class="formhead">{$temp_subject_summarized}</td>
	    <td class="tab">
			<INPUT class="form" style="width:80ex;height:3ex;" type="text" value="{$subject_summ|escape:"html"}" name="subject_summ" maxlength="100" size="50">
		</td>
	
	  </tr>
	  
	  {* description détaillée *}
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	  <tr class="tab" align="left">
	    <td class="tab" height="60"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
	    <td class="formhead">{$temp_subject_detailed}</td>
	    <td class="tab"><textarea class="formtextarea" style="width:80ex; height:16em;" name="thema" rows="4" cols="80">{$thema}</textarea></td>
	
	  </tr>
  	
	{* participants *}
	  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>						
	  <tr align="left">
	    <td class="category" height="20"><img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" /></td>
	    <td class="category" width="130">{$temp_participants}</td>
	    <td class="category">&nbsp;</td>
	  </tr>
  
  	<!--
	<tr><td class="lines2" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr align="left">
		<td class="tab" height="40"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">&nbsp;</td>
		<td class="tab"><input type="checkbox" name="i_will"{if $temp_will_selected eq "true"} checked{/if}> {$temp_i_will}</td>
	</tr>
	-->
	<tr class="tab" align="left">
    	<td class="tab" height="10" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="60" height="1" /></td>
  	</tr>
	<tr class="tab" align="left" >
		<td class="tab" height="80"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_participants}</td>
		<td class="formhead">
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="formhead" valign="top" width="270">{$availableparticipants}<br>
						<select class="available" multiple name="tn[]" size="4">
						{section name=pt loop=$partie}
							<option value="{$partie[pt].userid}">{$partie[pt].name}</option>
						{/section}	    
						</select>
						<br>
						<input class="submit" onclick="MoveOption('tn','participants');" type="button" value="{$addbutton}" name="Add">			    
						<img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0">
					</td>
					<td class="formhead" valign="top">{$temp_selparticipants}<br>
						<select class="select" multiple  name="participants[]" size="4">
						{section name=spt loop=$spartie}
							<option value="{$spartie[spt].userid}">{$spartie[spt].name}</option>
						{/section}	
						</select>
						<br>
						<input class="submit" onclick="MoveOption('participants','tn');" type="button" value="{$removebutton}" name="Remove">
					</td>
					<td class="formhead" align="left" width="200">&nbsp;</td>
				</tr>
				<tr><td class="formhead" align="left" colspan="3">&nbsp;</td></tr>
				<!-- <tr>
					<td class="formhead" align="left">&nbsp;</td>
					<td class="formhead" align="left" colspan="2"><input class="submit" onclick="testAvail('{$sname}');" type="button" value="{$temp_avail_text}" name="AvailTest">
				</tr>
				-->
			</table>
		</td>
	
	</tr>
	<tr class="tab"><td CLASS="tab" COLSPAN="3">&nbsp;</td></tr>
	
	<tr><td class="lines"  height="1" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="60"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_extparticipants}</td>
		<td class="formhead"><textarea class="formtextarea" name="external" rows="4" cols="80" style="width:70ex; height:4em;">{$external}</textarea></td>
	
	</tr>
	{* repetitions *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>						
	  <tr align="left">
	    <td class="category" height="20"><img src="{$imgpathgeneral}/space.gif" alt="" width="10" height="1" /></td>
	    <td class="category" width="130">{$temp_repititions}</td>
	    <td class="category">&nbsp;</td>
	  </tr>
	<tr><td class="lines2" height="1" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_appointmentrepeat}</td>
		<td class="formhead">
			<table border="0" cellpadding="0" cellspacing="6">
				<tr class="tab">
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==0} checked{/if} value="0">{$gentemp_repeater_0}</td>
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==4} checked{/if} value="4">{$gentemp_repeater_4}</td>
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==1} checked{/if} value="1">{$gentemp_repeater_1}</td>
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==2} checked{/if} value="2">{$gentemp_repeater_2}</td>
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==3} checked{/if} value="3">{$gentemp_repeater_3}</td>
					<td><input type="radio" name="appointment_attribute"{if $appointment_attribute==5} checked{/if} value="5">{$gentemp_repeater_5}</td>
				</tr>  
			</table>
		</td>
	
	</tr>
	<tr><td class="lines2" height="2" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead"><a class="edit" href="{$back}">{$gentemp_abort}</a></td>
		<td class="formhead"><input class="submit" type="submit" name="{$sname}" value="{$svalue}" onclick="return check_form();"></td>
	
	</tr>
	<tr><td class="lines" height="1" width="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
</table>
</form>
<SCRIPT langage="javascript">
keep_nbday_coherence('serial_start');
keep_nbday_coherence('serial_end');
keep_appt_end_coherence();
{if $sched_type != ""}
	scheduling_{$sched_type}_click();
{/if}

</SCRIPT>

{include file="$gentemplates/_footer.tpl" aktUser=$username}
