
//////////////////////////////////////////////////////
	hovercolor   = "#FFFFFF";	// color name/code
	bgcolor      = "#CCDDEE";	// color name/code
	laycolor     = "#0066CC";      //color code for border lining
	bordercolor  = "#FFFFFF";
	textColor = '#003366';
	background   = "";			// picture url
	menu_border  = 2;			// IE only
	arrow    = "&nbsp;&nbsp;<img src='/e/online/gif/arrow.gif' border=0>"; // url of arrow picture for submenus
	//blank    = "<img src='"+appPath+"gif/blank.gif'>&nbsp;"; // url of blank picture
//////////////////////////////////////////////////////

No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
//determines Windows platform
var isWin = false;
if(navigator.platform == 'Win32') var isWin = true;



var timer;

function Show() {
	if(timer) clearTimeout(timer);
	for(menu=1; menu<Layer.length; menu++) {
		if(Layer[menu]) {
			if (document.getElementById) document.getElementById('L'+Layer[menu].ID).style.visibility = "hidden";
			else document.layers['L'+Layer[menu].ID].visibility = false;
			}
		}
	for(i=0;i<theSubMenu.length;i++) {
		if(document.getElementById) {
			document.getElementById(dependsOn[i]).style.background=bgcolor;
		}

	}

	for(i=0; i<arguments.length; i++) {
		menu=arguments[i];
		if (document.getElementById) document.getElementById('L'+menu).style.visibility = "visible";
		else document.layers['L'+menu].visibility = true;
		for(j=0;j<theSubMenu.length;j++) {
			if(document.getElementById) {
				if(menu==theSubMenu[j]) {
					document.getElementById(dependsOn[j]).style.background=hovercolor;
					document.getElementById(dependsOn[j]).style.color=textColor;
				}
			}
		}
	}
}



function Hide() { timer = setTimeout("Show(); hideLayer(); setMenuHover(thisPage)", 500); }

//sets the distance from top of page for top-level menu

var theTop = 72;
var theHeight = '18px';

var root = "";

