var curobj;
function Over(obj,img)
{
	obj.osrc=obj.src;
	obj.src=img;
	if (curobj!=null)
	{
		curobj.style.visibility="hidden";
		curobj=null;
	}
}

function Out(obj)
{
	obj.src=obj.osrc;
}

function Show1(objtop,objsub)
{
	if (browser.ns4 || browser.ns6)
	{
		//if (obj.id=="menu01" || obj.id=="menu02")curobj=obj;
	}
	//obj.style.visibility="visible";
	objsub.style.visibility="visible";
	objtop.style.color="#FFD900";
}

function Hide(obj,tdmenu)
{   
	tdmenu.style.color="#FFCC00";
	if (obj!=curobj) obj.style.visibility="hidden";
	if (document.getElementById('div1')==null)obj.style.visibility="hidden";
	
	
}

function Hide1()
{   
	if (curobj !=null)
	{
	    curobj.style.visibility="hidden";
	}
}

var browser = new Browser();

function Browser()
{
	this.dom = document.getElementById?1:0;
	this.ie4 = (document.all && !this.dom)?1:0;
	this.ns4 = (document.layers && !this.dom)?1:0;
	this.ns6 = (this.dom && !document.all)?1:0;
	this.ie5 = (this.dom && document.all)?1:0;
	this.ok = this.dom || this.ie4 || this.ns4;
	this.platform = navigator.platform;
}

function Show(div,menu,e,row)
{	
	var obj;
	var h=333;
	if (browser.ns4 || browser.ns6){obj=menu;h=333;}
	else obj=event.srcElement;
	
 	x = 0;
  	while (obj.offsetParent != null) 
  	{
    	x += obj.offsetLeft;
    	obj = obj.offsetParent;
  	}
  	x += obj.offsetLeft;
	y = 0;
	
	while (obj.offsetParent != null) 
	{
    	y += obj.offsetTop;
    	obj = obj.offsetParent;
  	}
  	y += obj.offsetTop;
  	div.style.left=x-1;
  	div.style.top=y + 22 * row + (row-1)*4 + h;
	div.style.visibility="visible";
	menu.style.color="#FFFFFF";
}

function Show2(div,menu,e,w)
{	
	if (browser.ns4 || browser.ns6)
	{   
		//div.style.left=window.screen.availWidth/2 + w;
		div.style.left=e.pageX;//318;
		div.style.top=274;
		div.style.visibility="visible";
	}
	else
	{
		var obj = event.srcElement;
 		x = 0;
  		while (obj.offsetParent != null) 
  		{
    		x += obj.offsetLeft;
    		obj = obj.offsetParent;
  		}
  		x += obj.offsetLeft;
		y = 0;
		
		obj = event.srcElement;
		while (obj.offsetParent != null) 
		{
    		y += obj.offsetTop;
    		obj = obj.offsetParent;
  		}
  		y += obj.offsetTop;
  		div.style.left=x-1;
  		div.style.top=y + 24;
	}
	div.style.visibility="visible";
}