// JavaScript Document
<!--
	var browserName = navigator.appName;
	
	function enlargeWidthHeight(img, width, height) {
		if(typeof img == 'string') {
			img = document.getElementById(img);
		}
		if (browserName == "Microsoft Internet Explorer") {
			if(img.width) {
				img.width = img.width + width;
				img.height = img.height + height;
			} else {
				var strWidth = img.style.width;
				var strHeight = img.style.height;
				img.style.width = (parseInt(strWidth.substring(0, strWidth.indexOf('px'))) + width) + 'px';
				img.style.height = (parseInt(strHeight.substring(0, strHeight.indexOf('px'))) + height) + 'px';
			}
		} else {
			img.width = img.width + width;
			img.height = img.height + height;
		}
	}
	
	function shrinkWidthHeight(img, width, height) {
		if(typeof img == 'string') {
			img = document.getElementById(img);
		}
		if (browserName == "Microsoft Internet Explorer") {
			if(img.width) {
				img.width = img.width - width;
				img.height = img.height - height;
			} else {
				var strWidth = img.style.width;
				var strHeight = img.style.height;
				img.style.width = (parseInt(strWidth.substring(0, strWidth.indexOf('px'))) - width) + 'px';
				img.style.height = (parseInt(strHeight.substring(0, strHeight.indexOf('px'))) - height) + 'px';
			}
		} else {
			img.width = img.width - width;
			img.height = img.height - height;
		}
	}
	
	function renderLinks() {
		document.getElementById('img_LinkHome').src = 'images/snowflake.png';
		document.getElementById('img_LinkSummer').src = 'images/snowflake.png';
		document.getElementById('img_LinkWinter').src = 'images/snowflake.png';
		document.getElementById('img_LinkPurchase').src = 'images/snowflake.png';
		document.getElementById('img_LinkContact').src = 'images/snowflake.png';
		document.getElementById('img_LinkAbout').src = 'images/snowflake.png';
		
		correctPNG();
	}
	
	function mouseOverThumbnail(photoName, thumbnail) {
		document.getElementById('mainPhoto').src = 'images/' + photoName;
		thumbnail.style.border = '2px inset #fff';
		
		if(document.getElementById('summerVideo') != null) {
			hideFlashVideo('summerVideo');
		} else {
			hideFlashVideo('winterVideo');
		}
	}
	
	function mouseOutThumbnail(thumbnail) {
		thumbnail.style.border = '2px outset #fff';
	}
	
	function playFlashVideo(id) {
		document.getElementById('mainPhoto').style.display = 'none';
		document.getElementById(id)
		document.getElementById(id).style.display = '';
	}
	
	function hideFlashVideo(id) {
		if(document.getElementById(id).style.display == '') {
			//Needed because of a bug in IE that won't stop the flash player.
			document.getElementById(id).focus();
			hideFlashVideoHelper(id);
		}
	}
	
	/**
	 * Needed because of a bug in IE that won't stop the flash player.
	 * @param {Object} id
	 */
	function hideFlashVideoHelper(id) {
		document.getElementById(id).style.display = 'none';
		document.getElementById('mainPhoto').style.display = '';
	}
	
	<!--[if it is IE 6]-->
	// correctly handle PNG transparency in Win IE 5.5 & 6.
	function correctPNG() {
	   var arVersion = navigator.appVersion.split("MSIE");
	   var version = parseFloat(arVersion[1]);
	   
	   if ((version >= 5.5 && version < 7) && (document.body.filters)) 
	   {
		  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;
				
				spanImg = document.getElementById(img.id);
				if(spanImg) {
					if(img.onclick) {
						spanImg.onclick = img.onclick;
					}
					if(img.onmouseover) {
						spanImg.onmouseover = img.onmouseover;
					}
					if(img.onmouseout) {
						spanImg.onmouseout = img.onmouseout;
					}
				}
				i = i - 1;
			 }
		  }
	   }
	}
	
	renderLinks();
// -->
