function StateSuggestions() {
    this.states = [
"Albion",
"American Falls",
"Arco",
"Ashton",
"Athol",
"Atlanta",
"Bayview",
"Bellevue",
"Blackfoot",
"Bliss",
"Boise",
"Bonners Ferry",
"Bruneau",
"Buhl",
"Burley",
"Caldwell",
"Cambridge",
"Cascade",
"Challis",
"Clayton",
"Coeur D Alene",
"Coolin",
"Cottonwood",
"Council",
"Craigmont",
"Dietrich",
"Dixie",
"Donnelly",
"Driggs",
"Dubois",
"Eagle",
"Eden",
"Elk City",
"Elk River",
"Emmett",
"Fairfield",
"Garden Valley",
"Glenns Ferry",
"Gooding",
"Grace",
"Grand View",
"Grangeville",
"Hagerman",
"Hailey",
"Harrison",
"Hayden",
"Hayden Lake",
"Heyburn",
"Homedale",
"Hope",
"Idaho City",
"Idaho Falls",
"Irwin",
"Island Park",
"Jerome",
"Kamiah",
"Kellogg",
"Ketchum",
"Kooskia",
"Lava Hot Springs",
"Leadore",
"Lewiston",
"Mackay",
"Malad City",
"Marsing",
"Mccall",
"Meridian",
"Montpelier",
"Moscow",
"Mountain Home",
"Mountain Home AFB",
"Mullan",
"Murphy",
"Nampa",
"New Meadows",
"Nezperce",
"Nordman",
"North Fork",
"Orofino",
"Parma",
"Payette",
"Pierce",
"Plummer",
"Pocatello",
"Ponderay",
"Post Falls",
"Preston",
"Priest Lake",
"Priest River",
"Rexburg",
"Rigby",
"Riggins",
"Rupert",
"Sagle",
"Saint Anthony",
"Saint Charles",
"Saint Maries",
"Salmon",
"Sandpoint",
"Shoshone",
"Shoup",
"Soda Springs",
"Stanley",
"Sun Valley",
"Swan Valley",
"Swanlake",
"Troy",
"Twin Falls",
"Victor",
"Wallace",
"Weiser",
"Wendell",
"White Bird",
"Winchester",
"Yellow Pine"];
}

StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/,
                                                          bTypeAhead /*:boolean*/) {
    var aSuggestions = [];
    var sTextboxValue = oAutoSuggestControl.textbox.value;
    
    if (sTextboxValue.length > 0){
    	topsuggestion = null;
        for (var i=0; i < this.states.length; i++) { 
            if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) {
                aSuggestions.push(this.states[i]);
		if (!topsuggestion) {topsuggestion = this.states[i];}
            } 
        }
    }

    oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead);
};

