function PopUp(page,param,x,y){
	window.open(page+"?"+param, 'myPopUp','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+x+',height='+y);
}

function PopUpImage(image,x,y){
	x += 40;
	y += 40;
	window.open(image, 'popup','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+x+',height='+y);
}

function gotoURL(url) {
	 window.location=url;
}
						
function ShowHide(id, visible) {
   obj = document.getElementsByTagName("div");
   if (visible){
	  obj[id].style.visibility = 'visible';
   }
   else {
	  obj[id].style.visibility = 'hidden';
   }
}
	  
function CloseAndRefresh(url) {
	if (confirm("Avez-vous sauvegarder les modifications?")) {
		opener.location=url;
		window.close();
	}
}

function loading(message) {  
	myOverlay = xGetElementById('loading');
	xShow(myOverlay);
	xHeight(myOverlay, xClientHeight());
	
	myText = xGetElementById('loadingText');
	xInnerHtml(myText, message);
	xShow(myText);
}