/**
 * Rozszerzenie funkcjonalności obiektu window o informacje dotyczące
 * rozmiaru obszaru roboczego (dokumentu)
**/

window.size = function()
{
	var iWidth = 0;
	var iHeight = 0;

	if(!window.innerWidth)
	{
		if(!(document.documentElement.clientWidth == 0))
		{
			iWidth = document.documentElement.clientWidth;
			iHeight = document.documentElement.clientHeight;
		}
		else
		{
			iWidth = document.body.clientWidth;
			iHeight = document.body.clientHeight;
		}
	}
	else
	{
		iWidth = window.innerWidth;
		iHeight = window.innerHeight;
	}
	return {width:iWidth, height:iHeight};
}

/**
 * Pobranie elemntu po identyfikatorze (alias metody)
 *
 * @param	string elemId
 * @return	object|null
**/
function $(elemId)
{
	return document.getElementById(elemId);
}


