var isDOM = (document.getElementById?1:0);
var isIE = (document.all?1:0);
var isNS4 = (navigator.appName=='Netscape' && !isDOM)?1:0;
var isIE4 = (isIE && !isDOM)?1:0;
var isDyn = (isDOM||isIE||isNS4);
var isNS6 = (document.getElementById&&!document.all);

var EHead = "";
var EHeadText = "";
var EBox = "";
var EShow = 0;
var ETime = "";
var ETextC = "";

var NHead = "";
var NHeadText = "";

function makeMenu() {
	var mak = makeMenu.arguments;
	var str = "";
	str += ("<div id=\"" + mak[0] + "\" style=\"position: absolute; visibility: hidden; width: " + mak[1] + "\">");
	str += ("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"" + mak[1] + "\" align=\"center\" class=\"outMenu\" onmouseover=\"EShow=1\" onmouseout=\"EShow=0\" style=\"background-color:" + mak[2] + ";\">");
	for ( i = 6; i < mak.length; i+=4 ) {
		if ( i > 6 ) str += ("<tr height=\"2\"><td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"1\" bgcolor=\"#000000\"><td></td></table></td></tr>");
		str += ("<tr height=\"14\"><td id=\"" + mak[i] + "\" class=\"" + ( (i==6)?"topMenu":"itemMenu") + "\" style=\"border-color: " + mak[2] + "\"");
		if ( mak[i+3] != "") {
			if ( mak[i+3].toLowerCase().indexOf(".pdf") > 0 ) str += (" onclick=\"bnew=window.open(); bnew.location.href='" + mak[i+3] + "'\"");
			else str += (" onclick=\"window.location.href='" + mak[i+3] + "'\"");
		}
		str += (" onmouseover=\"xmenu_over('" + mak[i] + "','" + mak[3] + "','" + mak[2] + "','" + mak[i+1] + "','" + mak[5] + "','" + mak[4] + "');");
		if ( mak[i+2] != "") str += (" window.status='" + mak[i+2] + "';");
		str += ("\" onmouseout=\"xmenu_out('" + mak[2] + "','" + mak[4] + "');");
		if ( mak[i+2] != "") str += (" window.status='';");
		str += ("\">");
		str += ("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" align=\"center\">");
		str += ("<tr><td class=\"e10\"><span id=\"" + mak[i+1] + "\" style=\"color: " + mak[4] + "\">" + mak[i+2] + "</span></td></tr>");
		str += ("</table>");
		str += ("</td></tr>");
	}
	str += ("</table>");
	str += ('</div>');
	document.write ( str );
}

function xmenu_over( ob , OBG, UBG, txt, OTX, UTX ) {
	if ( isIE ) {
		if ( NHead != "" ) document.all( NHead ).style.background = UBG;
		if ( NHeadText != "" ) document.all( NHeadText ).style.color = UTX;

		NHead = ob;
		NHeadText = txt;

		document.all( NHead ).style.cursor = "hand";
		document.all( NHead ).style.background = OBG;
		document.all( NHeadText ).style.color = OTX;

	} else if ( isNS4 || isNS6 ) {
		if ( NHead != "" ) document.getElementById( NHead ).style.background = UBG;
		if ( NHeadText != "" ) document.getElementById( NHeadText ).style.color = UTX;

		NHead = ob;
		NHeadText = txt;

		document.getElementById( NHead ).style.cursor = "pointer";
		document.getElementById( NHead ).style.background = OBG;
		document.getElementById( NHeadText ).style.color = OTX;
	}
}

function xmenu_out ( UBG, UTX ) {
	if ( isIE ) {
		if ( NHead != "" ) {
			document.all( NHead ).style.background = UBG;
			document.all( NHead ).style.cursor = "default";
		}
		if ( NHeadText != "" ) document.all( NHeadText ).style.color = UTX;

		NHead = "";
		NHeadText = "";
	}
	else if ( isNS4 || isNS6 ) {
		if ( NHead != "" ) {
			document.getElementById( NHead ).style.background = UBG;
			document.getElementById( NHead ).style.cursor = "default";
		}
		if ( NHeadText != "" ) document.getElementById( NHeadText ).style.color = UTX;

		NHead = "";
		NHeadText = "";
	}
}

function showSUB( ob, txt, txc, txo, sub, xleft, xtop ) {
	hideSUB();
	if ( isIE ) {
		if ( EHeadText != "" ) {
			document.all( EHeadText ).style.color = txc;
//			document.all( EHeadText ).style.textDecorationUnderline = false;
			document.all( EHeadText ).style.cursor = "default";
		}

		EHeadText = txt;
		ETextC = txc;

		document.all( EHeadText ).style.color = txo;
//		document.all( EHeadText ).style.textDecorationUnderline = true;
		document.all( EHeadText ).style.cursor = "hand";

		EShow = 1;

		EBox = sub;
		document.all( EBox ).style.visibility = "visible";
		document.all( EBox ).style.left = xleft;
		document.all( EBox ).style.top = xtop;
		document.all( EBox ).style.zIndex = 1;
		var ETime = setInterval("subDelay()" , 1500 );
	}
	else if ( isNS4 || isNS6 ) {
		if ( EHeadText != "" ) {
			document.getElementById( EHeadText ).style.color = "#7E0101";
			document.getElementById( EHeadText ).style.cursor = "default";
//			document.getElementById( EHeadText ).style.textDecorationUnderline = true;
		}

		EHeadText = txt;

		document.getElementById( EHeadText ).style.color = "#E25353";
//		document.getElementById( EHeadText ).style.textDecorationUnderline = true;
		document.getElementById( EHeadText ).style.cursor = "pointer";

		EShow = 1;

		EBox = sub;
		document.getElementById( EBox ).style.visibility = "visible";
		document.getElementById( EBox ).style.left = xleft;
		document.getElementById( EBox ).style.top = xtop;
		document.getElementById( EBox ).style.zIndex = 1;
		var ETime = setInterval("subDelay()" , 1500 );
	}
}

function subDelay() {
	if ( EShow == 0 ) hideSUB();
}

function hideSUB() {
	if ( ETime ) clearInterval( ETime );
	if ( isIE ) {
		if ( EHeadText != "" ) {
			document.all( EHeadText ).style.color = ETextC;
//			document.all( EHeadText ).style.textDecorationUnderline = false;
			document.all( EHeadText ).style.cursor = "default";
		}
		if ( EBox != "" ) document.all( EBox ).style.visibility = "hidden";
	}
	else if ( isNS4 || isNS6 ) {
		if ( EHeadText != "" ) {
			document.getElementById( EHeadText ).style.color = ETextC;
			document.getElementById( EHeadText ).style.cursor = "default";
//			document.getElementById( EHeadText ).style.textDecorationUnderline = true;
		}
		if ( EBox != "" ) document.getElementById( EBox ).style.visibility = "hidden";
	}
	EHeadText = ""
	EBox = "";
	ETextC = "";
	EShow = 0;

}
