
 suspendcode="<DIV id=lovexin1 style='Z-INDEX: 10; LEFT: 6px; POSITION: absolute; TOP: 105px; width: 100; height: 300px;'><img src='images/close.gif'onClick='javascript:hidelove1()' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'><br><div id=imm1 style='display:'';'><a href='http://www.gmtrip.com/food/ftd-39.htm' target='_blank'><img src='images/111.jpg' alt='海南旅游 哥妹旅行网 ' width='100' height='300' border='0'></a></div><div id=imm2 style='display:none;'><a href='/zhuanji/siyue/' target='_blank'><img src='images/11.jpg' width='100' height='300' border='0'></a></div></DIV>"
document.write(suspendcode);

suspendcode="<DIV id=lovexin2 style='Z-INDEX: 10; right:6px; POSITION: absolute; TOP: 105px; width: 100; height: 300px;'><img src='images/close.gif' onClick='javascript:hidelove2()' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'><br><div id=im1><a href='http://www.yelinyinghua.com/t/8yue' target='_blank'><img src='images/yalongwanbbq.jpg' alt='海南旅游 三亚婚纱  婚纱套餐' width='100' height='300' border='0'></a></div><div id=im2 style='display:none;'><a href='/zhuanji/siyue' target='_blank'><img src='images/yalongwanbbq.jpg' width='100' height='300' border='0'></a></div></DIV>"
document.write(suspendcode);

function hidelove1()
{
	document.getElementById("lovexin1").style.display='none';
}
function hidelove2()
{
	document.getElementById("lovexin2").style.display='none';
}

//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.lovexin1.style.pixelTop+=percent;
//document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()  
{   
lovexin1.style.visibility="hidden"; 
lovexin2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);

function nextad()
{
 //alert(document.getElementById('imm1').style.display);
  if((document.getElementById('imm1').style.display!='none' || document.getElementById('imm1').style.display=='')&& document.getElementById('imm2').style.display=='none')
   { //alert('t1');
      document.getElementById('imm1').style.display='none';
      document.getElementById('imm2').style.display='block';
    }
   else if(document.getElementById('imm1').style.display=='none' && document.getElementById('imm2').style.display!='none')
   {
	  // alert('t2');
      document.getElementById('imm1').style.display='block';
      document.getElementById('imm2').style.display='none';
    }

}
function nextad1()
{
 //alert(document.getElementById('imm1').style.display);
  if((document.getElementById('im1').style.display!='none' || document.getElementById('im1').style.display=='')&& document.getElementById('im2').style.display=='none')
   { //alert('t1');
      document.getElementById('im1').style.display='none';
      document.getElementById('im2').style.display='block';
    }
   else if(document.getElementById('im1').style.display=='none' && document.getElementById('im2').style.display!='none')
   {
	  // alert('t2');
      document.getElementById('im1').style.display='block';
      document.getElementById('im2').style.display='none';
    }

}
 //window.setInterval("nextad()",4000);
 // window.setInterval("nextad1()",4000);

 //theTimer=setTimeout("nextAd()",3000);
