;

	var getTextColor = function(background) {
		return ((parseInt(background.substr(1, 2), 16) * 299 + parseInt(background.substr(3, 2), 16) * 587 + parseInt(background.substr(5, 2), 16) * 114) / 1000 >= 128 ? '#000000' : '#ffffff');
	};

	var chart = d3.select('#chart');
	var divTreemap = chart.select('div.treemap');
	var header = chart.select('div.header');
	var legend = chart.select('table.legend');
	var w = parseInt(divTreemap.style('width'));
	var h = parseInt(divTreemap.style('height'));
	var x = d3.s