function addSubscribe(id)
{
    var email = $("#subscribe_email").val();
    var id;

    var error = '';
    if (!checkEmail(email)) error += 'Enter correct Email!\n';
    if (error) {alert(error);return false;}

    $.ajax({
            type: "POST",
            url: 'index.php',
            data: 'call=component&name=subscribe&' + $("#subscribe_form_" + id).serialize(),
            dataType: "html",
            complete: function(){},
            success: function(response){
                $('#subscribe_block_'+id).html(response);
            }
    });

    return true;
}

function resetSubscribe(id)
{
    $.ajax({
            type: "POST",
            url: 'index.php',
            data: 'call=component&name=subscribe&component_id=' + id,
            dataType: "html",
            complete: function(){},
            success: function(response){
                $('#subscribe_block_'+id).html(response);
            }
    });

    return true;
}

