// RICH MEDIA PROJECT : JAVASCRIPT PHP FLV PLAYER & MEDIA LIST v2.0.0

// DETECT FLASH PLAYER VERSION FOR FULLSCREEN EXPERIENCE (from Flash Player v9.0.28) 
detectFlashPlayer=true;
// fullScreenFunction : if false, fullscreen mode won't be available
fullScreenFunction=true;


// PHP SCRIPT PATH 
// Path of the PHP provider script; path relative to the "RMP_PlayerMedia.swf" file or absolute path (movies should be located in the same folder)
phpPath="/sfRichMediaPlayerPlugin/movies/flvprovider.php";
// movieName without extension; see "bandwidth detection" section if you want to use movies with different bitrates.
// If you are using the component in list mode, movieName should be set to ""
//movieName="movie_2";


// BEHAVIOURS
bufferTime=1;
volume=100;
// If autostart=false, the movie will be paused at start.
autoStart=true;
// endBehaviour : behaviour when the movie ends.
// endBehaviour="Stop" | endBehaviour="Loop" | endBehaviour="List_NextMedia"
endBehaviour="stop";
// endFullScreenBackToNormal : if true, return from full screen to normal mode when the movie ends
endFullScreenBackToNormal=false;
// endJavascriptFunction : your custom javascript function that will be called at the end of the movie
endJavascriptFunction="";
// CloseConnect: If true, the Nestream connection will be closed when stop button is pressed.
stopCloseConnect=true;


// BANDWIDTH DETECTION
// Set differentVersions to true to enable bandwidth detection
differentVersions=false;
// Define the different bitrates values in kbps (audio+video bitrate); 
// When the detected bandwidth equals of exceeds these values, the associated movie will be selected
version_hi_value=800;
version_medium_value=400;
version_low_value=200;
// If differentVersions=false: upload a single version of a movie to your server : [movieName].flv
// if differentVersions=true: upload multiple versions (ex: low, med, hi) of a movie to your server :
// [movieName][version_hi_extension].flv
// [movieName][version_medium_extension].flv
// [movieName][version_low_extension].flv
// Set the movie name extension that is associated with each different bitrate version
// Use format of "_text" for each version name;  this value will be appended to the movieName
version_hi_extension="_800";
version_medium_extension="_400";
version_low_extension="_200";


// PICTURES
// Set pictures parameters to true to display a picture at start (if autostart=false) and when the movie is stopped.
// The picture has to be a jpeg file and must be named exactly the same as the movieName parameter.
// If movieName="myVideo", the player will try to load myVideo.jpg file.
pictures=false;
// The pictures must be located in the pictures folder and path listed here.
picturesFolder="/sfRichMediaPlayerPlugin/pictures";
//Set a background color for the picture
picturesBackgroundColor="#000000";
picturesKeepAspectRatio=false;
// Set "picturesKeepAspectRatioFullScreen" to true to prevent distortion during full screen mode
picturesKeepAspectRatioFullScreen=true;


// CLICK ON SCREEN
// Set  following to true to use hand cursor to indicate the screen is clickable
clickOnScreen_useHandCursor=true;
// set singleClickPlayPause to true to pause or resume the playback with a single click anywhere on the screen 
singleClickPlayPause=true;
// Set to true to show a play button on screen, 
screenPlayButton=true;
// Set the alpha transparency (low value is most transparent)
screenPlayButtonAlpha=80;
// set doubleClickListener to true to go full screen with a double click
doubleClickListener=true;


// VIDEO QUALITY
// Smoothing and bestQuality options 
// Note: enabling these options will increase CPU usage.  Users with low-powered computers
// or that have multiple applications open may have viewing problems.  Use these with caution.
bestQuality=false;
smoothing=true;
smoothingFullScreen=false;
deblocking=0;


// PLAYER'S PROPERTIES
playerWidth=645;
// playerHeight includes the size of the control bar (15 pixels) when in NORMAL MODE
playerHeight=400;
// autoSize="Movie" or autoSize="Off". Set autoSize to "Movie" to make player fit the 
// movie and to keep the aspect ratio.
autoSize="Movie";
// autoSizeFullScreen="Movie" maintains the movie's aspect ratio during full screen mode;
// autoSizeFullScreen="Off" allows the movie to distort and fill the screen in full screen mode;
autoSizeFullScreen="Movie";

// NORMAL MODE
// Player parameters: colors and positions
// playerHeight includes the size of the control bar (15 pixels)
playerColor="#222222";
barColor="#FFFFFF";
playbarColor="#E2F9D9";
screenBorder=true;
screenBorderColor="#121212";
buttonsColor="#FFFFFF";
timeColor="#FFFFFF";
backgroundColor="#000000";
backgroundAlpha=100;
//controlsY : space between the bottom of the screen and the control bar.
controlsY=10;

// FULL SCREEN MODE
// Enables you to change player controls colors, dimensions, and positions during full screen mode
// ControlsYFullScreen, y position from the bottom of the screen
controlsYFullScreen=15;
// Set controlsWidthFullScreen=0 to  fit with the width of the screen
controlsWidthFullScreen=500;
playerColorFullScreen="#222222";
barColorFullScreen="#FFFFFF";
playbarColorFullScreen="#E2F9D9";
buttonsColorFullScreen="#FFFFFF";
timeColorFullScreen="#FFFFFF";
backgroundColorFullScreen="#000000";
backgroundAlphaFullScreen=100;

