function createAreas() {
	var areas = [
["AB","Scotland",57.273, -2.4602187, 56.847, -3.351, 57.675, -1.888],
["AL","South East",51.777, -0.2691, 51.72, -0.37, 51.831, -0.186],
["B","West Midlands",52.4568571, -1.8823766, 52.169, -2.068, 52.65, -1.667],
["BA","South West",51.1646315, -2.4576315, 50.938, -2.743, 51.391, -2.179],
["BB","North West",53.7932307, -2.3230769, 53.698, -2.5, 53.914, -2.163],
["BD","North West",53.823375, -1.8215833, 53.727, -2.274, 54.077, -1.676],
["BH","South West",50.7446538, -1.8979230, 50.611, -2.146, 50.876, -1.657],
["BL","North West",53.5904, -2.4073, 53.547, -2.539, 53.646, -2.286],
["BN","South East",50.8345666, -0.1135333, 50.773, -0.579, 50.929, 0.331],
["BR","Greater London",51.39275, 0.056625, 51.366, -0.031, 51.411, 0.176],
["BS","South West",51.4270526, -2.6555, 51.225, -2.97, 51.596, -2.416],
["BT","Northern Ireland",54.6127625, -6.37705, 54.155, -7.826, 55.202, -5.519],
["CA","North West",54.6451428, -3.1484285, 54.354, -3.592, 54.994, -2.35],
["CB","East Midlands",52.1951818, 0.23345454, 52, 0.025, 52.404, 0.441],
["CF","Wales",51.5627714, -3.3674857, 51.404, -3.698, 51.751, -3.111],
["CH","North West",53.3082916, -3.0380416, 53.167, -3.241, 53.428, -2.822],
["CM","South East",51.74575, 0.34766666, 51.615, 0.075, 51.899, 0.837],
["CO","East Midlands",51.89675, 0.96475, 51.796, 0.611, 52.057, 1.269],
["CR","Greater London",51.3455, -0.099625, 51.287, -0.159, 51.404, -0.052],
["CT","South East",51.2495714, 1.23961904, 51.073, 1.037, 51.383, 1.431],
["CV","West Midlands",52.3704583, -1.4951666, 52.067, -1.713, 52.612, -1.274],
["CW","North West",53.1511666, -2.4526666, 53, -2.666, 53.259, -2.212],
["DA","Greater London",51.4407222, 0.21661111, 51.382, 0.1, 51.492, 0.389],
["DD","Scotland",56.5488181, -2.8223636, 56.437, -3.027, 56.748, -2.427],
["DE","East Midlands",52.9277391, -1.5018260, 52.725, -1.717, 53.215, -1.321],
["DG","Scotland",55.0602, -3.7005333, 54.837, -5.021, 55.375, -2.985],
["DH","North East",54.8286666, -1.5948888, 54.753, -1.844, 54.872, -1.454],
["DL","North East",54.5351764, -1.6682941, 54.293, -1.985, 54.716, -1.389],
["DN","East Midlands",53.5514687, -0.6390937, 53.323, -1.221, 53.708, -0.035],
["DT","South West",50.7527272, -2.5247272, 50.548, -2.946, 50.941, -2.181],
["DY","West Midlands",52.4489285, -2.1927857, 52.336, -2.462, 52.532, -2.053],
["E","Greater London",51.5456842, -0.0094736, 51.506, -0.064, 51.622, 0.056],
["EC","Greater London",51.51725, -0.0941428, 51.512, -0.108, 51.526, -0.079],
["EH","Scotland",55.9037407, -3.1715185, 55.62, -3.664, 56.047, -2.525],
["EN","Greater London",51.6886363, -0.076, 51.648, -0.195, 51.765, 0.014],
["EX","South West",50.8446060, -3.6972121, 50.592, -4.533, 51.224, -3.007],
["FK","Scotland",56.1595714, -3.9743333, 55.985, -4.63, 56.466, -3.66],
["FY","North West",53.835125, -3.0205, 53.751, -3.046, 53.916, -2.981],
["G","Scotland",55.8758163, -4.2733061, 55.769, -4.754, 56.042, -3.985],
["GL","South West",51.8215185, -2.2145555, 51.557, -2.611, 52.061, -1.704],
["GU","South East",51.2213846, -0.7146923, 50.984, -0.983, 51.401, -0.482],
["HA","Greater London",51.585, -0.3397, 51.55, -0.42, 51.611, -0.272],
["HD","North West",53.6386666, -1.7851111, 53.58, -1.877, 53.702, -1.679],
["HG","North East",54.0374, -1.5396, 53.987, -1.616, 54.156, -1.457],
["HP","South East",51.7159583, -0.6985833, 51.609, -0.982, 51.822, -0.452],
["HR","West Midlands",52.091, -2.7375555, 51.908, -3.075, 52.233, -2.444],
["HS","Scotland",57.696, -6.9788888, 56.972, -7.472, 58.249, -6.381],
["HU","North East",53.7689, -0.3465, 53.723, -0.622, 53.909, 0.036],
["HX","North West",53.7124285, -1.8948571, 53.679, -2.007, 53.739, -1.835],
["IG","Greater London",51.589, 0.07190909, 51.535, 0.034, 51.648, 0.101],
["IP","East Midlands",52.2172424, 1.09615151, 51.97, 0.549, 52.586, 1.673],
["IV","Scotland",57.5359183, -4.8267959, 57.067, -6.611, 58.277, -3.11],
["KA","Scotland",55.5958, -4.6455333, 55.219, -5.172, 55.797, -4.239],
["KT","Greater London",51.3549166, -0.342125, 51.269, -0.514, 51.416, -0.23],
["KW","Scotland",58.4238125, -3.48075, 57.975, -4.13, 59.042, -2.959],
["KY","Scotland",56.1806875, -3.1591875, 56.047, -3.492, 56.342, -2.7],
["L","North West",53.4394761, -2.9270476, 53.343, -3.062, 53.602, -2.782],
["LA","North West",54.2138695, -2.9644347, 54.046, -3.375, 54.422, -2.493],
["LD","Wales",52.192, -3.367, 51.96, -3.616, 52.352, -3.043],
["LE","East Midlands",52.64555, -1.12965, 52.467, -1.468, 52.784, -0.701],
["LL","Wales",53.1076119, -3.9727611, 52.547, -4.569, 53.411, -2.96],
["LN","East Midlands",53.2683846, -0.2745384, 53.15, -0.594, 53.492, 0.266],
["LS","North East",53.8265517, -1.5473793, 53.749, -1.803, 53.932, -1.252],
["LU","South East",51.8954285, -0.4915714, 51.874, -0.664, 51.909, -0.395],
["M","North West",53.4759302, -2.2748604, 53.363, -2.49, 53.562, -2.117],
["ME","South East",51.33465, 0.57925, 51.235, 0.411, 51.433, 0.896],
["MK","South East",52.0573461, -0.6985, 51.98, -0.969, 52.194, -0.426],
["ML","Scotland",55.7575, -3.91725, 55.566, -4.069, 55.867, -3.596],
["N","Greater London",51.5930454, -0.1169545, 51.537, -0.193, 51.636, -0.057],
["NE","North East",55.0651, -1.6917166, 54.894, -2.459, 55.605, -1.421],
["NG","East Midlands",53.0097931, -1.0387586, 52.818, -1.294, 53.21, -0.391],
["NN","West Midlands",52.291, -0.8277894, 52.032, -1.179, 52.5, -0.597],
["NP","Wales",51.6952777, -3.023, 51.579, -3.257, 51.86, -2.688],
["NR","East Midlands",52.6766176, 1.27573529, 52.438, 0.853, 52.949, 1.734],
["NW","Greater London",51.561, -0.1994545, 51.531, -0.254, 51.615, -0.143],
["OL","North West",53.58025, -2.117125, 53.49, -2.222, 53.714, -2.009],
["OX","South East",51.7941428, -1.2644285, 51.594, -1.591, 52.073, -0.913],
["PA","Scotland",56.0848787, -5.4312727, 55.436, -6.884, 56.625, -4.396],
["PE","East Midlands",52.6907222, 0.04255555, 52.242, -0.48, 53.173, 0.693],
["PH","Scotland",56.7886666, -4.374, 56.261, -6.503, 57.33, -3.152],
["PL","South West",50.4606571, -4.4154285, 50.335, -4.966, 50.684, -3.918],
["PO","South East",50.7805588, -1.1046764, 50.604, -1.538, 50.911, -0.648],
["PR","North West",53.7152727, -2.7532727, 53.626, -3.01, 53.869, -2.609],
["RG","South East",51.3864666, -1.0433666, 51.228, -1.488, 51.544, -0.749],
["RH","South East",51.12355, -0.19275, 50.937, -0.483, 51.251, 0.031],
["RM","Greater London",51.54485, 0.22105, 51.467, 0.132, 51.633, 0.377],
["S","East Midlands",53.3838444, -1.4153333, 53.166, -1.721, 53.578, -1.122],
["SA","Wales",51.8441372, -4.3567450, 51.58, -5.063, 52.233, -3.725],
["SE","Greater London",51.4606785, -0.0306785, 51.397, -0.109, 51.502, 0.117],
["SG","South East",51.9454736, -0.1562631, 51.787, -0.33, 52.139, 0.072],
["SK","North West",53.3797368, -2.0927894, 53.244, -2.23, 53.486, -1.879],
["SL","South East",51.5226, -0.6337, 51.405, -0.776, 51.597, -0.514],
["SM","Greater London",51.3615714, -0.187, 51.323, -0.213, 51.392, -0.143],
["SN","South West",51.5059444, -1.8892222, 51.324, -2.211, 51.649, -1.564],
["SO","South East",50.9473913, -1.3917826, 50.755, -1.583, 51.114, -1.147],
["SP","South West",51.0983636, -1.826, 50.936, -2.289, 51.23, -1.483],
["SR","North East",54.881, -1.3852222, 54.766, -1.424, 54.935, -1.335],
["SS","South East",51.5665882, 0.59429411, 51.521, 0.431, 51.615, 0.793],
["ST","West Midlands",52.9503333, -2.1318571, 52.713, -2.265, 53.115, -1.868],
["SW","Greater London",51.47175, -0.1645714, 51.411, -0.265, 51.505, -0.112],
["SY","Wales",52.62864, -3.15816, 52.238, -4.051, 53.03, -2.689],
["TA","South West",51.03175, -2.99975, 50.873, -3.545, 51.244, -2.702],
["TD","Scotland",55.6650666, -2.5076666, 55.397, -2.871, 55.93, -2.012],
["TF","West Midlands",52.6894615, -2.4728461, 52.578, -2.582, 52.897, -2.36],
["TN","South East",51.06685, 0.45515, 50.844, 0.052, 51.3, 0.953],
["TQ","South West",50.4329285, -3.643, 50.237, -3.819, 50.593, -3.507],
["TR","South West",50.1698148, -5.4313703, 49.892, -6.352, 50.414, -4.936],
["TS","North East",54.5892068, -1.2267586, 54.466, -1.425, 54.725, -0.854],
["TW","Greater London",51.4472, -0.3938, 51.397, -0.55, 51.486, -0.293],
["UB","Greater London",51.5284545, -0.4217272, 51.499, -0.49, 51.581, -0.342],
["W","Greater London",51.5115925, -0.1904444, 51.491, -0.334, 51.526, -0.131],
["WA","North West",53.392, -2.58875, 53.273, -2.755, 53.477, -2.325],
["WC","Greater London",51.517125, -0.1220625, 51.51, -0.131, 51.525, -0.115],
["WD","Greater London",51.6657692, -0.3905384, 51.631, -0.481, 51.709, -0.275],
["WF","North East",53.688, -1.5041764, 53.606, -1.698, 53.724, -1.256],
["WN","North West",53.534, -2.641875, 53.495, -2.768, 53.574, -2.517],
["WR","West Midlands",52.1682666, -2.1952666, 52.043, -2.568, 52.305, -1.874],
["WS","West Midlands",52.6412, -1.9505333, 52.56, -2.022, 52.758, -1.814],
["WV","West Midlands",52.5826875, -2.16775, 52.511, -2.44, 52.633, -2.039],
["YO","North East",54.0841379, -0.8396551, 53.781, -1.376, 54.477, -0.177],
["ZE","Scotland",60.1223333, -1.232, 59.884, -1.302, 60.331, -1.168]];

	var AREA    = 0;
	var REGION  = 1;
	var LAT     = 2;
	var LNG     = 3;
	var MIN_LAT = 4;
	var MIN_LNG = 5;
	var MAX_LAT = 6;
	var MAX_LNG = 7;

	var labels = [];
	for (var i = 0; i < areas.length; i++) {
		var area    = areas[i][AREA];
		var region  = areas[i][REGION];
		var lat     = areas[i][LAT];
		var lng     = areas[i][LNG];
		var min_lat = areas[i][MIN_LAT];
		var min_lng = areas[i][MIN_LNG];
		var max_lat = areas[i][MAX_LAT];
		var max_lng = areas[i][MAX_LNG];

		var latlng = new GLatLng(lat,lng);
		var label = new AreaLabel(latlng, area);
		label.setUserData({
			area:    area,
			region:  region,
			lat:     lat,
			lng:     lng,
			min_lat: min_lat,
			min_lng: min_lng,
			max_lat: max_lat,
			max_lng: max_lng
		});
		labels.push(label);
	}
	
	return labels;
}

