function getAvailableHeight() {
	if (typeof window.innerHeight != 'undefined') {
		return window.innerHeight; // handles the status bar
	} else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight != 'undefined' && document.documentElement.clientHeight != 0) {
	    return document.documentElement.clientHeight;
	} else {
		alert(document.getElementsByTagName('body')[0].clientHeight);
		var result = (document.getElementsByTagName('body')[0].clientHeight);
		return result; // needs allowances for the start and the status bar
	}
}

function getAvailableWidth() {
	if (typeof window.innerWidth != 'undefined') {
		return window.innerWidth;
	} else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) {
	    return document.documentElement.clientWidth;
	} else {
		return document.getElementsByTagName('body')[0].clientWidth;
	}
}
