﻿var ktmine = Class.create({
    initialize: function () {
    }
});

ktmine.getAgreementCount = function (searchTxt) {
    new Ajax.Request('ac.ftsearch', {
        method: 'post',
        parameters: { cmd: 'royaltyCount', searchTerm: escape($F(searchTxt)) },
        onSuccess: function (xhrResponse) {
            $('resultCount').innerHTML = xhrResponse.responseText + ' royalty rates in "' + $F(searchTxt) + '"';
        },
        onFailure: function (xhrResponse) {
            //alert('there was a problem');
            $('resultCount').innerHTML = 'Please try your search again.';
        }

    });

}