function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // if the cookie exists
    	    offset += search.length
    	    end = document.cookie.indexOf(";", offset); // set the index of beginning value
    	      
			if (end == -1) // set the index of the end of cookie value
    	         end = document.cookie.length;
    	         returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}
    	
function PopExit() {
	if (get_cookie('popexit')==''){
		Okno('/popexit.php',500,330,0,0,'no'); // 'adres',szer,wys,poz_x,poz_y,'przewijanie(yes,no)'
	}
}