
if (document.images) {
  image1on = new Image();
  image1on.src = "./images/homeon.jpg";
  image1off = new Image();
  image1off.src = "./images/homeoff.jpg";

  image2on = new Image();
  image2on.src = "./images/abouton.jpg";
  image2off = new Image();
  image2off.src = "./images/aboutoff.jpg";

  image3on = new Image();
  image3on.src = "./images/photoson.jpg";
  image3off = new Image();
  image3off.src = "./images/photosoff.jpg";

  image4on = new Image();
  image4on.src = "./images/contacton.jpg";
  image4off = new Image();
  image4off.src = "./images/contactoff.jpg";

}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function DisplayImage(picURL,picWidth,picHeight){
newWindow=window.open(picURL,'newWin','toolbar=no,width='+picWidth+',height='+picHeight)
newWindow.document.write('<html><head><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}

function loadImage(pic,imgname,maxwidth,scalefactor){
      var h 
      var w
      var scalefactor
      var maxwidth
      var scalefactor
      var theimg
      theimg = new Image();
      theimg.src = pic;
      h = theimg.height;
      w = theimg.width;


        if (w > maxwidth){
          w = (theimg.width * scalefactor) / theimg.width;
          h = (theimg.height * scalefactor) / theimg.width;
          }
        document.writeln("<img src='" + theimg.src +"' name='" + imgname + "' width='" +w+"' height='" +h+"' border=0>");
}

   // canManipulateImages - check if the browser we're using can do
   // clever stuff with document images.

   function canManipulateImages() {
     if (document.images)
       return true;
     else
       return false;
     }

   // loadPosterImage

   function loadPosterImage(imageURL) {
     if (gImageCapableBrowser) {
       document.imagePoster.src = imageURL;
       return false;
     }
     else {
       return true;
     }
}

// gImageCapableBrowser - is this browser hip to images? Set up
// a global variable so that we don't have to keep calling a function
// (useful if the function becomes costly to compute).

gImageCapableBrowser = canManipulateImages();

  // Hide from JS-Impaired Browsers

  // This function creates the array; do not modify
  function initArray() {
  for (var i = 0; i < initArray.arguments.length; i++)
  this[i] = initArray.arguments[i];
  this.length = initArray.arguments.length;
  }

  // This is the array for the chrome variations. You may
  // modify or add to these options. The fourth entry, "",
  // is for no chrome.
  var chrome = new initArray(
  "menubar=no",
  "menubar=no,toolbar=no",
  "menubar=no,status=no,resizable=no,scrollbars=no",
  "");

  var popUpWin

  // This function makes the pop up window. Modify the
  // tall and side variables as needed.

  function makePopUpWin(pic,high,wide,text,features) {
  var tall = high+35 // + 7 adjust for spacing to border above and below picture
  var side = wide  // + 7 adjust for spacing to border on sides of picture
  var describeIt = text
  var picture = eval("pic")
  var winFeatures = features
  if (!popUpWin || popUpWin.closed) {
  popUpWin = eval("window.open('','','"+chrome[winFeatures]+",height="+tall+",width="+side+"')")
  if (!popUpWin.opener) {
  popUpWin.opener = window
  }

  //THE NEXT LINE IS THE TITLE OF THE BOX

  var popUpContent = "<html><head><title>Liquori's Landscaping, Inc.</title></HEAD>"
  
  //THE NEXT LINE SPECIFIES THE PROPERTIES OF THE BOX ITSELF. YOU CAN CHOOSE
  //TEXT TYPE, TEXT COLOUR, BODY COLOUR, TEXT SIZE ETC

  popUpContent += "<body bgcolor=#FFFFFF topmargin=0 marginheight=0 leftmargin=0 marginwidth=0>" 

  //THE NEXT LINE SHOULD NOT BE CHANGED IT IS JUST AN INSTRUCTION

  popUpContent += "<table border=0 width=100% height=100% CELLSPACING=0 CELLPADDING=0 valign=middle ALIGN=CENTER><tr><td width=100% valign=middle align=center>" 

  //THE NEXT LINE SHOULD NOT BE CHANGED IT IS JUST AN INSTRUCTION

  popUpContent += "<img src="+picture+"><P><font face=Verdana size=2><A HREF='javascript:window.close()'>Click to close</A><BR></td></tr></table></body></html>"

  //DO NOT MAKE ANY CHANGES TO THE LINES BELOW

  popUpWin.document.write(popUpContent) // writes the window content
  popUpWin.document.close() // closes the output stream
  } else {
  popUpWin.focus()
  }
  }

  // This function closes the pop up window.
  function closePopUpWin() {
  if (popUpWin && !popUpWin.closed)
  popUpWin.close();
  }


