var mapSelector = "#nz_map";
var urlBase = "";


// Hide elements until the flash is loaded.
document.write('<style type="text/css">');
document.write(mapSelector + " {visibility: hidden;}");
document.write('</style>');


function doMapReplace(flashPath) {
    
    
	var map = getElementsBySelector(mapSelector)[0];

	var width = 504;//map.offsetWidth;
	var height = 300;//map.offsetHeight;
		
	/*
	if(!document.getElementById("regions")){
		map.style.visibility = "";
		return;
	}
	*/
	
	map.style.right = "-150px";
	//var xml = getInnerHtml(document.getElementById("regions"));

	writeFlash(map, "map/map_locations.swf", width, height);
}

EventUtils.addEventListener(window,'load',doMapReplace);