var sifrovano = false;
function secure() 
{
if(sifrovano)
  {
    document.getElementById('inp1').style.backgroundColor='#FFFFFF';
    document.getElementById('inp1').style.color='#000000';
    document.getElementById('inp2').style.backgroundColor='#FFFFFF';    
    document.getElementById('inp2').style.color='#000000';
    document.getElementById('sifrobr').style.display='none';    
    document.getElementById('securehlaska').firstChild.data='Zapnout SSL';
    document.getElementById('securehlaska').style.color='#3B4CBF';
    document.getElementById('prihlaseni').style.color='#2B3CAF';
    document.getElementById('prihlaseni').action='http://www.inet24.cz/zakaznik/';
    document.getElementById('odksec').style.borderColor='#FFC1BF';
    document.getElementById('odksec').style.backgroundColor='#FFE0DF';
    document.getElementById('securehlaska').style.color='#CF2A26';
    document.getElementById('odksec').style.backgroundColor='#ffffff';    
    document.getElementById('odksec').style.borderColor='#ffffff';
    sifrovano = false;
  }
  else
  {
    document.getElementById('inp1').style.backgroundColor='#F5F6BE';
    document.getElementById('inp1').style.color='#CF2A26';
    document.getElementById('inp2').style.backgroundColor='#F5F6BE';
    document.getElementById('inp2').style.color='#CF2A26';
    document.getElementById('sifrobr').style.display='inline';
    document.getElementById('securehlaska').firstChild.data='Vypnout SSL';
    document.getElementById('securehlaska').style.color='#CF2A26';
    document.getElementById('prihlaseni').style.color='#CF2A26';        
    document.getElementById('prihlaseni').action='https://www.inet24.cz/zakaznik/';
    document.getElementById('odksec').style.borderColor='#BFC9FF';
    document.getElementById('odksec').style.backgroundColor='#DFE3FF';
    document.getElementById('securehlaska').style.color='#3B4CBF';
    sifrovano = true;
  }
}

var myTWin = window.myTWin;

function OpenMyWin(link,winName)
{
  var retValue=true;
  if (myTWin!=null && !myTWin.closed)
  {
    myTWin.focus();
    myTWin.location.href=link.href;
  }
  else
  {
    myTWin=window.open(link.href,winName);
    if (myTWin==null || typeof(myTWin)=="undefined")
      retValue=false;
    else
    {
      link.target=winName;
      myTWin.focus();
    }
  }
  return retValue;
}

function ukazdetail(id) 
{
    if(document.getElementById(id).style.display=='')
    {
      document.getElementById(id).style.display='none';
    }
    else
    {
      document.getElementById(id).style.display='';
    }
}

function func_confirm(url)
 {
   if (confirm("Opravdu vymazat ?")) location.href = url;
 }

// Vraci nahodne cislo x, kde 0<=x<num
function randNum (num) {
var rnd1 = Math.round( (num-1) * Math.random() )
    return rnd1;
}

