﻿ //<![CDATA[
   var adLeftSrc = "images/floatimg/xn.jpg"//gjlj.jpg"          //浮动在屏幕左边的图片路径
   var adLeftFlash = ""                                                                //浮动在屏幕左边的Flash路径
   var adLeftHref = ""//"subpage.aspx?pti=1&subpid=7&pid=1"                     //如果浮动的是图片则提供连接
   var adLeftWidth = 0                                                         //左边浮动图片宽度
   var adLeftHeight = 0                                                            //左边浮动图片高度
   var adRightSrc = "images/floatimg/xn.jpg"//dq60.jpg"                                                                 //浮动在屏幕右边的图片路径
   var adRightFlash = ""                                                             //按上面依次类推...
   var adRightHref = ""//"default2.aspx?pid=72&pti=12"
   var adRightWidth = 0
   var adRightHeight = 0
   var marginTop =200                                                          //浮动图片或FLASH离顶部的距离
   var marginLeft = 1                                                                //浮动图片或FLASH离左边的距离
   var navUserAgent = navigator.userAgent
   function load(){
if (window.screen.width>800){
    judge();
    move();
}
   }
   function move() {
if (window.screen.width>800){
    judge();
    setTimeout("move();",80)
   }
}
   function judge(){
    
    if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) {
     if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adLeftHeight - marginTop + 'px';}
     if (adRightSrc != "") {
      document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adRightHeight - marginTop + 'px';
      document.getElementById("adRightFloat").style.left = ((document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
     } 
    }
    else{
     if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adLeftHeight - marginTop + 'px';}
     if (adRightSrc != "") {
      document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adRightHeight - marginTop + 'px';
      document.getElementById("adRightFloat").style.left = ((document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
     }
    }
    if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.left = marginLeft + 'px';}
   }
   if (adLeftSrc != "") {
    if (adLeftFlash == "flash") {
     document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";\"><a href=\"" + adLeftHref +"\"><embed src=\"" + adLeftSrc + "\" quality=\"high\"  width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\" type=\"application/x-shockwave-flash\"></embed></a></div>");
    }
    else{
     document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";z-index:1000;\"><a href=\"" + adLeftHref +"\" target=\"_blank\"><img src=\"" + adLeftSrc + "\"  width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\"  border=\"0\" \></a></div>");
    }
   }
   if (adRightSrc != "") {
    if (adRightFlash == "flash") {
     document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";\"><a href=\"" + adRightHref +"\"><embed src=\"" + adRightSrc + "\" quality=\"high\"  width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\" type=\"application/x-shockwave-flash\"></a></embed></div>");
    }
    else{
     document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";z-index:1000;\"><a href=\"" + adRightHref +"\" target=\"_blank\"><img src=\"" + adRightSrc + "\"   width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\"  border=\"0\"  \></a></div>");
    }
}
   if (window.screen.width>800){
   load();
}
   //]]>
