sendnow.inc
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <style type="text/css">
  2. <!--
  3. #sponsorAdDiv {position:absolute; height:1; width:1; top:0; left:0;}
  4. -->
  5. </style>
  6. <SCRIPT LANGUAGE="JavaScript">
  7. adTime=8;
  8. chanceAd=1;
  9. var ns=(document.layers);
  10. var ie=(document.all);
  11. var w3=(document.getElementById && !ie);
  12. adCount=0;
  13. function initAd(){
  14.         if(!ns && !ie && !w3) return;
  15.         if(ie)                adDiv=eval('document.all.sponsorAdDiv.style');
  16.         else if(ns)        adDiv=eval('document.layers["sponsorAdDiv"]');
  17.         else if(w3)        adDiv=eval('document.getElementById("sponsorAdDiv").style');
  18.         randAd=Math.ceil(Math.random()*chanceAd);
  19.         if (ie||w3)
  20.         adDiv.visibility="visible";
  21.         else
  22.         adDiv.visibility ="show";
  23.         if(randAd==1) showAd();
  24. }
  25. function showAd(){
  26. if(adCount<adTime*10){adCount+=1;
  27.         if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
  28.         documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}
  29.         else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
  30.         documentHeight=window.innerHeight/2+window.pageYOffset-20;}
  31.         else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
  32.         documentHeight=self.innerHeight/2+window.pageYOffset-20;}
  33.         adDiv.left=documentWidth-150;adDiv.top =documentHeight-25;
  34.         setTimeout("showAd()",100);}
  35. }
  36. function closeAd(){
  37. if (ie||w3)
  38. adDiv.display="none";
  39. else
  40. adDiv.visibility ="hide";
  41. }
  42. </script>