function start()
{
document.getElementById("login").focus();

}


function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function frm_dett(id)
{
   if (id.value=="HLEDAT ...")
   {
   id.value="";
   }
   else
   {

      if (id.value=="")
      {
      id.value="HLEDAT ...";
      }

   }
}


function vyber_kam(id)
{

if (document.getElementById(id).style.display=="none")
{
     if (navigator.appName=="Microsoft Internet Explorer")
     {
        document.getElementById(id).style.display="inline";
     }
     else
     {
        document.getElementById(id).style.display="table-row";
     }
}
else
{
document.getElementById(id).style.display="none";
}


return false;


}

function vyber_kam2(id)
{

if (document.getElementById(id).style.display=="none")
{

    document.getElementById(id).style.display="block";

}
else
{
document.getElementById(id).style.display="none";
}


return false;


}

function odk_obj_det(link)
{
window.location.href=link;
}




function open_log_new_window(rezim,onlyip)
{



 okno_vyska=screen.height;
 okno_sirka=screen.width;

 window.open("pristupy-na-server.php?rezim="+rezim+"&onlyip="+onlyip+"&allwindow=true&reload=15&maxitem=100", "Pohybnaserveru", "width="+okno_sirka+", height="+okno_vyska+",scrollbars=yes");

}


function okno4obrazek(adresa,sirka,vyska)
{



window.open("max_obr.php?adr="+adresa, "obr", "resizable=no,width="+sirka+",height="+vyska);


}


function change_pstyle(server,stranka,mat,ppp,pstyle,ap,pgtl,pg)
{

     ind=document.getElementById("select_pstyle").selectedIndex;
     ind++;
     window.location.href=server+stranka+"?pgtl="+pgtl+"&pg="+pg+"&mat="+mat+"&ppp="+ppp+"&ap="+ap+"&pstyle="+ind;


}

function change_ppp(server,stranka,mat,ppp,pstyle,ap,pgtl,pg)
{

     ind=document.getElementById("select_ppp").selectedIndex;
     new_ppp=document.getElementById("select_ppp").options[ind].value;
     window.location.href=server+stranka+"?pgtl="+pgtl+"&pg="+pg+"&mat="+mat+"&ppp="+new_ppp+"&ap="+ap+"&pstyle="+pstyle;


}
function change_mat(server,stranka,mat,ppp,pstyle,ap,pgtl,pg)
{

     ind=document.getElementById("select_mat").selectedIndex;
     new_mat=document.getElementById("select_mat").options[ind].value;

     window.location.href=server+stranka+"?pgtl="+pgtl+"&pg="+pg+"&mat="+new_mat+"&ppp="+ppp+"&ap="+ap+"&pstyle="+pstyle;


}

function open_win(stranka,sirka,vyska)
{
pos_vyska=screen.height;
pos_sirka=screen.width;

top=(pos_vyska/2)-(vyska/2);
left=(pos_sirka/2)-(sirka/2);

window.open(stranka, "new_win", "width="+sirka+", height="+vyska+",top="+top+",left="+left+",resizable=no");

}


