var UsePdMenu = false;
var AllowFrames = false;
var DoInstrumentation = false;
var cursor_hand = "pointer" ;
/*
	MSIE 6.0
	------------
	navigator.userAgent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
	navigator.appVersion = 4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

	FireFox 1.0
	-----------
	navigator.userAgent = Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1
	navigator.appVersion = 5.0 (Windows; )

*/

if((navigator.userAgent.indexOf("Mozilla/") == 0 && parseInt(navigator.appVersion) >= 4)
  || (navigator.userAgent.indexOf("Opera/") == 0 && parseInt(navigator.appVersion) >= 6))
{
	UsePdMenu = true;
}

if(UsePdMenu)
{
	var GlbFontFace;
	var NavFontFace;
	var MenuMaxCount = 30;
	var MenuCount = 0;
	var sHTML;
	var LineFeed = String.fromCharCode(10);
	var AscDblQuote = String.fromCharCode(34);
	var PrevGlbMenu = "";
	var CurNavMenu = "";
	var GlbMenuType = false;
	var PdMenuType = true;
	var col = 0;
	var row = 0;
	var colB = 0;
	var rowB = 0;
	var GlbMenuPixels;
	var PdMenuMinWidth;
	var PdMenu;
	var BackColor;
	var PdMenuActive = false;
	var CurNavColorArray = new Array(3);
	var CurGlbColorArray = new Array(3);
	var DefGlbColorArray = new Array(3);
	var DefNavColorArray = new Array(3);
	var MenuDataArray = new Array(30);

	// Output style sheet and toolbar ID
	document.write("<SPAN ID='MenuBar' STYLE='display:none;'></SPAN>");

	// Build toolbar template
	sHTML = 
		"<DIV ID='id_PdMenu' STYLE='background-color:white;width:100%'>" +
		"<DIV ID='id_Row1' STYLE='position:relative;height:20;'>" +
		"<DIV ID='id_NavImage' STYLE='position:absolute;top:0;left:0;height:60;width:250;overflow:hidden;vertical-align:top;'><!--BEG_NAV_IMAGE--><!--END_NAV_IMAGE--></DIV>" +
		"<DIV ID='id_GlbMenuEdge' STYLE='position:absolute;top:0;left:250;height:20;width:10;overflow:hidden;vertical-align:top;'><IMG SRC='/images/corner.gif' BORDER=0></DIV>" +
		"<DIV ID='id_GlbMenuArea' STYLE='position:absolute;top:0;left:250;height:20;width:10;background-color:black;float:right;' NOWRAP><!--GLB_MENU_TITLES--></DIV>" + 
		"</DIV>" +
		"<DIV ID='id_Row2' STYLE='position:relative;left:250;height:40;'>" +
		"<DIV ID='id_AdImage' STYLE='position:absolute;top:0;left:0;height:40;width:184;vertical-align:top;overflow:hidden;'><!--BEG_AD_IMAGE--><!--END_AD_IMAGE--></DIV>" +
		"<DIV ID='id_GlbImage' STYLE='position:absolute;top:0;left:184;height:40;width:111;vertical-align:top;overflow:hidden;' ALIGN=RIGHT><!--START_GLB_IMAGE--><!--END_GLB_IMAGE--></DIV>" +
		"</DIV>" +
		"<DIV ID='id_Row3' STYLE='position:relative;height:19;width:100%'>" +
		"<DIV ID='id_NavMenuArea' STYLE='position:absolute;top:0;left:0;height:19;background-color:red;' NOWRAP><!--NAV_MENU_NAMES--></DIV>" +
		"</DIV>" +
		"</DIV>" +
		"<SCRIPT TYPE='text/javascript'>" + 
		"   var PdMenu = MenuBar;" + 
		"</SCRIPT>" + 
		"<DIV WIDTH=100%>";

	// Define event handlers
	window.onresize = sizePdMenu;

	// Intialize global variables
	BackColor = "#FFFFFF";	// toolbar background color
	GlbFontFace = "Bold x-small Verdana";
	NavFontFace = "Bold x-small Verdana";
	
	DefGlbColorArray[0]	= CurGlbColorArray[0] = "#400040";	// bgcolor
	DefGlbColorArray[1]	= CurGlbColorArray[1] = "#FF0000";	// font color
	DefGlbColorArray[2] = CurGlbColorArray[2] = "#FFFFFF";	// mouse-over font color
	
	DefNavColorArray[0]	= CurNavColorArray[0] = "#0099FF";	// bgcolor
	DefNavColorArray[1] = CurNavColorArray[1] = "#000000";	// text font color
	DefNavColorArray[2] = CurNavColorArray[2] = "#FFFF80";	// mouse-over font color
}

