// JavaScript Document

var genre = "chanson";
var page = "sacretalent";
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


/*CONSOLE*/
	var idItem			= '1';
	var panneauAvant	= '';
	var panneauApres	= '';
	var asx				= '';
	var isVideo			= '';
	var isPremier		= true;

	function setPanneau(sPanneauAvant, sItem, sAsx, sPanneauApres, sIsVideo)
	{
		panneauAvant					= sPanneauAvant;
		$id('videoASX').innerHTML 		= '<img src="' + panneauAvant + '" alt="" border="0" usemap="#play" >';
		$id('a'+idItem).style.display 	= 'none';
		$id('a'+sItem).style.display 	= 'block';
		idItem							= sItem;
		panneauApres					= sPanneauApres;
		asx								= sAsx;
		isVideo							= sIsVideo;

		if (isPremier)
			isPremier = false;
		else
			embedMediaPlayer();
	}

	function embedMediaPlayer()
	{
		var _sUrl 			= asx;
		var _sDiv 			= 'videoASX';
		var _nPlayerWidth	= 482;
		var _nPlayerHeight	= (isVideo==1) ? (270+45) : 45;
		var _isAutoStart	= true;
		var _isShowControls	= true;

		if (isVideo == 1)
			$id(_sDiv).innerHTML = '';
		else
			$id(_sDiv).innerHTML = '<img src="' + panneauApres + '">';
	  
	  //if (browserDetect.OS == "Mac" && !av.needFFM) {
	  if (browserDetect.OS == "Mac") {
	   $id(_sDiv).innerHTML = $id(_sDiv).innerHTML + AC_AX_GetContent(
		'id','player',
		'name', 'player', 
		'type','video/quicktime',
		'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
		'codeBase', 'http://www.apple.com/qtactivex/qtplugin.cab',
		'style','width:'+_nPlayerWidth+'px; height:'+_nPlayerHeight+'px',
		'width', _nPlayerWidth,
		'height', _nPlayerHeight,
		'SRC', _sUrl, 
		'controller', 'true', 
		'bgcolor', 'black', 
		'scale', 'noscale', 
		'EnableJavaScript', 'true', 
		'volume', '50' 
	   );
	  //} else if (browserDetect.OS == "Windows" && !av.needActiveX) {
	  } else if (browserDetect.OS == "Windows") {
	   $id(_sDiv).innerHTML = $id(_sDiv).innerHTML + AC_AX_GetContent(
		'id','player',
		'name', 'player',
		'type','application/x-mplayer2',
		'classid','CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6',
		'codeBase', 'Version=7,0,0,1954',
		'STANDBY', 'Chargement du média...',
		'pluginspage', 'http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/',
		'style','width:'+_nPlayerWidth+'px; height:'+_nPlayerHeight+'px',
		'width', _nPlayerWidth,
		'height', _nPlayerHeight,
		'url', _sUrl,
		'SRC', _sUrl,
		'ShowControls', '1',
		'ShowStatusBar', '0', 
		'autostart',_isAutoStart,
		'uimode',((_isShowControls || _isShowControls==null)?"full":"none"), 
		'scale', 'noscale', 
		'volume', '50'
	   );
	  } else {
	   
	   $id(_sDiv).innerHTML = $id(_sDiv).innerHTML + ''
			   + '<OBJECT'
			   +   ' ID="playerr"'
			   +   ' height="'+_nPlayerHeight+'"'
			   +   ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"'
			   +   ' classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"'
			   +   ' STANDBY="Chargement du média..."'
			   +   ' TYPE="application/x-oleobject"'
			   +  '>'
			   + ' <PARAM name="height" value="'+_nPlayerHeight+'">'
			   + ' <PARAM name="autoStart" value="'+_isAutoStart+'">'
			   + ' <PARAM name="stretchToFit" value="0">'
			   + ' <PARAM name="ShowControls" value="1">'
			   + ' <PARAM name="scale" value="noscale">'
			   + ' <PARAM name="uiMode" value="none">'
			   + ' <PARAM name="URL" value="' + _sUrl + '">'
			   + ' <PARAM name="volume" value="50">'
			   + ' <EMBED'
			   + '   type="application/x-mplayer2"'
			   + '   pluginspage="http://www.microsoft.com/windows/mediaplayer/en/default.asp"'
			   + '   src="' + _sUrl + '"'
			   + '   name="player"'
			   + '   id="player"'
			   + '   height="' + _nPlayerHeight + '"'
			   + '   AutoStart="'+ ((_isAutoStart)?1:0)+'"'
			   + '   ShowControls="1"'
			   + '   ShowStatusBar="1"'
			   + '   stretchtofit="0"'
			   + '   wmode="transparent"'
			   + '   scale="noscale"',
			   + '   uimode="'+((_isShowControls || _isShowControls==null)?"full":"none")+'"',
			   + ' >'
			   + ' </EMBED>'
			   + ' </OBJECT>';
			 
	  }
	 
	 };


