//<!--
// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=40 //(must be divisible by 8)
var direction="up"
var delay=30000  // Approx 30 secs
//var delay=3000  // Approx 3 secs - used for testing


function initadbox(d){
	if(isNaN(d)){
		{d = 30};
	}
	delay = d * 1000;  // d = 1 = one second
	string="pausebeforeshowingad("+delay+");";
	setTimeout(string,delay);
}

function pausebeforeshowingad(delay){
//alert("Ok "+delay/1000+" seconds have elapsed");
	initadbox2();
}

function initadbox2(){
		
	if(!dom&&!ie&&!ns4)
	return
	
	crossobj=(dom)?document.getElementById("dropad").style : ie? document.all.dropad : document.dropad;
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset;
	crossobj.top=scroll_top-250+calunits;
	crossobj.visibility=(dom||ie)? "visible" : "show";
	dropstart=setInterval("dropad()",50);
}

function dropad(){

	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset;

	if(parseInt(crossobj.top)<100+scroll_top){
		crossobj.top=parseInt(crossobj.top)+40+calunits;
	}else{
		clearInterval(dropstart);
		bouncestart=setInterval("bounceinad()",50);
	}
}

function bounceinad(){
	
	crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
	
	if(bouncelimit<0){
		bouncelimit+=8;
	}
	bouncelimit=bouncelimit*-1;
	if(bouncelimit==0){
		clearInterval(bouncestart);
	}
}

function dismissad(){
	
	if(window.bouncestart){
		clearInterval(bouncestart);
	}
	crossobj.visibility="hidden";
}

function truebody(){
	
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
	
}

//-->
