function popup(url, nom)
{
  var fiche = window.open(url, nom, 'location=0,directories=0,status=0,menubar=0,toolbar=0,scrollbars=1,resizable=1, copyhistory=0,width=600,height=500');
  if (navigator.appVersion.substring(1,0)>="3")
    fiche.focus(); 
}

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 10;
  TopPosition  = (screen.height) ? (screen.height-h)/2 : 10;
  settings     = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
  win = window.open(mypage,myname,settings)
}

function centrerFenetre()
{
  var largeur = document.getElementById('photo').width;
  var hauteur = document.getElementById('contenu').scrollHeight;

  var gauche = (screen.width)  ? (screen.width-largeur)/2  : 10;
  var haut   = (screen.height) ? (screen.height-hauteur-40)/2 : 10;
  
  window.moveTo(gauche, haut);
  window.resizeTo(largeur + 50, hauteur + 70);

  // Le reste n'est que pour Firefox:

  window.innerWidth  = largeur + 20;
  window.innerHeight = hauteur + 38;

  var haut   = (screen.height) ? (screen.height-hauteur-70)/2 : 10;
  window.moveTo(gauche, haut);
}
