function echo(str){document.write(str);}
function gID(id){return document.getElementById(id)?document.getElementById(id):false;}

function imgload(){
	function jianbian(){
		var o=gID("loadimg");
		if(o.style.pixelHeight<10){
			window.clearInterval(img_TT);
			o.innerHTML="";
			o.style.display="none";
			if(gID("swfload"))swf_load();
			if(gID("zp_dulian"))duilian('zp_dulian');
		}
		o.style.pixelHeight-=30
		//o.style.pixelWidth-=50
	}
	function imgclose(){
		window.clearInterval(img_TT);
		//hh=gID("loadimg").getElementsByTagName("img")[0].height;
		img_TT=window.setInterval(jianbian,30);

	}
	gID("loadimg").style.display="block";
	var img_TT=window.setInterval(imgclose,"6000");
}

//显示对联
function duilian(id){
	if(!gID(id))return;
	gID(id).style.display="block";
	var y=0;
	var d_l=0;
	var d_w=0;
	var old_w=0;
	function heartBeat(){
		var diffY;
		if (document.documentElement && document.documentElement.scrollTop)
		    diffY = document.documentElement.scrollTop;
		else if (document.body)
		    diffY = document.body.scrollTop
		else
		    {/*Netscape stuff*/}
		percent=.1*(diffY-y);
		if(percent==0 && old_w==document.body.clientWidth)return;	//对联对齐后，退出下面计算
		if(percent>0)percent=Math.ceil(percent);
		else percent=Math.floor(percent);
		var div=document.getElementById(id);
		var hh=parseInt(div.style.top)+percent+"px";
		div.style.top=hh;
		y=y+percent;


		//--居中
		old_w=d_w=document.body.clientWidth;
		if(d_w>1000){
			d_l=(d_w-1000)/2;
			d_w=Math.min(d_w,1000);
		}
		div.style.marginLeft=d_l+"px";
		div.style.width=d_w+"px";
	}
	window.setInterval(heartBeat,20);
}






function jxs_js(o){
	if(o.length>10)window.open(o)
}
//flash关闭
function swf_hidden_div(){
	var a=new swf_load();
	a.c();
}

function swf_load(){
    	this.c=function(){
	   swfclose();
	}

	function swfclose(){
		gID("swfload").style.display="none";
		gID("swfload").innerHTML="";
		window.clearInterval(swf_TT);

	}
	gID("swfload").style.display="block";
	var swf_TT=window.setInterval(swfclose,"6000");
}

function lkss(){
	//炸屏
	echo ('<a id="loadimg" target=_blank href="http://ad.cn.doubleclick.net/clk;214154266;36035870;c?http://www.zzlexus.com/" style="width:770px;height:500px;margin:0 auto;display:none;overflow:hidden;"><img alt="全新雷克萨斯RX350" src="/adimg/leikesasi.jpg" width=770 onload="imgload();" /></a>');
}
function jxs_gundong(){
	var m_t=50;
	var m_o = document.getElementById("gundong");
	var m_html=m_o.getElementsByTagName("nobr")[0]
	var m_l=m_html.offsetWidth;

	m_html.innerHTML+=m_html.innerHTML+m_html.innerHTML
	function runmarquee(){
		if(m_o.scrollLeft-m_l>=0){
			m_o.scrollLeft=1
		}else{
			m_o.scrollLeft++
		}
	}
	var qyfc=setInterval(runmarquee,m_t)
	m_o.onmouseover=function() {clearInterval(qyfc)}
	m_o.onmouseout=function() {qyfc=setInterval(runmarquee,m_t)}
}