function getParam(param_str) {
	temp_array = new Array();
	urlParam = window.location.search.substring(1);
	aTempParam = new Array();
	aTempParam = urlParam.split("&");
	for(i=0; i < aTempParam.length; i++) {
		strId = aTempParam[i].split("=")[0];
		strValue = aTempParam[i].split("=")[1];
		temp_array[strId] = strValue;
	}
	if(param_str != undefined) {
		if(temp_array[param_str] == undefined) {
			return "";
		}
		else {
			return temp_array[param_str];
		}
	}
	else {
		return temp_array;
	}
}
//
function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//

function getFlashObject() {
	var so = new SWFObject("engine/engine.swf", "main", "100%", "100%", "8,0,0,0", "#FFFFFF", true);  
	
	// ExpressInstall
	so.useExpressInstall('engine/expressinstall/expressinstall.swf');
	
	so.addParam("xiRedirectUrl", window.location);
	so.addParam("quality", "high");
	so.addParam("allowScriptAccess", "always");
	so.addParam("loop", false);
	so.addParam("menu", false); 
	so.addParam("scale", "noScale");
	so.addParam("salign", "t");
	so.addParam("align", "middle");


	//so.addParam("wmode", "window");
	
	// Common FlashVars
	so.addVariable("fv_trace_bool", "true"); // Si on veut l'affichage des traces ou pas
	so.addVariable("fv_urlConfigurationXml", "engine/data/configuration.xml"); // L'url de configuration.xml
	
	//Special FlashVars
	so.addVariable("fv_section", getQueryParamValue("s")); // Section ID
	so.addVariable("fv_subsection", getQueryParamValue("ss")); // Subsection ID

	//
	so.addVariable("fv_sound", getQueryParamValue("sound")); // Section ID
	
	return so;
}

function openRules() {
	window.open("pdf/Lesieur_calendrier_avent_09.pdf", "_blank");
}