function buildMenuBar()
{
	// Pixel sizes for the images used in the menu.
	//	GLB_IMAGE:	111x by 40y
	//	NAV_IMAGE:	250x by 60y
	//	AD_IMAGE:	184x by 40y
	//	Corner:	    10x  by 20y

	sHTML += "</DIV>";
	document.write(sHTML);
	PdMenuActive = true;

	GlbMenuPixels = Math.max(document.getElementById('id_GlbMenuArea').offsetWidth, (184+111));
	PdMenuMinWidth = (250+10) + GlbMenuPixels;

	document.getElementById('id_PdMenu').style.backgroundColor = BackColor;
	document.getElementById('id_GlbMenuArea').style.backgroundColor = DefGlbColorArray[0];
	document.getElementById('id_NavMenuArea').style.backgroundColor = DefNavColorArray[0];
	sizePdMenu();

	for(idx = 0; idx < MenuCount; idx++) {
        menu_item = document.getElementById(MenuDataArray[idx]) ;
        if(menu_item != null) {
		    thisMenu = document.getElementById(menu_item.IDStr);
		    if(thisMenu != null)
		    {
			    if (menu_item.IDStr == PrevGlbMenu && menu_item.type == "R")
			    {
				    // Last item has to be absolute width
				    menu_item.type = "A";
				    menu_item.unit = 200;
			    }
			    if (menu_item.type == "A")
				    thisMenu.style.width = menu_item.unit;
			    else 
				    thisMenu.style.width = Math.round(menu_item.width * menu_item.unit) + 'em';
		    }
		}
	}
}

function sizePdMenu()
{
	if (UsePdMenu == false) 
		return;

	w = Math.max(PdMenuMinWidth, document.body.clientWidth) - PdMenuMinWidth;
	
	document.getElementById('id_GlbMenuEdge').style.left = (250+w);
	document.getElementById('id_GlbMenuArea').style.left = (250+w+10);
	document.getElementById('id_GlbMenuArea').style.width = GlbMenuPixels;

	document.getElementById('id_AdImage').style.left = (w+10);

	document.getElementById('id_GlbImage').style.left = (w+10+184);
	document.getElementById('id_GlbImage').style.width = (GlbMenuPixels - 184);
	
	document.getElementById('id_NavMenuArea').style.width = PdMenuMinWidth + w;
}

function setPdMenuBackColor(color)
{	
	BackColor = color;
	if (PdMenuActive == true)
		document.getElementById('id_PdMenu').style.backgroundColor = BackColor;
}	

function setGlbMenuFont(sFont)
{	GlbFontFace = sFont;
}

function setNavMenuFont(sFont)
{	NavFontFace = sFont;
}

function setDefGlbMenuColor(bgColor, fontColor, mouseoverColor)
{	
	if (bgColor   != "")	  
		DefGlbColorArray[0] = bgColor;
	if (fontColor != "")	  
		DefGlbColorArray[1] = fontColor;
	if (mouseoverColor != "") 
		DefGlbColorArray[2] = mouseoverColor;
}

