//<script>
// The commented out script lines enable syntax highlighting in Interdev

//////////////////////////////////////////////////////
	top_hovercolor   = "#5299CD";	// color name/code
	top_bgcolor      = "#ffffff";	// color name/code
	top_laycolor     = "#5299CD";   //color code for border lining
	top_laycolorHoriz = "#5299CD"; // color code for horizontal spaces/lines in flyouts
	top_bordercolor  = "#ffffff";
	top_textColor = "#ffffff";
	top_background   = "";			// picture url
	top_menu_border  = 2;			// IE only
	top_imagePath = "/main_includes/images/";
	top_arrow    = "<img src='"+top_imagePath+"arrow.gif' border=0>"; // url of arrow picture for submenus
//////////////////////////////////////////////////////

top_No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
//var top_timer;

function top_Show() {
//alert(5);

	if(top_timer) clearTimeout(top_timer);
	if(timer) clearTimeout(timer);
	
	for(menu=1; menu<top_Layer.length; menu++) {
		if(top_Layer[menu]) {
//	alert(menu+"  "+'X'+top_Layer[menu].ID);
			if (document.getElementById) document.getElementById('X'+top_Layer[menu].ID).style.visibility = "hidden";
			else document.layers['X'+top_Layer[menu].ID].visibility = false;
			}
		}
	for(i=0;i<top_theSubMenu.length;i++) {
//	alert(top_dependsOn[i]);
		if(document.getElementById) {
			document.getElementById(top_dependsOn[i]).style.background=top_bgcolor;
		}

	}
//alert("5c");
	for(i=0; i<arguments.length; i++) {
		menu=arguments[i];
		if (document.getElementById) document.getElementById('X'+menu).style.visibility = "visible";
		else document.layers['X'+menu].visibility = true;
		for(j=0;j<top_theSubMenu.length;j++) {
			if(document.getElementById) {
				if(menu==top_theSubMenu[j]) {
					document.getElementById(top_dependsOn[j]).style.background=top_hovercolor;
					document.getElementById(top_dependsOn[j]).style.color=top_textColor;
				}
			}
		}
	}
//alert("5B");
}



function top_Hide() { top_timer = setTimeout("top_Show(); top_hideLayer(); top_setMenuHover(thisPageTop)", 500); }

//sets the distance from top of page for top-level menu

var top_theTop = 10;
var top_theHeight = '15px';

function top_createBaseItem(theName,theText,Width,Left,theLink,subLayer) {
//alert("6");
	layerName = "top_Layer" + theName;
	var theInfo = '';
	if(theName==1) {
		leftdivider = "leftside";
		adjust = 6;
	}
	else {
		leftdivider = "dividerleft";
		adjust = 5;
	}
	if(theLink.substr(0,4)!='java') linkText = "top.location.href='"+theLink+"'";
	else linkText = theLink;
	if(thisPageTop==theName) theText = "<b>"+theText+"</b>";
	if (document.getElementById) {
		theInfo += "<DIV ID="+layerName+"  onMouseover='top_setMenuHover(\""+theName+"\");Show();setMenuHover(0);' class=top_menuButton style='z-index: 100;position:absolute; left:"+Left+"; top:"+top_theTop+"'>";
		theInfo += "<table width="+eval(Width+adjust)+" border=0 cellpadding=0 cellspacing=0><tr height=20><td>";
		if(theName!=1) theInfo += "<img src='"+top_imagePath+"dividerright.gif'>";
		theInfo += "</td><td width="+Width+" class=top_menuButton>"+theText+"</td></tr></table></DIV>";
		theInfo += "<DIV ID="+layerName+"on onMouseover='top_Show("+subLayer+"); top_hideLayer();' onMouseout='top_Hide();Hide()' onClick=\""+linkText+";top_Hide()\" class=top_menuButtonHover style='z-index: 100;position:absolute; visibility:hidden; left:"+Left+"; top:"+top_theTop+"'>";
		theInfo += "<table width="+eval(Width+adjust)+" border=0 cellpadding=0 cellspacing=0><tr height=20><td>";
		if(theName!=1) theInfo += "<img src='"+top_imagePath+"spacer.gif'>";
		theInfo += "</td><td width="+Width+" class=top_menuButtonHover>"+theText+"</td></tr></table></DIV>";
		}
	else {
		theInfo += "<LAYER name="+layerName+" onMouseover='top_setMenuHover(\""+theName+"\");Show();setMenuHover(0);' position=absolute visibility=true width="+eval(Width+adjust)+" height="+top_theHeight+" left="+Left+" top="+top_theTop+">";
		theInfo += "<table border=0 cellpadding=0 cellspacing=0 class='top_menuButton'><tr height=20><td>";
		if(theName!=1) theInfo += "<img src='"+top_imagePath+"dividerright.gif'>";
		theInfo += "</td><td class='top_menuButton' width="+Width+">"+theText+"</td></tr></table></LAYER>";
		theInfo += "<LAYER name="+layerName+"on onMouseOver='top_Show("+subLayer+");' onFocus=\""+linkText+";top_Hide()\"";
		theInfo += "onMouseOut='top_Hide();Hide();' position=absolute visibility=hidden width="+eval(Width+adjust)+" height="+top_theHeight+" left="+Left+" top="+top_theTop+">";
		theInfo += "<table border=0 cellpadding=0 cellspacing=0 class=top_menuButtonHover><tr height=20><td>";
		if(theName!=1) theInfo += "<img src='"+top_imagePath+"spacer.gif'>";
		theInfo += "</td><td class=top_menuButtonHover width="+Width+">"+theText+"</td></tr></table></LAYER>";
		}
	document.write(theInfo);
//alert("6b");
	}

