function changeLocation(passedLocation) {
	$('worldText').style.display = 'none';
	var locationLists = document.getElementsByClassName('locationList');
	for (var e = 0; e < locationLists.length; e ++) {
		locationLists[e].style.display = 'none';
	}
	$(passedLocation).style.display = 'block';
}

function showAllLocations() {
	var locationLists = document.getElementsByClassName('locationList');
	for (var e = 0; e < locationLists.length; e ++) {
		locationLists[e].style.display = 'block';
	}
}

function insertStyleSheet() {
	var jscss = document.createElement('link');
	jscss.href = '/styles/js.css';
	jscss.rel = 'stylesheet';
	jscss.type = 'text/css';
	jscss.media = 'all';
	var head = document.getElementsByTagName('head');
	head[0].appendChild(jscss);
	return true;
}

function insertTrigger() {
	var insertedStyleSheet = insertStyleSheet();
   var trigger = document.createElement('embed');
   trigger.id = 'trigger';
   trigger.src = '/flash/trigger.swf';
   trigger.quality = 'high';
   trigger.width = '1';
   trigger.height = '1';
   trigger.allowScriptAccess = 'sameDomain';
   trigger.type = 'application/x-shockwave-flash';
   trigger.swLiveConnect = 'true';
   var trigger_div = $('trigger_div');
   trigger_div.appendChild(trigger);
   return insertedStyleSheet;
}

function insertLocations() {
	var locations = document.createElement('embed');
   locations.src = '/flash/locations.swf';
   locations.quality = 'high';
   locations.width = '540';
   locations.height = '300';
   locations.allowScriptAccess = 'sameDomain';
   locations.type = 'application/x-shockwave-flash';
   locations.swLiveConnect = 'true';
   var locations_div = $('locations_div');
   locations_div.appendChild(locations);
}

function triggerCallBack() {
	insertLocations();
}