
getId("LienPartenaires").style.display = "none";


getWithAjax("donnetextes", function(r) { 


var t1 = r.split("||");
for (var i=0; t1[i]; i++) {
var t2 = t1[i].split("|");
var id=t2[0];
var txt=t2[1];
txt = txt.replace(/<br>/gi,"\n"); 
txt = txt.replace(/<br\/>/gi,"\n");
txt = txt.replace(/<br \/>/gi,"\n");
tabTexte[id] = txt;
}


getId("divSablier").style.display = "none";


redimensionneAccueil();


getId("Depart").value = "";
getId("Depart").focus(); 


getId("buttonAmelioration").disabled = false;
getId("buttonAmelioration").value = texte(333); 
getId("amelioration").value = texte(332) + ", \n\n"; 
Gestionnaire.ajouter (getId("buttonAmelioration"), "click", function() {
this.disabled = true;
this.value = texte(334); 
getId("Rapport").value = getId("amelioration").value;
getId("amelioration").value = texte(332) + ", \n\n"; 
if (getId("Rapport").value.length>20) {
getWithAjax("informeadmin", function() {
alert(texte(207)); 
});
}
else {
alert(texte(207)); 
}
});


function go() {
var a = getId("Depart").value;
var b = getId("Arrivee").value;
if (a==texte(9) || b==texte(12) || a=="" || b=="") { 
return false;
}
var p = "http://" + location.hostname + "/covoiturage/" + a + "/" + b;
window.open(p,"_self");
return true;
}
Gestionnaire.ajouter (getId("Go1"), "click", function() {
if (!go()) {
alert(texte(376)); 
}
});
Gestionnaire.ajouter (getId("Depart"), "focus", function() {
if (this.value==texte(9)) { 
this.value = "";
}
});
Gestionnaire.ajouter (getId("Depart"), "blur", function() {
if (this.value=="") {
this.value = texte(9); 
}
});
Gestionnaire.ajouter (getId("Arrivee"), "focus", function() {
if (this.value==texte(12)) { 
this.value = "";
}
});
Gestionnaire.ajouter (getId("Arrivee"), "blur", function() {
if (this.value=="") {
this.value = texte(12);
}
});
if (navigator.appName != "Microsoft Internet Explorer") {

Gestionnaire.ajouter (getId("Depart"), "keyup", function(e) {
gestionClavier("Depart",e);
});
Gestionnaire.ajouter (getId("Arrivee"), "keyup", function(e) {
gestionClavier("Arrivee",e);
});
}


for (var i=0; getId("accroche" + i); i++) {
Gestionnaire.ajouter (getId("accroche" + i), "mouseover", function() {
this.style.cursor = "pointer";
this.style.color="#149CD4";
});
Gestionnaire.ajouter (getId("accroche" + i), "mouseout", function() {
if (this.getAttribute("mode")!="actif") {
this.style.color="#17475E";
}
});
Gestionnaire.ajouter (getId("accroche" + i), "click", function() {
metAJourAffichage(this);

if (this.getAttribute("id")=="accroche2") {
if (getId("divPartenaires").style.display=="none") {
getId('LienPartenaires').style.display='';
}
}
else {
getId('LienPartenaires').style.display='none';
getId('divPartenaires').style.display='none';
}
});
}


function metAJourAffichage(accroche) {
for (var i=0; getId("accroche" + i); i++) {
var a = getId("accroche" + i);
if (a==accroche) {
a.setAttribute("mode","actif");
a.style.color="#149CD4";
a.style.fontSize="21px";
a.style.fontWeight="bold";
a.style.textAlign="left";
if (getId("contenu" + i)) {
getId("contenu" + i).style.display = "";
}


if (i==0) {
getId("containerdroite").style.overflow = "hidden";
}
}
else {
a.setAttribute("mode","inactif");
a.style.color="#17475E";
a.style.fontSize="13px";
a.style.fontWeight="normal";
a.style.textAlign="left";
if (getId("contenu" + i)) {
getId("contenu" + i).style.display = "none";
}
getId("containerdroite").style.overflowY = "auto";
}
}
}


if (getId("PremiereInscription") && getId("PremiereInscription").value!="") {
connecte(getId("PremiereInscription").value);
getId("PremiereInscription").value="";
}
});

