function init() {
  if (is_ie6) {
    ie6_init();
  }
}

function ie6_init() {
  // positioning of the elements fix
  var loginRightBorder = $('login_right_border');
  if (loginRightBorder)
    loginRightBorder.style.right = '-1px';
  
  var topMenu = $('top_menu');
  if (topMenu)
    topMenu.style.bottom = '-1px';
  
  // hover of the buttons fix
  var btnHazteSocio = $('btn_hazte_socio');
  if (btnHazteSocio) {
    btnHazteSocio.onmouseover = function() {
      this.style.backgroundImage = 'url(img/hazte_socio_btn_hover.jpg)';
    };
    btnHazteSocio.onmouseout = function() {
      this.style.backgroundImage = 'url(img/hazte_socio_btn.jpg)';
    };
  }
    
  var btnAcceder = $('btn_acceder');
  if (btnAcceder) {
    btnAcceder.onmouseover = function() {
      this.style.backgroundImage = 'url(img/acceder_btn_hover.jpg)';
    };
    btnAcceder.onmouseout = function() {
      this.style.backgroundImage = 'url(img/acceder_btn.jpg)';
    };
  }
  
  var idiomaEs = $('idioma_es');
  if (idiomaEs) {
    idiomaEs.onmouseover = function() {
      this.style.backgroundImage = 'url(img/bandera_dominicana_small_hover.jpg)';
      this.style.color = '#666666';
    };
    idiomaEs.onmouseout = function() {
      this.style.backgroundImage = 'url(img/bandera_dominicana_small.jpg)';
      this.style.color = '#333333';
    };
  }
  
  var idiomaEn = $('idioma_en');
  if (idiomaEn) {
    idiomaEn.onmouseover = function() {
      this.style.backgroundImage = 'url(img/bandera_uk_small_hover.jpg)';
      this.style.color = '#666666';
    };
    idiomaEn.onmouseout = function() {
      this.style.backgroundImage = 'url(img/bandera_uk_small.jpg)';
      this.style.color = '#333333';
    };
  }
}

// param = field : field to clear
// param = def : default value
// desc : clears the field if it has a default value
function clearText(field, def) {
  var elem = $(field);
  if (elem.value == def) {
    elem.value = '';
  }
}

// param = field : field to fill
// param = def : default value
// desc : sets the default value of a field
function setDefText(field, def) {
  var elem = $(field);
  if (elem.value == '') {
    elem.value = def;
  }
}

var defNombreCompleto = 'NOMBRE COMPLETO';
var defCorreoElectronico = 'CORREO ELECTRONICO';
var defTelefono = 'TELEFONO';
function validarSolicitudServicios() {
  var txtNombreCompleto = $('txtNombreCompleto');
  var txtCorreoElectronico = $('txtCorreoElectronico');
  var txtTelefono = $('txtTelefono');
  if (txtNombreCompleto.value == defNombreCompleto || txtCorreoElectronico.value == defCorreoElectronico || txtTelefono.value == defTelefono) {
    $('frmSsErrorMsg').innerHTML = 'Debe llenar todos los campos.';
    return false;
  }
  return true;
}

