function hl(what){
  what.className = "underline cursor";
}

function dl(what){
  what.className = "nounderline nocursor";
}

function lh(where){
  window.location = where;
}

function lhaskcz(where){
  var otazka = "Opravdu chcete opustit E-shop bez odhlášení?";
  if(confirm(otazka)) window.location = where;
}

function lhasken(where){
  var otazka = "Do you really want to exit E-shop without logging out?";
  if(confirm(otazka)) window.location = where;
}

function basket_add(otazka, produkt, lang){
  var count = window.prompt(otazka, "1");
  if(count == null) return;
  else window.location = "?kat=289&lang=" + lang + "&prodid=" + produkt + "&count=" + count + "&act=add";
}

function basket_edit(otazka, produkt, lang, count){
  var count = window.prompt(otazka, count);
  if(count == null) return;
  else if(count == 0) window.location = "?kat=289&lang=" + lang + "&prodid=" + produkt + "&act=drop";
  else window.location = "?kat=289&lang=" + lang + "&prodid=" + produkt + "&count=" + count + "&act=edit";
}

function basket_drop(otazka, produkt, lang){
  if(confirm(otazka)) window.location = "?kat=289&lang=" + lang + "&prodid=" + produkt + "&act=drop";
}

function show(kat){
  var podmenu;
  if (podmenu = document.getElementById("sub"+kat)) {
    var visible = (podmenu.style.display!='none');
    var imgname = 'img'+kat;
    if(visible){
      podmenu.style.display='none';
    } else {
      podmenu.style.display='block';
    }

    if (podmenu = document.getElementById(imgname)) {
      if (uroven > 0) barva = "000000";
      else            barva = "FFFFFF";
      if(visible)     podmenu.src='img/plus'+barva+'.gif';
      else            podmenu.src='img/minus'+barva+'.gif';
    }
  }
  return false;
}

function letborder(what){
  what.style.border="1px solid red";
}

function unborder(what){
  what.style.border="1px solid white";
}

function unbordercl(what, bordercolor){
  what.style.border="1px solid " + bordercolor;
}


function poptat(produkt, lang){
  x = 640/2
  y = 480/2;

  if (screen) {
      y = screen.availHeight/2 - y;
      x = screen.availWidth/2 - x;
  }
  window.open("inquire.php?produkt="+produkt+"&lang="+lang, "_blank", "width=640,height=480,menubar=no,dialog=1,resizable=no,scrollbars=no,status=0,location=0,top="+y+",left="+x)
}

function slideshow(galleryid, lang){
  x = 640/2
  y = 480/2;

  if (screen) {
      y = screen.availHeight/2 - y;
      x = screen.availWidth/2 - x;
  }
  window.open("slideshow.php?id="+galleryid+"&lang="+lang, "_blank", "width=640,height=480,menubar=no,dialog=1,resizable=no,scrollbars=no,status=0,location=0,top="+y+",left="+x)
}

function poptat_eshop(produkt, lang){
  x = 640/2
  y = 480/2;

  if (screen) {
      y = screen.availHeight/2 - y;
      x = screen.availWidth/2 - x;
  }
  window.open("../inquire.php?produkt="+produkt+"&lang="+lang+"&comment=From E-shop", "_blank", "width=640,height=480,menubar=no,dialog=1,resizable=no,scrollbars=no,status=0,location=0,top="+y+",left="+x)
}


