function validacion_form(){
       
	var ok  = false;
	var campos= "";
        var contador=0;
        var ind=0;

		
		
		
		if(document.getElementById("nombre").value != null && document.getElementById("nombre").value == ""){
		campos=campos + " - Nombre \n";
	}else{
           contador=contador + 1;
        }
		
		
		if(document.getElementById("edad").value != null && document.getElementById("edad").value == ""){
			campos=campos + " - Edad \n";
	}else{
           contador=contador + 1;
        }
		
		
		if(document.getElementById("ciudad").value != null && document.getElementById("ciudad").value == ""){
			campos=campos +" - Ciudad \n";
	}else{
           contador=contador + 1;
        }
	
		
		if(document.getElementById("datos4").value != null && document.getElementById("datos4").value == ""){
			campos=campos + " - Has pensado realizarte un aumento mamario? \n";
	}else{
           contador=contador + 1;
        }
		
		if(document.getElementById("datos3").value != null && document.getElementById("datos3").value == ""){
			campos=campos + " - Deseas recibir informacion sobre la cirugia de aumento mamario en tu correo electronico? \n";
	}else{
           contador=contador + 1;
        }


                
        if(document.getElementById("email").value != null && document.getElementById("email").value == ""){
		campos=campos + " - Email \n";
	}else if(document.getElementById("email").value != ""){
		var ind1, ind2, ind3;
		ind1 = document.getElementById("email").value.indexOf('@');
		ind2 = document.getElementById("email").value.indexOf('.');
		ind3 = document.getElementById("email").value.lastIndexOf('@');
		if ((ind1<=0) || (ind2<=0) || (ind3 != ind1))	{
			ind=1;
		}else{
                   contador=contador + 1;
                }
        }

       

	if(contador == 6){
             ok=true;
        }else{
		     if(ind==1 && contador == 5){
			alert("El correo electronico ingresado no es valido");
		     }else{
		       		var msn1="Los siguientes campos obligatorios no han sido diligenciados: \n\n"
				var msn2="Por favor diligencie el valor de estos campos."
		       		alert(msn1+campos+"\n"+msn2);
		     }
	}

	
        return(contador);
	

}

function validacion_cont(){
       
	var ok  = false;
	var campos= "";
        var contador=0;
        var ind=0;

		
		
		
		if(document.getElementById("nombre").value != null && document.getElementById("nombre").value == ""){
		campos=campos + " - Nombre \n";
	}else{
           contador=contador + 1;
        }
		
		if(document.getElementById("mensaje").value != null && document.getElementById("mensaje").value == ""){
		campos=campos + " - Mensaje \n";
	}else{
           contador=contador + 1;
        }
		
		if(document.getElementById("ciudad").value != null && document.getElementById("ciudad").value == ""){
		campos=campos + " - Ciudad \n";
	}else{
           contador=contador + 1;
        }


                
        if(document.getElementById("email").value != null && document.getElementById("email").value == ""){
		campos=campos + " - Email \n";
	}else if(document.getElementById("email").value != ""){
		var ind1, ind2, ind3;
		ind1 = document.getElementById("email").value.indexOf('@');
		ind2 = document.getElementById("email").value.indexOf('.');
		ind3 = document.getElementById("email").value.lastIndexOf('@');
		if ((ind1<=0) || (ind2<=0) || (ind3 != ind1))	{
			ind=1;
		}else{
                   contador=contador + 1;
                }
        }

       

	if(contador == 4){
             ok=true;
        }else{
		     if(ind==1 && contador == 3){
			alert("El correo electronico ingresado no es valido");
		     }else{
		       		var msn1="Los siguientes campos obligatorios no han sido diligenciados: \n\n"
				var msn2="Por favor diligencie el valor de estos campos."
		       		alert(msn1+campos+"\n"+msn2);
		     }
	}

	
        return(contador);
	

}

