/***********************************************

* 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

***********************************************/



//Heavily modified by TIMMY timmy@eglobaldesign.com



var dropboxleft=620 //set left position of box (in px)

var dropboxtop3 = (myChannel=="index") ? 118 : 124 //set top position of box (in px)

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



var ie=document.all

var dom=document.getElementById



var dropin_content = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="160" HEIGHT="142" id="dropin" ALIGN=""> <PARAM NAME=movie VALUE="cbt_ad.swf"> <PARAM NAME=quality VALUE="high"> <PARAM NAME="bgcolor" VALUE="#2F3235"> <EMBED src="cbt_ad.swf" quality="high" bgcolor="#2F3235" WIDTH="160" HEIGHT="142" NAME="dropin" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"></EMBED></OBJECT>'   


//<a href="javascript:dismissboxv2();doDemo();">DEMO</a>

//<a href="javascript:dismissboxv2();">CLOSE</a>





function initboxv3(){

	if ( !dom && !ie ) 

		return		
	
	document.getElementById("dropinboxv3").innerHTML = dropin_content

	crossboxcover=(dom)?document.getElementById("dropinboxv2cover") : document.all.dropinboxv2cover

	crossbox=(dom)?document.getElementById("dropinboxv3"): document.all.dropinboxv3

	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

	crossbox.height=crossbox.offsetHeight

	crossboxcover.style.height=parseInt(crossbox.height)+"px"

	crossbox.style.top=crossbox.height*(-1)+"px"

	crossboxcover.style.left=dropboxleft+"px"

	crossboxcover.style.top=dropboxtop3+"px"

	crossboxcover.style.visibility=(dom||ie)? "visible" : "show"

	dropstart=setInterval("dropinv3()",50)

}



function dropinv3(){

	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

	if (parseInt(crossbox.style.top)<0){

		crossboxcover.style.top=scroll_top+dropboxtop3+"px"

		crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"

	}

	else{

		clearInterval(dropstart)

		crossbox.style.top=0

	}

}



function dismissboxv2(){

	if (window.dropstart) clearInterval(dropstart);

		crossboxcover.style.visibility="hidden";

}



function truebody(){

	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}



var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;



function dropin_DoFSCommand(command, args) { 

	var dropinObj = InternetExplorer ? dropin : document.dropin

/*	if(command == "dismissboxv2")

		dismissboxv2()

	if(command == "doDemo")

		doDemo()

*/	alert("running FSCommand " + command)

}



function launchAndClose() {

	dismissboxv2();

	doDemo();

}

