	$.extend(true, $.Footytips, {
		Graphs: {
			graphObj: '',
			
			createGraph: function(divId, formatting, width, height, bgcolor) {
			if (!$('#' + divId).length)
				$('body').append('<div id="' + divId + '"></div>');
			
			if (typeof(width) == 'undefined')
				width = '100%';
			
			if (typeof(height) == 'undefined')
				height = '100%';
				
			if (typeof(bgcolor) == 'undefined')
				bgcolor = '#FFFFFF';
			
			$.Footytips.Graphs.graphObj = new SWFObject("/swf/open-flash-chart.swf?r=" + new Date().getTime(), divId + "_ofc", width, height, "9.0.0", bgcolor);
			$.Footytips.Graphs.graphObj.addVariable("variables","true");
			$.Footytips.Graphs.graphObj.addVariable("set_data", formatting);
			$.Footytips.Graphs.graphObj.addParam("allowScriptAccess", "always");
			$.Footytips.Graphs.graphObj.addParam("wmode", "transparent");
		},
		
		drawGraph: function(divId, formatting) {
			if (typeof($.Footytips.Graphs.graphObj) != 'object')
				$.Footytips.Graphs.createGraph(divId, formatting);
				
			$.Footytips.Graphs.graphObj.write(divId);
		},
		
		getGraph: function(httpObj) {
			if (typeof(httpObj.view) != 'undefined' && typeof(httpObj.graphData) != 'undefined' && httpObj.view == 'graph') {
				if (typeof($.Footytips.Graphs.graphObj) != 'object')
					$.Footytips.Graphs.createGraph(ttpObj.graphName, httpObj.graphData);
					
				$.Footytips.Graphs.graphObj.addVariable("set_data", httpObj.graphData);
				$.Footytips.Graphs.graphObj.write(httpObj.graphName);
			}
		}
	}
});
