<!--
var enjoypop_width;
var enjoypop_height;
var enjoypop_move_max;
var enjoypop_move_min;
var enjoypop_move;
var bdy_height;
var bdy_width;
var enjoypop_margin;
var enjoypop_left;
var enjoypop_top;
var shw_timeout;
var hid_timeout;
var view;
var visible;
var hidden;
var bdy_st;
var mov_timeout;
var shw_again_timeout;
var hid_again_timeout;

// INITIALISATION VARIABLES
enjoypop_width     = 200; // largeur popup
enjoypop_height    = 200; // hauteur popup
enjoypop_move_max = enjoypop_height; // valeur maximal de la propriete top du div 'enjoypop_div_2' (div tout en bas)
enjoypop_move_min = 0;            // valeur minimal de la propriete top du div 'enjoypop_div_2' (div au en haut)
enjoypop_move     = enjoypop_height; // valeur de la propriete top du div 'enjoypop_move' par rapport au conteneur parent

function wri_enjoypop() {
	document.write('<div id="enjoypop_div_0" style="position:absolute; width:0px; height:0px; top:0px; left:0px; z-index:248;">');
	document.write('  <div id="enjoypop_div_1" style="position:absolute; width:' + enjoypop_width + 'px; height:' + enjoypop_height + 'px; overflow:hidden; z-index:249;">');
	document.write('    <div id="enjoypop_div_2" style="position:absolute; width:' + enjoypop_width + 'px; height:' + enjoypop_height + 'px; left:0px; z-index:250;">');
	document.write('      <iframe id="enjoypop_ifr" src="http://cams.dnxlive.com/promo/messenger/iframe.php?ref=r0554&target=1&lang=en&sex=h&skin=3&view=0&visible=10&hidden=10" width="' + enjoypop_width + '" height="' + enjoypop_height + '" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" allowtransparency="true"></iframe>');
	document.write('    </div>');
	document.write('  </div>');
	document.write('</div>');
	document.write('<div id="enjoypop_div_3" style="position:absolute; width:0px; height:0px; left:100%; top:100%; overflow:hidden;"></div>');
}

function ini_enjoypop() {
	if ( window.outerHeight ) { // Mozilla
		bdy_height = window.outerHeight;
		bdy_width  = window.outerWidth;
	} else { // IE
		bdy_height = document.body.clientHeight;
		bdy_width  = document.body.clientWidth;
	}

	if ( document.body.clientHeight ) {
		if ( document.body.clientWidth  < bdy_width  ) { bdy_width  = document.body.clientWidth;  }
		if ( document.body.clientHeight < bdy_height ) { bdy_height = document.body.clientHeight; }
	}

	// POSITION DE ENJOYPOP_DIV_3
	if ( document.getElementById('enjoypop_div_3').offsetTop ) {
	 if ( document.getElementById('enjoypop_div_3').offsetTop > 0 && document.getElementById('enjoypop_div_3').offsetTop < 2000 ) {
			bdy_height = document.getElementById('enjoypop_div_3').offsetTop;
			bdy_width  = document.getElementById('enjoypop_div_3').offsetLeft;
		}
	}

	// POSITION DE ENJOYPOP_DIV_1
	if ( navigator.appName == "Microsoft Internet Explorer" ) { enjoypop_margin = 5; } else { enjoypop_margin = 20; } // 20
	enjoypop_left = bdy_width  - enjoypop_width  - enjoypop_margin;
	enjoypop_top  = bdy_height - enjoypop_height - 4;

	document.getElementById('enjoypop_div_1').style.left = enjoypop_left + "px";
	document.getElementById('enjoypop_div_1').style.top  = enjoypop_top  + "px";
}

function shw_enjoypop() { // affiche progressivement la pub collante
	if ( document.getElementById('enjoypop_div_1').style.visibility == "hidden" ) {
		document.getElementById('enjoypop_div_1').style.visibility = "visible";
	}
	if ( enjoypop_move > enjoypop_move_min ) {
		enjoypop_move = enjoypop_move - 1; // on retranche 1 pixel de 'enjoypop_move'
		document.getElementById('enjoypop_div_2').style.top = enjoypop_move + "px"; // on faire remonter 'enjoypop_div_2' en réduisant la valeur de la propriété top de 'enjoypop_div_2'
		shw_timeout = window.setTimeout('shw_enjoypop()', 10); // la fonction 'shw_enjoypop()' est rappelée toutes les 0,010 secondes soit 100 fois par seconde
	} else {
		window.clearTimeout(shw_timeout);
		hid_again();
	}
}

function hid_enjoypop() { // fait disparaitre progressivement la pub collante
	if ( enjoypop_move < enjoypop_move_max ) {
		enjoypop_move = enjoypop_move + 2; // on incrémente 'enjoypop_move' de 1 pixel
		document.getElementById('enjoypop_div_2').style.top = enjoypop_move + "px"; // on faire descendre 'enjoypop_div_2' en augmentant la valeur de la propriété top de 'enjoypop_div_2'
		hid_timeout = window.setTimeout('hid_enjoypop()', 10); // la fonction 'hid_enjoypop()' est rappelée toutes les 0,010 secondes soit 100 fois par seconde
	} else {
		window.clearTimeout(hid_timeout);
		shw_again();
		document.getElementById('enjoypop_ifr').src = "http://cams.dnxlive.com/promo/messenger/iframe.php?ref=r0554&target=1&lang=en&sex=h&skin=3&view=0&visible=10&hidden=10";
		document.getElementById('enjoypop_div_1').style.visibility = "hidden";
	}
}

function mov_enjoypop() { // déplace la popup lorsque l'on scroll
	bdy_st = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
	document.getElementById("enjoypop_div_0").style.left = document.body.scrollLeft + "px";
	document.getElementById("enjoypop_div_0").style.top  = bdy_st + "px";
	mov_timeout = window.setTimeout('mov_enjoypop()', 10);
}

view = 0;
visible = 10;
hidden = 10;

var i = 1;
function shw_again() {
	ini_enjoypop();
	shw_again_timeout = window.setTimeout('shw_enjoypop()', hidden * 1000); // temps entre chaque apparition
}

var j = 1;
function hid_again() {
	hid_again_timeout = window.setTimeout('hid_enjoypop()', visible * 1000); // temps visible à l'écran
}

function lod_enjoypop() {
	wri_enjoypop();
	ini_enjoypop();
	shw_enjoypop();
	mov_enjoypop();
}

lod_enjoypop();
//-->
