// JavaScript Document
function OuvrirPopupSB(URL, Nom, W, H) {
  var top, left, height, width;
  width = Math.min(W, screen.availWidth-25);
  height = Math.min(H, screen.availHeight-50);
  top = (screen.availHeight-25 - height)/2;
  left = (screen.availWidth-10 - width)/2;
  Fenetre = window.open(URL,Nom,'location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenx=' + left + ',screeny=' + top);
  Fenetre.focus();
}

function OuvrirPopupSBTF(URL, Nom, W, H) {
  var top, left, height, width;
  width = W;
  height = H;
  top = 50;
  left = 50;
  Fenetre = window.open(URL,Nom,'location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenx=' + left + ',screeny=' + top);
  Fenetre.focus();
}

function PopUnder() {
  var top, left, height, width, URL, Nom;
  width = 600;
  height = 400;
  top = (screen.availHeight-25 - height)/2;
  left = (screen.availWidth-10 - width)/2;
  URL = 'http://www.uniti.fr/mailing/042004/informatique/popup.html';
  Nom = 'Offre';
  pu = window.open(URL,Nom,'location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenx=' + left + ',screeny=' + top);
  pu.blur();
  window.focus();
}

function PopUp(evt,currElem){
  var dom = (document.getElementById) ? true : false;
  var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
  var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
  var ns4 = (document.layers && !dom) ? true : false;
  var ie4 = (document.all && !dom) ? true : false;
  var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false; 
  if (ie4 || ie5) {
    docObj = "document.all."
    styleObj = ".style"
  }
  else {
    docObj = "document."
    styleObj = ""
  }
  popUpWin = eval(docObj + currElem + styleObj)
  if (ie4 || ie5){
    sc=document.body.scrollTop;
    popUpWin.top = parseInt(evt.y)+2+sc
    popUpWin.left = Math.max(2,parseInt(evt.x)+10)
  }
  else {
    popUpWin.top = parseInt(evt.pageY)+2
    popUpWin.left = Math.max(2,parseInt(evt.pageX)+10)
  }
  popUpWin.visibility = "visible"
  window.status = ""
}

function PopDown(currElem){
  popUpWin = eval(docObj + currElem + styleObj)
  popUpWin.visibility = "hidden"
}