// CONTROLS
// controls="Hide" | controls="Autohide" | controls="Show"
controls="Show";
controlsFullScreen="Autohide";
// Enable buttons: true  | false
listButtons=true
stopButton=true;
stopButtonFirst=true;
rewindFastForwardButtons=true;
// rewind and fast forward intervals (rw_ff_interval) in seconds
rw_ff_interval=4;
// Enable volume slider: true  | false
volumeSlider=true;
// Enable timecode display: true  | false
showTimecode=true;
controlsBarPress=true;
// Set time display format: timeFormat="mm:ss" | timeFormat="hh:mm:ss" | timeFormat="mm:ss|duration" | timeFormat="hh:mm:ss|duration"
timeFormat="mm:ss|duration";


// BUFFER MESSAGE
// Set buffer message parameters
bufferMessage=false;
bufferText="buffering";
bufferTextColor="#FFFFFF";
bufferTextBackgroundColor="#993333";
bufferTextBackgroundAlpha=40;
// bufferTextPosition="Upper Right" | bufferTextPosition="Upper Left" | bufferTextPosition="Lower Right" | bufferTextPosition="Lower Left" | bufferTextPosition="Center"
bufferTextPosition="Upper Right";


// LOGO
// Enables a logo to be displayed on the screen during playback: true | false
// logo file has to be a jpg or a swf.
logo=false;
// Set path to the logo file
logoPath="/sfRichMediaPlayerPlugin/swf/logo.swf";
// logoPosition="Upper Right" | logoPosition="Upper Left" | logoPosition="Lower Right" | logoPosition="Lower Left"
logoPosition="Upper Right";
logoAlpha=70;
// Set logo position in pixels from edge of player
logo_x=10;
logo_y=10;


// COMMERCIAL
// If differentVersions=false then only upload a single version of a commercial movie to your server: [commercialMovieName].flv
// if differentVersions=true, you will need to upload multiple versions (ex: low, med, hi) of a commercial movie to your server:
// Set the commercial movie name extension that is associated with each different bitrate version
// Use the same bitrate version extensions that were defined in the BANDWIDTH DETECTION section above
// [commercialMovieName][version_hi_extension].flv
// [commercialMovieName][version_medium_extension].flv
// [commercialMovieName][version_low_extension].flv
// Set the commercialMovieName without extension:
commercialMovieName="";
// Javascript functions to call when the commercial starts and when the user clicks on the screen during a commercial.
// Flash will call getURL("javascript:"+nameOfYourFunction);
// For example you can call an alert Function, commercialFunctionStart="alert('start commercial');"
commercialFunctionStart="";
commercialFunctionClickScreen="";
// Select to show either a commercial text message or a commercial text message plus the "coming next" movie title
// commercialMessage="CommercialText" | commercialMessage="CommercialText and MovieTitle"
commercialMessage="CommercialText";
// Set movieTitleForComingNext property if commercialMessage="CommercialText and MovieTitle"
movieTitleForComingNext="";
// Define the commercial text message and its properties:
commercialText="Your movie will start after this commercial...";
commercialTextColor="#FFFFFF";
commercialTextBold=true;


// SUBTITLES
// Subtitles are defined in an XML file; set the XML path here:
subtitleXML="";
// Sub Titles are visible at start: subVisible= true | false  
subVisible=true;
// Sub titles can be controlled with a button; subButton= true | false:
subButton=false;
subButtonOffColor="#FFFFFF";
subColor="#FFFFFF";
subBackground=true;
subBackgroundColor="#000000";
subBackgroundAlpha=90;
subFontSize=16;
autohideSubBackground=true;
// Set sub title text alignment: subAlign="left" | subAlign="center" | subAlign="right"
subAlign="center";

// SUBTITLES IN FULLSCREEN MODE
// Enables sub titles to be styled differently when in full screen mode
subColorFullScreen="#FFFFFF";
subBackgroundFullScreen=false;
subBackgroundColorFullScreen="#000000";
subBackgroundAlphaFullScreen=90;
subFontSizeFullScreen=30;
autohideSubBackgroundFullScreen=true;
// subAlignFullScreen="left" | subAlignFullScreen="center" | subAlignFullScreen="right"
subAlignFullScreen="center";
blankLineFullScreen=0;



// MEDIA LIST PROPERTIES
// mediaXML : Absolute or relative path to Media List XML file. Set mediaXML to "" if you don't want to use media list mode.
//mediaXML="/sfRichMediaPlayerPlugin/xml/params.xml";
mediaXML="";
// startBehaviour="Wait for click" | startBehaviour="Play first media" | startBehaviour="Pause on first media"
startBehaviour="Pause on first media";
displayListAtStart=true;
displayListInFullScreenMode=true;
//displayListWhenEnteringFullScreenMode can be defined only if displayListInFullScreenMode is set to true.
displayListWhenEnteringFullScreenMode=true;
scrollListener=true;
scrollSize_auto=true;
scrollSize=50;
scrollAirSkin=false;

