function viewPortSize(){
	var vpWidth, vpHeight;
	if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6+ Strict & All other Browsers 
		vpWidth = document.documentElement.clientWidth;
		vpHeight=Math.min(document.documentElement.clientHeight, document.body.clientHeight)
	} else if (document.body) { // other Explorers
		vpWidth = document.body.clientWidth;
		vpHeight = document.body.clientHeight;
	}


	var pgWidth, pgHeight;
	if (window.innerHeight && window.scrollMaxY) {	
		pgWidth = document.body.scrollWidth + window.scrollMaxX;
		pgHeight = window.innerHeight + window.scrollMaxY;
	} else {
		pgWidth = document.body.scrollWidth;
		pgHeight = document.body.scrollHeight;
	} 

	// if the page is narrower or shorter than the viewport....
	if(pgHeight < vpHeight) pgHeight = vpHeight;
	if(pgWidth < vpWidth) pgWidth = vpWidth;

	viewPortArray = new Array(vpWidth,vpHeight,pgWidth,pgHeight) 
	return viewPortArray;
}

function getScrollWidth(){
	var w = window.pageXOffset ||
		document.body.scrollLeft ||
		document.documentElement.scrollLeft;
	return w ? w : 0;
}

function getScrollHeight(){
	var h = window.pageYOffset ||
		document.body.scrollTop ||
		document.documentElement.scrollTop;
	h =	window.pageYOffset;
	return h ? h : 0;
}

