	
//// soulignage la sequence active ////
	function change_sequences(obj){	
		ch_li = document.getElementById('menu_sequences').childNodes;
		for (i=0; i<ch_li.length; i++){ch_li.item(i).className = '';}
		document.getElementById(obj).className = 'encour';
		
	}
/////////////// Communication avec le Flash ///////////////
//// FLASH -> JS ////
	function selectSequence(idSequence){
		//alert("idSequence " + idSequence);
	}

	function selectDiapositive(idNoeudDiapo){
		showDiapositive(idNoeudDiapo);
	}

//// JS -> FLASH ////
	var currentItem ='';	
	var currentPosition = 0;
	var currentState ='';
	var swf='player';		

	// these functions is called by the JavascriptView object of the player.
	function getUpdate(typ,pr1,pr2){
		
		//if(typ == "time"){currentPosition = pr1; pr2 == undefined ? null: currentRemaining = Math.round(pr2);}
		//else if(typ == "volume"){currentVolume = pr1;} 
		//else if(typ == "item"){currentItem = pr1; setTimeout("function(){getItemData(currentItem)}",100)}
		//else if(typ == "state"){currentState = pr1;}
		//else if(typ == "load"){currentLoad = pr1;}
		if(typ == "state"){currentState = pr1;}
		else if(typ == "item"){currentItem = pr1;}
		
		//Debug_Smile(pr1);
	}

	function Debug_Smile(idx){
		/* var objet = thisMovie(swf).itemData(idx);
		var tmp = document.getElementById("left-column_biz"); 
		var html = '';
		
		html += "<font style='color:#00f'><br />***************************************************<br />";
		html += "<i><b>[DEBUG FLASH PLAYER]</b></i><br />";
		/*	
		for(var i in objet) { 
			html += "<font style='color:orange'>"+i+"</font>: "+objet[i]+"<br />";
		}
		
		html += "<font style='color:orange'>objet['<b>sequenceType</b>'] :: </font>"+(objet['sequenceType']?objet['sequenceType']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>idSequence</b>'] :: </font>"+(objet['idSequence']?objet['idSequence']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>start</b>'] :: </font>"+(objet['start']?objet['start']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>duration</b>'] :: </font>"+(objet['duration']?objet['duration']:'')+"<br />";
		
		html += "<br />";

		html += "<font style='color:orange'>objet['<b>fileSave</b>'] :: </font>"+(objet['fileSave']?objet['fileSave']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>idSave</b>'] :: </font>"+(objet['idSave']?objet['idSave']:'')+"<br />";

		html += "<br />";
		
		html += "<font style='color:orange'>objet['<b>file</b>'] :: </font>"+(objet['file']?objet['file']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>id</b>'] :: </font>"+(objet['id']?objet['id']:'')+"<br />";

		html += "<br />";

		html += "<font style='color:orange'>objet['<b>fileHD</b>'] :: </font>"+(objet['fileHD']?objet['fileHD']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>idHD</b>'] :: </font>"+(objet['idHD']?objet['idHD']:'')+"<br />";
		html += "<font style='color:orange'>objet['<b>btHDVisible</b>'] :: </font>"+(objet['btHDVisible']?objet['btHDVisible']:'')+"<br />";
		
		html += "<i><b>[FIN DEBUG FLASH PLAYER]</b></i><br />";
		html += "***************************************************<br /></font>";
		tmp.innerHTML = html;			*/
	}	
	
	function getLength(swf){return(thisMovie(swf).getLength());}

	function gotoTime(time){		
		sendEvent('scrub',time);
		if(currentState == 0 || currentState == 3){
			sendEvent('playpause'); 				
		}
		sendEvent('scrub',time);
	}
	
	function sendEvent(typ,prm){
		thisMovie(swf).sendEvent(typ,prm); 
	}

	function getTimestamp(){return currentPosition;}	 

	// Flash -> JS
	function updateDiapo(id){showDiapositive(id);}

	function updateSequence(id){
		if(!id){
		}else{
			change_sequences("sequence_"+id);
			// thisMovie(swf).itemData(currentItem)['idSequence'] = id;
		}
	}

	function itemData(swf,idx){var obj = thisMovie(swf).itemData(idx);}

	function thisMovie(swf){
		if(navigator.appName.indexOf("Microsoft") != -1){
			return window[swf];
		}else{
			return document[swf];
		}
	}

	function gotoSequence(id){
		if(!id){
		}else{
			change_sequences("sequence_"+id);
			// thisMovie(swf).itemData(currentItem)['idSequence'] = id;
		}
	}	

	function stopMedia()  // necessite xiti.js
	{ 
		if(!xtdata) return;

		if(xtdata[3]=="play" || xtdata[3]=="pause")  // on est en cours de lecture ou pause
		{
		    //var i = new Image();i.src= 'http://myrecorder.free.fr/tmp/xiti.php';

			xt_med(	
				xtdata[0],xtdata[1],xtdata[2],
				"stop",
				xtdata[4],xtdata[5],xtdata[6],xtdata[7]); 
		}
	}
