
var lugar_viejo = 99 

function on_posi(lugar) {
  if (lugar_viejo != lugar) {
    var objeto
    objeto = eval('document.posi'+lugar)
    objeto.src = "../imagenes/boton_on.gif"}
}

function off_posi(lugar) {
  if (lugar_viejo != lugar) {
    var objeto
    objeto = eval('document.posi'+lugar)
    objeto.src = "../imagenes/boton_off.gif"}
}

function on_btn(lugar) {
  var objeto_1
  var objeto_2
  objeto_1 = eval('document.posi'+lugar_viejo)
  objeto_2 = eval('document.posi'+lugar)
  if (lugar_viejo != 99) {
    objeto_1.src = "../imagenes/boton_off.gif"}
  objeto_2.src = "../imagenes/boton_click.gif"
  lugar_viejo = lugar
}

function icono_catalogo(lugar,eleccion) {
  var objeto
  objeto = eval('document.icono'+lugar)
  if (eleccion == 0) {objeto.src = "../imagenes/icono_0.gif"}
  else if (eleccion == 1) {objeto.src = "../imagenes/icono_1.gif"}
  else if (eleccion == 2) {objeto.src = "../imagenes/icono_2.gif"}
  else if (eleccion == 3) {objeto.src = "../imagenes/icono_3.gif"}
  else if (eleccion == 4) {objeto.src = "../imagenes/icono_4.gif"}
  else if (eleccion == 5) {objeto.src = "../imagenes/icono_5.gif"}
  else if (eleccion == 6) {objeto.src = "../imagenes/icono_6.gif"}
  else if (eleccion == 7) {objeto.src = "../imagenes/icono_7.gif"}
  else if (eleccion == 8) {objeto.src = "../imagenes/icono_8.gif"}
  else if (eleccion == 9) {objeto.src = "../imagenes/icono_9.gif"}
  else if (eleccion == 10) {objeto.src = "../imagenes/icono_10.gif"}
  else if (eleccion == 11) {objeto.src = "../imagenes/icono_11.gif"}
  else if (eleccion == 12) {objeto.src = "../imagenes/icono_12.gif"}
}

function btn_bandera(eleccion) {
  if (eleccion == 1) {document.bandera_uk.src = "../imagenes/bandera_uk_down.gif"}
  else if (eleccion == 2) {document.bandera_uk.src = "../imagenes/bandera_uk_up.gif"}
  else if (eleccion == 3) {document.bandera_es.src = "../imagenes/bandera_es_down.gif"}
  else if (eleccion == 4) {document.bandera_es.src = "../imagenes/bandera_es_up.gif"}
}

function ir_version_es() {
  parent.z_menu_sup.document.location = "menu_sup.htm"
  parent.z_rotulo_centro.document.location = "rotulo_centro.htm"
  parent.z_centro.document.location  = "bienvenida.asp"
}

function ir_version_uk() {
  parent.z_menu_sup.document.location = "uk_menu_sup.htm"
  parent.z_rotulo_centro.document.location = "uk_rotulo_centro.htm"
  parent.z_centro.document.location  = "uk_bienvenida.asp"
}

function controlar_contacto(form) {
  var txt_error = ""
  if (form.TEXTO.value == "") {
     txt_error = "\n ¡ No ha indicado qué comentario o solicitud desea !" + txt_error
     form.TEXTO.focus()}
  if (form.TELEFONO.value == "") {
     txt_error = "\n ¡ No ha indicado su teléfono !" + txt_error
     form.TELEFONO.focus()}
  if (form.NOMBRE.value == "") {
     txt_error = "\n ¡ No ha indicado su nombre !" + txt_error
     form.NOMBRE.focus()}
  if (txt_error == "") {form.submit()}
  else {txt_error = "No ha completado algunos datos necesarios del " +
       "formulario: \n " + txt_error
       alert(txt_error)}
}

function uk_controlar_contacto(form) {
  var txt_error = ""
  if (form.TEXTO.value == "") {
     txt_error = "\n You haven't indicated what's comment or request you want !" + txt_error
     form.TEXTO.focus()}
  if (form.TELEFONO.value == "") {
     txt_error = "\n You haven't indicated your phone !" + txt_error
     form.TELEFONO.focus()}
  if (form.NOMBRE.value == "") {
     txt_error = "\n You haven't indicated your name !" + txt_error
     form.NOMBRE.focus()}
  if (txt_error == "") {form.submit()}
  else {txt_error = "You haven't completed some necessary data of the " +
       "form: \n " + txt_error
       alert(txt_error)}
}
