
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	
	return windowHeight;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('Wrapper').offsetHeight + 160;
			var footerElement = document.getElementById('footer-p');
			var footerHeight  = 20;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}

function replaceEmail () {
	if (document.getElementById) {
		var send = document.getElementById("send");	
		if (send) {
			var a = ["janie2181", "aol"];
			var s = a[0] +"@"+ a[1] +".com";
			send.innerHTML = "<a href=\"mailto:"+ s +"\" title=\"Email Amber Pierce\">"+ s +"</a>";
		}
	}
}

window.onload = function() {
	setFooter();
	replaceEmail();
}

window.onresize = function() {
	setFooter();
}