// JavaScript Document

function Ukaz(prvok) { var x=document.getElementById(prvok); x.className='on'; }
function Skry(prvok) { var x=document.getElementById(prvok); x.className='off'; } 

//----------------------------------------------------------------------------------



function contact2_validate(name, email, text) {
 var alarm = "Please fill in the information";
 
	if (name==0 || email==0 || text==0){
		alert(alarm);
		focus();
		return false;
	}
	
	
    return true;
}


/***********************************
Lightwindow rozsirujuce funkcie
************************************/


function lightwindow_page(){
	myLightWindow.activateWindow({
		href: 'http://stickmanlabs.com/images/kevin_vegas.jpg', 
	title: 'Waiting for the show to start in Las Vegas', 
	author: 'Jazzmatt', 
	caption: 'Mmmmmm Margaritas! And yes, this is me...', 
	left: 300

	});
}


//Validacia pred odoslanim formulara
function book_form_control(cat){
	switch(cat){
		case "walks":
			if(document.book_form.adults_no.value==0 && document.book_form.students_no.value==0){
				alert(formvalid_error_specification);
				return false;
			}
			break;
		case "accommodation":
			if(document.book_form.rooms_type.value=="" || document.book_form.rooms_number.value==0){
				alert(formvalid_error_specification);
				return false;
			}
			if(document.book_form.adults_number.value==0 && document.book_form.children_number.value==0){
				alert(formvalid_error_specification);
				return false;
			}
			break;
	}
	
	//overi kontaktne info
	if (document.book_form.surname.value=="" || document.book_form.firstname.value=="" || document.book_form.city.value=="" || document.book_form.country.value=="" || !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.book_form.email.value))){
		alert(formvalid_error_contact);
		return false;
	}
	
	return true;
}