// support1.html
function valider() {

	data = document.support;

	if (data.nom.value == ""){
	  data.nom.focus();
	  alert("Please register your name.");
	  return(false);
  	}

	if (data.societe.value == ""){
		data.societe.focus();
		alert("Please register the name of your company.");
		return(false);
  	}

	if (data.courriel.value == ""){
	  data.courriel.focus();
	  alert("Please register your email.");
	  return(false);
	}else{
	  var checkOK = "@";
	  var Courriel = data.courriel.value;
	  var Longueur = Courriel.length;
	  var allValid = true;
	  var nbr = 0
	   for (z = 0;  z < Courriel.length;  z++){
	      ch = Courriel.charAt(z);
	      if (ch == "@"){ 
	        nbr = nbr + 1
	      }
	  ch = Courriel.charAt(z);
    	} 
	}
	if (nbr != 1){
	    alert("There is an error in your email address.");
	    data.courriel.focus();
	    return (false);
	}

	  var checkOK = ".";
	  var Courriel = data.courriel.value;
	  var Longueur = Courriel.length;
	  var allValid = true;
	  var nbr = 0
	   for (z = 0;  z < Courriel.length;  z++){
	      ch = Courriel.charAt(z);
	      if (ch == "."){ 
	        nbr = nbr + 1
       	      }
  		ch = Courriel.charAt(z);
	   } 
	  if (nbr == 0){
	    alert("There is an error in your email address.");
	    data.courriel.focus();
	    return (false);
	  }

	if (data.phone.value == ""){
		data.phone.focus();
		alert("Please register your telephone number.");
		return(false);
  	}

	if (data.selectOS.options[document.support.selectOS.options.selectedIndex].value == ""){
		data.selectOS.focus();
		alert("Please select your operating system.");
		return(false);
	}

	if (data.selectTECVersion.options[document.support.selectTECVersion.options.selectedIndex].value == ""){
		data.selectTECVersion.focus();
		alert("Please select the version of your course.");
		return(false);
	}

	if (data.TEC.value == ""){
		data.TEC.focus();
		alert("Please register the title of your course.");
		return(false);
  	}

	if (data.langue.value == ""){
		data.langue.focus();
		alert("Please register the language of your formation.");
		return(false);
  	}

	if (data.TECSerie.value == ""){
		data.TECSerie.focus();
		alert("Please register the serial number of the product.");
		return(false);
  	}
	if (data.selectTECType.options[document.support.selectTECType.options.selectedIndex].value == ""){
		data.selectTECType.focus();
		alert("Please select the type of your licence.");
		return(false);
	}
	if (data.selectTECInstall.options[document.support.selectTECInstall.options.selectedIndex].value == ""){
		data.selectTECInstall.focus();
		alert("Please select the type of installation that you carried out.");
		return(false);
	}
	
	if (data.selectTECAdmin.options[document.support.selectTECAdmin.options.selectedIndex].value == ""){
		data.selectTECAdmin.focus();
		alert("Do you have the software of students management 'Administrator TEC'?");
		return(false);
	}

	if (data.description.value == ""){
		data.description.focus();
		alert("Please type a description of your problem.");
		return(false);
  	}

document.support.submit();

}


