function writeCurrentTime(divID){
	//alert('writeCurrentTime: '+divID);
	var element 	= getElementByID('dateContainer');
	if(!element)
		return;
	//alert(element);
	var now	= new Date();
	var ampm = (now.getHours() > 12)?'pm':'am';
	var hours = (now.getHours() > 12)?now.getHours()-12:now.getHours();
	var displayTime = (now.getMonth()+1)+'/'+now.getDate()+'/'+now.getFullYear();
	
	element.innerHTML = displayTime;
}
function writeEmailAddress(name,domain,divID){
	//alert('writeEmailAddress: '+divID);
	var element      = getElementByID(divID);
	if(!element)
		return;
	var email          = name+'@'+domain;
	var emailLink     = '<a href="mailto:'+email+'">'+email+'</a>';
	element.innerHTML = emailLink;
}
function writeEmailToFooter(name,domain){
		var element = getElementByID('footerMapLink');
		var email = name+'@'+domain;
	 	element.href= 'mailto:'+email;
}
function getElementByID(myElementID){
	/*
	if(document.all)
		return document.all[myElementID];
	else
	*/
		return document.getElementById(myElementID);
}
function setDivContent(myOutputDivID, myContent){
	getElementByID(myOutputDivID).innerHTML = myContent;
}
function getVariableFromFlash(myFlashElementID, myVariableName){
	if(document.all)
		return document.all[myFlashElementID].getVariable(myVariableName);
	else
		return document[myFlashElementID].GetVariable(myVariableName);
}
function showDiv(id){
	document.getElementByID(id).style.display = 'block';
}
function hideDiv(id){
	document.getElementByID(id).style.display = 'none';
}
//DOM stuff
function addToOnLoad(func){	
	if (typeof(window.onload) != 'function'){
		//no existing functions in onLoad, just assing our func directly
    	window.onload = func;
	}else{
		//functions exist already, so save a backup of the onload and call that plus our new func
		oldonload = window.onload;
		window.onload = function(){
			if(oldonload) oldonload();
			
			if(typeof(func) == 'function')
				func();
			else
				eval(func)();
		};
	}
}
function addToOnUnLoad(func){	
	if (typeof(window.onunload) != 'function'){
		//no existing functions in onLoad, just assing our func directly
    	window.onunload = func;
	}else{
		//functions exist already, so save a backup of the onload and call that plus our new func
		oldonunload = window.onunload;
		window.onunload = function(){
			oldonunload();
			func();
		};
	}
}