/***********************************************
* Amazon style Drop-in content box- ?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
***********************************************/

var dropspeed=11 //set speed of drop animation (larger=faster)

//Specify display mode. 3 possible values are:
//1) "always"- This makes the fade-in box load each time the page is displayed
//2) "oncepersession"- This uses cookies to display the fade-in box only once per browser session
//3) integer (ie: 5)- Finally, you can specify an integer to display the box randomly via a frequency of 1/integer...
// For example, 2 would display the box about (1/2) 50% of the time the page loads.


///Don't edit beyond here///////////

var ie=document.all
var dom=document.getElementById

function initsearch(){
if (!dom&&!ie)
return

var dropboxleft=0 //set left position of box (in px)
var dropboxtop=0 //set top position of box (in px)


searchboxcover=(dom)?document.getElementById("dropinsearchcover") : document.all.dropinsearchcover
searchbox=(dom)?document.getElementById("dropinsearch"): document.all.dropinsearch
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
searchbox.height=searchbox.offsetHeight
searchboxcover.style.height=parseInt(searchbox.height)+"px"
searchbox.style.top="44px"
//searchbox.style.top="0px"
searchboxcover.style.left=dropboxleft+"px"
searchboxcover.style.top=dropboxtop+"px"
searchboxcover.style.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropinsearch()",50)
}

function dropinsearch(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(searchbox.style.top)>0){
//searchboxcover.style.top=scroll_top+dropboxtop+"px"
searchbox.style.top=parseInt(searchbox.style.top)-dropspeed+"px"
}
else{
clearInterval(dropstart)
searchbox.style.top=0
//setdropstop()
}
}

function setdropstop()
{
	dropstop=setInterval("dropsearchstop()",5000)
}

function cleardropstop()
{
	clearInterval(dropstop);
}

function dropsearchstop()
{
	clearInterval(dropstop);
	dismisssearch();

}

function dismisssearch(){
if (window.dropstart) clearInterval(dropstart)
searchboxcover.style.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


