function menu_on(obj){
  el = document.getElementById('av_menu_' + (obj - 1));
  if (el) {
    el.style.backgroundPosition = '0px -32px';
  }
  el = document.getElementById('av_menu_' + (obj + 1));
  if (el) {
    el.style.backgroundPosition = '0px -64px';
  }
}
function menu_off(obj){
  el = document.getElementById('av_menu_' + (obj - 1));
  if (el) {
    el.style.backgroundPosition = '0px 0px';
  }
  el = document.getElementById('av_menu_' + (obj + 1));
  if (el) {
    el.style.backgroundPosition = '0px 0px';
  }
}
function av_setlng(lngId){
  var myhref = location.href;
  var regex = new RegExp("lngid=[0-9]+");

  if(regex.test(myhref)){//prepina zpet, v querystringu uz to je
    myhref = myhref.replace(regex,"lngid=" + lngId);
  } else {
    if(myhref.indexOf("&") >= 0){
      myhref = myhref + "&action=setlng&lngid=" + lngId
    } else {
      myhref = "default.asp?action=setlng&lngid=" + lngId
    }
  }
  location.href = myhref;
}
function av_lm_strid_active(id){
  var idNone, idBlock, el, d
  if(id > 0){
    idNone = 0
    idBlock = 1
    d = new Date(2050, 12, 31)
  }else{
    idNone = 1
    idBlock = 0
    d = new Date(2000, 12, 31)
  }  
  document.cookie = "i6_lm_strid=" + idBlock + "; expires=" + d.toGMTString()
  el = document.getElementById('div_strid_' + idNone)
  if(el){
    if(el.style.display != 'none'){
      el.style.display = 'none'
      document.getElementById('td_strid_' + idNone).style.color = '#27519C'
      //document.getElementById('td_strid_' + idNone).style.textDecoration = 'underline'
    }
  }
  el = document.getElementById('div_strid_' + idBlock)
  if(el){
    if(el.style.display != 'block'){
      el.style.display = 'block'
      document.getElementById('td_strid_' + idBlock).style.color = 'white'
      //document.getElementById('td_strid_' + idBlock).style.textDecoration = 'none'
    }
  }
  if(id > 0){
    document.getElementById('av_cat_prod').style.background = "url('img/av_cat_prod.gif') center -32px no-repeat"
  }else{
    document.getElementById('av_cat_prod').style.background = "url('img/av_cat_prod.gif') center top no-repeat"
  }
}
