// Java scripts for the www site: Leszek J. Chmielewski. Metody akumulacji danych w analizie obrazów cyfrowych.
// Gathered and written by Leszek Chmielewski



function WyskoczZObcejRamki() {
// Modified version of the "frame buster - code by Gordon McComb".
// Originally the function name was "changePage()".
// Modification by Leszek J Chmielewski
// by adding the second condition in the called function
// to avoid problems when our page itself also has frames

  if (
  (self.parent.frames.length != 0) &&
  (self.parent != self)
  ) 
    self.parent.location=document.location; 

} // WyskoczZObcejRamki



function OstrzezenieRamkaTekst(jezyk) {
  if (jezyk == "pl") 
    document.write(
      '<p style="text-align:center;font-size:14pt;line-height:18pt;font-weight:normal;color:red;background-color:black">' +
      'Uwaga: to tylko ramka - przejd¼ do <a target=_top href=index_pl.html><span ' +
      'style="font-size:14pt;line-height:18pt;text-decoration:underline;font-weight:bold;color:red;background-color:black">strony ' +
      'g³ównej</span></a>.</p>'
    );
  else if (jezyk == "en")
    document.write(
      '<p style="text-align:center;font-size:14pt;line-height:18pt;font-weight:normal;color:red;background-color:black">' +
      'Remark: this is only a frame - go to the <a target=_top href=index_en.html><span ' +
      'style="font-size:14pt;line-height:18pt;text-decoration:underline;font-weight:bold;color:red;background-color:black">main ' +
      'page</span></a>.</p>'
    );
} // OstrzezenieRamkaTekst



function OstrzezenieRamka(jezyk) {

  var waittim = 0;
  var p,k;

  if (
  (self == parent) || 
  (parent.frames[0].name != "tytul") ||
  (parent.frames[1].name != "menu_h") ||
  (parent.frames[2].name != "tekst") ||
  (parent.frames[3].name != "menu_v") ||
  (parent.frames[4].name != "rysunki")
  /* Opera przed wersj¹ 9 nie widzi nazw okien 5 i 6 *//* ||
  (parent.frames[5].name != "prawa") ||
  (parent.frames[6].name != "datownik")
  */
  ) {

    var plik = new String(document.location);

    if (jezyk == "pl") {
      OstrzezenieRamkaTekst("pl");
      OstrzezenieRamkaTekst("en");
    } else if (jezyk == "en") {
      OstrzezenieRamkaTekst("en");
      OstrzezenieRamkaTekst("pl");
    } else  
      document.write(
        '<p style="text-align:center;font-size:14pt;font-weight:normal;color:red;background-color:black">' +
        'Nieznany jezyk: "' + jezyk +
        '" ...</p>'
      );
      
  } // if ()

} // OstrzezenieRamka



function Naglowek(jezyk) {

  OstrzezenieRamka(jezyk);
  
} // Naglowek



function RamkiTekstPrawa(tekst_p,prawa_p) {
  parent.tekst.location.href=tekst_p;
  parent.prawa.location.href=prawa_p;
} // RamkiTekstPrawa


