<!--

// amount of time to display sub menu
// before making it go away
var dispTime = 500;

// handle used with the timeout
// to make the sub menu's go away
var handle = false;
var subhandle = false;

// menu id's
/*
var subs = new Array(
	"manu13",
	"manu14",
	"manu20",
	"manu21",
	"manu22",
	"brandsMenu",
	"salespersonSearch"
);
*/

// sub menu id's
var sid = new Array(
);

// handle the pop-up menus
function popmenu(id,activator) {

	// find our object
	var subObj = document.getElementById(id);

	// clear out any other pop menu that is showing
	if(handle) {
		clearTimeout(handle);
	}
	hidemenus();
	
	// handle the rollover img change
	/*
	var img = document.getElementById("main" + id);
	img.src = img.src.replace('off', 'on');
	*/
	
	// pop up this menu
	subObj.style.visibility = "visible";

	t = activator.offsetTop;
	l = activator.offsetLeft;
	
	//patch top and left when we are in an other object.
	obj = activator;
	while(obj.offsetParent){
		t += obj.offsetParent.offsetTop;
		l += obj.offsetParent.offsetLeft;
		obj = obj.offsetParent;
	}	
	if(id.charAt(0) == 'B') {
		subObj.style.left = l + "px";
		subObj.style.top = (t + activator.offsetHeight) + "px";

	} else {
	
		subObj.style.left = (l + activator.offsetWidth) + "px";
		subObj.style.top = t + "px";
	}
	
}

// This pops up a sub-menu.
// It won't do any rollover effects.
function popsub(childID) {
	var obj = document.getElementById(childID);
	obj.style.visibility = "visible";
}

// make a pop-up menu go away
function hidemenus() {
	var img;
	for(i = 0; i < subs.length; i++) {
	
		// handle the rollover image
		/*
		img = document.getElementById("main" + subs[i]);
		img.src = img.src.replace('on', 'off');
		*/
		
		// hide the menu
		var obj = document.getElementById(subs[i]);
		obj.style.visibility = "hidden";
	}
}

// make a sub-menu go away
function hidesubs() {
	for(i = 0; i < sid.length; i++) {
		var obj = document.getElementById(sid[i]);
		obj.style.visibility = "hidden";
	}
}

//-->