function Zoom(e,imgName) 
{
  var imgWidth=800
  var imgHeight=600

  var pageCounter="<!-- Start of StatCounter Code - invisible counter -->" +
		"<script type='text\/javascript' language='javascript'>" +
		"var sc_project=1053660; " +
		"var sc_invisible=1; " +
		"var sc_partition=6; " +
		"var sc_security='60ddf8db'; "+
		"<\/script>" +
		"<script type='text\/javascript' language='javascript' src='http:\/\/www.statcounter.com\/counter/counter.js'>" +
		"<\/script>" +
		"<noscript><a href='http:\/\/www.statcounter.com\/' target='_blank'>" +
		"<img  src='http:\/\/c7.statcounter.com\/counter.php?sc_project=1053660&amp;java=0&amp;security=60ddf8db&amp;invisible=0' alt='hitcounter' border='0'><\/a>" +
		"<\/noscript>" +
		"<!-- End of StatCounter Code -->";

if (IsIE())
{// IE code

  var imgTop=e.screenY
  var imgLeft=(e.x-e.offsetX+e.srcElement.offsetWidth+this.parent.screenLeft+5);

  var windowProperties = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0";

  //zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+',top='+imgTop+
  //                          ',left='+imgLeft+',' + windowProperties);
  //zoomWindow.close();

  zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+',top='+imgTop+
                            ',left='+imgLeft+',' + windowProperties);

  zoomWindow.document.write("<html>" +
  "<head>" +
  "<title>ZOOM: Loading... " + imgName + "<\/title>" +
  "<meta http-equiv='imagetoolbar' content='no' \/>" +
  "<script type='text\/javascript'>" +
  "function loadinfo()" +
  "{" +
  "  window.resizeTo(document.all.pic1.offsetWidth+50, document.all.pic1.offsetHeight+45);" +
  "  new_left="+imgLeft+";" +
  "  if (("+imgLeft+"+document.all.pic1.offsetWidth) > "+this.screen.width+" )" +
  "  {" +
  "    new_left=("+this.screen.width+"-document.all.pic1.offsetWidth);" +
  "    if (new_left<0) {new_left=0};" +
  "    window.moveTo(new_left,"+imgTop+")" +
  "  };" +
  "  if (("+imgTop+"+document.all.pic1.offsetHeight) > ("+this.screen.height+"-30) )" +
  "  {" +
  "    new_top=("+this.screen.height+"-document.all.pic1.offsetHeight-30);" +
  "    if (new_top<0) {new_top=0};" +
  "    window.moveTo(new_left,new_top)" +
  "  }" +
  "}" +
  "function click() {" +
  "if (event.button==2) {" +
  "alert('COPYRIGHT \\&copy\\;  LeChateau Reg\\'d Kennel 2004-2010  -  All rights reserved') } }" +
  "document.onmousedown=click" +
  "<\/script>" +
  pageCounter +
  "<\/head>" +
  "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=gray >" +
  "<center>" +
  "<img  id=pic1 src='" + imgName + "' alt='Click on image to close this window...' onload='loadinfo()'" +
  " onclick='window.close()' onMouseOver=this.style.cursor='hand'  onMouseOut=this.style.cursor='default'>" +
  "<\/center>" +
  "<\/body>" +
  "<\/html>");

  zoomWindow.document.close();
  zoomWindow.focus();
  zoomWindow.document.title = "Zoom - "+imgName;
}
else
{// Mozilla code

  var imgTop=e.screenY

  var imgLeft=(e.clientX-e.offsetX+e.srcElement.offsetWidth+250+5)

  //zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+
  //			   ',top='+imgTop+',left='+imgLeft+',toolbar=0,menubar=0,location=0,scrollbars=0')
  //zoomWindow.close();

  zoomWindow = window.open('', 'zoomWin', 'width='+imgWidth+',height='+imgHeight+
			   ',top='+imgTop+',left='+imgLeft+',toolbar=0,menubar=0,location=0,scrollbars=0')
  zoomWindow.document.write("<html>" + 
"<head>" + 
"<title>ZOOM: Loading... " + imgName + "<\/title>" +
"<meta http-equiv='imagetoolbar' content='no' \/>" +
"<script type='text\/javascript'>" +
"function loadinfo()" +
"{" +
"  window.resizeTo(document.all.pic1.offsetWidth+34,document.all.pic1.offsetHeight+74);" +
"  new_left="+imgLeft+";" +
"  if (("+imgLeft+"+document.all.pic1.offsetWidth) > "+this.screen.width+" )" +
"  {" +
"    new_left=("+this.screen.width+"-document.all.pic1.offsetWidth);" +
"    if (new_left<0) {new_left=0}" +
"    window.moveTo(new_left,"+imgTop+")" +
"  }" +
"  if (("+imgTop+"+document.all.pic1.offsetHeight) > ("+this.screen.height+"-50) )" +
"  {" +
"    new_top=("+this.screen.height+"-document.all.pic1.offsetHeight-50);" +
"    if (new_top<0) {new_top=0};" +
"    window.moveTo(new_left,new_top);" +
"  }" +
"}" +
"function click() {" +
"if (event.button==2) {" +
"alert('COPYRIGHT \\&copy\\;  LeChateau Reg\\'d Kennel 2004-2010  -  All rights reserved') } }" +
"document.onmousedown=click" +
"<\/script>" +
pageCounter +
"<\/head>" +
"<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=gray >"+
"<center>" +
"<img  id=pic1 src='",imgName,"' title='Click on image to close this window...' " +
"    onload='loadinfo()' " +
"    onclick='window.close()' " +
"    onMouseOver=this.style.cursor='pointer'" +
"    onMouseOut=this.style.cursor='default'>" +
"<\/center>" +
"<\/body>" +
"<\/html>")

  zoomWindow.document.close();
  zoomWindow.focus();
  zoomWindow.document.title = "Zoom - "+imgName;
}
}


function IsIE()
{
  return navigator.userAgent.toLowerCase().indexOf("msie") >= 0;
}


function MouseHandStyle()
{
 if (IsIE())
 {// IE code
   return "hand";
 }
 else
 {// Mozilla code
   return "pointer"; 
 }
}

function OpenWindow(path, name, width, height) 
{
 if (IsIE())
 {// IE code

  var windowProperties = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0";

  zoomWindow = window.open(path, name, 'width='+width+',height='+height+',' + windowProperties);
  zoomWindow.document.close();
  zoomWindow.focus();
 }
 else
 {// Mozilla code

  zoomWindow = window.open(path, name, 'width='+width+',height='+height+',toolbar=0,menubar=0,location=0,scrollbars=1')
  zoomWindow.document.close();
  zoomWindow.focus();
 }
}

