startList = function() {
      if (document.all&&document.getElementById) {
            navRoot = document.getElementById("menu");
            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", "");
                        }
                  }
            }
      }
}
window.onload=startList;

function send_itBlock()
  {
         var n=document.forms['main_form'].category_search.value;
         var m=document.forms['main_form'].region_search.value;
         if((n==0)||(m==0))
           {
              alert("Please choose  items from the lists");
           }
         else
           {
             document.forms['main_form'].submit();
           }
  }

function send_it1Block(){
        var n=document.forms['main_firm1'].zip_search.value;
        if(n==''){
           alert("Please enter search request");
        }else{
         document.forms['main_firm1'].submit();
         }
}
function send_it2Block(){
        var n=document.forms['main_firm2'].keywords_search.value;
        if(n==''){
           alert("Please enter search request");
        }else{
         document.forms['main_firm2'].submit();
         }

}

function send_it_by_name(name)
  {
         document.forms[name].submit();
  }

///////////////////////////////////////////////

function getReturnToSearch()
  {
        var k = location.href.lastIndexOf('/');
        s = location.href.substr(0,k+1);
        s = s +"search.php?return=777";
        top.location.href=s;
  }

function getReturnToSearch2()
  {
        var k = location.href.lastIndexOf('/');
        s = location.href.substr(0,k);

        k = s.lastIndexOf('/');
        s = location.href.substr(0,k+1);
        s = s +"search.php?return=777";
        top.location.href=s;
  }

function loadFrame(a)
  {
     tPath = '';
     if(a == 'search.php')
       tPath = "javascript: getReturnToSearch();";
     else
       tPath = a;

     parent.frameB.document.open();
     parent.frameB.document.write("<html>");
     parent.frameB.document.write("<head>");
     parent.frameB.document.write("<title>Return Box</title>");
     parent.frameB.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
     parent.frameB.document.write("<link rel=stylesheet href='css/nylawprofessionals.css' type='text/css'>");
     //parent.frameB.document.write("<script language='JavaScript' type='text/JavaScript' src='js/main.js'></script>");
     parent.frameB.document.write("</head>");
     parent.frameB.document.write("<body style='background:url(images/copyright_bg.jpg) repeat-x'>");
     parent.frameB.document.write("<div align='center' class='text1'>RETURN TO <a href=\"" + tPath + "\" class='text1' target='_top'><b><u>NYLAWPROFESSIONALS</u></b></a>, ATTORNEYS YOU CAN TRUST</div>");
     parent.frameB.document.write("</body>");
     parent.frameB.document.write("</html>");
     parent.frameB.document.close();
  }

if (document.images)
{
  pic1= new Image(); 
  pic1.src="images/go.jpg";
}