// JavaScript Document

//global menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = allitems;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 107)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
	}
  }
}

function openwindow(cUrl,cName) {
  detailwin = window.open(cUrl,cName,"width=640,height=610,scrollbars");
}

function opencontact() {
  // detailwin = window.open("/contactus.htm","ContactUs","scrollbars,menubar,toolbar,location");
  detailwin = window.open("/contact_us.php","ContactUs","scrollbars,menubar,toolbar,location");
}

