function GetId(id)
{
return document.getElementById(id);
}
var i=false; // La variable i nous dit si la bulle est visible ou non
 
function move(e) {
  if(i) {  // Si la bulle est visible, on calcul en temps reel sa position ideale
    if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
    GetId("curseur").style.left=e.pageX + 20+"px";
    GetId("curseur").style.top=e.pageY + 5+"px";
    }
    else { // Modif proposé par TeDeum, merci à  lui
    if(document.documentElement.clientWidth>0) {
GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px";
GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px";
    } else {
GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px";
GetId("curseur").style.top=5+event.y+document.body.scrollTop+"px";
         }
    }
  }
}
 
function montre(text) {
  if(i==false) {
  GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securité) on le rend visible.
  GetId("curseur").innerHTML = text; // on copie notre texte dans l'élément html
  i=true;
  }
}
function cache() {
if(i==true) {
GetId("curseur").style.visibility="hidden"; // Si la bulle est visible on la cache
i=false;
}
}
document.onmousemove=move; // dès que la souris bouge, on appelle la fonction move pour mettre à jour la position de la bulle.

function validform() {
    if (document.trans_text.email.value.length < 5) {
	    window.alert("Veuillez entrer votre email.");
		return false;
	}
    if (document.trans_text.message.value.length < 10) {
	    window.alert("Veuillez entrer votre message .");
		return false;
	}
return true;
}

function validpasse() {
    if (document.trans_passe.email.value.length < 5) {
	    window.alert("Veuillez entrer votre email.");
		return false;
	}

return true;
}

function validspad() {
    if (document.spad_text.nom.value.length < 2) {
	    window.alert("Veuillez entrer votre nom.");
		return false;
	}
    if (document.spad_text.prenom.value.length < 4) {
	    window.alert("Veuillez entrer votre prenom .");
		return false;
	}
    if (document.spad_text.fradio.value.length < 3) {
	    window.alert("Veuillez entrer votre email.");
		return false;
	}
    if (document.spad_text.email.value.length < 5) {
	    window.alert("Veuillez entrer votre email.");
		return false;
	}
return true;
}


// Gestion de textes optionnels 

function toggle(i,j) { 

var d = document.getElementById(j); 

if (d.style.display == "none") { 

// Déplier 

d.style.display = "block"; 

i.src = "img-accueil/moins.jpg"; 

} 
else 
{ 

// Plier 

d.style.display = "none"; 

i.src = "img-accueil/plus.gif"; 

} 

}

function ChangeUrl(formulaire)
{
if (formulaire.ListeUrl.selectedIndex != 0)
{
location.href = formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value;
}
else 
{
alert('Veuillez choisir une destination.');
}
}
function ChangeUrlr(formulaire)
{
if (formulaire.ListeUrlr.selectedIndex != 0)
{
location.href = formulaire.ListeUrlr.options[formulaire.ListeUrlr.selectedIndex].value;
}
else 
{
alert('Veuillez choisir une destination.');
}
}


function VersionNavigateur(Netscape, Explorer) {
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}
function Semaine(){
           this[0] = "Dimanche";  this[1] = "Lundi";
           this[2] = "Mardi";     this[3] = "Mercredi";
           this[4] = "Jeudi";     this[5] = "Vendredi";
           this[6] = "Samedi";
           }

function Mois(){
           this[0] = "Janvier";    this[1] = "Février";
           this[2] = "Mars";       this[3] = "Avril";
           this[4] = "Mai";        this[5] = "Juin";
           this[6] = "Juillet";    this[7] = "Août";
           this[8] = "Septembre";  this[9] = "Octobre";
           this[10] = "Novembre";  this[11] = "Décembre";
           }
today = new Date;
function date(){
        var semaine=new Semaine();
        var mois=new Mois();
        var myDate=new Date();
        annee = today.getFullYear();
  

        var result=semaine[myDate.getDay()]+" "+myDate.getDate()+" "+mois[myDate.getMonth()]+" "+annee;
        document.writeln(result);
    }
        function openWin( windowURL, windowName, windowFeatures ) { 
                return window.open( windowURL, windowName, windowFeatures ) ; 
        } 

function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
