lastScrollY = 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*/}
//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("leftDiv").style.top = parseInt(document.getElementById("leftDiv").style.top)+percent+"px";
document.getElementById("rightDiv").style.top = parseInt(document.getElementById("rightDiv").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
//下面这段删除后，对联将不跟随屏幕而移动。
window.setInterval("heartBeat()",1);
//-->
//关闭按钮
function close_left1(){
    left1.style.visibility='hidden';
}
function close_right1(){
    right1.style.visibility='hidden';
}
//显示样式
document.writeln("<style type=\"text\/css\">");
document.writeln("#leftDiv,#rightDiv{width:80px;height:160px;position:absolute;}");
document.writeln(".itemFloat{width:auto;height:auto;}");
document.writeln(".itemRightFloat{width:100px;height:auto;}");
document.writeln("<\/style>");
//以下为主要内容
document.writeln("<div id=\"leftDiv\" style=\"top:145px;left:1px;z-index:999;\">");
//------左侧各块开始
//---L1
document.writeln("<div id=\"left1\" class=\"itemFloat\">");
document.writeln("<div><a href=\""+webSite+"\"><img src=\""+adCpic+"\" width=\"120\" /><\/a><br/><DIV class=close onclick=\"javascript:close_left1();\" style=\"FONT-SIZE: 12px; BACKGROUND: #ccc; CURSOR: pointer; LINE-HEIGHT: 16px; TEXT-ALIGN: center; width:120px;\"><FONT color=#666666>关闭</FONT></DIV><\/div>");
document.writeln("<\/div>");
//------左侧各块结束
document.writeln("<\/div>");

document.writeln("<div id=\"rightDiv\" style=\"top:145px;right:20px;z-index:999;\">");
//------右侧各块结束
//---R1
document.writeln("<div id=\"right1\" class=\"itemRightFloat\">");
document.writeln("<table width=\"100\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("  <tr>");
document.writeln("    <td height=\"21\" style=\"background:url(images\/top.gif);\"><div style=\"float:right; padding-right:4px;\"><img style=\"cursor:pointer;\" onclick=\"javascript:close_right1();\" src=\"images\/close.gif\" \/><\/div><\/td>   ");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td height=\"2\"><\/td>   ");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td><img src=\"images\/top-aa.gif\" \/><\/td>   ");
document.writeln("  <\/tr>");
document.writeln("  <tr><td><img src=\"images\/qq-top.gif\" \/><\/td><\/tr>");
document.writeln("  <tr><td style=\"background:url(images\/qq-bg.gif); font-size:12px; text-align:center;\">400-633-0533<\/td><\/tr>");
document.writeln("  <tr><td><img src=\"images\/qq-line.gif\" \/><\/td><\/tr>");
document.writeln("  <tr><td style=\"background:url(images\/qq-bg.gif);text-align:center;\">");

//输出QQ
if(QQ!="")
{
   for(var i = 0 ; i < QQ.split('|').length;i++)
   {
	  if(QQ.split('|')[i].toString().Trim()!="")
	  {
         document.writeln("      <div style=\"padding:3px 0 3px 0;\"><a href=' tencent://message/?uin="+QQ.split('|')[i].toString().Trim()+"&Site=www.mytianxi.com&Menu=yes'><img src=\"images\/qq-1.gif\" \/></a><\/div>");
	  }
   }
}

document.writeln("      <div style=\"height:10px;\"><\/div>");
document.writeln("  <\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr><td><img src=\"images\/bottom.gif\" \/><\/td><\/tr>");
document.writeln("<\/table>");
document.writeln("<\/div>");

document.writeln("<\/div>");
