var char34 = String.fromCharCode(34);
var charLF = String.fromCharCode(10);
var charCR = String.fromCharCode(13);
var strMenuHTML;
colorMouseOver = "#FF0000";

varMenuItems = true;
var userAgent = navigator.userAgent;
var MSIEIndex = userAgent.indexOf("MSIE");
if (userAgent.indexOf("Win")  == -1 ||
	userAgent.indexOf("MSIE") == -1 ||
	userAgent.substring((MSIEIndex + 5),(MSIEIndex + 6)) < 5)
	varMenuItems = false;

function ItemOver(strId)
{
	eval(strId+".style.color='"+colorMouseOver+"';");
}
function ItemOut(strId)
{
	eval(strId+".style.color="+char34+char34+";");
}
function BeginMenus()
{
	strMenuHTML = "<table border='0' cellpadding='0' cellspacing='0' width='125px'>";
	strMenuHTML += "<tr><td>&nbsp;</td></tr>";
}
function BeginMenuItem(strId, strCaption, strHREF)
{
	strMenuHTML += "<tr align='top'><td width='11' valign='top'>";
	strMenuHTML += "<img src='images/tree_null.gif'>&nbsp;";
	strMenuHTML += "<td><div id='"+strId+"' class='MenuItem' ";
	strMenuHTML += "onmouseover="+char34+"this.style.textDecoration='underline';"+char34+" ";
	strMenuHTML += "onmouseout="+char34+"this.style.textDecoration='none';"+char34+" ";
	strMenuHTML += "onclick="+char34+"top.frames.mainFrame.location.href='"+strHREF+"';"+char34+">";
	strMenuHTML += strCaption+"</div></td></tr>";
	strMenuHTML += "<tr><td><td bgcolor='slategray'><div></div></td></tr>";
}
function BeginMenuItemParent(strId, strCaption, strHREF)
{
	strMenuHTML += "<tr align='top'><td width='11' valign='top'>";
	strMenuHTML += "<img id='img"+strId+"' src='images/tree_plus.gif' ";
	strMenuHTML += "onclick="+char34+"toggle('div"+strId+"', 'img"+strId+"');"+char34+">&nbsp;";
	strMenuHTML += "<td><div id='"+strId+"' class='MenuItem' ";
	strMenuHTML += "onmouseover="+char34+"this.style.textDecoration='underline';"+char34+" ";
	strMenuHTML += "onmouseout="+char34+"this.style.textDecoration='none';"+char34+" ";
	strMenuHTML += "onclick="+char34+"top.frames.mainFrame.location.href='"+strHREF+"'"+char34+">";
	strMenuHTML += strCaption+"</div>";
	strMenuHTML += "<div id='div"+strId+"' style="+char34+"display:'none';"+char34+">";
}
function BeginMenuItemParentNoLink(strId, strCaption)
{
	strMenuHTML += "<tr align='top'><td width='11' valign='top'>";
	strMenuHTML += "<img id='img"+strId+"' src='images/tree_plus.gif' ";
	strMenuHTML += "onclick="+char34+"toggle('div"+strId+"', 'img"+strId+"');"+char34+">&nbsp;";
	strMenuHTML += "<td><div id='"+strId+"' class='MenuItemNoLink'>";
	strMenuHTML += strCaption+"</div>";
	strMenuHTML += "<div id='div"+strId+"' style="+char34+"display:'none';"+char34+">";
}
function MenuSubItem(strId, strCaption, strHREF)
{
	strMenuHTML += "<a id='"+strId+"' ";
	strMenuHTML += "onmouseover="+char34+"this.style.textDecoration='underline';"+char34+" ";
	strMenuHTML += "onmouseout="+char34+"this.style.textDecoration='none';"+char34+" ";
	strMenuHTML += "onclick="+char34+"top.frames.mainFrame.location.href='"+strHREF+"';"+char34+" ";
	strMenuHTML += "href='"+strHREF+"' target='mainFrame'>";
	strMenuHTML += strCaption+"</a><br>";
}
function MenuSubItemNewWindow(strId, strCaption, strHREF)
{
	strMenuHTML += "<a id='"+strId+"' ";
	strMenuHTML += "onmouseover="+char34+"this.style.textDecoration='underline';"+char34+" ";
	strMenuHTML += "onmouseout="+char34+"this.style.textDecoration='none';"+char34+" ";
	strMenuHTML += "href='"+strHREF+"' target='_blank'>";
	strMenuHTML += strCaption+"</a><br>";
}
function EndMenuItemParent()
{
	strMenuHTML += "</div></td></tr>";
	strMenuHTML += "<tr><td><td bgcolor='slategray'><div></div></td></tr>";
}
function EndMenuItemParentLast()
{
	strMenuHTML += "</div></td></tr>";
}
function EndMenus()
{
	strMenuHTML += "</table>";
	document.write(strMenuHTML);
}

ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
ns6 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5));
ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) < 5));

// Pre-Load The Images.
var imgArray = new Array(4);
imgArray[0] = new Image();
imgArray[1] = new Image();
imgArray[0].src = "images/tree_minus.gif";
imgArray[1].src = "images/tree_plus.gif";


function toggle( myId , myImageId )
{
	if( myImageId != "none")
	{
		if (ie4)
		{
			thisId=document.all(myId);
			if (thisId.style.display == "none")
			{
				thisId.style.display = "block";
				thisId.document.images(myImageId).src = imgArray[0].src;
			} 
			else 
			{
				thisId.style.display = "none";
				thisId.document.images(myImageId).src = imgArray[1].src;
			}
		}
		if (ns6)
		{
			thisId = document.getElementById(myId);
			thisImageId = document.getElementById(myImageId);
			if (thisId.style.display == "none")
			{
				thisId.style.display = "block";
				thisImageId.src = imgArray[0].src;
			}
			else
			{
				thisId.style.display = "none";
				thisImageId.src = imgArray[1].src;
			}
			moveMarker(thisId);
			document.body.style.visibility = "hidden";
			document.body.style.visibility = "visible";
		}
	}
}

