﻿var numdiv=0;
var numdivtwo=0;
function SwitchPicComing()
	{
		document.getElementById("ComingImg").src="/blue_images/index_coming1.gif";
		document.getElementById("Newpic").src="/blue_images/index_new1.gif";
		document.getElementById("NewDiv").style.display="none";
		document.getElementById("CominTable").style.display="block";
		document.getElementById("ComingLin").style.display="";	
	}
	function SwitchPicNew()
	{
		document.getElementById("ComingImg").src="/blue_images/index_coming2.gif";
		document.getElementById("Newpic").src="/blue_images/index_new2.gif";
		document.getElementById("CominTable").style.display="none";
		document.getElementById("NewDiv").style.display="block";
		document.getElementById("ComingLin").style.display="none";						
								
	}
	function getTop(e)
	{
		var offset = e.offsetTop;
		if (e.offsetParent != null)
		{
			offset += getTop(e.offsetParent);
		}
		return offset;
	}
	function getLeft(e)
	{
		var offset = e.offsetLeft;
		if (e.offsetParent != null)
		{
			offset += getLeft(e.offsetParent);
		}
		return offset;
	}
	function MouseClicks(ev)
		{
			if(ev.pageX || ev.pageY)
			{
				return {x:ev.pageX,y:ev.pageY};	
			}return {x:ev.clientX+document.body.scrollLeft-document.body.clientLeft,y:ev.clientY+document.body.scrollTop-document.body.clientTop};

		}
		
	function CloseCOmingDic()
	{
		document.getElementById("ComingSoonDiv").style.display="none";
	}
	function DisplayComDic(obj,num)
	{
		var NowDivNames=num+"com";
		var UpDivNames=numdiv+"com";
		var x =getLeft(obj) + 135;
		var y =getTop(obj);
		document.getElementById("ComingSoonDiv").style.display="";
		document.getElementById("ComingSoonDiv").style.left=x + "px";
		document.getElementById("ComingSoonDiv").style.top=y + "px";		
		
		if(numdiv != 0)
		{
			document.getElementById(UpDivNames).style.display="none";
			document.getElementById(NowDivNames).style.display="";
			numdiv=num;	
		}else
		{
			document.getElementById(NowDivNames).style.display="";
			numdiv=num;
		}	
	}		
	function DisAllComSoon(obj,num)
	{
		var NowDivName=num+"comsoon";
		var UpDivName=numdivtwo+"comsoon";
		var x =getLeft(obj) + 285;
		var y =getTop(obj);
		document.getElementById("ShowDivCom").style.display="";
		document.getElementById("ShowDivCom").style.left=x + "px";
		document.getElementById("ShowDivCom").style.top=y + "px";		
		
		if(numdivtwo != 0)
		{
			document.getElementById(UpDivName).style.display="none";
			document.getElementById(NowDivName).style.display="";
			numdivtwo=num;	
		}else
		{
			document.getElementById(NowDivName).style.display="";
			numdivtwo=num;
		}	
	}
	function CloseCOmingDicTwo()
	{
		document.getElementById("ShowDivCom").style.display="none";
	}

