function StateSuggestions() {
    this.states = [
"Albany",
"Andover",
"Arlington",
"Ascutney",
"Bakersfield",
"Barnard",
"Barre",
"Barton",
"Bellows Falls",
"Bennington",
"Berlin",
"Bomoseen",
"Bondville",
"Bradford",
"Brandon",
"Brattleboro",
"Bridgewater",
"Bridgewater Corners",
"Bridport",
"Bristol",
"Brownsville",
"Burlington",
"Cambridge",
"Canaan",
"Castleton",
"Cavendish",
"Charlotte",
"Chester",
"Chittenden",
"Colchester",
"Craftsbury",
"Craftsbury Common",
"Cuttingsville",
"Danby",
"Derby",
"Derby Line",
"Dorset",
"East Burke",
"East Dorset",
"East Dover",
"Enosburg Falls",
"Essex Junction",
"Fair Haven",
"Fairfax",
"Fairlee",
"Fayston",
"Ferrisburg",
"Grand Isle",
"Greensboro",
"Hardwick",
"Hartford",
"Island Pond",
"Jeffersonville",
"Killington",
"Londonderry",
"Ludlow",
"Lyndon",
"Lyndonville",
"Manchester",
"Manchester Center",
"Marlboro",
"Marshfield",
"Middlebury",
"Montgomery",
"Montgomery Center",
"Montpelier",
"Morrisville",
"Mount Snow",
"Newfane",
"Newport",
"North Bennington",
"North Hero",
"North Troy",
"Northfield",
"Orleans",
"Perkinsville",
"Peru",
"Pittsfield",
"Pittsford",
"Plymouth",
"Pownal",
"Proctorsville",
"Putney",
"Quechee",
"Randolph",
"Readsboro",
"Richford",
"Richmond",
"Ripton",
"Roxbury",
"Rutland",
"Saint Albans",
"Saint Johnsbury",
"Shaftsbury",
"Sharon",
"Shelburne",
"Shoreham",
"Smugglers Notch",
"South Burlington",
"South Hero",
"South Londonderry",
"Springfield",
"Stowe",
"Stratton Mountain",
"Swanton",
"Townshend",
"Tunbridge",
"Vergennes",
"Waitsfield",
"Wallingford",
"Warren",
"Waterbury",
"Wells River",
"West Dover",
"West Glover",
"West Newbury",
"West Rutland",
"West Townshend",
"West Wardsboro",
"Westminster",
"Weston",
"White River Junction",
"Williston",
"Wilmington",
"Winooski",
"Woodstock"];
}

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

