function PopUpImage(Title, src) {

// PopUpImage Coded by Chris Rowan 
// Last Modified: March 13, 2003
// Description: Calling this function will create a window exactly sized for an image.  Clicking on the image will close the window.
// Instructions: Place the script in the <head> of a webpage
//               in an image tag (or a container like DIV), add the following:
//                     onclick="PopUpImage('title', 'filename')"
//               where title is the <title> for the new window, and filename is a gif/jpeg in a folder ./images/fullsize


   var img = new Image();
   img.src= src;
   
   var X = img.width + 10;
   var Y = img.height + 30;



   popped = window.open("/js/blank.html", "popped", 'toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,directories=no,left=20,top=20,width=' + X + ',height=' + Y );


   popped.document.writeln('<html><head><\/head><body style="margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom:0px;" onclick="window.close();">');
   popped.document.title=Title;
   popped.document.bgColor="#AAAAAA";
   popped.document.writeln('<div style="position: absolute; top:0px;left:0px;" id="imagediv" align="center" width="100%"><img src="' + src + '" name="image" onclick="window.close();"></div>');


   popped.document.writeln('<script language="Javascript">function KeepSized() {' +
                           '   window.document.bgColor="#AAAAAA";' +
                           '   window.resizeTo(window.image.width + 10, window.image.height + 30);' +
                           '   setTimeout("KeepSized()",3000);' +
                           '}</script>' +
                           '<script language="Javascript">KeepSized()</script>');



   popped.document.writeln('</body></html>');
   popped.focus();     
}
