/*BTN*/
function showInfo(dl){
                if (navigator.appName=="Microsoft Internet Explorer"){
                 /*   if (document.getElementById("infoIE"))
                        document.getElementById("infoIE").style.display = "block";
                        document.getElementById("btnMin").style.display = "none";
                        document.getElementById("infoTxt").style.display = "none";*/
                        if(dl) window.location.href = 'http://www.mes-resultats.com/exe/orange/ie/mes-resultats.exe';
                }
                else{
                   /*if (document.getElementById("infoFF"))
                        document.getElementById("infoFF").style.display = "block";
                        document.getElementById("btnMin").style.display = "none";
                        document.getElementById("infoTxt").style.display = "none";*/
                        if(dl) window.location.href = 'http://www.mes-resultats.com/exe/orange/ff/mes-resultats.exe';
                }
                        
                var http_obj = null; 
                
                function setMin(){
                    if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
                    else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
                    else return;
                }
                if(dl) setMin();
}

function download(){

     if (navigator.appName=="Microsoft Internet Explorer"){
              window.location.href = 'http://www.mes-resultats.com/exe/orange/ie/mes-resultats.exe';
      }
      else{
        window.location.href = 'http://www.mes-resultats.com/exe/orange/ff/mes-resultats.exe';
      }
                        
      var http_obj = null; 
                
       function setMin(){
           if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
           else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
           else return;
       }
        setMin();
}


function download_letmin(corrige){

	if(corrige==0){
	    if (navigator.appName=="Microsoft Internet Explorer"){
	             window.location.href = 'http://www.mes-resultats.com/exe/orange/ie/winletmin.exe';
	     }
	     else{
	       window.location.href = 'http://www.mes-resultats.com/exe/orange/mozilla/winletmin.exe';
	     }
	}
		if(corrige==1){
			if (navigator.appName=="Microsoft Internet Explorer"){
	            window.location.href = 'http://www.mes-resultats.com/exe/orange/ie/corr/winletmin.exe';
	    }
	    else{
	      window.location.href = 'http://www.mes-resultats.com/exe/orange/mozilla/corr/winletmin.exe';
	    }
		
	}
     var http_obj = null; 
               
      function setMin(){
          if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
          else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
          else return;
      }
       setMin();
}




function fav(siteURL, siteNOM) 
{
	/*-- MESSAGE --*/
	function myMessage (raccourciClavier) 
	{
		alert ("Utilisez '" + raccourciClavier + "'\npour ajouter " + siteNOM + " dans vos favoris !");
	}
	/*-- TRAITEMENT DES NAVIGATEURS --*/
	//Konqueror
	if (navigator.userAgent.indexOf('Konqueror') >= 0) 
	{
		myMessage("CTRL + B");
	}
	else if (window.external) 
		{
  		/*IE4+*/
  		window.external.AddFavorite(siteURL,siteNOM);
		}	
		else if (document.all && (navigator.userAgent.indexOf('Win') < 0)) 
			{
  			/* IE Mac */
  			myMessage("POMME + D");
			}
			else if (window.opera && window.print) 
				{
  				/* Opera 6+ */
					myMessage("CTRL + T");
  			}
				else if (window.sidebar) 
					{
						/* Ns 6+ ; Moz, FrFox...*/
						window.sidebar.addPanel(siteNOM,siteURL,"");
					}
					else if (document.layers) 
						{
							/* Ns 4 */
							myMessage("CTRL + D");
						}
					else alert ("Cette fonction n'est pas disponible pour votre navigateur.");
}

//Event.observe(window,'load',init);
function init() {
    if($('carre_menu')) {
        //carres = $('carre_menu').getElementsByTagName("li");
        /*$R(0,carres.length-1).each(function(indice) {
            item = carres[indice].id;
            //alert(carres[indice].id);
            Event.observe($(item),'mouseover',function() { show(item+"_hover") });
            Event.observe($(item),'mouseout',function() { hide(item+"_hover") });
        });*/
        //alert(carres[0]);
        /*carres.each(function(item) {
            Event.observe(item,'mouseover',function() { $(item.id+"_hover").show() });
            Event.observe(item,'mouseover',function() { $(item.id+"_hover").hide() });
        });*/
        
        $$('.carre_menu').each(function(item) {
            Event.observe($(item),'mouseover',function() { show(item.id+"_hover") });
            Event.observe($(item),'mouseout',function() { hide(item.id+"_hover") });
        });
    }
}

function show(item) {
    $(item).style.visibility = "visible";
    //alert(item);
}


function hide(item) {
    $(item).style.visibility = "hidden";
}





var before="Dans :"
var current="Aujourd'hui c'est le bac, Bon courage!"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){
theyear=yr;themonth=m;theday=d
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[m-1]+" "+d+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
if(dday==0&&dhour==0&&dmin==0&&dsec==1){
document.forms.count.count2.value=current
return
}
else
document.forms.count.count2.value=before+" "+dday+ " jours, "+dhour+" heures, "+dmin+" minutes, et "+dsec+" s  "
setTimeout("countdown(theyear,themonth,theday)",1000)
}
//enter the count down date using the format year/month/day
/*******************************************************/

function ScanCookie(variable)
    {
    cook = document.cookie;
    variable += "=";
    place = cook.indexOf(variable,0);
    if (place <= -1)
        return("0");
    else
        {
        end = cook.indexOf(";",place)
        if (end <= -1)
            return(unescape(cook.substring(place+variable.length,cook.length)));
        else
            return(unescape(cook.substring(place+variable.length,end)));
        }
    }

function CreationCookie(nom,valeur,permanent)
    {
    if(permanent)
        {
        dateExp = new Date(2020,11,11);
        dateExp = dateExp.toGMTString();
        ifpermanent = '; expires=' + dateExp + ';';
        }
    else
        ifpermanent = '';
    document.cookie = nom + '=' + escape(valeur) + ifpermanent;
 
    }

function OuvrirPopup() {
  /*  if(ScanCookie("dejapopupInfo")==0)
    {
        
       CreationCookie("dejapopupInfo","oui",false);*/
   
         Nom_Browser = navigator.appName;
        if ( Nom_Browser == "Microsoft Internet Explorer" )
        {
            option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
            window.open("","resultatsAudio",option);
            pop = document.createElement("form");
            pop.target="resultatsAudio"; 
            pop.method="POST"; 
            pop.id="pop";
            pop.action = "http://www.mes-resultats.com/mes-resultats-audio.php";
            document.appendChild(pop);
            document.getElementById("pop").submit();
            window.focus();
            return void(0);
        }
        else
        {
        page = 'http://www.mes-resultats.com/mes-resultats-audio.php';
        nom = 'mes-resultats-audio';
        option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
       window.open(page,nom,option);
        
        }
    // }
}


/******************************************************/