//<script>
// The commented out script lines enable syntax highlighting in Interdev

//////////////////////////////////////////////////////
	hovercolor   = "#EDE9DD";	// color name/code
	bgcolor      = "#ffffff";	// color name/code
	laycolor     = "#C5B68D";   //color code for border lining
	bordercolor  = "#C5B68D";
	textColor = "#ffffff";
	background   = "";			// picture url
	menu_border  = 1;			// IE only
	imagePath = "";
	arrow    = "<img src='"+imagePath+"arrow.gif' border=0>"; // url of arrow picture for submenus
//////////////////////////////////////////////////////

No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
var timer;
var top_timer;


function Show() {
//	if(timer) clearTimeout(timer);
	//if(top_timer) clearTimeout(top_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 = 79;
var theHeight = '22px';

function createBaseItem(theName,theText,Width,Left,theLink,subLayer) {

	layerName = "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(thisPage==theName) theText = "<b>"+theText+"</b>";
	if (document.getElementById) {
		theInfo += "<DIV ID="+layerName+"  onMouseover='setMenuHover(\""+theName+"\");top_Show();top_setMenuHover(0);' class=menuButton style='position:absolute; left:"+Left+"; top:"+theTop+"'>";
		theInfo += "<table width="+eval(Width+adjust)+" border=0 cellpadding=0 cellspacing=0><tr height=22><td>";
		if(theName!=1) theInfo += "<img src='"+imagePath+"dividerright.gif'>";
		theInfo += "</td><td width="+Width+" class=menuButton>"+theText+"</td></tr></table></DIV>";
		theInfo += "<DIV ID="+layerName+"on onMouseover='Show("+subLayer+"); hideLayer();' onMouseout='Hide();top_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 height=22><td>";
		if(theName!=1) theInfo += "<img src='"+imagePath+"spacer.gif'>";
		theInfo += "</td><td width="+Width+" class=menuButtonHover>"+theText+"</td></tr></table></DIV>";
		}
	else {
		theInfo += "<LAYER name="+layerName+" onMouseover='setMenuHover(\""+theName+"\");top_Show();top_setMenuHover(0);' 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 height=22><td>";
		if(theName!=1) theInfo += "<img src='"+imagePath+"dividerright.gif'>";
		theInfo += "</td><td class='menuButton' width="+Width+">"+theText+"</td></tr></table></LAYER>";
		theInfo += "<LAYER name="+layerName+"on onMouseOver='Show("+subLayer+");' onFocus=\""+linkText+";Hide()\"";
		theInfo += "onMouseOut='Hide();top_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 height=22><td>";
		if(theName!=1) theInfo += "<img src='"+imagePath+"spacer.gif'>";
		theInfo += "</td><td class=menuButtonHover width="+Width+">"+theText+"</td></tr></table></LAYER>";
		}
	document.write(theInfo);
	}

function setMenuHover(theName) {
//	if(timer) clearTimeout(timer);
//	if(top_timer) clearTimeout(top_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-=0;
	this.top   = theTop+1+(Top*21);
	this.ID = ID;
	if(ID>=9) this.left -= 0;
	this.width = Width;
	this.info  = "";
	T=1;

	links = new Array();
	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];
		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)+"; 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()\"><table border=0 cellpadding=0 cellspacing=0 width=100%><tr height=20><td>&nbsp;"+texts[i]+"</td></tr><tr><td heigh=1 bgcolor=#C5B68D><img src='"+imagePath+"spacer.gif'></td></tr></table></DIV>";
		   }
		else {
		   		this.info += "<LAYER z-Index=1 class=NSmenuOff BGCOLOR=\""+bgcolor+"\" onMouseOver='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 heigh=20><td>&nbsp;"+texts[i]+"</td></tr><tr><td height=1 bgcolor=#C5B68D><img src='"+imagePath+"spacer.gif'></td></tr></table></LAYER>";
				this.info += "<LAYER z-Index=0  name="+layerName+" BGCOLOR=\""+hovercolor+"\" WIDTH="+eval(Width - 3)+" onMouseOut='this.zIndex=0;' onMouseOver=\""+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]+";Hide()\" target=_top>&nbsp;"+texts[i]+"</a></td></tr><tr><td heigh=1 bgcolor=#C5B68D><img src='"+imagePath+"spacer.gif'></td></tr></table></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=imagePath+"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);clearTimeout(top_timer);' onMouseOut='Hide();top_Hide();' ID='L"+Layer[i].ID+"' STYLE='position:absolute; visibility:hidden; top:"+Layer[i].top+"; left:"+Layer[i].left+"; "+Layer[i].width+";border:1px solid "+laycolor+";border-left-width:1px;border-top-width:1px;background-color:"+laycolor+"'><table border=0 cellpadding=0 cellspacing=0 width="+Layer[i].width+"><tr heigh=20><td>"+Layer[i].info+"</td></tr></table></DIV>");
		else if(document.layers && No3) document.write("<LAYER onMouseOver='clearTimeout(timer);clearTimeout(top_timer);' onMouseOut='Hide();top_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+" ><table border=0 cellpadding=0 cellspacing=0 width="+Layer[i].width+"><tr heigh=20><td>"+Layer[i].info+"</td></tr></table></LAYER>");
		}
	}
}


//</script>


