var rozsekaneCookies=document.cookie.split("; ");
poleCookies1= new Array;
 for (i=0; i<rozsekaneCookies.length; i++) {
    poleCookies1[(rozsekaneCookies[i].split("=")[0])] = rozsekaneCookies[i].split("=")[1];
 }

function vratKuki(jmeno){
 hodnota=poleCookies1[jmeno];
 if (hodnota==null) hodnota="";
 hodnota=unescape(hodnota);
 return hodnota; 
}

 CelkemKc=vratKuki("k1"); 
 CelkemMn=vratKuki("k2"); 
 Popis=vratKuki("k3");
 
 if (Popis == "1")
    document.write('<link rel="stylesheet" type="text/css" href="styleb.css">');// CSS bez
  else 
   document.write('<link rel="stylesheet" type="text/css" href="style.css">');// CSS s popisem
   
function vzhled()
{
//document.nastaveni.zobrazeni.selectedIndex = Popis;
if (document.nastaveni.zobrazeni != null)
   {
     if (Popis == "1")
        document.nastaveni.zobrazeni[1].checked = true;
    else    
       document.nastaveni.zobrazeni[0].checked = true;
   }
}
function nastav()
{
  var zapis="";
  for (var k=0;k<document.nastaveni.zobrazeni.length;k++) if (document.nastaveni.zobrazeni[k].checked)  zapis=document.nastaveni.zobrazeni[k].value;
  //zapis=document.nastaveni.zobrazeni.selectedIndex;
  var d=document;
  var vyprs=new Date();
  vyprs.setDate(vyprs.getDate()+ 1);
  exp=vyprs.toGMTString();
  d.cookie="k3="+escape(zapis)+"; expires="+exp+";";
  location.reload();
}