function setDefNavMenuColor(bgColor, fontColor, mouseoverColor)
{	
	if (bgColor   != "")	  
		DefNavColorArray[0] = bgColor;
	if (fontColor != "")	  
		DefNavColorArray[1] = fontColor;
	if (mouseoverColor != "") 
		DefNavColorArray[2] = mouseoverColor;
}

function setNavMenuColor(MenuIDStr, bgColor, fontColor, mouseoverColor)
{	
	if (PdMenuActive == false) 
		return;

	// Reset previous ICP Menu color if any
	if (CurNavMenu != "")
	{
		PrevID = CurNavMenu.substring(4);
		CurNavMenu = "";
		setNavMenuColor(PrevID, DefNavColorArray[0], DefNavColorArray[1], DefNavColorArray[2]);
	}

	var	id = "AM_" + "LOC_" + MenuIDStr;
	var thisMenu = document.all(id);
	if (thisMenu != null)
	{
		CurNavMenu = "LOC_" + MenuIDStr;
		CurNavColorArray[0] = bgColor;
		CurNavColorArray[1] = fontColor;
		CurNavColorArray[2] = mouseoverColor;

		// Change menu color
		if (bgColor != "")
			thisMenu.style.backgroundColor = bgColor;
		if (fontColor != "")
			thisMenu.style.color = fontColor;

		// Change subMenu color
		id = "LOC_" + MenuIDStr;
		thisMenu = document.all(id);
		if (thisMenu != null)
		{
			if (bgColor != "")
				thisMenu.style.backgroundColor = bgColor;
			
			if (fontColor != "")
			{
				i = 0;
				id = "AS_" + "LOC_" + MenuIDStr;
				thisMenu = document.all.item(id,i);
				while (thisMenu != null)
				{
					thisMenu.style.color = fontColor;
					i += 1;
					thisMenu = document.all.item(id,i);
				}
			}
		}
	}
}

function setAds(aImage,asURL,asAltText)
{	
	setImage(aImage,asURL,asAltText,"<!--BEG_AD_IMAGE-->","<!--END_AD_IMAGE-->");
}

function setNavImage(aImage,asURL,asAltText)
{	
	setImage(aImage,asURL,asAltText,"<!--BEG_NAV_IMAGE-->","<!--END_NAV_IMAGE-->");
}

function setGlbImage(aImage,asURL,asAltText)
{	
	setImage(aImage,asURL,asAltText,"<!--START_GLB_IMAGE-->","<!--END_GLB_IMAGE-->");
}

function setImage(aImage, asURL, asAltText, asSectionStart, asSectionEnd)
{
	offset1 = sHTML.indexOf(asSectionStart);
	offset2 = sHTML.indexOf(asSectionEnd) + asSectionEnd.length;
	
	sText = sHTML.substring(offset1, offset2);
	sScript = "";
	if (asURL != "")
		sScript += "<A Target='_top' HREF='" + formatURL(asURL, aImage) + "'>";
	sScript += "<IMG SRC='" + aImage + "' ALT='" + asAltText + "' BORDER=0>";
	if (asURL != "")
		sScript += "</A>";
	sScript = asSectionStart + sScript + asSectionEnd;
	sHTML = sHTML.replace(sText, sScript);	
}

function setNavSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{	tempID = "LOC_" + MenuIDStr;
	setSubMenuWidth(tempID, WidthType, WidthUnit);
}

function setGlbSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{	tempID = "PCC_" + MenuIDStr;
	setSubMenuWidth(tempID, WidthType, WidthUnit);
}

