//   Common scripts for Charles Hogarth Landscapes copyright by PuzzlePieces 2001                  
      
browser = navigator.appName;
version = parseInt(navigator.appVersion);
jok = ((browser == "Netscape") && (version >= 3)) || ((browser == "Microsoft Internet Explorer") && (version >= 4))
dok = ((browser == "Netscape") && (version >= 4)) || ((browser == "Microsoft Internet Explorer") && (version >= 4))
var size = "width=620,height=400";
if (screen.width >= 641) {size = "width=750,height=500"}
if (screen.width >= 801) {size = "width=796,height=560"}

function popUp(url)  {
   var params = size+ ",scrollbars=yes,resizable=yes";
   chPU=open('','chPU',params);
   chPU.moveTo(1,1);
   chPU.focus();
   chPU.location.href=url;   
  }

function popExtFull(url) {
   var params = size = "width=650,height=300,toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes,status=yes";
   chWin=window.open('','chWin',params);
   chWin.moveTo(1,1);
   chWin.focus();
   chWin.location.href=url; 
   onblur=chWin.close;}
   
function show(url)  {
// if the users browser window is too small to show the image inline then pop a new window. 
     var isMinNS4 = (document.layers) ? 1 : 0;
     var isMinIE4 = (document.all)    ? 1 : 0; 
     var width = 0
     var height = 0  
     if (isMinNS4) {
        width = window.innerWidth;
        height = window.innerHeight;
        }
     if (isMinIE4) {
        width = document.body.offsetWidth;
        height = document.body.offsetHeight;
        }
//   actually test for height only for now...     
     if (height > 490) {
        window.location.href = url
        }
     else {
        doIt = popUp(url)
        }
}
