if (window.captureEvents){
window.captureEvents(Event.MOUSEOVER);
window.onmouseover=test;
}
else
document.onmouseover=test;


function test(e) {
	if(window.event)
		e = window.event;
		
	var target = e.target || e.srcElement;
	if((target.nodeName == 'DIV' && target.id.match(/bt/)) || target.nodeName == 'A')
		{
			//alert(target.nodeName);
			if(target.nodeName === 'A')
				target = target.parentNode;

			var id = target.id;
			if(id=="bt0" && arr!=id) {off();arr=id;stp="";}
			if(id=="bt1" && arr!=id) {off();cons(chef,1,55);arr=id;stp="";} 
			if(id=="bt2" && arr!=id) {off();cons(traiteur,2,190);arr=id;stp="";}
			if(id=="bt3" && arr!=id) {off();cons(cours,3,350);arr=id;stp="";}
			if(id=="bt4" && arr!=id) {off();cons(partenariat,4,480);arr=id;stp="";}
			if(id=="bt5" && arr!=id) {off();cons(rejoindre,5,620);arr=id;stp="";}
			if(id=="bt6" && arr!=id) {off();cons(media,6,700);arr=id;stp="";}
			if(id=="bt7" && arr!=id) {off();cons(book,7,730);arr=id;stp="";}
		}
	else if(target.id.match(/nav/)==null && target.id.match(/sousmenu/)==null)  
		{
		glissoff();
		arr="";
		}
}

var arr="";
var arret="";
var stp="";

function cons(rub,num,left){

var cont="";
for(k=0 ; k<rub.length ; k++){
	if( k>0 ) cont+="&nbsp;&nbsp;-&nbsp;";
	cont += "&nbsp;&nbsp;<a href='"+rub[k].lien+"'>"+rub[k].lib+"</a>";
}

 
document.getElementById('bt'+num).childNodes[0].className="menuon";
document.getElementById('nav').innerHTML="<div id='sousmenu' style='margin-left:"+left+"px'>"+cont+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>";
glisson();
mv=1;
}

function off(){
arret="";
if(stp=="") {
	document.getElementById('nav').innerHTML='';
	
	for (j=1;j<8;j++) 
		{
		document.getElementById('bt'+j).childNodes[0].className="menuoff";
		}
	stp="stp";	
	}
//glissoff();
}

var glissoffint;
var gliss;
function glisson(){
clearInterval(gliss);
clearInterval(glissoffint);
gliss=setInterval(gogliss, 40);	
}

function gogliss(){
objnav=document.getElementById('nav');
if(parseInt(objnav.style.top)<=285) objnav.style.top=parseInt(objnav.style.top)+5+"px";
else stopgliss();
}

function stopgliss(){
clearInterval(gliss);
}

function glissoff(){
clearInterval(gliss);
clearInterval(glissoffint);
for (j=1;j<8;j++) 
	{
	document.getElementById('bt'+j).childNodes[0].className="menuoff";
	}
glissoffint=setInterval(goglissoff, 40);	
}

function goglissoff(){
objnav=document.getElementById('nav');
if(parseInt(objnav.style.top)>=260) objnav.style.top=parseInt(objnav.style.top)-5+"px";
else stopglissoff();
}

function stopglissoff(){
clearInterval(glissoffint);
mv=0;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

function center_popup(theURL,winName,width,height,features) { 
var w = screen.width;
var h = screen.height;
theURL=theURL;


        if(window.screen){
                ratio_x=(width/w)*100;
                ratio_y=(height/width)*100;
                win_x=(screen.width*ratio_x)/100;
                win_y=(win_x*ratio_y)/100;
                x=(screen.width-win_x)/2;
                y=(screen.height-win_y)/2;
        }else{
                x=0;
                y=0;
                win_x=w;
                win_y=y;
        }
        winfeatures=("top="+y+",left="+x+",width="+win_x+",height="+win_y+","+features);
        window.open(theURL,winName,winfeatures);
}