var html = "";
function writePopup (chemin, EAN, finish, dir, extention) {
	html = "<html>\n<head>\n";
	html += "<title>PAYOT | Image</title>\n";
	html += "<link rel='stylesheet' type='text/css' href='";
	html += chemin;
	html += "/docroot/payot/css/payot-popup.css' />\n";
	html += "</head>\n<body style='background-image:none;min-width:0px;'>\n"
	html += "<div class='payotPageHeaderSetBackground'>\n"
	html += "<div class='payotPageHeaderSetBackgroundWhite'>\n"
	html += "<div id='payotDivHeaderIdentite'>\n";
	html += "<a href='http://www.payot.ch' title='Logo Payot'>\n";
	html += "<img class='payotNoBorder' src='";
	html += chemin;
	html += "/docroot/payot/images/logo_payot.gif' alt='Logo Payot' />\n";
	html += "</a>\n</div>\n</div>"; 
	html += "<div class='level1'>\n";
	html += "</div>\n";
	html += "<div class='level2'>\n";
	html += "</div>\n";
	html += "<div id='payotDivHeaderRechercheSimple'>\n";
	html += "<table class='payotPopupStyle' align='right' border='0' >\n";
	html += "<tbody>\n<tr>\n<td class='payotPopupStyle'>\n";
	html += "<a title='";
	html += finish;
	html += "' href='' class='header_nav_bar3' onclick='window.close();'>";
	html += finish;
	html += "</a>\n</td>\n</tr>\n</tbody>\n</table>\n";
	html += "</div>\n</div>";
	html += "<div id='payotDivTwoColumnsMainColumn'>\n";
	html += "<img alt='' src='";
	html += chemin;
	html += dir;
	html += EAN;
//	html += "_maxi";
	html += extention;
	html += "' border='0' id='resizeOnImage' name='resizeOnImage' onload='window.resizeTo(document.resizeOnImage.width+30,document.resizeOnImage.height+208)' />";
	html += "</div>\n";
	html += "<script type=\"text/javascript\">";
	html += "document.body.clientWidth=document.getElementById('resizeOnImage').clientWidth;"
	html += "</script>";
	html += "</body>\n</html>";
	popupWindow = window.open( "", "_blank", "status=no,scrollbars=no,resizable=yes,toolbar=no");
	popupWindow.document.open();
	popupWindow.document.write(html);
	popupWindow.document.close();
}