// exit out of external frameset
if (parent.location != this.location) {
  parent.location.href = this.location.href
  }


// drop menu script for IE
startList = function() {
 if (document.all&&document.getElementById) {
  navRoot = document.getElementById("menus");
  for (i=0; i<navRoot.childNodes.length; i++) {
   node = navRoot.childNodes[i];
   if (node.nodeName=="LI") {
    node.onmouseover=function() {
     this.className+=" over";
     hideSelect(true);
    }
    node.onmouseout=function() {
     this.className=this.className.replace(" over", "");
     hideSelect(false);
    }
    if (node.lastChild.nodeName=="UL") {
     parentID = node.id;
     node.lastChild.onmouseover=function() {
      parentID.className+=" over";
      hideSelect(true);
     }
     node.lastChild.onmouseout=function() {
      parentID.className=node.className.replace(" over", "");
      hideSelect(false);
     }
    }
   }
  }
 }
}
window.onload=startList;

//------------------------------------------
//testing options for hideselect function...
//------------------------------------------
// hide items (<select> form elements primarily) from drop menus 
// so they will not show through the menus
function hideSelect(isOn) {
  if(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4) {
//original:
//    if (document.all.hideselect != null) {
//all:
//    if (document.all != null) {
//only <select>:
    if (document.getElementsByTagName("select") != null) {

//      divs = document.all.hideselect;
//      divs = document.all;
      divs = document.getElementsByTagName("select");

      if (divs.length != null) {
        for (i = 0; i < divs.length; i++) {
//only needed for all:
//        if(divs[i].className=="hideselect") {
//                  divs[i].style.visibility = isOn ? "hidden" : "visible";
//        }
//for others:
          divs[i].style.visibility = isOn ? "hidden" : "visible";
        }
      }
      else {
//only needed for all:
//        if(divs.className=="hideselect") {
//                divs.style.visibility = isOn ? "hidden" : "visible";
//        }
//for others:
        divs.style.visibility = isOn ? "hidden" : "visible";
      }
    }
  }
}
//------------------------------------------


// jump menu script for Home page Regional and Company menus
function goSelect(form,formName) {
  if (formName) {
    setcookie('DEmenu',formName,730);
    setcookie('DEutility',form.menu.options[form.menu.selectedIndex].value,730);
  }
  if (form.menu.selectedIndex != 0) {
    document.location.href = form.menu.options[form.menu.selectedIndex].value;
  } else {
    showMsg = document.getElementById(formName + "Prompt");
    showMsg.style.display = "block";
    return false;
  }
}
// cookie scripts for Home page Regional menus
function getexpirydate(nodays) {
    var UTCstring;
    Today = new Date();
    nomilli=Date.parse(Today);
    Today.setTime(nomilli+nodays*24*60*60*1000);
    UTCstring = Today.toUTCString();
    return UTCstring;
}
function setcookie(name,value,duration) {
    cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
    document.cookie=cookiestring;
}
