<!-- to stop display

var isIE
var dtemsg = "" ;
if ( navigator.appName.indexOf("Microsoft") == -1 )
 {
  //alert(" Microsoft == -1 --> Netscape")
  isIE = false ;
 }
else
 {
  //alert("IE")
  isIE = true ;
 } ; 

//  displayDay will convert a number from 0 to 6 to the name of the day
//  it will accept the getDay() method
//  it take 2 parameter, the 1st is the numeric day, the 2nd is either "s" 
//  for short day name OR any others for the long day name

function displayDay(type)
{
 var isShort
 var retValue 
 var tday = new Date() ;
 var DayRep = tday.getDay() ;
 var MthRep = tday.getMonth() ;
 var YrsRep = tday.getFullYear() ;
 var DtRep = tday.getDate() ;
 // alert ("day = " + DayRep + "   month = " + MthRep + "   year = " + YrsRep + " " + DtRep)
 if (type == "s") { isShort = true ;} ;

 switch (DayRep) {
  case 0 : retValue = (isShort ? "Sun" : "Sunday") ;
           break ;
  case 1 : retValue = (isShort ? "Mon" : "Monday") ;
           break ;
  case 2 : retValue = (isShort ? "Tue" : "Tuesday") ;
           break ;
  case 3 : retValue = (isShort ? "Wed" : "Wednesday") ;
           break ;
  case 4 : retValue = (isShort ? "Thr" : "Thursday") ;
           break ;
  case 5 : retValue = (isShort ? "Fri" : "Friday") ;
           break ;
  case 6 : retValue = (isShort ? "Sat" : "Saturday") ;
           break ;
  default : retValue = "Numeric day: out of range ** 0 to 6 only" ;
 }

 switch (MthRep) {
  case 0 : retValue = retValue + ", " + (isShort ? "Jan" : "January") ;
           break ;
  case 1 : retValue = retValue + ", " + (isShort ? "Feb" : "February") ;
           break ;
  case 2 : retValue = retValue + ", " + (isShort ? "Mar" : "March") ;
           break ;
  case 3 : retValue = retValue + ", " + (isShort ? "Apr" : "April") ;
           break ;
  case 4 : retValue = retValue + ", " + (isShort ? "May" : "May") ;
           break ;
  case 5 : retValue = retValue + ", " + (isShort ? "Jun" : "June") ;
           break ;
  case 6 : retValue = retValue + ", " + (isShort ? "Jul" : "July") ;
           break ;
  case 7 : retValue = retValue + ", " + (isShort ? "Aug" : "August") ;
           break ;
  case 8 : retValue = retValue + ", " + (isShort ? "Sep" : "September") ;
           break ;
  case 9 : retValue = retValue + ", " + (isShort ? "Oct" : "October") ;
           break ;
  case 10 : retValue = retValue + ", " + (isShort ? "Nov" : "November") ;
           break ;
  case 11 : retValue = retValue + ", " + (isShort ? "Dec" : "December") ;
           break ;
  default : retValue = retValue + ", " + "Numeric Month: out of range ** 0 to 11 only" ;
 }
 retValue = retValue + " " + DtRep + ", " + YrsRep
 return retValue
}

// ***********************************************************************************
// ** function make name change when item change -- 
// **
// *********************************************************************************** 
 
 function mkName(nam)
 {
   //
   //alert (nam.type)
   //if (nam.type == "checkbox") {
   // alert ("the value = " + nam.value)
   //}
   nam.name = "?chg?" + nam.name

 }
 
 
//  displayMonth will convert a number form 0 to 11 to the name of the month
//  it will accept the getMonth() method
//  it take 2 parameter, the 1st is the numeric month, the 2nd is either "s" 
//  for short month name OR any others for the long month name

function displayMonth(DayRep, type)
{
 var isShort
 var retValue

 if (type == "s") { isShort = true ;} ;

 switch (DayRep) {
  case 0 : retValue = (isShort ? "Jan" : "January") ;
           break ;
  case 1 : retValue =(isShort ? "Feb" : "February") ;
           break ;
  case 2 : retValue =(isShort ? "Mar" : "March") ;
           break ;
  case 3 : retValue =(isShort ? "Apr" : "April") ;
           break ;
  case 4 : return "May" ;
           break ;
  case 5 : retValue =(isShort ? "Jun" : "June") ;
           break ;
  case 6 : retValue =(isShort ? "Jul" : "July") ;
           break ;
  case 7 : retValue = (isShort ? "Aug" : "August") ;   
           break ;
  case 8 : retValue =(isShort ? "Sep" : "September") ;
           break ;
  case 9 : retValue =(isShort ? "Oct" : "October") ;
            break ;
  case 10 : retValue =(isShort ? "Nov" : "November") ;
            break ;
  case 11 : retValue =(isShort ? "Dec" : "December") ;
            break ;
  default : retValue = "Numeric month: out of range ** 0 to 11 only" ;

 }
 return retValue
}

// displayTime concatenate the hours and minute and the ampm to a string

function displayTime()
{
  var theHr, theMin, theAmPm, theSec, theChgDate, TodayTime
  TodayTime = new Date() ;
  theChgDate = TodayTime.getDay() ;   
  theHr = TodayTime.getHours() ;
  theMin = TodayTime.getMinutes() ;
  theSec = TodayTime.getSeconds() ;
  
  theAmPm = (theHr == 12 && theMin == 0 ? "noon" : (theHr < 12 ? "am" : "pm")) ;
  theHr = (theHr > 12 ? theHr = theHr - 12  : theHr = theHr)
  theHr = (theHr < 10 ? theHr = "0" + theHr : theHr = theHr)
  theMin = (theMin < 10 ? theMin = "0" + theMin : theMin = theMin)
  theSec = (theSec < 10 ? theSec = "0" + theSec : theSec = theSec)
  theTime = theHr + " : " + theMin + " : " + theSec + " " + theAmPm  ;
  return theTime
 }

