<!-- Begin
function explication(message) {
	window.status=message;
	return true
}
// O P E N  I M A G E (JavaScript)
// -------------------------------
// Version 1.3 of March 20, 1999
// Part I of openImage_js package
// © Luc PUGEAT <mailto:luc.pugeat@wanadoo.com>, 1997-1999
// Licence granted provided that you do NOT remove these comments
// Found on <http://www.dewost.com/libre/>

function local_to_global_url(theFrame, localURL) {
	var globalURL;
		// si le chemin d'acces a l'url est complet, on se fait rien
	if (localURL.toUpperCase().lastIndexOf("HTTP://") == 0) {
		globalURL = localURL;
	} else  if (localURL.charAt(0) != "/") { // chemin commencant par ../
		frameLocation = "" + theFrame.location;
		framePath = frameLocation.substring(0,frameLocation.lastIndexOf("/") + 1);

		while(localURL.indexOf("../") == 0) {
			localURL = localURL.substring(3,localURL.length);
			framePath = framePath.substring(0,framePath.length - 1);
			framePath = framePath.substring(0,framePath.lastIndexOf("/") + 1);
		}
		globalURL = framePath + localURL;
	} else { // commence par "/"
		globalURL = the_frame.location.protocol + "//" + the_frame.location.host + localURL;
	}
	
	return globalURL;
}
// Part II of openImage_js package
// © Luc PUGEAT  <mailto:luc.pugeat@wanadoo.com> and Philippe DEWOST, 1997-1999
// Licence granted provided that you do NOT remove these comments
// Found on <http://www.dewost.com/libre/>

function openImage(theFrame, theTarget, imgURL, widthSpacing, heightSpacing, windowTitle) {
	var copyrightInfo = "&nbsp;Les Nouveaux Pros du Batiment 2004" ;
	var globalURL = local_to_global_url(theFrame,imgURL);
	// image name must be 'name.width_height.format', eg pic.434_223.jpg
	
	// deduct image height and Width from its URL
	var imgWidth = "";
	var imgHeight = "";
	imgWidth = imgURL.substring(0,imgURL.lastIndexOf("."));
	imgHeight = imgWidth.substring(imgWidth.lastIndexOf("_") +1,imgWidth.length);
	imgWidth = imgWidth.substring(imgWidth.lastIndexOf(".") +1,imgWidth.lastIndexOf("_"));
	
	var theBorderColor = "#FFFFFF";
	var theCopyrightColor = "#000000";
	
	if ((window.screen) && (widthSpacing == 999) && (heightSpacing == 999))
		{
		var windowWidth = screen.availWidth;
		var windowHeight =  screen.availHeight;
		var theBorderColor = "#000000";
		var theCopyrightColor = "#FFFFFF";
		}
	else
		{
		var windowHeight = parseInt(imgHeight) + heightSpacing * 2;
		windowHeight += 2 * 5 * 2; // cellpadding de 5 * 2 (haut et bas de chaque cellule) * 2 lignes (TR)
		windowHeight += 15; // hauteur du texte
		windowHeight += 10; // bordure de fenetre interieur

		var windowWidth = parseInt(imgWidth) + widthSpacing * 2;
		windowWidth += 10; // cellpadding de 5 * 2 (haut et bas de chaque cellule) * 1 colonne
		windowWidth += 10; // bordure de fenetre interieur
		}
	var t = ""; // le document source a construire
	
	theWindow = window.open("",theTarget,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+windowWidth+",height="+windowHeight+",screenX=0,left=0,screenY=0,top=0");
	
	t += "<HTML>\n";
	t += "<HEAD>\n"
	t += "	<TITLE>" + unescape(windowTitle) + "</TITLE>\n"; // 980825 - Netscape "force" l'escape
	t += "</HEAD>\n";
	t += " <BODY BGCOLOR=\"#000000\">\n";
	t += "  <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\" HEIGHT=\"100%\"BGCOLOR=\"#000000\">\n";
	t += "   <TR>\n";
	t += "    <TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\">";
	t += "<TABLE BORDER=\"0\" CELLPADDING=\"5\" CELLSPACING=\"0\" BGCOLOR=\"" + theBorderColor + "\">\n";
	t += "      <TR>\n";
	t += "       <TD>\n";
	t += "        <P ALIGN=\"center\"><A HREF=\"javascript:self.close()\" onmouseover=\"window.status='fermer'\; return true\">\n";
	t += "      <IMG SRC=\"" + globalURL + "\" WIDTH=\"" + imgWidth + "\" HEIGHT=\"" + imgHeight + "\" BORDER=0 ALT=\"" + theTarget + "\" TITLE=\"Cliquez sur l'image pour fermer la fenetre.\"></A></TD>\n";
	t += "      </TR>\n";
	t += "      <TR HEIGHT=\"15\">\n";
	t += "       <TD HEIGHT=\"15\">\n";
	t += "        <P ALIGN=\"right\"><FONT SIZE=\"-2\" FACE=\"Helvetica,Arial,Verdana\" COLOR=\"" + theCopyrightColor + "\">&copy;" + copyrightInfo + "</FONT></TD>\n";
	t += "      </TR>\n";
	t += "     </TABLE>\n";
	t += "    </TD>\n";
	t += "   </TR>\n";
	t += "  </TABLE>\n";
	t += " </BODY>\n";
	t += "</HTML>\n";

	theWindow.document.clear();
	theWindow.document.write(t);
}
// End -->
