//**old browser excluded
if (old == false) {

// white line spacer width - used to determine the width of each sub-table
if (op5) { var imgW = 100; } //116
else { var imgW = 118; } //124

// top link variables

var linkCellOpen = '<td align=left '; 

var emptyEndCell = '<td align=left width=2000>&nbsp;</td>';
var MAINstr = "";

//top and left relative position of subtables  
var SUBabsTOP = 20; var SUBabsLEFT = 45;
if (ie4) { SUBabsTOP = (absTOP+23); SUBabsLEFT = (absLEFT+0); } 
else if (op5) { SUBabsTOP = (absTOP+0); SUBabsLEFT = (absLEFT+0); } 
else if (ns6) { SUBabsTOP = (absTOP+23); SUBabsLEFT = (absLEFT+0); }
else if (ns4 || mz7) { SUBabsTOP = (absTOP+23); SUBabsLEFT = (absLEFT+0); } 

// object array - submenu ID values
var subID = new Array(nb_boutons);
for(i=0; i<nb_boutons;i++) {
	subID[i] = "submenu" + i;
}	


//this gets me out of a couple of sticky spots
function clearMenus() { 
if (ns6 || mz7) { for(j=0;j<nb_boutons;j++) { document.getElementById(subID[j]).style.display="none"; }}
else { for(j=0;j<nb_boutons;j++) { document.all[subID[j]].style.visibility="hidden"; }}
}

// draw top links
//if (ns4) { MAINstr += '<layer id="menubar" visibility=show top=' + absTOP + ' left=' + absLEFT + '>'; }
//if (ns4) { MAINstr += '<table cellpadding=0 cellspacing=0 border=0 width=\"80%\" ><tr>'; }
/*else {	    */  MAINstr += '<table cellpadding=0 cellspacing=0 border=0 width=\"80%\" style="z-index:12; position:absolute; top:' + absTOP + 'px; left:' + absLEFT + 'px;"><tr>'; 


for(i=0;i<nb_boutons;i++) {
if(boutons[i][1]!= "") {
if (boutons[i][5][1]!= "" && boutons[i][5][0] != "") {
if (ns4) { MAINstr += linkCellOpen + '>'  + '<a href="' + boutons[i][3] + '"  onMouseOver="document.layers.' + subID[i] + '.visibility=\'show\'; document.' + boutons[i][0] + '.src=\'' + boutons[i][6]+ '\'" onMouseOut="document.layers.' + subID[i] + '.visibility=\'hidden\'; document.' + boutons[i][0] + '.src=\'' + boutons[i][2] + '\' ">' + boutons[i][1] + '</a></td>'; }
else if (ie4) { MAINstr += linkCellOpen + ' onMouseOver="document.all[\''+ subID[i] + '\'].style.visibility=\'visible\'" onmouseout="document.all[\''+ subID[i] + '\'].style.visibility=\'hidden\'">'  + '<a href="' + boutons[i][3] + '" style="position:relative; top:0px;" onMouseOver="document.images.' + boutons[i][0] + '.src=\''+ boutons[i][6] +'\'" onMouseOut="document.images.' + boutons[i][0] + '.src=\'' + boutons[i][2] +'\'">' + boutons[i][1] + '</td>'; }
else if (op5) { MAINstr += linkCellOpen + ' onMouseOver="clearMenus(); document.all[\'' + subID[i] + '\'].style.visibility=\'visible\'" onmouseout="document.all[\'' + subID[i] + '\'].style.visibility=\'visible\'">' + '<a href="' + boutons[i][3] + '" style="position:relative; top:0px;">' + boutons[i][1] + '</td>'; }
else if (ns6 || mz7) { MAINstr += linkCellOpen + '">'  + '<a href="' + boutons[i][3] + '" onMouseOver="clearMenus(); document.getElementById(\'' + subID[i] + '\').style.display=\'\' ; document.images.' + boutons[i][0] + '.src=\'' + boutons[i][6] +'\'" onMouseOut="document.images.' + boutons[i][0] + '.src=\'' + boutons[i][2] +'\'">' + boutons[i][1] + '</a></td>'; }
} else { 
MAINstr += linkCellOpen + '">'  + '<a href="' + boutons[i][3] + '" style="color:#ffffff">' + boutons[i][1] + '</a></td>';
}
}	
}	

MAINstr += emptyEndCell;
MAINstr += '</tr></table>';
//if (ns4) { MAINstr += '</layer>'; }

document.write(MAINstr);



// submenu variables
var SUBstr = new Array(nb_boutons);
for(i=0;i<nb_boutons;i++) {
	SUBstr[i] = "";
}

var SUBlinkCellOpen = '<tr><td align=left class=SUBmenubarTD width=99';
var nsBR = ""; if (ns6) { nsBR = "<br class=br>"; }
var space = ""; 
if (ns6) { space = " height=22"; }
if (op5) { space = " height=20"; }
var shiftUP = '';
if (ie4) { var shiftUP = ' style="position:relative; top:-5px;"'; }
if (ns6) { var shiftUP = ' style="position:relative; top:-4px;"'; }
if (op5) { var shiftUP = ' style="position:relative; top:-3px;"'; }
if (mz7) { var shiftUP = ' style="position:relative; top:-6px;"'; }

var trigger = onmouseover="this.visibility='show'";

function drawSubMenu(sub, subClass) {

//tedious mucking about for ns6 and mozilla to ensure correct table positioning
var mzTOP = (SUBabsTOP - 35); var mzTOPcl = (SUBabsTOP - 25);
for (j=0;j<boutons[sub][5].length;j+=2) { if (boutons[sub][5][j+1] != "" && boutons[sub][5][j] != "") { mzTOP-=21; mzTOPcl-=22;}}
//compile sub menu 
if (ns4) { 	subSTR[sub] += '<layer id="' + subID[sub] + '" visibility=hide top=' + SUBabsTOP + ' left=' + SUBabsLEFT + ' onMouseOver="this.visibility=\'show\'; window.document.' + boutons[sub][0] + '.src=\'' + boutons[sub][6]+ '\'" onMouseOut="this.visibility=\'hide\'; window.document.' + boutons[sub][0] + '.src=\'' + boutons[sub][2]+ '\'">'; }
subSTR[sub] += '<table cellpadding=4 cellspacing=0 border=0 bordercolor=#000000 ' + subClass + ' ';
if (!ns4) { subSTR[sub] += ' id="' + subID[sub] + '"'; }
if (ie4) {     subSTR[sub] += ' style="visibility:hidden; position:absolute; top:' + SUBabsTOP + 'px; left:' + SUBabsLEFT + 'px;" onmouseover="document.all[\'' + subID[sub] + '\'].style.visibility=\'visible\'; document.images.' + boutons[sub][0] +'.src=\'' + boutons[sub][6] +'\'" onmouseout="document.all[\'' + subID[sub] + '\'].style.visibility=\'hidden\'; document.images.' + boutons[sub][0] + '.src=\'' + boutons[sub][2] +'\'">';  }
else if (op5) { subSTR[sub] += ' style="visibility:hidden; position:absolute; top:' + SUBabsTOP + 'px; left:' + SUBabsLEFT + 'px; width:'  + 'px" onmouseover="document.all[\'' + subID[sub] + '\'].style.visibility=\'visible\'; document.images.' + boutons[sub][0] +'.src=\'' + boutons[sub][6] +'\'"  onmouseout="document.all[\'' + subID[sub] + '\'].style.visibility=\'hidden\'; document.images.' + boutons[sub][0] + '.src=\'' + boutons[sub][2] +'\'">';  }
else if (mz7 || ns6) { subSTR[sub] += ' style="display:none; position:absolute; left:' + SUBabsLEFT + 'px; top:' + SUBabsTOP + 'px; z-index:13" onMouseOver="document.images.' + boutons[sub][0] + '.src=\'' + boutons[sub][6] +'\'" onMouseOut="document.images.' + boutons[sub][0] + '.src=\'' + boutons[sub][2] +'\'">';  }
else                {   subSTR[sub] += '>'; }
subSTR[sub] += SUBlinkCellOpen + '>'+ '<IMG src="http://a69.g.akamai.net/7/69/7515/v1/img5.allocine.fr/img_cis/images/festivaldecannes/img/vide.gif" width=1 height=1 border=0></td></tr>';
for (j=0;j<boutons[sub][5].length;j+=2) { if (boutons[sub][5][j+1] != "" && boutons[sub][5][j] != "") { subSTR[sub] += SUBlinkCellOpen  +'><a href="' + boutons[sub][5][j+1] + '"' + shiftUP + 'class=lienmenuder>' + boutons[sub][5][j] + '</a></td></tr>'; }}
if (ns4) { subSTR[sub] += SUBlinkCellOpen + '></td></tr>'; }
subSTR[sub] += '</table>';
if (ns4) { 	subSTR[sub] += '</layer>'; }
//actually draw it
document.write(subSTR[sub]);
}

// object array - main links
var mchemin = new Array(nb_boutons);
for(i=0;i<nb_boutons;i++) {
	mchemin[i] = boutons[i][3];
}

// object array - main link names
var mLINK = new Array(nb_boutons);
for(i=0;i<nb_boutons;i++) {
	mLINK[i] = boutons[i][1];
}

// object array - document.write string identifiers
var subSTR = new Array(nb_boutons);
for(i=0;i<nb_boutons;i++) {
	subSTR[i] = SUBstr[i];
}

//submenus
for(i=0;i<nb_boutons;i++) {
	
	//top and left position
	if(i != 0) {  
	if (ie4) { SUBabsLEFT+=boutons[i-1][4]; } 
	else if (op5) { SUBabsLEFT+=boutons[i-1][4]; }
	else if (ns6) { SUBabsLEFT+=boutons[i-1][4]; }
	else if (ns4 || mz7) { SUBabsLEFT+=boutons[i-1][4]; }
	}
	//draw the menu
	if (boutons[i][5][0]) {
		drawSubMenu(i, "class=myfondmenuder");
	} else {
		drawSubMenu(i, "");
	}

}


//closing mechanism for Opera 5
if (op5 || ns6 || mz7) document.onclick = clearMenus; 


}
//**old browser excluded
