// $Header: /home/web/cvsroot/es62_heine/hv_app_advice/staticfiles/cartridge/static/default/js/be_leben.js,v 1.1 2009/03/19 07:43:31 shagner Exp $
//

function getWindowHeight() {
	var y;
	if (window.innerHeight) {
		// all except Explorer
		y = window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		// Explorer 6 Strict Mode
		y = document.documentElement.clientHeight;
	} else if (document.body) {
		// other Explorers
		y = document.body.clientHeight;
	}
	return y;
}
function getWindowWidth() {
	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;
	}
	return x;
}
function getScrollOffset() {
	var x,y;
	if (self.pageYOffset) {
		// all except Explorer
		x = self.pageXOffset;
		y = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		// Explorer 6 Strict
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;
	} else if (document.body) {
		// all other Explorers
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}
	return new Array(x, y);
}
function findPosX(width) {
	var x = getScrollOffset();
	return (getWindowWidth() / 2 + x[0] - width / 2);
}
function findPosY(height) {
	var y = getScrollOffset();
	return (getWindowHeight() / 2 + y[1] - height / 2)
}
