function StateSuggestions() {
    this.states = [
"Alta",
"Altamont",
"Alton",
"American Fork",
"Annabella",
"Beaver",
"Bicknell",
"Blanding",
"Bluff",
"Boulder",
"Bountiful",
"Brian Head",
"Brigham City",
"Bryce",
"Bryce Canyon",
"Bullfrog",
"Castle Dale",
"Cedar City",
"Circleville",
"Clearfield",
"Coalville",
"Delta",
"Draper",
"Duchesne",
"Duck Creek Village",
"Eden",
"Enterprise",
"Ephraim",
"Escalante",
"Eureka",
"Fairview",
"Fayette",
"Ferron",
"Fielding",
"Fillmore",
"Fruitland",
"Garden City",
"Glendale",
"Green River",
"Gunnison",
"Hanksville",
"Hatch",
"Heber City",
"Helper",
"Hill AFB",
"Huntington",
"Huntsville",
"Hurricane",
"Ivins",
"Junction",
"Kamas",
"Kanab",
"Kaysville",
"Koosharem",
"La Verkin",
"Lake Point",
"Lake Powell",
"Layton",
"Lehi",
"Lindon",
"Loa",
"Logan",
"Magna",
"Manti",
"Marysvale",
"Mexican Hat",
"Midvale",
"Midway",
"Milford",
"Moab",
"Monticello",
"Monument Valley",
"Mount Carmel",
"Mount Pleasant",
"Mountain Home",
"Murray",
"Nephi",
"North Salt Lake",
"Oakley",
"Ogden",
"Orderville",
"Orem",
"Panguitch",
"Park City",
"Parowan",
"Payson",
"Price",
"Providence",
"Provo",
"Richfield",
"Riverside",
"Riverton",
"Rockville",
"Roosevelt",
"Roy",
"Saint George",
"Salem",
"Salina",
"Salt Lake City",
"Sandy",
"Snowbird",
"Snowville",
"South Jordan",
"Spanish Fork",
"Spring City",
"Springdale",
"Springville",
"Tabiona",
"Teasdale",
"Tooele",
"Torrey",
"Tremonton",
"Tropic",
"Vernal",
"Washington",
"Wellington",
"Wellsville",
"Wendover",
"West Jordan",
"West Valley",
"West Valley City",
"Woods Cross"];
}

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

