//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	
	if (!ez_NN4) 
	{
		if(window.onresizeend)	window.onresizeend	= displayMenu;
		else					window.onresize		= displayMenu;
		
		//window.document.attachEvent("onkeydown",f9);
		window.onbeforeunload		= loading;
	} 
	topMenuMark();
	
	function url2(url)		{	window.location.href	= url;	}
	function open2(url)		{	window.open(url,"newwin");		}
	
	function ws(txt)		{	window.status	 = txt;			}
	function wsa(txt)		{	window.status	+= txt+", ";	}
	
	function loading()		{	return; ws("loading...");				}
	function done()			{	return; ws("Done");						}
	function saving()		{	return; ws("saving...");				}
	function wait(ms)		{	var oI	= window.setInterval(loading,ms); window.clearInterval(oI);	}

//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function topMenuMark()
{
/*	
	var elements		= window.document.getElementsByTagName("SPAN");
	var mask			= window.document.all.ucHeader_ezTopMenu_topMenuMarked.value;
	
	for(var j=0; j<elements.length; j++)
	{
		var elem		= elements[j];
			
		if(elem.id.substr(0,4)=="_tm_")
		{
			var pattern	= ","+parseInt(elem.id.substr(4))+","; 

			if(mask.indexOf(pattern)>=0)
			{
				classOn(elem);
			}
		}	
	}
*/	
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function topMenuOver(o)
{
//	html(o);
	
	for(var j=0; j<o.parentNode.childNodes.length; j++)
	{
		if(o.parentNode.childNodes[j].className)
		{
			classOn(o.parentNode.childNodes[j]);
		}
	}
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function topMenuOut(o)
{
	var mask			= window.document.all.ucHeader_ezTopMenu_topMenuMarked.value;

	for(var j=0; j<o.parentNode.childNodes.length; j++)
	{
		if(o.parentNode.childNodes[j].className)
		{
			var elem	= o.parentNode.childNodes[j];
			
			if(elem.id.substr(0,4)=="_tm_")
			{
				var pattern	= ","+parseInt(elem.id.substr(4))+","; 

				if(mask.indexOf(pattern)<0)
				{
					classOff(elem);	imgOff(o);
				}
			}	
		}
	}
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function topMenuImageOver(o)
{
	imgOn(o);
}	
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function topMenuImageOut(o)
{
	var mask			= window.document.all.ucHeader_ezTopMenu_topMenuMarked.value;

	if(o.id.substr(0,4)=="_tm_")
	{
		var pattern	= ","+parseInt(o.id.substr(4))+","; 

		if(mask.indexOf(pattern)<0)		imgOff(o);
	}	
}	
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function none(o)
{
	if(o && o.style)	o.style.display	= "none";	
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function block(o)
{
	if(o && o.style)	o.style.display	= "block";	
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function imgOff(o)
{
	if(o && o.src)		o.src			= o.getAttributeNode("off").value;
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function imgOn(o)
{
	if(o && o.src)		o.src			= o.getAttributeNode("on").value;
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function classOff(o)
{
	if(o && o.className)	o.className	= o.className.replace(/_on/gi,"_off");
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function classOn(o)
{
	if(o && o.className)	o.className	= o.className.replace(/_off/gi,"_on");
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function dbg(O)
{
	if(typeof(O)=="string"||typeof(O)=="number"){alert(O); return;	}
	
	var arr	=	[];	
	for(var o in O)	
	{
		if(typeof(o)=="string"||typeof(o)=="number")
		{
				arr.push(o);	
		}
		else	arr.push(o);
	} 
		arr.sort();	
		alert(arr.join("; "));
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function html(o)
{
	if(o && o.outerHTML)
	{
		alert(o.outerHTML);
	}
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function f9(ev)
{
	if(event.keyCode==120)
	{
//		alert(window.t_);
//		alert(window.w_);

		try
		{
			//if(nw)	nw.close();
		}
		catch(e){}
		
		//nw	= window.open("about:blank","newwin");
		alert(document.documentElement.outerHTML);
		//nw.focus();
	

	}
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// detect the coordinates of image named 'marker'and pass to showPermPanel to display menu panel 'Bar'
// If you have used different names, please change the two lines below accordingly 
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function _markerLoaded_(o,mode)
{
	//wsa(o.readyState+":"+mode);	
	
	if(!document.getElementById("_marker_"))	return;	

	if(o.readyState=="complete")
	{
		if(_markerLoaded_.on) return; 
		intervalID	= window.setInterval("displayMenu()",500);
		_markerLoaded_.on	= true;
		
	}
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

function displayMenu() 
{
	window.clearInterval(intervalID);
	
  var	imgPosition = imgXY('_marker_');                     

		showPermPanel(menuBar_Name, imgPosition.x, imgPosition.y);   
}

//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// This function returns the upperleft x,y coordinates of the specified image 
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function imgXY(imgID) 
{
  var XY		= new Object();
  var imgObj	= document.images[imgID];
  
  if(document.layers) 
  {
		XY.x	= eval(imgObj).x;
		XY.y	= eval(imgObj).y;
  } 
  else 
  {
	var x,y, tempEl;
		x		= eval(imgObj).offsetLeft;
		y		= eval(imgObj).offsetTop;
		tempEl	= eval(imgObj).offsetParent;
  	
  	while (tempEl != null) 
  	{
  		x		+= tempEl.offsetLeft;
		y		+= tempEl.offsetTop;
  		tempEl	= tempEl.offsetParent;
  	}
		XY.x	= x;
		XY.y	= y;
  }
  return XY;
}
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

