function TrackerLocationSelect (mydocumentobj)
{
  this.myDocument=mydocumentobj;

  this.onChange = function(mySelectObject) {
    var PulldownName = mySelectObject.name;
    var myValue = mySelectObject[mySelectObject.selectedIndex].value;
    var enableAll = isNaN(myValue);
    //it_id_country
    if (PulldownName == 'it_id_country') {
      if (enableAll) {
        this.setAllEnabled();
      } else {
        this.setDisabled('it_id_province');
        this.setDisabled('it_id_municipality');
        this.setDisabled('it_id_region');
      }
    }
    //it_id_province
    if (PulldownName == 'it_id_province') {
      if (enableAll) {
        this.setAllEnabled();
      } else {
        this.setDisabled('it_id_country');
        this.setDisabled('it_id_municipality');
        this.setDisabled('it_id_region');
      }
    }
    //it_id_municipality
    if (PulldownName == 'it_id_municipality') {
      if (enableAll) {
        this.setAllEnabled();
      } else {
        this.setDisabled('it_id_country');
        this.setDisabled('it_id_province');
        this.setDisabled('it_id_region');
      }
    }
    if (PulldownName == 'it_id_region') {
      if (enableAll) {
        this.setAllEnabled();
      } else {
        this.setDisabled('it_id_country');
        this.setDisabled('it_id_province');
        this.setDisabled('it_id_municipality');
      }
    }
  }

  this.setDisabled = function (PulldownName) {
    this.myDocument.getElementById(PulldownName).disabled=true;
  }

  this.setEnabled = function (PulldownName) {
    this.myDocument.getElementById(PulldownName).disabled=false;
  }

  this.setAllEnabled = function() {
   this.setEnabled('it_id_municipality');
   this.setEnabled('it_id_country');
   this.setEnabled('it_id_province');
   this.setEnabled('it_id_region');
  }

  this.set = function() {
    var myCountryObj=this.myDocument.getElementById('it_id_country');
    if (!isNaN(myCountryObj[myCountryObj.selectedIndex].value)) {
      this.onChange(myCountryObj);
    }
    var myProvinceObj=this.myDocument.getElementById('it_id_province');
    if (!isNaN(myProvinceObj[myProvinceObj.selectedIndex].value)) {
      this.onChange(myProvinceObj);
    }
    var myMunicipalityObj=this.myDocument.getElementById('it_id_municipality');
    if (!isNaN(myMunicipalityObj[myMunicipalityObj.selectedIndex].value)) {
      this.onChange(myMunicipalityObj);
    }
    var myRegionObj=this.myDocument.getElementById('it_id_region');
    if (!isNaN(myRegionObj[myRegionObj.selectedIndex].value)) {
      this.onChange(myRegionObj);
    }
  }

}
