<!--

/* Copyright (c) 2003-2004 Jakub Argasiński (argasek[at]tekla.art.pl). 
   Wszystkie prawa zastrzeżone. */

        var n = navigator;
        var d = document;
        var agent = n.userAgent.toLowerCase();
        var name = n.appName.toLowerCase();
        var opera = agent.indexOf("opera") != -1;
	var user = {
            bw: {
		ie:agent.indexOf("msie") != -1 && !opera,
		ie4:agent.indexOf("msie 4.") != -1 && !opera,
		ie5:agent.indexOf("msie 5.") != -1 && !opera,
		ie50:agent.indexOf("msie 5.0") != -1 && !opera,
		ie55:agent.indexOf("msie 5.5") != -1 && !opera,
		ie6:agent.indexOf("msie 6.") != -1 && !opera,
		ns:name.indexOf("netscape") != -1 && agent.indexOf("gecko") == -1,
		ns6:agent.indexOf("netscape6") != -1
            },
            os: {
		win:n.userAgent.indexOf("Win") != -1,
		mac:n.userAgent.indexOf("Mac") != -1
            }
	};

	function getBodyDimensions() {
	    var x, y;
	    if (self.innerHeight) {
		// Wszystko poza Explorerem
		x = self.innerWidth;
		y = self.innerHeight;
	    } else if (document.documentElement && document.documentElement.clientHeight) {
		// Explorer 6 Strict Mode		
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	    } else if (document.body) {
		// inne Explorery
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	    }
	    this.Width = x
	    this.Height = y;
	}

	function getPageDimensions() {
	    var x, y;
	    var test1 = document.body.scrollHeight;
	    var test2 = document.body.offsetHeight
	    if (test1 > test2) {
	        // Wszystkie poza Explorer Max  
	        x = document.body.scrollWidth;
	        y = document.body.scrollHeight;
	    } else {
		// Explorer Mac, Explorer 6 Strict, Mozilla i Safari
		x = document.body.offsetWidth;
		y = document.body.offsetHeight;
	    }
	    this.Width = x
	    this.Height = y;
	}

	function getStyle(obiekt, styleProp) {
	    if (window.getComputedStyle)
		var y = window.getComputedStyle(obiekt,null).getPropertyValue(styleProp);
	    else if (obiekt.currentStyle)
		var y = eval('obiekt.currentStyle.' + styleProp);
	    return y;
	}

	function setCookie(nazwa, wartosc, wygasnie) {
	    document.cookie = nazwa + "=" + escape(wartosc)
	    + ((wygasnie == null) ? "" : ("; expires=" + wygasnie.toGMTString()))
	}

	function getCookie(nazwa) {
	    var szukaj = nazwa + "=";
	    if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(szukaj)
		if (offset != -1) { 
		    offset += szukaj.length;
		    koniec = document.cookie.indexOf(";", offset);
		    if (koniec == -1) 
			koniec = document.cookie.length;
		    return unescape(document.cookie.substring(offset, koniec));
		}
	    }
	}

	function regCookie(nazwa, wartosc) {
	    var dzisiaj = new Date();
	    var expire = new Date();
	    var dzien = 1000*60*60*24;
	    expire.setTime(dzisiaj.getTime() + (dzien * 31));
	    setCookie(nazwa, wartosc, expire)
	}

//-->

