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

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

开发平台:

HTML/CSS

  1. <%sub fixup()%>
  2. <SCRIPT>
  3. var sgImg="<%=txl_ads(6)%>"
  4. var sgWidth="<%=txl_ads(8)%>"
  5. var sgHeight="<%=txl_ads(9)%>"
  6. var sgLink="<%=txl_ads(7)%>"
  7. var sgNS=(document.layers)?true:false
  8. if(sgNS){document.write('<LAYER ID="Corner" WIDTH='+sgWidth+' HEIGHT='+sgHeight+'><A href="'+sgLink+'" target=_blank><IMG src="'+sgImg+'" BORDER=0 WIDTH="'+sgWidth+'" HEIGHT="'+sgHeight+'"></A></LAYER>');}else{document.write('<DIV ID="Corner" STYLE="position:absolute; width:'+sgWidth+'; height:'+sgHeight+'; z-index:9; filter: Alpha(Opacity=70)"><A href="'+sgLink+'" target=_blank><IMG src="'+sgImg+'" BORDER=0 WIDTH="'+sgWidth+'" HEIGHT="'+sgHeight+'"></A></DIV>');}
  9. function StayCorner(){var sgTop;var sgLeft
  10. if(sgNS){sgTop  = pageYOffset+window.innerHeight-document.Corner.document.height-10;sgLeft = pageXOffset+window.innerWidth-document.Corner.document.width-10;document.Corner.top  = sgTop;document.Corner.left = sgLeft;}else{
  11. sgTop  = document.body.scrollTop+document.body.clientHeight-document.all.Corner.offsetHeight-30;sgLeft = document.body.scrollLeft+document.body.clientWidth-document.all.Corner.offsetWidth-5;Corner.style.top  = sgTop;Corner.style.left = sgLeft;}
  12. setTimeout('StayCorner()', 50)}
  13. sgDump = StayCorner()
  14. </SCRIPT>
  15. <%
  16. end sub
  17. sub admove()
  18. %>
  19. <script>
  20. var brOK=false;
  21. var mie=false;
  22. var vmin=2;
  23. var vmax=5;
  24. var vr=3;
  25. var timer1;
  26. var jobads;
  27. function movechip(chipname)
  28. {
  29. if(brOK)
  30. {
  31. eval("chip="+chipname);
  32. if(!mie)
  33. {
  34. pageX=window.pageXOffset;
  35. pageW=window.innerWidth;
  36. pageY=window.pageYOffset;
  37. pageH=window.innerHeight;
  38. else
  39. {
  40. pageX=window.document.body.scrollLeft;
  41. pageW=window.document.body.offsetWidth-8;
  42. pageY=window.document.body.scrollTop;
  43. pageH=window.document.body.offsetHeight;
  44. }
  45. chip.xx=chip.xx+chip.vx;
  46. chip.yy=chip.yy+chip.vy;
  47. chip.vx+=vr*(Math.random()-0.5);
  48. chip.vy+=vr*(Math.random()-0.5);
  49. if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;
  50. if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
  51. if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;
  52. if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;
  53. if(chip.xx<=pageX)
  54. {
  55. chip.xx=pageX;
  56. chip.vx=vmin+vmax*Math.random();
  57. }
  58. if(chip.xx>=pageX+pageW-chip.w)
  59. {
  60. chip.xx=pageX+pageW-chip.w;
  61. chip.vx=-vmin-vmax*Math.random();
  62. }
  63. if(chip.xx>=680)
  64. {
  65. chip.xx=chip.xx-20;
  66. chip.vx=-vmin-vmax*Math.random();
  67. }
  68. if(chip.yy<=pageY)
  69. {
  70. chip.yy=pageY;
  71. chip.vy=vmin+vmax*Math.random();
  72. }
  73. if(chip.yy>=pageY+pageH-chip.h)
  74. {
  75. chip.yy=pageY+pageH-chip.h;
  76. chip.vy=-vmin-vmax*Math.random();
  77. }
  78. if(!mie)
  79. {
  80. eval('document.'+chip.named+'.top ='+chip.yy);
  81. eval('document.'+chip.named+'.left='+chip.xx);
  82. }
  83. else
  84. {
  85. eval('document.all.'+chip.named+'.style.pixelLeft='+chip.xx);
  86. eval('document.all.'+chip.named+'.style.pixelTop ='+chip.yy);
  87. }
  88. chip.timer1=setTimeout("movechip('"+chip.named+"')",80);
  89. }
  90. }
  91. function stopme(chipname)
  92. {
  93. if(brOK)
  94. {
  95. eval("chip="+chipname);
  96. if(chip.timer1!=null)
  97. {
  98. clearTimeout(chip.timer1)
  99. }
  100. }
  101. }
  102. function jobads()
  103. {
  104. if(navigator.appName.indexOf("Internet Explorer")!=-1)
  105. {
  106. if(parseInt(navigator.appVersion.substring(0,1))>=4) brOK=navigator.javaEnabled();mie=true;
  107. }
  108. if(navigator.appName.indexOf("Netscape")!=-1)
  109. {
  110. if(parseInt(navigator.appVersion.substring(0,1))>=4) brOK=navigator.javaEnabled();
  111. }
  112. jobads.named="jobads";
  113. jobads.vx=vmin+vmax*Math.random();
  114. jobads.vy=vmin+vmax*Math.random();
  115. jobads.w=1;
  116. jobads.h=1;
  117. jobads.xx=0;
  118. jobads.yy=0;
  119. jobads.timer1=null;
  120. movechip("jobads");
  121. }
  122. document.write('<div id="jobads" style="height:49px;left:178px;position:absolute;top:1237px;width:70px; z-index:1000">');
  123. document.write('<a href="<%=txl_ads(2)%>" target="_blank" onmouseover=stopme("jobads"); onmouseout=movechip("jobads");>');
  124. document.write('<img src="<%=txl_ads(1)%>" border="0" width="<%=txl_ads(3)%>" height="<%=txl_ads(4)%>"></a></div>');
  125. jobads();
  126. </script>
  127. <%end sub%>