function popup(strUrl,iWidth,iHeight,options){
largeur=iWidth;hauteur=iHeight;wtop=(screen.height-hauteur)/2;wleft=(screen.width-largeur)/2;
if(!options) options="resizable=no,location=no,menubar=no,status=no,scrollbars=yes";
options = "top="+wtop+",left="+wleft+",width="+largeur+",height="+hauteur+","+options;
window.open(strUrl,'',options);
}
//dans un lien pas de retour sinon une erreure est produite
function linkpopup(strUrl,iWidth,iHeight,options){
popup(strUrl,iWidth,iHeight,options);
}
function setModal(strPopName,b){
if(b!=false) b=true;
if(b) onfocus = new Function("popfocus("+strPopName+")");
else onfocus = null;
}

function popfocus(winpop){
	if(winpop && !winpop.closed) winpop.focus();
}

function popupClose(winpop){
	if(winpop && !winpop.closed)
		winpop.close();
}
function popupInfo(strMessage,iWidth,iHeight){
winpop=popup('',iWidth,iHeight);
SetPopMessage(winpop,strMessage);
return winpop;
}
function SetPopMessage(winpopup,strMessage,b){
if(b!=false || b)
strText="<html><head><title>pop info</title></head><body>"+strMessage+"</body></html>";
winpopup.document.open();
winpopup.document.write(strText);
winpopup.document.close();
}