
<!--

/* MM_openBrWindow usage:

in Cold Fusion:
<a href="javascript:MM_openBrWindow('InspectionPhotos/#GetPhotos.Filename#','FullSize','resizable=yes,toolbars=no,scrollbars=yes,width=400,height=300,status=yes,document.title=photo')" onMouseOver="printS('Click for a larger image');return true;" onMouseout="clearS();return true;">

in ASP:
<a href="+chr(34)+"javascript:MM_openBrWindow('ProductImages/"+ ImageFile + "','FullSize','resizable=yes,toolbars=no,scrollbars=yes,width=400,height=300,status=yes,document.title=photo')"+chr(34)+">

*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  PicWin = window.open(theURL,winName,features);
  PicWin.outerHeight = 400;
  PicWin.outerWidth = 450;
  PicWin.focus();
  /*
  //resize window to match image size
  PicWin.onload=DoCheckImgLoad();
  function DoCheckImgLoad(){
	  //PROBLEM HERE: is always using the previous image's dimensions
	  PicWinImg = PicWin.document.images[0];
	  PicWinImg.onload=DoResize()
	  function DoResize(){
		  PicWidth = PicWin.document.images[0].width;
		  PicHeight = PicWin.document.images[0].height;
		  PicWin.outerHeight = PicHeight + 150;
		  PicWin.outerWidth = PicWidth + 20;
		  PicWin.focus();
	  }
  }*/
}

function printS(string) {
	window.status = string;
	return true;
}

function clearS() {
	window.status="";
	return true;
}


/* ***********************************************************
** ROLLOVER.JS - JS Image Rollover library
** =======================================
** This library contains functions to perform image rollovers. 
** It's yours for free, but please maintain this header!
**
** To load this library in an HTML doc, put the following
** line in the doc's HEAD (before any other SCRIPT tags):
**
** <SCRIPT SRC="rollover.js" LANGUAGE="JavaScript"></SCRIPT>
**
** Author      Ver  Date    Comments
** ======      ===  ====    ========
** Rick Scott  1.0  1/1/00  First release
**
** Copyright 2000, Rick Scott, all rights reserved.
*********************************************************** */

/* ***********************************************************
** Functions
** =========
** preloadImg(imgObjName, imgURL)
**   loads imgURL into the browser's cache
**   imgObjName - name of Image object
**   imgURL - URL (absolute or relative) of image file
** displayImg(imgObjName, imgTagName)
**   display imgObjName image in imgTagName <IMG> tag
**   imgObjName - name of Image object
**   imgTagName - NAME attribute of <IMG> tag
*********************************************************** */

function preloadImg(imgObjName, imgURL)  // load imgURL into browser's cache
  {
  if (document.images)
    {
    eval(imgObjName + " = new Image()");
    eval(imgObjName + ".src = imgURL");
    }
  }

function displayImg(imgObjName, imgTagName)  // disp imgObjName in imgTagName
  {
  if (document.images)
    document[imgTagName].src = eval(imgObjName + ".src");
  }

//-->
