if (navigator.userAgent.indexOf("Firefox")!=-1){ var nav4 = window.Event ? true : false;}
else{ var nav4 = window.event ? true : false;}
function numeros(evt){
// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57
var key = nav4 ? evt.which : evt.keyCode; 
return (key<=32 || (key >= 48 && key <= 57) || key==46 || key==44);
}
numbers = new Array("input1","input2","input3","input4","input5","input6","input7","input75","input8","input9","input10");

function in_array( what, where ){
	var a=false;
	for(var i=0;i<where.length;i++){
	  if(what == where[i]){
	    a=true;
        break;
	  }
	}
	return a;
}

function validar(){


	// Validamos los campos de input text
	camposTexto = document.getElementById("form").elements; 
	
	for (x=0; x < camposTexto.length; x++) {
		
		if(in_array(camposTexto[x].id,numbers))
		{
			if (camposTexto[x].value == '' && camposTexto[x].type=='text'){
				alert("Rellene todos los campos marcados con un asterisco");
				return false;
			} 
		}   
   }
   return true;
}

