function getWindowHeight() {
	var windowHeight;
	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 getWindowWidth() {
	var windowWidth;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			clientWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
function setFooter() {
    if (document.getElementById && document.getElementById('footer')) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('wrapper').offsetHeight;
			
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			footerElement.style.top = (370 + contentHeight) + 'px';
			footerElement.style.display = 'block';
		}
	}
}
function setFooterHome() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('wrapper').offsetHeight;
			
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			footerElement.style.top = (481 + contentHeight) + 'px';
			footerElement.style.display = 'block';
		}
	}
}
window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}

