// JavaScript Document

function checkformgamablanca()
{
var error = "Por favor rellene los siguientes campos:\n\n";
var errores = 0;

if (document.gamablanca.nombre.value == "")
{
error += "Nombre y Apellidos\n";
errores += 1;
}

if (document.gamablanca.provincia.value == "")
{
error += "Provincia\n";
errores += 1;
}

if (document.gamablanca.telefono.value == "")
{
error += "Teléfono\n";
errores += 1;
}

if (document.gamablanca.tipo.value == "")
{
error += "Tipo de producto averiado\n";
errores += 1;
}

if (!(document.gamablanca.garantia[0].checked || document.gamablanca.garantia[1].checked))
{
error += "¿Está su aparato en garantía?\n";
errores += 1;
}
  
if (errores == 0) 
{
document.gamablanca.submit();
}
else
{
alert(error);
}
}