function _refresh(nupdate) {

if( nupdate ) {
document.location=document.location+'&nupdate=true';
} else {
document.location=document.location;
}
}

function addBookmark(title,url) {

  var msg_netscape = "Wiadomość";
  var msg_opera    = "Ta funkcja nie działa z tą wersją Opery. Dodaj nas do ulubionych ręcznie.";
  var msg_other    = "Twoja przeglądarka nie wspiera automatycznego dodawania do ulubionych. Dodaj nas do ulubionych ręcznie.";
  var agt          = navigator.userAgent.toLowerCase();


  if (agt.indexOf("opera") != -1) 
  {
    if (window.opera && window.print)
    {
      return true;
    } else 
    {
      alert(msg_other);
    }
  }    
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title); 
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")         
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,""); 
  else alert(msg_other);
  
}

function popupWindow(mypage, myname, w, h, scroll) {

   if(w == '' && h == '') {
	var w = screen.width * 0.8;
	var h = screen.height * 0.8; 
	}

	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function xshow(o) {
	s = '';
	var _window = window.open("",'aaa',"width=680,height=600,resizable,scrollbars=yes");
	for(e in o) {
	_window.document.write(e+'='+o[e]+'<br>');
//s += e+'='+o[e]+'<br>';
	}
  //	document.write( s );
 //	alert( s );
 
}


function setCookie(name, value, expires, path, domain, secure) {
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
}

function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else {
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) {
		end = dc.length;
	}
	return unescape(dc.substring(begin + prefix.length, end));
}
