﻿// JScript File
function Scores(){}

function GetScores(objectid, amount,language){
    new Ajax.Request("/ajaxservices/playerscores/playerscores.aspx", {method:'get',parameters:'action=gamescores&language=' + language + '&amount=' + amount + '', onSuccess:function(t){        
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}

function GetScoresModule(objectid, amount,language){
    new Ajax.Request("/ajaxservices/playerscores/playerscores.aspx", {method:'get',parameters:'usemodule=true&action=gamescores&language=' + language + '&amount=' + amount + '', onSuccess:function(t){        
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}

function GetScoresByGame(objectid, amount, gameid,language){
    new Ajax.Request("/ajaxservices/playerscores/playerscores.aspx", {method:'get',parameters:'action=gamescoresbygame&language=' + language + '&gameid=' + gameid + '&amount=' + amount + '', onSuccess:function(t){
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}

function GetScoresModuleByGame(objectid, amount, gameid,language){
    new Ajax.Request("/ajaxservices/playerscores/playerscores.aspx", {method:'get',parameters:'usemodule=true&action=gamescoresbygame&language=' + language + '&gameid=' + gameid + '&amount=' + amount + '', onSuccess:function(t){
        var obj = document.getElementById(objectid);
        obj.innerHTML =  t.responseText;         
        }, onFailure:function(t){
        alert(t.responseText);
    }});
}
Scores.prototype.getscoresmodule = GetScoresModule;
Scores.prototype.getscoresmodulebygame = GetScoresModuleByGame;
Scores.prototype.getscores = GetScores;
Scores.prototype.getscoresbygame = GetScoresByGame;

