var Shop = { UpdateTopMenu: function() { var topmenu = $("topmenu"); AjaxInitializeAnimation(topmenu); AjaxStartAnimation(topmenu); var opt = { method: "get", parameters: { ajax: "Shop.UpdateTopMenu" }, onComplete: function(transport) { AjaxStopAnimation(topmenu); }, onSuccess: function(response) { var html = response.responseText; topmenu.innerHTML = html; } } var Request = new Ajax.Request('shop.php', opt); } }