//the main function, call to the effect object
function init(display, stretchme, choice){
	var openChoice = choice || 0;
	var stretchers = document.getElementsByClassName(stretchme); //div that stretches
	var toggles = document.getElementsByClassName(display); //h3s where I click on

	//accordion effect
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 400}
	);

	//hash functions
	var found = false;
	toggles.each(function(h3, i){
		var div = Element.find(h3, 'nextSibling'); //element.find is located in prototype.lite
		if (window.location.href.indexOf(h3.title) > 0) {
			myAccordion.showThisHideOpen(div);
			found = true;
		}
	});
	if (!found) myAccordion.showThisHideOpen(stretchers[openChoice]);
}

function initMap() {
   // note: add overlay after centerAndZoom
   var umap = new GMap(document.getElementById("umap"));
   var upoint = new GPoint(-113.512052935, 53.522456278);
   umap.addControl(new GSmallMapControl());
   umap.centerAndZoom(upoint, 4);
   umap.addOverlay(new GMarker(upoint));
   
   // note: add overlay after centerAndZoom
   var mmap = new GMap(document.getElementById("mmap"));
   // var mpoint = new GPoint(-113.433290948, 53.458412702);
	 var mpoint = new GPoint(-113.428, 53.457);
   mmap.addControl(new GSmallMapControl());
   mmap.centerAndZoom(mpoint, 4);
   mmap.addOverlay(new GMarker(mpoint));
   
   // note: add overlay after centerAndZoom
   var smap = new GMap(document.getElementById("smap"));
   var spoint = new GPoint(-113.295406000, 53.526155000);
   smap.addControl(new GSmallMapControl());
   smap.centerAndZoom(spoint, 4);
   smap.addOverlay(new GMarker(spoint));
}