function displayImage(iWhich, sImg, sTitle, iWidth, iHeight, sReferenceObject){
	var oImgDisplay = document.getElementById("divImage");
	var oImgGeneric = document.getElementById("imgGeneric");
	var oImgTitle = document.getElementById("spanTitle");
	var oImgModalBody = document.getElementById("divModalBody");
	var oImgModalContainer = document.getElementById("modalAbsoluteContainer");

	/* all this extra work is to get ie 6.0 to do a fixed type of positioning.
		ie 6 doesn't support position:fixed */
	var iBrowserWidth = 0
	var iBrowserHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
	  //Non-IE
	  iBrowserWidth = window.innerWidth;
	  iBrowserHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	  //IE 6+ in 'standards compliant mode'
	  iBrowserWidth = document.documentElement.clientWidth;
	  iBrowserHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	  //IE 4 compatible
	  iBrowserWidth = document.body.clientWidth;
	  iBrowserHeight = document.body.clientHeight;
	}
	var iScrOfX = 0;
	var iScrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
	  //Netscape compliant
	  iScrOfY = window.pageYOffset;
	  iScrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	  //DOM compliant
	  iScrOfY = document.body.scrollTop;
	  iScrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	  //IE6 standards compliant mode
	  iScrOfY = document.documentElement.scrollTop;
	  iScrOfX = document.documentElement.scrollLeft;
	}
	oImgModalContainer.style.top = iScrOfY + "px";
	oImgModalContainer.style.left = (iBrowserWidth - iWidth)/2 + "px";
	switch (iWhich){
		case 0:
			oImgDisplay.style.display='None';
			oImgGeneric.src = sImg;
			oImgTitle.innerHTML = sTitle;
			break;
		case 1:
			oImgDisplay.style.display='Block';
			oImgModalBody.style.height = iHeight + "px";
			oImgModalBody.style.width = iWidth + "px";
			oImgGeneric.src = sImg;
			oImgTitle.innerHTML = sTitle;
			break;
	}
	return false;
}
