isMSIE=(document.all && document.all.item)?true:false;

document.writeln('<style>');
if (isMSIE)
	{
	document.writeln('.menu_item{display:inline-block;background-color: #FFFFFF;color: #000000;padding: 2px 35px 3px 10px;cursor:pointer;}');
	document.writeln('.menu_item_over{display:inline-block;background-color: #CCCCCC;color: #CC0000;padding: 2px 35px 3px 10px;cursor:pointer;}');
	}
else
	{
	document.writeln('.menu_item{display:block;background-color: #FFFFFF;color: #000000;padding: 2px 35px 3px 10px;cursor:pointer;}');
	document.writeln('.menu_item_over{display:block;background-color: #CCCCCC;color: #CC0000;padding: 2px 35px 3px 10px;cursor:pointer;}');
	}
document.writeln('</style>');

function showMenu(status,imgname,menu)
{
var x=findPosX(eval("document.getElementById('" + imgname + "')"));
var y=findPosY(eval("document.getElementById('" + imgname + "')"));
var img_height=document.getElementById(imgname).height;
document.getElementById(menu).style.visibility='visible';
document.getElementById(menu).style.top=y+img_height;
document.getElementById(menu).style.left=x;
if (status == 'on')
	{
	document.getElementById(imgname).src='images/'+menu+'_over.gif';
	}
else
	{
	document.getElementById(imgname).src='images/'+menu+'_off.gif';
	}
}

function hideMenu(imgname,menu)
{
document.getElementById(menu).style.visibility='hidden';
document.getElementById(imgname).src='images/'+menu+'.gif';
}

function findPosX(obj)
{
	var curleft = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curleft += obj.x;
	return curleft;
}


function findPosY(obj)
{
	var curtop = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curtop += obj.y;
	return curtop;
}

function menuMouseOver(obj)
{
document.getElementById(obj).className='menu_item_over';
}

function menuMouseOut(obj)
{
document.getElementById(obj).className='menu_item';
}