// JavaScript Document
function $(id){ return document.getElementById(id)};

function getPageSizeWithScroll(){
	if (typeof(window.innerHeight)=='number' && typeof(window.scrollMaxY)=='number') {
		// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){
		// all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
		
	} else {
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.documentElement.clientHeight;
		xWithScroll = document.documentElement.clientWidth;
	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
} 

function fixHeight(){
	var size = getPageSizeWithScroll();
	var DocumentHeight = size[1];
	//var containerHeight = $('container').style.height;
	//containerHeight = containerHeight.split('px');
	//if(containerHeight[0]<DocumentHeight)
	//	$('container').style.height = DocumentHeight-22+'px';
	
}

if (window.addEventListener) //DOM method for binding an event
	window.addEventListener("load", fixHeight, false);
else if (window.attachEvent) //IE exclusive method for binding an event
	window.attachEvent("onload", fixHeight)
else if (document.getElementById) //support older modern browsers
	window.onload=fixHeight

window.onresize = fixHeight;



