<!--
// JavaScript Document
var audioOn = false;
function audioDo(doWhat,toWhat){
   if(audioOn){
      var A = eval('document.'+toWhat);
      if (A != null){
         if (doWhat=='stop') A.stop();
         else{
            if (navigator.appName == 'Netscape') A.play();
            else{
               if (document.M == null){
                  document.M = false; var m;
                  for(m in A) if (m == "ActiveMovie"){
                     document.M = true; break;
                     }
                  }
               if (document.M) A.SelectionStart = 0;
               if (document.M) A.play();
            }
         }
      }
   }
}

function ClearBuffer( objLst )
{
  if( document.all )
  {
    objLst.NextClear = new Date;
    objLst.TypeBuf = "";
    objLst.NextClear.setSeconds( objLst.NextClear.getSeconds() + 2 ); 
  }
}

//*********************************************************************
// TypeAhead
//*********************************************************************
function TypeAhead( objLst )
{
  var objTxt;
  var nKeyCode;
  var bRetVal = true;
  var nIter;
  
  if( document.all )
  { 
    if( !objLst.NextClear )
    {
      ClearBuffer(objLst);
    }
    
    if( (dtNow = new Date()) > objLst.NextClear )
    {
      ClearBuffer(objLst);
    }
    
    nKeyCode = window.event.keyCode;
    objLst.TypeBuf = objLst.TypeBuf + String.fromCharCode(nKeyCode)
  
    if( 27 == nKeyCode )
    {
      ClearBuffer(objLst);
      
      return false;
    }
    else
    if( 13 == nKeyCode)
    {
    ValidateForm2()
    }
    else
    {
      nIter = (objLst.TypeBuf.length > 1) ? objLst.selectedIndex : 0;
      
      for( ; nIter < objLst.length; nIter++ ) 
      {
        strItem = objLst.options[nIter].text;
      
        if( strItem.substr(0, objLst.TypeBuf.length).toLowerCase() == objLst.TypeBuf.toLowerCase() )
        {
          objLst.selectedIndex = nIter;
          objLst.options[nIter].selected = true;
          break;
        }
      }
    }
    
    objLst.NextClear = new Date();
    objLst.NextClear.setSeconds( objLst.NextClear.getSeconds() + 2 ); 
    bRetVal = false;
  }
  
  return bRetVal;
}

function ValidAlphaNum(tocheck) {
  var isalphanum = true;
  if ((tocheck == null) || (tocheck == "")) {
     isalphanum = true;
     return isalphanum;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9") &&
         (tocheck.substring(j,j+1) != "a") &&
         (tocheck.substring(j,j+1) != "b") &&
         (tocheck.substring(j,j+1) != "c") &&
         (tocheck.substring(j,j+1) != "d") &&
         (tocheck.substring(j,j+1) != "e") &&
         (tocheck.substring(j,j+1) != "f") &&
         (tocheck.substring(j,j+1) != "g") &&
         (tocheck.substring(j,j+1) != "h") &&
         (tocheck.substring(j,j+1) != "i") &&
         (tocheck.substring(j,j+1) != "j") &&
         (tocheck.substring(j,j+1) != "k") &&
         (tocheck.substring(j,j+1) != "l") &&
         (tocheck.substring(j,j+1) != "m") &&
         (tocheck.substring(j,j+1) != "n") &&
         (tocheck.substring(j,j+1) != "o") &&
         (tocheck.substring(j,j+1) != "p") &&
         (tocheck.substring(j,j+1) != "q") &&
         (tocheck.substring(j,j+1) != "r") &&
         (tocheck.substring(j,j+1) != "s") &&
         (tocheck.substring(j,j+1) != "t") &&
         (tocheck.substring(j,j+1) != "u") &&
         (tocheck.substring(j,j+1) != "v") &&
         (tocheck.substring(j,j+1) != "w") &&
         (tocheck.substring(j,j+1) != "x") &&
         (tocheck.substring(j,j+1) != "y") &&
         (tocheck.substring(j,j+1) != "z") &&
         (tocheck.substring(j,j+1) != "A") &&
         (tocheck.substring(j,j+1) != "B") &&
         (tocheck.substring(j,j+1) != "C") &&
         (tocheck.substring(j,j+1) != "D") &&
         (tocheck.substring(j,j+1) != "E") &&
         (tocheck.substring(j,j+1) != "F") &&
         (tocheck.substring(j,j+1) != "G") &&
         (tocheck.substring(j,j+1) != "H") &&
         (tocheck.substring(j,j+1) != "I") &&
         (tocheck.substring(j,j+1) != "J") &&
         (tocheck.substring(j,j+1) != "K") &&
         (tocheck.substring(j,j+1) != "L") &&
         (tocheck.substring(j,j+1) != "M") &&
         (tocheck.substring(j,j+1) != "N") &&
         (tocheck.substring(j,j+1) != "O") &&
         (tocheck.substring(j,j+1) != "P") &&
         (tocheck.substring(j,j+1) != "Q") &&
         (tocheck.substring(j,j+1) != "R") &&
         (tocheck.substring(j,j+1) != "S") &&
         (tocheck.substring(j,j+1) != "T") &&
         (tocheck.substring(j,j+1) != "U") &&
         (tocheck.substring(j,j+1) != "V") &&
         (tocheck.substring(j,j+1) != "W") &&
         (tocheck.substring(j,j+1) != "X") &&
         (tocheck.substring(j,j+1) != "Y") &&
         (tocheck.substring(j,j+1) != "Z") &&
         (tocheck.substring(j,j+1) != ".") &&
         (tocheck.substring(j,j+1) != "-") &&
         (tocheck.substring(j,j+1) != " ") &&
         (tocheck.substring(j,j+1) != "_")) {
         isalphanum = false
         
       }
    }
    return isalphanum;  }
    
    }         

