function contacto_Validator(f, idioma) {
  var error;
  
  if (idioma == 'es') {
    error = new Array("No ha rellenado correctamente el campo Nombre",
                      "No ha rellenado correctamente el campo Apellidos",
                      "No ha rellenado correctamente el campo País",
                      "No ha rellenado correctamente el campo e-mail",
                      "No ha rellenado correctamente el campo Teléfono",
                      "No ha rellenado correctamente el campo Tema",
                      "No ha rellenado correctamente el campo Asunto",
                      "No ha rellenado correctamente el campo Comentarios",
					  "Has de aceptar la política de privacidad");
  } else {
    error = new Array("There is an error in the field Name",
                      "There is an error in the field Last Name",
                      "There is an error in the field Country",
                      "There is an error in the field e-mail",
                      "There is an error in the field Telephone Number",
                      "There is an error in the field Talking Point",
                      "There is an error in the field Subject",
                      "There is an error in the field Comments",
					  "You need to accept the privacy policy");
  }
                              
  if (window.RegExp) {
    if (f.elements.nombre.value.length == 0) {
      alert(error[0]);
      f.elements.nombre.focus();
      return(false);
    }

    if (f.elements.apellidos.value.length == 0) {
      alert(error[1]);
      f.elements.apellidos.focus();
      return(false);
    }
	
	if (f.elements.legal.value	!= "aceptado") {
      alert(error[8]);
      f.elements.apellidos.focus();
      return(false);
    }

    if (f.elements.id_pais.selectedIndex == 0) {
      alert(error[2]);
      f.elements.id_pais.focus();
      return(false);
    }

    var reg = new RegExp("^[-a-zA-z0-9.]+@[-a-zA-Z0-9]+\.+[-a-zA-Z0-9]+$","g");
    if (!reg.test(f.elements.email.value)) {
      alert(error[3]);
      f.elements.email.focus();
      return(false);
    }

    var reg = new RegExp("^([.+.]?[0-9]{6,15})?$","g");
    if (!reg.test(f.elements.telefono.value)) {
      alert(error[4]);
      f.elements.telefono.focus();
      return(false);
    }

    if (f.elements.id_tema.selectedIndex == 0) {
      alert(error[5]);
      f.elements.id_tema.focus();
      return(false);
    }

    if (f.elements.asunto.value.length == 0) {
      alert(error[6]);
      f.elements.asunto.focus();
      return(false);
    }

    if (f.elements.cuerpo.value.length == 0) {
      alert(error[7]);
      f.elements.cuerpo.focus();
      return(false);
    }
  }
}

function resize(w,h) {
	screenH = window.screen.height;
	screenW = window.screen.width;
	if (h>screenH) {
		h = screenH;
	}
	window.parent.resizeTo(w,h);
	window.parent.moveTo(Math.ceil((screenW - w )/ 2), Math.ceil((screenH - h) / 2));
}

