/***********************************************
* Sticky Note script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Go to http://www.dynamicdrive.com/ for full source code
***********************************************/

function showfadebox(){
var ie=document.all && !window.opera
var dom=document.getElementById
iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
objref=(dom)? document.getElementById("fadeinbox") : document.all.fadeinbox
var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset
var docwidth=(ie)? iebody.clientWidth : window.innerWidth
docheight=(ie)? iebody.clientHeight: window.innerHeight
docwidth=750+24*2 // center box on displayed image
var objwidth=objref.offsetWidth
objheight=objref.offsetHeight
objref.style.left=docwidth/2-objwidth/2+"px"
objref.style.top=scroll_top+docheight/2-objheight/2+"px"

if (objref.filters){
	objref.filters[0].duration=1 //fade in duration for IE, in seconds
	objref.filters[0].Apply()
	objref.filters[0].Play()
	}

objref.style.visibility="visible"

if (objref.style.MozOpacity)
	mozfadevar=setInterval("mozfadefx()", 90)
}

function mozfadefx(){
if (parseFloat(objref.style.MozOpacity)<1)
	objref.style.MozOpacity=parseFloat(objref.style.MozOpacity)+0.05
		//fade in degree for NS6+ (number between 0 and 1. Recommended max: 0.2)
else
	clearInterval(mozfadevar)
}

function hidefadebox(){
objref.style.visibility="hidden"
if (typeof showonscrollvar!="undefined")
	clearInterval(showonscrollvar)
}

function initfunction(){
setTimeout("showfadebox()", 1000)	//delay before box shown (ms)
setTimeout("hidefadebox()", 19000)	//delay before box cleared (ms)
}

if (window.addEventListener)
	window.addEventListener("load", initfunction, false)
else if (window.attachEvent)
	window.attachEvent("onload", initfunction)
else if (document.getElementById)
	window.onload=initfunction
