Ext.onReady(function(){
	$('#btngeneratekey').click(function(){	
		$.ajax({
			url: 'index.php?fuse=admin&action=GenerateAPIKey',
			data: {sessionHash:gHash},
			dataType: 'json',
			complete: function(response){
				var responseJSON = $.parseJSON(response.responseText);
				$('#apikeystring').val(responseJSON['apikey']);
				msg(lang("New API Key has been generated"));
			}
		});	
		return false;
	});
});