// choix de destinatairefunction choixmail() {var doc = document.form;var x = doc.sujet.selectedIndex;var n = doc.sujet[x].value; doc.i_sujet.value = doc.sujet[x].text;//inscriptionsif (( n > 100) && ( n < 200)){	doc.i_dest.value = "fens2006@medacad.org";	doc.action = "contact.flx";	if (n == 101) { a = "FENS Registration - submission";}	if (n == 102) { a = "FENS Registration - cancellation";}	if (n == 103) { a = "FENS CC payments"; doc.i_dest.value = "fensforum@bordeaux.inserm.fr";}	if (n == 104) { a = "FENS Registration - other payments";}	if (n == 105) { a = "FENS Registration - other questions";}	doc.i_sujet.value = a;	}//abstractsif (( n > 200) && ( n < 300)){	doc.i_dest.value = "fensforum@bordeaux.inserm.fr";	doc.action = "contact.flx"; var a = "";	if (n == 201) { a = "FENS Abstract - submission";}	if (n == 202) { a = "FENS Abstract - cancellation";}	if (n == 203) { a = "FENS Abstract - other questions";}	doc.i_sujet.value = a;	}//techniqueif( n == 500) {	doc.i_dest.value = "fensforum@bordeaux.inserm.fr";	doc.action = "contact.flx";	doc.i_sujet.value = "FENS Technical problem";	}//hotelif (( n > 300) && ( n < 400)){	doc.i_dest.value = "fens2006@mondial.at";	doc.action = "contact.flx";	if (n == 301) { a = "FENS Hotel - booking";}	if (n == 302) { a = "FENS Hotel - cancellation";}	if (n == 303) { a = "FENS Social events";}	doc.i_sujet.value = a;	}//mot de passe: codes d'accesif( n == 400) {	alert("ATTENTION: name, registration number and e-mail address must correspond exactly to those you registered.");	doc.i_dest.value = "";	doc.action = "/4DLINK7/4DCGI/Inscr.mdp";	}//exposantsif (n == 600){	doc.i_dest.value = "kris@herlitz.com";	doc.action = "contact.flx";	doc.i_sujet.value = "FENS2006 - Exhibition";	}//autresif (n >= 700){	doc.i_dest.value = "forum2006@fens.org";	doc.action = "contact.flx";	if (n == 701) { a = "Request for invitation letter";}	if (n == 702) { a = "FENS2006 - Miscellaneous";}	doc.i_sujet.value = a;	}//court-circuite destinataire pour test//doc.i_dest.value = "dominique.poulain@bordeaux.inserm.fr";}//dernier controlefunction verifcontact() {var doc = document.form;var x = doc.sujet.selectedIndex; n = doc.sujet[x].value;if (x == 0) {alert("Select a subject.");return false;}if ( doc.i_nom.value == "") {alert("Name is mandatory.");return false;}if (mail() == false) {return false;}if ((n == 400) && (doc.i_inscrnum.value == "")) {alert("The registration number is mandatory.");return false;}if (doc.i_inscrnum.value == "") { if (confirm("The registration number is necessary for most queries.\n"+"Click on Cancel and type it in, or click on OK to send your message without it.") == false) {return false;} }doc.contr.value = ""; if (comment() == false) {return false;}return true;}//Pas de message pour mot de passefunction comment() {var doc = document.form;var x = doc.sujet.selectedIndex; var n = doc.sujet[x].value;if ((n == 400) && (doc.i_comment.value.length > 1)) { alert("No message needed here, automatic reply."); doc.i_comment.value = "";return false; }}//verifie le format du mailfunction mail() { var d = document.form.i_email.value.toLowerCase(); if( d == "") {messerreur("Adresse mel ?","Please type in your e-mail address");return false;} var correct = true; var dnuk ="Incorrect syntax in e-mail address: "; var dnfr ="Syntaxe incorrecte dans l'adresse mel : "; var x = d.indexOf("@") if (x < 0) {dnuk = dnuk+" missing @\n";dnfr = dnfr+" il manque le @\n";messerreur(dnfr,dnuk); return false;} if (x == d.length-1) {messerreur(dnfr,dnuk); return false;} var x = d.indexOf(".") if (x < 0) {dnuk = dnuk+" missing '.'\n"; dnfr = dnfr+" il manque le '.'\n"; messerreur(dnfr,dnuk); return false;} if (x == d.length-1) {messerreur(dnfr,dnuk); return false;} var autorise="abcdefghijklmnopqrstuvwxyz0123456789_.-@"; for (i=0; i< d.length; i++) {    if (autorise.indexOf(d.charAt(i)) < 0) {correct = false;} } if (correct) {return true;} dnuk = dnuk+" bad characters in address.\n";  dnfr = dnfr+" caractere interdit dans une adresse mel.\n"; messerreur(dnfr,dnuk); return false;}//fin// messerreur en anglais ou francaisfunction messerreur(fr,uk) { doc = document.form; if (doc.i_lang.value == "FR") {alert(fr);} else {alert(uk);}}//Ne partira que si tout est correctfunction go() { doc = document.form; if(doc.contr.value != "") {return false;} doc.contr.value = "*"; return true;} //fin