Ext.namespace('beheer.ajax');

beheer.ajax = function(){

	this.jsonRPC = function(fConfig){

		var baseConfig = {
			url: 'index.php',
			failure: function(){
				alert("IFail");
		   }
		};

		//apply config to baseconfig
		Ext.Apply(baseConfig, fConfig);
		
		Ext.Ajax.request(baseConfig);
	}

/*{
		   url: 'classes/ajax.php',
		   success: function(conn, result, options){
				alert(result.name);
		   },
		   failure: function(){
				alert("IFail");
		   },
		   headers: {
			   'my-header': 'foo'
		   },
		   params: { foo: 'bar' }
		}*/
	
};
