var PWAd=document;

function popup(url, x, y, scroll) {
  mywin=window.open(url,'win','width='+x+',height='+y+',scrollbars='+scroll);
  mywin.focus();
}

function confirmation(text) {
  return confirm(text);
}


function parent_location(location) {
  window.opener.location=location;
  self.close();
}

function parent_reload() {
  var xoff = "";
  var yoff = "";
  var opstr = window.opener.location.href;
  if (window.opener.document.body.scrollLeft) xoff = "&xoff=" + window.opener.document.body.scrollLeft;
  if (window.opener.document.body.scrollTop) yoff = "&yoff=" + window.opener.document.body.scrollTop;
  if (window.opener.pageXOffset) xoff = "&xoff=" + window.opener.pageXOffset;
  if (window.opener.pageYOffset) yoff = "&yoff=" + window.opener.pageYOffset;
  if (opstr.indexOf("?")<0) opstr = opstr + "?";
  opstr = opstr + xoff + yoff;
  window.opener.location.href = opstr;
  self.close();
}

function pause(numberMillis) {
  var now = new Date();
  var exitTime = now.getTime() + numberMillis;
  while (true) {
    now = new Date();
    if (now.getTime() > exitTime)
    return;
  }
}

function flipImage(nazwa,url) { 
  document[nazwa].src = url; 
}

function nRC(buttonClicked) {
  if (navigator.appName == 'Netscape' && (buttonClicked.which == 2 || buttonClicked.which == 3))
    return false;
  else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 3 || event.button == 2)) {
   alert("Nie można pobierac prewek");
   return false;
  }
  return true;
}

function noRightClick() {
  document.onmousedown=nRC;
  document.onmouseup=nRC;
  if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  if (document.layers) window.captureEvents(Event.MOUSEUP);
  window.onmousedown=nRC;
  window.onmouseup=nRC;
}

