function execAjax(p_url,p_data,p_successFunc,p_errorFunc,p_notifMode,p_loading, p_cancel_button, p_onAjaxErrorCallBack = false) {
	// Starting the load animation if requested.
 	if(p_loading==null || p_loading==true) {
 		startLoading();
 	}
	// Showing the cancel button during the ajax if requested.
	if(v_cancel_button !== undefined) {
		v_cancel_button.style.display = 'none';

		if(p_cancel_button != null && p_cancel_button == true) {
			v_cancel_button.style.display = 'block';
		}
	}
	// Setting the token.
 	var csrftoken = getCookie(v_csrf_cookie_name);
	// Requesting data with ajax.
 	v_ajax_call = $.ajax({
 		url: v_url_folder + p_url,
 		data: {
 			data: p_data,
 			tab_token: ''
 		},
 		type: "post",
 		dataType: "json",
 		beforeSend: function(xhr, settings) {
 			if(!csrfSafeMethod(settings.type) && !this.crossDomain) {
 				xhr.setRequestHeader("X-CSRFToken", csrftoken);
 			}
 		},
 		success: function(p_return) {
			// Terminating the load animation.
 			if(p_loading==null || p_loading==true) {
 				endLoading();
 			}
			// Intercepting the workflow when the request returns with evaluated server errors.
 			if(p_return.v_error) {
 				if(p_return.v_error_id == 1) {
 					showAlert('User not authenticated, please reload the page.');
 				}
 				else if(p_errorFunc) {
 					p_errorFunc(p_return);
 				}
 				else {
 					showAlert(p_return.v_data);
 				}
 			}
			// Resuming the workflow with the success callback function.
 			else {
 				if(p_successFunc != null) {
 					p_successFunc(p_return);
 				}
 			}
 		},
 		error: function(msg) {
			// Terminating the load animation.
 			if(p_loading == null || p_loading == true) {
 				endLoading();
 			}

			// Calling the optional function assigned as a callback if the ajax request fails.
 			if (p_onAjaxErrorCallBack) {
 				p_onAjaxErrorCallBack(msg);
 			}
			else {
				// Prompting error messages related to ajax error.
	 			if(msg.readyState != 0) {
	 				showAlert('Request error.')
	 			}
	 			else {
	 				if(msg.statusText!='abort') {
	 					reportOffline();
	 				}
	 			}
			}
 		}
 	});

	return v_ajax_call;
 }
## execAjax
@desc Used to execute an AJAX call.

@param {String} p_url - The url of the view to be executed.
@param {Object} p_data - A JavaScript object containing anything you want to pass as parameter to the server. Must be in JSON.stringify format.
@param {String} p_successFunc - A callback to be called if AJAX call succeeds.
@param {String} p_errorFunc - A callback to be called if AJAX call succeeds but returns with errors.
@param {Boolean} p_notifMode - The notification mode of this call.
@param {Boolean} p_loading - If this AJAX call should add a loading gif or not.
@param {Boolean} p_cancel_button - If the cancel button must be displayed or not.
@param {String} p_onAjaxErrorCallBack = false A callback to be called on AJAX error. Ex: connectivity issue.
@return {Function} Contextual callback returns based on status cases and returned data.