// choix de destinatairefunction choixmail() {var doc = document.form;doc.i_comment.value = "";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 = "registration@fensforum2010.eu";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php";	if (n == 101) { a = "Registration - submission";}	if (n == 102) { a = "Registration - cancellation";}	if (n == 103) { a = "credit card payment"; doc.i_dest.value = "forum2010@fensforum.eu";doc.i_bcc.value = "";}	if (n == 104) { a = "Registration - other payments";}	if (n == 105) { a = "Registration - other questions";}	doc.i_sujet.value = a;	}//abstractsif (( n > 200) && ( n < 300)){	doc.i_dest.value = "forum2010@fensforum.eu";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php"; var a = "";	if (n == 201) { a = "Abstract submission";}	if (n == 202) { a = "Abstract cancellation";}	if (n == 203) { a = "Abstract - other questions";}	doc.i_sujet.value = a;	}//techniqueif( n == 500) {	doc.i_dest.value = "forum2010@fensforum.eu";doc.i_bcc.value = "jean-francis.renaudon@inserm.fr";	//doc.i_dest.value = "jean-francis.renaudon@inserm.fr";doc.i_bcc.value = "francis.renaudon@gmail.com";	doc.action = "/php/contactsFens.php";	doc.i_sujet.value = "Technical problem";	}//hotelif (( n > 300) && ( n < 400)) {	doc.i_dest.value = "hotelservice@rai.nl";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php";	if (n == 301) { a = "FENS 2010 - Hotel booking";}	if (n == 302) { a = "FENS 2010 - Hotel cancellation";}		doc.i_dest.value = "LOCsecretariat@fensforum2010.eu";	if (n == 351) { a = "Social events";}	if (n == 352) { a = "Special interest socials";}	if (n == 353) { a = "Business meetings";}	if (n == 354) { a = "Meeting room rental";}	if (n == 355) { a = "Sponsorship";}	doc.i_sujet.value = a;	}//mot de passe: codes d'accesif (n == 410) {window.location="/pages/mdpen.php";}if ( n == 400) {//	alert("Warning: name, registration number and e-mail address must correspond exactly to those you registered.");	alert("Warning: name and e-mail address must correspond exactly to those you registered.");	doc.i_dest.value = "";doc.i_bcc.value = "";	doc.action = "/4DLINK11/4DCGI/Inscr.mdpc";	}//exposantsif ( n == 600) {	doc.i_dest.value = "kris@herlitz.com";doc.i_bcc.value = "forum2010@fensforum.eu";	doc.action = "/php/contactsFens.php";	doc.i_sujet.value = "FENS 2010 - Exhibition";	}//autresif ( n >= 700) {	doc.i_dest.value = "registration@fensforum2010.eu";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php";	if (n == 701) { a = "Request for invitation letter"; messinvite();}	if (n == 702) { a = "Request for invoice";}	if (n == 703) { a = "Request for receipt of payment";}	if (n == 704) { a = "Miscellaneous"; doc.i_dest.value = "LOCsecretariat@fensforum2010.eu";doc.i_bcc.value = "";}	if (n == 705) { a = "Problem with FENS membership"; doc.i_dest.value = "britta.morich@mdc-berlin.de";doc.i_bcc.value = "";}	if (n == 706) { a = "Local Organizing Committee";doc.i_dest.value = "committee@fensforum2010.eu";doc.i_bcc.value = "forum2010@fensforum.eu";}	doc.i_sujet.value = a;	}//pressif ( n == 800) {	doc.i_dest.value = "press@fensforum2010.eu";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php";	doc.i_sujet.value = "Press invitation";	}//travel grantif ( n == 900) {	doc.i_dest.value = "forum2010@fensforum.eu";doc.i_bcc.value = "";	doc.action = "/php/contactsFens.php";	doc.i_sujet.value = "Travel grant";	}//pour SignUP - FENS 2010if (( n >= 1000) && ( n < 1100)) {	doc.i_dest.value = "committee@fensforum2010.eu";doc.i_bcc.value = "fens2010@fensforum.eu";	doc.action = "/php/contactsFens.php";		if (n == 1000) { a = "No topic";}		if (n == 1001) { a = "Main sponsor";}		if (n == 1002) { a = "Plenary lecture";}		if (n == 1004) { a = "Your nomination/award accommodated";}		if (n == 1006) { a = "Sponsorship internet facilities";}		if (n == 1008) { a = "Meeting bags";}		if (n == 1010) { a = "Meeting lanyards";}		if (n == 1012) { a = "Advertisement in program booklet";}		if (n == 1014) { a = "Promotion material in bag";}		if (n == 1016) { a = "Your symposium at the Forum (Saturday only)";}		if (n == 1018) { a = "Social events";}		doc.i_sujet.value = "Signup BeThere: "+a;}	//court-circuite destinataire pour test//doc.i_dest.value = "jean-francis.renaudon@inserm.fr";doc.i_bcc.value = "dominique.poulain@inserm.fr";}//Controles FENS 2010function verif_signup(){choixmail();var doc = document.form;var x = doc.sujet.selectedIndex; n = doc.sujet[x].value;//if (x == 0) {alert("Select a choice.");return false;}////if (x == 0) {doc.i_sujet.value ="No option";}if ( doc.i_organisation.value == "") {alert("Name organization is mandatory.");return false;}if ( doc.i_contact_person.value == "") {alert("Contact person is mandatory.");return false;}if (( doc.i_address_1.value == "")&&( doc.i_address_2.value == "")) {alert("Address is mandatory.");return false;}if ( doc.i_postal_code.value == "") {alert("Postal code is mandatory.");return false;}if ( doc.i_city.value == "") {alert("City is mandatory.");return false;}if ( doc.i_city.value == "") {alert("City is mandatory.");return false;}if ( doc.i_country.value == "") {alert("Country is mandatory.");return false;}if ( doc.i_telephone.value == "") {alert("Telephone is mandatory.");return false;}if (mail() == false) {return false;}doc.contr.value = "";//fabrique le message : var texte= (doc.i_sujet.value+"\n"+doc.i_organisation.value+"\n"+doc.i_contact_person.value+"\n"+doc.i_address_1.value+"\n"+doc.i_address_2.value+"\n"+doc.i_postal_code.value+"\n"+doc.i_city.value+"\n"+doc.i_country.value+"\n"+doc.i_telephone.value);doc.i_comment.value = texte;return true;}//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 == "" && n != 400)  { 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//pre-remplit la demande d'invitationfunction messinvite() {return; alert("Please complete the requested information before sending."); doc = document.form; var a = "Will you please send me a letter of invitation with the following information:\n\n"; a = a +"Last name:"+"\n"; a = a +"First name:"+"\n"; a = a +"Date of birth:"+"\n"; a = a +"Passport number:"+"\n"; a = a +"Passport valid until:"+"\n"; a = a +"Country of origin:"+"\n"; a = a + "\n" + "With my thanks"+"\n"; doc.i_comment.value = a;}// 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() {//	alert ('coucou'); doc = document.form; if(doc.contr.value != "") {return false;} doc.contr.value = "*"; return true;} //fin