// PROPERTIES IN NORMAL MODE
pictureWidth=60;
pictureHeight=45;
listWidth=200;
// listSpace : space between movie's border and player's border when playing in list mode.
listSpace=5;
cellHeight=60;
showDescription=true;
showPicture=true;
textFontSize=9;
titleFontSize=10;
titleBold=true;
blankLineAfterTitle=false;
textColor="#FFFFFF";
titleColor="#FFFFFF";
selectColor="#121212";
selectAlpha=100;
focusColor="#121212";
focusAlpha=50;
listButtonsColor="#FFFFFF";
listBarColor="#222222";
skinColor="#121212";
listBackgroundColor="#222222";
listBackgroundAlpha=100;
border=true;
borderColor="#222222";
// spaceBP : space Before Picture | spaceBT : space Before Text | spaceAT : space After Text | spaceTT : space Top Text
spaceBP=5;
spaceBT=5;
spaceAT=20;
spaceTT=10;
// PROPERTIES IN FULL SCREEN MODE
pictureWidthFullScreen=80;
pictureHeightFullScreen=60;
listWidthFullScreen=220;
// listSpace : space between movie's border and player's border when playing in list mode.
listSpaceFullScreen=5;
cellHeightFullScreen=80;
showDescriptionFullScreen=true;
showPictureFullScreen=true;
textFontSizeFullScreen=10;
titleFontSizeFullScreen=11;
titleBoldFullScreen=true;
blankLineAfterTitleFullScreen=false;
textColorFullScreen="#FFFFFF";
titleColorFullScreen="#FFFFFF";
selectColorFullScreen="#222222";
selectAlphaFullScreen=80;
focusColorFullScreen="#222222";
focusAlphaFullScreen=40;
listButtonsColorFullScreen="#FFFFFF";
listBarColorFullScreen="#222222";
skinColorFullScreen="#121212";
listBackgroundColorFullScreen="#000000";
listBackgroundAlphaFullScreen=100;
borderFullScreen=true;
borderColorFullScreen="#111111";
// spaceBP : space Before Picture | spaceBT : space Before Text | spaceAT : space After Text | spaceTT : space Top Text
spaceBPFullScreen=10;
spaceBTFullScreen=10;
spaceATFullScreen=20;
spaceTTFullScreen=10;


// POP UP
// Set display properties for Detect Flash Player Pop Up
// Detect Flash Player Text=[detectPopUpText1]+[versionNumber]+[detectPopUpText2]
// You can use HTML tags to style your text
detectPopUpTitle="Adobe Flash Player Version";
detectPopUpText1="You have Flash Player version ";
detectPopUpText2=" installed.Enjoy a fullscreenexperience with the new Flash Player.";
// Button label to get update for Flash Player
detectPopUpButton1="Get Flash";
// Button label to bypass Flash Player update feature
detectPopUpButton2="Continue";

// Detect Bandwidth Pop Up
// Enable Bandwidth Detect Pop Up window: true | false
displayBandwidthDetectPopUp=false;
// Set display text for Bandwidth detect Pop Up feature
// Detect Bandwidth Result Text=[bandwidthDetectPopUpText2]+[bandwidth]+" kbps"
bandwidthDetectPopUpTitle="Rich Media Project Speed Detector";
bandwidthDetectPopUpText1="Detecting BandwidthPlease wait...";
bandwidthDetectPopUpText2="Your Bandwidth :"

// Loading Movie Pop Up	
// Enable Movie Loading Pop Up window text: true | false
displayLoadingMoviePopUp=true;
loadingMoviePopUpTitle="Loading...";
loadingMoviePopUpText="Loading MoviePlease wait..."

// Select Bandwidth Pop Up
// Enables viewer to select bandwidth manually via this popup window
// Select Bandwidth Text=[bandwidthSelectPopUpText1]+[bandwidthTextForXXXBandwidth]+[bandwidthSelectPopUpText2]+[version_XXX_value]+[bandwidthSelectPopUpText3]
bandwidthSelectPopUpTitle="Bandwidth Selector";
bandwidthSelectPopUpButton1="Low";
bandwidthSelectPopUpButton2="Medium";
bandwidthSelectPopUpButton3="Hi";
bandwidthTextForLowBandwidth="Low";
bandwidthTextForMediumBandwidth="Medium";
bandwidthTextForHiBandwidth="Hi";
bandwidthSelectPopUpText1="";
bandwidthSelectPopUpText2=" bandwidth is selected :";
bandwidthSelectPopUpText3=" kbps movie.Please select the desiredbandwidth :";

// Info Pop Up
// This pop up is displayed if no movie is loaded at start (movieName="")
displayInfoPopUp=true;
infoPopUpTitle="Select movie";
infoPopUpText="Please select a movie in the gallery"


// SWF PROPERTIES
// swfPath : path of the swf that contains the player (without swf extension)
swfPath="/sfRichMediaPlayerPlugin/swf/RMP_PlayerMedia";
// swfID : name of the Flash Object
swfID="RMP_PlayerMedia";
// speedClipPath : path of the swf that contains the speed detector clip (without swf extension)
speedClipPath="/sfRichMediaPlayerPlugin/swf/speedClip";
swfWidth=playerWidth;
swfHeight=playerHeight+controlsY+1;
swfBackgroundColor="#FFFFFF";


