
var i=0;
var j=0;
function resize()
{
  if (navigator.appName == 'Netscape')
  {
	  i=8;
  }
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
	  i=-5;
  }
  if (document.images[0]) {
  imgHeight = document.images[0].height+273+i;
  imgWidth = document.images[0].width+105;
  var height = screen.height;
  var width = screen.width;
  var leftpos = width / 2 - imgWidth / 2;
  var toppos = height / 2 - imgHeight / 2; 
  window.moveTo(leftpos, toppos);  
  window.resizeTo(imgWidth, imgHeight);
  }
  self.focus();
}
function popupWindow2(url) 
{
var ns4 = (document.layers)? true:false;    //NS 4 
var ie4 = (document.all)? true:false;   //IE 4 
var dom = (document.getElementById)? true:false;   //DOM 
var xMax, yMax, xOffset, yOffset, MyWidth, MyHeight;   

    if (ie4 || dom)
        {
        xMax = screen.width;
        yMax = screen.height;
        }
    else if (ns4)
        {
        xMax = window.outerWidth;
        yMax = window.outerHeight;
        }
    else
        {
        xMax = 800;
        yMax = 600;
        }
		MyWidth=100;
		MyHeight=100;
    xOffset = (xMax - MyWidth)/2;
    yOffset = (yMax - MyHeight)/2;
	//alert(MyFile);
   window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=yes,copyhistory=no width='+ MyWidth +',height='+ MyHeight +',screenX='+xOffset +',screenY='+yOffset +',top='+yOffset +',left='+xOffset );
   
}
//
//ajouter dans la page: <script language="javaScript" src="../script/popup.js">
//verifier le chemin du script
//
//MyFile :   nom du fichier contenant le code HTML du pop-up 
//MyWindow :   nom de la fenêtre (ne pas mettre d'espace) 
//MyWidth :   entier indiquant la largeur de la fenêtre en pixels 
//MyHeight :   entier indiquant la hauteur de la fenêtre en pixels 
//
//exemple 
//javascript:openpopup('comment_lecteur.htm', 'pop' ,600,450)
//
function openpopup(MyFile,MyWindow,MyWidth,MyHeight)
{    

var ns4 = (document.layers)? true:false;    //NS 4 
var ie4 = (document.all)? true:false;   //IE 4 
var dom = (document.getElementById)? true:false;   //DOM 
var xMax, yMax, xOffset, yOffset;   

    if (ie4 || dom)
        {
        xMax = screen.width;
        yMax = screen.height;
        }
    else if (ns4)
        {
        xMax = window.outerWidth;
        yMax = window.outerHeight;
        }
    else
        {
        xMax = 800;
        yMax = 600;
        }
    xOffset = (xMax - MyWidth)/2;
    yOffset = (yMax - MyHeight)/2;
	//alert(MyFile);
   window.open(MyFile,MyWindow,'width='+MyWidth +',height=' +MyHeight +',screenX='+xOffset +',screenY='+yOffset +',top='+yOffset +',left='+xOffset +',scrollbars=yes,resizable=yes');
//window.open('outils.htm','pop');
}

