<!--
function testOrder(lng) {
  if (isName(lng) && isStreet(lng) && isCity(lng) && isZIP(lng) && isCountry(lng) && isTelefon(lng) && isEmail1(lng) &&isCurrency(lng)) {
    document.forms[0].submit();
    return true;
  }
  return false;
}

function testEmail(lng) {
  if (isEmail(lng)) {
    document.forms[0].submit();
    return true;
  }
  return false;
}

function testForm(lng) {
  if (isMeno(lng) && isEmail(lng)) {
    document.forms[0].submit();
    return true;
  }
  return false;
}

function isMeno(lng) {
  if (document.forms[0].name.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].name.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Your name\" is an obligatory field, please fill it in.');
      document.forms[0].name.focus();
      return false;
    }
  }
  return true;
}

function isName(lng) {
  if (document.forms[0].name.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].name.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Name and surname of contact person\" is an obligatory field, please fill it in.');
      document.forms[0].name.focus();
      return false;
    }
  }
  return true;
}

function isStreet(lng) {
  if (document.forms[0].street.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].street.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Street\" is an obligatory field, please fill it in.');
      document.forms[0].street.focus();
      return false;
    }
  }
  return true;
}

function isCity(lng) {
  if (document.forms[0].city.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].city.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"City\" is an obligatory field, please fill it in.');
      document.forms[0].city.focus();
      return false;
    }
  }
  return true;
}

function isZIP(lng) {
  if (document.forms[0].zip.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].zip.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"ZIP\" is an obligatory field, please fill it in.');
      document.forms[0].zip.focus();
      return false;
    }
  }
  return true;
}

function isCountry(lng) {
  if (document.forms[0].country.value == "") {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].country.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Country\" is an obligatory field, please fill it in.');
      document.forms[0].country.focus();
      return false;
    }
  }
  return true;
}

function isCurrency(lng) {
  if (document.forms[0].currency[0].checked == false && document.forms[0].currency[1].checked == false) {
    if (lng == 'sk') {
      alert('\"Meno a priezvisko\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].currency[0].focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Currency\" is an obligatory field, please choose one.');
      document.forms[0].currency[0].focus();
      return false;
    }
  }
  return true;
}

function isEmail(lng) {
  if (document.forms[0].email.value == "") {
    if (lng == 'sk') {
      alert('\"E-mail\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].email.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Your e-mail address\" is an obligatory field, please fill it in.');
      document.forms[0].email.focus();
      return false;
    }
  }
  return true;
}

function isEmail1(lng) {
  if (document.forms[0].email.value == "") {
    if (lng == 'sk') {
      alert('\"E-mail\" je povinné pole, vyplňte ho prosím.');
      document.forms[0].email.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"E-mail\" is an obligatory field, please fill it in.');
      document.forms[0].email.focus();
      return false;
    }
  }
  return true;
}

function isTelefon(lng) {
  if (document.forms[0].telephone.value == "") {
    if (lng == 'sk') {
      alert('\"Telefón\" je povinné pole, vyplňte ho prosím');
      document.forms[0].telephone.focus();
      return false;
    }
    if (lng == 'en') {
      alert('\"Phone\" is an obligatory field, please fill it in.');
      document.forms[0].telephone.focus();
      return false;
    }
  }
  return true;
}

function winOpen(obr, alt, href, lng) {
  newWindow=window.open("/galeria.php?obr="+obr+"&alt="+alt+"&href="+href+"&lng="+lng,"subWin","width=1,height=1");
  newWindow.focus();
}

function httpWinOpen(newUrl) {
  newWindow=window.open(newUrl, "subWin");
} 
//-->