function ValidDate(tocheck) {
  var isdate = true;
  if ((tocheck == null) || (tocheck == "")) {
     isdate = true;
     return isdate;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9") &&
		 (tocheck.substring(j,j+1) != "/")) {
         isdate = false;
         
       }
    }
    return isdate;  }
    
    }    
	

function ValidNumber(tocheck) {
  var isnum = true;
  if ((tocheck == null) || (tocheck == "")) {
     isnum = true;
     return isnum;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9")) {
         isnum = false;
         
       }
    }
    return isnum;  }
    
    }         

function ValidAlphaNum(tocheck) {
  var isalphanum = true;
  if ((tocheck == null) || (tocheck == "")) {
     isalphanum = true;
     return isalphanum;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9") &&
         (tocheck.substring(j,j+1) != "a") &&
         (tocheck.substring(j,j+1) != "b") &&
         (tocheck.substring(j,j+1) != "c") &&
         (tocheck.substring(j,j+1) != "d") &&
         (tocheck.substring(j,j+1) != "e") &&
         (tocheck.substring(j,j+1) != "f") &&
         (tocheck.substring(j,j+1) != "g") &&
         (tocheck.substring(j,j+1) != "h") &&
         (tocheck.substring(j,j+1) != "i") &&
         (tocheck.substring(j,j+1) != "j") &&
         (tocheck.substring(j,j+1) != "k") &&
         (tocheck.substring(j,j+1) != "l") &&
         (tocheck.substring(j,j+1) != "m") &&
         (tocheck.substring(j,j+1) != "n") &&
         (tocheck.substring(j,j+1) != "o") &&
         (tocheck.substring(j,j+1) != "p") &&
         (tocheck.substring(j,j+1) != "q") &&
         (tocheck.substring(j,j+1) != "r") &&
         (tocheck.substring(j,j+1) != "s") &&
         (tocheck.substring(j,j+1) != "t") &&
         (tocheck.substring(j,j+1) != "u") &&
         (tocheck.substring(j,j+1) != "v") &&
         (tocheck.substring(j,j+1) != "w") &&
         (tocheck.substring(j,j+1) != "x") &&
         (tocheck.substring(j,j+1) != "y") &&
         (tocheck.substring(j,j+1) != "z") &&
         (tocheck.substring(j,j+1) != "A") &&
         (tocheck.substring(j,j+1) != "B") &&
         (tocheck.substring(j,j+1) != "C") &&
         (tocheck.substring(j,j+1) != "D") &&
         (tocheck.substring(j,j+1) != "E") &&
         (tocheck.substring(j,j+1) != "F") &&
         (tocheck.substring(j,j+1) != "G") &&
         (tocheck.substring(j,j+1) != "H") &&
         (tocheck.substring(j,j+1) != "I") &&
         (tocheck.substring(j,j+1) != "J") &&
         (tocheck.substring(j,j+1) != "K") &&
         (tocheck.substring(j,j+1) != "L") &&
         (tocheck.substring(j,j+1) != "M") &&
         (tocheck.substring(j,j+1) != "N") &&
         (tocheck.substring(j,j+1) != "O") &&
         (tocheck.substring(j,j+1) != "P") &&
         (tocheck.substring(j,j+1) != "Q") &&
         (tocheck.substring(j,j+1) != "R") &&
         (tocheck.substring(j,j+1) != "S") &&
         (tocheck.substring(j,j+1) != "T") &&
         (tocheck.substring(j,j+1) != "U") &&
         (tocheck.substring(j,j+1) != "V") &&
         (tocheck.substring(j,j+1) != "W") &&
         (tocheck.substring(j,j+1) != "X") &&
         (tocheck.substring(j,j+1) != "Y") &&
         (tocheck.substring(j,j+1) != "Z") &&
         (tocheck.substring(j,j+1) != ".") &&
         (tocheck.substring(j,j+1) != "-") &&
         (tocheck.substring(j,j+1) != " ") &&
         (tocheck.substring(j,j+1) != "_")) {
         isalphanum = false
         
       }
    }
    return isalphanum;  }
    
    }         

