function message(title, text)
{
	$("div#fancyModal").html("<h2>"+title+"<a href=\"#\" onClick=\"return false;\" id=\"closeFancy\"><img src=\"http://statstack.com/wp-content/themes/statstack/_img/icons/close-24.png\"/></a></h2><p>"+text+"</p>");
	
	$("#closeFancy").click(function() {
 				$("div#fancyModal").removeClass("show");
 				return false;
 			});
	
	$("div#fancyModal").addClass("show");
}

function qtip(div,text)
{
	$('#' + div).qtip(
		{
			position: {
		         corner: {
		            target: 'topRight',
		            tooltip: 'bottomLeft'
		         }
		      },
		    style: {
		         name: 'cream',
		         padding: '7px 13px',
		         width: {
		            max: 210,
		            min: 0
		         },
		         tip: true
		      },
			content: {text:text},
			show: { ready: true },
			hide:{delay: 5000}
		});
}

var theme = 'gray';
function makeChart(divID,title,subtitle,xCategories,seriesData) {
	var chart = new Highcharts.Chart({
		chart: {
			renderTo: divID,
			defaultSeriesType: 'line',
			margin: [10, 25, 20, 30],
			height: 100,
			width:325
		},
		colors: [
			'#0077cc'
		],
		title: {
			text: "",

		},
		subtitle: {
			text: "",
			
		},
		labels: {
			//items: [],
			style: {
				color: '#3E576F',
				font: "10px"
			}
		},
		xAxis: {
			categories: xCategories,
			title: {
				text: 'Date'
			}
		},
		yAxis: {
			title: {
				text: subtitle
			},
			labels: {
				enabled: false,
			},
			plotLines: [{
				value: 0,
				width: 1,
				color: '#808080'
			}]
		},
		tooltip: {
			formatter: function() {
	                return '<b>'+ this.series.name +'</b><br/>'+
					this.y + ' ' + subtitle;
			}
		},
		legend: {
			enabled: false,
		},
		series: seriesData
	});
	
	
}