function createBaseItem(theName,theText,Width,Left,theLink,subLayer) {
	if(!(userRef)) {
		root = "http://" + location.hostname.replace(/www\d/,'www');
		if(location.pathname==theLink) thisPage = subLayer;
	}

	layerName = "layer" + theName;
	var theInfo = '';
	if(theName==1) {
		leftdivider = "leftside";
		adjust = 6;
		macAdjust = 1;
	}
	else {
		leftdivider = "dividerleft";
		adjust = 5;
		macAdjust = 0;
	}
	if(theLink.substr(0,4)!='java') linkText = "window.top.location.href='"+root+theLink+"'";
	else linkText = root+theLink;
	//if(thisPage==theName) theText = "<b>"+theText+"</b>";
	 {


	}
	if (document.getElementById) {
		if(isWin) {
			theInfo += "<DIV ID="+layerName+"  onMouseover='setMenuHover(\""+theName+"\");' onMouseout='Hide();'  class=menuButton style='position:absolute; left:"+Left+"; top:"+theTop+"'>";
			theInfo += "<table width="+eval(Width+adjust)+" border=0 cellpadding=0 cellspacing=0><tr><td><img src='/e/online/gif/"+leftdivider+".gif'></td><td width="+Width+" class=menuButton>"+theText+"</td><td><img src='/e/online/gif/dividerright.gif'></td></tr><tr><td colspan=3 bgcolor=#000000 height=1><img src='/e/online/gif/spacer.gif' height=1></td></tr></table></DIV>";
			theInfo += "<DIV ID="+layerName+"on onMouseover='Show("+subLayer+"); hideLayer();' onMouseout='Hide();' onClick=\""+linkText+";Hide()\" class=menuButtonHover style='position:absolute; visibility:hidden; left:"+Left+"; top:"+theTop+"'>";
			theInfo += "<table width="+eval(Width+adjust)+" border=0 cellpadding=0 cellspacing=0><tr><td><img src='/e/online/gif/"+leftdivider+"lite.gif'></td><td width="+Width+" class=menuButtonHover>"+theText+"</td><td><img src='/e/online/gif/dividerrightlite.gif'></td></tr><tr><td colspan=3 bgcolor=#000000 height=1><img src='/e/online/gif/spacer.gif' height=1></td></tr></table></DIV>";
			}
		else theInfo += "<DIV ID="+layerName+"  onMouseover='Show("+subLayer+"); hideLayer();' onMouseout='Hide();'  class=menuButton style='position:absolute; left:"+eval(Left+macAdjust)+"; top:"+theTop+";width:"+eval(3+Width)+";height:20;padding:2px'>"+theText+"</div>";
	}
	else {
		theInfo += "<LAYER name="+layerName+" onMouseover='setMenuHover(\""+theName+"\");' position=absolute visibility=true width="+eval(Width+adjust)+" height="+theHeight+" left="+Left+" top="+theTop+">";
		theInfo += "<table border=0 cellpadding=0 cellspacing=0 class='menuButton'><tr><td><img src='/e/online/gif/"+leftdivider+".gif'></td><td class='menuButton' width="+Width+">"+theText+"</td><td><img src='/e/online/gif/dividerright.gif'></td></tr><tr><td colspan=3 bgcolor=#000000 height=1><img src='/e/online/gif/black.gif' height=1></td></tr></table></LAYER>";
		theInfo += "<LAYER name="+layerName+"on onMouseOver='Show("+subLayer+");' onFocus=\""+linkText+";Hide()\"";
		theInfo += "onMouseOut='Hide();' position=absolute visibility=hidden width="+eval(Width+adjust)+" height="+theHeight+" left="+Left+" top="+theTop+">";
		theInfo += "<table border=0 cellpadding=0 cellspacing=0 class=menuButtonHover><tr><td><img src='/e/online/gif/"+leftdivider+"lite.gif'></td><td class=menuButtonHover width="+Width+">"+theText+"</td><td><img src='/e/online/gif/dividerrightlite.gif'></td></tr><tr><td colspan=3 bgcolor=#000000 height=1><img src='/e/online/gif/black.gif' height=1></td></tr></table></LAYER>";
		}
	document.write(theInfo);
	}

function setMenuHover(theName) {
	if(!(isWin)) return;
	if(timer) clearTimeout(timer);
	for(i=1;i<menuItems.length;i++) {
		layerName = "layer"+i+"on";
		if (i != theName) {
			if (document.getElementById) document.getElementById(layerName).style.visibility="hidden";
			else document.layers[layerName].visibility=false;
			}
		else {
			if (document.getElementById) document.getElementById(layerName).style.visibility="visible";
			else document.layers[layerName].visibility=true;
			}
		}
	}

