// JavaScript Document
function setfooter()  {
	//alert(getInnerDimensions('y') + ' *** ' + getPageHeight());
	if (getInnerDimensions('y') > getPageHeight()) {
		var floc = 	(getInnerDimensions('y')-20);
		pgHeight = getInnerDimensions('y');
		
		document.getElementById('pageFooter').style.position = 'absolute';
		document.getElementById('pageFooter').style.top = floc + 'px';
	} else {
		var floc = getPageHeight();
		pgHeight = floc;
		
		document.getElementById('pageFooter').style.position = 'relative';
		document.getElementById('pageFooter').style.top = '0px';
		
	}
	if (document.getElementById('shroud')) {
		document.getElementById('shroud').style.height = pgHeight + 'px';
	}
};

function getPageHeight() {
	var y;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) { // all but Explorer Mac
		y = document.body.scrollHeight;
	} else { // Explorer Mac;
		 //would also work in Explorer 6 Strict, Mozilla and Safari
		y = document.body.offsetHeight;
	}
	return y;
};

function getInnerDimensions(ori) {
	var x,y;
	if (self.innerHeight) { // all except Explorer
		x = self.innerWidth;
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		// Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	if (ori=='y') {
		return y;
	} else {
		return x;
	}
};

