/* Code copyright 2001 http://www.custompro.com, all rights reserved
   PopPix is a routine to display pictures within a new window, but preserving the website style
	and to provide some 'protection' against easy downloading of the pictures.
	The arguments are:
	- pix_title. Title of photo (name of person, etc)
	- pix_filename. filename to the Pix image (in pixhide directory - no file extension!)

	Hard coded parameters are:
	- bodystyle - tags that go within the <body> tag for colors, backgrounds, etc
	- bigpicfolder - where you want the large versions of the pics
	- websiteurl - address of website that is holding the copyright
	- websitename - Full name of website holding the copyright

   Calling the routine can be included as part of an <a href> tag, including use of the status window.
	The following is an example:
	<a 
	    href="javascript:poppix('baseball', 'baseball01')"
	    onmouseover="window.status='See Baseball Full sized'; return true;"
	    onmouseout="window.status=''; return true;"
	>
	<img src="images/thb/baseball01.jpg" alt="Baseball" WIDTH="115" HEIGHT="150">
	</a>

*/
bodystyle = "stylesrc='index.htm'"
bigpicfolder = "/images/fullsz"
websiteurl = "brendangrant.org"
websitename = "Brendan Grant Tribute"

function poppix(pix_title, pix_filename) {
	popwindow=window.open('','popwindow','width=500,height=600,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
	popwindow.document.open();
	popwindow.document.writeln("<html><head><title>" + pix_title + "</title>");

	popwindow.document.writeln("<SCRIPT LANGUAGE='JavaScript'>");
	popwindow.document.writeln("<!-- Hide script from old browsers");
	popwindow.document.writeln("function right(e) {");
	popwindow.document.writeln("var message = 'Please enjoy the pictures on the website.'");
	popwindow.document.writeln("if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {");
	popwindow.document.writeln("alert(message);");
	popwindow.document.writeln("return false;");
	popwindow.document.writeln("}");
	popwindow.document.writeln("else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {");
	popwindow.document.writeln("alert(message);");
	popwindow.document.writeln("return false;");
	popwindow.document.writeln("}");
	popwindow.document.writeln("return true;");
	popwindow.document.writeln("}");
	popwindow.document.writeln("document.onmousedown=right;");
	popwindow.document.writeln("if (document.layers) window.captureEvents(Event.MOUSEDOWN);");
	popwindow.document.writeln("window.onmousedown=right;");
	popwindow.document.writeln("// End script hiding from old browsers -->");
	popwindow.document.writeln("</script>");

	popwindow.document.writeln("</head>");
	popwindow.document.writeln("<body " + bodystyle + ">");

	popwindow.document.writeln("<div align='left'>");
	popwindow.document.writeln("  <table border='0'>");
	popwindow.document.writeln("    <tr>");
	popwindow.document.writeln("      <td valign='middle'>");
	popwindow.document.writeln("        <h2>" + pix_title + "</h2>");
	popwindow.document.writeln("      </td>");
	popwindow.document.writeln("      <td valign='middle'><form><input type=button value=Close name=Close onClick='window.close(); return true;'></form></td>");
	popwindow.document.writeln("      <td valign='middle'><b><i><font size='2'>Presented by ");
	popwindow.document.writeln("      <a href='http://" + websiteurl + "' target='_blank'>");
	popwindow.document.writeln("      " + websitename + "</a>, All Rights Reserved.");
	popwindow.document.writeln("      </font></i></b></td>");
	popwindow.document.writeln("    </tr>");
	popwindow.document.writeln("  </table>");
	popwindow.document.writeln("</div>");

	popwindow.document.writeln("<img src='http://" + websiteurl + bigpicfolder + "/" + pix_filename + ".jpg' alt='" + pix_title + "'>");

	popwindow.document.writeln("<SCRIPT LANGUAGE='JavaScript'>");
	popwindow.document.writeln("<!-- Hide script from old browsers");
	popwindow.document.writeln("if (navigator.appName == 'Netscape') {");
	popwindow.document.writeln("for (var i=0; i<document.images.length; i++) document.images[i].onmousedown=right;");
	popwindow.document.writeln("for (var i=0; i<document.links.length; i++) document.links[i].onmousedown=right;");
	popwindow.document.writeln("}");
	popwindow.document.writeln("// End script hiding from old browsers -->");
	popwindow.document.writeln("</script>");

	popwindow.document.write("</body>");
	popwindow.document.writeln(	"</html>");
	popwindow.document.close;
}