function top_setMenuHover(theName) {
//alert("1 "+theName);
	if(top_timer) clearTimeout(top_timer);
	if(timer) clearTimeout(timer);

	for(i=1;i<top_menuItems.length;i++) {
		layerName = "top_Layer"+i+"on";
		if (i != theName) {
//alert(2);
			if (document.getElementById) document.getElementById(layerName).style.visibility="hidden";
			else document.layers[layerName].visibility=false;
			}
		else {
//alert(3);
			if (document.getElementById) document.getElementById(layerName).style.visibility="visible";
			else document.layers[layerName].visibility=true;
			}
		}
//alert("1B");
	}

function top_LayerSpecs(Left,Top,Width,ID) {
	this.left  = Left;
	if(ID>1) this.left-=0;
	this.top   = top_theTop+1+(Top*21);
	this.ID = ID;
	if(ID>=9) this.left -= 0;
	this.width = Width;
	this.info  = "";
	T=1;

	links = new Array();
	top_show = new Array();
	texts = new Array();
	c = 1;
	for(i=4; i<arguments.length; i+=3) {
		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] = "top.location.href='"+arguments[i]+"'";

//		else links[c] = arguments[i];
		top_show[c] = arguments[j];
		texts[c] = arguments[k];
		if(texts[c].substr(texts[c].length-1,1)==' ') texts[c] += top_arrow;
		c++;
	}

	for(i=1;i<links.length;i++) {

		layerName = "top_Layer_"+ID+"_"+i;

		if(document.getElementById) {
		   this.info += "<DIV ID="+layerName+" class=IEmenu style='z-index: 100;width:"+eval(Width)+"; position:relative; top:0px; left:0px; background:"+top_bgcolor+";color:"+top_textColor+"' onMouseOver='"+top_show[i]+"; this.style.background=\""+top_hovercolor+"\";' onMouseOut='this.style.background=\""+top_bgcolor+"\";this.style.color=\""+top_textColor+"\"' onClick=\""+links[i]+";top_Hide()\"><table border=0 cellpadding=0 cellspacing=0 width=100%><tr height=20><td>&nbsp;"+texts[i]+"</td></tr><tr><td heigh=1 bgcolor=\""+top_laycolorHoriz+"\"><img src='"+top_imagePath+"spacer.gif'></td></tr></table></DIV>";
		   }
		else {
		   		this.info += "<LAYER z-Index=11 class=NSmenuOff BGCOLOR=\""+top_bgcolor+"\" onMouseOver='top_showLayer("+i+",\""+ID+"\","+c+")' WIDTH="+eval(Width - 3)+" POSITION=RELATIVE TOP="+T+" LEFT=1><table border=0 cellpadding=0 cellspacing=0 width="+eval(Width - 3)+"><tr height=20><td>&nbsp;"+texts[i]+"</td></tr><tr><td height=1 bgcolor=\""+top_laycolorHoriz+"\"><img src='"+top_imagePath+"spacer.gif'></td></tr></table></LAYER>";
				this.info += "<LAYER z-Index=10  name="+layerName+" BGCOLOR=\""+top_hovercolor+"\" WIDTH="+eval(Width - 3)+" onMouseOut='this.zIndex=10;' onMouseOver=\""+top_show[i]+"\" POSITION=RELATIVE TOP="+T+" LEFT=1><table border=0 cellpadding=0 cellspacing=0 width="+eval(Width - 3)+"><tr height=20><td><a class=NSmenuOn href=\"#\" onClick=\""+links[i]+";top_Hide()\" target=_top>&nbsp;"+texts[i]+"</a></td></tr><tr><td heigh=1 bgcolor=\""+top_laycolorHoriz+"\"><img src='"+top_imagePath+"spacer.gif'></td></tr></table></LAYER>";
		   }
		T+=14;
	}
	if(document.layers) this.info +="<LAYER z-Index=11 BGCOLOR=\""+top_laycolor+"\"  WIDTH="+eval(Width - 3)+" POSITION=RELATIVE TOP="+eval(T+1)+" LEFT=1 HEIGHT=1></LAYER>";
	if(this.ID.length > 1)  {
		top_theSubMenu[top_theSubMenuCounter] = this.ID;
		top_dependsOn[top_theSubMenuCounter] = "top_Layer_"+this.ID.substring(0,1)+"_"+this.ID.substring(1,2);
//alert(top_dependsOn[top_theSubMenuCounter] );
		top_theSubMenuCounter++;
	}
	top_layerCounter++;
}

