function State( abbr, state ){
    this.ShortName = abbr;
    this.Name = state;
};

States.prototype.fillSelect = function(select){
    for( stateIndex=0; stateIndex < this.list.length; stateIndex++){
        var option = document.createElement('option');
        option.value = this.list[stateIndex].ShortName;
        option.text = this.list[stateIndex].Name;
        select.add( option, undefined );
    }
};
States.prototype.expandState = function(abbr){
    var result = null;
    
    for( stateIndex=0; stateIndex < this.list.length; stateIndex++)
        if( this.list[stateIndex].ShortName == abbr ){
            result = this.list[stateIndex].Name;
            break;
        }
        
    return result;
};
States.prototype.compressState = function(name){
    var result = null;
    
    for( stateIndex=0; stateIndex < this.list.length; stateIndex++)
        if( this.list[stateIndex].Name == abbr ){
            result = this.list[stateIndex].ShortName;
            break;
        }
        
    return result;
};
function States(){
    this.list = new Array();
	this.list.push(new State('AL','Alabama'));
	this.list.push(new State('AK','Alaska'));
	this.list.push(new State('AZ','Arizona'));
	this.list.push(new State('AR','Arkanasas'));
	this.list.push(new State('CA','California'));
	this.list.push(new State('CO','Colorado'));
	this.list.push(new State('CT','Conneticut'));
	this.list.push(new State('DE','Delaware'));
	this.list.push(new State('DC','District of Columbia'));
	this.list.push(new State('FL','Florida'));
	this.list.push(new State('GA','Georgia'));
	this.list.push(new State('HA','Hawaii'));
	this.list.push(new State('ID','Idaho'));
	this.list.push(new State('IL','Illinois'));
	this.list.push(new State('IN','Indiana'));
	this.list.push(new State('IA','Iowa'));
	this.list.push(new State('KS','Kansas'));
	this.list.push(new State('KY','Kentucky'));
	this.list.push(new State('LA','Louisiana'));
	this.list.push(new State('ME','Maine'));
	this.list.push(new State('MD','Maryland'));
	this.list.push(new State('MA','Massachusetts'));
	this.list.push(new State('MI','Michigan'));
	this.list.push(new State('MN','Minnesota'));
	this.list.push(new State('MS','Mississippi'));
	this.list.push(new State('MO','Missouri'));
	this.list.push(new State('MT','Montana'));
	this.list.push(new State('NE','Nebraska'));
	this.list.push(new State('NV','Nevada'));
	this.list.push(new State('NH','New Hampshire'));
	this.list.push(new State('NJ','New Jersey'));
	this.list.push(new State('NM','New Mexico'));
	this.list.push(new State('NY','New York'));
	this.list.push(new State('NC','North Carolina'));
	this.list.push(new State('ND','North Dakota'));
	this.list.push(new State('OH','Ohio'));
	this.list.push(new State('OK','Oklahoma'));
	this.list.push(new State('OR','Oregon'));
	this.list.push(new State('PA','Pennsylvania'));
	this.list.push(new State('RI','Rhode Island'));
	this.list.push(new State('SC','South Carolina'));
	this.list.push(new State('SD','South Dakota'));
	this.list.push(new State('TN','Tennessee'));
	this.list.push(new State('TX','Texas'));
	this.list.push(new State('UT','Utah'));
	this.list.push(new State('VT','Vermont'));
	this.list.push(new State('VA','Virginia'));
	this.list.push(new State('WA','Washington'));
	this.list.push(new State('WV','West Virginia'));
	this.list.push(new State('WI','Wisconsin'));
	this.list.push(new State('WY','Wyoming'));
};

