Помогите пожалуйста переписать данный код на JQuery, если это возможно.
function ban_users( user_id, status, act ) {
var ajax = new dle_ajax();
ajax.onShow ('');
var varsString = "";
ajax.setVar("user_id", user_id);
ajax.setVar("status", status);
ajax.setVar("action", act);
ajax.setVar("skin", dle_skin);
if (act == '1') {
var form = document.getElementById('banform');
if (status != 1) {
ajax.setVar("banned_descr", ajax.encodeVAR(form.banned_descr.value));
ajax.setVar("banned_date", ajax.encodeVAR(form.banned_date.value));
ajax.setVar("banned", ajax.encodeVAR(form.banned.value));
if ( document.getElementById('del_com').checked) ajax.setVar("del_com", "1");
else ajax.setVar("del_com", "0");
}
ajax.setVar("name_banned_user", ajax.encodeVAR(form.name_banned_user.value));
}
if (act == '2') {
var form = document.getElementById('banform_del');
var agree=confirm( dle_del_agree );
if (agree) {
ajax.setVar("banned_del", ajax.encodeVAR(form.banned_del.value));
ajax.setVar("name_banned_user", ajax.encodeVAR(form.name_banned_user.value));
}
}
ajax.requestFile = dle_root + "engine/ajax/banusers.php";
ajax.method = 'POST';
ajax.element = 'banid-' + user_id;
ajax.sendAJAX(varsString);
return false;
};