function LayerSpecs(Left,Top,Width,ID) {
	this.left  = Left;
	if(ID>1) this.left-=1;
	this.top   = theTop+5+(Top*15);
	if((userRef)&&(!(isWin)) && (navigator.appName=='Microsoft Internet Explorer')) this.top   = theTop+5+(Top*15)+19;
	this.ID = ID;
	if(ID>=9) this.left -= 2;
	this.width = Width;
	this.info  = "";
	T=1;


	links = new Array();
	NSlinks = new Array();
	show = new Array();
	texts = new Array();
	c = 1;
	for(i=4; i<arguments.length; i+=3) {
		if(!(userRef)) {
			if(location.pathname==arguments[i]) thisPage = ID.substr(0,1);
		}
		j = i + 1;
		k = i + 2;
			if(arguments[i].substring(0,10)=='javascript') links[c] = arguments[i].substring(11,arguments[i].length);
			else links[c] = "window.top.location.href='"+root+arguments[i]+"'";

		NSlinks[c] = root+arguments[i];
		show[c] = arguments[j];
		texts[c] = arguments[k];
		if(texts[c].substr(texts[c].length-1,1)==' ') texts[c] += arrow;
		c++;
	}

	for(i=1;i<links.length;i++) {

		layerName = "layer_"+ID+"_"+i;

		if(document.getElementById) {
		   this.info += "<DIV ID="+layerName+" class=IEmenu style='width:"+eval(Width-1)+"; position:relative; top:0px; left:0px; background:"+bgcolor+";color:"+textColor+"' onMouseOver='"+show[i]+"; this.style.background=\""+hovercolor+"\";' onMouseOut='this.style.background=\""+bgcolor+"\";this.style.color=\""+textColor+"\"' onClick=\""+links[i]+";Hide()\">&nbsp;"+texts[i]+"</DIV>";
		   }
		else {
		   		this.info += "<LAYER z-Index=1 class=NSmenuOff BGCOLOR=\""+bgcolor+"\" onMouseOver='showLayer("+i+",\""+ID+"\","+c+")' WIDTH="+eval(Width - 2)+" POSITION=RELATIVE TOP="+T+" LEFT=1>&nbsp;"+texts[i]+"</LAYER>";
				this.info += "<LAYER z-Index=0 name="+layerName+" BGCOLOR=\""+hovercolor+"\" WIDTH="+eval(Width - 2)+" onMouseOut='this.zIndex=0;' onMouseOver=\""+show[i]+"\" POSITION=RELATIVE TOP="+T+" LEFT=1><a class=NSmenuOn href=\""+NSlinks[i]+"\" onClick=\"Hide()\" target=_top>&nbsp;"+texts[i]+"</a></LAYER>";
		   }
		T+=14;
	}
	if(document.layers) this.info +="<LAYER z-Index=1 BGCOLOR=\""+laycolor+"\"  WIDTH="+eval(Width - 3)+" POSITION=RELATIVE TOP="+eval(T+1)+" LEFT=1 HEIGHT=1></LAYER>";
	if(this.ID.length > 1)  {
		theSubMenu[theSubMenuCounter] = this.ID;
		dependsOn[theSubMenuCounter] = "layer_"+this.ID.substring(0,1)+"_"+this.ID.substring(1,2);
		theSubMenuCounter++;
	}
	layerCounter++;
}

function setHover(topNum) {
	document.images["dividerleft"+topNum].src="/e/online/gif/dividerleftlite.gif";
}


var activeParent = '';
var activeLayer = '';

function hideLayer() {
	if ((activeParent) && (document.layers)) {
		document.eval('L'+activeParent).document.eval('layer_'+activeParent+"_"+activeLayer).zIndex=0;
		}
	}


function showLayer(layerNum, Parent,numRows) {
	for(i=1;i<numRows;i++) {
		if(i==layerNum) document.layers['L'+Parent].document.layers['layer_'+Parent+'_'+i].zIndex=2;
		else document.layers['L'+Parent].document.layers['layer_'+Parent+'_'+i].zIndex=0;
	}
}

function createMenu() {
   for(i=1; i<Layer.length; i++) {
	   if(Layer[i]) {
		if(document.getElementById && No3) document.write("<DIV onMouseOver='clearTimeout(timer)' onMouseOut='Hide()' ID='L"+Layer[i].ID+"' STYLE='position:absolute; visibility:hidden; top:"+Layer[i].top+"; left:"+Layer[i].left+"; width:"+Layer[i].width+";border:1px solid "+laycolor+";border-right-width:1px;border-bottom-width:1px;background-color:"+laycolor+"'>"+Layer[i].info+"</DIV>");
		else if(document.layers && No3) document.write("<LAYER onMouseOver='clearTimeout(timer);' onMouseOut='Hide()' ID='L"+Layer[i].ID+"' POSITION=ABSOLUTE VISIBILITY=HIDDEN BGCOLOR='"+laycolor+"' BACKGROUND='"+background+"' TOP="+Layer[i].top+" LEFT="+Layer[i].left+" WIDTH="+Layer[i].width+" >"+Layer[i].info+"</LAYER>");
		}
	}
}




