<SCRIPT LANGUAGE="javascript">
{literal}
/*
var sel_ids = new Array;
var last_selected = "";
var current_selected = "";
function change_handler(sel_obj){
	
	for(i=0; i<sel_obj.length; i++)
         if(sel_obj.options[i].selected == true)
         {	
				if (sel_ids[i] != 1) {
					last_selected = current_selected;
					current_selected = i;
					//alert('current: '+current_selected+'\n'+'last: '+last_selected);
				}							
				sel_ids[i]= 1;
				//alert('change id '+i);
         }
		
	
	for(i=0; i<sel_obj.length; i++) {
         if(sel_obj.options[i].selected == true)
         {
                //alert('focus id '+i);
				sel_ids[i]= 1;
				//sel_obj.options[i].selected = true;
         }
	}
	
	for(j=0; j<sel_obj.length; j++) {
		 if(sel_ids[j] == 1 && j != current_selected) {
		 	//alert(j);
			sel_obj.options[j].selected = true;
		 }
		 else sel_obj.options[j].selected = false;
    }
	
	if (current_selected != "") {
		//alert('current_selected= '+ current_selected);
		sel_obj.options[current_selected].selected = true;
	}
}
*/

function check_id_all() {
	var to_form = eval('document.details.elements[\"parts[]\"]');
	if (to_form.options[0].selected == true) {
		//unselect all others
		for(j=1; j<to_form.length; j++) to_form.options[j].selected = false;		
	}
}

{/literal}
</SCRIPT>
<form name="details" action="{$phpself}" method="POST">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">	
<input type="hidden" name="date" value="{$date}">
		
<table border="0" cellpadding="0" cellspacing="0" width="180">
  <tr>
    <td class="lines" height="1" colspan="6"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr class="stand" align="left">
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
    <td class="subnavback" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="subnavback" colspan=2><div class="subnavlinkon"><strong>{$viewcalendarof}</strong></div></td>
    <td class="subnavback" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr>
    <td class="lines" height="1" colspan="6"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr>
    <td class="lines" height="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
    <td class="stand" height="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="4" /></td>
    <td class="lines" height="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr align="left">
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
    <td class="stand" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="stand" colspan=2>
      <select class="available" name="parts[]" multiple STYLE="height:201px;" ONCHANGE="check_id_all();">
	<option value="all">{$calendarownerall}</option>
	  {section name=pt loop=$td2}
	<option value="{$td2[pt].id}">{$td2[pt].name}</option>
	  {/section}	    
      </select>
    </td>
    <td class="stand" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr align="left">
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
    <td class="stand" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="stand" colspan=2 ALIGN="center">
      <input class="submit" type="submit" value="{$view}" name="showcalendar_all">
    </td>
    <td class="stand" height="22" width="10" align="center" valign="middle">&nbsp;</td>
    <td class="lines" height="1" width="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr>
    <td class="lines" height="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
    <td class="stand" height="1" colspan="4"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="4" /></td>
    <td class="lines" height="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
  <tr>
    <td class="lines" height="1" colspan="6"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>
  </tr>
</table>	
</form>