
var nowDate = new Date();
var nowYear = nowDate.getYear();
var inclick = false;
var currentAddress = document.location + "";
function stopError() {  return true;               }
var copydate = new Date();
var copyyear = copydate.getYear();
var menuett = false;

//window.onerror = stopError;

var noth = "";
var char34 = String.fromCharCode(34);
var movmou;
var updstr = "";
var menuheadcolor  = "orange";
var menuheadover = "highlighttext";
var menuheadoverbg = "highlight";
var menubackground = "#F9F9F9";
var menubodyborder = "#FFFFFF";
var menubodylink = "black";
var menuhighlight = "highlighttext";
var menubodylinkbg = menuheadoverbg;
var topnavover = "highlighttext";
var topnavoverbg = "highlight";

//var brow = navigator.appVersion + "";
var brow = navigator.userAgent.toLowerCase() + "";
var is_ie = false; var is_ie5 = false; var is_ie6 = false;
if (brow.indexOf("msie ") != -1)
	{
		is_ie = true; 
		if (brow.indexOf("msie 5") != -1) is_ie5 = true;
		if (brow.indexOf("msie 6") != -1) is_ie6 = true
		if (brow.indexOf("opera ") != -1) {is_ie = false; is_ie5 = false; is_ie6 = false};
	}
w("<style>");
w(".navlink {font-family: tahoma; font-size: 8pt; font-weight: bold; padding-left: 8px; padding-right: 8px}");
w("td.navlink a {text-decoration: none; font-weight: bold}");
w("td.navlink a:hover {text-decoration: underline}");
w(".menuhead {color: " + menuheadcolor + "; cursor: default; padding-left: 8px; padding-right: 8px; font-family: tahoma; font-size: 8pt; font-weight: bold}");
w(".topmenucsik {height: 1px; background-color: " + menubodyborder + "; border-left: 3px solid " + menubackground + "; border-right: 3px solid " + menubackground + "; border-top: 2px solid " + menubackground + "; border-bottom: 2px solid " + menubackground + "}");
w(".menubody {background-color: " + menubackground + "}");
w(".menubody {padding-top: 2px; padding-bottom: 2px; font-size: 85%; white-space: nowrap; border: 1px solid " + menubodyborder + "}");
w(".menubodyb {}")
w(".menubodyb a{color: " + menubodylink + "; text-decoration: none}")
w(".menubodyb a:link{color: " + menubodylink + "; text-decoration: none}")
w(".menubodyb a:visited{color: " + menubodylink + "; text-decoration: none}")
w(".menubodylink {display: block; padding-left: 12px; padding-right: 12px; padding-top: 2px; padding-bottom: 3px; border-left: 1px solid " + menubackground + "; border-right: 1px solid " + menubackground + "}");
if (is_ie) {w(".menubodylink {width: 100%}");}
w(".NN {	z-index: 9; visibility: hidden; position: absolute; left: 0px; top: 0px; border: none}");
w("</style>");

function Nothing()   {return}

function w(text)      {
var textout = text.toString();
document.write(textout);
}

var normalColor, normalBgColor;
function mov(oobj)
{
	normalColor = oobj.style.color;  
	normalBgColor = oobj.style.backgroundColor;  
	oobj.style.color = topnavover;
 	oobj.style.backgroundColor = topnavoverbg;
}
function mou(oobj)
{
	oobj.style.color = normalColor;
	oobj.style.backgroundColor = normalBgColor;
}

