function StateSuggestions() {
    this.states = [
"Aberdeen",
"Advance",
"Ahoskie",
"Albemarle",
"Almond",
"Andrews",
"Apex",
"Archdale",
"Arden",
"Asheboro",
"Asheville",
"Atlantic",
"Atlantic Beach",
"Avon",
"Bald Head Island",
"Balsam",
"Banner Elk",
"Barnardsville",
"Bath",
"Battleboro",
"Bayboro",
"Beaufort",
"Beech Mountain",
"Belhaven",
"Belmont",
"Benson",
"Bessemer City",
"Biscoe",
"Black Mountain",
"Blowing Rock",
"Boiling Springs",
"Boone",
"Brevard",
"Bridgeton",
"Bryson City",
"Burgaw",
"Burlington",
"Burnsville",
"Buxton",
"Calabash",
"Candler",
"Canton",
"Cape Carteret",
"Carolina Beach",
"Carrboro",
"Carthage",
"Cary",
"Cashiers",
"Cedar Island",
"Cedar Point",
"Chadbourn",
"Chapel Hill",
"Charlotte",
"Cherokee",
"Chimney Rock",
"Chocowinity",
"Claremont",
"Clayton",
"Clemmons",
"Clinton",
"Coinjock",
"Columbia",
"Columbus",
"Concord",
"Conetoe",
"Connellys Springs",
"Conover",
"Cornelius",
"Corolla",
"Creedmoor",
"Cullowhee",
"Danbury",
"Denver",
"Dillsboro",
"Dobson",
"Duck",
"Dunn",
"Durham",
"East Bend",
"Eden",
"Edenton",
"Elizabeth City",
"Elizabethtown",
"Elkin",
"Ellerbe",
"Elm City",
"Elon",
"Emerald Isle",
"Engelhard",
"Enka",
"Fair Bluff",
"Fairfield",
"Fairview",
"Farmville",
"Fayetteville",
"Flat Rock",
"Fletcher",
"Fontana Dam",
"Forest City",
"Fort Bragg",
"Four Oaks",
"Franklin",
"Fuquay Varina",
"Garner",
"Gastonia",
"Gerton",
"Glade Valley",
"Goldsboro",
"Graham",
"Greensboro",
"Greenville",
"Halifax",
"Hampstead",
"Hamptonville",
"Harkers Island",
"Hatteras",
"Havelock",
"Haw River",
"Hayesville",
"Henderson",
"Hendersonville",
"Hertford",
"Hickory",
"High Point",
"Highlands",
"Hildebran",
"Hillsborough",
"Holly Ridge",
"Hope Mills",
"Hot Springs",
"Huntersville",
"Indian Trail",
"Jacksonville",
"Jarvisburg",
"Jefferson",
"Jonesville",
"Kannapolis",
"Kenly",
"Kernersville",
"Kill Devil Hills",
"King",
"Kings Mountain",
"Kinston",
"Kitty Hawk",
"Knightdale",
"Kure Beach",
"Lake Junaluska",
"Lake Lure",
"Laurel Springs",
"Laurinburg",
"Lenoir",
"Lexington",
"Lillington",
"Lincolnton",
"Linwood",
"Little Switzerland",
"Littleton",
"Louisburg",
"Lumberton",
"Madison",
"Maggie Valley",
"Mamers",
"Manns Harbor",
"Manteo",
"Marble",
"Marion",
"Mars Hill",
"Matthews",
"Maxton",
"Mc Leansville",
"Mebane",
"Merry Hill",
"Mill Spring",
"Mocksville",
"Monroe",
"Mooresville",
"Morehead City",
"Morganton",
"Morrisville",
"Mount Airy",
"Mount Olive",
"Mount Pleasant",
"Murphy",
"Nags Head",
"New Bern",
"New London",
"Newell",
"Newland",
"Newport",
"Newton Grove",
"North Wilkesboro",
"Oak Island",
"Ocean Isle Beach",
"Ocracoke",
"Oriental",
"Oxford",
"Parkton",
"Pilot Mountain",
"Pine Knoll Shores",
"Pinebluff",
"Pinehurst",
"Pineville",
"Pink Hill",
"Pisgah Forest",
"Pittsboro",
"Plymouth",
"Pollocksville",
"Poplar Branch",
"Raeford",
"Raleigh",
"Randleman",
"Red Springs",
"Reidsville",
"Richlands",
"Roanoke Rapids",
"Robbinsville",
"Rockingham",
"Rockwell",
"Rocky Mount",
"Rodanthe",
"Rose Hill",
"Roseboro",
"Rowland",
"Roxboro",
"Rutherfordton",
"Saint Pauls",
"Salisbury",
"Saluda",
"Salvo",
"Sanford",
"Sapphire",
"Scaly Mountain",
"Scotland Neck",
"Seagrove",
"Sealevel",
"Selma",
"Shallotte",
"Sharpsburg",
"Shelby",
"Sherrills Ford",
"Siler City",
"Smithfield",
"Sneads Ferry",
"Southern Pines",
"Southport",
"Sparta",
"Spindale",
"Spring Lake",
"Spruce Pine",
"Statesville",
"Stedman",
"Sugar Grove",
"Sunset Beach",
"Supply",
"Surf City",
"Swanquarter",
"Swansboro",
"Sylva",
"Tabor City",
"Tarboro",
"Taylorsville",
"Thomasville",
"Topsail Beach",
"Troy",
"Tryon",
"Union Grove",
"Wade",
"Wadesboro",
"Wake Forest",
"Wallace",
"Warrenton",
"Warsaw",
"Washington",
"Waves",
"Waynesville",
"Weaverville",
"Weldon",
"West Jefferson",
"Whitakers",
"Whiteville",
"Whitsett",
"Whittier",
"Wilkesboro",
"Williamston",
"Wilmington",
"Wilson",
"Windsor",
"Winston Salem",
"Winterville",
"Wrightsville Beach",
"Yadkinville",
"Yanceyville"];
}

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

