// JavaScript Document
function ouvrirVideo(nomVideo, debit, mode, fullPath) {

	//////////////////////////////////////////////////////////////////
	/////////////////////////////////////////////////////////////////
	//////////    Variables à renseigner pour atteindre la vidéo////
	///////////////////////////////////////////////////////////////
	
	//new link on the same server
	var videoURL_WMV_HAUT = nomVideo + "_haut.wmv";
	
	//var videoURL_WMV_HAUT = nomVideo + "_haut.wvx"; ////// --- Vidéo Windows Media Haut débit
	var videoURL_WMV_BAS = nomVideo + "_bas.wvx"; ////// --- Vidéo Windows Media Bas débit

	var videoURL_RM_HAUT = nomVideo + "_haut.rpm"; ////// ----> Penser à créer un fichier RPM pour chaque vidéos REAL
	var videoURL_RM_BAS = nomVideo + "_bas.rpm"; ////// ----> Penser à créer un fichier RPM pour chaque vidéos REAL
	
	////////////////////////////////////////////////////////////
	/// NE RIEN MODIFIER CI DESSOUS ///////////////////////////
	//////////////////////////////////////////////////////////

if ((debit == "bas") && (mode == "wmv")) {
		document.write ("<OBJECT ID=\"MediaPlayer1\" width=\"192\" height=\"189\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase= \"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft® Windows® Media Player components...\" type=\"application/x-oleobject\">");
		document.write ("<PARAM NAME=\"AutoStart\" VALUE=\"true\">");
		document.write ("<PARAM NAME=\"FileName\" VALUE=\"" + videoURL_WMV_BAS + "\">");
		document.write ("<PARAM NAME=\"ShowControls\" VALUE=\"true\">");
		document.write ("<PARAM NAME=\"ShowStatusBar\" VALUE=\"false\">");
		document.write ("<EMBED type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/\" SRC=\"" + videoURL_WMV_BAS + "\" name=\"MediaPlayer1\" width=\"192\" height=\"189\" autostart=\"1\" showcontrols=\"1\" ShowStatusBar=\"0\" swLiveConnect=\"true\">");
		document.write ("</EMBED>");
		document.write ("</OBJECT>");
	} else if ((debit == "haut") && (mode == "wmv")){
				document.write ("<OBJECT ID=\"MediaPlayer1\" width=\"320\" height=\"289\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase= \"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft® Windows® Media Player components...\" type=\"application/x-oleobject\">");
		document.write ("<PARAM NAME=\"AutoStart\" VALUE=\"true\">");
		document.write ("<PARAM NAME=\"FileName\" VALUE=\"" + videoURL_WMV_HAUT + "\">");
		document.write ("<PARAM NAME=\"ShowControls\" VALUE=\"true\">");
		document.write ("<PARAM NAME=\"ShowStatusBar\" VALUE=\"false\">");
		document.write ("<PARAM NAME=\"stretchToFit \" VALUE=\"True\">");
		document.write ("<EMBED type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/\" SRC=\"" + videoURL_WMV_HAUT + "\" name=\"MediaPlayer1\" width=\"320\" height=\"289\" autostart=\"1\" showcontrols=\"1\" ShowStatusBar=\"0\" swLiveConnect=\"true\">");
		document.write ("</EMBED>");
		document.write ("</OBJECT>");
	} else if ((debit == "bas") && (mode == "rm")) {
		//alert ("Lit RM bas
		document.write ('<object ID="vid" name="vid" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="192" HEIGHT="144">');
		document.write ('<param name="CONTROLS" value="ImageWindow">');
		document.write ('<param name="AUTOSTART" value="1">');
		document.write ('<param name="NOLABELS" value="TRUE">');
		document.write ('<param name="RESET" value="FALSE">');
		document.write ('<param name="CONSOLE" value="cons">');
		document.write ('<param name="SRC" value="'+ videoURL_RM_BAS + '">');
		document.write ('<embed type="audio/x-pn-realaudio-plugin" src="'+ videoURL_RM_BAS + '" name="vid" width="192" height="144" console="cons" controls="ImageWindow" autostart="true" nolabels="true"></embed>');
		document.write ('</object>');
		document.write('<object id="vid" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="200" height="36">');
		document.write('<param name="SRC" value="'+ videoURL_RM_BAS + '">');
		document.write('<param name="CONTROLS" value="ControlPanel">');
		document.write(' <param name="CONSOLE" value="cons">');
		document.write('<embed src="'+ videoURL_RM_BAS + '" type="audio/x-pn-realaudio-plugin" width="200" height="36" controls="ControlPanel" console="cons">');
		document.write(' </object>');
	} else if ((debit == "haut") && (mode == "rm")){
		//alert ("Lit RM haut");
		document.write ('<object ID="vid" name="vid" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="320" HEIGHT="240">');
		document.write ('<param name="CONTROLS" value="ImageWindow">');
		document.write ('<param name="AUTOSTART" value="1">');
		document.write ('<param name="NOLABELS" value="TRUE">');
		document.write ('<param name="RESET" value="FALSE">');
		document.write ('<param name="CONSOLE" value="cons">');
		document.write ('<param name="SRC" value="'+ videoURL_RM_HAUT + '">');
		document.write ('<embed type="audio/x-pn-realaudio-plugin" src="'+ videoURL_RM_HAUT + '" name="vid" width="320" height="240" console="cons" controls="ImageWindow" autostart="true" nolabels="true"></embed>');
		document.write ('</object>');
		
		document.write('<object id="vid" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="36">');
		document.write('<param name="SRC" value="'+ videoURL_RM_HAUT + '">');
		document.write('<param name="CONTROLS" value="ControlPanel">');
		document.write(' <param name="CONSOLE" value="cons">');
		document.write('<embed src="'+ videoURL_RM_HAUT + '" type="audio/x-pn-realaudio-plugin" width="320" height="36" controls="ControlPanel" console="cons">');
		document.write(' </object>');
	}
	
}