function getY( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
	iReturnValue += oElement.offsetTop;
	oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

function getX( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
	iReturnValue += oElement.offsetLeft;
	oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

var ie=document.all;
var ns6=document.getElementById && !document.all;
var opera=window.opera;

var winwidth=0;
var winheight=0;

function getclientSize() {
	if (!winwidth)
		winwidth=ie&&!opera ? document.body.clientWidth : window.innerWidth-20;
	if (!winheight)		
		winheight=ie&&!opera ? document.body.clientHeight : window.innerHeight-20;
}
