// JavaScript Document
function genereSWF(swf, dest, flashvars, width, height) {
  if (document.getElementById(dest)) {	  
    document.getElementById(dest).innerHTML = ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+swf+'" /><param name="allowScriptAccess" value="sameDomain"><param name="flashvars" value="'+flashvars+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed allowScriptAccess="sameDomain" src="'+swf+'" flashvars="'+flashvars+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>');
	  
    }
}
function updatePositionFullScreen(){
	pleinEcran=document.getElementById('receptPleinEcran');
	pleinEcran.style.top = 0 + document.documentElement.scrollTop; 	
}
function affichagePleinEcran(flashvars, divAppelant){
	if (divAppelant=="undefined"){
	document.getElementById('receptVideo1').style.display="none";	
	}else{
	document.getElementById(divAppelant).style.display="none";			
	}
	document.getElementById('receptPleinEcran').style.display="block";
	genereSWF("swf/playerVideoFullScreen.swf", "receptPleinEcran", flashvars, '100%', '100%');
	is_ie = ( /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) );  
	is_ie5 = ( is_ie && /msie 5\.0/i.test(navigator.userAgent) ); 
	is_ie7up = ( is_ie && parseFloat(navigator.userAgent.replace(/.*msie ([0-9]+).*/i, "$1" )) >= 7 ); 
	if (is_ie && !is_ie7up) {	
	window.onscroll=updatePositionFullScreen;
	window.onresize=updatePositionFullScreen;
	updatePositionFullScreen();
	}
}
function masquePleinEcran(flashvars, divAppelant){
	document.getElementById('receptPleinEcran').style.display="none";
	if (divAppelant=="undefined"){
	document.getElementById('receptVideo1').style.display="block";	
	}else{
	document.getElementById(divAppelant).style.display="block";			
	}
	//genereSWF('playerMultiVideo.swf', 'receptVisionneuse', flashvars, 850, 450)
	}
