/* add to favourites button */
function doAjaxPost(item, user, galleryid) {  
  $.ajax({  
   type: "POST",  
   url: "/index.php/_process/favs-gallery-add/",  
   data: "itemid=" + item + "&userid=" + user + "&galleryid=" + galleryid,  
   success: function(resp){  
     // we have the response  
     alert("Server said:\n '" + resp + "'");  
  },  
   error: function(e){  
     alert('Error: ' + e);  
   }  
 });  
}  
/* Remove from favourites button */
function doAjaxDelete(item, user, galleryid) {  
  $.ajax({  
   type: "POST",  
   url: "http://www.prom-magazine.com/prom_test/index.php/_process/favs_gallery_delete/",  
   data: "itemid=" + item + "&userid=" + user + "&galleryid=" + galleryid,  
   success: function(resp){  
     // we have the response  
     alert("Server said:\n '" + resp + "'");  
  },  
   error: function(e){  
     alert('Error: ' + e);  
   }  
 });  
}  
/*rating function */
function doAjaxRate(user, item, rate) {  
  $.ajax({  
   type: "POST",  
   url: "http://www.prom-magazine.com/index.php/_process/rating_add/",  
   data: "userid=" + user + "&entryid=" + item + "&rating=" + rate,  
   success: function(resp){  
     // we have the response  
     //alert("Server said:\n '" + resp + "'");  
  },  
   error: function(e){  
     //alert('Error: ' + e);  
   }  
 });  
}  

