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 getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
	
function setFooter() {
	
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		var windowWidth = getWindowWidth();
		/*if (windowHeight > 0) {
			var contentHeight = document.getElementById('content').offsetHeight + document.getElementById('header').offsetHeight + document.getElementById('menu').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.bottom = '0px';
			}
			else {
				footerElement.style.top = (contentHeight + footerHeight) + 15 + 'px';
				document.getElementById('thermo').style.top = ((contentHeight + footerHeight) - 150) + 'px';
			}
		}*/
		//alert(windowHeight);
		document.getElementById('content').style.height = windowHeight-186;
		//var videopopup = document.getElementById('videopopup');
		//videopopup.style.top = (windowHeight/2)-(300/2);
		//alert(document.getElementById('content').style.height);
	}
	
}

window.onload = function() {
	setFooter();
	//alert('test');
}
window.onresize = function() {
	setFooter();
}
