//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*/}
//percent=.1*(diffY-lastScrollY); 
//if(percent>0)percent=Math.ceil(percent); 
//else percent=Math.floor(percent); 
//document.getElementById("lovexin12").style.top=parseInt(document.getElementById
//("lovexin12").style.top)+percent+"px";
//document.getElementById("lovexin14").style.top=parseInt(document.getElementById
//("lovexin12").style.top)+percent+"px";
//lastScrollY=lastScrollY+percent; 
//}
//suspendcode12="<DIV id=\"lovexin12\" style='left:70px;POSITION:absolute;TOP:120px;'><img src='images/dl.jpg'; /></div>"
///*suspendcode14="<DIV id=\"lovexin14\" style='right:2px;POSITION:absolute;TOP:120px;'>ad2</div>"*/
//document.write(suspendcode12); 
///*document.write(suspendcode14); */
//window.setInterval("heartBeat()",1);
// JavaScript Document

var showad = 1;        //是否显示广告
var Toppx = 80;            //上端位置
var AdDivW = 100;        //宽度
var AdDivH = 650;        //高度
var PageWidth = 800;    //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 1024;    //显示广告的最小屏幕宽度象素
/*var ClosebuttonHtml = '<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'
//var AdContentHtml = '<input type="button" value="忧郁蓝色" onclick="setStyle("蓝色");" /><br><input type="button" value="狂野之红" onclick="setStyle("红色");" /><br><input type="button" value="自然之绿" onclick="setStyle("绿色");" /><br><input type="button" value="热情之黄" onclick="setStyle("黄色");" />';
*/
document.write ('<div id="Javascript.LeftDiv" style="position: absolute;border: 0px solid #336699;background-color:#ffffff;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;"><div><a href="../ppi_8.html" target="_blank"><img src="images/dl.jpg" width="77" height="492"  border= "0"/></a><p></p><a href="../tg.html" target="_blank"><img src="images/dl2.jpg" width="77" height="122"  border= "0"/></a></div></div>');
document.write ('<div id="Javascript.RightDiv" style="position: absolute;border: 0px solid #336699;background-color:#ffffff;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;"><div><a href="../ppi_8.html" target="_blank"></a><p></p><a href="../zja.html" target="_blank"><img src="images/dl3.jpg" width="140" height="230"  border= "0"/></a></div></div>');
function scall(){
    if(!showad){return;}
    if (window.screen.width<MinScreenW){
        alert("临时提示：\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
        showad = false;
        document.getElementById("Javascript.LeftDiv").style.display="none";
        document.getElementById("Javascript.RightDiv").style.display="none";
        return;
    }
    var Borderpx = 70;
    document.getElementById("Javascript.LeftDiv").style.display="";
    document.getElementById("Javascript.LeftDiv").style.top=(document.documentElement.scrollTop+Toppx)+"px";
    document.getElementById("Javascript.LeftDiv").style.left=(document.documentElement.scrollLeft+Borderpx)+"px";
    document.getElementById("Javascript.RightDiv").style.display="";
    document.getElementById("Javascript.RightDiv").style.top=(document.documentElement.scrollTop+Toppx)+"px";
    document.getElementById("Javascript.RightDiv").style.left=(document.documentElement.scrollLeft+document.documentElement.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx)+"px";
}
function hidead()
{
    showad = false;
    document.getElementById("Javascript.LeftDiv").style.display="none";
    document.getElementById("Javascript.RightDiv").style.display="none";
//
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
