//rocniky monitoringu

function monJedenRok(Velikost,Trida)
{
 if (typeof Velikost!="string"){Velikost="x";}
 if (typeof Trida!="string"){Trida="sipka";}
 monSeznVytvor(menNactene(monSezn,""),Velikost,[Trida],[],[false],true,false)
}

function monVypis()
{
 document.write("<img src="+PasCz+" border=0 width=100% height=2 />")
 document.write("<h5>Monitoring tisku v roce "+monRok+"</h5>");
 monJedenRok(0,"");
 document.write("<h5>Monitoring tisku v dalších letech </h5>");
 seznVytvor(menNactene(monRokySeznam,""),"",[],["Monitoring tisku o pohřebnictví - "],[false])
}

function monHlava(typStr)
{
 hlava(typStr);
 document.write("<div id=obsah>");
 document.write("<h5><a href='monitor.htm'> Monitoring "+monRok+"</a></h4>")
 document.write("<h1>"+TitulStranky+"</h1>");
}

function monKonec()
{
 monVypis();
 konec();
}

function monSeznVytvor(pole,obal,styly,textyKonst,vypisyBub,vypisyMes,vypisyRok)
{
//pole...strukturovane pole seznamu: [0] Text, [1] Adresa, [2] Bublina, [3] ID
//obal...zvetseni textu - treba H3
//styly...pole nazvu stylu
//texty...(pole urovni) konstantni texty pred [0]
//vypisyBub...(true nebo false pole urovni) vypsat bublinu [2] jako text pod [0]
//vypisyMes...(true nebo false) ma-li se vypisovat mesic
//vypisyRok...(true nebo false) ma-li se vypisovat ROK

 var tt="";
 var pocPol=4; 
 var pod=false; //existence podmenu
 var uroven=(""+pole[0][3]).length;
 var bub=vypisyBub[uroven-1] //text pod polozkou
 if (typeof bub!="boolean"){bub=false;}
 var me=false, ro=false; //povoleni zobrazovani mesice, roku
 var meC=0, roC=0; //posledni cislo mesice, roku
 if (typeof vypisyMes=="boolean"){me=vypisyMes;}
 if (typeof vypisyRok=="boolean"){ro=vypisyRok;}
 var st=styly[uroven-1] //jmeno stylu
 if (typeof st!="string"){st="";}
 var t=textyKonst[uroven-1] //jmeno stylu
 if (typeof t!="string"){t="";}
 if (typeof obal!="string"){obal="";};
 var zvets=((obal!="")&&(uroven==1));

 if (zvets){document.write("<"+obal+">")};
 var lomI=pole[0][1].lastIndexOf("/");
 for (var i=0;i<pole.length;i++) 
 {
  pod=(pole[i].length>pocPol);
  if (ro)
  {
   if (roC!=(pole[i][1].substring(lomI-4,lomI))*1)
   {
    if (roC!=0){document.write("</ul>");}
    roC=(pole[i][1].substring(lomI-4,lomI)*1);
    meC=0;
    document.write("<p class='vyraz1'>"+roC+"</p>");
   }
  }
  if (me)
  {
   if (meC!=(pole[i][1].substring(lomI+3,lomI+5))*1)
   {
    if (meC!=0)
    {
     document.write("</ul>");
     if (st!=""&&!ro){document.write("<p>&nbsp;</p>");}
    }
    meC=(pole[i][1].substring(lomI+3,lomI+5)*1);
    document.write("<p class='vyraz2'>"+MesicArray[meC-1]+"</p>");
    document.write("<ul class='"+st+"'>");
   }
  }
  document.write("<li>");
  if (pole[i][1]!="")
  {
   tt="<A href='"+pole[i][1]+"' title='"+odstranTagy(pole[i][2])+"' name='"+pole[i][3]+"' >";
   document.write(tt);
   
  };
  document.write(t+" "+pole[i][0]);
  if (pole[i][1]!=""){document.write("</a>");}
  if (bub){document.write("<br />"+pole[i][2]);}
  document.write("</li>");
  if (pod) {seznVytvor(pole[i][pocPol],obal,styly,texty);}
 }
 document.write("</ul>");
 if (zvets){document.write("</"+obal+">")};
} //konec seznVytvor