////////////////////////////////////////////////
// OBJECT BUILDER : DO NOT MODIFY THIS SCRIPT //
////////////////////////////////////////////////

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
   if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } 
    else 
    {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
			str +='swLiveConnect="true" ';
  		str += '> </embed>';
    }
    //console.log(str);
    document.getElementById('videoPlayer').innerHTML = str;
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/** 
*   PAR LIONEL
*   UTILISER LA FONCTION CI-DESSOUS POUR LE PLAYER SEUL SANS MEDIALIST, le nom du FLV est passée par le helper (sans extension !)
**/
function createObject( movieName ) {

AC_FL_RunContent(
			"src", swfPath,
			"FlashVars", "version_hi_value="+version_hi_value+'&#38;version_medium_value='
			+version_medium_value+'&#38;version_low_value='+version_low_value
			+'&#38;version_hi_extension='+version_hi_extension
			+'&#38;version_medium_extension='+version_medium_extension
			+'&#38;version_low_extension='+version_low_extension+'&#38;detectFlashPlayer='
			+detectFlashPlayer+'&#38;phpPath='+phpPath+'&#38;movieName='
			+movieName+'&#38;differentVersions='
			+differentVersions+'&#38;subtitleXML='
			+subtitleXML+'&#38;autoSize='
			+autoSize+'&#38;playerWidth='
			+playerWidth+'&#38;playerHeight='
			+playerHeight+'&#38;bufferTime='
			+bufferTime+'&#38;autoStart='
			+autoStart+'&#38;endBehaviour='
			+endBehaviour+'&#38;controls='
			+controls+'&#38;screenBorder='
			+screenBorder+'&#38;controlsY='
			+controlsY+'&#38;stopButton='
			+stopButton+'&#38;rewindFastForwardButtons='
			+rewindFastForwardButtons+'&#38;subButton='
			+subButton+'&#38;volumeSlider='
			+volumeSlider+'&#38;playerColor='+playerColor+'&#38;playbarColor='+playbarColor+'&#38;timeColor='+timeColor+'&#38;barColor='+barColor+'&#38;buttonsColor='+buttonsColor+'&#38;screenBorderColor='+screenBorderColor+'&#38;subColor='+subColor+'&#38;subButtonOffColor='+subButtonOffColor+'&#38;subBackgroundColor='+subBackgroundColor+'&#38;subBackgroundAlpha='+subBackgroundAlpha+'&#38;backgroundColor='+backgroundColor+'&#38;backgroundAlpha='+backgroundAlpha+'&#38;subBackground='+subBackground+'&#38;subVisible='+subVisible+'&#38;subFontSize='+subFontSize+'&#38;autohideSubBackground='+autohideSubBackground+'&#38;volume='+volume+'&#38;commercialText='+commercialText+'&#38;commercialTextColor='+commercialTextColor+'&#38;commercialTextBold='+commercialTextBold+'&#38;bufferTextBackgroundColor='+bufferTextBackgroundColor+'&#38;bufferTextBackgroundAlpha='+bufferTextBackgroundAlpha+'&#38;bufferTextColor='+bufferTextColor+'&#38;bufferTextPosition='+bufferTextPosition+'&#38;bufferText='+bufferText+'&#38;timeFormat='+timeFormat+'&#38;logo='+logo+'&#38;logoPath='+logoPath+'&#38;logoPosition='+logoPosition+'&#38;logoAlpha='+logoAlpha+'&#38;logo_x='+logo_x+'&#38;logo_y='+logo_y+'&#38;controlsBarPress='+controlsBarPress+'&#38;bufferMessage='+bufferMessage+'&#38;showTimecode='+showTimecode+'&#38;subAlign='+subAlign+'&#38;rw_ff_interval='+rw_ff_interval+'&#38;stopButtonFirst='+stopButtonFirst+'&#38;detectPopUpTitle='+detectPopUpTitle+'&#38;detectPopUpText1='+detectPopUpText1+'&#38;detectPopUpText2='+detectPopUpText2+'&#38;detectPopUpButton1='+detectPopUpButton1+'&#38;detectPopUpButton2='+detectPopUpButton2+'&#38;bandwidthDetectPopUpTitle='+bandwidthDetectPopUpTitle+'&#38;bandwidthDetectPopUpText1='+bandwidthDetectPopUpText1+'&#38;bandwidthDetectPopUpText2='+bandwidthDetectPopUpText2+'&#38;bandwidthSelectPopUpTitle='+bandwidthSelectPopUpTitle+'&#38;bandwidthSelectPopUpButton1='+bandwidthSelectPopUpButton1+'&#38;bandwidthSelectPopUpButton2='+bandwidthSelectPopUpButton2+'&#38;bandwidthSelectPopUpButton3='+bandwidthSelectPopUpButton3+'&#38;bandwidthTextForLowBandwidth='+bandwidthTextForLowBandwidth+'&#38;bandwidthTextForMediumBandwidth='+bandwidthTextForMediumBandwidth+'&#38;bandwidthTextForHiBandwidth='+bandwidthTextForHiBandwidth+'&#38;bandwidthSelectPopUpText1='+bandwidthSelectPopUpText1+'&#38;bandwidthSelectPopUpText2='+bandwidthSelectPopUpText2+'&#38;bandwidthSelectPopUpText3='+bandwidthSelectPopUpText3+'&#38;playerColorFullScreen='+playerColorFullScreen+'&#38;barColorFullScreen='+barColorFullScreen+'&#38;playbarColorFullScreen='+playbarColorFullScreen+'&#38;buttonsColorFullScreen='+buttonsColorFullScreen+'&#38;timeColorFullScreen='+timeColorFullScreen+'&#38;backgroundColorFullScreen='+backgroundColorFullScreen+'&#38;backgroundAlphaFullScreen='+backgroundAlphaFullScreen+'&#38;blankLineFullScreen='+blankLineFullScreen+'&#38;controlsYFullScreen='+controlsYFullScreen+'&#38;subColorFullScreen='+subColorFullScreen+'&#38;subBackgroundFullScreen='+subBackgroundFullScreen+'&#38;subBackgroundColorFullScreen='+subBackgroundColorFullScreen+'&#38;subBackgroundAlphaFullScreen='+subBackgroundAlphaFullScreen+'&#38;subFontSizeFullScreen='+subFontSizeFullScreen+'&#38;autohideSubBackgroundFullScreen='+autohideSubBackgroundFullScreen+'&#38;subAlignFullScreen='+subAlignFullScreen+'&#38;speedClipPath='+speedClipPath+'&#38;fullScreenFunction='+fullScreenFunction+'&#38;endFullScreenBackToNormal='+endFullScreenBackToNormal+'&#38;displayBandwidthDetectPopUp='+displayBandwidthDetectPopUp+'&#38;commercialMovieName='+commercialMovieName+'&#38;commercialFunctionClickScreen='+commercialFunctionClickScreen+'&#38;commercialFunctionStart='+commercialFunctionStart+'&#38;loadingMoviePopUpTitle='+loadingMoviePopUpTitle+'&#38;loadingMoviePopUpText='+loadingMoviePopUpText+'&#38;displayLoadingMoviePopUp='+displayLoadingMoviePopUp+'&#38;endJavascriptFunction='+endJavascriptFunction+'&#38;stopCloseConnect='+stopCloseConnect+'&#38;infoPopUpText='
			+infoPopUpText+'&#38;infoPopUpTitle='+infoPopUpTitle+'&#38;displayInfoPopUp='+displayInfoPopUp+'&#38;autoSizeFullScreen='+autoSizeFullScreen+'&#38;pictures='+pictures+'&#38;picturesFolder='+picturesFolder+'&#38;picturesBackgroundColor='+picturesBackgroundColor+'&#38;picturesKeepAspectRatio='+picturesKeepAspectRatio+'&#38;picturesKeepAspectRatioFullScreen='+picturesKeepAspectRatioFullScreen+'&#38;clickOnScreen_useHandCursor='+clickOnScreen_useHandCursor+'&#38;singleClickPlayPause='+singleClickPlayPause+'&#38;screenPlayButton='+screenPlayButton+'&#38;screenPlayButtonAlpha='+screenPlayButtonAlpha+'&#38;screenPlayButtonAlpha='+screenPlayButtonAlpha+'&#38;doubleClickListener='+doubleClickListener+'&#38;bestQuality='+bestQuality+'&#38;smoothing='+smoothing+'&#38;smoothingFullScreen='+smoothingFullScreen+'&#38;deblocking='+deblocking+'&#38;controlsWidthFullScreen='+controlsWidthFullScreen+'&#38;movieTitleForComingNext='+movieTitleForComingNext+'&#38;controlsFullScreen='+controlsFullScreen+'&#38;commercialMessage='+commercialMessage+'&#38;mediaXML='+mediaXML+'&#38;displayListAtStart='+displayListAtStart+'&#38;displayListInFullScreenMode='+displayListInFullScreenMode+'&#38;scrollListener='+scrollListener+'&#38;scrollSize_auto='+scrollSize_auto+'&#38;scrollSize='+scrollSize+'&#38;pictureWidth='+pictureWidth+'&#38;pictureHeight='+pictureHeight+'&#38;listWidth='+listWidth+'&#38;listSpace='+listSpace+'&#38;cellHeight='+cellHeight+'&#38;showDescription='+showDescription+'&#38;showPicture='+showPicture+'&#38;textFontSize='+textFontSize+'&#38;titleFontSize='+titleFontSize+'&#38;titleBold='+titleBold+'&#38;blankLineAfterTitle='+blankLineAfterTitle+'&#38;textColor='+textColor+'&#38;titleColor='+titleColor+'&#38;selectColor='+selectColor+'&#38;selectAlpha='+selectAlpha+'&#38;focusColor='+focusColor+'&#38;focusAlpha='+focusAlpha+'&#38;listButtonsColor='+listButtonsColor+'&#38;listBarColor='+listBarColor+'&#38;skinColor='+skinColor+'&#38;listBackgroundColor='+listBackgroundColor+'&#38;listBackgroundAlpha='+listBackgroundAlpha+'&#38;borderColor='+borderColor+'&#38;spaceBP='+spaceBP+'&#38;spaceBT='+spaceBT+'&#38;spaceAT='+spaceAT+'&#38;spaceTT='+spaceTT+'&#38;listWidthFullScreen='+listWidthFullScreen+'&#38;listSpaceFullScreen='+listSpaceFullScreen+'&#38;cellHeightFullScreen='+cellHeightFullScreen+'&#38;showDescriptionFullScreen='+showDescriptionFullScreen+'&#38;showPictureFullScreen='+showPictureFullScreen+'&#38;textFontSizeFullScreen='+textFontSizeFullScreen+'&#38;titleFontSizeFullScreen='+titleFontSizeFullScreen+'&#38;titleBoldFullScreen='+titleBoldFullScreen+'&#38;blankLineAfterTitleFullScreen='+blankLineAfterTitleFullScreen+'&#38;textColorFullScreen='+textColorFullScreen+'&#38;titleColorFullScreen='+titleColorFullScreen+'&#38;selectColorFullScreen='+selectColorFullScreen+'&#38;selectAlphaFullScreen='+selectAlphaFullScreen+'&#38;focusColorFullScreen='+focusColorFullScreen+'&#38;focusAlphaFullScreen='+focusAlphaFullScreen+'&#38;listButtonsColorFullScreen='+listButtonsColorFullScreen+'&#38;listBarColorFullScreen='+listBarColorFullScreen+'&#38;skinColorFullScreen='+skinColorFullScreen+'&#38;listBackgroundColorFullScreen='+listBackgroundColorFullScreen+'&#38;listBackgroundAlphaFullScreen='+listBackgroundAlphaFullScreen+'&#38;borderColorFullScreen='+borderColorFullScreen+'&#38;spaceBPFullScreen='+spaceBPFullScreen+'&#38;spaceBTFullScreen='+spaceBTFullScreen+'&#38;spaceATFullScreen='+spaceATFullScreen+'&#38;spaceTTFullScreen='+spaceTTFullScreen+'&#38;listButtons='+listButtons+'&#38;border='+border+'&#38;borderFullScreen='+borderFullScreen+'&#38;pictureWidthFullScreen='+pictureWidthFullScreen+'&#38;pictureHeightFullScreen='+pictureHeightFullScreen+'&#38;displayListWhenEnteringFullScreenMode='+displayListWhenEnteringFullScreenMode+'&#38;scrollAirSkin='+scrollAirSkin+'&#38;startBehaviour='+startBehaviour,
			"menu","false",
			"width", swfWidth,
			"height", swfHeight,
			"align", "middle",
			"id", swfID,
			"quality", "high",
			"bgcolor", swfBackgroundColor,
			"name", swfID,
			"allowFullScreen","true",
			"allowScriptAccess","always",
			"type", "application/x-shockwave-flash",
			'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
}

/** 
*   PAR LIONEL
*   UTILISER LA FONCTION CI-DESSOUS POUR LE PLAYER AVEC MEDIALIST (remplir le XML en consequence !)
*   -> Penser Ã  renseigner le chemin vers le fichier XML plus haut dans ce fichier
**/
/*function createObject() {

AC_FL_RunContent(
			"src", swfPath,
			"FlashVars", "version_hi_value="+version_hi_value+'&#38;version_medium_value='
			+version_medium_value+'&#38;version_low_value='+version_low_value
			+'&#38;version_hi_extension='+version_hi_extension
			+'&#38;version_medium_extension='+version_medium_extension
			+'&#38;version_low_extension='+version_low_extension+'&#38;detectFlashPlayer='
			+detectFlashPlayer+'&#38;phpPath='+phpPath+'&#38;movieName='
			+movieName+'&#38;differentVersions='
			+differentVersions+'&#38;subtitleXML='
			+subtitleXML+'&#38;autoSize='
			+autoSize+'&#38;playerWidth='
			+playerWidth+'&#38;playerHeight='
			+playerHeight+'&#38;bufferTime='
			+bufferTime+'&#38;autoStart='
			+autoStart+'&#38;endBehaviour='
			+endBehaviour+'&#38;controls='
			+controls+'&#38;screenBorder='
			+screenBorder+'&#38;controlsY='
			+controlsY+'&#38;stopButton='
			+stopButton+'&#38;rewindFastForwardButtons='
			+rewindFastForwardButtons+'&#38;subButton='
			+subButton+'&#38;volumeSlider='
			+volumeSlider+'&#38;playerColor='+playerColor+'&#38;playbarColor='+playbarColor+'&#38;timeColor='+timeColor+'&#38;barColor='+barColor+'&#38;buttonsColor='+buttonsColor+'&#38;screenBorderColor='+screenBorderColor+'&#38;subColor='+subColor+'&#38;subButtonOffColor='+subButtonOffColor+'&#38;subBackgroundColor='+subBackgroundColor+'&#38;subBackgroundAlpha='+subBackgroundAlpha+'&#38;backgroundColor='+backgroundColor+'&#38;backgroundAlpha='+backgroundAlpha+'&#38;subBackground='+subBackground+'&#38;subVisible='+subVisible+'&#38;subFontSize='+subFontSize+'&#38;autohideSubBackground='+autohideSubBackground+'&#38;volume='+volume+'&#38;commercialText='+commercialText+'&#38;commercialTextColor='+commercialTextColor+'&#38;commercialTextBold='+commercialTextBold+'&#38;bufferTextBackgroundColor='+bufferTextBackgroundColor+'&#38;bufferTextBackgroundAlpha='+bufferTextBackgroundAlpha+'&#38;bufferTextColor='+bufferTextColor+'&#38;bufferTextPosition='+bufferTextPosition+'&#38;bufferText='+bufferText+'&#38;timeFormat='+timeFormat+'&#38;logo='+logo+'&#38;logoPath='+logoPath+'&#38;logoPosition='+logoPosition+'&#38;logoAlpha='+logoAlpha+'&#38;logo_x='+logo_x+'&#38;logo_y='+logo_y+'&#38;controlsBarPress='+controlsBarPress+'&#38;bufferMessage='+bufferMessage+'&#38;showTimecode='+showTimecode+'&#38;subAlign='+subAlign+'&#38;rw_ff_interval='+rw_ff_interval+'&#38;stopButtonFirst='+stopButtonFirst+'&#38;detectPopUpTitle='+detectPopUpTitle+'&#38;detectPopUpText1='+detectPopUpText1+'&#38;detectPopUpText2='+detectPopUpText2+'&#38;detectPopUpButton1='+detectPopUpButton1+'&#38;detectPopUpButton2='+detectPopUpButton2+'&#38;bandwidthDetectPopUpTitle='+bandwidthDetectPopUpTitle+'&#38;bandwidthDetectPopUpText1='+bandwidthDetectPopUpText1+'&#38;bandwidthDetectPopUpText2='+bandwidthDetectPopUpText2+'&#38;bandwidthSelectPopUpTitle='+bandwidthSelectPopUpTitle+'&#38;bandwidthSelectPopUpButton1='+bandwidthSelectPopUpButton1+'&#38;bandwidthSelectPopUpButton2='+bandwidthSelectPopUpButton2+'&#38;bandwidthSelectPopUpButton3='+bandwidthSelectPopUpButton3+'&#38;bandwidthTextForLowBandwidth='+bandwidthTextForLowBandwidth+'&#38;bandwidthTextForMediumBandwidth='+bandwidthTextForMediumBandwidth+'&#38;bandwidthTextForHiBandwidth='+bandwidthTextForHiBandwidth+'&#38;bandwidthSelectPopUpText1='+bandwidthSelectPopUpText1+'&#38;bandwidthSelectPopUpText2='+bandwidthSelectPopUpText2+'&#38;bandwidthSelectPopUpText3='+bandwidthSelectPopUpText3+'&#38;playerColorFullScreen='+playerColorFullScreen+'&#38;barColorFullScreen='+barColorFullScreen+'&#38;playbarColorFullScreen='+playbarColorFullScreen+'&#38;buttonsColorFullScreen='+buttonsColorFullScreen+'&#38;timeColorFullScreen='+timeColorFullScreen+'&#38;backgroundColorFullScreen='+backgroundColorFullScreen+'&#38;backgroundAlphaFullScreen='+backgroundAlphaFullScreen+'&#38;blankLineFullScreen='+blankLineFullScreen+'&#38;controlsYFullScreen='+controlsYFullScreen+'&#38;subColorFullScreen='+subColorFullScreen+'&#38;subBackgroundFullScreen='+subBackgroundFullScreen+'&#38;subBackgroundColorFullScreen='+subBackgroundColorFullScreen+'&#38;subBackgroundAlphaFullScreen='+subBackgroundAlphaFullScreen+'&#38;subFontSizeFullScreen='+subFontSizeFullScreen+'&#38;autohideSubBackgroundFullScreen='+autohideSubBackgroundFullScreen+'&#38;subAlignFullScreen='+subAlignFullScreen+'&#38;speedClipPath='+speedClipPath+'&#38;fullScreenFunction='+fullScreenFunction+'&#38;endFullScreenBackToNormal='+endFullScreenBackToNormal+'&#38;displayBandwidthDetectPopUp='+displayBandwidthDetectPopUp+'&#38;commercialMovieName='+commercialMovieName+'&#38;commercialFunctionClickScreen='+commercialFunctionClickScreen+'&#38;commercialFunctionStart='+commercialFunctionStart+'&#38;loadingMoviePopUpTitle='+loadingMoviePopUpTitle+'&#38;loadingMoviePopUpText='+loadingMoviePopUpText+'&#38;displayLoadingMoviePopUp='+displayLoadingMoviePopUp+'&#38;endJavascriptFunction='+endJavascriptFunction+'&#38;stopCloseConnect='+stopCloseConnect+'&#38;infoPopUpText='
			+infoPopUpText+'&#38;infoPopUpTitle='+infoPopUpTitle+'&#38;displayInfoPopUp='+displayInfoPopUp+'&#38;autoSizeFullScreen='+autoSizeFullScreen+'&#38;pictures='+pictures+'&#38;picturesFolder='+picturesFolder+'&#38;picturesBackgroundColor='+picturesBackgroundColor+'&#38;picturesKeepAspectRatio='+picturesKeepAspectRatio+'&#38;picturesKeepAspectRatioFullScreen='+picturesKeepAspectRatioFullScreen+'&#38;clickOnScreen_useHandCursor='+clickOnScreen_useHandCursor+'&#38;singleClickPlayPause='+singleClickPlayPause+'&#38;screenPlayButton='+screenPlayButton+'&#38;screenPlayButtonAlpha='+screenPlayButtonAlpha+'&#38;screenPlayButtonAlpha='+screenPlayButtonAlpha+'&#38;doubleClickListener='+doubleClickListener+'&#38;bestQuality='+bestQuality+'&#38;smoothing='+smoothing+'&#38;smoothingFullScreen='+smoothingFullScreen+'&#38;deblocking='+deblocking+'&#38;controlsWidthFullScreen='+controlsWidthFullScreen+'&#38;movieTitleForComingNext='+movieTitleForComingNext+'&#38;controlsFullScreen='+controlsFullScreen+'&#38;commercialMessage='+commercialMessage+'&#38;mediaXML='+mediaXML+'&#38;displayListAtStart='+displayListAtStart+'&#38;displayListInFullScreenMode='+displayListInFullScreenMode+'&#38;scrollListener='+scrollListener+'&#38;scrollSize_auto='+scrollSize_auto+'&#38;scrollSize='+scrollSize+'&#38;pictureWidth='+pictureWidth+'&#38;pictureHeight='+pictureHeight+'&#38;listWidth='+listWidth+'&#38;listSpace='+listSpace+'&#38;cellHeight='+cellHeight+'&#38;showDescription='+showDescription+'&#38;showPicture='+showPicture+'&#38;textFontSize='+textFontSize+'&#38;titleFontSize='+titleFontSize+'&#38;titleBold='+titleBold+'&#38;blankLineAfterTitle='+blankLineAfterTitle+'&#38;textColor='+textColor+'&#38;titleColor='+titleColor+'&#38;selectColor='+selectColor+'&#38;selectAlpha='+selectAlpha+'&#38;focusColor='+focusColor+'&#38;focusAlpha='+focusAlpha+'&#38;listButtonsColor='+listButtonsColor+'&#38;listBarColor='+listBarColor+'&#38;skinColor='+skinColor+'&#38;listBackgroundColor='+listBackgroundColor+'&#38;listBackgroundAlpha='+listBackgroundAlpha+'&#38;borderColor='+borderColor+'&#38;spaceBP='+spaceBP+'&#38;spaceBT='+spaceBT+'&#38;spaceAT='+spaceAT+'&#38;spaceTT='+spaceTT+'&#38;listWidthFullScreen='+listWidthFullScreen+'&#38;listSpaceFullScreen='+listSpaceFullScreen+'&#38;cellHeightFullScreen='+cellHeightFullScreen+'&#38;showDescriptionFullScreen='+showDescriptionFullScreen+'&#38;showPictureFullScreen='+showPictureFullScreen+'&#38;textFontSizeFullScreen='+textFontSizeFullScreen+'&#38;titleFontSizeFullScreen='+titleFontSizeFullScreen+'&#38;titleBoldFullScreen='+titleBoldFullScreen+'&#38;blankLineAfterTitleFullScreen='+blankLineAfterTitleFullScreen+'&#38;textColorFullScreen='+textColorFullScreen+'&#38;titleColorFullScreen='+titleColorFullScreen+'&#38;selectColorFullScreen='+selectColorFullScreen+'&#38;selectAlphaFullScreen='+selectAlphaFullScreen+'&#38;focusColorFullScreen='+focusColorFullScreen+'&#38;focusAlphaFullScreen='+focusAlphaFullScreen+'&#38;listButtonsColorFullScreen='+listButtonsColorFullScreen+'&#38;listBarColorFullScreen='+listBarColorFullScreen+'&#38;skinColorFullScreen='+skinColorFullScreen+'&#38;listBackgroundColorFullScreen='+listBackgroundColorFullScreen+'&#38;listBackgroundAlphaFullScreen='+listBackgroundAlphaFullScreen+'&#38;borderColorFullScreen='+borderColorFullScreen+'&#38;spaceBPFullScreen='+spaceBPFullScreen+'&#38;spaceBTFullScreen='+spaceBTFullScreen+'&#38;spaceATFullScreen='+spaceATFullScreen+'&#38;spaceTTFullScreen='+spaceTTFullScreen+'&#38;listButtons='+listButtons+'&#38;border='+border+'&#38;borderFullScreen='+borderFullScreen+'&#38;pictureWidthFullScreen='+pictureWidthFullScreen+'&#38;pictureHeightFullScreen='+pictureHeightFullScreen+'&#38;displayListWhenEnteringFullScreenMode='+displayListWhenEnteringFullScreenMode+'&#38;scrollAirSkin='+scrollAirSkin+'&#38;startBehaviour='+startBehaviour,
			"menu","false",
			"width", swfWidth,
			"height", swfHeight,
			"align", "middle",
			"id", swfID,
			"quality", "high",
			"bgcolor", swfBackgroundColor,
			"name", swfID,
			"allowFullScreen","true",
			"allowScriptAccess","always",
			"type", "application/x-shockwave-flash",
			'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
}*/



// CONTROL FLASH FROM JAVASCRIPT
function RMP_play() {
	getMovieName(swfID).RMP_play(); 
}
function RMP_pause() {
	getMovieName(swfID).RMP_pause(); 
}
function RMP_stop() {
	getMovieName(swfID).RMP_stop(); 
}
function RMP_seek(val) {
	getMovieName(swfID).RMP_seek(val); 
}
function RMP_load(movie,sub,chapters,autostart) {
	getMovieName(swfID).RMP_load(movie,sub,chapters,autostart); 
}
function RMP_loadWithCommercial(commercial,movie,movieTitle,sub,chapters,autostart) {
	getMovieName(swfID).RMP_loadWithCommercial(commercial,movie,movieTitle,sub,chapters,autostart); 
}
function RMP_showSubtitles() {
	getMovieName(swfID).RMP_showSubtitles(); 
}
function RMP_hideSubtitles() {
	getMovieName(swfID).RMP_hideSubtitles(); 
}
function RMP_showControls() {
	getMovieName(swfID).RMP_showControls(); 
}
function RMP_hideControls() {
	getMovieName(swfID).RMP_hideControls(); 
}
function RMP_setVolume(vol) {
	getMovieName(swfID).RMP_setVolume(vol); 
}
function RMP_mute() {
	getMovieName(swfID).RMP_mute(); 
}
function RMP_changeSubtitles(subt) {
	getMovieName(swfID).RMP_changeSubtitles(subt); 
}
function RMP_changeSubVersion(subt) {
	getMovieName(swfID).RMP_changeSubVersion(subt); 
}
function RMP_changeProp(x,y,w,h) {
	getMovieName(swfID).RMP_changeProp(x,y,w,h); 
}
function RMP_changeZoom(zoom) {
	getMovieName(swfID).RMP_changeZoom(zoom); 
}
function RMP_changeVersion(ver) {
	getMovieName(swfID).RMP_changeVersion(ver); 
}
function RMP_close() {
	getMovieName(swfID).RMP_close(); 
}
function RMP_showList() {
	getMovieName(swfID).RMP_showList(); 
}
function RMP_hideList() {
	getMovieName(swfID).RMP_hideList(); 
}
function RMP_previousMedia() {
	getMovieName(swfID).RMP_previousMedia(); 
}
function RMP_nextMedia() {
	getMovieName(swfID).RMP_nextMedia(); 
}
function RMP_playMedia(val) {
	getMovieName(swfID).RMP_playMedia(val); 
}
function RMP_loadMediaList(val,autostart) {
	getMovieName(swfID).RMP_loadMediaList(val,autostart); 
}

function getMovieName(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
   }
   else {
       return document[movieName]
   }
}


// CREATE THE FLASH PLAYER
// UNCOMMENT to use the MediaList
//createObject();

