

function swapImage(imgObj, imgSrc) {
	imgObj.src = "images/" + imgSrc;
}

function popLarge(imgObj) {
	myString = new String(imgObj.src)
	rExp = /Med/gi;
	myString = myString.replace(rExp, "Lrg");
	goImgWin(myString, 400, 400);
}

function rotateImage(arrayIndex) {
	swapImage(picImg, imgRotate[arrayIndex]);
	arrayIndex++;
	if (arrayIndex >= imgRotate.length) {
		arrayIndex = 0;
	}
	timerID = setTimeout("rotateImage(" + arrayIndex + ")",2000);
}

function goImgWin(myImage,myWidth,myHeight) {
	myHeight += 24;
	myWidth += 24;
	TheImgWin = window.open(myImage,'image','height=' + myHeight + ',width=' + myWidth +
	',toolbar=no,directories=no,status=no,' + 'menubar=no,scrollbars=no,resizable=no');
	TheImgWin.resizeTo(myWidth+2,myHeight+30);
	TheImgWin.focus();
}
   
function showDiv(divName) {
	if(document.layers) {
		document[divName].visibility = "visible";
	} 
	else if (document.all) {
		eval (divName + ".style.visibility = 'visible';");
	}
	else {
		d = document.getElementById(divName)
		d.style.visibility = "visible";
	}
}

function hideDiv(divName) {
	if(document.layers) {
		document[divName].visibility = "hidden";
	} 
	else if (document.all) {
		eval (divName + ".style.visibility = 'hidden';");
	}
	else {
		d = document.getElementById(divName)
		d.style.visibility = "hidden";
	}
}

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
window.attachEvent("onload", correctPNG);