<!--
function outof(url)
{
  wasOpen = false;
  win = window.open(url);    
  return (typeof(win) == 'object') ? true : false;
}
function dotazy_val(formular, lg)
{
  chybky = "";
  if (window.RegExp) {
    re = new RegExp("^[^@\. ]([\.]?[^@\. ]+)*@([^@\. ]+[\.]{1}[^@\. ]+)+$");
    if (!re.test(formular.q_email.value)) {
      chybky = chybky + (lg == "en" ? "Invalid e-mail address!" : "Neplatná e-mailová adresa") + "\n";
    }
  }
  if (formular.q_text.value == "") {
    chybky = chybky + (lg == "en" ? "You should write some comment..." : "Napište nějaký vzkaz...") + "\n";
  }
  if (chybky == "") {
    return true;
  } else {
    alert(chybky);
    return false;
  }
}
function pokoj_val(pokoj, pmin, pmax, lq)
{
  if (isNaN(pokoj.value) || (parseInt(pokoj.value) < pmin) || (parseInt(pokoj.value) > pmax)) {
    alert(lg == "en" ? ("Number of rooms should be between " + pmin + " and " + pmax) : ("Počet pokojů musí být mezi " + pmin + " a " + pmax));
    return false;
  }
}
function rezervace_val(formular, lg)
{
  chybky = "";
  if (isNaN(formular.q_2l.value) || isNaN(formular.q_3l.value) || isNaN(formular.q_4l.value)) {
    chybky = chybky + (lg == "en" ? "Nuber of rooms should be a number..." : "Počet pokojů musí být numerický...") + "\n";
  } else {
    if (parseInt(formular.q_2l.value) + parseInt(formular.q_3l.value) + parseInt(formular.q_4l.value) <= 0) {
      chybky = chybky + (lg == "en" ? "You should order at least one room..." : "Objednejte alespoň jeden pokoj...") + "\n";
    }
  }
  if (isNaN(formular.q_osob.value) || (parseInt(formular.q_osob.value) <= 0)) {
    chybky = chybky + (lg == "en" ? "Number of persons should be greater than zero..." : "Počet osob nesmí být nulový...") + "\n";
  }
  pom = datum_val(formular.q_prijezd, lg);
  chybky = chybky + pom;
  if (isNaN(formular.q_noci.value) || (parseInt(formular.q_noci.value) <= 0)) {
    chybky = chybky + (lg == "en" ? "Number of nights should be greater than zero..." : "Počet nocí nesmí být nulový...") + "\n";
  }
  if (formular.q_jmeno.value == "") {
    chybky = chybky + (lg == "en" ? "Name is required..." : "Jméno je povinný údaj...") + "\n";
  }
  if (window.RegExp) {
    re = new RegExp("^[^@\. ]([\.]?[^@\. ]+)*@([^@\. ]+[\.]{1}[^@\. ]+)+$");
    if (!re.test(formular.q_email.value))
    {
      chybky = chybky + (lg == "en" ? "Invalid e-mail address!" : "Neplatná e-mailová adresa") + "\n";
    }
  }
  if (formular.q_tel.value == "") {
    chybky = chybky + (lg == "en" ? "Phone number is required..." : "Telefonní číslo je povinný údaj...") + "\n";
  }
  if (chybky == "") {
    return true;
  } else {
    alert(chybky);
    return false;
  }
}
function datum_val(vstup, lg)
{
  var text, index, tecka, den, mesic, rok, ch, chtecka;
  text="";
  den="";
  mesic="";
  rok="";
  tecka=0;
  chtecka = (lg == "en" ? "/" : ".");
  for (index = 0; index < vstup.value.length; index++) {
    ch = vstup.value.charAt(index);
    //jhgjk jkash djksh s kdjs
    if (ch != "0" && ch != "1" && ch != "2" && ch != "3" && ch != "4" && ch != "5" && ch != "6" && ch != "7" && ch != "8" && ch != "9" && ch != chtecka) {
      text = text + (lg == "en" ? "Date should be in format MM/DD/YY..." : "Datum musí být ve formátu DD.MM.RR") + "\n";
      break;
    }
    if ((ch == "0" || ch == "1" || ch == "2" || ch == "3" || ch == "4" || ch == "5" || ch == "6" || ch == "7" || ch == "8" || ch == "9") && (text =="")) {
      if (tecka == 0) {
        if (lg == "en") {
	  mesic=mesic + ch;
	} else {
          den=den + ch;
	}
      }
      if (tecka == 1) {
        if (lg == "en") {
          den=den + ch;
	} else {
          mesic=mesic + ch;
	}
      }
      if (tecka == 2) {
        rok=rok + ch;
      }
    }
    if (ch == chtecka && text == "") {
      if (tecka >= 2) {tecka=3}
      if (tecka == 1) {tecka=2}
      if (tecka == 0) {tecka=1}
    }	
  }
  if (parseInt(rok) < 1000) {
    rok = "20"+rok;
  }
  if ((tecka != 2) && (text == "")) {
    text=(lg == "en" ? "Date should be in format MM/DD/YY..." : "Datum musí být ve formátu DD.MM.RR") + "\n";
  }
  if ((den<1 || den>31) && (text == "")) {
    text=text + (lg == "en" ? "Number of days should be 1-31..." : "Počet dní v měsící musí být 1-31...") + "\n";
  }
  if ((mesic<1 || mesic>12) && (text == "")) {
    text=text + (lg == "en" ? "Number of months should be 1-12..." : "Měsíc musí být 1-12...") + "\n";
  }
  if (rok<2002 && text == "") {
    text=text + (lg == "en" ? "Year should be greater than 2002..." : "Rok musí být větší než 2002") + "\n";
  }
  if (mesic == 2) {
    if (rok != "") {
      if (rok % 4 == 0) {
	if (den>29) {
	  text=text + (lg == "en" ? "In February "+rok+" is only 29 days..." : "V únoru "+rok+" je pouze 29 dní...") + "\n";
	}
      }	else {
	if (den>28) {
	  text=text + (lg == "en" ? "In February "+rok+" is only 29 days..." : "V únoru "+rok+" je pouze 28 dní...") + "\n";
	}
      }
    } else {
      if (den>29) {
	text=text + (lg == "en" ? "In February there is max. 29 days..." : "V únoru je max. 29 dní...") + "\n";
      }
    }
  }
  if ((mesic == 4 || mesic == 6 || mesic == 9 || mesic == 11) && (den>30)) {
    text=text + (lg == "en" ? "No. of days in selected month should be 1-30..." : "Ve vybraném měsíci je max. 30 dní...") + "\n";
  }
  return text;
}
-->

