var Pomiary= new Object();
	
Pomiary.getSzerPrzegladarki= function() { return self.screen.width; }
Pomiary.getWysPrzegladraki=function() { return self.screen.height; }
Pomiary.getIloscKolorow= function() { return self.screen.colorDepth; }
	
	
Pomiary.SkrolLewa=function() 
	{ var SkrolLewa = 0;
if (document.documentElement && document.documentElement.scrollLeft && document.documentElement.scrollLeft != 0) 
				{ SkrolLewa = document.documentElement.scrollLeft; } 
if (document.body && document.body.scrollLeft && document.body.scrollLeft != 0) 
				{ SkrolLewa = document.body.scrollLeft; } 
if (window.pageXOffset && window.pageXOffset != 0) 
				{ SkrolLewa = window.pageXOffset; } 
return SkrolLewa; 
	};
	
Pomiary.SkrolGora=function() 
			{ var SkrolGora = 0;
if (document.documentElement && document.documentElement.scrollTop && document.documentElement.scrollTop != 0) 
				{ SkrolGora= document.documentElement.scrollTop; } 
if (document.body && document.body.scrollTop && document.body.scrollTop != 0) 
				{ SkrolGora = document.body.scrollTop; } 
if (window.pageYOffset && window.pageYOffset != 0) 
				{ SkrolGora = window.pageYOffset; } 
			return SkrolGora;
			};
		

			
Pomiary.DokumentSzer=function() 
			{ 
			if (document.body.scrollWidth > document.body.offsetWidth) 
				{ var DokumentSzer = document.body.scrollWidth; } 
			else 
				{ var DokumentSzer = document.body.offsetWidth; } 
			return DokumentSzer; 
			}
			
			
Pomiary.DokumentWys=function() 
			{ 
			if (document.body.scrollHeight > document.body.offsetHeight) 
				{ var dokumentWys = document.body.scrollHeight; } 
			else 
				{ var dokumentWys = document.body.offsetHeight; } 
			return dokumentWys; 
			}
			
Pomiary.DokumentWidocznaSzer=function() 
		{ 
		if (self.innerWidth) 
			{ var DokumentWidocznaSzer = self.innerWidth; } 
		else if (document.documentElement && document.documentElement.clientWidth) 
			{ var DokumentWidocznaSzer = document.documentElement.clientWidth; } 
		else if (document.body) 
			{ var DokumentWidocznaSzer = document.body.clientWidth; } 
		return DokumentWidocznaSzer; 
		}
	 
	 
Pomiary.DokumentWidocznaWys=function() 
		{ 
		if (self.innerHeight) 
			{ var DokumentWidocznaWys = self.innerHeight; } 
		else if (document.documentElement && document.documentElement.clientHeight) 
			{ var DokumentWidocznaWys = document.documentElement.clientHeight; } 
		else if (document.body) 
			{ var DokumentWidocznaWys = document.body.clientHeight; } 
		return DokumentWidocznaWys; 
		}
		
Pomiary.DokumentWidocznyWysCentrum=function()
		{
		var DokumentWidocznyWysCentrum=Pomiary.SkrolGora()+(Pomiary.DokumentWidocznaWys()/2);
		return DokumentWidocznyWysCentrum;
		}
		
Pomiary.DokumentWidocznySzerCentrum=function()
		{
		var DokumentWidocznySzerCentrum=Pomiary.SkrolLewa()+(Pomiary.DokumentWidocznaSzer()/2);
		return DokumentWidocznySzerCentrum;
		}

Pomiary.ElementPozycjaLewa=function(element) 
		{  
		var ElementPozycjaLewa=0;
		var element = (typeof element == "string") ? document.getElementById(element) : element; 
		ElementPozycjaLewa=element.offsetLeft; 
		var oParent = element.offsetParent;
		while (oParent != null) { ElementPozycjaLewa += oParent.offsetLeft; oParent = oParent.offsetParent; } 
		return ElementPozycjaLewa;
		}
		
Pomiary.ElementPozycjaGora=function(element) 
	{ var ElementPozycjaGora=0;
	var element = (typeof element == "string") ? document.getElementById(element) : element; 
	ElementPozycjaGora = element.offsetTop; 
	var oParent = element.offsetParent; 
	while (oParent != null) { ElementPozycjaGora += oParent.offsetTop; oParent = oParent.offsetParent; } 
	return ElementPozycjaGora; 
	}
	
Pomiary.ElementSzer=function(element) 
		{ 
		var ElementSzer = (typeof element == "string") ? document.getElementById(element) : element; 
		return ElementSzer.offsetWidth; 
		}
		
Pomiary.ElementWys=function(element) 
		{ 
		var ElementWys = (typeof element == "string") ? document.getElementById(element) : element;
		return ElementWys.offsetHeight; 
		}
		

		
Pomiary.MyszX=function() { return Pomiary.myszX; }
Pomiary.MyszY=function() { return Pomiary.myszY; }



Pomiary.myszX=0;
Pomiary.myszY=0;
	
Pomiary.sledzMysz=	function(e) 
	{ 
	e = (!e) ? window.event : e; 
	Pomiary.myszX=e.clientX + Pomiary.SkrolLewa(); 
	Pomiary.myszY=e.clientY + Pomiary.SkrolGora(); 
	}

	if (document.addEventListener) 
	{
	document.addEventListener("mousemove", Pomiary.sledzMysz, false);
	} 
	else if (document.attachEvent) 
	{
	document.attachEvent("onmousemove", Pomiary.sledzMysz);
	}

