function checkAlta(theForm)
{
 if (theForm.precio.value == "")
  {
	  theForm.precio.value = 0
  }
 var checkOKprecio = "0123456789.";
 var checkStrprecio = theForm.precio.value;
 var allValid = true;
  for (i = 0;  i < checkStrprecio.length;  i++)
  {
    ch = checkStrprecio.charAt(i);
    for (j = 0;  j < checkOKprecio.length;  j++)
      if (ch == checkOKprecio.charAt(j))
        break;
    if (j == checkOKprecio.length)
    {
      allValid = false;
      break;
    }
  }

 if (!allValid)
  {
    alert("Utilice el punto para la separación decimal en el campo \"Precio\".");
    theForm.precio.focus();
    return (false);
  }

 if (theForm.tInmueble.value == "0")
  {
    alert("Por favor seleccione \"Tipo de inmueble\".");
    theForm.tInmueble.focus();
    return (false);
  }

 if (theForm.tOferta.value == "0")
  {
    alert("Por favor seleccione \"Modalidad\".");
    theForm.tOferta.focus();
    return (false);
  }
 
 if (theForm.localidad.value == "0")
  {
    alert("Por favor seleccione \"Localidad\".");
    theForm.localidad.focus();
    return (false);
  }

if (theForm.zona.value == "")
  {
    alert("Por favor indique una \"Zona\".");
    theForm.zona.focus();
    return (false);
  }

 if (theForm.superficie.value == "")
  {
    alert("Por favor indique \"Superficie\".");
    theForm.superficie.focus();
    return (false);
  }
  var checkOKsuperficie = "0123456789";
  var checkStrsuperficie = theForm.superficie.value;
  var allValid = true;
  for (i = 0;  i < checkStrsuperficie.length;  i++)
  {
    ch = checkStrsuperficie.charAt(i);
    for (j = 0;  j < checkOKsuperficie.length;  j++)
      if (ch == checkOKsuperficie.charAt(j))
        break;
    if (j == checkOKsuperficie.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Debe introducir un número entero (sin decimales) en el campo \"Superficie\".");
    theForm.superficie.focus();
    return (false);
  }

 if (theForm.dormitorios.value == "")
  {
    alert("Por favor indique \"Dormitorios\".");
    theForm.dormitorios.focus();
    return (false);
  }
  var checkOKdormitorios = "0123456789";
  var checkStrdormitorios = theForm.dormitorios.value;
  var allValid = true;
  for (i = 0;  i < checkStrdormitorios.length;  i++)
  {
    ch = checkStrdormitorios.charAt(i);
    for (j = 0;  j < checkOKdormitorios.length;  j++)
      if (ch == checkOKdormitorios.charAt(j))
        break;
    if (j == checkOKdormitorios.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Solo puede introducir números en el campo \"Dormitorios\".");
    theForm.dormitorios.focus();
    return (false);
  }


  
  return (true);
}
