// JavaScript Document
function showmenu() {
	//document.getElementById("dropdown_party").style.visibility='visible';
	document.getElementById("dropdown_party").style.display='block';
}
function selectparty(nr) {
	document.getElementById("dropdown_party").style.display='none';
	document.getElementById("menu_party").innerHTML=nr;
}
function showtitle() {
	document.getElementById("dropdown_title").style.display='block';
}
function selecttitle(title) {
	document.getElementById("dropdown_title").style.display='none';
	document.getElementById("menu_title").innerHTML=title;
	document.amenities.title.value=title;
}
function showhotel(naam) {
	document.getElementById("dropdown_party").style.display='none';
	document.getElementById("dropdown_time").style.display='none';
	document.getElementById("dropdown_hotel_cnt").style.display='block';
}
function selecthotel(naam) {
	document.getElementById("dropdown_hotel").style.display='none';
	document.getElementById("menu_hotel").innerHTML=naam;
	document.form.hotel.value=naam;
}
function showhotel_amenities(naam) {
	document.getElementById("dropdown_hotel_amenities").style.display='block';
}
function selecthotel_amenities(naam) {
	document.getElementById("dropdown_hotel_amenities").style.display='none';
	document.getElementById("menu_hotel").innerHTML=naam;
	document.amenities.hotel.value=naam;
}
function showtime(tijd) {
	document.getElementById("dropdown_party").style.display='none';
	document.getElementById("dropdown_hotel").style.display='none';
	document.getElementById("dropdown_time").style.display='block';
}
function selecttime(tijd) {
	document.getElementById("dropdown_time").style.display='none';
	document.getElementById("menu_time").innerHTML=tijd;
	document.form.time.value=tijd;
}
function showparty(nr) {
	document.getElementById("dropdown_time").style.display='none';
	document.getElementById("dropdown_hotel").style.display='none';
	document.getElementById("dropdown_party").style.display='block';
}
function selectparty(nrparty) {
	document.getElementById("dropdown_party").style.display='none';
	document.getElementById("menu_party").innerHTML=nrparty;
	document.form.party.value=nrparty;
}
function showmessage(nr) {
	document.getElementById("dropdown_message").style.display='block';
}
function selectmessage(mess) {
	document.getElementById("dropdown_message").style.display='none';
	document.getElementById("menu_message").innerHTML=mess;
	document.form.message.value=mess;
}
function showvalue(nr) {
	document.getElementById("dropdown_value").style.display='block';
}
function selectvalue(val) {
	document.getElementById("dropdown_value").style.display='none';
	document.getElementById("menu_value").innerHTML=val;
	document.form.value.value=val;
}
function selectCb(me) {
	mypath= me.src;
	myimg=mypath.substring(mypath.length-8,mypath.length)
	if (myimg=="cbox.gif") {
		me.src="_img/cbox_checked.gif";
	} else {
		me.src="_img/cbox.gif";
	}
}
function selectRadioCreditcard(me,theCard) {
	mypath= me.src;
	myimg=mypath.substring(mypath.length-9,mypath.length);
	if (myimg=="radio.gif") {
		for (i=1; i<5; i++) {
			eval("document.radio" + i + ".src='_img/radio.gif'");
		}
		me.src="_img/radio_checked.gif";
		document.amenities.card.value=theCard;
	}
}
function selectRadioLoc(me,loc) {
	mypath= me.src;
	myimg=mypath.substring(mypath.length-9,mypath.length);
	if (myimg=="radio.gif") {
		for (i=1; i<3; i++) {
			eval("document.radioloc" + i + ".src='_img/radio.gif'");
		}
		me.src="_img/radio_checked.gif";
		document.form.location.value=loc;
	}
}
function selectRadioSmoke(me,smoke) {
	mypath= me.src;
	myimg=mypath.substring(mypath.length-9,mypath.length);
	if (myimg=="radio.gif") {
		for (i=1; i<3; i++) {
			eval("document.radiosmoke" + i + ".src='_img/radio.gif'");
		}
		me.src="_img/radio_checked.gif";
		document.form.smoking.value=smoke;
	}
}
celebArray=new Array("birthday","anniversary","honeymoon","return visit","return visit")
function selectCboxCeleb(me,celeb) {
	mypath= me.src;
	myimg=mypath.substring(mypath.length-8,mypath.length)
	if (myimg=="cbox.gif") {
		me.src="_img/cbox_checked.gif";		
	} else {
		me.src="_img/cbox.gif";
	}
	myceleb="";
	for (i=1; i<6; i++) {
		mycelebstring=document["radioceleb"+i].src;
		mycelebimg=mycelebstring.substring(mycelebstring.length-16,mycelebstring.length)
		if (mycelebimg=="cbox_checked.gif") {
		myceleb=myceleb+"|"+celebArray[i-1];
		}
	}
	document.form.celebration.value=myceleb;
}
function checkNr(me) {
	for (i=0; i<me.length; i++) {	
		if (me.substr(i,i+1)!=0) {
			if (!parseFloat(me.substr(i,i+1))) {
				deVal=me.substr(0,i);
				document.form.party_number.value=deVal;
				alert("Please use numbers only")
			}
		}
	}
}
function verzend() {
	str = document.form.email.value;
	filter=/^.+@.+\..{2,3}$/ 
	if (document.form.lastname.value=="") {
		alert("Please fill in your lastname");
		document.form.lastname.focus();
		return false;
	} else if (document.form.firstname.value=="") {
		alert("Please fill in your firstname");
		document.form.firstname.focus();
		return false;
	} else if (!filter.test(str)){ 
 		alert("Please fill in a valid e-mailaddress");
		document.form.email.focus();
 		return false;
	} else if (document.form.reservation_date.value=="") {
		alert("Please select a reservation date");
		document.form.reservation_date.focus();
		return false;
	} else if (document.form.time.value=="") {
		alert("Please select a reservation time");
		return false;
	} else if (document.form.party.value=="") {
		alert("Please select a party number");
		return false;
	} else if (document.form.hotel.value=="") {
		alert("Please select a hotel");
		return false;
	} else if (document.form.arrival_date.value=="") {
		alert("Please select a arrival date");
		return false;
	} else {
		document.form.submit();
		return true;
	}
}
function verzend_contact() {
	str = document.contactform.email.value;
	filter=/^.+@.+\..{2,3}$/ 
	if (document.contactform.name.value=="") {
		alert("Please fill in your name");
		document.contactform.name.focus();
		return false;
	} else if (!filter.test(str)){ 
 		alert("Please fill in a valid e-mailaddress");
		document.contactform.email.focus();
 		return false;
	} else {
		document.contactform.submit();
		return true;
	}
}
function verzend_friend() {
	str = document.emailfriendform.email.value;
	filter=/^.+@.+\..{2,3}$/ 
	if (document.emailfriendform.name.value=="") {
		alert("Please fill in your name");
		document.emailfriendform.name.focus();
		return false;
	} else if (!filter.test(str)){ 
 		alert("Please fill in a valid e-mailaddress");
		document.emailfriendform.email.focus();
 		return false;
	} else if (document.emailfriendform.friend1.value=="" && document.emailfriendform.friend2.value=="" && document.emailfriendform.friend3.value=="" && document.emailfriendform.friend4.value==""){ 
 		alert("Please fill in at least one friend");
		document.emailfriendform.friend1.focus();
 		return false;
	} else {
		document.emailfriendform.submit();
		return true;
	}
}
function verzend_amenities() {
	str = document.amenities.email.value;
	filter=/^.+@.+\..{2,3}$/ 
	if (document.amenities.lastname.value=="") {
		alert("Please fill in your lastname");
		document.amenities.lastname.focus();
		return false;
	} else if (document.amenities.firstname.value=="") {
		alert("Please fill in your firstname");
		document.amenities.firstname.focus();
		return false;
	} else if (document.amenities.reservation_date.value=="") {
		alert("Please select a reservation date");
		document.amenities.reservation_date.focus();
		return false;	
	} else if (document.amenities.hotel.value=="") {
		alert("Please select a hotel");
		return false;		
	} else if (document.amenities.card.value=="") {
		alert("Please choose a creditcard name");
		return false;
	} else if (document.amenities.cardnumber.value=="") {
		alert("Please choose a creditcard name");
		document.amenities.cardnumber.focus();
		return false;	
	} else if (document.amenities.expire_date.value=="") {
		alert("Please fill in an expire date");
		document.amenities.expire_date.focus();
		return false;	
	} else if (document.amenities.creditcard_name.value=="") {
		alert("Please fill in the name mentioned on your credit card");
		document.amenities.creditcard_name.focus();
		return false;	
	} else if (!filter.test(str)){ 
 		alert("Please fill in a valid e-mailaddress");
		document.amenities.email.focus();
 		return false;		
	} else if (document.amenities.address.value=="") {
		alert("Please fill in an address");
		document.amenities.address.focus();
		return false;			
	} else if (document.amenities.city.value=="") {
		alert("Please fill in city and state");
		document.amenities.city.focus();
		return false;			
	} else if (document.amenities.phone.value=="") {
		alert("Please fill in a phone number");
		document.amenities.phone.focus();
		return false;	
	} else {
		document.amenities.submit();
		return true;
	}
}
function hideflash() {
	document.getElementById("slideshow").style.display='none';
	document.getElementById("maincontainer_flash").style.display='block';
}
function hidecontent() {
	document.getElementById("maincontainer_flash").style.display='none';
}
