/********** Browser detection ********************/
function BwCheck(){
	//this.mac   = this.agent.indexOf("Mac")>-1;
	this.pc = (navigator.userAgent.indexOf("win")>-1);
	this.ie = (navigator.appVersion.indexOf("MSIE")>-1) && ((navigator.appVersion.indexOf("5.0")>-1) || (navigator.appVersion.indexOf("6")>-1));
	this.ns = (navigator.vendor) && ((navigator.vendor.toLowerCase() == "netscape") && (navigator.vendorSub >=7));
	this.bw = (this.ie || this.ns);
	return this;
}

var bw = new BwCheck();

/********** Alert Browser **********/
if(!bw.bw){
	var txt = "";
	txt += "Ce document est conçu pour Internet Explorer 5.0+ et Netscape 7.0+.\n";
	txt += "Puisque votre navigateur ne répond pas à ces critères, il est possible que le document html ne s'affiche pas correctement.\n";
	txt += "Le plugiciel Macromedia FLASH 5 est requis pour visualiser ce site.";
	//alert(txt);
}

/********** Centering content ********************/
function centerize(){
	if(bw.bw){
		if(bw.ie){x = document.body.clientWidth}
		if(bw.ns){x = window.innerWidth-2}
		window.document.getElementById('page').style.left = (x/2)-375;
	}
}

window.onresize = centerize;

/*****************************************************/
function flashObj(paramSrc, paramW, paramH, paramBg){
	var html;
	html = "<object type='application/x-shockwave-flash' data='" + paramSrc + "' width='" + paramW + "' height='" + paramH + "'>";
	html += "<param name='movie' value='" + paramSrc + "' />";
	html += "<param name='bgcolor' value='" + paramBg + "' />";
	html += "<param name='quality' value='high' />";
	html += "<param name='menu' value='false' />";
	html += "<param name='scale' value='noscale' />";
	html += "<p class='flashplayer'><a href='http://www.macromedia.com/software/flashplayer/'>Le plugiciel Flash Player est requis pour consulter cette page</a>.</p>";
	html += "</object>";
	document.write(html);
}