function StateSuggestions() {
    this.states = [
"Abingdon",
"Aldie",
"Alexandria",
"Altavista",
"Amelia Court House",
"Amherst",
"Annandale",
"Appomattox",
"Arlington",
"Arrington",
"Ashburn",
"Ashland",
"Atkins",
"Barboursville",
"Basye",
"Bedford",
"Berryville",
"Big Stone Gap",
"Blacksburg",
"Blackstone",
"Bland",
"Bluefield",
"Bowling Green",
"Bracey",
"Breaks",
"Bristol",
"Bristow",
"Brodnax",
"Brookneal",
"Buchanan",
"Buena Vista",
"Burkeville",
"Callao",
"Cape Charles",
"Carrollton",
"Castlewood",
"Cedar Bluff",
"Centreville",
"Chantilly",
"Charles City",
"Charlottesville",
"Chase City",
"Chesapeake",
"Chester",
"Chesterfield",
"Chilhowie",
"Chincoteague",
"Chincoteague Island",
"Christiansburg",
"Clarksville",
"Clintwood",
"Cloverdale",
"Collinsville",
"Colonial Beach",
"Colonial Heights",
"Courtland",
"Covington",
"Culpeper",
"Dahlgren",
"Daleville",
"Danville",
"Delaplane",
"Deltaville",
"Dillwyn",
"Doswell",
"Drakes Branch",
"Dublin",
"Duffield",
"Dulles",
"Dumfries",
"Dungannon",
"Elkton",
"Emporia",
"Exmore",
"Faber",
"Fairfax",
"Fairlawn",
"Falls Church",
"Fancy Gap",
"Farmville",
"Fincastle",
"Fishersville",
"Floyd",
"Fork Union",
"Fort Chiswell",
"Franklin",
"Fredericksburg",
"Front Royal",
"Gainesville",
"Galax",
"Glade Spring",
"Glen Allen",
"Glen Lyn",
"Gloucester",
"Gloucester Point",
"Goode",
"Gordonsville",
"Gore",
"Great Falls",
"Gretna",
"Grundy",
"Hampton",
"Hanover",
"Hardy",
"Harrisonburg",
"Hartfield",
"Haysi",
"Herndon",
"Hillsville",
"Hopewell",
"Hot Springs",
"Huddleston",
"Hurt",
"Independence",
"Irvington",
"Jonesville",
"Keezletown",
"Kenbridge",
"Keswick",
"King George",
"La Crosse",
"Lebanon",
"Leesburg",
"Lexington",
"Locust Dale",
"Lorton",
"Lovingston",
"Luray",
"Lynchburg",
"Madison Heights",
"Manakin Sabot",
"Manassas",
"Marion",
"Marshall",
"Martinsville",
"Mathews",
"Max Meadows",
"Mc Gaheysville",
"Mc Kenney",
"Mc Lean",
"Meadows Of Dan",
"Mechanicsville",
"Melfa",
"Middleburg",
"Middletown",
"Midlothian",
"Millboro",
"Monterey",
"Montross",
"Mount Jackson",
"Mount Sidney",
"Mouth Of Wilson",
"Nassawadox",
"Natural Bridge",
"New Market",
"Newport News",
"Norfolk",
"Norton",
"Onancock",
"Onley",
"Orange",
"Palmyra",
"Parksley",
"Pearisburg",
"Pembroke",
"Pennington Gap",
"Petersburg",
"Portsmouth",
"Pound",
"Pounding Mill",
"Prince George",
"Pulaski",
"Purcellville",
"Quantico",
"Quinby",
"Quinton",
"Radford",
"Raphine",
"Reedville",
"Reston",
"Rich Creek",
"Richlands",
"Richmond",
"Ridgeway",
"Roanoke",
"Rockville",
"Rocky Mount",
"Rosslyn",
"Round Hill",
"Ruckersville",
"Rural Retreat",
"Rustburg",
"Ruther Glen",
"Saint Paul",
"Salem",
"Saltville",
"Saluda",
"Sandston",
"Scottsville",
"Shawsville",
"Shenandoah",
"Skippers",
"Smithfield",
"South Boston",
"South Hill",
"Sperryville",
"Spotsylvania",
"Springfield",
"Stafford",
"Stanardsville",
"Staunton",
"Stephens City",
"Sterling",
"Stony Creek",
"Strasburg",
"Stuart",
"Suffolk",
"Syria",
"Tangier",
"Tappahannock",
"Tazewell",
"Topping",
"Triangle",
"Troutdale",
"Troutville",
"University Of Richmond",
"Urbanna",
"Verona",
"Vienna",
"Vinton",
"Virginia Beach",
"Wachapreague",
"Warm Springs",
"Warrenton",
"Warsaw",
"Waynesboro",
"West Augusta",
"West Mclean",
"West Point",
"White Stone",
"Williamsburg",
"Willis",
"Winchester",
"Windsor",
"Wintergreen",
"Wirtz",
"Wise",
"Wolftown",
"Woodbridge",
"Woodford",
"Woodstock",
"Wytheville",
"Yorktown"];
}

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

