var Marquee=function(elid){
	var maq=document.getElementById(elid);
	var maqDiv2,maqDiv1;
	var td=maq.getElementsByTagName("td");
	for(var i=0;i<td.length;i++){
		if(td[i].className=='maqDiv1')maqDiv1=td[i];
		if(td[i].className=='maqDiv2')maqDiv2=td[i];
	}
	
	maqDiv2.innerHTML = maqDiv1.innerHTML;
	
	var speed=10 //调整滚动速度
	function Marquee1(){ 
		if(maqDiv1.offsetWidth-maq.scrollLeft<=0) 
			maq.scrollLeft-=maqDiv1.offsetWidth 
		else{ 
			maq.scrollLeft++ 
		} 
	}
	var MyMar=setInterval(Marquee1,speed);
	maq.onmouseover=function() {clearInterval(MyMar)} 
	maq.onmouseout=function() {MyMar=setInterval(Marquee1,speed)}
}

//浮动
var layer=function(){
	var lay=document.getElementById('Go2010AW');
	if(lay){
		lay.style.top=document.documentElement.scrollTop+50+'px';
	}
}

//打开模态窗口
function showDialog(dialogUrl){
    var sUrl = dialogUrl;
    var sFeathers = "help:off;resizable:off;scroll:no;status:off";
    //sUrl = sUrl
    window.showModalDialog(sUrl,"",sFeathers);
}

function openUrl(sUrl){
        //模态窗口文件地址
    var dialogUrl = "GoIndex.htm";
	dialogUrl += "?r=" + Math.random()*100000;
    dialogUrl += "&url=" + sUrl;
    showDialog(dialogUrl);
}

var maqmov=function(){
	Marquee('pro_pic');
	window.open('http://2010aw.archmade.com');
}

window.onload=maqmov;
window.onscroll=layer;
window.onresize=layer;