function AreaLabel(latlng,html) {
	BpLabel.call(this,latlng,html,'regularLabel');
	this._isAreaLabel = true;
}
AreaLabel.prototype = new BpLabel(new GLatLng(0,0),'');

AreaLabel.prototype.initialize = function(map) {
	this._map = map;
	BpLabel.prototype.initialize.apply(this,arguments);

	this.setCursor('pointer');
	this._over  = GEvent.bindDom(this.getEventTarget(),'mouseover',this,this.onOver);
	this._out   = GEvent.bindDom(this.getEventTarget(),'mouseout',this,this.onOut);
	this._click = GEvent.bindDom(this.getEventTarget(),'click',this,this.whenClicked);
};

AreaLabel.prototype.remove = function() {
	GEvent.removeListener(this._click);
	GEvent.removeListener(this._over);
	GEvent.removeListener(this._out);
	BpLabel.prototype.remove.call(this);
}

AreaLabel.prototype.whenClicked = function() {
	if (this.isMapped())
		GEvent.trigger(this.getEventTarget(),'mouseout');

	manageCrumbs('area', this);

	var ud = this.getUserData();
	var minll = new GLatLng(ud.min_lat, ud.min_lng);
	var maxll = new GLatLng(ud.max_lat, ud.max_lng);
	map.zoomToMarkers(0, [minll, maxll]);
};

AreaLabel.prototype.mapLocations = function() {
	var locs = this.getUserData().locations;
	
	for(var i = 0; i < locs.length; i++)
		map.addOverlay(locs[i]);
};

AreaLabel.prototype.loadLocations = function(json) {
	try {
		this.getUserData().locations = eval(json);
	} catch(e) {
		alert('An error has occurred. Please check back later.' + e);
	}
	this.mapLocations();
};

AreaLabel.prototype.onOver = function() {
	this.setClassName('hoverLabel');
	this.setZIndex(1000000);
};

AreaLabel.prototype.onOut = function() {
	this.setClassName('regularLabel');
	this.setZIndex(GOverlay.getZIndex(this.getPoint().lat()));
};

