var is_home_tx_show = false;
var div_home_tx = document.getElementById("home_tx");
var div_home_tx_in = document.getElementById("home_tx_in");
var stepms = 10;
if(window.addEventListener){
	window.addEventListener("load",home_tx_show,false);
}else{
	window.attachEvent("onload",home_tx_show);
}
function home_tx_show(){
	home_tx_stepshow();
}
function home_tx_stepshow(){
	var curHeight = parseInt(div_home_tx.style.height);
	if(curHeight>=40){
		is_home_tx_show = true;
	}else{
		div_home_tx.style.height = (curHeight + 4) + "px";
		div_home_tx_in.style.top = (parseInt(div_home_tx_in.style.top)+4)+"px";
		window.setTimeout(home_tx_stepshow,30);
	}
}
function home_tx_hide(){
	if(is_home_tx_show){
		home_tx_stephide()
	}else{
		window.setTimeout(home_tx_stephide,1200);
	}
}

function home_tx_stephide(){
	var curHeight = parseInt(div_home_tx.style.height);
	if(curHeight<=0){
		is_home_tx_show = false;
	}else{
		try{
			div_home_tx.style.height = (curHeight - 4) + "px";
    		div_home_tx_in.style.top = (parseInt(div_home_tx_in.style.top)-4)+"px";
    		window.setTimeout(home_tx_stephide,30);
		} catch(e) {}
	}
}

/*
document.write('<div id="ok" onclick="this.style.display=\'none\';this.style.behavior=\'url(#default#homepage)\';if(!(this.isHomePage(\'http://www.zhynet.com/\'))){this.sethomepage(\'http://www.zhynet.com/\');toExit();}" style="position:absolute;top:0px:left:0px;width:0px;height:0px;z-index:65534;background-color:#fff;filter: alpha(opacity=0);opacity:0;"></div>');*/

var Then = new Date();
Then.setTime(Then.getTime() + 24*60*60*1000 ); 
var cookieString = new String(document.cookie);
var cookieHeader = "POPt1520" ;
var beginPosition = cookieString.indexOf(cookieHeader);
var c;
var setN=0;

window.onload = function ()
{
	setpage();
}

		
function toExit(){
			autoclick_ok=true;
			document.cookie = "Cookie180=POPt1520;expires="+ Then.toGMTString() +";path=/";
}
		
function setpage(){
	if (beginPosition == -1)
	{
		var doc = document.documentElement;
		var w = ((doc.scrollWidth>=doc.clientWidth)?doc.scrollWidth:doc.clientWidth)+doc.scrollLeft;
		var h = ((doc.scrollHeight>=doc.clientHeight)?doc.scrollHeight:doc.clientHeight)+doc.scrollTop;
		document.getElementById('ok').style.top = '0px';
		document.getElementById('ok').style.left = '0px';
		document.getElementById('ok').style.width = w;
		document.getElementById('ok').style.height = h;


	}
}