if(document.all && !document.getElementById) { //IE4 support
  document.getElementById = function(id) { return document.all[id]; }
}

function other2(selected) { //selected is the selected option
  if(!document.getElementById) return;

  // selected's value property is retrieved and converted to lower case to make 
  // comparing it to another string simpler
  var val = selected.value.toLowerCase();

  // gets the object reference for the element
  var el = document.getElementById('other2_label');

  // if val is set to 'other2' show the textbox
  if(val == 'other2') {
    el.style.display='block';

  } else { // otherwise hide it or keep it hidden.

    el.style.display='none';
  }
}
function dss_addLoadEvent(fn) {
  if(typeof(fn)!="function")return;
  var tempFunc=window.onload;
  window.onload=function() {
    if(typeof(tempFunc)=="function")tempFunc();
    fn();
  }
}
dss_addLoadEvent(function() {
  // we find the form element and the select element and attach the event 
  // handlers to them
  var f = document.form1;
  // this next line of code is used to prevent this demo from being submitted
  // remove it or change it as needed
 // f.onsubmit = function(){return false;}
  var sel = f.spouse_ethnicity;
  sel.onchange=function(){other2(this.options[this.selectedIndex])}

  // we call the function when the page loads to hide #otromunicipio_descripcion_label initially
  sel.onchange();
});
