// Ouvre une fenêtre de navigateur centrée ou non.

function openBrWindow(theURL,winName,width,height,features,bCentre) { //v3.0 by Kaori Dév
  var window_width = width;
	var window_height = height; 
	var newfeatures= "," + features;
	var window_top = (screen.height-window_height)/2;
	var window_left = (screen.width-window_width)/2;
	if(bCentre == 'false'){
		newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + newfeatures + '');
	}else{  

		url = theURL;
		nomFenetre = winName;
		optionsFenetre = 'width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + newfeatures;

		newWindow=window.open(''+ url + '', '' + nomFenetre + '', '' + optionsFenetre + '');
	}
	
  newWindow.focus();
}           


function openWYSYWYGWindow(theURL,winName,width,height,features,bCentre,idField,idForm) {
  var htmlcode = document.forms[idForm].elements[idField].value;
  theURL = theURL + "?source="+escape(htmlcode)+"&idField="+idField+"&idForm="+idForm+"&";
  var window_width = width;
  var window_height = height;
  var newfeatures= "," + features;
  var window_top = (screen.height-window_height)/2;
  var window_left = (screen.width-window_width)/2;
	if(bCentre == 'false'){
		newWindow=window.open(''+ theURL + '',''+ winName +
'','width=' + window_width + ',height=' + window_height + newfeatures +
'');
	}else{
	  newWindow=window.open(''+ theURL + '',''+ winName +
'','width=' + window_width + ',height=' + window_height + ',top=' +
window_top + ',left=' + window_left + newfeatures + '');
	}
  newWindow.focus();
}
// Gestion des RollOvers
function img_RollOver(objSel, imgUrl){
	objSel.src = imgUrl;
}