function Show(name, imgName, menuHeight)
{

	var obj = FIND(imgName) || document.images[imgName] || document.links[imgName] || document.anchors[imgName];
	
	// Determine how many pixels the parent menu image is from the left side
	// of the browser window.  This value is used to correctly position the DHTML
	// menu when it is displayed.
	//
	var x = moveXOffset(0, obj);
	
	// Determine how many pixels the top of the parent menu images is fromthe top
	// of the browser window.  This value is used to correctly position the DHTML
	// menu when it is displayed.
	//
	var y = moveYOffset(0, obj);
	
	// For WWW.NEWYORKFESTIVALS.COM, the menu appears above the main menu area.  Therefore,
	// the DHTML menu's top value needs to lessened by its total height.
	//
	y -= menuHeight;


	if (is_nav6up)
	{
		eval("document.getElementById(\""+name+"\").style.visibility='visible'");
		eval("document.getElementById(\""+name+"\").style.left='"+x+"px';");
		eval("document.getElementById(\""+name+"\").style.top='"+y+"px';");
	}
	else if (is_nav4up)
	{
		eval("document."+name+".visibility='show'");
		eval("document."+name+".left='"+x+"px';");
		eval("document."+name+".top='"+y+"px';");
	}
	else
	{
		eval("document.all."+name+".style.visibility='visible';");
		eval("document.all."+name+".style.left='"+x+"px';");
		eval("document.all."+name+".style.top='"+y+"px';");
	}
}

function Hide(name)
{
	if (is_nav6up)
	{
		eval("document.getElementById(\""+name+"\").style.visibility='hidden'");
	}
	else if (is_nav4up)
	{
		eval("document."+name+".visibility='hide'");
	}
	else
	{
		eval("document.all."+name+".style.visibility='hidden'");
	}
}

function moveXOffset (x, img) {
	if (!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
			if( par.leftMargin && ! onWindows ) x += parseInt(par.leftMargin);
			if( (par.offsetLeft != lastOffset) && par.offsetLeft ) x += parseInt(par.offsetLeft);
			if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft;
			par = macIE45 ? par.parentElement : par.offsetParent;
		}
	} else {
		if (img.x) x += img.x;
	}
	return x;
}

function moveYOffset (y, img) {
	if(!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
		
			if( par.topMargin && !onWindows ) {
				y += parseInt(par.topMargin);
				// We have parsed through the HTML and have gotten to the BODY
				// tag and accessed the topmargin value.  No need to go on an further.
				// This is done to prevent incorrect calculation of the distance from
				// the top of the browser window in Safari.
				if (is_safari)
					break;
			}
			if( (par.offsetTop != lastOffset) && par.offsetTop ) {
				y += parseInt(par.offsetTop);
			}
			if( par.offsetTop != 0 ) {
				lastOffset = par.offsetTop;
			}
			par = macIE45 ? par.parentElement : par.offsetParent;
		}
	} else if (img.y >= 0) y += img.y;
	return y;
}


function FIND(item) {
	if( window.mmIsOpera ) {
		return(document.getElementById(item));
	}
	if (document.all) {
		return(document.all[item]);
	}
	if (document.getElementById) {
		return(document.getElementById(item));
	}
	return(false);
}

function getExplorerVersion() {
	var ieVers = parseFloat(navigator.appVersion);
	if( navigator.appName != 'Microsoft Internet Explorer' ) return ieVers;
	var tempVers = navigator.appVersion;
	var i = tempVers.indexOf( 'MSIE ' );
	if( i >= 0 ) {
		tempVers = tempVers.substring( i+5 );
		ieVers = parseFloat( tempVers ); 
	}
	return ieVers;
}
