var API={};API.execute=function(object,method,parameters,asynchronous){if(!parameters){parameters=[];}if(typeof(asynchronous)=="undefined"){asynchronous=false;}var req=new AJAX.Request(Request.get('basepath')+'/api/execute',{json:true,method:'POST',asynchronous:asynchronous,encoding:'utf-8',parameters:['request='+JSON.stringify({object:object,method:method,parameters:parameters})]});if(typeof(req.response)!="undefined"&&req.response.responseJSON){if(req.response.responseJSON.response){return req.response.responseJSON.response;}else{return false;}}else{return false;}};