function StateSuggestions() {
    this.states = [
"Absarokee",
"Alberton",
"Alder",
"Anaconda",
"Ashland",
"Augusta",
"Babb",
"Baker",
"Belgrade",
"Big Sandy",
"Big Sky",
"Big Timber",
"Bigfork",
"Billings",
"Boulder",
"Bozeman",
"Bridger",
"Broadus",
"Browning",
"Butte",
"Cameron",
"Cascade",
"Charlo",
"Chester",
"Chinook",
"Choteau",
"Circle",
"Clinton",
"Colstrip",
"Columbia Falls",
"Columbus",
"Condon",
"Conner",
"Conrad",
"Cooke City",
"Coram",
"Corvallis",
"Culbertson",
"Cut Bank",
"Darby",
"Deer Lodge",
"Dell",
"Denton",
"Dillon",
"Drummond",
"East Glacier Park",
"Ekalaka",
"Elliston",
"Emigrant",
"Ennis",
"Essex",
"Eureka",
"Fairfield",
"Fairview",
"Fishtail",
"Forsyth",
"Fort Benton",
"Fort Peck",
"Fortine",
"Gallatin Gateway",
"Gardiner",
"Glasgow",
"Glendive",
"Great Falls",
"Greenough",
"Hamilton",
"Hardin",
"Harlowton",
"Haugan",
"Havre",
"Helena",
"Heron",
"Hot Springs",
"Hungry Horse",
"Hysham",
"Jackson",
"Joliet",
"Jordan",
"Kalispell",
"Lakeside",
"Laurel",
"Lewistown",
"Libby",
"Lima",
"Lincoln",
"Livingston",
"Lolo",
"Malmstrom AFB",
"Malta",
"Martinsdale",
"Melrose",
"Miles City",
"Missoula",
"Montana City",
"Mosby",
"Neihart",
"Noxon",
"Nye",
"Ovando",
"Park City",
"Philipsburg",
"Plains",
"Plentywood",
"Polaris",
"Polson",
"Poplar",
"Pray",
"Red Lodge",
"Reed Point",
"Ronan",
"Roundup",
"Saco",
"Saint Ignatius",
"Saint Regis",
"Saint Xavier",
"Saltese",
"Scobey",
"Seeley Lake",
"Shelby",
"Sheridan",
"Sidney",
"Silver Gate",
"Stanford",
"Stevensville",
"Sula",
"Sunburst",
"Superior",
"Sweet Grass",
"Terry",
"Thompson Falls",
"Three Forks",
"Townsend",
"Trout Creek",
"Troy",
"Twin Bridges",
"Valier",
"Virginia City",
"West Glacier",
"West Yellowstone",
"White Sulphur Springs",
"Whitefish",
"Whitehall",
"Wibaux",
"Winifred",
"Winnett",
"Wisdom",
"Wolf Creek",
"Wolf Point",
"Yellowtail",
"Zortman"];
}

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);
};