function setSubMenuWidth(MenuIDStr, WidthType, WidthUnit)
{
	var fFound = false;
	if (MenuCount == MenuMaxCount)
	{
		alert("Unable to process menu. Maximum of " + MenuMaxCount + " reached.");
		return;
	}
	
	for (i = 0; i < MenuCount; i++)
		if (MenuDataArray[i].IDStr == MenuIDStr)
		{
			fFound = true;
			break;
		}

	if (!fFound)
	{
		MenuDataArray[i] = new menuInfo(MenuIDStr);
		MenuCount += 1;
	}

	if (!fFound && WidthType.toUpperCase().indexOf("DEFAULT") != -1)
	{
		MenuDataArray[i].type = "A";
		MenuDataArray[i].unit = 150;
	}
	else
	{
		MenuDataArray[i].type = (WidthType.toUpperCase().indexOf("ABSOLUTE") != -1)? "A" : "R";
		MenuDataArray[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 < MenuCount; i++)
		if (MenuDataArray[i].IDStr == MenuIDStr)
		{
			if (MenuDataArray[i].width < MenuIDStr.length) 
				MenuDataArray[i].width = MenuIDStr.length;
			MenuDataArray[i].count = MenuDataArray[i].count + 1;
			break;
		}
}

function addNavMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{ 	
	if (addNavMenu.arguments.length > 4)
		TargetStr = addNavMenu.arguments[4];
	else
		TargetStr = "_top";
	tempID = "LOC_" + MenuIDStr;
	addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, true); 
}

function addGlbMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{	
	TargetStr = "_top";
	tempID = "PCC_" + MenuIDStr;
	addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, false); 
	PrevGlbMenu = tempID;
}

function addMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, bLOCMenu)
{
	cFont = bLOCMenu? NavFontFace : GlbFontFace;
	cColor0 = bLOCMenu? DefNavColorArray[0] : DefGlbColorArray[0];
	cColor1 = bLOCMenu? DefNavColorArray[1] : DefGlbColorArray[1];
	cColor2 = bLOCMenu? DefNavColorArray[2] : DefGlbColorArray[2];
	tagStr = bLOCMenu? "<!--NAV_MENU_NAMES-->" : "<!--GLB_MENU_TITLES-->";

	MenuStr = LineFeed;
	if (bLOCMenu == false && PrevGlbMenu != "")
		MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>|&nbsp;</SPAN>"; 
	MenuStr += "<A TARGET='" + TargetStr + "' TITLE='" + MenuHelpStr + "'" +
			   "   ID='AM_" + MenuIDStr + "'" +
			   "   STYLE='text-decoration:none;cursor:" + cursor_hand + ";font:" + cFont + ";background-color:" + cColor0 + ";color:" + cColor1 + ";'";
	if (MenuURLStr != "")
	{
		if (bLOCMenu)
			MenuStr += " HREF='" + formatURL(MenuURLStr, ("LOC_" + MenuDisplayStr)) + "'";
		else
			MenuStr += " HREF='" + formatURL(MenuURLStr, ("PCC_" + MenuDisplayStr)) + "'";
	}
	else
		MenuStr += " HREF='' onclick='window.event.returnValue=false;'";
	MenuStr += 	" onmouseout="  + AscDblQuote + "mouseMenu('out' ,'" + MenuIDStr + "'); hideMenu();" + AscDblQuote + 
				" onmouseover=" + AscDblQuote + "mouseMenu('over','" + MenuIDStr + "'); doMenu('"+ MenuIDStr + "');" + AscDblQuote + ">" +
				"&nbsp;" + MenuDisplayStr + "&nbsp;</a>";
	if (bLOCMenu)
		MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>&nbsp;|</SPAN>";
	MenuStr += tagStr;
	
	sHTML = sHTML.replace(tagStr, MenuStr);	
	setSubMenuWidth(MenuIDStr,"default",1);
}

function addNavSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr)
{	
	if (addNavSubMenu.arguments.length > 3)
		TargetStr = addNavSubMenu.arguments[3];
	else
		TargetStr = "_top";
	tempID = "LOC_" + MenuIDStr;
	addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,true); 
}

function addGlbSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr)
{	
	TargetStr = "_top";
	tempID = "PCC_" + MenuIDStr;
	addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,false); 
}

function addSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr, TargetStr, bLOCMenu)
{
	cFont = bLOCMenu? NavFontFace : GlbFontFace;
	cColor0 = bLOCMenu? DefNavColorArray[0] : DefGlbColorArray[0];
	cColor1 = bLOCMenu? DefNavColorArray[1] : DefGlbColorArray[1];
	cColor2 = bLOCMenu? DefNavColorArray[2] : DefGlbColorArray[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 = sHTML.indexOf(LookUpTag);
	if (sPos <= 0)
	{
		sHTML += LineFeed + LineFeed +
				"<SPAN ID='" + MenuIDStr + "'" +
				" STYLE='display:none;position:absolute;width:460;background-color:" + cColor0 
				+ ";padding-top:0;padding-left:0;padding-bottom:8;z-index:9;'"
				+ " onmouseout='hideMenu();'>";
		if (AllowFrames == false || bLOCMenu == false)
			sHTML += "<HR  STYLE='position:absolute;left:0;top:0;color:" + cColor1 + "' SIZE=1>";
		sHTML += "<DIV STYLE='position:relative;left:0;top:4;'>";
	}

	TempStr = LineFeed +
				"<A ID='AS_" + MenuIDStr + "'" +
				"   STYLE='text-decoration:none;cursor:" + cursor_hand + ";font:" + cFont + ";color:" + cColor1 + "'" +
				"   HREF='" + URLStr + "' TARGET='" + TargetStr + "'" +
				" onmouseout="  + AscDblQuote + "mouseMenu('out' ,'" + MenuIDStr + "');" + AscDblQuote + 
				" onmouseover=" + AscDblQuote + "mouseMenu('over','" + MenuIDStr + "');" + AscDblQuote + ">" +
				"&nbsp;" + SubMenuStr + "</A><BR>" + LookUpTag;
	if (sPos <= 0)
		sHTML += TempStr + "</DIV></SPAN>";
	else
		sHTML = sHTML.replace(LookUpTag, TempStr);	

	updateSubMenuWidth(MenuIDStr);	
}

function formatURL(URLStr, InstrumentStr)
{
	var tempStr = URLStr;

	// EXAMPLE: /_lib/pccrdr.php?index=/index_ID/index.html?arg0=123
	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 = "?PCCMNUID=";
		else if (ParamPos1 == ParamPos2 && ParamPos3 == -1)	
			tempStr = "&PCCMNUID=";
		else if (ParamPos1 == ParamPos2 && ParamPos3 != -1)	
			tempStr = "?PCCMNUID=";
		else if (ParamPos1 < ParamPos2)
			tempStr = "&PCCMNUID=";

		tempStr = URL + tempStr + InstrumentStr.replace(" ","%20") + Bookmark;
	}
	return tempStr;
}

function addNavSubMenuLine(MenuIDStr)
{	
	tempID = "LOC_" + MenuIDStr;
	addSubMenuLine(tempID,true);
}

function addGlbSubMenuLine(MenuIDStr)
{	
	tempID = "PCC_" + MenuIDStr;
	addSubMenuLine(tempID,false);
}

function addSubMenuLine(MenuIDStr, bLOCMenu)
{
	var LookUpTag = "<!--" + MenuIDStr + "-->";
	var sPos = sHTML.indexOf(LookUpTag);
	if (sPos > 0)
	{
		cColor = bLOCMenu? DefNavColorArray[1] : DefGlbColorArray[1];
		TempStr = LineFeed + "<HR STYLE='color:" + cColor + "' SIZE=1>" + LookUpTag;
		sHTML = sHTML.replace(LookUpTag, TempStr);
	}
}

