/**
 * Provides suggestions for state names (USA).
 * @class
 * @scope public
 */
function StateSuggestions() {
    this.states = [
				""
				, "render", "x-pac", "girl", "nashat", "Orton", "Randy", "birthday", "hardy", "Wars", "Star", "obama", "redman", "Ambrósio", "Corine", "Alessandra", "Royce", "team", "Cristiano", "sykes", "barcelona", "logo", "reggaeton", "hudgens", "vanessa", "Nickelback", "Tevez", "speed", "need", "scorpio", "scorpiio", "game", "sjaak", "Keane", "Robbie", "iron", "cable", "r.truth", "Gerrard", "steven", "Angel", "Criss", "Doberman", "ipod", "Rappers", "paris", "sexes", "Tisdale", "Ashley", "stewie", "Paintball"    ];
}

/**
 * Request suggestions for the given autosuggest control. 
 * @scope protected
 * @param oAutoSuggestControl The autosuggest control to provide suggestions for.
 */
StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/) {
    var aSuggestions = [];
    var sTextboxValue = oAutoSuggestControl.textbox.value;
    
    if (sTextboxValue.length > 0){
    
        //search for matching states
        for (var i=0; i < this.states.length; i++) { 
            if (this.states[i].indexOf(sTextboxValue) == 0) {
                aSuggestions.push(this.states[i]);
            } 
        }
    }

    //provide suggestions to the control
    oAutoSuggestControl.autosuggest(aSuggestions);
};