
function tab_line_on(what)
{
	what.style.backgroundColor='#D3DCE3';
	what.style.cursor='hand';
}
	
function tab_line_off(what)
{
	what.style.backgroundColor='#FFFFFF';
}

var menu = "";

function ShowHideMenu( ref )
{
var prom;
   if(menu != "")
   	  HideMenu(menu);
   menu = ref;
   prom = myFunc(ref);
   if(prom!=false)
   {
   		if (prom.style.display =='none') 
	   		prom.style.display ='block';
		else
			prom.style.display ='none';
	}
	
}	
function ShowPopUp( ref )
{
   var agent,prom;
   agent = identifyUserAgent();
   prom = myFunc(ref);
   if(prom!=false)
   {
		prom.style.display ='block';
		setPosition(prom,agent);
   }
}

function HidePopUp( ref )
{
	var prom = myFunc(ref);
	if(prom!=false)
    	prom.style.display ='none';
} 

function HideMenu( ref )
{
	var prom = myFunc(ref);
	if(prom!=false)
		prom.style.display ='none';
}

function setPosition( prom , agent )
{
	switch(agent)
	{
		case "msie":
			prom.style.top = '17px';
			prom.style.left= '0px';
			break;
		case "mozilla":
		case "firefox":
			prom.style.top = '17px';
			prom.style.left = '475px';
			break;
		default:
			prom.style.top = '17px';
			prom.style.left= '0px';
	}
}

function myFunc(elemID) {
var obj
if (document.all) {
obj = document.all(elemID)
} else if (document.getElementById) {
obj = document.getElementById(elemID)
} else if (document.layers) {
obj = document.layers[elemID]
}
if (obj) {
return obj;
}
return false;
}

function identifyUserAgent() 
{
	 var ua = navigator.userAgent.toString().toLowerCase();
	//document.write(ua);   
	if(ua.indexOf("msie")!=-1)
    	return "msie";
	if(ua.indexOf("mozilla")!=-1) 
		return "mozilla";
	if(ua.indexOf("firefox")!=-1)
		return "firefox";
	if(ua.indexOf("opera")!=-1)
		return "opera";
	else
		return "msie";
}