// JavaScript Document
var hmax = 710-1;//߶
var hmin = 1;//С߶
var bodywidth=	document.body.offsetWidth;
var h=0;
var xpiont=(bodywidth-992)/2;
function addCount(){
	if(h<hmax){
		h += 60;
		setTimeout("addCount()",1); 
	}
	else {
		h=hmax;
		setTimeout("noneAds()",1000); //ͣʱԼʵ 1000 = 1
		//document.getElementById("adsOPEN").style.display = "";
	}
	document.getElementById("ads").style.display = "";
	document.getElementById("ads").style.height = h+"px";

}
window.onload = function showAds(){
	document.getElementById("ads").style.display = "block";
	document.getElementById("ads").style.height = "710px";
	//addCount(2000); //
	h=1; 
	setTimeout("noneAds()",3000); //ͣʱԼʵ 1000 = 1
}
function opc(){
	if(h>hmin){
		h -= 60;
		setTimeout("opc()",1); 
	}
	else {
		h=hmin;
		//setTimeout("noneAds()",10000); //ͣʱԼʵ 1000 = 1
		//document.getElementById("adsOPEN").style.display = "";
		
	}
	document.getElementById("test1").style.display = "";
	document.getElementById("ads").style.display = "";
	document.getElementById("ads").style.marginLeft =h+"px";
	document.getElementById("ads").style.marginTop =-h+"px";

}
function openAds(){
	h = 0;//߶
	opc()
}
function noneAds(){
	if(h<hmax)	{
		h += 60;

		setTimeout("noneAds()",1); 
	}
	else {
		h = hmax;
		document.getElementById("ads").style.display = "none";
		document.getElementById("test1").style.display = "none";
		//document.getElementById("adsOPEN").style.display = "";
		
		return;
	}
	//document.getElementById("ads").style.height = (h-10)+"px";
	//document.getElementById("ads").style.width= h+"px";
	document.getElementById("ads").style.marginLeft =h+"px";
	document.getElementById("ads").style.marginTop =-h+"px";
;}
