// Copyright (C) 2007 A>Y Designs.
// All Rights Reserved.
// www.aydesigns.info

// Photo Viewer Popup Generator
// <D>esigned for First Leader Development Corporation

// Requires an array called "photo" starting with "1"
// Requires a path variable called "directory"

function showPhoto(pid) {
 // Popup Variables
 var width="700", height="500";
 var left = (screen.width/2) - width/2;
 var top = (screen.height/2) - height/2;
 var settings = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width="+width+",height="+height+",left="+left+",top="+top+",screenX="+left+",screenY="+top;
 // Window Settings
 var photoViewer = window.open("","photoViewer", settings);
 var code = "<p align=center>\n <input type=\"button\" name=\"closeWin\" value=\"Close Window\" onClick=\"window.close();\"><br>\n <img src=" + directory + photo[pid] + " alt=\"Photo\">\n</p>";

 // Show The Photo!
 photoViewer.document.write(code);
}
