// movieType = G9Basic
// movieName = catalog%20video1%20creating%20multiple%20catalog%20pages
// movieID   = 03d8a133-d6e5-4f9b-b5d8-e2340a3201fc

function startVideo(movieFolder, movieID, movieName, renderWidth) {
	var movieDiv = document.getElementById("movie-div");
	movieDiv.innerHTML = getVideoCode(movieFolder, movieID, movieName, renderWidth);
}


function getVideoCode(movieFolder, movieID, movieName, renderWidth) {
	var originalWidth = 990;
	var originalHeight = 625;
	var renderHeight = originalHeight / originalWidth * renderWidth;
	
	var videoCode = '<object width="' + renderWidth + '" height="' + renderHeight + '">' + 
	                '<param name="movie" value="http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/flvplayer.swf"></param>' + 
									'<param name="quality" value="high"></param>' +
									'<param name="bgcolor" value="#FFFFFF"></param>' +
									'<param name="flashVars" value="thumb=http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/FirstFrame.jpg&containerwidth=' + renderWidth + '&containerheight=' + renderHeight + '&content=http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/' + movieName + '.mp4"></param>' +
									'<param name="allowFullScreen" value="true"></param>' + 
									'<param name="scale" value="showall"></param>' + 
									'<param name="allowScriptAccess" value="always"></param>' + 
									'<param name="base" value="http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/"></param>' +
									'<embed src="http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="' + renderWidth + '" height="' + renderHeight + '" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/FirstFrame.jpg&containerwidth=' + renderWidth + '&containerheight=' + renderHeight + '&content=http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/' + movieName + '.mp4" allowFullScreen="true" base="http://content.screencast.com/users/i3d/folders/' + movieFolder + '/media/' + movieID + '/" scale="showall"></embed>' +
									'</object>';
	//alert (videoCode);		
	//videoCode = '<object width="990" height="628"> <param name="movie" value="http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/flvplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/FirstFrame.jpg&containerwidth=990&containerheight=628&content=http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/catalog%20video1%20creating%20multiple%20catalog%20pages.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/"></param>  <embed src="http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="990" height="628" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/FirstFrame.jpg&containerwidth=990&containerheight=628&content=http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/catalog%20video1%20creating%20multiple%20catalog%20pages.mp4" allowFullScreen="true" base="http://content.screencast.com/users/i3d/folders/G9Basic/media/03d8a133-d6e5-4f9b-b5d8-e2340a3201fc/" scale="showall"></embed> </object>';
//	alert (videoCode);		
	return videoCode;
	
}

function startVideo2(movieFolder, movieID, movieName, renderWidth, divBlock) {
	var movieDiv = document.getElementById(divBlock);
	movieDiv.innerHTML = getVideoCode(movieFolder, movieID, movieName, renderWidth);
}

