<!--
// déplacement et redimension de la page
top.moveTo(0, 0);

var w = screen.availWidth;
var h = screen.availHeight;
top.resizeTo(w, h);

var atmsn_width;
var atmsn_height;
var atmsn_delay_max;
var atmsn_delay;
var bdy_height;
var bdy_width;
var atmsn_margin;
var atmsn_left;
var atmsn_top;
var shw_timeout;


function wri_atmsn() {
  document.write('<div id="atmsn_div_0" style="position:absolute; width:0px; height:0px; top:0px; left:0px; z-index:248;">');
  document.write('  <div id="atmsn_div_1" style="position:absolute; width:250px; height:232px; overflow:hidden; z-index:249;">');
  document.write('    <div id="atmsn_div_2" style="position:absolute; width:250px; height:232px; left:0px; z-index:250;">');
  document.write('      <iframe id="atmsn_ifr" src="http://www.atomic-media.com/plus/promo/iframe.php" width="250" height="232" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" allowtransparency="true"></iframe>');
  document.write('    </div>');
  document.write('  </div>');
  document.write('</div>');
  document.write('<div id="atmsn_div_3" style="position:absolute; width:0px; height:0px; left:100%; top:100%; overflow:hidden;"></div>');
}

function ini_atmsn() {
  // INITIALISATION VARIABLES
  atmsn_width     = 250; // largeur popup
  atmsn_height    = 232; // hauteur popup
  atmsn_delay_max = 140; // délai avant apparition
  atmsn_delay     = atmsn_delay_max;

  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 F5_POP_DIV_3
  if ( document.getElementById('atmsn_div_3').offsetTop ) {
   if ( document.getElementById('atmsn_div_3').offsetTop > 0 && document.getElementById('atmsn_div_3').offsetTop < 2000 ) {
      bdy_height = document.getElementById('atmsn_div_3').offsetTop;
      bdy_width  = document.getElementById('atmsn_div_3').offsetLeft;
    }
  }

  // POSITION DE F5_POP_DIV_1
  if ( navigator.appName == "Microsoft Internet Explorer" ) { atmsn_margin = 5; } else { atmsn_margin = 20; } // 20
  atmsn_left = bdy_width  - atmsn_width  - atmsn_margin;
  atmsn_top  = bdy_height - atmsn_height - 4;

  document.getElementById('atmsn_div_1').style.left = atmsn_left + "px";
  document.getElementById('atmsn_div_1').style.top  = atmsn_top  + "px";
}

function shw_atmsn() {
  if ( document.getElementById('atmsn_div_1').style.visibility == "hidden" ) {
    document.getElementById('atmsn_div_1').style.visibility = "visible";
  }

  if ( atmsn_delay > 0 ) {
    atmsn_delay = atmsn_delay - 1;
    document.getElementById('atmsn_div_2').style.top = atmsn_delay + "px";
    shw_timeout = window.setTimeout('shw_atmsn()', 10);
  } else {
    window.clearTimeout(shw_timeout);
    hid_again();
  }
}

function hid_atmsn() { // 
  if ( atmsn_delay < atmsn_delay_max ) {
    atmsn_delay = atmsn_delay + 1;
    document.getElementById('atmsn_div_2').style.top = atmsn_delay + "px";
    hid_timeout = window.setTimeout('hid_atmsn()', 10);
  } else {
    window.clearTimeout(hid_timeout);
    shw_again();


    document.getElementById('atmsn_ifr').src = "http://www.atomic-media.com/plus/promo/iframe.php";
    document.getElementById('atmsn_div_1').style.visibility = "hidden";
  }
}

function mov_atmsn() { // déplace la popup lorsque l'on scroll
  bdy_st = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
  document.getElementById("atmsn_div_0").style.left = document.body.scrollLeft + "px";
  document.getElementById("atmsn_div_0").style.top  = bdy_st + "px";
  mov_timeout = window.setTimeout('mov_atmsn()', 10);
}

nbr_appar = 0;
tps_appar = 20;
tps_repet = 5;

i = 1;
function shw_again() {
  shw_again_timeout = window.setTimeout('shw_atmsn()', tps_repet * 1000); // temps entre chaque apparition
}

j = 1;
function hid_again() {
  hid_again_timeout = window.setTimeout('hid_atmsn()', tps_appar * 1000); // temps visible à l'écran
}

function lod_atmsn() {
  wri_atmsn();
  ini_atmsn();
  shw_atmsn();
  mov_atmsn();
}

lod_atmsn();
-->

