//-------------------------------------------------------------------------------------------------//
// 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.au)(\/|$)/)[1];
	var srcs = {
	   "coc"    : "http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAnrBA2aJSg5hBNYDs12uZEhRfPrFaIbRZfcCq4uxgQ_RVj2O1qhT_nBUK_nKRCfVAdn7qOO5t72ZprA",
	   "com.au" : "http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAnrBA2aJSg5hBNYDs12uZEhScvTfzxv16JczORwFx0ZozU3S1rBQR0vBj-EMgqiEvyyJpcKIbR8ZXdQ"
	};
	document.write('<script language="Javascript" type="text/javascript" src="' + srcs[tld] + '"></script>');
}
//-------------------------------------------------------------------------------------------------//

getLocation();