/**
 * Ajax function to communicate with the DPI's
 */
function AjaxAPI( object, method, parameters, callback ) {
  // post call
  var html = $.ajax({
    url: "cms/ajax/ajaxAPI.php?object="+object+"&method="+method,
    async: false,
    type: 'POST',
    data: parameters,
    success: function( data ) {
      if( $.isFunction( callback ) )
        callback( data );
    }
   }).responseText;
  // 
  return html;
}

/**
 * Site manager - ajax function
 */
function siteManager_saveGroups( form ) {
  $.ajax({
    type: "POST",
    url: "cms/ajax/ajaxAPI.php?object=UsergroupAPI&method=attachUsergroupsNavigations",
    data: form.serialize(),
    success: function(data){
      $('#test-div').html(data);
    }
  });
}
