/*
===========================================================================
 Flash Embed Script
 ---------------------------------
 - Needed to autoactivate Flash in IE without a user click
 - Variables:
   --> flashFile = path to flash player that loads video (e.g. 'flash/FLVPlayer_Progressive.swf')
   --> width = width of movie
   --> height = height of movie
   --> flvFile = name of flv movie file. NOTE: path is relative to player file (e.g. 'home_video.flv')
   --> skinFile = name of skin file. (e.g. 'flash/clearSkin')


===========================================================================
*/
function embedFlash (flashFile, width, height, flvFile, skinFile, autoPlay){
    document.write('<object width="' + width + '" height="' + height + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">');
    document.write('<param name="salign" value="lt">');
    document.write('<param name="quality" value="high">');
    document.write('<param name="scale" value="noscale">');
    document.write('<param name="wmode" value="transparent">');
    document.write('<param name="movie" value="' + flashFile + '">');
    document.write('<param name="FlashVars" value="&streamName=' + flvFile + '&skinName=' + skinFile + '&autoPlay=' + autoPlay + '&autoRewind=false">');
    document.write('<embed width="' + width + '" height="' + height + '" flashvars="&streamName=' + flvFile + '&autoPlay=' + autoPlay + '&autoRewind=false&skinName=' + skinFile + '" quality="high" scale="noscale" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="' + flashFile + '" wmode="transparent"></embed>');
    document.write('</object>');
}

function embedMovie (width, height, posterfile, moviefile) {
document.write('<object>');
document.write('<param name="SRC" VALUE = "'+posterfile+'" />');
document.write('<param name="QTSRC" VALUE = "'+posterfile+'" />');
document.write('<param name="HREF" VALUE = "'+moviefile+'" />  ');
document.write('<param name="AUTOPLAY" VALUE = "true" /> ');
document.write('<param name="CONTROLLER" VALUE = "true" /> ');
document.write('<param name="TYPE" VALUE = "video/quicktime" />');
document.write('<param name="TARGET" VALUE = "myself"/> ');
document.write('<embed SRC = "'+posterfile+'" QTSRC = "'+posterfile+'" HREF = "'+moviefile+'" TARGET = "myself" CONTROLLER = "true" WIDTH = "'+width+'" HEIGHT = "'+height+'" LOOP = "false" AUTOPLAY = "true" PLUGIN  = "quicktimeplugin" TYPE = "video/quicktime" CACHE = "false" PLUGINSPAGE= "http://www.apple.com/quicktime/download/" ></embed>');
document.write('</object>');
document.write('');
}

function embedWindowsMovie (width, height, moviefile, autoPlay) {
document.write('<object width="'+width+'" height="'+height+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1">');
document.write('<param name="Filename" value="'+moviefile+'">');
document.write('<param name="AutoStart" value="'+autoPlay+'">');
document.write('<param name="ShowControls" value="True">');
document.write('<param name="ShowStatusBar" value="False">');
document.write('<param name="ShowDisplay" value="False">');
document.write('<param name="AutoRewind" value="True">');
document.write('<param name="currentPosition" value="100">');
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="'+width+'" height="'+height+'" src="'+moviefile+'" filename="'+moviefile+'" autostart="'+autoPlay+'" showcontrols="True" showstatusbar="False" showdisplay="False" autorewind="True"></embed>');
document.write('</object>');
}
