function StateSuggestions() {
    this.states = [
"Abbeville",
"Alabaster",
"Albertville",
"Alexander City",
"Aliceville",
"Andalusia",
"Anniston",
"Arab",
"Ardmore",
"Ashland",
"Ashville",
"Athens",
"Atmore",
"Attalla",
"Auburn",
"Auburn University",
"Bay Minette",
"Bayou La Batre",
"Bessemer",
"Birmingham",
"Boaz",
"Brent",
"Brewton",
"Bridgeport",
"Brighton",
"Butler",
"Calera",
"Camden",
"Carbon Hill",
"Castleberry",
"Cedar Bluff",
"Centre",
"Chatom",
"Cherokee",
"Chickasaw",
"Childersburg",
"Citronelle",
"Clanton",
"Collinsville",
"Cordova",
"Cottondale",
"Creola",
"Cropwell",
"Cullman",
"Dadeville",
"Daleville",
"Daphne",
"Dauphin Island",
"De Armanville",
"Decatur",
"Demopolis",
"Dothan",
"Double Springs",
"Elba",
"Elkmont",
"Enterprise",
"Eufaula",
"Eutaw",
"Evergreen",
"Fairfield",
"Fairhope",
"Falkville",
"Fayette",
"Fitzpatrick",
"Florala",
"Florence",
"Foley",
"Fort Payne",
"Fultondale",
"Gadsden",
"Gardendale",
"Gaylesville",
"Geneva",
"Geraldine",
"Gilbertown",
"Gordo",
"Greensboro",
"Greenville",
"Grove Hill",
"Guin",
"Gulf Shores",
"Guntersville",
"Haleyville",
"Hamilton",
"Hanceville",
"Harpersville",
"Hartselle",
"Hazel Green",
"Heflin",
"Hollywood",
"Homewood",
"Hoover",
"Hope Hull",
"Huntsville",
"Irondale",
"Jackson",
"Jacksonville",
"Jasper",
"JEMISON",
"Killen",
"Lafayette",
"Lanett",
"Leeds",
"Leesburg",
"Lincoln",
"Linden",
"Livingston",
"Loxley",
"Luverne",
"Lynn",
"Madison",
"Marion",
"Mentone",
"Millbrook",
"Mobile",
"Monroeville",
"Montgomery",
"Moody",
"Moulton",
"Muscle Shoals",
"New Brockton",
"Northport",
"Oneonta",
"Opelika",
"Opp",
"Orange Beach",
"Oxford",
"Ozark",
"Pelham",
"Pell City",
"Phenix City",
"Piedmont",
"Pike Road",
"Pleasant Grove",
"Point Clear",
"Prattville",
"Rainsville",
"Red Bay",
"Riverside",
"Roanoke",
"Rogersville",
"Russellville",
"Saraland",
"Scottsboro",
"Selma",
"Sheffield",
"Shorter",
"Smiths",
"Stevenson",
"Sulligent",
"Sylacauga",
"Talladega",
"Tallassee",
"Theodore",
"Thomasville",
"Troy",
"Trussville",
"Tuscaloosa",
"Tuscumbia",
"Tuskegee",
"Union Springs",
"Valley",
"Vance",
"Vernon",
"Vestavia Hills",
"Wagarville",
"Wedowee",
"Wetumpka",
"Winfield",
"York"];
}

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

