(top.location == self.location) || (top.location = self.location)

function nwin(page, x, y, scr)
{
 sx = screen.availWidth;
 sy = screen.availHeight;
 px = (sx/2)-(x/2);
 py = (sy/2)-(y/2);
 window.open(page,'','top='+py+',left='+px+',width='+x+',height='+y+'resizable=no,scrollbars='+scr+',status=yes');
 return;
}

function addfav()
{
  var msg_netscape = "Wiadomość Netscape";
  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();
  var title        = "Hydromet";
  var url          = "http://www.hydromet24.pl/";

  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);

 return;  
}

function startowa()
{
 document.body.style.behavior='url(#default#homepage)';
 document.body.setHomePage('http://www.hydromet24.pl/');
}

function katsub()
{
 z = document.getElementById('grupa').value;
 if(z != 0)
 {
  document.location.href = '?page=czesci&idk='+z;
 }
}
