// help - system pomocy
function help(nr){
 frame="help";
 url="php/help.php?nr="+nr;
 myleft=(screen.width)?(screen.width-500)/2:100;
 mytop=(screen.height)?(screen.height-250)/2:100;
 settings="width=500,height=250,top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
 win=window.open(url,frame,settings);
 win.focus();
}
// autorzy
function chooseautor(nr) {
  autor = new String(document.head.autorzy.options[document.head.autorzy.selectedIndex].value);
  var re = /&/g;
  var str = "" +document.location;
  newstr=str.replace(re, "|");
  url="php/autor.php?autor="+autor;
  frame="autorzy";
  myleft=(screen.width)?(screen.width-640)/2:100;
  mytop=(screen.height)?(screen.height-400)/2:100;
  settings="width=640,height=400,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url,frame,settings);
  win.focus();
}
// statystyki
function stat(nr){
//  nr = new String(document.wybor.roczna.options[document.wybor.roczna.selectedIndex].value);
   url="php/stat.php?rok="+nr;
   frame="statystyki";
  myleft=(screen.width)?(screen.width-600)/2:100;
  mytop=(screen.height)?(screen.height-400)/2:100;
  settings="width=600,height=400,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url, frame ,settings);
  win.focus();
}
// wybór roku dla statystyk
function rok_stat(nr){
  nr = new String(document.wybor.roczna.options[document.wybor.roczna.selectedIndex].value);
   url="stat.php?rok="+nr;
   frame="statystyki";
  myleft=(screen.width)?(screen.width-600)/2:100;
  mytop=(screen.height)?(screen.height-400)/2:100;
  settings="width=600,height=400,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url, frame ,settings);
  win.focus();
}
// Dodawanie pozycji do działu LINKI
function nowylink(grupa){
  url="linki/dodaj.php?grupa="+grupa;
  frame="linki";
  myleft=(screen.width)?(screen.width-640)/2:100;
  mytop=(screen.height)?(screen.height-380)/2:100;
  settings="width=640,height=380,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url,frame,settings);
  win.focus();
}
// Dodawanie pozycji do działu FILM
function nowyfilm(grupa){
  url="film/dodaj.php?grupa="+grupa;
  frame="film";
  myleft=(screen.width)?(screen.width-600)/2:100;
  mytop=(screen.height)?(screen.height-400)/2:100;
  settings="width=640,height=480,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url,frame,settings);
  win.focus();
}
// Dodawanie pozycji do działu INFO-NEWS
function nowynews(grupa){
  url="info/dodaj.php?grupa="+grupa;
  frame="info";
  myleft=(screen.width)?(screen.width-640)/2:100;
  mytop=(screen.height)?(screen.height-480)/2:100;
  settings="width=640,height=480,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url,frame,settings);
  win.focus();
}
// Logowanie do serwisu
function log_in(q){
  url="php/login.php";
  frame="login";
  myleft=(screen.width)?(screen.width-500)/2:100;
  mytop=(screen.height)?(screen.height-150)/2:100;
  settings="width=500,height=150,top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url,frame,settings);
  win.focus();
}
// GALERIA: obraz
function galpic(nr) {
  url="galeria/pic.php?pic="+nr;
  frame="galeriaCB";
  myleft=(screen.width)?(screen.width-640)/2:100;
  mytop=(screen.height)?(screen.height-480)/2:100;
  settings="width=640,height=480,top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
  win=window.open(url, frame, settings);
  win.focus();
}
