//-------------- kody do banera na pierwszej stronie --------------------------//

function getViewPortSizeX() {
     var viewportwidth;
     
     // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
     
     if (typeof window.innerWidth != 'undefined')
     {
          viewportwidth = window.innerWidth
     }
     
    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

     else if (typeof document.documentElement != 'undefined'
         && typeof document.documentElement.clientWidth !=
         'undefined' && document.documentElement.clientWidth != 0)
     {
           viewportwidth = document.documentElement.clientWidth
     }
     
     // older versions of IE
     
     else
     {
           viewportwidth = document.getElementsByTagName('body')[0].clientWidth
     }

    return viewportwidth;
}

function getViewPortSizeY() {
     var viewportheight;
     
     // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
     
     if (typeof window.innerWidth != 'undefined')
     {
          viewportheight = window.innerHeight
     }
     
    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

     else if (typeof document.documentElement != 'undefined'
         && typeof document.documentElement.clientWidth !=
         'undefined' && document.documentElement.clientWidth != 0)
     {
           viewportheight = document.documentElement.clientHeight
     }
     
     // older versions of IE
     
     else
     {
           viewportheight = document.getElementsByTagName('body')[0].clientHeight
     }

    return viewportheight;
}



function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*4*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

//-------------- KONIEC --------------------------//
