function ShowHidePopup(nameRecette, PathVideo, DetailRecette, LienProduit, CategoryColor) {
	var popupExt = $("#popinContener");
	if (popupExt != null) {
		if (popupExt._popupVisible) {
			popupExt.hide();
		}else{
			//if(screen.height < 770) {
				$(".video_popin").css("margin-top","0");
			//}
		   scroll(0,0);
			popupExt.show();		
		   $("#marque").css("visibility", "hidden");                  
         $("#detailrecette").html(DetailRecette);
  		   $("#nomrecette").html(nameRecette);
		   $("#lienproduit").attr("href", LienProduit);
		   $("#player").attr("src",PathVideo);
	     	popupExt.css("width",screen.width);
			$("html").css("overflow","hidden");
			flash(PathVideo, CategoryColor);
		}
	}
}
$(document).ready(function() {
	$("#close_popin").click(function(){
		$("#popinContener").hide();
		$("html").css("overflow-y","auto");	
		$("#marque").css("visibility", "visible");
	});
});


function flash(PathVideo, CategoryColor) {
	var so = new SWFObject("/app_themes/common/swf/clv_player.swf", "player", "480", "410", "8", "#000000");
			so.useExpressInstall("/app_themes/common/swf/expressinstall.swf");
			/*so.addParam("wmode", "transparent");*/
			so.addVariable("videourl", PathVideo);
			//so.addVariable("controlcolor", "0x2eb2f6");
			so.addVariable("controlcolor", "0x"+CategoryColor);
			so.addVariable("bgcolor", "0x000000");
			so.addParam("allowFullScreen", "true");
	//		so.addParam("AllowScriptAccess", "always");
			so.write("playerPopin");
}
