home *** CD-ROM | disk | FTP | other *** search
/ Wisdom of the Bible - Bible Library Master / TOPICS-WisdomOfTheBible-LibraryMaster2-Windows-Disc2.iso / staticlogo4.js < prev    next >
Text File  |  2000-03-16  |  3KB  |  116 lines

  1. ///////////////////////////////////////////////////////////////////
  2. /*Site Logo Script (Geocities Watermark)
  3. Last updated: Dec 14, 1998
  4. ⌐ Dynamic Drive (www.dynamicdrive.com)
  5. For full source code, installation instructions,
  6. 100's more DHTML scripts, and Terms Of
  7. Use, visit dynamicdrive.com*/
  8. ///////////////////////////////////////////////////////////////////
  9.  
  10. //edit the below 6 steps
  11.  
  12. // 1) substitute 116 and 42 with the width and height of your logo image, respectively
  13. if (document.images)
  14. var staticlogo=new Image(59,118)
  15.  
  16. // 2) change the image path to reflect the path of your logo image
  17. staticlogo.src="/images/cross4.gif"
  18.  
  19. // 3) Change url below to the target URL of the logo
  20. var logolink="/library/gospel/salvation4.htm"
  21.  
  22. // 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
  23. var alttext="The Christian Faith"
  24.  
  25. // 5) set below to either "1" or "0" ("1" fades the logo into view) Note: IE 4 specific
  26. var fadeintoview=1
  27.  
  28. /* 6) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you'd like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible. 
  29. */
  30. var visibleduration=30
  31.  
  32.  
  33. ///////////////////////////Do not edit below this line/////////////////////////
  34. function regenerate(){
  35. window.location.reload()
  36. }
  37. function regenerate2(){
  38. if (document.layers)
  39. setTimeout("window.onresize=regenerate",400)
  40. }
  41.  
  42.  
  43. var fadeset=''
  44. if (fadeintoview)
  45. fadeset="filter:alpha(opacity=0)"
  46.  
  47. if (document.all)
  48. document.write('<span id="logo" style="'+fadeset+';position:absolute;top:100;width:'+staticlogo.width+';height:'+staticlogo.height+'"></span>')
  49.  
  50. function bringintoview(){
  51. if (logo.filters.alpha.opacity<=95)
  52. logo.filters.alpha.opacity+=5
  53. else{
  54. clearInterval(viewit)
  55. if (visibleduration!=0)
  56. setTimeout("logo.style.visibility='hidden'",visibleduration*1000)
  57. }
  58. }
  59.  
  60.  
  61. function createlogo(){
  62. staticimage=new Layer(100)
  63. staticimage.left=-300
  64. staticimage.top=120
  65. staticimage.document.write('<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>')
  66. staticimage.document.close()
  67. staticimage.visibility="show"
  68. regenerate2()
  69. staticitns()
  70. }
  71.  
  72. if (document.layers)
  73. window.onload=createlogo;
  74.  
  75. if (document.all){
  76. w=document.body.clientWidth-logo.style.pixelWidth-5
  77. h=document.body.clientHeight-logo.style.pixelHeight-5
  78. logo.style.left=w
  79. logo.style.top=h
  80. }
  81.  
  82. function logoit(){
  83. var w2=document.body.scrollLeft+w
  84. var h2=document.body.scrollTop+h
  85. logo.style.left=w2
  86. logo.style.top=h2
  87. }
  88. function logoit2(){
  89. staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-15
  90. staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height
  91. }
  92.  
  93. function insertimage(){
  94. logo.innerHTML='<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>'
  95. if (fadeintoview)
  96. viewit=setInterval("bringintoview()",100)
  97. else{
  98. if (visibleduration!=0)
  99. setTimeout("logo.style.visibility='hidden'",visibleduration*1000)
  100. }
  101. }
  102.  
  103. if (document.all){
  104. window.onscroll=logoit
  105. window.onresize=new Function("window.location.reload()")
  106. window.onload=insertimage
  107. }
  108.  
  109.  
  110. function staticitns(){
  111. setInterval("logoit2()",90)
  112. if (visibleduration!=0)
  113. setTimeout("staticimage.visibility='hide'",visibleduration*1000)
  114. }
  115.  
  116.