function ctZoneShow(n,b){
	if(ctZoneBo&&n!=0){
		if(b){
			for(var i=1;i<7;i++){	
				document.getElementById("bar"+i).style.backgroundPosition=-(i*127-127)+"px 0px";
			}
			document.getElementById("bar"+n).style.backgroundPosition=-(n*127-127)+"px -40px";
		}
		switch(n){
			case 1:
				break;	
			case 2:
				break;	
			case 3:
				break;	
			case 4:
				if(ctZoneSize==1){
					document.getElementById("ctLi4").style.display="block";
					document.getElementById("ctLi6").style.display="none";
				}
				break;	
			case 5:
				break;	
			case 6:
				if(ctZoneSize==1){
					document.getElementById("ctLi4").style.display="none";
					document.getElementById("ctLi6").style.display="block";
				}
				break;	
		}
	}
}
function ctZoneOn(){
	var bodyHeight=document.documentElement.scrollHeight;
	if(isChrome){bodyHeight=document.body.scrollHeight;}
	var showHeight=bodyHeight-document.body.clientHeight;
	if(showHeight<40 ){
		ctZoneSize=0;
		document.getElementById("ctZone").style.visibility="hidden";
	}else {		
		if(showHeight>=116){
			ctZoneSize=1;
			if(ctZoneBo)document.getElementById("ctZoneList").style.visibility="visible";
			document.getElementById("ctZone").style.visibility="visible";
		}else{
			ctZoneSize=2;
			if(ctZoneBo)document.getElementById("ctZoneList").style.visibility="hidden";
			document.getElementById("ctZone").style.visibility="visible";
		}	
	}	
	//document.getElementById("newsList").innerHTML=ctZoneSize+"||"+bodyHeight+"-"+document.body.clientHeight+"="+showHeight+">116 ";	
}
//
function ctZoneInner(){
	var strHtml="";
	strHtml+='<div id="ctShow"><ul id="ctZoneList"><li id="ctLiL">';
	strHtml+='<div id="ctLi1"><a href="http://tree.elive.vnet.cn/" title="翼起来植树 轻松赢话费" target="_blank"><img src="http://www.vnet.cn/tres/Vnet/189/189cn/ad1.gif" width="380" height="68" alt="翼起来植树 轻松赢话费" /></a></div>';
	strHtml+='</li><li id="ctLiR">';
	strHtml+='<div id="ctLi4"><a href="http://ally.118100.cn/XunYan/" title="中国电信“爱音乐·翼起来”全国巡演" target="_blank"><img src="http://www.vnet.cn/tres/Vnet/189/189cn/ad4.png" width="380" height="68" title="中国电信“爱音乐·翼起来”全国巡演" /></a></div>';
	strHtml+='<div id="ctLi6" style="display:none"><a href="http://www.hicdma.com/minisite/" title="三星金爵版W799新春礼包隆重上市" target="_blank"><img src="http://www.vnet.cn/tres/Vnet/189/189cn/ad6.gif" width="380" height="68" alt="三星金爵版W799新春礼包隆重上市" /></a></div>';
	strHtml+='</li></ul></div><div class="bar"><div class="box">';
	
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) no-repeat;"><div id="bar1" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) no-repeat;" onmouseover="ctZoneShow(1,true);"><a href="http://elive.vnet.cn" title="天翼 Live"'+mailBlank;
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -127px 0 no-repeat;"><div id="bar2" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -127px 0 no-repeat;" onmouseover="ctZoneShow(2,true);" style="background-position:-127px 0;"><a href="http://www.vnet.cn" title="互联星空"'+mailBlank;
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -254px 0 no-repeat;"><div id="bar3" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -254px 0 no-repeat;" onmouseover="ctZoneShow(3,true);" style="background-position:-254px 0;"><a href="http://www.189store.com/" title="天翼空间"'+mailBlank;
	strHtml+='<div class="k"></div>';
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -381px 0 no-repeat;"><div id="bar4" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -381px 0 no-repeat;" onmouseover="ctZoneShow(4,true);" style="background-position:-381px 0;"><a href="http://www.118100.cn" title="爱音乐"'+mailBlank;
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -508px 0 no-repeat;"><div id="bar5" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -508px 0 no-repeat;" onmouseover="ctZoneShow(5,true);" style="background-position:-508px 0;"><a href="http://photo.vnet.cn/" title="爱冲印"'+mailBlank;
	strHtml+='<div class="barBg" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -635px 0 no-repeat;"><div id="bar6" class="ico" style="background:url(http://www.vnet.cn/tres/Vnet/189/189cn/ctBar.png) -635px 0 no-repeat;" onmouseover="ctZoneShow(6,true);" style="background-position:-635px 0;"><a href="http://www.hicdma.com/" title="天翼手机终端"'+mailBlank;

strHtml+='</div></div>';
	document.getElementById("ctZone").innerHTML=strHtml;	
	ctZoneBo=true;	
	if(Math.random()>0.5){
		ctZoneShow(4,false);
	}else{
		ctZoneShow(6,false);
	}
	ctZoneOn();
}
//
var ctZoneSize=0;
var mailBlank=" target=\"_blank\"><img src=\"/webmail/jsp/189misc/v5/img/blank.gif\" width=\"127\" height=\"26\" /></a></div></div>";
var ctZoneADImg=[];
var ctZoneADUrl=[];

window.onresize=function(){
	ctZoneOn();
}
window.onload=ctZoneInner;
