function StateSuggestions() {
    this.states = [
"Alamo",
"Amargosa Valley",
"Austin",
"Baker",
"Battle Mountain",
"Beatty",
"Boulder City",
"Caliente",
"Carlin",
"Carson City",
"Crystal Bay",
"Dayton",
"Elko",
"Ely",
"Eureka",
"Fallon",
"Fernley",
"Gardnerville",
"Genoa",
"Hawthorne",
"Henderson",
"Incline Village",
"Indian Springs",
"Jackpot",
"Jarbidge",
"Jean",
"Lamoille",
"Las Vegas",
"Laughlin",
"Lovelock",
"Mc Dermitt",
"Mesquite",
"Mill City",
"Minden",
"Montello",
"Mountain City",
"North Las Vegas",
"Orovada",
"Overton",
"Pahrump",
"Paradise Valley",
"Pioche",
"Primm",
"Reno",
"Schurz",
"Searchlight",
"Sparks",
"Stateline",
"Tonopah",
"Verdi",
"Virginia City",
"Washoe Valley",
"Wellington",
"Wells",
"Wendover",
"West Wendover",
"Winnemucca",
"Yerington",
"Zephyr Cove"];
}

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

