// ###############################################################################
// #
// #      PopZoom v1.1
// #      by Richard L. Trethewey
// #      rick@rainbo.net
// #      http://www.rainbo.net/pub/index.html
// #      Installation Instructions and Documentation
// #
// ###############################################################################

// Copyright (C) January 13, 2003 by Richard L. Trethewey.  All rights reserved.

// NOTICE: This software is published without warranty of any kind.  By using this software you agree to
// assume all risks and to hold Richard L. Trethewey and his agents harmless for any damages.

    var ns4 = false;
    var ns6 = false;
    var ie4 = false;
    var ie5 = false;

      if (document.layers) { ns4 = true; }  // Netscape v4.x is essentially dead at least, thank goodness.
      if (document.all) { ie4 = true; }     // Very old version of MS Internet Explorer, almost nonexistant
      if (document.getElementById && !document.all) { ns6 = true; } // Netscape v6.x+/Firefox/Safari/Opera
      if (document.getElementById && document.all) { ie5 = true; }  // Internet Explorer V5.x and up.

 function popZoom(pictURL, pWidth, pHeight) {
  var sWidth = 800;
   if ((ns4) || (ie4) || (ns6)) { sWidth = screen.availWidth; }
  var x1 = pWidth+35;
  var y1 = pHeight+35;
  var pZoomStr = "height=" + y1 + ",width=" + x1 + ",left=" + ((sWidth-x1)/2) +
      ",top=60,scrollbars=0,menubar=0";
    pZoom = window.open("","", pZoomStr);
    pZoom.document.open();
    pZoom.document.writeln("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
    pZoom.document.writeln("<html>\n<head>\n<title>Zoom View of " + pictURL + "</title>");
    pZoom.document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />");
    pZoom.document.writeln("<style type=\"text/css\">");
    //pZoom.document.writeln(".bimg { padding:5px; background-color:white; border:solid 1px #c0c0c0; }");
    pZoom.document.writeln("</style>");
    pZoom.document.writeln("</head>\n<body onblur='self.close();'>");
    pZoom.document.writeln("<p style=\"text-align:center;\"><img src=\"" + pictURL + "\" width=\"" + pWidth + "\" height=\"" + pHeight + "\" />\n");
//
//         Uncomment the line below to track zoom clicks in Quiet Count.  
//    pZoom.document.writeln("<img src=\"/cgi-bin/imgCount.cgi?file=images/spacer.gif&amp;page=zoom/" + pictURL + "\" class=\"bimg\" />\n");
//
    pZoom.document.writeln("</p></body>\n</html>\n");
    pZoom.document.close();

 } // end popZoom





