// JavaScript Document

function hideLoading(){
	if(document.getElementById("chargeCheval"))document.getElementById("chargeCheval").style.display="none";
}


function showVisible(){
	if(document.getElementById("contenuVisible"))document.getElementById("contenuVisible").style.display="block";
}

function swapDepths(bool){
	if(document.getElementById("contenuVisible")){
		if(bool!=false){
			document.getElementById("contenuVisible").style.zIndex=20;
			document.getElementsByTagName("object")[0].style.zIndex=10;
		}
		else{
			document.getElementById("contenuVisible").style.zIndex=10;
			document.getElementsByTagName("object")[0].style.zIndex=20;
			//alert("masquage du contenu");
		}
	}
}

function accueil(){
	/*if(navigator.appVersion.indexOf("IE 6")!=-1)window.location.href="cornin-francais.html"
	else{
		document.getElementById("accueilII").style.display="block";
		document.getElementById("accueilI").style.display="none";
	}*/
	
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  popup();
});

function popup()
{
	for(i=0;i<document.getElementsByTagName("a").length;i++)
	{
		if(document.getElementsByTagName("a")[i].className)
		{
			if(document.getElementsByTagName("a")[i].className=="pop")
			{
				document.getElementsByTagName("a")[i].onclick=function()
				{
					pop_up = window.open(this.href,"","width=505, height=400, scrollbars=yes,resizable=yes,toolbar=no");
					return false;
				}
			}
			if(document.getElementsByTagName("a")[i].className=="blank")
			{
				document.getElementsByTagName("a")[i].onclick=function()
				{
					pop_up = window.open(this.href);
					return false;
				}
			}
		}
	}
}