function ValidDate(tocheck) {
  var isdate = true;
  if ((tocheck == null) || (tocheck == "")) {
     isdate = true;
     return isdate;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9") &&
		 (tocheck.substring(j,j+1) != "/")) {
         isdate = false;
         
       }
    }
    return isdate;  }
    
    }    
	
function ValidTime(tocheck) {
  var istime = true;
  if ((tocheck == null) || (tocheck == "")) {
     istime = true;
     return istime;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "9") &&
		 (tocheck.substring(j,j+1) != ":") &&
		 (tocheck.substring(j,j+1) != "a") &&
		 (tocheck.substring(j,j+1) != "A") &&
		 (tocheck.substring(j,j+1) != "p") &&
		 (tocheck.substring(j,j+1) != "P") &&
		 (tocheck.substring(j,j+1) != "m") &&
		 (tocheck.substring(j,j+1) != "M") &&
		 (tocheck.substring(j,j+1) != " ")) {
         istime = false;
         
       }
    }
    return istime;  }
    
    }         

function ValidPhone(tocheck) {
  var isphone = true;
  if ((tocheck == null) || (tocheck == "")) {
     isphone = true;
     return isphone;
   }
  else {
    for (j = 0;j < tocheck.length; j++) {
      if ((tocheck.substring(j,j+1) != "0") &&
         (tocheck.substring(j,j+1) != "1") &&
         (tocheck.substring(j,j+1) != "2") &&
         (tocheck.substring(j,j+1) != "3") &&
         (tocheck.substring(j,j+1) != "4") &&
         (tocheck.substring(j,j+1) != "5") &&
         (tocheck.substring(j,j+1) != "6") &&
         (tocheck.substring(j,j+1) != "7") &&
         (tocheck.substring(j,j+1) != "8") &&
         (tocheck.substring(j,j+1) != "-") &&
         (tocheck.substring(j,j+1) != "9")) {
         isphone = false;
         
       }
    }
    return isphone;  }
      
    }  
    
function ValidEmail(eadd){
	var isemail = true;
	if (eadd.length < 6 ){
         isemail = false;
         return isemail;
        }
          
    if (eadd.indexOf("@") == -1 ){
          isemail = false;
          return isemail;
          }
          
    if (eadd.indexOf(".") == -1 ){
          isemail = false;
          return isemail;
          }
    return isemail;
    }   

// -->