
var time=1;
var ct = new Array(2);
var cas = 600; //kolko milisekund bude drzat menu
var openedSmenu=''; //ktore submenu bolo otvorene pred zmenami
function ShowID(paCo){
  var oCo = document.getElementById(paCo);
  clearTimeout(ct[paCo]);
  if (oCo.style.display == "none"){
    oCo.style.display = "block";
  }
  time=1;
  return false;
}

function HideID(paCo,paForce){
  var oCo = document.getElementById(paCo);
  if(paForce){
    oCo.style.display = "none";
  }else{
    if(time==1){
      ct[paCo]=window.setTimeout("HideID('"+paCo+"')", cas);
      time=0;
    } else {
      time=1;
      oCo.style.display = "none";
      //open old menu
      if(openedSmenu != ''){
      	var oldCo = document.getElementById(openedSmenu);
      	oldCo.style.display = "block";
      }
    }
  }
  return false;
}


function makeMenoMail(paFrom,paTo){
  window.document.getElementById(paTo).innerHTML = window.document.getElementById(paFrom).value;
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}
function alertCookie(pName){
  alert(getCookie(pName));
  //alert(document.cookie);
}

