   function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Veuillez saisir une adresse E-mail valide.")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Veuillez saisir une adresse E-mail valide.")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Veuillez saisir une adresse E-mail valide.")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Veuillez saisir une adresse E-mail valide.")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Veuillez saisir une adresse E-mail valide.")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    alert("Veuillez saisir une adresse E-mail valide.")
		    return false
		 }
		 
 		 return true
	}

function ValidateForm1Email(){
	var emailID=document.form1.email;
	var emailID2=document.form1.email2;

	if ((emailID.value==null)||(emailID.value=="")){
		alert("Vous devez renseigner votre E-mail.");
		document.form1.email.focus();
		return;
	}
	if (echeck(emailID.value)==false){
		emailID.value="";
		document.form1.email.focus();
		return;
	}
	if ((emailID2.value==null)||(emailID2.value=="")){
		alert("Vous devez confirmer votre E-mail.")
		document.form1.email2.focus();
		return;
	}
	if (emailID.value != emailID2.value) {
		alert("Vous devez saisir le même E-mail.");
		document.form1.email2.focus();
		return;
	}
	document.form1.submit();
 	return;
 }

function echeckEn(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   alert("Please enter a valid E-mail.")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert("Invalid E-mail")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    alert("Please enter a valid E-mail.")
	    return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	    alert("Please enter a valid E-mail.")
	    return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    alert("Please enter a valid E-mail.")
	    return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
	    alert("Please enter a valid E-mail.")
	    return false
	 }

	 if (str.indexOf(" ")!=-1){
	    alert("Please enter a valid E-mail.")
	    return false
	 }
	 
		 return true
}

function ValidateForm1EmailEn(){
	var emailID=document.form1.email;
	var emailID2=document.form1.email2;

	if ((emailID.value==null)||(emailID.value=="")){
		alert("You must fill your E-mail.");
		document.form1.email.focus();
		return;
	}
	if (echeckEn(emailID.value)==false){
		emailID.value="";
		document.form1.email.focus();
		return;
	}
	if ((emailID2.value==null)||(emailID2.value=="")){
		alert("You must confirm your E-mail.")
		document.form1.email2.focus();
		return;
	}
	if (emailID.value != emailID2.value) {
		alert("You must enter the same E-mail.");
		document.form1.email2.focus();
		return;
	}
	document.form1.submit();
 	return;
 }

function onClickCB() {
	window.document.getElementById('t1').rows[2].style.display='none';
	window.document.getElementById('t1').rows[3].style.display='';

	window.document.getElementById('t1').rows[1].cells[1].style.borderTop="1px dotted black";
	window.document.getElementById('t1').rows[1].cells[1].style.borderRight="1px dotted black";
	window.document.getElementById('t1').rows[1].cells[0].style.borderBottom="1px dotted black";

	window.document.getElementById('t1').rows[1].cells[1].style.borderBottom="";
	window.document.getElementById('t1').rows[1].cells[0].style.borderTop="";
	window.document.getElementById('t1').rows[1].cells[0].style.borderLeft="";

	return;
}
function onClickTicket() {
	window.document.getElementById('t1').rows[2].style.display='';
	window.document.getElementById('t1').rows[3].style.display='none';

	window.document.getElementById('t1').rows[1].cells[0].style.borderTop="1px dotted black";
	window.document.getElementById('t1').rows[1].cells[0].style.borderLeft="1px dotted black";
	window.document.getElementById('t1').rows[1].cells[1].style.borderBottom="1px dotted black";

	window.document.getElementById('t1').rows[1].cells[0].style.borderBottom="";
	window.document.getElementById('t1').rows[1].cells[1].style.borderTop="";
	window.document.getElementById('t1').rows[1].cells[1].style.borderRight="";

	return;
}
 var value = 0;
                        function onClickReturn() {
                                if (value>0) return false;
                                value=value+1;
                                return true;
                        }
                        function confirme() {
                                if (onClickReturn()){
                                        document.confirm.submit();
                                }
                        }
