// JavaScript Document
function MM_findObj(n, d) 
{ //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() 
{ //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function show_date_time()
{
	today = new Date(); 
	
	document.getElementById("ShowTime").innerHTML = "&nbsp;" + today.getYear() + "-" + today.getMonth() + "-" + today.getDate() + " " + today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
	
	window.setTimeout("show_date_time()", 1000);
}




/*  标题显示div效果*/
var index_curDOC = document;
var index_posLeft = 0;
var index_posTop = 0;
var index_tipContainer = "";
var index_mouseOn = 0;
var s_style = "";

function getPosition(eObj)
{
	if(eObj == null)
	{
		eObj = window.event;
	}

	if(index_curDOC.all)
	{
		var bodyObj = index_curDOC.body.parentNode;

		if(index_curDOC.body.parentNode == null || index_curDOC.body.parentNode.clientWidth == 0 || index_curDOC.body.parentNode.clientHeight == index_curDOC.body.parentNode.scrollHeight)
		{
			bodyObj = index_curDOC.body;
		}
		
		if(eObj.clientX/bodyObj.scrollWidth <= 0.5)
		{
			s_style = "left";
			currentMouseX = eObj.clientX+bodyObj.scrollLeft;
		}else 
		{
			s_style = "right";
			currentMouseX =bodyObj.scrollWidth - eObj.clientX;
		}
		currentMouseY = eObj.clientY+bodyObj.scrollTop;		
	}
	else 
	{
		currentMouseX = eObj.pageX;
		currentMouseY = eObj.pageY;
	}

	currentMouseY=currentMouseY-48;
}

function showTime(eObj,divid)
{
	index_mouseOn=1;
	if(index_tipContainer!=""&&index_tipContainer!=document.getElementById(divid))
	{
		index_tipContainer.style.display = 'none';
	}
	index_tipContainer = document.getElementById(divid);

	if(index_tipContainer.style.display == "block")
	{
		return;
	}
	getPosition(eObj);
	setTimeout("showDiv('"+divid+"')",100);
}

function showDiv1(eObj,divid)
{
	index_mouseOn=1;
	if(index_tipContainer!=""&&index_tipContainer!=document.getElementById(divid))
	{
		index_tipContainer.style.display = 'none';
	}
	index_tipContainer = document.getElementById(divid);

	if(index_tipContainer.style.display == "block")
	{
		return;
	}
	getPosition(eObj);
	setTimeout("showDiv('"+divid+"')",100);
}

function showDiv(divid)
{
	if(index_tipContainer!=""&&index_tipContainer!=document.getElementById(divid))
	{
		return;
	}

	if(index_mouseOn==0)
	{
		return;
	}

	index_tipContainer.style.display = "block";
    //index_tipContainer.style.left = currentMouseX+ 10 + "px";;
	//index_tipContainer.style.top = currentMouseY + 60 + "px";
	if(s_style == "left")
	{
    	index_tipContainer.style.left =  currentMouseX+ 1 + "px";;
    }else
    {
    	index_tipContainer.style.right =  currentMouseX+ 1 + "px";;
    }
	index_tipContainer.style.top = currentMouseY + 1 + "px";
}

function hideTime()
{
	index_mouseOn=0;
	setTimeout("hiddiv()",100); 
}

function hiddiv()
{
	if(index_mouseOn==1)
	{
		return;
	}
	index_tipContainer.style.display = "none";
}
