// pop-up functions
newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}

function popUp(strURL,strType,strHeight,strWidth) {
closeWin();
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth+", location=no";
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}



function popUp2(strURL,strTitle,strType,strHeight,strWidth) {

closeWin();
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;



newWin=window.open('','newWin', strOptions);

newWin.document.write("<html> ");

newWin.document.write("<head> ");
newWin.document.write("<title>"+strTitle+"</title> ") ;
newWin.document.write("</head> ");
newWin.document.write("<body> ");
newWin.document.write("<img src="+strURL+"  width="+strWidth+" height="+strHeight+"> ");
newWin.document.write("</body>");
newWin.document.write("</html>");


newWin.focus();

}

//  Façon d'appeler la fonction lorsqu'on ajoute un lien
//  <a href="my-pop-up-window.htm" onclick="popUp(this.href,'console',400,200);return false;" target="newWin">This is my link</a>



