// JavaScript Document

/*
This function uses the existing PodPress FLV (Flash Video) Player for SocialMedia.  The following variables are passed:
strPlayerDiv   -- name of DIV whose content will be replaced with player.  This variable MUST be the ID parameter.  CLASS won't work.
strMediaFile   -- URL of .FLV file the video player will play 
numWidth       -- width of the video player
numHeight      -- height of the video player
strAutoStart   -- Whether to auto start playing.  Recommend this being set to "true"
strPreviewImg  -- URL of preview image

*/

function replaceWithVideoPlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg) {

				if(strAutoStart == 'true') {
					strAutoStart = '';
				} else {
					strAutoStart = '&autoStart=false';
				}
				strResult = '<object type="application/x-shockwave-flash" width="'+numWidth+'" height="'+numHeight+'" wmode="transparent" data="/videos/flvplayer.swf?file='+encodeURI(strMediaFile)+strAutoStart+'">';
				strResult += '  <param name="movie" value="http://www.stewleonards.com/videos/flvplayer.swf?file='+encodeURI(strMediaFile)+strAutoStart+'" />';
				strResult += '  <param name="wmode" value="transparent" />';
				strResult += '</object><br/><br/>';
				document.getElementById(strPlayerDiv).innerHTML = strResult;
			
}