// <![CDATA[
function footer_fav_contents() {
	var footxScroll, footyScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		footxScroll = window.innerWidth + window.scrollMaxX;
		footyScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		footxScroll = document.body.scrollWidth;
		//footyScroll = document.body.scrollHeight;
		footyScroll = $("container").scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		footxScroll = document.body.offsetWidth;
		//footyScroll = document.body.offsetHeight;
		footyScroll = $("container").offsetHeight;
	}
	
	var footwindowWidth, footwindowHeight;
	
//	console.log(self.innerWidth);
//	console.log(document.documentElement.clientWidth);

	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			footwindowWidth = document.documentElement.clientWidth; 
		} else {
			footwindowWidth = self.innerWidth;
		}
		footwindowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		footwindowWidth = document.documentElement.clientWidth;
		footwindowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		footwindowWidth = document.body.clientWidth;
		footwindowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(footyScroll < footwindowHeight){
		footpageHeight = footwindowHeight;
	} else { 
		footpageHeight = footyScroll;
	}

//	console.log("footxScroll " + footxScroll)
//	console.log("footwindowWidth " + footwindowWidth)

	// for small pages with total width less then width of the viewport
	if(footxScroll < footwindowWidth){	
		footpageWidth = footxScroll;		
	} else {
		footpageWidth = footwindowWidth;
	}
	//	console.log("footpageWidth " + footpageWidth)
	footleftdemo = (footwindowWidth-960)/2;
	document.getElementById('appear_foot1').style.height = footpageHeight+"px";
	document.getElementById('appear_foot2').style.left = footleftdemo+"px";
}
// ]]>	