function CalendarDate(the_field)
{
   window.open('/libs/calendar/calendar.php?the_field='+the_field+'&the_val='+window.document.getElementById(the_field).value+'&type=date','Calendar','width=250,height=240,top=0,left=0,scrollbars=0');
}
function CalendarDateTime(the_field)
{
   window.open('/libs/calendar/calendar.php?the_field='+the_field+'&the_val='+window.document.getElementById(the_field).value+'&type=datetime','Calendar','width=270,height=240,top=0,left=0,scrollbars=0');
}
function CalendarReturnDate(type,the_field,the_val)
{
   if(type=='datetime')
   {
      window.opener.document.getElementById(the_field).value=the_val+' '+window.document.getElementById('shour').value+':'+window.document.getElementById('sminute').value;
   }
   else
   {
      window.opener.document.getElementById(the_field).value=the_val;
   }
   window.close();
}
function CalendarJumpTo(type,the_field,the_val,ctime)
{
   if(type=='datetime')
   {
      window.location.href='/libs/calendar.php?type='+type+'&the_field='+the_field+'&the_val='+the_val+'&ctime='+ctime+'&shour='+window.document.getElementById('shour').value+'&sminute='+window.document.getElementById('sminute').value;
   }
   else
   {
      window.location.href='/libs/calendar.php?type='+type+'&the_field='+the_field+'&the_val='+the_val+'&ctime='+ctime;
   }
}