﻿
function loadHover() 
{
    loadTopHover()

    if (document.all&&document.getElementById) 
    {
      if (document.getElementById("nav"))
      {
        navRoot = document.getElementById("nav");
         
            for (i=0; i<navRoot.childNodes.length; i++) 
            {
                node = navRoot.childNodes[i];
                if (node.nodeName=="LI") 
                {
                    node.onmouseover=function() 
                    {
                        this.className+=" over";
                    }
                        node.onmouseout=function() 
                        {
                        this.className=this.className.replace(" over", "");
                        }
                 }
            }
     }
   }
}



function loadTopHover() 
{
    if (document.all&&document.getElementById) 
    {
        navRoot = document.getElementById("nav1");
            for (i=0; i<navRoot.childNodes.length; i++) 
            {
                node = navRoot.childNodes[i];
                if (node.nodeName=="LI") 
                {
                    node.onmouseover=function() 
                    {
                        this.className+=" over";
                        //alert('mouseover');
                    }
                    node.onmouseout=function() 
                    {
                        this.className=this.className.replace(" over", "");
                        //alert('mouseout');
                    }
                 }
                
                 
                 
                 
            }
     }
   
}


  function checkForm(ID)
  {
  /*var invalidChars = " /:,;"
  for (var i=0; i<invalidChars.length; i=++;) { 
  var badChar = invalidChars.charAt(i)
  if (document.getElementById(ID).value.indexOf(badChar,0) > -1) {
    alert("The data you entered contains invalid characters");
    document.getElementById(ID).value='';
    return false;
    }
    }*/
    var strID=document.getElementById(ID).value
    var atPos = strID.indexOf("--",0)
    if (atPos !=-1) {
    alert("there can not be -- symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }
    
      var strID1=document.getElementById(ID).value
    var atPos1 = strID1.indexOf(" ",0)
    if (atPos1 != -1) {
    alert("there can not be space symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }
    
    
        var strID2=document.getElementById(ID).value
    var atPos2 = strID2.indexOf("/",0)
    if (atPos2 != -1) {
    alert("there can not be / symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }
    
        var strID3=document.getElementById(ID).value
    var atPos3 = strID3.indexOf(":",0)
    if (atPos3 != -1) {
    alert("there can not be : symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }
    
        var strID4=document.getElementById(ID).value
    var atPos4 = strID4.indexOf(",",0)
    if (atPos4 != -1) {
    alert("there can not be , symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }
    
        var strID5=document.getElementById(ID).value
    var atPos5 = strID5.indexOf(";",0)
    if (atPos5 != -1) {
    alert("there can not be ; symbol in the text field");
    document.getElementById(ID).value='';
    return false;
    }

 }

