///////////////////////////////////////////////////////////////////
/*Site Logo Script (Geocities Watermark)
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com/ 
Highly Modified Here by jscheuer1 in Dynamic Drive Forums  */
///////////////////////////////////////////////////////////////////

//edit the below 6 steps

// 1) substitute 116 and 42 with the width and height of your logo image, respectively
var logowidth=138
var logoheight=33
var logoimage=new Image(logowidth,logoheight)

// 2) change the image path to reflect the path of your logo image
logoimage.src="float.gif"

// 3) Change url below to the target URL of the logo
var logolink="index.htm"

// 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
var alttext="Flint Community Schools"

// 5) 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. 
var visibleduration=0

// 6) How far down the page must one scroll to start the effect?
var beginLogo=0

// Optional parameters
var Hoffset=10 //Enter logo's offset from right edge of window (edit only if you don't like the default offset)
var Voffset=10 //Enter logo's offset from bottom edge of window (edit only if you don't like the default offset)


///////////////////////////Do not edit below this line/////////////////////////

var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1

var watermark_obj=ie? document.all.watermarklogo : document.getElementById? document.getElementById("watermarklogo") : document.watermarklogo

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function insertimage(){
if (ie||document.getElementById)
watermark_obj.innerHTML='<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>'
else if (document.layers){
watermark_obj.document.write('<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>')
watermark_obj.document.close()
}
}

function positionit(){
var dsocleft=ie? iecompattest().scrollLeft : pageXOffset
var dsoctop=ie? iecompattest().scrollTop : pageYOffset
var window_width=ie? iecompattest().clientWidth : window.innerWidth-20
var window_height=ie? iecompattest().clientHeight : window.innerHeight-20

if (ie||document.getElementById){
watermark_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-logowidth-Hoffset+'px'
watermark_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-logoheight-Voffset+'px'
}
else if (document.layers){
watermark_obj.left=dsocleft+window_width-Hoffset-logowidth
watermark_obj.top=dsoctop+window_height-logoheight-Voffset
}
}

function hidewatermark(){
if (document.layers)
watermark_obj.visibility="hide"
else
watermark_obj.style.visibility="hidden"
clearInterval(watermarkinterval)
}

var i = (ie)? -20 : 0
function slideUp(){
insertimage()
i+=1
var dsocleft=ie? iecompattest().scrollLeft : pageXOffset
var dsoctop=ie? iecompattest().scrollTop : pageYOffset
var window_width=ie? iecompattest().clientWidth : window.innerWidth-20
var window_height=ie? iecompattest().clientHeight : window.innerHeight

if (ie||document.getElementById){
watermark_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-logowidth-Hoffset+'px'
watermark_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-i-Voffset+'px'
}
else if (document.layers){
watermark_obj.left=dsocleft+window_width-Hoffset-logowidth
watermark_obj.top=dsoctop+window_height-i-Voffset
}
var sliding=setTimeout("slideUp()",50)
var logolim = (ie)? logoheight : logoheight+20
if (i==logolim){
clearTimeout(sliding)
beingwatermark()
}
}
var slideChk=0
function slideUpCheck(){
var dsoctop=ie? iecompattest().scrollTop : pageYOffset
if (dsoctop>beginLogo){
if (slideChk==0){
slideChk=1;
slideUp()
clearInterval(initCheck)
}
}
}

function beingwatermark(){
watermarkinterval=setInterval("positionit()",50)
if (visibleduration!=0)
setTimeout("hidewatermark()",visibleduration*1000)
}
var initCheck
if (ie||document.getElementById||document.layers)
window.onload=function (){var initCheck=setInterval("slideUpCheck()",50)}

