var time = 3000;
var numofitems = 4;
var menuitem1
var menuitem2
var menuitem3
var menuitem4
var menuscreated=false;

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

//menu methods - show one submenu and hide the others
function ehandler(event,objnum){
	if (menuscreated) {
		for (var i=1; i<=numofitems; i++){
			var shutdiv =eval( "menuitem"+i+".thediv");
    		shutdiv.style.visibility="hidden";
		}
		var opendiv = eval( "menuitem"+objnum+".thediv");
		opendiv.style.visibility="visible";
	}
}

// clear all the submenus (triggered when mouse moves over other areas of the page
function closesubnav(event){
	if (menuscreated && ((event.clientY <48)||(event.clientY > 107))){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
			shutdiv.style.visibility='hidden';
		}  
	}
}

// setup the menus
function makemenus(){
	menuitem1 = new menu(1,"hidden");
	menuitem2 = new menu(2,"hidden");
	menuitem3 = new menu(3,"hidden");
	menuitem4 = new menu(4,"hidden");
	menuscreated=true;
}

// we use this to jump to search engines rather than have long confusing URL's appear in the browser
function jump2(loc){
	if (loc==1) { 
	location.href="http://www.google.com/search?q=enhanced windows backup";
	}
	if (loc==2) { 
	location.href="http://search.yahoo.com/search?p=enhanced windows backup";
	}
	if (loc==3) { 
	location.href="http://search.msn.com/results.asp?q=enhanced+windows+backup";
	}
}

function highlightnot(){
}

function searchbox(){
}

