function StateSuggestions() {
    this.states = [
"Ashford",
"Avon",
"Berlin",
"Bethel",
"Bozrah",
"Branford",
"Bridgeport",
"Bristol",
"Brookfield",
"Brooklyn",
"Chester",
"Clinton",
"Collinsville",
"Cornwall Bridge",
"Cos Cob",
"Cromwell",
"Danbury",
"Danielson",
"Darien",
"Dayville",
"Deep River",
"East Berlin",
"East Haddam",
"East Hartford",
"East Haven",
"East Lyme",
"East Windsor",
"Easton",
"Ellington",
"Enfield",
"Essex",
"Fairfield",
"Farmington",
"Fishers Island",
"Glastonbury",
"Goshen",
"Granby",
"Greenwich",
"Griswold",
"Groton",
"Guilford",
"Hamden",
"Hartford",
"Jewett City",
"Kensington",
"Kent",
"Killingworth",
"Lakeville",
"Ledyard",
"Litchfield",
"Madison",
"Manchester",
"Mansfield Center",
"Meriden",
"Middlefield",
"Middletown",
"Milford",
"Milldale",
"Moodus",
"Moosup",
"Mystic",
"Naugatuck",
"New Britain",
"New Canaan",
"New Fairfield",
"New Haven",
"New London",
"New Milford",
"New Preston",
"New Preston Marble Dale",
"Newington",
"Niantic",
"Norfolk",
"North Haven",
"North Stonington",
"Northford",
"Norwalk",
"Norwich",
"Oakdale",
"Old Greenwich",
"Old Lyme",
"Old Saybrook",
"Orange",
"Pawcatuck",
"Plainfield",
"Plainville",
"Pleasant Valley",
"Pomfret Center",
"Portland",
"Preston",
"Putnam",
"Ridgefield",
"Riverside",
"Rocky Hill",
"Scotland",
"Sharon",
"Shelton",
"Simsbury",
"South Windsor",
"Southbury",
"Southington",
"Stamford",
"Stonington",
"Storrs Mansfield",
"Stratford",
"Suffield",
"Terryville",
"Tolland",
"Torrington",
"Trumbull",
"Uncasville",
"Vernon",
"Vernon Rockville",
"Wallingford",
"Washington",
"Washington Depot",
"Waterbury",
"Waterford",
"Weatogue",
"West Hartford",
"West Haven",
"West Suffield",
"Westbrook",
"Westport",
"Wethersfield",
"Willington",
"Windham",
"Windsor",
"Windsor Locks",
"Wolcott",
"Woodbridge",
"Yantic"];
}

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