function top_setHover(topNum) {
//alert("7");
	document.images["dividerleft"+topNum].src=top_imagePath+"dividerleftlite.gif";
//alert("7B");
}


var top_activeParent = '';
var top_activeLayer = '';

function top_hideLayer() {
//alert("8");
	if ((top_activeParent) && (document.layers)) {
		document.eval('X'+top_activeParent).document.eval('top_Layer_'+top_activeParent+"_"+top_activeLayer).zIndex=10;
		}
//alert("8b");
	}


function top_showLayer(layerNum, Parent,numRows) {
//alert("9");
	for(i=1;i<numRows;i++) {
		if(i==layerNum) document.layers['X'+Parent].document.layers['top_Layer_'+Parent+'_'+i].zIndex=12;
		else document.layers['X'+Parent].document.layers['top_Layer_'+Parent+'_'+i].zIndex=10;
	}
//alert("9b");
}

function top_createMenu() {
//alert("10");
   for(i=1; i<top_Layer.length; i++) {
	   if(top_Layer[i]) {
		if(document.getElementById && top_No3) document.write("<DIV onMouseOver='clearTimeout(top_timer);clearTimeout(timer);' onMouseOut='top_Hide();Hide();' ID='X"+top_Layer[i].ID+"' STYLE='z-index:100; position:absolute; visibility:hidden; top:"+top_Layer[i].top+"; left:"+top_Layer[i].left+"; "+top_Layer[i].width+";border:1px solid "+top_laycolor+";border-left-width:1px;border-top-width:1px;background-color:"+top_laycolor+"'><table border=0 cellpadding=0 cellspacing=0 width="+top_Layer[i].width+"><tr height=20><td>"+top_Layer[i].info+"</td></tr></table></DIV>");
		else if(document.layers && top_No3) document.write("<LAYER onMouseOver='clearTimeout(top_timer);;clearTimeout(timer);' onMouseOut='top_Hide();Hide();' ID='X"+top_Layer[i].ID+"' POSITION=ABSOLUTE VISIBILITY=HIDDEN BGCOLOR='"+top_laycolor+"' BACKGROUND='"+top_background+"' TOP="+top_Layer[i].top+" LEFT="+top_Layer[i].left+" WIDTH="+top_Layer[i].width+" ><table border=0 cellpadding=0 cellspacing=0 width="+top_Layer[i].width+"><tr height=20><td>"+top_Layer[i].info+"</td></tr></table></LAYER>");
		}
	}
//alert("10b");
}


//</script>



