var povinne_barva = "#FAFF68"


function validate(formular)
{
    if (formular.email.value=="")
    {
        alert("Vyplňte prosím Vaši emailovou adresu");
        formular.email.focus();
        formular.email.style.backgroundColor=povinne_barva;
        return false;
    }
    else if (formular.email.value != "")
    {
        var re = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$");
        if (!re.test(formular.email.value))
        {
            alert("Zadali jste neplatný formát Vašeho emailu");
            formular.email.focus();
		        formular.email.style.backgroundColor=povinne_barva;
            return false;
        }
    }        
    else if (formular.text.value == "")
    {
        alert("Pokud chcete zanechat vzkaz, neměli byste posílat prázdný formulář");
        formular.text.focus();
        formular.text.style.backgroundColor=povinne_barva;
        return false;
    }
    else if (formular.antispam.value=="")
    {
        alert("Vyplňte prosím antispam kód");
        formular.antispam.focus();
        formular.antispam.style.backgroundColor=povinne_barva;
        return false;
    }    
    else
      return true;
}

/*
	
$(function () {
	$('img').hide();//hide all the images on the page
});

var i = 0;//initialize
var int=0;//Internet Explorer Fix
$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
	var int = setInterval("doThis(i)",100);//500 is the fade in speed in milliseconds
});

function doThis() {
	var imgs = $('img').length;//count the number of images on the page
	if (i >= imgs) {// Loop the images
		clearInterval(int);//When it reaches the last image the loop ends
		$('div.photo').css('background-image','none');
	}
	$('img:hidden').eq(0).fadeIn(100);//fades in the hidden images one by one
	i++;//add 1 to the count
}

*/


