function otevri(stranka) {
  if(stranka=="kontakt") {
    msg=window.open("kontakt.php","kontakt","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=380,height=490,top=0,left=0");
  }
  else {
    if(stranka=="podminky") {
      msg=window.open("obchod_podminky.php","podminky","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=460,height=460,top=0,left=0");
    }
    else {
      if(stranka=="podminky_gen") {
        msg=window.open("obchod_podminky_gen.php","podminky","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=460,height=460,top=0,left=0");
      }
      else {
        if(stranka=="bodiky") {
          msg=window.open("info_body.php","bodiky","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=460,height=460,top=0,left=0");
        }
        else {
          msg=window.open(stranka,"detail","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=510,height=410,top=0,left=0");
          msg.focus();
        }
      }
    }
  }
}
function otevri_obalka(x,y,z) {
    msg=window.open(x, 'obalka', 'toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=yes,status=no,width='+y+',height='+z+',top=0,left=0')
    msg.focus();
}
function otevri_help(stranka) {
  msg=window.open(stranka, "help", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=460,height=460,top=0,left=0");
  msg.focus();
}
function otevri_dopravne(stranka) {
  msg=window.open(stranka, "dopravne", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=360,height=380,top=0,left=0");
  msg.focus();
}
function otevri_info(stranka) {
  msg=window.open(stranka, "info", "toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=700,height=500,top=0,left=0");
  msg.focus();
}
function otevri_send_psw(stranka) {
  msg=window.open(stranka,"send_psw","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=450,height=330,top=0,left=0");
  msg.focus();
}
function potvrd_unlog() {        
  if (confirm("Opravdu se chcete odhlásit?\nOdhlášením se vyprázdní i Váš košík.\n\nKliknutím na tlačítko \"OK\" odhlášení potvrdíte")==false) {
  return false;
  }
}
function bezuvozovek() {
  with (event)
   if(keyCode==34 || keyCode==39){
   alert ("Bez úvozovek!");
   returnValue=false;
   }
}
function jencisla() {
  with (event)
   if(keyCode<48 || keyCode>57){
   alert ("Volte pouze čísla!");
   returnValue=false;
   }
   }
function jencislakosik(e) {
  if(!e) var e = window.event;
  with(e)
  if (e.keyCode) {
      key = e.keyCode;
   }
   else {
      key = e.which;
   }
   //alert(key);
   if((key<48 || key>57) && key!=8 && key!=37 && key!=38 && key!=40 && key!=13){
     alert ("Jako množství je možno zadat pouze celé číslo");
     return false;
   }
   else {
     return true;
   }
}   
function potvrd()
{        if (confirm("Opravdu chcete tuto položku odstranit z nákupního košíku?")==false) {
return false;
}
}
function potvrd_sprava()
{        if (confirm("Opravdu chcete položky v této objednávce nahradit položkami z Vašeho košíku?\nKliknutím na tlačítko \"OK\" nahrazení potvrdíte.")==false) {
return false;
}
}
function ukaz_detail(x,y) {
  if(!document.getElementById && document.all) document.getElementById = document.all;
  document.getElementById(x).style.display="block";
  document.getElementById(y).style.display="none";
}
function skryj(x,y) {
  if(!document.getElementById && document.all) document.getElementById = document.all;
  document.getElementById(x).style.display="none";
}
function potvrd_objednavka() {
  if (confirm("Opravdu chcete Vaši objednávku odeslat?")==false) {
   return false;
  }
}
