// JavaScript Document
var GW_DL_OBJ=0;
var GW_DL_TOP=0;
var GW_DL_SD=20;//必须大于2，数值越大移动跨度越小
var GW_DL_w=0;
var GW_DL_bw=0;
function gw_create_DL(w,h,bw,pic,url,t){
	GW_DL_bw=bw;
	GW_DL_w=w;
	if(t==1||t==3){
		document.write('<div id=GW_DL_1 style="position:absolute;left:0px;top:0px;width:'+w+'px;height:'+h+'px"><a target=_blank href=http://xz.118100.cn/user/querytonebytype.do?pagenumber=0&spid=8862><img src=/08_gg/20080909_duilian_left.gif border=0 width='+w+' height='+h+'></a></div>')
	}
	if(t==2||t==3){
		document.write('<div id=GW_DL_2 style="position:absolute;left:'+(document.body.clientWidth-w)+'px;top:0px;width:'+w+'px;height:'+h+'px"><a target=_blank href=http://mobile.tibetwindow.com/><img src=/08_gg/20080909_duilian_right.gif border=0 width='+w+' height='+h+'></a></div>')
	}
	GW_DL_OBJ=t
	setInterval('gw_DL_play()',10);
}

function gw_DL_play(){
	if(document.body.clientWidth<(GW_DL_w*2+GW_DL_bw)){
		if(GW_DL_OBJ==1||GW_DL_OBJ==3){
			document.all("GW_DL_1").style.display="none";
		}
		if(GW_DL_OBJ==2||GW_DL_OBJ==3){
			document.all("GW_DL_2").style.display="none";
		}	
	}else{
		GW_DL_TOP=GW_DL_TOP+(document.body.scrollTop-GW_DL_TOP)/GW_DL_SD;
		if(GW_DL_OBJ==1||GW_DL_OBJ==3){
			document.all("GW_DL_1").style.top=GW_DL_TOP+"px";
			document.all("GW_DL_1").style.left=((document.body.clientWidth-GW_DL_bw)/2-GW_DL_w)+"px";
			document.all("GW_DL_1").style.display="";
		}
		if(GW_DL_OBJ==2||GW_DL_OBJ==3){
			document.all("GW_DL_2").style.top=GW_DL_TOP+"px";
			document.all("GW_DL_2").style.left=((document.body.clientWidth-GW_DL_bw)/2+GW_DL_bw)+"px";
			document.all("GW_DL_2").style.display="";
		}
	}
}


gw_create_DL(100,300,810,'/gg_7cly_20080701.gif','http://mobile.tibetwindow.com/7cly/',3)