var root_folder = "";

function add_fav(id) {
    return setAjaxRequest(root_folder+"/data/modules/js/lot/manage_fav.php", "id=" + id + "&action=add" + "&root_folder=" + root_folder, return_manage_fav, "btn_fav");
}

function remove_fav(id) {    
    return setAjaxRequest(root_folder+"/data/modules/js/lot/manage_fav.php", "id=" + id + "&action=remove" + "&root_folder=" + root_folder, return_manage_fav, "lot_"+id);
}

function send_email(your_name, your_email, receivers_name, email, send_list) {
    document.getElementById('send_status').innerHTML = "Skickar mail...";
    return setAjaxRequest(root_folder+"/data/modules/js/lot/send_email.php", "your_name=" + your_name + "&your_email=" + your_email + "&receivers_name=" + receivers_name + "&email=" + email +"&"+send_list + "root_folder=" + root_folder, return_send_email, "send_status");
}

// Function of back call
function return_manage_fav() {
    var response = this.req.responseText;

    // Выводим в блок div полученную информацию
    document.getElementById(this.element).innerHTML = response;
}

// Function of back call
function return_send_email() {
    var response = this.req.responseText;
    // Выводим в блок div полученную информацию
    document.getElementById(this.element).innerHTML = response;
}
