var ie = /MSIE/.test(navigator.userAgent);

function hover(obj) {
  if (ie) {
    UL = obj.getElementsByTagName('ul');
    if (UL.length > 0) {
      sousMenu = UL[0].style;
      sousMenu.display = 'block';
    }
  }
}

function out(obj) {
  if (ie) {
    UL = obj.getElementsByTagName('ul');
    if(UL.length > 0) {
      sousMenu = UL[0].style;
      sousMenu.display = 'none';
    }
  }
}

function hover2(obj) {
  if (ie) {
    UL2 = obj.getElementsByTagName('ul');
    if (UL2.length > 0) {
      sousMenu2 = UL2[0].style;
      sousMenu2.display = 'block';
    }
  }
}

function out2(obj) {
  if (ie) {
    UL2 = obj.getElementsByTagName('ul');
    if(UL2.length > 0) {
      sousMenu2 = UL2[0].style;
      sousMenu2.display = 'none';
    }
  }
}

function hover3(obj) {
  if (ie) {
    UL3 = obj.getElementsByTagName('ul');
    if (UL3.length > 0) {
      sousMenu3 = UL3[0].style;
      sousMenu3.display = 'block';
    }
  }
}

function out3(obj) {
  if (ie) {
    UL3 = obj.getElementsByTagName('ul');
    if(UL3.length > 0) {
      sousMenu3 = UL3[0].style;
      sousMenu3.display = 'none';
    }
  }
}

function hover4(obj) {
  if (ie) {
    UL4 = obj.getElementsByTagName('ul');
    if (UL4.length > 0) {
      sousMenu4 = UL4[0].style;
      sousMenu4.display = 'block';
    }
  }
}

function out4(obj) {
  if (ie) {
    UL4 = obj.getElementsByTagName('ul');
    if(UL4.length > 0) {
      sousMenu4 = UL4[0].style;
      sousMenu4.display = 'none';
    }
  }
}

function setHover() {
  if (ie) {
	LI = document.getElementById('landes_images').getElementsByTagName('li');
	for(i=0; i < LI.length; i++) {
		LI[i].onmouseover = function() { hover(this) };
		LI[i].onmouseout = function() { out(this) };
	}
	LI2 = document.getElementById('bt_decouvrir').getElementsByTagName('li');
	for(i=0; i < LI2.length; i++) {
		LI2[i].onmouseover = function() { hover2(this) };
		LI2[i].onmouseout = function() { out2(this) };
	}
	LI3 = document.getElementById('brochures').getElementsByTagName('li');
	for(i=0; i < LI3.length; i++) {
		LI3[i].onmouseover = function() { hover3(this) };
		LI3[i].onmouseout = function() { out3(this) };
	}
	LI4 = document.getElementById('menu_bas').getElementsByTagName('li');
	for(i=0; i < LI4.length; i++) {
		LI4[i].onmouseover = function() { hover4(this) };
		LI4[i].onmouseout = function() { out4(this) };
	}
  }
}

window.onload = function() { setHover() };
