﻿$$$ = function() { };
$$$.ActiveRequest = new Array();

$$$.NewSystemRequest = function(ServiceUrl, ServiceParams, onSucessFnc, extraParam) {
    $$$.ActiveRequest.push(
        $.ajax({
            //type: "POST",
            url: ServiceUrl,
            data: ServiceParams,
            dataType: "xml",
            error: function(errorRequest) {
                throw (errorRequest)
                
            },
            success: function(loadedContent) {
                if (onSucessFnc != null && onSucessFnc != undefined)
                    onSucessFnc(loadedContent, extraParam);
            }
        })
    );
}

$$$.SerializeForm = function(formId) {
    var params = $('#' + formId).fastSerialize();
    var fragment = $.param(params);
    return fragment;
}
