function sntVote_Complete(response) {
    if (response == null) {
        return;
    }
    if (response.VotingSettings == null) {
        return;
    }

    if (response.Status == 1) {
        if (response.VotingSettings.VoteSuccessCallback.length > 0) {
            eval(response.VotingSettings.VoteSuccessCallback + '(response);');
        }
    }
    else if (response.Status == 2) {
    if (response.VotingSettings.AnonymousVoteCallback.length > 0) {
        eval(response.VotingSettings.AnonymousVoteCallback + '();');
    }
    }
    else if (response.Status == 3) {
    if (response.VotingSettings.VotedAllreadyCallback.length > 0) {
        eval(response.VotingSettings.VotedAllreadyCallback + '();');
    }
    }    
    else if (response.Status == 4) {
    if (response.VotingSettings.IntervalTooSmallCallback.length > 0) {
        eval(response.VotingSettings.IntervalTooSmallCallback + '();');
        }
    }
    else {
        if (response.VotingSettings.VoteErrorCallback.length > 0) {
        eval(response.VotingSettings.VoteErrorCallback + '();');
        }
    }
}

function sntVote_Error(arg) { }
function sntVote_TimeOut(arg) { }

function sntVote(objectId, votesValueId, value, votingSettings, votingType) {
    SnT.tportalCms.Modules.VotingService.Vote(objectId, votesValueId, value, votingSettings, votingType, sntVote_Complete, sntVote_Error, sntVote_TimeOut);
}
