function CreateWMObject(filename, width, height, autostart, playcount, uiMode, controls, statusbar, altText, pageid)
{
		document.write('<OBJECT id="VIDEO" width="' +width+ '" height="' +height+ '" ')
		document.write('	CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" ')
		document.write('	type="application/x-oleobject" ')
		document.write('    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" VIEWASTEXT> ')
		document.write('	<PARAM NAME="filename" VALUE="' +filename+ '"> ')
		document.write('	<PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> ')
		document.write('	<PARAM NAME="showstatusbar" VALUE="'+statusbar+'"> ')
		document.write('	<param name="transparentatStart" value="1"> ')
		document.write(' <param name="WMode" value="Transparent"> ')		
		document.write('	<param name="autoStart" value="' +autostart+ '"> ')
		document.write('	<param name="uiMode" value="' +uiMode+ '"> ')
		document.write('	<param name="showcontrols" value="' +controls+ '"> ')
		document.write('	<param name="playcount" value="' +playcount+ '"> ')
		document.write('	<param name="alt" value="' +altText+ '"> ')
		document.write(' <EMBED type="application/x-mplayer2" ')
		document.write(' pluginspage="http://microsoft.com/windows/mediaplayer/ en/download/" ')
		document.write(' id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="0" ')
		document.write(' showcontrols="' +controls+ '" showtracker="1" ')
		document.write(' width="' +width+ '" height="' +height+ '" src="' +filename+ '" autostart="' +autostart+ '" ')
		document.write(' alt="' +altText+ '" playcount="' +playcount+ '"> ')
		document.write('<div>'+altText+ ' <A href=default.aspx?page=' +pageid+ '>Click here for textual description.</A></div> ')
		document.write(' </EMBED></OBJECT> ')
}

function CreateQuicktimeObject(filename, width, height, autoplay, loop, controls, altText, pageid)
{
		document.write('<OBJECT width="' +width+ '" height="' +height+ '" ')
		document.write('   codebase="http://www.apple.com/qtactivex/qtplugin.cab" ')
		document.write('	CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ')
		document.write('	VIEWASTEXT> ')
		document.write('	<PARAM NAME="src" VALUE="' +filename+ '"> ')
		document.write('	<param name="autoplay" value="' +autoplay+ '"> ')
		document.write('	<param name="controller" value="' +controls+ '"> ')
		document.write('   <param name="WMode" value="Transparent"> ')
		document.write('	<param name="loop" value="' +loop+ '"> ')
		document.write('	<param name="alt" value="' +altText+ '"> ')
		document.write(' <EMBED ')
		document.write(' pluginspage="http://www.apple.com/quicktime/download/" ')
		document.write(' width="' +width+ '" height="' +height+ '" src="' +filename+ '" autoplay="' +autoplay+ '" ')
		document.write(' alt="' +altText+ '" controller="' +controls+ '" loop="' +loop+ '"> ')
		document.write('<div>'+altText+ ' <A href=default.aspx?page=' +pageid+ '>Click here for textual description.</A></div> ')
		document.write(' </EMBED></OBJECT> ')
}

function CreateFlashObject(filename, width, height, bgcolor, title, img, loop)
{
		document.write(' <object style="width:' +width+ 'px; height: '+ height +'px; background-color: ' +bgcolor+ ';" ')
		document.write(' type="application/x-shockwave-flash" data="' +filename+ '" title="' +title+ '" VIEWASTEXT> ')
		document.write(' <param name="movie" value="' +filename+ '" /> ')
		/* document.write(' <param name="WMode" value="Transparent"> ') */
		document.write(' <param name="menu"  value="false"> ')
		document.write(' <param name="loop" value="'+loop+'" /> ')
		document.write(' <img src="' +img+ '" height="' +height+ '" width="' +width+ '" alt="'+ title +'" /> ')
		document.write(' </object> ')
}

function CreateRPObject(filename, width, height, autoplay, loop, alttext, pageid)
{
		document.write (' <OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ')
		document.write (' WIDTH="'+width+'" HEIGHT="'+height+'"> ')
		document.write (' <PARAM NAME="SRC" VALUE="'+filename+'"> ')
		document.write (' <PARAM NAME="AutoStart" VALUE="'+autoplay+'"> ')
		document.write (' <PARAM NAME="Loop" VALUE="'+loop+'"> ')		
		document.write (' <PARAM NAME="CONTROLS" VALUE="ImageWindow"> ')
		document.write (' <PARAM NAME="CONSOLE" VALUE="_master"> ')
		document.write(' <EMBED ')
		document.write(' width="' +width+ '" height="' +height+ '" src="' +filename+ '" autostart="' +autoplay+ '" ')
		document.write(' alt="' +alttext+ '" controls="ImageWindow" loop="' +loop+ '"> ')
		document.write('<div>'+alttext+ ' <A href=default.aspx?page=' +pageid+ '>Click here for textual description.</A></div> ')
		document.write(' </EMBED></OBJECT> ')
}

function CreateRPObjectWithGui(filename, width, height, autoplay, loop, alttext, pageid)
{
		document.write (' <OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ')
		document.write (' WIDTH="'+width+'" HEIGHT="'+height+'"> ')
		document.write (' <PARAM NAME="AutoStart" VALUE="'+autoplay+'"> ')
		document.write (' <PARAM NAME="Loop" VALUE="'+loop+'"> ')		
		document.write (' <PARAM NAME="CONTROLS" VALUE="ImageWindow"> ')
		document.write (' <PARAM NAME="CONSOLE" VALUE="_master"> ')
		document.write(' <EMBED ')
		document.write(' name="player" type="audio/x-pn-realaudio-plugin" console="_master" width="' +width+ '" height="' +height+ '" autostart="' +autoplay+ '" ')
		document.write(' alt="' +alttext+ '" controls="ImageWindow" loop="' +loop+ '"> ')
		document.write(' </EMBED></OBJECT> ')
		
		document.write ('<div><OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ')
		document.write (' WIDTH="'+width+'" HEIGHT="55"> ')
		document.write (' <PARAM NAME="SRC" VALUE="'+filename+'"> ')
		document.write (' <PARAM NAME="AutoStart" VALUE="'+autoplay+'"> ')
		document.write (' <PARAM NAME="Loop" VALUE="'+loop+'"> ')		
		document.write (' <PARAM NAME="CONTROLS" VALUE="Default"> ')
		document.write (' <PARAM NAME="CONSOLE" VALUE="video1"> ')
		document.write(' <EMBED ')
		document.write(' name="player" type="audio/x-pn-realaudio-plugin" console="video1" width="'+width+'" height="55" src="' +filename+ '" autostart="' +autoplay+ '" ')
		document.write(' alt="' +alttext+ '" controls="Default" loop="' +loop+ '"> ')
		document.write('<div>'+alttext+ ' <A href=default.aspx?page=' +pageid+ '>Click here for textual description.</A></div> ')
		document.write('</EMBED></OBJECT> ')
}

