function WriteThumbnail( id, moviepath, imagepath  )
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="170" height="116" id="thumbnail" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + AppRoot + 'flash/thumbnail.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="FlashVars" value="ID='+id+'&MoviePath='+moviepath+'&ThumbnailPath='+imagepath+'"> ');
	document.write('<embed src="' + AppRoot + 'flash/thumbnail.swf" quality="high" bgcolor="#ffffff" width="170" height="116" name="thumbnail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ');
 	document.write(' 	   flashvars="ID='+id+'&MoviePath='+moviepath+'&ThumbnailPath='+imagepath+'" />');
	document.write('</object>');
}

function WriteMovie( type, moviepath, width, height, containerId )
{
	if( type == "qt" )
	{
		document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+width+'" height="'+height+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab"> ');
		document.write('<param name="src" value="'+moviepath+'"> ');
		document.write('<param name="autoplay" value="true"> ');
		document.write('<param name="loop" value="false"> ');
		document.write('<param name="controller" value="true"> ');
		document.write('<param name="scale" value="tofit"> ');// Changed from aspect to tofit for SFE ID 451
		document.write('<param name="bgcolor" value="#000000"> ');
		document.write('<param name="kioskmode" value="true"> ');
		document.write('<embed name="Player" pluginspage="http://www.apple.com/quicktime/download/" ');
		document.write('	src="'+moviepath+'" ');
		document.write('	width="'+width+'" height="'+height+'" ');
		document.write('	autoplay="true" ');
		document.write('	controller="true" ');
		document.write('	cache="false" ');
		document.write('	enablejavascript="true" ');
		document.write('	scale="tofit" ');// Changed from aspect to tofit for SFE ID 451
		document.write('	type="video/quicktime" ');
		document.write('    kioskmode="true" ');
		document.write('	bgcolor="#000000"> ');
		document.write('</embed> ');
		document.write('</object>');
	}
	else if( type == "wmv" )
	{		
		document.write('<object name="PLAYER" id="Player" width="'+width+'" height="'+height+'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">');
		document.write('<param name="URL" value="'+moviepath+'">');
		document.write('<param name="autoStart" value="true">');
		document.write('<param name="uiMode" value="full">');
		document.write('<param name="maintainAspectRatio" value="false">');// Added by Pranav K for SFE ID 451
		document.write('<param name="stretchToFit" value="true">');// Modified by Pranav K for SFE ID 451
		document.write('<embed type="application/x-mplayer2" src="'+moviepath+'" name="mediaplayer" width="'+width+'" height="'+height+'" showcontrols="1" showstatusbar="0" maintainAspectRatio="0" stretchToFit="1" showdisplay="0" autostart="1"></embed>' );
		document.write('</object>');
	}
				
}

function WriteBanner()
{
	var suffix = [1]
	var n = ""; //suffix[ getRandomNumber( suffix.length ) ];
	var id;
	
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="360" height="202" id="banner" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + AppRoot + 'flash/intro1.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="' + AppRoot + 'flash/intro1.swf" quality="high" bgcolor="#ffffff" width="360" height="202" name="banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}