// 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"

function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj = (dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin;
scroll_bottom = (ie)? truebody().scrollTop : window.pageYOffset;
crossobj.bottom = screen.height - (screen.height + 240) + scroll_bottom + calunits; // changer le chiffre pour caler la box - ici 240 pour une box de hauteur 120
crossobj.visibility = (dom||ie)? "visible" : "show";
dropstart = setInterval("dropin()", 50);
}

function dropin(){
scroll_bottom = (ie)? truebody().scrollTop : window.pageYOffset;
if (parseInt(crossobj.bottom) < scroll_bottom){
if (scroll_bottom == 0)
	{
	blink_title(1); // on modifie la balise <title>
	crossobj.bottom = parseInt(crossobj.bottom) + 40 + calunits; // apparition de la box
	if (!ie)
	setTimeout("movebox()", 8000); // on ferme la box au bout de 8 secondes
	if (ie)
	setTimeout("dismissbox()", 8000); // on ferme la box au bout de 8 secondes
	}
else if (scroll_bottom > 0)
	{
	blink_title(1); // on modifie la balise <title>
	crossobj.bottom =  0 + calunits; // apparition de la box
	if (!ie)
	setTimeout("movebox()", 8000); // on ferme la box au bout de 8 secondes
	if (ie)
	setTimeout("dismissbox()", 8000); // on ferme la box au bout de 8 secondes
	}
else
	{
	clearInterval(dropstart)
	}
}
}

function movebox(){ // disparition de la box
new Effect.Fade(document.getElementById('dropin'));
}

function dismissbox(){ // fermeture de la box
if (window.bouncestart) clearInterval(bouncestart);
crossobj.visibility="hidden";
}

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