function popup(img,title) {
    titre="Agrandissement";

    w=open("",'image','width=560,height=660,toolbar=0,status=0,scrollbars=0,resizable=0,location=0');

    w.document.write("<HTML><HEAD><TITLE>"+ title + "</TITLE></HEAD>");
    w.document.write("<script language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+30,document.images[0].height+75);  if(document.images[0].height + 130 > window.screen.availHeight){ window.resizeTo(document.images[0].width+45, window.screen.availHeight+20); }  window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
    w.document.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/includes/stylesForEditor.css\" />");
    w.document.write("<BODY onload='checksize()'  leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
    w.document.write("<center><IMG src='"+img+"' border=0 /></center>");
    w.document.write("</BODY></HTML>");
    w.document.close();
}

function checkPopup() {

    for (i=0; i<document.links.length; i++) {
	    tag = document.links[i];
	    if (tag.className.toLowerCase() == "popup")
			    document.links[i].href= "javascript:popup('"+document.links[i].href+"','"+document.links[i].title.replace("'","\'")+"');";
    }
}