function showmenu(mhead, mbody, trig)   {
	if (mbody)
	{
		if (trig)
			{
//			if (inclick) 
//			{
				mbody.style.left = mhead.offsetLeft;
				HideAllMenu();
				mbody.style.display = "";
				if (document.getElementById("Hfrm"))
				{
				document.getElementById("Hfrm").style.top = document.getElementById(mhead.id + "menu").offsetTop; 
				document.getElementById("Hfrm").style.left = mhead.offsetLeft;
				document.getElementById("Hfrm").style.width = document.getElementById(mhead.id + "menuin").offsetWidth; 
				document.getElementById("Hfrm").style.height = document.getElementById(mhead.id + "menuin").offsetHeight;
				document.getElementById("Hfrm").style.visibility = "visible";
				}
//			}
			mhead.style.backgroundColor = menuheadoverbg;
			mhead.style.color = menuheadover;
			menuett = true;
			}
		else 	{
			menuett = false;
			if (document.getElementById("Hfrm")) {document.getElementById("Hfrm").style.visibility = "hidden"};
			mbody.style.display = "none";
			mhead.style.backgroundColor = "";
			mhead.style.color = menuheadcolor;
			}
	}
}

function doClearM(obj)
{
	obj.style.backgroundColor = "";
	obj.style.color = menuheadcolor;
}

function HideAllMenu()
{
	for (i = 1; i < suboptions.length; i++)
	{
		showmenu(document.getElementById(suboptions[i][0]), document.getElementById(suboptions[i][0] + "menu"), false);
	}
}

function foo(evt) 
{
	var e = (window.event) ? window.event : evt;
	e.cancelBubble = true;
	if (e.stopPropagation) {e.stopPropagation()};
}

function topMenu1()
{
	if (is_ie5) 
	{ w("<span class=NN id=Hfrm src='javascript: false;' frameborder=0></span>")}
	else
	{
		if (is_ie) {w("<iframe class=NN id=Hfrm src='javascript: false;' frameborder=0></iframe>")}
	};
	w("<table cellpadding=0 cellspacing=0 height=21><tr>");
	for (i = 1; i < suboptions.length; i++)
	{
		var st = suboptions[i][0];
		w("<td style='cursor: default' nowrap onmouseover='foo(event); showmenu(document.getElementById(\"" + suboptions[i][0] + "\"), document.getElementById(\"" + suboptions[i][0] + "menu\"), true)' class=menuhead id='" + suboptions[i][0] + "'>" + st + "</td>");
	}
	w("</tr>");
	w("</table>");
}

function topMenu2()   
{
	for (i = 1; i < suboptions.length; i++)
	{
		w("<table id='" + suboptions[i][0] + "menu' cellspacing=0 cellpadding=0 border=0 style='position: absolute; top: 21px; left: 10px; display: none; z-index: 10'><tr><td nowrap>");
		w("<table cellpadding=0 cellspacing=0 id='" + suboptions[i][0] + "menuin' style='border-bottom: 1px solid #B0B0B0; border-right: 1px solid #B0B0B0' onmouseover='foo(event)'><tr><td nowrap class=menubody>");
		w("<table cellspacing=0 cellpadding=0 class='menubodyb'>");
		for (j = 1; j < suboptions[i].length; j++)
		{
			if (suboptions[i][j] != "-")
			{
				var lnkstr = suboptions[i][j].substring(suboptions[i][j].indexOf("|") + 1, suboptions[i][j].length);
				var lnktxt = suboptions[i][j].substring(0, suboptions[i][j].indexOf("|"));
				spacecnt = 0;
				while (lnktxt.indexOf(" ") > -1) {spacecnt += 1; if (spacecnt/4 != parseInt(spacecnt/4)) {lnktxt = lnktxt.replace(" ", "&nbsp;")} else {lnktxt = lnktxt.replace(" ", "<br>")};}
				w("<tr><td nowrap><a href=" + char34 + lnkstr + char34 + " onmouseover='mov(this)' onmouseout='mou(this)' class='menubodylink'>" + lnktxt + "</a></td></tr>");
			}
			else
			{w("<tr><td class=topmenucsik><img src='/images/spacer.gif' border=0 height=1></td></tr>");}
		}
		w("</table>");
		w("</td></tr></table>");
		w("</td></tr></table>");
	}
}