function popupcentree(page,nomPage,largeur,hauteur,option){
	var top=(screen.height-hauteur)/2+25;
	var left=(screen.width-largeur)/2-10;
	thePopup=window.open(page,nomPage,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+option);
	if (self.focus) thePopup.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  thePopup=window.open(theURL,winName,features);
  if (self.focus) thePopup.focus();
}

function resizeContact(){
	window.resizeTo(550,620);
	var iX = ((screen.availWidth - 550) / 2);
	var iY = ((screen.availHeight - 620) / 2);
	window.moveTo( iX, iY);
}

function resizeAfterContact(){
	window.resizeTo(550,250);
	var iX = ((screen.availWidth - 550) / 2);
	var iY = ((screen.availHeight - 250) / 2);
	window.moveTo( iX, iY);
}

function ajusterPopup(){
	
	if((document.body.scrollHeight + 60) < window.screen.availHeight){
		redimHauteur = (document.body.scrollHeight + 60);
	}else{
		redimHauteur = window.screen.availWidth;
	}

	if (window.statusbar){
		if (window.statusbar.visible){
			redimHauteur = redimHauteur+20;
		}
	}

	if((document.body.scrollWidth + 40) < window.screen.availWidth){
		redimLargeur = (document.body.scrollWidth + 40);
	}else{
		redimLargeur = window.screen.availWidth;
	}

	window.resizeTo(redimLargeur,redimHauteur);
	var iX = ((window.screen.availWidth - redimLargeur) / 2);
	var iY = ((window.screen.availHeight - redimHauteur) / 2);
	window.moveTo( iX, iY);
}


function ajusterHauteurFenetre(nbEnregListe,hauteurLigne,hauteurFixe) {
	// Calcul de la hauteur :
	var iHMax = screen.availHeight;
	var iHFixe = hauteurFixe;
	
	// 31/03/2005 [DB] - Correction pour les nav Mozilla pour lesquelles la barre de status est bien visible.
	if (window.statusbar){
		if (window.statusbar.visible){
			iHFixe = 185;
		}
	}
	var iL = 700;
	var iH = iHFixe + (nbEnregListe*hauteurLigne);
	if (iH > iHMax) { iH = iHMax; }
	// Calcul des coordonnées du centre :
	var iX = ((screen.availWidth - iL) / 2);
	var iY = ((screen.availHeight - iH) / 2);
	// Ajustement de la fenêtre :
	window.moveTo( iX, iY);
	window.resizeTo( iL, iH);
	window.focus();
}
