// footer begin //
var _oldObj = ""; 
var state_id=0;
var showTip_state=0;
function showTip(name,obj)
{

	if(showTip_state==1)
	{
		state_id++;
	}
	showTip_state=1;
	var tipdiv = document.getElementById("tipdiv");	
	var xy = getElementXY(obj);
	if(obj != _oldObj)
	{
		tipdiv.style.display = "";
	}
	else
	{
		if(tipdiv.style.display == "")
		{
			tipdiv.style.display = "none";
		}
		else
		{
			tipdiv.style.display = "";
		}
	}
	_oldObj = obj;
	tipdiv.style.left = (xy[0]+10)+"px";
	tipdiv.style.top = xy[1]+"px";
	tipdiv.innerHTML = name;	

	return false;
	
} 

function getElementXY(obj)
{
	var left = 0;
	var top = 0;
	if(obj.x)
	{	
		while(obj.offsetParent)
		{	
			left += obj.offsetLeft;
			top  += obj.offsetTop;
			obj = obj.offsetParent;
		} 
	}else if(obj.offsetParent)
	{	
		while(obj.offsetParent)
		{	
			left += obj.offsetLeft;
			top  += obj.offsetTop;
			obj = obj.offsetParent;
		} 
	}
	return [left,top];
}
// footer end //


//head begin //

var client_state=0;
var showClient_state=0;

function displaySubMenu(li) {

	if(showClient_state==1)
	{
		client_state++;
	}
	showClient_state=1;
	
   var subMenu = li.getElementsByTagName("ul")[0];
   subMenu.style.display = "inline";
}
function hideSubMenu(li) {
  var subMenu = li.getElementsByTagName("ul")[0];
  subMenu.style.display = "none"; 
 }
// head end //      
  
function windowOnclick()
{
	window.document.body.onclick=function hid()
	{	
		var tipdiv = document.getElementById("tipdiv");
		if(tipdiv!=null)
		{
			if(showTip_state==1)
			{
			 state_id++;
			}
			if(state_id%2==0){
				
				if(tipdiv.style.display!="none")
				{
				tipdiv.style.display = "none";	
				}
				showTip_state=0;
			 }	
		}
		
		
		var li=document.getElementById("li_clinet");
		 if(li!=null)
		 {
			if(showClient_state==1)
			{
			 	client_state++;
			}
			if(client_state%2==0){
				hideSubMenu(li);
				showClient_state=0;
			 }
		 }	
	}
}