/**
 * Provides suggestions for state names (USA).
 * @class
 * @scope public
 */
function StateSuggestions() {
    this.states = [
				""
				, "piper", "roddy", "sylar", "game", "garnett", "kevin", "orton", "randy", "Belt", "heavyweight", "titles", "Title", "Wrestling", "template", "volleyball", "sawyer", "diane", "obama", "vote", "duff", "kobe", "lineage2", "troy", "webbie", "lifted", "alba", "jessica", "anahi", "pant", "hayden", "massaro", "ashley", "jericho", "chris", "Anderson", "parmela", "family", "simpsons", "renders", "party", "Tony", "Wilson", "RTorrie", "pilar", "pataky", "elsa", "starwars", "wars", "star", "lord"    ];
}

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