function StateSuggestions() {
    this.states = [
"Agness",
"Albany",
"Antelope",
"Arlington",
"Ashland",
"Astoria",
"Baker City",
"Bandon",
"Beatty",
"Beaverton",
"Bend",
"Blue River",
"Boardman",
"Brightwood",
"Brookings",
"Burns",
"Camp Sherman",
"Canby",
"Cannon Beach",
"Canyonville",
"Cascade Locks",
"Cave Junction",
"Central Point",
"Chemult",
"Chiloquin",
"Christmas Valley",
"Clackamas",
"Clatskanie",
"Cloverdale",
"Condon",
"Coos Bay",
"Coquille",
"Corvallis",
"Cottage Grove",
"Crescent",
"Crescent Lake",
"Creswell",
"Curtin",
"Dallas",
"Dayville",
"Depoe Bay",
"Detroit",
"Diamond",
"Dufur",
"Elgin",
"Enterprise",
"Estacada",
"Eugene",
"Fields",
"Florence",
"Forest Grove",
"Fort Klamath",
"Fossil",
"Frenchglen",
"Garibaldi",
"Gearhart",
"Gilchrist",
"Gladstone",
"Glendale",
"Gleneden Beach",
"Glide",
"Gold Beach",
"Gold Hill",
"Government Camp",
"Grand Ronde",
"Grants Pass",
"Gresham",
"Halfway",
"Halsey",
"Hammond",
"Heppner",
"Hermiston",
"Hillsboro",
"Hines",
"Hood River",
"Huntington",
"Idleyld Park",
"Imnaha",
"Independence",
"Irrigon",
"Jacksonville",
"John Day",
"Jordan Valley",
"Joseph",
"Junction City",
"Juntura",
"Keizer",
"Klamath Falls",
"La Grande",
"La Pine",
"Lake Oswego",
"Lakeside",
"Lakeview",
"Lebanon",
"Lincoln City",
"Long Creek",
"Madras",
"Manzanita",
"Maupin",
"Mc Kenzie Bridge",
"Mcminnville",
"Medford",
"Merlin",
"Merrill",
"Mill City",
"Milton Freewater",
"Mitchell",
"Molalla",
"Monmouth",
"Monument",
"Moro",
"Mount Hood Parkdale",
"Mount Vernon",
"Myrtle Creek",
"Myrtle Point",
"Nehalem",
"Neskowin",
"Netarts",
"Newberg",
"Newport",
"North Bend",
"North Powder",
"O Brien",
"Oakland",
"Oakridge",
"Oceanside",
"Ontario",
"Oregon City",
"Otter Rock",
"Oxbow",
"Pacific City",
"Paisley",
"Pendleton",
"Philomath",
"Phoenix",
"Port Orford",
"Portland",
"Powell Butte",
"Prineville",
"Prospect",
"Rainier",
"Redmond",
"Reedsport",
"Rhododendron",
"Richland",
"Riley",
"Rockaway Beach",
"Roseburg",
"Rufus",
"Saint Helens",
"Salem",
"Sandy",
"Scappoose",
"Seaside",
"Seneca",
"Shady Cove",
"Shaniko",
"Sheridan",
"Silver Lake",
"Sisters",
"Spray",
"Springfield",
"Stayton",
"Sublimity",
"Summer Lake",
"Sumpter",
"Sunriver",
"Sutherlin",
"Sweet Home",
"Talent",
"Terrebonne",
"The Dalles",
"Tigard",
"Tillamook",
"Timber",
"Timberline Lodge",
"Toledo",
"Tolovana Park",
"Troutdale",
"Tualatin",
"Ukiah",
"Umatilla",
"Union",
"Unity",
"Vale",
"Vernonia",
"Vida",
"Waldport",
"Wallowa",
"Warrenton",
"Wasco",
"Welches",
"Weston",
"Wheeler",
"White City",
"Wilsonville",
"Winston",
"Wolf Creek",
"Wood Village",
"Woodburn",
"Yachats",
"Yoncalla"];
}

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

