FilterAway.js
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:2k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. var lstart=0
  2. var loop=true
  3. var speed=50 
  4. var pr_step=3 
  5. var newspeed=800
  6. var newspeed2=0
  7. function makeObj(obj,nest)
  8. {
  9. nest=(!nest) ? '':'document.'+nest+'.'
  10. this.css=(document.layers) ? eval(nest+'document.'+obj):eval(obj+'.style')
  11. this.scrollHeight=(document.layers) ? 
  12.   this.css.document.height:eval(obj+'.offsetHeight')
  13. this.scrollWidth=(document.layers) ? 
  14.   this.css.document.width:eval(obj+'.offsetWidth')
  15. this.up=goUp
  16. this.obj = obj + "Object"
  17. eval(this.obj + "=this")
  18. return this
  19. }
  20. function goUp(speed)
  21. {
  22. if(parseInt(this.css.top)>-(this.scrollHeight-0))
  23. {
  24. this.css.top=parseInt(this.css.top)-pr_step-1
  25. setTimeout(this.obj+".up("+speed+")",35)
  26. }
  27. else
  28.  {
  29.   if(navigator.appName == "Netscape")
  30. {
  31. tome=setInterval(this.obj+".setClipne()",50)
  32. }
  33. else
  34. {
  35. tome=setInterval('setClipie()',50)
  36. tmp=FilterAwayT.style.clip;
  37. }
  38. }
  39. }
  40. function setClipne()
  41. {
  42. if(temp==0)
  43. {
  44. clearInterval(tome);
  45. document.FilterAwayT.document.FilterAwayF.visibility="hide";
  46. document.FilterAwayT.visibility="hide";
  47. }
  48. }
  49. function setClipie()
  50. {
  51. newspeed=newspeed-pr_step;
  52. newspeed2=newspeed2+pr_step;
  53. temp="rect(0px "+newspeed+"px 600px "+newspeed2+"px)";
  54. this.css.clip=temp;
  55. if(newspeed<newspeed2)
  56. {
  57.   clearInterval(tome);
  58.   FilterAwayF.style.display="none"
  59.   FilterAwayT.style.display="none"
  60.   }
  61. }
  62. function slideInit()
  63. {
  64. oSlide=makeObj('FilterAwayF','FilterAwayT')
  65. oSlide.css.top=lstart
  66. oSlide.up(speed)
  67. }
  68. function myload()
  69. {
  70. setTimeout("slideInit()",4000);
  71. }
  72. myload();