function check_email(e) {   //email validation
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}	
} 

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
} 

}

}//end of check e-mail

function check_form2(f) {
if(f.name.value.length < 1){
f.name.focus(); // put the prompt in the name field 
if(document.all || document.getElementByID){
// change the color of text field
f.name.style.background = "#FFFFDC";

alert("Prosím zadejte své jméno");
f.name.focus();
// if the browser is Netscape 6 or IE
}
// make sure the form is not submitted
return false;
}

if(f.content.value.length < 1){
f.content.focus(); // put the prompt in the name field 
if(document.all || document.getElementByID){
// change the color of text field
f.content.style.background = "#FFFFDC";

alert("Prosím napiště obsah zprávy");
f.content.focus();
// if the browser is Netscape 6 or IE
}
// make sure the form is not submitted
return false;
}


 // f is the form (passed using the this keyword)
// check the first email address ( the exclamation means "not" )
if(!check_email(f.email.value)){
f.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.email.style.background = "#FFFFDC";

alert("Prosím zkontrolujte svou e-mailovou adresu");
f.email.focus(); 
}
// make sure the form is not submitted
return false;
}



}				// end of email vaidation