function StateSuggestions() {
    this.states = [
"Aberdeen",
"Arlington",
"Avon",
"Belle Fourche",
"Belvidere",
"Beresford",
"Big Stone City",
"Bison",
"Black Hawk",
"Bonesteel",
"Brandon",
"Bridgewater",
"Britton",
"Brookings",
"Buffalo",
"Burke",
"Canistota",
"Canton",
"Chamberlain",
"Clark",
"Clear Lake",
"Columbia",
"Corsica",
"Cresbard",
"Custer",
"De Smet",
"Deadwood",
"Dell Rapids",
"Doland",
"Dupree",
"Eagle Butte",
"Edgemont",
"Elk Point",
"Enning",
"Estelline",
"Eureka",
"Faith",
"Faulkton",
"Flandreau",
"Fort Pierre",
"Fort Thompson",
"Freeman",
"Garretson",
"Gary",
"Gettysburg",
"Glenham",
"Gregory",
"Hamill",
"Hecla",
"Herreid",
"Highmore",
"Hill City",
"Hot Springs",
"Houghton",
"Hoven",
"Howard",
"Huron",
"Interior",
"Ipswich",
"Isabel",
"Kadoka",
"Kennebec",
"Keystone",
"Kimball",
"Lake Andes",
"Lake City",
"Lake Norden",
"Lake Preston",
"Lead",
"Lemmon",
"Lennox",
"Leola",
"Letcher",
"Lower Brule",
"Madison",
"Marion",
"Martin",
"Mc Laughlin",
"Midland",
"Milbank",
"Miller",
"Mission",
"Mitchell",
"Mobridge",
"Mount Vernon",
"Murdo",
"New Underwood",
"Newell",
"North Sioux City",
"Oacoma",
"Onida",
"Philip",
"Pickstown",
"Piedmont",
"Pierre",
"Pine Ridge",
"Plankinton",
"Platte",
"Pollock",
"Presho",
"Rapid City",
"Redfield",
"Salem",
"Selby",
"Silver City",
"Sioux Falls",
"Sisseton",
"Spearfish",
"Springfield",
"Sturgis",
"Tyndall",
"Vermillion",
"Wagner",
"Wakonda",
"Wall",
"Warner",
"Wasta",
"Watauga",
"Watertown",
"Waubay",
"Webster",
"Wentworth",
"Wessington Springs",
"White Lake",
"White River",
"Whitewood",
"Winner",
"Wood",
"Woonsocket",
"Yankton"];
}

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

