/**
 * @author mihaitha
 */

if (Object.extend) {
	LightboxOptions = Object.extend({
		fileLoadingImage: '/images/lightbox/loading.gif',
		fileBottomNavCloseImage: '/images/lightbox/closelabel.gif',
		
		overlayOpacity: 0.8, // controls transparency of shadow overlay
		animate: true, // toggles resizing animations
		resizeSpeed: 7, // controls the speed of the image resizing animations (1=slowest and 10=fastest)
		borderSize: 10, //if you adjust the padding in the CSS, you will need to update this variable
		// When grouping images this is used to write: Image # of #.
		// Change it for non-english localization
		labelImage: "Imaginea",
		labelOf: "din"
	}, window.LightboxOptions ||
	{});
}

function checkbooking(){
	var error = '';
	
	if (document.booking.arrival_date.value == "") {
		error = "Câmpul DATA CAZARE este obligatoriu !";
		$elem$('page_content').scrollTop = document.booking.arrival_date.offsetTop;
	}
	else if (document.booking.departure_date.value == "") {
		error = "Câmpul DATA PLECARE este obligatoriu !";
		$elem$('page_content').scrollTop = document.booking.departure_date.offsetTop;
	}
	else if (document.booking.nume.value == "") {
		error = "Câmpul NUME este obligatoriu !";
		$elem$('page_content').scrollTop = document.booking.nume.offsetTop;
	}
	else if (document.booking.email.value == "") {
		error = "Câmpul E-MAIL este obligatoriu !";
		$elem$('page_content').scrollTop = document.booking.email.offsetTop;
	}
	else if (document.booking.telefon.value == "") {
		error = "Câmpul TELEFON este obligatoriu !";
		$elem$('page_content').scrollTop = document.booking.telefon.offsetTop;
	}
		else if (document.booking.data.value == "") {
		error = "Introduceti codul din imagine!";
		$elem$('page_content').scrollTop = document.booking.data.offsetTop;
	}
	
	if (error != '') {
		alert(error);
		return false;
	}
	
	alert("Va multumim ! Datele vor fi transmise pentru rezervare.");
	return true;
}

function checknewsletter(){
	var error = '';
	
	if (document.newsregister.nume.value == "") {
		error = "Câmpul NUME este obligatoriu !";
	}
	else if (document.newsregister.email.value == "") {
		error = "Câmpul E-MAIL este obligatoriu !";
	}
	
	if (error != '') {
		alert(error);
		return false;
	}
	
	alert("Va multumim ! Datele vor fi transmise pentru inregistrare.");
	return true;
}
