function winload()
{
layer1.style.top=200;
layer1.style.left=6;
layer2.style.top=200;
layer2.style.right=6;
}

if(document.body.offsetWidth>800){	
	{
	document.write("<DIV id=layer1 style='Z-INDEX: 10; LEFT: 6px; POSITION: absolute; TOP: 105px; width: 105; height: 80px;'><img src='images/close1.gif' onClick='javascript:window.hide()' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'><a href='http://www.hinye.com/bj/index.htm' target='_blank'><img src='images/zb.jpg' width='107' height='231' border='0'></a></DIV>" 
	+"<DIV id=layer2 style='Z-INDEX: 10; LEFT: 896px; POSITION: absolute; TOP: 105px; width: 105; height: 80px;'><img src='images/close1.gif' onClick='javascript:window.hide()' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'><a href='http://www.hinye.com/bj/index.htm' target='_blank'><img src='images/zb.jpg' width='107' height='231' border='0'></a></DIV>");
	}
  winload()
}

//flash格式调用方法
//<EMBED src='flash.swf' quality=high  WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=ad wmode=opaque></EMBED>


lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.layer1.style.pixelTop+=percent;
document.all.layer2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()  
{   
layer1.style.visibility="hidden"; 
layer2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);