// timeIt will continue to change the inner text of an ID every 10 sec. only work in IE 4+
function timeIt()
{
  if (isIE)
  {
   timerID.innerHTML = displayTime() ;
   setInterval("timerID.innerHTML = displayTime()", 1000) ;
   // setInterval("timerID.innerHTML = ''", 4900) ;   
  }
  else
  {
   document.write(displayTime()) ;
  }

}
var mapWin = null
function nWindow(loc,wName,setUp) { //v2.0


  if (mapWin == null || mapWin.closed) {
   //alert("new")
   mapWin = window.open(loc,wName,setUp); 
   mapWin.focus() ;
  }
  else {
   //alert("old")
   mapWin.close();
   mapWin = window.open(loc,wName,setUp); 
   mapWin.focus();
  }
  if (mapWin.opener == null) {
	mapWin.opener = self ; }
  //if (navigator.appName == "Netscape") {
  //  mapWin.focus(); }
  //else {
  //  mapWin.focus(); }
}


// ************************************************************************************
// ** function vcheck -- check for required text, numeric, and date input.
// **                    numeric input must be varied type.
// **                    date input must be correct and within the range of the month.
// ************************************************************************************
                       
 function vcheck(theForm) {
  var errmsg ;
  var txtmsg = "" ;
  var nummsg = "" ;
	
  // check for empty text input on special mark field
  // txt_ for text, num_ for numeric, dte for date
  // txt does not allow for empty OR space only input
  // num same as txt but must also be numeric only
  // dte same as txt but must also be a valid date
  dtemsg = ""
  for ( var I = 0; I < theForm.length; I++ ) {
   var em = theForm.elements[I] ;
   var t = em.name.substr(0, 3) ;
   if ( (em.type == "text") || (em.type == "textarea") ) {
    if ( t == "txt" || t == "num" || t == "dte" ) {
     var emt = em.value.replace(/\s+/g, "") 
     if ( (emt == null) || ( emt == "" ) ) {
      txtmsg += "\n          " + em.name.substr(4, em.name.length) ;
     }  // if null, empty
     else {
      switch (t) {
       case "num" : if ( isNaN(emt) ) {
                     nummsg += "\n          " + em.name.substr(4, em.name.length) ;
                    }   // is not number
                    break ;
       case "dte" : if ( !isDate(emt) ) {
                     dtemsg += "\n          " + em.name.substr(4, em.name.length) ;
                    }   // is not date
                    break ;                  
       default : break ;
      }  // switch t
     }  // else null, empty
    }  // if t: txt, num, dte
   }  // if type: text, textarea
  }  // for I:theForm.length
   
   if (!txtmsg && !nummsg && !dtemsg) { return true; }
   
   errmsg =  "-----------------------------------------------------------------------------\n\n"
   errmsg += " Please verified and correct the following error(s).\n\n"
   errmsg += "-----------------------------------------------------------------------------\n\n"
   if (txtmsg) {
    errmsg += "--The following required field(s) are empty: " + txtmsg + "\n"
   }  // if txtmsg
   if (nummsg) {
    errmsg += "--The following required field(s) must be number: " + nummsg + "\n"
   }  // if nummsg
   if (dtemsg) {
    errmsg += "--The following required field(s) must be acceptable date: " + dtemsg + "\n"
   }  // if dtemsg
   
   alert (errmsg) ;
   return false ;
 }

// ***********************************************************************************
// ** function isDate -- check for leap year and date range
// **
// ***********************************************************************************

 function isDate(dInput) {

 var ret
 ret = /\b([1-9]|[0][1-9]|[1][0-2])\/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])\/([4-9][0-9]|[0-3][0-9]|[1][9][4-9][0-9]|[2][0][0-3][0-9])\b/
 
 if (ret.exec(dInput)) {
  var s, y, d, m
  s = dInput.split("/")
  m = s[0]
  d = s[1]
  y = s[2]
  if (y.length == 2) {
   if (y <= 39 ) {
    y = "20" + y
   }
   else {
    y = "19" + y
   } 
  }
  if (m == "08" || m == "09" ) m = m.substr(1) 
  m = parseInt(m)
  y = parseInt(y)
  d = parseInt(d)
  if (m  == 2) {
   if ( y % 4 != 0 ) {
    if ( d > 28 ) {
     dtemsg += "\n          " + "date > 28 days ?" ;
     return false
    } 
   }
   else {
    if (y % 400 == 0 ) { 
     if ( d > 29 ) {
      dtemsg += "\n          " + "date > 29 days ?" ;
      return false
     } 
    } 
    else {
     if ( y % 100 == 0 ) {
      if ( d > 28 ) {
       dtemsg += "\n          " + "date > 28 days ?" ;
       return false
      } 
     }
     else {
      if ( d > 29 ) {
       dtemsg += "\n          " + "date > 29 days ?" ;
       return false
      } 
     } 
    }
   }  
  } 
  if ( m == 4 || m == 6 || m == 9 || m == 11 ) {
   if ( d > 30 ) {
    dtemsg += "\n          " + "date > 30 days ?" ;
    return false
   } 
  }
  return true ;
 }
 else {
  dtemsg += "\n          " + "in-correct date format." ;
  return false ;
 }
 }


function isNum(num) {

if (isNaN(num.value)) {
 alert ("Please enter a numeric value only.");
}
}

// -->

