function menu_omnout (prvek, soubor, actual) {
  if (soubor == actual) {
    prvek.className = 'bgtoplinks_full';
  }
  else {
    prvek.className = 'bgtoplinks_empty';
  }
}
function menu_omnover (prvek, soubor, actual) {
  //alert(prvek.className);
  if (soubor == actual) {
    prvek.className = 'bgtoplinks_full';
  }
  else {
    prvek.className = 'bgtoplinks_over';
  }
}

function menu2_omnout (prvek, soubor, actual) {
  if (soubor == actual) {
    prvek.className = 'ousko-act';
  }
  else {
    prvek.className = 'ousko';
  }
}
function  menu2_omnover (prvek, soubor, actual) {
  prvek.className = 'ousko-over';
}

function change_kopecky(th) {
  var obr_kopce = document.getElementById('podklad2');
  if (th.checked) {
    obr_kopce.style.visibility = 'visible';
  }
  else {
    obr_kopce.style.visibility = 'hidden';
  }
}

function pokus() {
  var svit = document.getElementById('podklad_mesto_popis');
  svit.style.background = 'url(http://www.reka-labe.cz/images/maps/mesta/kolin.png) no-repeat left top';
}

function barva_zmen_over(val) {
  //alert(val);
  var vedlobr = document.getElementById('vedlobr');
  var hlavniobr = document.getElementById('hlavniobr');
  vedlobr.src = 'http://www.reka-labe.cz/images/maps/podklad1.png';
  hlavniobr.src = 'http://www.reka-labe.cz/images/maps/useky/'+val+'.png';
  vedlobr.style.zIndex = '-5';
  hlavniobr.style.zIndex = '5';
  vedlobr.style.left = '1px';
  vedlobr.style.top = '-571px';
  vedlobr.style.position="relative";
  //vedlobr.style.border = '1px';
}

function barva_zmen_out(val) {
  //alert(val);
  var vedlobr = document.getElementById('vedlobr');
  var hlavniobr = document.getElementById('hlavniobr');
  hlavniobr.src = 'http://www.reka-labe.cz/images/maps/podklad1.png';
  vedlobr.src = '';
  hlavniobr.style.zIndex = '-5';
  vedlobr.style.zIndex = '5';
}

function hlasovani(id_anketa, hlas) {
  //alert(id_anketa);
  //alert(hlas);
  jQ.post('http://www.reka-labe.cz/obsluha/jsq.php', {ident: 'anketa_hlasuj', param1: id_anketa, param2: hlas}, function(retval) {
    //alert(retval);
    var pole1 = retval.split(';;;');
    if (pole1[1]) {
      //alert(pole1[1]);
      var pole2 = pole1[1].split('###');
      //alert(pole2.length);
      if (pole2) {
        for (var i=0; i<pole2.length; i++) {
          var lista = document.getElementById('HLA_'+i);
          lista.style.width = pole2[i]+'%';
          //jQ('#HLA_'+i).style("width:"+pole2[i]+"%");
          jQ('#PRC_'+i).text(pole2[i]);
        }
      }
    }
    jQ('#ANKETA_ZPRAVA').text(pole1[0]);
  });
}

