// variables globalesmess = "Please type in your registration number and confidential code.";acgi = "/4DLINK11/4DCGI/";//navigateurvar bAgent = window.navigator.userAgent; var bAppName = window.navigator.appName;var NonExplo = (bAppName.indexOf("Explorer") < 0)function visible(idName){  var dd = document.getElementById(idName);  if(dd.style.display == 'none')  	dd.style.display = 'inline';  else  	dd.style.display = 'none';}function setInvisible(idName){  var dd = document.getElementById(idName);  dd.style.display = 'none';}function setVisible(idName){  var dd = document.getElementById(idName);  dd.style.display = 'inline';}function windownew(id){window.open(id, '_blank', 'scrollbars=yes,location=no,menubar=no,width=850,height=600,resizable=yes');}//function fenetre(id,l,h,m){ 	if (m=='no')		{		window.open(id, "_blank", 'scrollbars=no,location=no,menubar=no,width='+l+',height='+h+',resizable=no');		}	else if (m=='all') 		{		window.open(id, "_blank", 'scrollbars=yes,location=no,menubar=no,width='+l+',height='+h+',resizable=yes');		}	else		{		alert('erreur de fenetre');		}}//appel apres avoir loadefunction init(){ paysset();getallfee();} //fin//Quel est le bouton radio choisi?function checkradio(d){ var radioName = d;  var x = -1;  var n = d.length; for (var i = 0; i < n; i++) {    if (eval(radioName)[i].checked == true) {x = i; return x;}  } return x; } //fin//Efface les boutons radiofunction clearradio(d){  var x = d.length;  for (var i = 0; i < x; i++) {d[i].checked = false;}}//fin//la valeur est un chiffrefunction chiffre(d){ var dd = d; var nstr = "0123456789"; var n= nstr.indexOf(dd); if(n <0){return false;} return true;}//fin//saute a une ancre sur la pagefunction jump(d) { var a = d; if (NonExplo){ window.location="#0";window.location = a;}} //fin//appel par le "POST"function controle(){ if (etatcivil()==false) {return false;} if (mail() == false) {jump("#0");d.i_email.focus();return false;} if (obligatoire() == false) {jump("#participant");return false;} if (testboutonpaie() == false) {return false;} testcbchange(); if (symp() == false) {jump("#symposiums");return false;}}//fin//Verifie les donnees de l'etat civilfunction etatcivil() {d = document.form;if (d.i_sexe == "")  { alert("Please select Mr./Ms."); jump("#0");d.i_nom.focus(); return false;}if (d.i_nom.value.length == 0)  { alert("Please type in your last name."); jump("#0");d.i_nom.focus(); return false;}if (d.i_prenom.value.length == 0)  { alert("Please type in your first name.");jump("#0");d.i_nom.focus();d.i_prenom.focus(); return false;}var adr = d.i_adresse1.value+d.i_adresse2.value+d.i_adresse3.value;if (adr == "")  { alert("Your address ? (University, company,...)"); d.i_nom.focus();jump("#0");d.i_adresse1.focus();return false;}if ( (d.i_pays.value == "France") && (d.i_codepostal.value.length < 2))  { alert("Postal code ?");d.i_nom.focus();d.i_codepostal.focus();jump("#0");return false;}if (d.i_ville.value.length == 0)  { alert("City ?");d.i_nom.focus();d.i_ville.focus();jump("#0");return false;}if ((d.i_pays.value == "")||(d.i_pays.value.indexOf("select")>= 0))  { alert("Country ?");d.i_nom.focus();d.i_ville.focus();jump("#0");return false;}if (d.i_email.value.length == 0)  { alert("E.mail address is required."); d.i_ville.focus();d.i_email.focus();jump("#0");return false;}return true;}//fin//verifie le format du mailfunction mail() { var d = document.form.i_email.value.toLowerCase(); if( d == "") {alert("Please type in your e.mail address");return false;} var correct = true; var dn ="Incorrect syntax in e.mail address: "; var x = d.indexOf("@"); if (x < 0) {dn = dn+" missing @\n";alert(dn); return false;} if (x == d.length-1) {alert(dn); return false;} var x = d.indexOf("."); if (x < 0) {dn = dn+" missing '.'\n";alert(dn); return false;} if (x == d.length-1) {alert(dn); 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;} dn = dn+" bad characters in address.\n"; alert(dn); return false;}//fin//function paysset(){return; d = document.form; d.i_pays.value=d.pays[d.pays.selectedIndex].text;} //fin//retourne numeros de symp choisis pour chaque session//(getElementsByName retourne un tableau des elements du meme nom)function symp() { var d = document.form; a = ""; sel = ""; n = 100; x = 0; for (var i = 1;  i < n; i++) {   a = new String(i);  gr = document.getElementsByName("grsess"+a);  if (gr[0]) {    a = gr[0][gr[0].selectedIndex].value;    sel = sel+a+"/";    if (a.charAt(0) !="G") {x = 1;}    } else {    n = 100;   }  } n = sel.length; d.i_sympo.value = sel.substring(0,n-1);//alert(d.i_sympo.value+"*"); if (x == 0) { if (confirm ("You selected no session to attend. If you wish to send this form as such anyway, click on OK. If not, click on 'Cancel', then select your sessions before submitting the form again.") == false ) {return false;} }return true;}//fin//obsoletefunction xxsymp(){ var d = document.form; n = 0; n1 = d.sympj1a[d.sympj1a.selectedIndex].value+"/"; n2 = d.sympj1b[d.sympj1b.selectedIndex].value+"/"; n3 = d.sympj2a[d.sympj2a.selectedIndex].value+"/"; n4 = d.sympj2b[d.sympj2b.selectedIndex].value+"/"; n5 = d.sympj3a[d.sympj3a.selectedIndex].value+"/"; n6 = d.sympj3b[d.sympj3b.selectedIndex].value+"/"; n7 = d.sympj4a[d.sympj4a.selectedIndex].value+"/"; sl1= d.sympj1c[d.sympj1c.selectedIndex].value+"/"; sl2= d.sympj2c[d.sympj2c.selectedIndex].value+"/"; sl3= d.sympj3c[d.sympj3c.selectedIndex].value+"/"; sl4= d.sympj4c[d.sympj4c.selectedIndex].value+"";  d.i_sympo.value = n1+n2+n3+n4+n5+n6+n7+sl1+sl2+sl3+sl4;// alert(d.i_sympo.value); if (d.i_sympo.value == "S1Z/S2Z/S3Z/S4Z/S5Z/S6Z/S7Z/SL1Z/SL2Z/SL3Z/SL4Z") { if (confirm ("You selected no session to attend. If you wish to send this form as such anyway, click on OK. If not, click on 'Cancel', then select your sessions before submitting the form again.") == false ) {return false;} } return true;}//fin//inscription: checkbox non modifiable manuellementfunction checkins(){ alert("To change your registration, change your membership type on this page.");} //fin//workshop: checkbox non modifiable manuellementfunction checkwks(dd){//alert("ho"); d =document.form; if(dd.checked==true) {dd.checked=false;} else {dd.checked=true;} alert("To (un)select a workshop, complete and save this page, then edit your registration.");// jump("#workshops");} //fin//Calcul du montant total a payer: additionne les diff. tarifsfunction getallfee(){ var d = document.form; var tot = parseInt(getfee())+parseInt(getabs())+parseInt(getwks())+ getgala(); tot = tot + parseInt(getfrais(tot)); d.total.value = new String(tot); d.total.value =centimes(d.total.value); return tot; }//fin//montant des workshopsfunction getwks(){ d =document.form; n=d.wksfee; if (d.i_workshop.value=="W0") {n.value = "0"; d.bwks.checked = false;}   else {n.value = work; d.bwks.checked = true;} v = n.value; n.value = centimes(n.value); return v;} //finfunction Xgetwks(){ d =document.form; n=d.wksfee; x = d.i_workshop.selectedIndex; if (x==0) {n.value = "0"; d.bwks.checked = false;}// if (x=="w0") {n.value = "0"; d.bwks.checked = false;}   else {n.value = work; d.bwks.checked = true;} if (x==7) {n.value = "0";} v = n.value; n.value = centimes(n.value); return v;} //fin//montant du livre de resumesfunction getabs(){ n = document.form.absfee; if (document.form.i_book.checked) {n.value = bookfee;}  else {n.value = "0";} v = n.value;  n.value = centimes(v); return v;} //fin// calcule montant inscriptionfunction getfee(x){ d = document.form; n = d.i_mbre.value; df = d.mbrefee; s = d.i_soc.value.toLowerCase(); df.value = "0";  if(n != 0) {  if ( s != "st00") {   if (n == 1) {df.value = inscrip1;}// membres tit   if (n == 2) {df.value = inscrip2;}// etud  } else {  if (n == 1) {df.value = inscrip3;}// non membres tit  if (n == 2) {df.value = inscrip4;}// nm etud  }  if (n == 5) {df.value = inscrip5;}// nm corp  if (n == 9) {df.value = inscrip9;}// nm corp } var v = df.value;  df.value = centimes(df.value);// alert("df= "+df.value); // d.fee.value = df.value; alert(v); return v;//alert(v);} //fin// calcule montant des frais bancairesfunction getfrais(x){ var d = document.form; n = d.bq n.value = "0"; // if ((x > 0) && (d.i_paiece.checked == true)) {n.value = fbanque;} if ((x > 0) && (d.i_paievi.checked == true)) {n.value = fbanque;} var v = n.value; n.value = centimes(n.value); return v;}//Diner: calcul montant a payer pour le nombrefunction getgala() { //alert("ho"); d = document.form; if (!d.i_nbdiner) {return 0;} //si menu deroulant var d1 = d.i_nbdiner[d.i_nbdiner.selectedIndex].value; // si box var d1 = 0; if (d.i_nbdiner.checked) {d1 = d.i_nbdiner.value;} var d2 = d.i_mbre.value; if (d2 == 2 | d2 == 4) {   x = d1 *  parseInt(tarifdinergala2);   } else {   x = d1 *  parseInt(tarifdinergala1);  } d.dinergala1.value = centimes(x.toString());  return x; // attention valeur entiere}//fin// formatte en centimes d'euros. mettre point avant centimes//s = nombre entier de centimes d'eurosfunction centimes(s) { var x = s.length; if (x > 2) {s = s.substring(0,x-2)+"."+s.substring(x-2,x);} if (x == 2) {s = "0."+s;} if (x == 1) {s = "0.0"+s;} return s;}//function testboutonpaie(){ var d = document.form;  x = getallfee(); y = parseInt(d.regle.value); var means = false; if (x > 0 && x >= y) {//du > encaisse    if (d.i_paiech && d.i_paiech.checked==true) {means = true;}    if (d.i_paiece && d.i_paiece.checked==true) {means = true;}    if (d.i_paiees && d.i_paiees.checked==true) {means = true;}    if (d.i_paievi && d.i_paievi.checked==true) {means = true;}    if (d.i_paiecb && d.i_paiecb.checked==true) {means = true;}    if (means == false) {alert("Please choose a means of payment."); return false;}   } if (x == 0) {   	if (d.i_paiech) {d.i_paiech.checked = false;}  	if (d.i_paiece) {d.i_paiece.checked = false;}  	if (d.i_paiees) {d.i_paiees.checked = false;}  	if (d.i_paievi) {d.i_paievi.checked = false;}  	if (d.i_paiecb) {d.i_paiecb.checked = false;}  	return true;   }}//fin//teste choix mode de paiementfunction testboutonpaieX(){ var d = document.form;  x = getallfee(); y = parseInt(d.regle.value); if ((x >= y) //du > encaisse    // && (d.i_paiech.checked==false)     // && (d.i_paiece.checked==false)     && (d.i_paievi.checked==false)     && (d.i_paiecb.checked==false))   {alert("Please choose a means of payment."); return false;   } if (x == 0) {  	// d.i_paiech.checked = false; 	// d.i_paiece.checked = false; 	d.i_paiecb.checked = false; 	d.i_paievi.checked = false;   }}//fin//verifie si deja paye par CBfunction testcbchange(){ var d = document.form; a = centimes(d.cbregle.value);// alert("v= "+a);  n = parseInt(d.cbregle.value);  if (n > 10) {  	//if (d.i_paiech) {alert("CH existe");} else {alert("CH n'existe pas");}    // d.i_paiech.checked = false;    // d.i_paiece.checked = false;    d.i_paiecb.checked = true;    d.i_paievi.checked = false;    if (a == d.total.value) {alert("Your payment by credit card has been received.");}    if (a != d.total.value) {alert("You previously paid "+a+" euros by credit card.\nIn case of additional fee, you must pay by credit card."+"\nIf not, contact directly the secretariat by e.mail.");}  }} //fin//teste autorisation CBfunction testcbregle(){ var d = document.form;// if (((d.i_paiech.checked == true) ||(d.i_paiece.checked == true)) && (eval(d.cbregle.value)>10)) { if (eval(d.cbregle.value)>10) {	// d.i_paiech.checked = false;	// d.i_paiece.checked = false;	d.i_paiecb.checked = true;	d.i_paievi.checked = false;	}}//fin//force le choix entre cheques, BC ou CB. Appele uniquement par CB, CH, CEfunction testch_cb(b){ d = document.form; x = getallfee();  testcbchange(); if (b.checked) {  	if (d.i_paiech) {d.i_paiech.checked = false;}  	if (d.i_paiece) {d.i_paiece.checked = false;}  	if (d.i_paiees) {d.i_paiees.checked = false;}  	if (d.i_paievi) {d.i_paievi.checked = false;}  	if (d.i_paiecb) {d.i_paiecb.checked = false;}   b.checked = true;// et remet a vrai la case cochee } if (x == 0) {b.checked = false;} if (d.i_paievi) { 	if (d.i_paievi.checked == false) {d.i_viref.value="";} else {d.i_viref.value="none";} } getallfee();}//fin//teste si guest ou scientifiquefunction testguest(){d = document.form;if(d.i_mbre.value == 9) {setInvisible('suite1');setInvisible('suite2');} else {setVisible('suite1');setVisible('suite2');}}//Interdit de venir cliquer dans les zones calculees du formulaire function interdit(){ alert("You can't edit this field. To change the fee, change the corresponding option."); getallfee(); return false;}//fin//Teste choix de communication (obligatoire) function obligatoire(){ if(document.form.i_zz3.value == "") { a=0; x =document.form.i_presente; n = x.length; for (var i = 0; i < n; i++) { if ( x[i].checked) {a=a+1;} } if (a == 0) { alert("Please indicate whether or not you present a communication at the meeting."); return false;} }}//fin//abandon de correctionfunction quitter(){ d = document.form; if (d.cbregle.value == "1") {    // d.i_paiech.checked = false;   // d.i_paiece.checked = false;   d.i_paiecb.checked = true;   d.i_paievi.checked = false;   alert("You previously registered asking payment by credit card. Either submit and proceed with this payment, or change your means of payment and submit.");return false;}if (confirm('No change to this form will be recorded. Do you really want to quit?') == false)  {return false;}  return true;} //fin//abandon d'inscription initialefunction quitter1(){ d = document.form; if (confirm('Do you really want to quit without registering?') == false) {return false;}   d.i_submit.value = "quit"; d.submit();//return true;} //fin// appelŽ par page initiale .html pour s'inscrire, etcfunction verif(d) { doc = document.form; x = d; //indique le type de demande// demande initiale d'inscription if (x == 3) { if (doc.i_sexe[0].checked == false && doc.i_sexe[1].checked == false) { alert("Please select Ms./Mr.");doc.aut2.focus(); return false;}  a = doc.aut2.value;  b = doc.pre2.value;  if (a.length < 2) {alert("Please type in your family name.");return false;}  if (b == "") {alert("Please type in your first name");return false;}  if (mail() == false) {return false;}  doc.i_autnom.value = a; doc.i_autprenom.value = b;  doc.action = acgi+"Inscr.nonMbre";  doc.i_submit.value = "save";  doc.submit();  return true; }// demande de resume if ((x >= 40) && (x< 50)) {  doc = document.form; //  doc.i_inscrnum.value=doc.num.value; doc.i_inscrcode.value=doc.code.value;  if  ((doc.i_inscrnum.value=="" ) || (doc.i_inscrcode.value == ""))  {alert("Type in the registration number and/or confidential code.");return false;}  if  (x == 41) {doc.action = acgi+"resum.form";}  if  (x == 42) {doc.action = acgi+"resum.edit";}  if  (x == 43) {doc.action = acgi+"resum.view";}  doc.i_submit.value = "save";  doc.submit();  return true; }// demande d'edition d'inscription if ((x > 50) && (x < 60)) {  if  ((doc.i_inscrnum.value=="" ) || (doc.i_inscrcode.value == "")) {alert(mess);return false;} if (x == 51) { doc.i_submit.value = "view"; doc.action = acgi+"Inscr.view";} if (x == 52) { doc.i_submit.value = "edit"; doc.action = acgi+"Inscr.edit";} doc.submit(); return true; }// reservation hoteliere if ((x > 60) && (x < 70)) { if  ((doc.i_inscrnum.value=="" ) || (doc.i_inscrcode.value == "")) {alert(mess);return false;} doc.action = acgi+"Inscr.reserv"; doc.i_submit.value = "save"; doc.submit(); return true; }// demande de bourse if ((x > 70) && (x < 80)) { if  ((doc.i_inscrnum.value=="" ) || (doc.i_inscrcode.value == "")) {alert(mess);return false;} if (x == 71) {doc.action = acgi+"stip.view";} if (x == 72) {doc.action = acgi+"stip.dem";} doc.i_submit.value = "save"; doc.submit(); return true; }// verification de mel if (x == 5) { if  (doc.i_inscrnum.value=="" || doc.i_inscrcode.value == "") {alert(mess);return false;} doc.action = acgi+"Inscr.mel"; doc.i_submit.value = "save"; doc.submit(); return true; }return false;}// fin de veriffunction verifinscr(appel) { //alert("*"+appel);d = document.form;if (appel == "0") { }	// appel initial pour editif (appel == "1") { if (etatcivil() == false) {return false;}}//page etat civilif (appel == "2") { 	if (obligatoire() == false) {jump("#0");return false;} // page options scientifiques	if (symp() == false) {return false;} }if (appel == "3") { } //page autres optionsif (appel == "4") { // page paiement  if (d.i_mbre.value == "0") {alert("Choose a category of participant\n(student, academic or corporate");return false;}  if (d.agree.checked == false) {  alert("You must tick the agreement checkbox before saving your registration."); return false;  }  if (testboutonpaie() == false) {return false;} else {testcbchange();}   d.i_submit.value = "save"; } if( d.i_submit.value == "") {d.i_submit.value = "edit";} d.submit();//return true;}//cookiesfunction cookieset() {	var cookies = document.cookie;	if (cookies.indexOf("ID=")>=0) {return;}	document.cookie = "ID=op; path=/";//alert(cookies);}//Ajout Francis le 22/10/03//Precharge les imagesfunction prechargeimages(){if (document.images);{var fichierimages = prechargeimages.arguments;var prechargetableau = new Array();for (var i =0; i < fichierimages.length; i++);{prechargetableau[i] = new Image;prechargetableau[i].src =  fichierimages[i];}}}//Dans le BODY ://<script language ="Javascript">//PrechargeImages('images1.jpg','images2.jpg','images2.jpg','images3.gif','etc');//</script>//Fin de prechargeImages