var RTL = false;
var scFlag = false;
var scrollcount = 0;
if (document.dir == 'rtl')
	RTL = true;
var Strict_Compat = false;
var ToolBar_Supported = false;
var Frame_Supported   = false;
var DoInstrumentation = false;
var doImage = doImage;
var TType = TType;
if (navigator.userAgent.indexOf("MSIE")    != -1 &&
	navigator.userAgent.indexOf("Windows") != -1 &
	navigator.appVersion.substring(0,1) > 3)
{
	ToolBar_Supported = true;
	if(!RTL){
		if (document.compatMode == "CSS1Compat")
		{
			Strict_Compat = true;
		}
	}
}
var newLineChar = String.fromCharCode(10);
var char34 = String.fromCharCode(34);
var LastLKMenu = "";
var LastICPMenu = "";
var CurICPMenu = "";
var IsLKMenu = false;
var IsMenuDropDown = true;
var HTMLStr;
var FooterStr;
var TBLStr;
var x = 0;
var y = 0;
var x2 = 0;
var y2 = 0;
var x3 = 0;
var LKMenuWidth;
var ToolbarMinWidth;
var ToolbarMenu;
var ToolbarBGColor;
var ToolbarLoaded = false;
var aDefLKColor  = new Array(3);
var aDefICPColor = new Array(3);
var aCurLKColor  = new Array(3);
var aCurICPColor = new Array(3);
var LKFont;
var ICPFont;
var LKFTFont;
var ICPFTFont;
var MaxMenu = 30;
var TotalMenu = 0;
var arrMenuInfo = new Array(30);
var bFstICPTBMenu = true;
var bFstICPFTMenu = true;
//
IE=(document.all)?1:0;
IE5=(IE&&document.getElementById)?1:0;
NN4=(document.layers)?1:0;
NN6=(document.getElementById&&!IE)?1:0;
MenuBlank=5;
MenuTop=5;
yz=NN4?"":NN6?"window.pageYOffset":IE5?"document.body.scrollTop":0;
var yp=0;
//
HTMLStr = "<DIV ID='updMenu'>";
if (ToolBar_Supported)
{
	// Windows IE
	// Output style sheet and toolbar ID
	document.write("<SPAN ID='StartMenu' STYLE='display:none;'></SPAN>");
	// Build toolbar template
	HTMLStr += "<DIV ID='idToolbar'     STYLE='background-color:white;width:100%;'>";
	HTMLStr += "<DIV ID='idRow1'        STYLE='position:absolute;height:5px;'>";
	if (!RTL){
		HTMLStr += "<DIV ID='idLKMenuPane'  STYLE='position:absolute;top:0px;left:0px;height:20px;width:10px;background-color:black;float:right;' NOWRAP><!--LK_MENU_TITLES--></DIV>";
		HTMLStr += "</DIV>";
	}else if(RTL){
		// RTL Correction: added: dir='ltr' (forcing LTR!), added: &nbsp; (prevents last menu problem)
		HTMLStr += "<DIV dir='ltr' lang='he' ID='idLKMenuPane'  STYLE='position:absolute;top:0;left:0;height:20;width:10;color:white;background-color:black;float:left;' NOWRAP><!--LK_MENU_TITLES-->&nbsp;</DIV>";

		HTMLStr += "</DIV>";
	}
	HTMLStr += "</DIV>";
	HTMLStr += 	"<SCRIPT TYPE='text/javascript'>" + 
					"   var ToolbarMenu = StartMenu;" + 
					"</SCRIPT>" + 
					"<DIV WIDTH=100%>";		
	// Define event handlers
	if(!RTL){
		window.onresize  = resizeToolbar;
		window.onscroll  = scrollbaroptions;
	}
	// Intialize global variables
	ToolbarBGColor	= "white";	// toolbar background color
	if (Strict_Compat)
	{
		LKFont  = "bold x-small Arial";
		ICPFont = "bold x-small Verdana";
	}
	else
	{
		if( !RTL ){
			LKFont  = "xx-small Verdana";
			ICPFont = "bold xx-small Verdana";
		}else if(RTL){
			LKFont  = "x-small Arial";	 // RTL Correction: (was Verdana)
			ICPFont = "bold x-small Arial"; // RTL Correction: (was Verdana)
			//MNP1 RTL revision
			LKFTFont = "11px Arial";
			ICPFTFont = "bold 11px Arial"
			//end
		}	
	}
	aDefLKColor[0]	= aCurLKColor[0]  = "#003399";	// bgcolor;
	aDefLKColor[1]	= aCurLKColor[1]  = "white";	// text font color
	aDefLKColor[2]  = aCurLKColor[2]  = "#ffcc33";	// mouseover font color
	aDefICPColor[0]	= aCurICPColor[0] = "#003399";	// bgcolor;
	aDefICPColor[1] = aCurICPColor[1] = "white";	// text font color
	aDefICPColor[2] = aCurICPColor[2] = "#ffcc33";	// mouseover font color
}
else {
	// Mac, not IE
	HTMLStr += "<form method=post><p><select onChange=\"fxOptChange(this)\" name=\"selectJunle\" size=\"1\">\n";
	HTMLStr += "	<option value=\"\">-------Please Select-------</option>\n";
}
//
//
//
//
//
function fxOptChange(objOpt) {
	var url = objOpt.options[objOpt.selectedIndex].value;
	if(url != "") {
		document.location = url;
	}
}
function drawToolbar()
{
	if (ToolBar_Supported) {
		HTMLStr += "</DIV></DIV>";
		document.write(HTMLStr);
		ToolbarLoaded = true;
		LKMenuWidth     = Math.max(idLKMenuPane.offsetWidth, (200+112));
		ToolbarMinWidth = (250+18) + LKMenuWidth;
		idToolbar.style.backgroundColor     = ToolbarBGColor;
		idLKMenuPane.style.backgroundColor  = aDefLKColor[0];
		if (RTL){
			idLKMenuPane.style.color			= aDefLKColor[1];
		}
		resizeToolbar();
		for (i = 0; i < TotalMenu; i++) 
		{
			thisMenu = document.all(arrMenuInfo[i].IDStr);
			if (thisMenu != null)
			{
				if (arrMenuInfo[i].IDStr == LastLKMenu && arrMenuInfo[i].type == "R")
				{
					//Last LKMenu has to be absolute width
					arrMenuInfo[i].type = "A";
					arrMenuInfo[i].unit = 200;
				}
				if (arrMenuInfo[i].type == "A")
					if(!RTL){
						thisMenu.style.width = arrMenuInfo[i].unit + 'px';
					}else{
						thisMenu.style.width = arrMenuInfo[i].unit;
					}	
				else 
					thisMenu.style.width = Math.round(arrMenuInfo[i].width * arrMenuInfo[i].unit) + 'em';
			}
		}
	}
	else {
		// Mac, not IE
		HTMLStr += "</select></p></form></DIV>\n";
		document.write(HTMLStr);
	}
	//
	UPDWNMenu();
}
function resizeToolbar()
{
	scFlag = false;
	scrollcount = 0;
	if (ToolBar_Supported == false) return;
	w = Math.max(ToolbarMinWidth, document.body.clientWidth) - ToolbarMinWidth;
}
function setToolbarBGColor(color)
{
	ToolbarBGColor = color;
	if (ToolbarLoaded == true)
		idToolbar.style.backgroundColor = ToolbarBGColor;
}
function setLKMenuFont(sFont)
{
	LKFont = sFont;
}
function setDefaultLKMenuColor(bgColor, fontColor, mouseoverColor)
{
	if (bgColor   != "")	  aDefLKColor[0] = bgColor;
	if (fontColor != "")	  aDefLKColor[1] = fontColor;
	if (mouseoverColor != "") aDefLKColor[2] = mouseoverColor;
}
function setLKSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{	tempID = "LK_" + MenuIDStr;
	setSubMenuWidth(tempID, WidthType, WidthUnit);
}
function setSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{
	var fFound = false;
	if (TotalMenu == MaxMenu)
	{
		alert("Unable to process menu. Maximum of " + MaxMenu + " reached.");
		return;
	}
	for (i = 0; i < TotalMenu; i++)
		if (arrMenuInfo[i].IDStr == MenuIDStr)
		{
			fFound = true;
			break;
		}
	if (!fFound)
	{
		arrMenuInfo[i] = new menuInfo(MenuIDStr);
		TotalMenu += 1;
	}
	if (!fFound && WidthType.toUpperCase().indexOf("DEFAULT") != -1)
	{
		arrMenuInfo[i].type = "A";
		arrMenuInfo[i].unit = 160;
	}
	else
	{
		arrMenuInfo[i].type = (WidthType.toUpperCase().indexOf("ABSOLUTE") != -1)? "A" : "R";
		arrMenuInfo[i].unit = WidthUnit;
	}
}
// This function creates a menuInfo object instance.
function menuInfo(MenuIDStr)
{
	this.IDStr = MenuIDStr;
	this.type  = "";
	this.unit  = 0;
	this.width = 0;
	this.count = 0;
}
function updateSubMenuWidth(MenuIDStr)
{
	for (i = 0; i < TotalMenu; i++)
		if (arrMenuInfo[i].IDStr == MenuIDStr)
		{
			if (arrMenuInfo[i].width < MenuIDStr.length)
				arrMenuInfo[i].width = MenuIDStr.length;
			arrMenuInfo[i].count = arrMenuInfo[i].count + 1;
			break;
		}
}
function addLKMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{	
	TargetStr = "Main";
	tempID = "LK_" + MenuIDStr;
	addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, false); 
	LastLKMenu = tempID;
}
function addMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, bICPMenu)
{
	if (ToolBar_Supported) {
		cFont   = bICPMenu? ICPFont : LKFont;
		cColor0 = bICPMenu? aDefICPColor[0] : aDefLKColor[0];
		cColor1 = bICPMenu? aDefICPColor[1] : aDefLKColor[1];
		cColor2 = bICPMenu? aDefICPColor[2] : aDefLKColor[2];
		if (RTL){
			cStyle  = "font:" + cFont + ";background-color:" + cColor0 + ";color:" + cColor1 + ";";
			if (MenuHelpStr == "") MenuHelpStr = MenuDisplayStr; // This line should have been before the line MenuStr = newLineChar; but I am tryig to avoid another if..else

		}
		tagStr  = bICPMenu? "<!--ICP_MENU_TITLES-->" : "<!--LK_MENU_TITLES-->";
		MenuStr = newLineChar;
		if (!RTL){
			if ((bICPMenu == false && LastLKMenu != "") || (bICPMenu == true && bFstICPTBMenu==false))
				MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>|&nbsp;</SPAN>"; 
			MenuStr += "<A TARGET='" + TargetStr + "' TITLE='" + MenuHelpStr + "'" +
					"   ID='AM_" + MenuIDStr + "'" +
					"   STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";background-color:" + cColor0 + ";color:" + cColor1 + ";'";

			if (MenuURLStr != "")
			{
				if (bICPMenu)
					MenuStr += " HREF='" + formatURL(MenuURLStr, ("ICP_" + MenuDisplayStr)) + "'";
				else
					MenuStr += " HREF='" + formatURL(MenuURLStr, ("LK_" + MenuDisplayStr)) + "'";
			}
			else
				MenuStr += " HREF='' onclick='window.event.returnValue=false;'";
			MenuStr += 	" onmouseout="  + char34 + "mouseMenu('out' ,'" + MenuIDStr + "'); hideMenu();" + char34 + 
						" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "'); doMenu('"+ MenuIDStr + "');" + char34 + ">" +

						"&nbsp;" + MenuDisplayStr + "&nbsp;</a>";
			MenuStr += tagStr;
		}
		if ( RTL ){
				if (bICPMenu)
				MenuStr += "<TD STYLE='" + cStyle + "' ID='AM_" + MenuIDStr + "' NOWRAP>";
				else{
					// RTL Correction: added: dir='rtl' (for LKMenu)
					MenuStr += "<SPAN dir='rtl' STYLE='" + cStyle + "'>";
					if (LastLKMenu != "") MenuStr += "|";
					MenuStr += "&nbsp;";
				}
			MenuStr += "<A STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";color:" + cColor1 + ";'" +
				   "   TARGET='" + TargetStr + "'" +
				   "   TITLE=" + char34 + MenuHelpStr + char34;
			if (MenuURLStr != "")
				MenuStr += " HREF='" + formatURL(MenuURLStr, ((bICPMenu? "ICP_":"LK_") + MenuDisplayStr)) + "'";
			else
				MenuStr += " HREF='' onclick='window.event.returnValue=false;'";
			MenuStr += " onmouseout="  + char34 + "mouseMenu('out' ,'" + MenuIDStr + "'); hideMenu();" + char34 + 
					" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "'); doMenu('"+ MenuIDStr + "');" + char34 + ">" +
					"&nbsp;" + MenuDisplayStr + "&nbsp;</a>";
			if (bICPMenu) 
				MenuStr += "&nbsp;</TD><TD STYLE='" + cStyle + "'>|</TD>";
			else
				MenuStr += "</SPAN>";
				MenuStr += tagStr;
		}
		HTMLStr = HTMLStr.replace(tagStr, MenuStr);
		setSubMenuWidth(MenuIDStr,"default",0);
	}
	else {
		// Max & not IE
		HTMLStr += "	<option value=\"\"";
		HTMLStr += MenuURLStr;
		HTMLStr += ">---";
		HTMLStr += MenuDisplayStr;
		HTMLStr += "---</option>\n";
	}
}
//
function addLKSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr)
{
	TargetStr = "Show";
	tempID = "LK_" + MenuIDStr;
	addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,false);
}
function addSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr, TargetStr, bICPMenu)
{
	if (ToolBar_Supported) {
		cFont   = bICPMenu? ICPFont : LKFont;
		cColor0 = bICPMenu? aDefICPColor[0] : aDefLKColor[0];
		cColor1 = bICPMenu? aDefICPColor[1] : aDefLKColor[1];
		cColor2 = bICPMenu? aDefICPColor[2] : aDefLKColor[2];
		var MenuPos = MenuIDStr.toUpperCase().indexOf("MENU");
		if (MenuPos == -1) { MenuPos = MenuIDStr.length; }
		InstrumentStr = MenuIDStr.substring(0 , MenuPos) + "|" + SubMenuStr;
		URLStr        = formatURL(SubMenuURLStr, InstrumentStr);
		var LookUpTag  = "<!--" + MenuIDStr + "-->";
		var sPos = HTMLStr.indexOf(LookUpTag);
		if (sPos <= 0)
		{
			HTMLStr += newLineChar + newLineChar +
			"<SPAN ID='" + MenuIDStr + "'";
			if (!RTL){
				HTMLStr += 	" STYLE='display:none;position:absolute;width:160px;background-color:" + cColor0 + ";padding-top:0px;padding-left:0px;padding-bottom:20px;z-index:9px;'";

			}else if (RTL){
				HTMLStr += 	" STYLE='display:none;position:absolute;width:160;background-color:" + cColor0 + ";padding-top:0;padding-left:0;padding-bottom:20;z-index:9;'";

			}
			HTMLStr += "onmouseout='hideMenu();'>";
			if (Frame_Supported == false || bICPMenu == false)
			if (!RTL){
				HTMLStr += "<HR  STYLE='position:absolute;left:0px;top:0px;color:" + cColor1 + "' SIZE=1>";
				HTMLStr += "<DIV STYLE='position:relative;left:0px;top:8px;'>";
			} else if (RTL){
				HTMLStr += "<HR  STYLE='position:absolute;left:0;top:0;color:" + cColor1 + "' SIZE=1>";
				HTMLStr += "<DIV STYLE='right:0;top:8;' dir='rtl'>";
			}
		}
		TempStr = newLineChar +
					"<A ID='AS_" + MenuIDStr + "'" +
					"   STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";color:" + cColor1 + "'" +
					"   HREF='" + URLStr + "' TARGET='" + TargetStr + "'" +
					" onmouseout="  + char34 + "mouseMenu('out' ,'" + MenuIDStr + "');" + char34 + 
					" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "');" + char34 + ">" +
					"&nbsp;" + SubMenuStr + "</A><BR>" + LookUpTag;
		if (sPos <= 0)
			HTMLStr += TempStr + "</DIV></SPAN>";
		else
			HTMLStr = HTMLStr.replace(LookUpTag, TempStr);
		updateSubMenuWidth(MenuIDStr);
	}
	else {
		// Mac, not IE
		HTMLStr += "	<option value=\"";
		HTMLStr += SubMenuURLStr;
		HTMLStr += "\">";
		HTMLStr += SubMenuStr;
		HTMLStr += "</option>\n";
	}
}
function addLKSubMenuLine(MenuIDStr)
{
	tempID = "LK_" + MenuIDStr;
	addSubMenuLine(tempID,false);
}
function addSubMenuLine(MenuIDStr, bICPMenu)
{
	var LookUpTag = "<!--" + MenuIDStr + "-->";
	var sPos = HTMLStr.indexOf(LookUpTag);
	if (sPos > 0)
	{
		cColor  = bICPMenu? aDefICPColor[1] : aDefLKColor[1];
		TempStr = newLineChar + "<HR STYLE='color:" + cColor + "' SIZE=1>" + LookUpTag;
		HTMLStr = HTMLStr.replace(LookUpTag, TempStr);
	}
}
function mouseMenu(id, MenuIDStr)
{
	IsLKMenu   = (MenuIDStr.toUpperCase().indexOf("LK_") != -1);
	IsMouseout = (id.toUpperCase().indexOf("OUT") != -1);
	if (IsMouseout)
	{
		color = IsLKMenu? aDefLKColor[1] : aDefICPColor[1];
		if (MenuIDStr == CurICPMenu && aCurICPColor[1] != "") 
			color = aCurICPColor[1];
	}
	else
	{
		color = IsLKMenu? aDefLKColor[2] : aDefICPColor[2];
		if (MenuIDStr == CurICPMenu && aCurICPColor[2] != "") 
			color = aCurICPColor[2];
	}
	window.event.srcElement.style.color = color;
}
function doMenu(MenuIDStr)
{
	var thisMenu = document.all(MenuIDStr);
	if (ToolbarMenu == null || thisMenu == null || thisMenu == ToolbarMenu)
	{
		window.event.cancelBubble = true;
		return false;
	}
	// Reset dropdown menu
	window.event.cancelBubble = true;
	ToolbarMenu.style.display = "none";
	showElement("SELECT");
	showElement("OBJECT");
	ToolbarMenu = thisMenu;
	IsLKMenu = (MenuIDStr.toUpperCase().indexOf("LK_") != -1);
	// Set dropdown menu display position
	x  = window.event.srcElement.offsetLeft +
	 	 window.event.srcElement.offsetParent.offsetLeft;
	if (RTL){
		// RTL correction:
		var ICPstart = 0;
		if (!IsLKMenu)
		{
			if (isIE5)
				ICPstart = window.event.srcElement.offsetParent.offsetParent.offsetLeft;
			else // for IE4 we must use...
				ICPstart = window.event.srcElement.offsetParent.offsetParent.offsetParent.offsetParent.offsetWidth -
					window.event.srcElement.offsetParent.offsetParent.offsetWidth;
			x += ICPstart;
		}
		x -= thisMenu.style.posWidth;
		x += IsLKMenu ? 8 : -2;
		if (x < 0) x = 0;
		// End of RTL Correction
	} 	 
	if (MenuIDStr == LastLKMenu){ 
		if (!RTL){
			x += (window.event.srcElement.offsetWidth - thisMenu.style.posWidth);
		}else if (RTL){
			if (x < 0) x = 0;
		}
	}
	x2 = x + window.event.srcElement.offsetWidth;
	y  = (IsLKMenu)?
		 (idRow1.offsetHeight) :
		 (idRow1.offsetHeight);
	if (RTL){
			// Get main menu width
			// RTL Correction:
		if (IsLKMenu)
			x2 = window.event.srcElement.offsetLeft - window.event.srcElement.offsetWidth;
		else
			x2 = window.event.srcElement.offsetParent.offsetLeft + ICPstart;
		// End of RTL Correction.
		// Get dropdown menu width
		x3 = x + 160;
		for (i = 0; i < TotalMenu; i++){
			if (arrMenuInfo[i].IDStr == MenuIDStr)
			{
				x3 = x+ arrMenuInfo[i].unit;
				break;
			}
		}
	}
	thisMenu.style.top  = y + 15;
//	thisMenu.style.left = x + 10;
	thisMenu.style.left = x;
	thisMenu.style.clip = "rect(0 0 0 0)";
	thisMenu.style.display = "block";
	thisMenu.style.zIndex = 102;
	// delay 2 millsecond to allow the value of ToolbarMenu.offsetHeight be set
	window.setTimeout("showMenu()", 2);
	return true;
}
function showMenu()
{
	if (ToolbarMenu != null)
	{
		IsMenuDropDown = (Frame_Supported && IsLKMenu == false)? false : true;
		if (IsMenuDropDown == false)
		{
			y = (y - ToolbarMenu.offsetHeight) + document.body.scrollTop;
			if (y < 0) y = 0;
			ToolbarMenu.style.top = y;
		}
		y2 = y + ToolbarMenu.offsetHeight + document.body.scrollTop;
		ToolbarMenu.style.clip = "rect(auto auto auto auto)";
		hideElement("SELECT");
		hideElement("OBJECT");
		if (!RTL)
			x2 = x + ToolbarMenu.offsetWidth;
			hideElement("IFRAME");
	}
}
function hideMenu()
{
	if (ToolbarMenu != null && ToolbarMenu != StartMenu) 
	{
		// Don't hide the menu if the mouse move between the menu and submenus
		if (!RTL){
			cY = event.clientY + document.body.scrollTop;
			cX = event.clientX;
			if (document.body.offsetWidth > x && scFlag) {
				cX = x + 9;
			}
			if ( (cX >= (x+5) && cX<=x2) &&
			 ((IsMenuDropDown == true  && cY > (y-10) && cY <= y2)      ||
			  (IsMenuDropDown == false && cY >= y     && cY <= (y2+10)) ))
			{
				// alert("1:cY=" + cY + ", y=" + y + ", y2=" + y2 + ", RTL=" + RTL + ", document.body.scrollTop=" + document.body.scrollTop);
				window.event.cancelBubble = true;
				return;
			}
		}else if(RTL){
			var cX = event.clientX //+ document.body.scrollLeft;
			// RTL correction: considers left scrollbar width!
			if (isRTL) cX -= 16;
			var cY = event.clientY + document.body.scrollTop;
			var bHideMenu = true;
			if (cX > document.body.scrollLeft && document.body.scrollLeft > 1){
				cX = x3;	//x + 9;
			}
			if (IsMenuDropDown == true)
			{// RTL Correction: cY-8 instead of cY
				if ( cY-8 >= (y) && cY < y)
				{// RTL Correction: [x,x2] --> [x2,x3]
					if (cX >= (x2+5) && cX <= x3) bHideMenu = false;
				}
				else if (cY >= y && cY <= y2)
				{
					if (cX > (x+5) && cX <= x3) bHideMenu = false;
				}
			}
			else
			{
				if (cY >= y2 && cY < (y2))
				{// RTL Correction: [x,x2] --> [x2,x3]
					if (cX >= (x2+5) && cX <= x3) bHideMenu = false;
				}
				else if (cY >= y && cY <= y2)
				{
					if (cX > (x+5) && cX <= x3) bHideMenu = false;
				}
			}
			if (! bHideMenu)
			{
				window.event.cancelBubble = true;
				return;
			}
		}
		// alert("2:cY=" + cY + ", y=" + y + ", y2=" + y2 + ", RTL=" + RTL + ", document.body.scrollTop=" + document.body.scrollTop);
		ToolbarMenu.style.display = "none";
		ToolbarMenu = StartMenu;
		window.event.cancelBubble = true;
		showElement("SELECT");
		showElement("OBJECT");
		if(!RTL){
			showElement("IFRAME");
		}
	}
}
function hideElement(elmID)
{
	for (i = 0; i < document.all.tags(elmID).length; i++)
	{
		obj = document.all.tags(elmID)[i];
		if (! obj || ! obj.offsetParent)
			continue;
		// Find the element's offsetTop and offsetLeft relative to the BODY tag.
		objLeft   = obj.offsetLeft;
		objTop    = obj.offsetTop;
		objParent = obj.offsetParent;
		while (objParent.tagName.toUpperCase() != "BODY")
		{
			objLeft  += objParent.offsetLeft;
			objTop   += objParent.offsetTop;
			objParent = objParent.offsetParent;
		}
		// Adjust the element's offsetTop relative to the dropdown menu
		objTop = objTop - y;
		if (x > (objLeft + obj.offsetWidth) || objLeft > (x + ToolbarMenu.offsetWidth))
			;
		else if (objTop > ToolbarMenu.offsetHeight)
			;
		else if (IsLKMenu && (y + ToolbarMenu.offsetHeight) <= 80)
			;
		else
			obj.style.visibility = "hidden";
	}
}
function showElement(elmID)
{
	for (i = 0; i < document.all.tags(elmID).length; i++)
	{
		obj = document.all.tags(elmID)[i];
		if (! obj || ! obj.offsetParent)
			continue;
		obj.style.visibility = "";
	}
}
function formatURL(URLStr, InstrumentStr)
{
	var tempStr = URLStr;
	if (DoInstrumentation && URLStr != "" )
	{
		var ParamPos1 = URLStr.indexOf("?");
		var ParamPos2 = URLStr.lastIndexOf("?");
		var ParamPos3 = URLStr.toLowerCase().indexOf("target=");
		var ParamPos4 = URLStr.indexOf("#");
		var Bookmark  = "";
		var URL = URLStr;
		if (ParamPos4 >= 0)
		{
		 	URL = URLStr.substr(0, ParamPos4);
			Bookmark = URLStr.substr(ParamPos4);
		}
		if (ParamPos1 == -1)
			tempStr = "?LKCOMTB=";
		else if (ParamPos1 == ParamPos2 && ParamPos3 == -1)
			tempStr = "&LKCOMTB=";
		else if (ParamPos1 == ParamPos2 && ParamPos3 != -1)
			tempStr = "?LKCOMTB=";
		else if (ParamPos1 < ParamPos2)
			tempStr = "&LKCOMTB=";
		tempStr = URL + tempStr + InstrumentStr.replace(" ","%20") + Bookmark;
	}
	return tempStr;
}
function scrollbaroptions(){
scrollcount ++;
if ( scrollcount < 3  )
	{
		scFlag = true;
	}else{
		scrollcount = 0;
		scFlag = false;
	}
}
//
function UPDWNMenu() {
	if(IE5 || NN6){
		yy=eval(yz);
		divname=NN6?document.getElementById("updMenu"):IE?document.all("updMenu"):0;
		object=NN6?document.getElementById("updMenu").style:IE?document.all("updMenu").style:0;
		if(IE5){
			DIVHeight=divname.offsetHeight;
			WinHeight=document.body.clientHeight;
			if(DIVHeight>=WinHeight){
				return false;
			}
			else {
				SetMenuPos();
			}
		}
		if(NN6){
			SetMenuPos();
		}
	}
	else{
		return false;
	}
}
function SetMenuPos(){
	object.position='absolute';
	CalcTop();
}
function CalcTop(){
	MoveMenu();
	setTimeout("CalcTop()",20);
}
function MoveMenu(){
	yd=Math.abs(eval(yz)-yy);
	yp=yd*0.2;
	if(eval(yz)<yy){
		yy-=yp;
	}
	else{
		if(eval(yz)>yy){
			yy+=yp;
		}
	}
	if(yy>MenuTop){
		object.top=yy+MenuBlank;
	}
	if(yy<MenuTop){
		object.top=MenuTop;
	}
}
