function LSDrawSelectBox(){
  s.DisplaySelectBox();
}
function CreateCountrySelectBox(){
  this.InputName = fInputName;
  this.AdditionalAttributes = fAdditionalAttributes;
  this.SelectedValue = fSelectedValue;
  this.DisplayBlank= fDisplayBlank;
  this.BlankText= fBlankText;
  this.CountryList = new Object();
}
CreateCountrySelectBox.prototype.a = function(aName,aValue){
  this.CountryList[aValue] = [aName,aValue];
}
CreateCountrySelectBox.prototype.DisplaySelectBox = function(){
  var zOutput;
  zOutput = this.SetOpenSelectTag();
  for(x in this.CountryList){
    zOutput += this.SetOption(this.CountryList[x][0],this.CountryList[x][1]);
  }
  zOutput += this.SetCloseSelectTag();
  document.write(zOutput);
}
CreateCountrySelectBox.prototype.SetOption = function(aName,aValue){
  var zOutput='';
  var zSelected='';
  if(this.SelectedValue==aValue){
    zSelected = ' selected';
  }
  zOutput = '  <option value="'+ aValue +'"'+ zSelected +'>'+ aName +'</option>\n';
  return zOutput;
}
CreateCountrySelectBox.prototype.SetOpenSelectTag = function(){
  var zSelected = '';
  var zOutput='<select name="'+ this.InputName +'"'+ this.AdditionalAttributes +'>\n';
  if(this.DisplayBlank){
    if(this.SelectedValue==''){
      zSelected = ' selected';
    }
    zOutput+='  <option value=""'+ zSelected +'>'+ this.BlankText +'</option>\n';
  }
  return zOutput;
  alert('bottom2 of function');
}
CreateCountrySelectBox.prototype.SetCloseSelectTag = function(){
  var zOutput='</select>\n';
  return zOutput;
}
CreateCountrySelectBox.prototype.SortCountryList = function(){
  this.CountryList.sort(SortArray);
}
function SortArray(a,b){
  if(a[1]>b[1]){
    return 1;
  }else if(a[1]<b[1]){
    return -1;
  }
  return 0;
}
