    function confirmDate(year,month,day,hour) {
           iy = parseInt(year,10)
      if (! (iy >= 1996 && iy <= 3000) ) {
        alert("Year \""+iy+"\" is not an integer between 1996 and 3000")
        return false
      }
      if (month == "") { im = 1 }
      else {  im = parseInt(month,10)}
      if (! (im >= 0 && im <= 12) ) {
        alert("Month \""+month+"\" is not an integer between 1 and 12")
        return false
      }
      if (day == "00") { id = 1 }
      else { id = parseInt(day,10) }
      if (! (id >= 0 && id <= 31) ) {
        alert("Day \""+day+"\" is not an integer between 1 and 31")
        return false
      }
      if (hour == "") { ih = 0 }
      else { ih = parseInt(hour,10) }
      if (! (ih >= 0 && ih <= 23) ) {
        alert("Hour \""+hour+"\" is not an integer between 0 and 23")
        return false
      }
      return true
    }

function f()
{
  Sy  =  document.forms[0].start_Y.value
   ISy   = parseInt(Sy,10)
  SM  =  document.forms[0].start_M.value
   ISM   = parseInt(SM,10)
  SD  =  document.forms[0].start_D.value
   ISD   = parseInt(SD,10)
  SH  =  document.forms[0].start_H.value
   ISH   = parseInt(SH,10)
if ( ! confirmDate(Sy,SM,SD,SH) )
        { return false }

  Ey  =  document.forms[0].end_Y.value
   IEy   = parseInt(Ey,10)
  EM  =  document.forms[0].end_M.value
   IEM   = parseInt(EM,10)
  ED  =  document.forms[0].end_D.value
   IED   = parseInt(ED,10)
  EH  =  document.forms[0].end_H.value
   IEH   = parseInt(EH,10)
if ( ! confirmDate(IEy,IEM,IED,IEH) )
        { return false }

      return true
}

function num(){
	if((event.keyCode >= 46) && (event.keyCode < 58)){
		event.keyCode = event.keyCode;
	}
	else
		event.keyCode = 0;
 }


