function MBtoFullScreen(paramObject){
	var MBF = document.getElementById("mediaBoxFlash");//correction bug FF
	if(MBF.src){
		MBF.src = MBF.src.split("?")[0];
		MBF.src = MBF.src + "?screenSize=" + paramObject.screenSize + "&selectedItemId=" + paramObject.selectedItemId;
	}

	var MB = document.getElementById("MediaBoxParent");
	MB.style.position = "absolute";
	MB.style.top = 0;
	MB.style.left = 0;
	if (typeof(window.innerHeight) == 'number') {
		var H = window.innerHeight + "px";
		if(navigator.userAgent.indexOf("Firefox") != -1){
			var H = "98%";//bug scrollbars FF
		}
	} else if (document.documentElement && document.documentElement.clientHeight) {
		var H = document.documentElement.clientHeight + "px";
	} else if (document.body && document.body.offsetHeight) {
		var H = document.body.offsetHeight + "px";
	}
	if (typeof(window.innerWidth) == 'number') {
		var W = window.innerWidth + "px";
		if(navigator.userAgent.indexOf("Firefox") != -1){
			var W = "98%";//bug scrollbars FF
		}
	} else if (document.documentElement && document.documentElement.clientWidth) {
		if(navigator.userAgent.indexOf("Firefox") != -1){
			var W = 887+ "px";
		}
		else{
			var W = 887+ "px";
		}
	} else if (document.body && document.body.offsetWidth) {
		var W = document.body.offsetWidth + "px";
	}


	if(navigator.userAgent.indexOf("Firefox") != -1){
			var W = 887+ "px";
			var H = "98%";
		}
		else{
			var W = 887+ "px";
			if (document.documentElement && document.documentElement.clientHeight) {
				var H = document.documentElement.clientHeight + "px";
			} else if (document.body && document.body.offsetHeight) {
				var H = document.body.offsetHeight + "px";
			}
		}
	MB.style.height = H;
	MB.style.width = W;
	MB.style.zIndex = 199;
	
	MBF.style.width=W;
	MBF.style.height=H;

	window.scrollTo(0,0);

	document.body.style.height = H;
	if(navigator.userAgent.indexOf("Firefox") != -1){

		}
	else{
		document.body.style.overflow = "hidden";
	}


	return W + "/" + H;//bug IE
}
function MBoriginalSize(paramObject){

	//MBC = document.getElementById("mediaboxGrandParent");
	//MBC.style.position = "relative";

	var MBF = document.getElementById("mediaBoxFlash");//correction bug FF
	if(MBF.src){
		MBF.src = MBF.src.split("?")[0];
		MBF.src = MBF.src + "?screenSize=244/190&selectedItemId=" + paramObject.selectedItemId;
	}
	
	MBF.style.width="244px";
	MBF.style.height="190px";
	
	MB = document.getElementById("MediaBoxParent");
	MB.style.width = "244px";
	MB.style.height = "190px";
	MB.style.position = "relative";
	MB.style.zIndex = 1;

	//document.body.style.height = "auto";
	//document.body.style.overflow = "auto";

	return "244/190";//bug IE
}

function createMediaBox(xmlfile,actif,couleur){

	if(actif == 0){
		var bgColor = "#595A5C";
		var mbHTML = '<div id="mediaboxGrandParent" style="background:#595A5C;">';
	}else{
		var bgColor = "#F9F9F9";
		var mbHTML = '<div id="mediaboxGrandParent" style="background:#F9F9F9;">';
	}

	mbHTML += '<div id="MediaBoxParent"><div id="MediaBox" style="width:100%;height:100%;"></div></div></div>';


	document.write(mbHTML);
	MB = document.getElementById("MediaBoxParent");
	MB.style.width = "244px";
	MB.style.height = "190px";

	var so = new SWFObject("/extension/smiledesignlagardere/design/lagardere/images/flash/mediaBox.swf?screenSize=244/190&selectedItemId=0", "mediaBoxFlash", "100%", "100%", "8", bgColor);
	so.addVariable("xmlfile", xmlfile);
	so.addVariable("actif", actif);
	so.addVariable("couleur", couleur);
	so.setAttribute("doExpressInstall", "true");
	so.write("MediaBox");
}

function createMenu(xmlfile,mediafile){
	document.write('<div id="MenuParent" style="margin:0px;"><div id="MenuFlash" style="float:right;width:260px;height:317px;"></div></div>');
	MB = document.getElementById("MenuParent");
	MB.style.width = "260 px";
	MB.style.height = "317px";
	var so = new SWFObject("extension/smiledesignlagardere/design/lagardere/images/flash/menu.swf", "myMenuFlash", "260", "317", "8");
	so.addVariable("xmlfile", xmlfile);
	so.addVariable("xmlvisionneuse", mediafile);
	so.addParam("wmode", "transparent");
	so.setAttribute("doExpressInstall", "true");
	so.write("MenuFlash");
}