function positionDIVComponents(){
	//get window size
	var windowWidth = 0, windowHeight = 0;
	if(typeof( window.innerWidth) == 'number'){
			//non-IE
			windowWidth = window.innerWidth;
			windowHeight = window.innerHeight;
		}else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
			//IE 6+ in 'standards compliant mode'
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
	}
	//get component sizes
	var headerHeight = document.getElementById('header').offsetHeight;
	var contentHeight = document.getElementById('content').offsetHeight;
	var footerHeight = document.getElementById('footer').offsetHeight;
	//set 'content' offset from window.top
	//document.getElementById('content').style.top = headerHeight + 'px';
	//calculate total content height
	var totalContentHeight = parseInt(headerHeight,10) + parseInt(contentHeight,10) + parseInt(footerHeight,10);
	//set footer position based on content size and window height
	if(parseInt(totalContentHeight,10) > parseInt(windowHeight,10)){
		document.getElementById('footer').style.top = (parseInt(headerHeight,10) + parseInt(contentHeight,10)) + 'px';
	}else{
		document.getElementById('footer').style.top = (parseInt(windowHeight,10) - parseInt(footerHeight,10)) + 'px';
	}
}
//call function on load or resize
window.onload = positionDIVComponents;
window.onresize = positionDIVComponents;
