
	// Write out a preview audio player 
	
	function PreviewCDBaby (pFileNo) {
		var xObject = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" height="17" width="17">'
				+ '<param name="movie" value="/mp3Player.swf"><param name="wmode" value="transparent">'
				+ '<param name="flashvars" value="filename=/av/friends/FranMcKinney-' + pFileNo + '.mp3">'
				+ '<embed wmode="transparent" src="/mp3Player.swf" flashvars="filename=/av/friends/FranMcKinney-' + pFileNo + '.mp3" type="application/x-shockwave-flash" width="17" height="17" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
				+ '</object>';
		document.write(xObject);
	}



	// Fix PNG Transparency in Win IE 5.5 & 6 -- http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006. //
	// <img src="xyz.png" alt="foo" width="10" height="20" onload="fixPNG(this)">                            //
	
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	function fixPNG(myImage) 
	{
		if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
		{
		   var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		   var imgTitle = (myImage.title) ? 
						 "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
		   var imgStyle = "display:inline-block;" + myImage.style.cssText
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle
					  + " style=\"" + "width:" + myImage.width 
					  + "px; height:" + myImage.height 
					  + "px;" + imgStyle + ";"
					  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
		   myImage.outerHTML = strNewHTML	  
		}
	}



	// Show Flash animation of the picture books
	
	function getDocHeight() {
		var D = document;
		return Math.max(
			Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
			Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
			Math.max(D.body.clientHeight, D.documentElement.clientHeight)
		);
	}

	function ShowDetail(pID) {
		
		switch (pID) {
			case 'A':
				xFile = 'Snowmen';
				break;
			case 'B':
				xFile = 'Triangle';
				break;
			case 'C':
				xFile = 'Pumpkin';
				break;
			case 'D':
				xFile = 'Holiday';
				break;
			default:
		}
		
		xHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="480" id="Snowmen" align="middle">'
			+ '<param name="allowScriptAccess" value="always" />'
			+ '<param name="movie" value="' + xFile + '.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ece9d8" /><embed src="' + xFile + '.swf" quality="high" bgcolor="#ece9d8" width="500" height="480" name="Snowmen" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
			+ '</object>';
		
		document.getElementById('DialogContents').innerHTML = xHTML;
	
		// Set up the blue background
		var xVideoBlue = document.getElementById('DialogBlue');
		xVideoBlue.style.height = getDocHeight().toString() + 'px';
		xVideoBlue.style.visibility = 'visible';
		
		// Center the video player window
		var xVideoWindow = document.getElementById('DialogWindow');
		xVideoWindow.style.left = ((document.documentElement.clientWidth - 575) / 2).toString() + 'px';
		xVideoWindow.style.top = (document.documentElement.scrollTop + 60).toString() + 'px';
		xVideoWindow.style.background = 'url(images/Cloud' + xFile + '.gif) no-repeat';

		// Show the video player window
		xVideoWindow.style.visibility = 'visible';
	}

	function CloseDialog() {
		document.getElementById('DialogContents').innerHTML = '';
		document.getElementById('DialogWindow').style.visibility = 'hidden';
		document.getElementById('DialogBlue').style.visibility = 'hidden';
	}



