// JavaScript Document

function testform(which){

	var pass=true;
	if (document.images){
		for (i=0;i<which.length;i++){
			var tempobj=which.elements[i]
			if (tempobj.id.substring(0,8)=="required"){
				if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
				pass=false
				break
				}
			}
		}
	}
	if (!pass){
	alert("Vous devez entrer votre e-mail")
	return false
	}
	else   
    return true;
    	
}

function checkrequired(which){

	var pass=true;
	if (document.images){
		for (i=0;i<which.length;i++){
			var tempobj=which.elements[i]
			if (tempobj.id.substring(0,8)=="required"){
				if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
				pass=false
				break
				}
			}
		}
	}
	if (!pass){
	alert("Tous les champs suivi de * doivent etre renseignes")
	return false
	}
	/* else {

	  if (which.diner.checked == false && which.cocktail.checked == false && which.buffet.checked == false)

    	{
   			alert("Vous devez choisir au moins un type de reception")
    		return false;
    	}
	   else
      return true;

	}   */
	
}



function checkrequired2(which){

	var pass=true
		if (document.images){
			for (i=0;i<which.length;i++){
				var tempobj=which.elements[i]
				if (tempobj.id.substring(0,8)=="required"){
					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
					pass=false
					break
					}
				}
			}
		}
		if (!pass){
		alert("Tous les champs suivi de * doivent etre renseignes")
		return false
		}
	/*else {

	  if (which.diner.checked == false && which.cocktail.checked == false && which.buffet.checked == false && which.presse.checked == false && which.petitdej.checked == false && which.openbar.checked == false)

    	{
   			alert("Vous devez choisir au moins un type de reception")
    		return false;
    	} 
	   else
      return true;
      
	}   */
	
}