﻿// JScript File
function Features(){}
function getNewest(objectid,count, playerid,friendscontentonly){
       new Ajax.Request("/ajaxservices/features/featuresframe.aspx", {method:'get',parameters:'count=' + count + '&action=getnewest&playerid=' + playerid + '&friendscontentonly=' + friendscontentonly, onSuccess:function(t){
            var obj = document.getElementById(objectid);
            obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}
function getMostPlayed(objectid,count,playerid,friendscontentonly){
       new Ajax.Request("/ajaxservices/features/featuresframe.aspx", {method:'get',parameters:'count=' + count + '&action=getmostplayed&playerid=' + playerid + '&friendscontentonly=' + friendscontentonly, onSuccess:function(t){
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}
function getCatGames(objectid,count,playerid,friendscontentonly,category){
       new Ajax.Request("/ajaxservices/features/featuresframe.aspx", {method:'get',parameters:'count=' + count + '&action=getcatgames&category=' + category + '&playerid=' + playerid + '&friendscontentonly=' + friendscontentonly, onSuccess:function(t){
      
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}


Features.prototype.getnewest = getNewest;
Features.prototype.getmostplayed = getMostPlayed;
Features.prototype.getcatgames = getCatGames;
