var MenuOK=false;
var agt=navigator.userAgent.toLowerCase();
var vers=parseInt(navigator.appVersion);
if ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))) {
	var b="n";
} 
else if (agt.indexOf("msie") != -1) {
	var b="e";
} 
if (agt.indexOf("mac")!=-1) {
	var plat="mac";
} 
// self.moveTo(0, 0);


function checkBrowser(){

	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;		
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);
	return this;
	
}

bw=new checkBrowser();

var cacherTimer = null;

function makeMenuBar(obj){

   	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval("document.layers." +obj):0;
	this.hideIt=b_hideIt;
	this.showIt=b_showIt;
	this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval("document.layers." +obj):0;
	this.height=bw.ns4?this.css.document.height:this.evnt.offsetHeight;
   	this.obj = obj + "Object"; 	
	eval(this.obj + "=this");

}

function b_showIt(){

	this.css.visibility="visible";
	
}

function b_hideIt(){

	this.css.visibility="hidden";

}

function MenuBarInit(){

	// construction des objets barres de menus
	oMenuS=new Array();
	oMenuS[1]=new makeMenuBar('MenuHome');
	oMenuS[1].evnt.onmouseout=evOut;
	oMenuS[1].evnt.onmouseover=evOver;
	oMenuS[2]=new makeMenuBar('MenuBonus');
	oMenuS[2].evnt.onmouseout=evOut;
	oMenuS[2].evnt.onmouseover=evOver;
	MenuOK=true;

}

function evOut(){

	if(bw.ie4 || bw.dom)
		this.style.visibility='hidden';
	else if(bw.ns4) 
		this.visibility='hidden';

}

function evOver() {

	clearTimeout(cacherTimer);
			
}

function extract(num){

	if (MenuOK){		
		clearTimeout(cacherTimer);
		for(i=1;i<oMenuS.length;i++){
			if(num!=i) 
				oMenuS[i].hideIt();
			}
		oMenuS[num].showIt();
	}
		
}

function sourisOff(num) {

	cacherTimer=setTimeout("cacher("+num+")",2);

}

function cacher(num) {

	if (MenuOK)
		oMenuS[num].hideIt();

}

function ieShow(num){

	if (MenuOK){		
		if(bw.ie4 || bw.dom){
			oMenuS[num].showIt();
			if (bw.ie4){
				window.event.cancelBubble=true;
			}
		}
	}


}


