// support4.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.autre.value == ""){
		data.autre.focus();
		alert("Please register your other product.");
		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.description.value == ""){
		data.description.focus();
		alert("Please type the description of your problem.");
		return(false);
  	}

document.support.submit();

}


