//-------------------------------------------------------------------------------------------------//
// maps-load.js
// Grabs the current location (coc server, .com or .com.au and sets the google maps key accordingly
//-------------------------------------------------------------------------------------------------//

//-------------------------------------------------------------------------------------------------//
// getLocation
// Grabs the current url through window.location and sets the correct API key.
//-------------------------------------------------------------------------------------------------//
function getLocation() {
	var tld = document.location.toString().match(/.(coc|com|com.au)(\/|$)/)[1];
	var srcs = {
	   "coc"    : "http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAJE9urFU2nIxxdegf_N6J8RQH9J-2w2moT2Uv1z3VMieWHjckvhQk9q_qfvW3Q6iS84hIQ7RHj3uTxw",
	   "com.au" : "http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAJE9urFU2nIxxdegf_N6J8RSfIPu-ZfgCAzCRnjkv1-IyWig-HRRoMHGwXaZ8r4vkmFeoKFRdtV_c4A"
	};
	//alert('<script language="Javascript" type="text/javascript" src="' + srcs[tld] + '">');
	document.write('<script language="Javascript" type="text/javascript" src="' + srcs[tld] + '"></script>');
}
//-------------------------------------------------------------------------------------------------//

getLocation();