function kontrola(formular) {

  if (formular.message.value=="") {
    alert("Musíte vyplnit vzkaz!");
    formular.message.focus();
    return false;
  }
  else if (formular.odesilatel.value!="")
  {
	  if (window.RegExp) {
    re = new RegExp("^[^@]+@[^.]+\..+$");
    if (!re.test(formular.odesilatel.value)) {
      alert("Zadaná adresa není správnou adresou elektronické pošty!");
      formular.odesilatel.focus();
      return false;
    }
  }
  }

  else {
    return true;
  }
}

function openWindow() {
    newwin=window.open('','okno','menubar=0,location=0,scrollbars=no,width=425,height=510,resizable=1,top=0');
}

  function testSubmit(form) {
  
  if (form.jmeno.value == "")
     alert("Musíte zadat jméno !");
  else if (form.email.value == "")
     alert("Musíte zadat e-mail !");
  else if (form.dotaz.value == "")
     alert("Musíte zadat dotaz !");     
  else
        form.submit();
  }
  
  function zmenaDat(form) {

   if (form.varianta[0].checked) {
       form.origmaxwidth.value=280
       form.origmaxheight.value=400
       form.thumbmaxwidth.value=170
       form.thumbmaxheight.value=110
   }
   else if (form.varianta[1].checked) {
          form.origmaxwidth.value=500
          form.origmaxheight.value=500
          form.thumbmaxwidth.value=160
          form.thumbmaxheight.value=102
   }
  }
  

function onImageA() {   document.fresh.src = "images/gel-fresh-over.jpg"; }
function offImageA() {  document.fresh.src = "images/gel-fresh.jpg"; }
function onImageB() {   document.delicate.src = "images/gel-delicate-over.jpg";}
function offImageB() {  document.delicate.src = "images/gel-delicate.jpg";}
function onImageC() {   document.antibacterial.src = "images/gel-antibacterial-over.jpg"; }
function offImageC() {  document.antibacterial.src = "images/gel-antibacterial.jpg"; }
function onImageD() {   document.fresh1.src = "images/ubrousky-fresh-over.jpg"; }
function offImageD() {  document.fresh1.src = "images/ubrousky-fresh.jpg"; }
function onImageE() {   document.delicate1.src = "images/ubrousky-delicate-over.jpg"; }
function offImageE() {  document.delicate1.src = "images/ubrousky-delicate.jpg"; }
function onImageF() {   document.antibacterial1.src = "images/ubrousky-antibacterial-over.jpg";}
function offImageF() {  document.antibacterial1.src = "images/ubrousky-antibacterial.jpg";}
function onImageG() {   document.hydratacni.src = "images/gel-hydratacni-over.jpg";}
function offImageG() {  document.hydratacni.src = "images/gel-hydratacni.jpg";}

