<!--

function getWindowHeight() {

	var windowHeight = 0;

	if (typeof(window.innerHeight) == 'number') {

		windowHeight = window.innerHeight;

	}

	else {

		if (document.documentElement && document.documentElement.clientHeight) {

			windowHeight = document.documentElement.clientHeight;

		}

		else {

			if (document.body && document.body.clientHeight) {

				windowHeight = document.body.clientHeight;

			}

		}

	}

	return windowHeight;

}

		

function setHeight() {

	if (document.getElementById) {

		var winH = getWindowHeight();

		//var navH = document.getElementById('nav').offsetHeight;

		//var windowHeight = winH - navH;

		var windowHeight = winH -380;

		if (windowHeight > 0) {

			var body_divElement = document.getElementById('body_div');

			var iframeElement = document.getElementById('body_frame');				

			var body_divH = document.getElementById('body_div').offsetHeight;

			var iframeH = document.getElementById('body_frame').offsetHeight;

			if (windowHeight - body_divH >= 0) {

				body_divElement.style.height = windowHeight + 'px';

				iframeElement.style.height = windowHeight + 'px';						

			}

			else {

				body_divElement.style.height = body_divH + 'px';

				iframeElement.style.height = iframeH + 'px';					

			}

		}

	}

}



function setFooter() {

	if (document.getElementById) {

		var winH = getWindowHeight();

		var navH = document.getElementById('nav').offsetHeight;

		var rightH = document.getElementById('right').offsetHeight;

		var windowHeight = winH - navH - rightH;

		//var windowHeight = winH;

		if (windowHeight > 0) {

			var footerElement = document.getElementById('footer');

			var footerHeight  = footerElement.offsetHeight;

			if (windowHeight - footerHeight >= 0) {

				footerElement.style.position = 'relative';

				footerElement.style.top = (windowHeight - footerHeight) + 'px';

				footerElement.style.left = 10 + 'px';

				//footerElement.style.top = 60 + 'px';

			}

			else {

				footerElement.style.position = 'static';

				footerElement.style.top = footerHeight + 'px';

				footerElement.style.left = 10 + 'px';

			}

		}

	}

}

		

window.onload = function() {

	setFooter();

	setHeight();

}

window.onresize = function() {

	setFooter();

	setHeight();

}

		

		

		

		

function popup(URL,name,features) {

	window.open(URL,name,features);

}

		

		

//-->