function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;


	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
function koniec() {
   document.getElementById("overlay2").style.display= "none";
   document.getElementById("popup").style.display= "none";
}

var cnt=1;

function displayWindow(url, width, height) {
	   
	  var Win = window.open(url,cnt,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no' );
      
cnt=cnt+1;
}

function dropdown(obj) {

   if (document.getElementById(obj).style.display=='none' || document.getElementById(obj).style.display=='') {
     document.getElementById(obj).style.display='block';
   }
   else {
     document.getElementById(obj).style.display='none';
   }
}
 jQuery.noConflict();
 jQuery(document).ready(function() {

	   jQuery('img.dodatek').hover(function (){

			var element_index =  jQuery("img.dodatek").index(this);

			 jQuery('div.ukryty').css('display', 'none');
			 jQuery('div.ukryty').eq(element_index).fadeIn('slow');

	  },
	  function (){
		  	var element_index =  jQuery("img.dodatek").index(this);
		  
		  	 jQuery('div.ukryty').eq(element_index).hover ( function () {},
			function(){	
				
				 jQuery(this).fadeOut('slow');
			});
			

	  });
	  
	   jQuery('div#tabela img.miniaturka[src*="grafika"]').hover(function (){
		   jQuery('div.ukryty').fadeOut('slow');
	  	});

  });
