var ie6 = /MSIE 6.0/.test(navigator.userAgent);

function hover(obj) {
	UL = obj.getElementsByTagName('ul');
	if (UL.length > 0) {
		sousMenu = UL[0].style;
		sousMenu.display = 'block';
	}
}

function out(obj) {
	UL = obj.getElementsByTagName('ul');
	if (UL.length > 0) {
		sousMenu = UL[0].style;
		sousMenu.display = 'none';
		
		//2ème tentative : 4e niveau marche pas et ça galère à mort
		
		/*for (j=1; j < UL.length; j++) {
			UL[j].style.display = 'block';
		}*/
	}
}

function setHover() {
	if (ie6) {
		LI = document.getElementById('menu').getElementsByTagName('li');
		for (i=0; i < LI.length; i++) {
			LI[i].onmouseover = function() { hover(this) };
			LI[i].onmouseout = function() { out(this) };
			
			//1ère tentative : marche que sur 1ère entrée du menu, 4e niveau marche pas et ça galère à mort
			
			/*LI2 = LI[i].getElementsByTagName('li');
			for (j=0; j < LI2.length; j++) {
				UL2 = LI2[j].getElementsByTagName('ul');
				UL2[0].style.display = 'block';
			}*/
		}
	}
}

window.attachEvent('onload', setHover);