<!-- // Hide from old browsers


function local_to_global_url(theFrame, localURL) {
	var globalURL;
		// if the access path has the URL is complete, one is done nothing
	if (localURL.toUpperCase().lastIndexOf("HTTP://") == 0) {
		globalURL = localURL;
	} else  if (localURL.charAt(0) != "/") { // commencant path by ../
		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 { // start by "/"
		globalURL = the_frame.location.protocol + "//" + the_frame.location.host + localURL;
	}
	
	return globalURL;
}

function frameIt(theFrame, theTarget, imgURL, widthSpacing, heightSpacing, windowTitle) {
	var copyrightInfo = "portfolio" ;
	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 windowHeight = parseInt(imgHeight) + heightSpacing * 2;
	windowHeight += 2 * 5 * 2; // cellpadding de 5 * 2 (high and low of each cell) * 2 lines (TR)
	windowHeight += 15; // height of the text
	windowHeight += 10; // border fenetre interior 

	var windowWidth = parseInt(imgWidth) + widthSpacing * 2;
	windowWidth += 0; // cellpadding de 5 * 2 (high and low of each cell) * 1 colonne
	windowWidth += 0; // border fenetre interior
	var t = ""; // the document source has to build
	
	theWindow = top.frames[1];
	
	t += "<HTML>\n";
	t += "<HEAD>\n"
	t += "	<TITLE>" + unescape(windowTitle) + "</TITLE>\n"; // 980825 - Netscape "force" l'escape
	t += "	<LINK REL=\"STYLESHEET\" HREF=\"image_style.css\" TYPE=\"TEXT/CSS\">\n";
	t += "	<SCRIPT TYPE=\"TEXT/JAVASCRIPT\" LANGUAGE=JAVASCRIPT SRC=\"NORIP.JS\"></SCRIPT>\n";
	t += "</HEAD>\n";
	t += " <BODY BGCOLOR=\"#dcd17b\"  TEXT=\"#E4E4E4\" LINK=\"#FFCC00\" ALINK=\"#EF7C00\" VLINK=\"#E4E4E4\">\n";
	t += "  <TABLE ALIGN=\"CENTER\" BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" HEIGHT=\"95%\">\n";
	t += "   <TR>\n";
	t += "    <TD ALIGN=\"CENTER\">\n";
	t += "      <a href=\"#\" name=\"All images are protected under the United States copyright law\" title=\"All images are protected under the United States copyright law\" onmousedown=\"alert('All images are protected under the United States copyright law')\" target=\"_parent\"><IMG SRC=\"" + globalURL + "\" WIDTH=\"" + imgWidth + "\" HEIGHT=\"" + imgHeight + "\" BORDER=0 ALT=\"" + theTarget + "\" TITLE=\"\"></a><br><br><div align=\"center\"><small>&copy;2006 by Kim Salley</small></div></TD>\n";
	t += "      </TR>\n";
	t += "  </TABLE>\n";
	t += " </BODY>\n";
	t += "</HTML>\n";

	theWindow.document.open();
	theWindow.document.write(t);
	theWindow.document.close();
}
function handleError(message, ligne, URL) // Comment alert() and uncomment return after testing
{
alert("OpenImage Debugger\n" + message + "\nligne " + ligne + "\npage : " + URL + "\nThank you to point out the anomaly while pressing on the button ad hoc");
// return true;
}
window.onerror = handleError;
// Stop hiding from old browsers -->

