/*************************************************************************************************************
UTILS - version 4 
Date de dernières modifications 17 décembre 2003
Auteur : Agnès Pruvost
/*************************************************************************************************************/
var deb=new String(top.document.location);
deb=deb.substring(0,deb.lastIndexOf("/",deb.length));

function popUp_IMPRESSION(left, top, width, height)
{
  popUpWin = open(deb+"/scripts/Impression.php?Param="+document.URL+"&Param2="+deb, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// function PopUP centrée UNIQUE
function popUpUnique(page,largeur,hauteur) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  
  if ((winpopUp==null)||(winpopUp.closed)){
  winpopUp=window.open(deb+page,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,top='+top+',left='+left+',width='+largeur+',height='+hauteur+',screenX='+left+',screenY='+top+'');
	}
	else 
	{
	winpopUp.resizeTo(largeur,hauteur);
	winpopUp.moveTo(left,top);
	winpopUp.document.location.href=deb+page;
	winpopUp.focus();
	}
}

// function PopUP centrée
function popUp(page,largeur,hauteur) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  
  window.open(deb+page,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,top='+top+',left='+left+',width='+largeur+',height='+hauteur+',screenX='+left+',screenY='+top+'');
}
