/*	
*	pour activer les ActiveX automatiquement la fonction doit etre dans un fichier extérieur 
*	ce fichier centralise toutes les fonctions lançant un player
*/


// audio live - pop-up live multiplex
function lecture_flux_multiplex(video_link,os){
	if (video_link!='vide') {
	   	if(os == 'mac'){			
			html = '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="279" height="63" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
			html += '<param name="qtsrc" value="'+video_link+'">';
			html += '<param name="autoplay" value="true">';
			html += '<param name="CONTROLLER" value="true">';
			html += '<param name="SCALE" value="TOFIT">';
			html += '<param name="TARGET" value="quicktimeplayer">';
			html += '<param name="loop" value="false">';
			html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="279" height="63" scale="tofit" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
			html += '</object>';			
			
		}else{
			html = '<object id="mediaPlayer" width="279" height="63" 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">';
			html += '<param name="fileName" value="'+video_link+'">';
			html += '<param name="autoStart" value="true">';
			html += '<param name="showControls" value="true">';
			html += '<param name="showtracker" value="false">';
			html += '<param name="showstatusbar" value="true">';
			html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="279" height="63" src="'+video_link+'"></embed>';
			html += '</object>';
		}
		document.getElementById('lecteur_player').innerHTML = html;
	}
} 


// radio de moustique
function lecture_video_flux_radio(video_link,os){
	if (video_link!='vide') {
	   	if(os == 'mac'){			
			html = '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="280" height="64" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
			html += '<param name="qtsrc" value="'+video_link+'">';
			html += '<param name="autoplay" value="true">';
			html += '<param name="CONTROLLER" value="true">';
			html += '<param name="SCALE" value="AutoFit">';
			html += '<param name="TARGET" value="quicktimeplayer">';
			html += '<param name="loop" value="false">';
			html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="280" height="64" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
			html += '</object>';			
			
		}else{
			html = '<object id="mediaPlayer" width="280" height="64" 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">';
			html += '<param name="fileName" value="'+video_link+'">';
			html += '<param name="autoStart" value="true">';
			html += '<param name="showControls" value="true">';
			html += '<param name="showtracker" value="false">';
			html += '<param name="showstatusbar" value="true">';
			html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="280" height="64" src="'+video_link+'"></embed>';
			html += '</object>';
		}
		document.getElementById('lecteur_player').innerHTML = html;
	}
} 

// infosport
function lecture_video_flux_infosport(video_link,os){
	if (video_link!='vide')	{
		if(os == 'mac'){
			html = '<table border="0" align="center" style="background-color:#000000;" width="310" height="290"><tr  align="center"><td  align="center">';
			html += '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="310" height="290" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
			html += '<param name="qtsrc" value="'+video_link+'">';
			html += '<param name="autoplay" value="true">';
			html += '<param name="CONTROLLER" value="true">';
			html += '<param name="SCALE" value="AutoFit">';
			html += '<param name="TARGET" value="quicktimeplayer">';
			html += '<param name="loop" value="false">';
			html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="310" height="290" scale="ASPECT" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
			html += '</object>';
			html += '</td></tr></table>';
		}else{
			html = '<object id="mediaPlayer" width="320" height="309" 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">';
			html += '<param name="fileName" value="'+video_link+'">';
			html += '<param name="autoStart" value="true">';
			html += '<param name="showControls" value="true">';
			html += '<param name="showtracker" value="false">';
			html += '<param name="showstatusbar" value="true">';
			html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="320" height="309" src="'+video_link+'"></embed>';
			html += '</object>';
		}
		document.getElementById('fluxPlayer').innerHTML = html;
	}
}

// infosport v2
function lecture_video_flux_infosport_v2(video_link,os){
	if (video_link!='vide')	{
		if(os == 'mac'){
			html = '<table border="0" align="center" style="background-color:#000000;" width="400" height="345"><tr  align="center"><td  align="center">';
			html += '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="400" height="345" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
			html += '<param name="qtsrc" value="'+video_link+'">';
			html += '<param name="autoplay" value="true">';
			html += '<param name="CONTROLLER" value="true">';
			html += '<param name="SCALE" value="AutoFit">';
			html += '<param name="TARGET" value="quicktimeplayer">';
			html += '<param name="loop" value="false">';
			html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="400" height="345" scale="ASPECT" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
			html += '</object>';
			html += '</td></tr></table>';
		}else{
			html = '<object id="mediaPlayer" width="400" height="345" 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">';
			html += '<param name="fileName" value="'+video_link+'">';
			html += '<param name="autoStart" value="true">';
			html += '<param name="showControls" value="true">';
			html += '<param name="showtracker" value="false">';
			html += '<param name="showstatusbar" value="true">';
			html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="400" height="345" src="'+video_link+'"></embed>';
			html += '</object>';
		}
		document.getElementById('fluxPlayer').innerHTML = html;
	}
}

//itele
function lecture_video_flux_itele(video_link,os){
	if (video_link!='vide')	{
		if(os == 'mac'){
			html = '<table border="0" align="center" style="background-color:#000000;" width="310" height="290"><tr  align="center"><td  align="center">';
			html += '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="310" height="290" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
			html += '<param name="qtsrc" value="'+video_link+'">';
			html += '<param name="autoplay" value="true">';
			html += '<param name="CONTROLLER" value="true">';
			html += '<param name="SCALE" value="AutoFit">';
			html += '<param name="TARGET" value="quicktimeplayer">';
			html += '<param name="loop" value="false">';
			html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="310" height="290" scale="ASPECT" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
			html += '</object>';
			html += '</td></tr></table>';
		}else{
			html = '<object id="mediaPlayer" width="320" height="309" 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">';
			html += '<param name="fileName" value="'+video_link+'">';
			html += '<param name="autoStart" value="true">';
			html += '<param name="showControls" value="true">';
			html += '<param name="showtracker" value="false">';
			html += '<param name="showstatusbar" value="true">';
			html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="320" height="309" src="'+video_link+'"></embed>';
			html += '</object>';
		}
		document.getElementById('fluxPlayer').innerHTML = html;
		Display_div('windowPlayer',0);
		Display_div('fluxPlayer',1);
	}
}

//les selection / playlist de
function ecouterAudio(audioId,os){
	document.getElementById('ecouter_'+audioId).style.display='none';
	document.getElementById('lecteur_player_'+audioId).style.display = "block";
   	if(os == 'mac'){
		html = '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="239" height="64" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
		html += '<param name="qtsrc" value="'+video_link+'">';
		html += '<param name="autoplay" value="true">';
		html += '<param name="CONTROLLER" value="true">';
		html += '<param name="SCALE" value="AutoFit">';
		html += '<param name="TARGET" value="quicktimeplayer">';
		html += '<param name="loop" value="false">';
		html += '<embed src="/sample.mov" qtsrc="'+video_link+'" width="239" height="64" scale="ASPECT" autoplay="true" controller="true" pluginspace="http://www.apple.com/quicktime/download/"></embed>';
		html += '</object>';
	}else{
		html = '<object id="mediaPlayer" width="239" height="50" 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">';
		html += '<param name="fileName" value="'+aUrlExtrait[audioId]+'">';
		html += '<param name="autoStart" value="true">';
		html += '<param name="showControls" value="true">';
		html += '<param name="showtracker" value="false">';
		html += '<param name="showstatusbar" value="true">';
		html += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="1" showstatusbar="1" width="239" height="50" src="'+aUrlExtrait[audioId]+'"></embed>';
		html += '</object>';
	}
	document.getElementById('lecteur_player_'+audioId).innerHTML= html;    
}