function ajaxRequest (action , parameter , form) {
    if (form != '') {
        var getFormData = $("#"+form).serialize();
    }

    $.ajax({
        type: "POST",
        url: "ajax_request_handler.php?req_function=" + action + "&parameter=" + parameter ,
        data: getFormData,
        dataType: "json",
        success: function(msg){ 
            ajaxResponseHandler( msg , action );
        }
    });
}

function ajaxResponseHandler( msg , action ) {
    if ( action == 'getSupportText') {
        if (msg.showSupportText == 'true') {
            $('#supportTextBack').html(msg.supportText);
            $('#supportTextBack').show();
        } else {
            $('#supportTextBack').hide();
        }
    }
    
    if (msg.showGetOrder == 'true') {
        $('#supportProductsSelectBack').html(msg.getOrder);
        $('#supportProductsSelectBlock').show();
        
    } else {
        $('#supportProductsSelectBlock').hide();
    }
    
    if (msg.showGetProduct == 'true') {
        $('#supportProductsBack').html(msg.getProduct);
        $('#supportProductsBlock').show();
    } else {
        $('#supportProductsBlock').hide();
    }
}

