/** * Provides suggestions for state names (USA). * @class * @scope public */ //need to get categories into this: function StateSuggestions() { this.states = [ "ALL CATEGORIES SELECT", "AUTOMOTIVE", "BANKING", "FAST FOOD", "RESTAURANT", "ENTERTAINMENT", "GOVERNMENT", "LODGING", "PROFESSIONAL SERVICES", "SHOP", "STORE", "TEMPORARY EVENT", "OTHER", "Bodyshop", "Car Wash", "Gasoline", "Muffler", "Parts", "Tires", "Transmission (mechanics)", "Truck Stop", "Truck Wash", "Windshield Repair", "Automated teller machine", "Chicken", "Hamburger", "American", "Italian cuisine", "Mexican cuisine", "Asian cuisine", "PIZZA", "Nightclub", "Shooting range", "City Hall", "Police", "Post Office", "Animal Boarding", "Bed and Breakfast", "MOTEL", "Resorts", "Veterinary", "Medical", "Accounting", "Attorney at Law", "Antique", "Gun shop", "Pawn shop", "Bookstores", "Convenience store", "Department store", "Grocery", "Office Supply", "Technology", "Carnival", "Circus", "Concert", "Fair", "Fireworks", "Garage sale", "Rodeo", "Yard sale", "HOTEL", "Amoco", "Cenex", "Chevron Corporation", "Citgo", "Conoco", "Exxon", "Fina", "Phillips 66", "Shell Oil Company", "Texaco", "AutoZone", "NAPA", "O'Riley's", "Church's Chicken", "Kentucky Fried Chicken", "Popeyes", "Burger King", "Dairy Queen", "McDonald's", "Quiznos", "Sonic Drive-In", "Subway (restaurant)", "Taco Bell", "Taco Bueno", "Wendy's", "Bar-B-Que", "Seafood", "Steak", "Chinese cuisine", "Japanese cuisine", "Korean cuisine", "Thai cuisine", "Vietnamese cuisine", "Papa John's", "Pizza Hut", "Pizza Inn", "Best Western", "Comfort Inn", "Holiday Inn", "Barnes and Noble", "Books-a-Million", "Borders Books", "Christian Books", "Hastings", "Waldenbooks", "EZmart", "Dollar General", "Family Dollar", "Fred's", "K-Mart", "Wal-Mart", "Albertsons LLC", "Harps", "Kroger", "Safeway Inc.", "Wal-Mart SuperCenter", "OfficeMax", "Staples Inc.", "Best Buy", "Circuit City", "Country", "Rap", "Rock concert", "Piggly Wiggly", "Christian concert", "Houston's", "Outback Steakhouse", "Ruth's Chris Steak House", "Ryan's", "Western Sizzlin", "Sushi", "Town & Country Food Stores", "Olive Garden", "Midas (automotive_service)", "Landry's Restaurants", "SCHOOLS", "University", "High School", "Elementary School", "Kindergarten", "Junior College", "CarQuest", "Garage", "Rodeway Inn", "Liquor store", "COFFEE", "Movie theater", "General store", "Palliative care", "Cafe", "Ice Cream Parlor", "Market", "Stationery", "INFORMATION SOURCES", "UTILITY", "Bakery", "Plumbing", "Water", "Variety store", "STORAGE", "Bar & Grill", "CITY", "Historic District", "Domino's", "Saloon", "ATTRACTION", "Laundrymat", "Radio station", "Propane", "Bottled Water", "Fishing Rod", "Construction", "INDUSTRIAL", "RECREATION", "HVAC", "RELIGION", "Fiberoptic", "ORGANIZATIONS", "Church", "AGRICULTURAL", "Fireplace", "Pet Grooming", "Technical", "Entry/Exit", "Hair salon", "General contractor", "Chiropractor", "Building Supply", "Bait and Tackle", "Farm", "Apartment", "Sign", "Gift shop", "Park", "State Park", "Visitor center", "Condominium", "Fishing Dock", "Bar (establishment)", "Museum", "Pizza Pro", "Applebee's", "Sales", "Dealership", "Used Car Lot", "Motorcycle", "Barber", "Dry cleaning", "Cajun cuisine", "Drinking Establishment", "Tavern", "Broadcast station", "Television station", "Sandwich", "Mexican fastfood", "Radio Shack", "Recreational", "R.E.I.", "AAMCO", "MAACO", "Family", "Irish cuisine", "French cuisine", "Casual dining", "Fine dining", "Pool hall", "MEETINGS", "Alcoholics Anonymous", "Al-Anon", "Toastmasters", "Lions Clubs International", "Cafe & Bar", "Discount", "Newspaper", "Arvest", "Pentecostal", "Presbyterian", "City Hall", "Music", "Library", "Assembly of God", "Fleamarket", "Real Estate Office", "Baptist", "Dental", "Clock", "Wrecker Service", "Appliance", "Community Center", "Emporium", "Grill", "Garden", "Seed", "Boat Rental", "Boundary", "Country", "State", "County", "City", "Gallery", "Welding", "Prison", "AVIATION", "Airport", "General Aviation", "Landscaping", "Rock", "Hardware", "MARTIAL ARTS", "Judo", "Shoe", "RV Park", "Trout", "Thrift", "Insurance Agency", "Sheriff", "Pharmacy", "Game and Fish", "Methodist", "Treated Wood Products", "Plumbing Supply", "Trading Post", "Marina", "Scuba Center", "Casino", "Marriot", "Eye", "Disciples of Christ", "Dealership", "Ford", "Tractor Dealership", "Furniture", "Country Club", "Bumper to Bumper", "Travel Service", "Buick", "SALES", "Mobile Home", "Fox's Pizza Den", "Tobacco", "Prefab Buildings", "A&W", "Seafood fastfood", "Long John Silvers", "Captain D's", "Locksmith", "Sale by Owner", "Fly Shop", "Upholstery", "Parts Supply", "ATV", "Polaris", "Metalworking Supply", "HEALTH & FITNESS", "Curves International", "Cabinet", "Boat & RV", "Mobile Home Park", "Self Storage", "Moose International", "Construction", "Canvas Products", "Rustic", "Church of Christ", "Monuments", "Nursery (horticulture)", "Sewing", "Vitamins", "Tanning bed", "Day Spa", "Lutheran", "Office Equipment", "Unitarian Universalist", "Full Service", "Western", "Starbucks Coffee", "Wood Carving", "Drilling & Pump", "Diamond Shamrock", "City Police Department", "Natural Gas", "Newspaper", "Mail Drop", "Salvation Army", "Electric Contractor", "Used Appliance Center", "Surgery", "Urology", "Certified Public Accountant", "Sandwich", "Eye Glasses", "Acupuncture", "Car audio", "Farm Supply", "Siding and Gutters", "Arborist", "Tree Removal", "Miscellaneous", "Boat and Motor", "Allstate", "Shelter Insurance", "Hearing", "Appraisals", "State Farm Insurance", "Podiatry", "Family Practice", "Consignment", "Print Shop", "Eckankar", "Specialty", "Awards - Trophies", "Masonic Lodge", "Lawn and Garden", "Walgreens", "Cell Phone", "Hardee's", "ReMax", "Exit", "Golf", "Driving Range", "Tattoo", "Trout Fishing", "Flooring", "Vacuum Cleaners", "Pathology", "Travel Agency", "Boutique", "Jewelry", "Health Care", "In Home Care", "Alltel", "AT&T", "Clothing", "Counseling", "FOOD SERVICES", "pre-made meals", "Dept of Workforce Services", "Maternity", "Hobby", "Scrapbook", "FINANCIAL", "Osteopathic", "Dollar Store", "Armed Forces", "Recruiting", "Sporting Goods", "Swimming pool", "True Value", "Oil Change & Lube", "Plumbing Supply", "Used Clothing", "Land Surveying", "Civil Engineering", "Fireworks", "Murphy USA", "Chili's", "Arby's", "Home Depot", "Lowe's", "Repair", "Lawnmower", "Steel Supply", "El Chico", "with Gasoline", "Park", "City Park", "Cabins & RV", "Senior Center", "Cabins", "Hunting & Fishing", "Apostolic Church", "Federal", "Work Center", "Access", "Creek", "Novelty", "Horses", "RV", "Florist", "Catholic", "Ace", "Pest Control", "Home health care", "Safeco", "Social services", "Child and Family Services", "Computer Store", "Health", "Beauty Salon", "United Church of Christ", "Historic Monument", "Commodities", "Farmers Insurance Group", "Auto Detailing", "Big 5 Sporting Goods", "Youth", "Boys Ranch", "Fairfield Inn", "Horses", "MOTORCYCLE", "Harley-Davidson", "Homewood Suites", "Joe's Crab Shack", "Steakhouse", "Papa Murphy's", "Rental Store", "Movie Gallery", "Furniture Row", "Oak Express", "Beef", "Red Robin", "Diner", "Meat Processing", "Slaughterhouse", "Miscellaneous", "Tools-Knives-Ceramics", "Sinclair Oil", "Dive center", "PADI", "Lounge", "Mini", "Bullseye Gasoline", "Helipad", "Restaurant & Lounge", "Heavy Equipment", "Logging", "Construction", "Roller rink", "Tune up", "Huddle House", "CORPORATE HEADQUARTERS", "Air ambulance", "Helicopter", "Associated Wholesale Grocers", "Country Mart", "GMAC Real Estate", "U.S. Cellular", "RV", "Fire Department", "Home & Garden", "Appliances", "Rental", "Kumho Tires", "Manufacturing", "Stainless steel", "Tanks", "Concrete", "Ready-mix concrete", "Sawmill", "Chainsaw", "Lawnmower", "Western Union", "Swimming Pool", "Discount", "RENTALS", "U-Haul", "Boat Docks", "Boat Lifts", "Live Music", "Dancing", "Art Gallery", "Outlet store", "Electric Supply", "Keathley-Patterson Electric Company", "Outlet store", "Electric utility", "Wholesale", "Plumbing-Electric-Heating-Air", "Home Furnishings", "Carpet", "Archery", "Retirement home", "Assisted Living Facility", "Equipment", "Waste collection", "Burgerville", "Union 76", "COFFEE", "Dutch Bros. Coffee", "Taxes", "H&R", "Logging", "Produce", "Casino", "Vacation Rentals", "MANUFACTURING", "Brewery", "Pub", "Sears", "Embassy Suites", "Toy", "ToysRus", "Pet", "PetSmart", "Household", "Bedding", "Paint", "Sports Authority", "Linens 'n Things", "Breakfast", "Waffle House", "Verizon Wireless", "Car rental", "Ethan Allen (furniture company)", "LAUNDRY", "Cleaners", "Valero", "Mimi's Cafe", "IHOP (restaurant)", "ASSOCIATION", "Trade associations", "Cattlemen", "Bridal", "Dance & Music Lessons", "Screen Printing", "Steak", "Flying Fish", "Country", "Bar & Casino", "THERAPEUTIC", "Massage", "Oriental", "Optometrist", "Sports Bar", "Historic Place", "Rental Store", "Rent-A-Center", "Tourist Information", "celebrity", "Dick Clark", "American Bandstand", "TRANSPORTATION", "Train Station", "Bus Station", "Airport", "Bus Stop", "Ice hockey arena", "Post Museum", "Czech cuisine", "Multi-Market Restaurants", "Ride_the_Ducks", "Doughnuts", "Krispy_Kreme", "War Memorial", "Arts_and_crafts", "Veterans Administration", "VA Medical Clinic", "Orthopedic", "Pediatric", "HOSPITAL", "Medical Equipment", "Oxygen", "Funeral Home", "Internal medicine", "Obstetrics and Gynaecology", "Medicap", "Women", "Contemporary Art", "Love's", "Dodge", "KOHL'S", "Whole Foods", "Old Chicago", "Logan's Roadhouse", "J. C. Penney", "Old Chicago Pasta&Pizza", "Bass Pro", "Catholic Books", "Dollar Tree", "Maurices", "National Guard", "Hobby", "Quilt", "Meeks", "Spa", "Stained Glass", "Software", "DESSERT", "Andy's Frozen Custard", "ATM", "Pet Shop", "Supplements", "Cleaning Supply", "Nail Salon", "U.S._Bank", "Dillons", "Exotic and Luxury Cars", "Credit Union", "Financial Consultants", "Shoe Repair", "Insurance", "Pizza Plus", "San Francisco Oven", "GIFT SHOP", "Roofing Contractor", "Book_n_Gift", "CITY GUIDES", "Glass", "Bowling", "Music Store", "Super 8 Motel", "Bonanza Steakhouse", "Health Foods", "Land", "Property abstract", "STUDIO", "Photography", "Family Center", "gift shop", "Horseback Riding", "Float Trips", "Oyster Bar", "Canoes", "Morningside Coffee", "Morningside Coffee", "Bakery", "Fashion Superstore", "Accessory City", "CompUSA", "Athletic Club", "Red Lobster", "Jackson Hewitt Tax Service", "Lasik", "Public Transportation", "Bus Stop", "CAT Little Rock", "Childrens Hospital", "skyline", "Lennys Sub Shop", "Edible Arrangements", "Chicken", "Wings", "Gusanos", "Brewery", "Flying Saucer", "Presidential Library", "Tavern", "Chick-fil-a", "Textbook Brokers", "Team Memorabilia", "Razorbacks", "Baskin Robbins", "Office Services", "FedEx Kinko's", "The Butcher Shop Steakhouse", "State Capitol", "Mexican Supermarket", "Bistro", "college-preparatory", "First Security", "TEMPORARY STAFFING AGENCY", "Kelly Services", "Device Support Center", "On The Border", "Art Supply Store", "State Board of Registration", "Professional Engineers", "Land Surveyors", "Medical Rentals", "Regions", "Tire and Brake", "AT&T", "Convention Center", "Metropolitan National Bank", "Episcopal", "Service Center", "CAT Bus Station", "Grill", "MARKET", "CAT Trolly Stop", "Charitable", "Heifer International", "CHAMBER OF COMMERCE", "Regional", "Check Cashing", "Latino", "Parking-Free", "Cruise", "River Boat", "Irish Pub", "Los Cucos", "Health Food", "Burger Joint", "TJ's Burgers", "Rudys Country Store", "Rudys Bar-B-Q", "Colton's Steakhouse", "Bicycle Store", "Legacy", "Music Bar", "RestArea", "Rest Area", "Welcome Center", "Berry Town Produce", "Rotolos", "Violin Shop", "La Carreta", "Sports Bar", "PJs Coffee", "Import Repairs", "Seafood Market", "Frozen Custard", "DAIQUIRIS", "Spanish Cuisine", "Med Staffing", "Baby Clothes", "Window Tinting", "Loans Payday", "BUSINESS SUPPLY", "Janitorial Supplies", "Cafeteria", "Piccadilly", "Metal Works ~ Wrought Iron Fence", "Big Lots", "Save a Lot", "Cane's", "VooDoo BBQ", "Icecream", "Baskin Robbins", "Sheraton", "WORLD TRADE CENTER", "Mini-Mart", "Voodoo", "Community", "Seafood and Steak", "Cajun and Creole Cuisine", "Cajun and Creole Cuisine", "Shopping District", "Creole Cuisine", "SHOPPING MALL", "Cajun and Creole Cuisine", "Famous Coffee", "Cafe Du Monde", "Pedestrian Mall", "Carriage Tours", "Souvenirs", "Visitors Center", "Pralines", "Whitney National Bank", "Museum Shop", "Tommy's", "Gourmet", "Creole and Cajun", "Tabasco Country Store", "PRODUCTION", "Theatre", "BookShop", "Used Books", "Manchu", "Brown Derby", "Port", "Bulk Cargo", "HiHo", "Café Au Lait", "Black Angus", "Lone Star Steakhouse", "International Airport", "END" ]; } /** * Request suggestions for the given autosuggest control. * @scope protected * @param oAutoSuggestControl The autosuggest control to provide suggestions for. */ StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, bTypeAhead /*:boolean*/) { var aSuggestions = []; var sTextboxValue = oAutoSuggestControl.textbox.value; if (sTextboxValue.length > 0){ //convert value in textbox to lowercase var sTextboxValueLC = sTextboxValue.toLowerCase(); //search for matching states for (var i=0; i < this.states.length; i++) { //convert state name to lowercase var sStateLC = this.states[i].toLowerCase(); //compare the lowercase versions for case-insensitive comparison if (sStateLC.indexOf(sTextboxValueLC) == 0) { //add a suggestion using what's already in the textbox to begin it aSuggestions.push(sTextboxValue + this.states[i].substring(sTextboxValue.length)); } } } //provide suggestions to the control oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); };