var activeImage;
    
function showImages()
{
    	
    	imageGalleryObj = document.getElementById('mycarousel');
    	var slideshowImages = imageGalleryObj.getElementsByTagName('IMG');
	slideshowImages[0].onload = showImage;	

	for(var no=0;no<slideshowImages.length;no++){
	    slideshowImages[no].onmousedown = showImage;
	}

}
   
function showImage()  
{
    		if(activeImage){		
    			activeImage.style.filter = 'alpha(opacity=100)';
    			activeImage.style.opacity = 1;
    		}
    		this.style.filter = 'alpha(opacity=50)';
    		this.style.opacity = 0.5;
    		activeImage = this;
}
    
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
   }
  }
	  
