
function Zpet() {
  history.back(1);
}

/* -------------------------------------------  */
function Okno(obrazek, text) {
  nove_okno=window.open ("", "FOTKA", 
  "toolbar=no, location=no, directories=no, "+
  "status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, "+
  "width=700, height=550, top=5, left=5");

  with (nove_okno) {
    document.write('<HTML>\n<TITLE>Velka fotka</TITLE>\n<BODY>\n');
    document.write('<style type="text/css"> \n H3 {font-family: "arial ce","arial","sans-serif"}\n </style>\n');


    document.write('<div align="center">\n');
    document.write('<h3>' + text + '</h3>\n');
    document.write('<IMG SRC="' + obrazek + '" onmouseout="window.close()">\n');
    document.write('</div>\n');
    document.write('</BODY>'); 
  }
}
  
/* -------------------------------------------  */

function Fotkovac(cesta, sloupce, predp, smaz) {
//sloupce - pocet kykreslenych sloupcu
//predp - predpona souboru s nahledem
//smaz - pocet umazanych znaku z kraje souboru pri prepisovani nazvu a popisu (parametr "X" ve fci Pridej)
  this.poc = 0;
  this.cesta = cesta;
  this.sloupce = sloupce;
  this.predp = predp;
  this.smaz=smaz;
  this.soubory = new Array();
  this.nazvy = new Array();
  this.popisy = new Array();
  
// je-li nazev nebo popis "X" tak prepisuje soubor 
// je-li popis "XX" tak prepisuje nazev
  this.Pridej = function (soubor, nazev, popis) { 
    this.poc++
    this.soubory[this.poc] = soubor;
    if (nazev=="X") this.nazvy[this.poc] = soubor.substring(this.smaz, soubor.lastIndexOf("."));
      else this.nazvy[this.poc] = nazev;
    if (popis=="X") this.popisy[this.poc] = soubor.substring(this.smaz, soubor.lastIndexOf("."));
      else if (popis=="XX") this.popisy[this.poc] = nazev;
           else this.popisy[this.poc] = popis;
  }

  this.Kresli = function() {
      var TXT;
      TXT = '<div align="center">'
      TXT+= '<table border="0" class="nahledy" cellspacing="3" cellpadding="3">';
      for (var pos=1; pos<=this.poc; pos+=this.sloupce) {
        for (var i=0; i<this.sloupce; i++) {
          if (i==0) TXT+= '<tr>';
          if ((i+pos)<=this.poc) {
            TXT+= '<td class="nahl"><a class="hyp" href="javascript:Okno(\'';
            TXT+= this.cesta + this.soubory[pos+i] + '\', \'' + this.popisy[pos+i] + '\')">';
            TXT+= '<img border="1" src="' + this.cesta + this.predp + this.soubory[pos+i] + '"';
            TXT+= 'alt="' + this.popisy[pos+i] + '"><br>';
            TXT+= this.nazvy[pos+i];
            TXT+= '</a></td>';
          } else {
            TXT+= '<td>&nbsp;</td>';
          }
          if (i==(this.sloupce-1)) TXT+= '</tr>';
        }
      }
      TXT+= '</table></div>';
      document.write(TXT);    
  }
}



/* -------------------------------------------  */

function Titul1(nadpis) {
      var TXT;
      TXT= '<table border="0" class="zahlavi" width="100%" height="60" cellspacing="0" cellpadding="0">';
      TXT+= '<tr>';
      TXT+= '<td height="60" background="../../0images/zahl_obl.gif">' + nadpis + '</td>';
      TXT+= '<td height="60" width="205" background="../../0images/zahl_ols.gif">' + '&nbsp;' + '</td>';
      TXT+= '</tr>';          
      TXT+= '</table>';
      document.write(TXT);    
}  


function Zapati1(datum) {
      var TXT;
      TXT = '<div class="ctr">';
      TXT+= '<hr class="zapati" size="1">';
      TXT+= '<table border="0" class="zapati" cellspacing="0" cellpadding="0">';
      TXT+= '<tr>';
      TXT+= '<td class="zapatiakt" width="50%"> Poslední aktualizace: ' + datum + '</td>';
      TXT+= '<td class="zapatihyp" width="50%">';
      TXT+= '<a target="_self" class="zapatihyp" href="#ZAC">Nahoru</a></td>';
      TXT+= '</tr>';          
      TXT+= '</table></div>';
      document.write(TXT);    
}  


/* -------------------------------------------  */
