
	/**
	 *function getDocHeight() {
	 *	var D = document;
	 *	return Math.max(
	 *		Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
	 *		Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
	 *		Math.max(D.body.clientHeight, D.documentElement.clientHeight)
	 *	);
	 *}
	 */

	
	function setFooterTop() {
		/*alert(document.getElementById("main-wrapper").scrollHeight);
		alert(document.documentElement.scrollHeight);
		alert(navigator.appVersion.indexOf("MSIE 7.0"));*/
		
		if (navigator.appVersion.indexOf("MSIE 7.0") == -1) {
		
			document.getElementById("footer").style.position = "absolute";
			var heightVar = 0;
			if(typeof(window.innerWidth) == 'number' ) {
				// FireFox
				if (document.getElementById("main-wrapper").scrollHeight + 60 < window.innerHeight) { 
					heightVar = window.innerHeight - 60;
				} else {
					heightVar = document.getElementById("main-wrapper").scrollHeight;
				}
			} else {
				// IE 8
				if (document.getElementById("main-wrapper").scrollHeight + 60 < document.documentElement.scrollHeight) { 
					heightVar = document.documentElement.scrollHeight - 60;
				} else {
					heightVar = document.getElementById("main-wrapper").scrollHeight;
				}
			}
			document.getElementById("footer").style.top = heightVar + "px";
		}
	}
	
	function setFooterTopjQuery() {
		
		$(document).ready(function() {
			
			/*alert($("#main-wrapper").height());
			alert($(window).height());*/
			var ypos;
			var mwHeight = eval($("#main-wrapper").height());
			var wHeight = eval($(window).height());
			/*alert(mwHeight);
			alert(wHeight);*/
			if (mwHeight <= wHeight) {
				ypos = wHeight;
			} else if (mwHeight > wHeight) {
				ypos = mwHeight;
			}
			
			$("#footer").css("position","absolute");
			$("#footer").css("top",ypos - 70);
			
		});

	}
