// 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 bouncelimit=32 //(must be divisible by 8)
var direction="left"

var largeur = 220; //285;
var hauteur = 220; //227;

function initbox(){
if (!dom&&!ie&&!ns4)
return
var w = largeur/2;
cen=(ie)? document.body.clientWidth/2-w : (dom)?window.innerWidth/2-w  : window.innerWidth/2-w;

crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset;
scroll_top=scroll_top;
crossobj.top=scroll_top-250;
crossobj.width=largeur;
crossobj.left=cen+270;

crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<20+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}


function updateWin(url) {
	updateWindow = window.open(url,'update','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=455,height=570');
 }

function openindex(width,height,theurl) { 
	OpenWindow=window.open(theurl, "newwin", "height="+height+", width=" + width + ",toolbar=no,scrollbars=" + 1 + ",menubar=no,resizable=yes");
self.name="main";
}
		 


function doPopup() {

var info = '<table cellspacing="1"><tr><td><table background="' + GetPromo() + '" width="' + largeur + '" height="' + hauteur + '"><tr><td valign="top" align="right">'
+ '<font size=3><a href="javascript:dismissbox();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'fermer\',\'\',\'images/fermer1.gif\',1)"><img src="images/fermer0.gif" alt="Fermer" name="fermer" width="25" height="25" border="0"></a></font>'
+ '</td></tr></table></td></tr></table>';

if (ie) {
	document.all.dropin.innerHTML = info;
	document.all.dropin.left='200';
  }	
  	else if (ns4) {
		document.layers['dropin'].document.open();
		document.layers['dropin'].document.write(info);
		document.layers['dropin'].document.close();
	}
	else if (dom) {
		document.getElementById('dropin').innerHTML= info;
	}

initbox();
}