function mouseMenu(id, MenuIDStr) 
{
	GlbMenuType = (MenuIDStr.toUpperCase().indexOf("PCC_") != -1);
	IsMouseout = (id.toUpperCase().indexOf("OUT") != -1);

	if (IsMouseout)
	{
		color = GlbMenuType? DefGlbColorArray[1] : DefNavColorArray[1];
		if (MenuIDStr == CurNavMenu && CurNavColorArray[1] != "") 
			color = CurNavColorArray[1];
	}
	else
	{
		color = GlbMenuType? DefGlbColorArray[2] : DefNavColorArray[2];
		if (MenuIDStr == CurNavMenu && CurNavColorArray[2] != "") 
			color = CurNavColorArray[2];
	}
	window.event.srcElement.style.color = color;
}

function doMenu(MenuIDStr) 
{
	var thisMenu = document.all(MenuIDStr);
	if (PdMenu == null || thisMenu == null || thisMenu == PdMenu) 
	{
		window.event.cancelBubble = true;
		return false;
	}
	// Reset dropdown menu
	window.event.cancelBubble = true;
	PdMenu.style.display = "none";
	showElement("SELECT");
	showElement("OBJECT");
	PdMenu = thisMenu;
	GlbMenuType = (MenuIDStr.toUpperCase().indexOf("PCC_") != -1);

	// Set dropdown menu display position
	col = window.event.srcElement.offsetLeft +
	 	 window.event.srcElement.offsetParent.offsetLeft;
	if (MenuIDStr == PrevGlbMenu) 
		col += (window.event.srcElement.offsetWidth - thisMenu.style.posWidth);
	colB = col + window.event.srcElement.offsetWidth;
	row = (GlbMenuType)? 
		 (document.getElementById('id_Row1').offsetHeight) :
		 (document.getElementById('id_Row1').offsetHeight + document.getElementById('id_Row2').offsetHeight + document.getElementById('id_Row3').offsetHeight);
	thisMenu.style.top = row;
	thisMenu.style.left = col;
	thisMenu.style.clip = "rect(0 0 0 0)";
	thisMenu.style.display = "block";

	// delay 2 millsecond to allow the value of PdMenu.offsetHeight be set
	window.setTimeout("showMenu()", 2);
	return true;
}

function showMenu() 
{
	if (PdMenu != null) 
	{ 
		PdMenuType = (AllowFrames && GlbMenuType == false)? false : true;
		if (PdMenuType == false)
		{
			row = (row - PdMenu.offsetHeight - document.getElementById('id_Row3').offsetHeight);
			if (row < 0) row = 0;
			PdMenu.style.top = row;
		}
		rowB = row + PdMenu.offsetHeight;

		PdMenu.style.clip = "rect(auto auto auto auto)";
		hideElement("SELECT");
		hideElement("OBJECT");
	}
}

function hideMenu()
{
	if (PdMenu != null && PdMenu != MenuBar) 
	{
		// Don't hide the menu if the mouse move between the menu and submenus
		cY = event.clientY + document.body.scrollTop;
		if ( (event.clientX >= (col+5) && event.clientX <= colB) &&
			 ((PdMenuType == true  && cY > (row-10) && cY <= rowB)      ||
			  (PdMenuType == false && cY >= row     && cY <= (rowB+10)) ))
		{
			window.event.cancelBubble = true;
			return; 
		}

		PdMenu.style.display = "none";
		PdMenu = MenuBar;
		window.event.cancelBubble = true;

		showElement("SELECT");
		showElement("OBJECT");
	}
}

function hideElement(elID)
{
	for (i = 0; i < document.all.tags(elID).length; i++)
	{
		obj = document.all.tags(elID)[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 - row;

		if (col > (objLeft + obj.offsetWidth) || objLeft > (col + PdMenu.offsetWidth))
			;
		else if (objTop > PdMenu.offsetHeight)
			;
		else if (GlbMenuType && (row + PdMenu.offsetHeight) <= 80)
			;
		else
			obj.style.visibility = "hidden";
	}
}

function showElement(elID)
{
	for (i = 0; i < document.all.tags(elID).length; i++)
	{
		obj = document.all.tags(elID)[i];
		if (! obj || ! obj.offsetParent)
			continue;
		obj.style.visibility = "";
	}
}