/*
	Object that gets the real size of the inner paint area of a browser
	window (means the size your webpage can really use).
	The object saves only the size at object creation time. If your window size
	changes you have to call the method "..".
	You have to instantiate the object directly when your page is lading.
*/
function innerSize()
{
	document.write('<div id="innerSizeElement" style="position:absolute;right:0px;bottom:0px;width:0px;height:0px;"></div>');
	this._element = document.getElementById('innerSizeElement');
}

innerSize.prototype.getPos = function()
{
	if (this._element)
	{
    	var el = this._element;
		for (var lx=0,ly=0; el!=null; lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	    	return new Array(lx, ly);
	}
	return false;
}

innerSize.prototype.height = function()
{
	var pos = this.getPos()
	return pos[1];
}

innerSize.prototype.width = function()
{
	var pos = this.getPos()
	return pos[0];
}
