function ShowFoto (Img, W, H, Alt){
        // Zjistí rozli‘ení monitoru (velikost obrazovky)
        var Browser = navigator.appName;
        var Version = parseInt(navigator.appVersion);
        if ((Browser == "Netscape" & Version >= 4) ||
            (Browser == "Microsoft Internet Explorer" & Version >= 4)){
          ScrH = screen.height;
          ScrW = screen.width;
        } else {
          ScrH = 0;
          ScrW = 0;
        }

        // Vypočítání správné velikosti a souřadnic pozice nového okna
        var BorderW = 1;
        W += 2*BorderW;
        H += 2*BorderW;
        
        H += 20;

        var Position;
        if ((ScrH > 0) && (ScrW > 0))
          Position = ",left="+(ScrW - W)/2+",top="+(ScrH-H)/2;
        else
          Position = "";

        // Vytvoření nového okna
        var NewWin = window.open("", "Fotografie",
          "toolbar=no,location=no,width="+W+",height="+H+
          ",directories=no,status=no,menubar=no,"+
          "resizable=no,scrollbars=no"+
          Position);

        // Naplnění - zapsání zdrojového kódu nového okna
        with (NewWin.document){
          write("<html><head><title>Foto - kliknutím zavřete"+
                "</title></head>");
          write('<body style="background:#000000; color: #ffffff; font-family: tahoma; font-size:90%; text-align:center;" '+
                ' topmargin="0" leftmargin="0">');
          write('<a href="javascript:close();"><img src="'+Img+
                '" hspace="'+BorderW+'" vspace="'+BorderW+'" alt="'+Alt+'" title="'+Alt+'" border="0" /></a>');
          write('<div>'+Alt+'</div>');
          write("</body></html>");
          close();
        }
      }
      
function AvatarFoto(ID_camp,Nazev,Str) {
  pole = Str.split("-");
  //document.write(pole[0]);
  document.camp_avatar.src='/img/zakladna/'+ID_camp+'/avatar/'+Nazev;
  id_foto.location.href = "/skript/iframe-setavatar.php?avatar="+Str;

}     

function DeleteFoto(Str,base) {
  id_foto.location.href = "/skript/iframe-smazfoto.php?smaz="+Str+"&base="+base;
}     

function TopFotoFrame(Adr) {
  top.location.href = '/admin/nahrej-obrazky/'+Adr+'/';
}
  
function insert_image(frmClanek,druh,nazev,ID,rozmer,popis)
  {
  var oEditor = FCKeditorAPI.GetInstance('data[Popis]');
  var HTML = "<a href=\"/img/" + druh + "/" + ID + "/xxl/" + nazev + "\" rel=\"lightbox\"><img src=\"/img/" + druh + "/" + ID + "/" + rozmer + "/" + nazev + "\" alt=\"" + popis + "\" title=\"" + popis + "\"></a>";
  oEditor.InsertHtml(HTML);
  return false;
  }

/**
 * marks all rows and selects its first checkbox inside the given element
 * the given element is usaly a table or a div containing the table or tables
 *
 * @param    container    DOM element
 */
function markAllRows( container_id ) {
    var rows = document.getElementById(container_id).getElementsByTagName('tr');
    var unique_id;
    var checkbox;

    for ( var i = 0; i < rows.length; i++ ) {

        checkbox = rows[i].getElementsByTagName( 'input' )[0];

        if ( checkbox && checkbox.type == 'checkbox' ) {
            unique_id = checkbox.name + checkbox.value;
            if ( checkbox.disabled == false ) {
                checkbox.checked = true;
                if ( typeof(marked_row[unique_id]) == 'undefined' || !marked_row[unique_id] ) {
                    rows[i].className += ' marked';
                    marked_row[unique_id] = true;
                }
            }
        }
    }

    return true;
}

/**
 * marks all rows and selects its first checkbox inside the given element
 * the given element is usaly a table or a div containing the table or tables
 *
 * @param    container    DOM element
 */
function unMarkAllRows( container_id ) {
    var rows = document.getElementById(container_id).getElementsByTagName('tr');
    var unique_id;
    var checkbox;

    for ( var i = 0; i < rows.length; i++ ) {

        checkbox = rows[i].getElementsByTagName( 'input' )[0];

        if ( checkbox && checkbox.type == 'checkbox' ) {
            unique_id = checkbox.name + checkbox.value;
            checkbox.checked = false;
            rows[i].className = rows[i].className.replace(' marked', '');
            marked_row[unique_id] = false;
        }
    }

    return true;
}


      // -->
