function ValidateReservation()
{
	var variables = ["First_Name", "Last_Name", "Country", "Phone", "Email", "Check_In", "Check_Out"];
	
	for(var i in variables)
	{
		var id = variables[i];
		document.getElementById(id + '_error').style.display = "none";
	}
	document.getElementById('Email_error2').style.display = "none";
	document.getElementById('Agree_error').style.display = "none";
	
	any_error = false;
	
	for(var i in variables)
	{
		var id = variables[i];
		if(document.getElementById(id).value == "")
		{
			document.getElementById(id + '_error').style.display = "block";
			any_error = true;
		}
	}
	
	if(document.getElementById('Email').value != "" && checkEmail(document.getElementById('Email').value) == false)
	{
		document.getElementById('Email_error2').style.display = "block";
		any_error = true;
	}
	
	if(document.getElementById('Agree').checked == false)
	{
		document.getElementById('Agree_error').style.display = "block";
		any_error = true;
	}
	
	if(any_error)
	{
		alert('Please fill all the required fields.');
		return false;
	}else
		return true;
}

function ValidateContact()
{
	var variables = ["First_Name", "Last_Name", "Email", "Country"];
	
	for(var i in variables)
	{
		var id = variables[i];
		document.getElementById(id + '_error').style.display = "none";
	}
	document.getElementById('Email_error2').style.display = "none";
	
	any_error = false;
	
	for(var i in variables)
	{
		var id = variables[i];
		if(document.getElementById(id).value == "")
		{
			document.getElementById(id + '_error').style.display = "block";
			any_error = true;
		}
	}
	
	if(document.getElementById('Email').value != "" && checkEmail(document.getElementById('Email').value) == false)
	{
		document.getElementById('Email_error2').style.display = "block";
		any_error = true;
	}
	
	if(any_error)
	{
		alert('Please fill all the required fields.');
		return false;
	}else
		return true;
}

function checkEmail(str)
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)){
		return true;
	}
	return false;
}

function ShowTerms()
{
	if(document.getElementById("Check_In").value != "" && document.getElementById("Check_Out").value != "")
	{
		arrayCheck_In = document.getElementById("Check_In").value.split("/");
		arrayCheck_Out = document.getElementById("Check_Out").value.split("/");
		
		if(((arrayCheck_In[0] == 5 && arrayCheck_In[1] >= 25) || arrayCheck_In[0] > 5) && ((arrayCheck_Out[0] == 11 && arrayCheck_Out[1] <= 25) || arrayCheck_Out[0] < 11))
		{
			document.getElementById("termsandconditions").innerHTML = '<h1>Booking Terms and Conditions</h1><h2>Summer Season 2008</h2><p>Annupuri Village Asset Management and the owners of the properties managed by Annupuri Village Asset Management rent the properties to guests under the following terms and conditions. These terms and conditions apply to all properties of Annupuri Village. Guests accept these terms and conditions in full when bookings are confirmed.</p><h2>Booking Procedure</h2><p>Bookings are not valid until a booking confirmation is sent by email or fax from Annupuri Village Asset Management.</p><h2>Payment</h2><p>All prices and charges are in Japanese Yen and should be paid by bank deposit or credit card (VISA, Master, Dinners Club, American Express, JCB).</p><h2>Total Accommodation Charge</h2><p>Total accommodation charge together with any other charge incurred for additional services rendered during stay at Annupuri Village will be charged in full at the end of the booked stay.</p><h2>Cancellation</h2><p>The following cancellation fees apply. We recommend taking out travel insurance to cover the need to cancel due to illness or other unforeseen events.</p><ul><li>Cancellation before 7 days prior to arrival - None</li><li>Cancellation between 7 and 2 days prior to arrival - 30% of the total accommodation charge</li><li>Cancellation on the day of arrival, during the booked stay, or no show - 100% of the total accommodation charge.</li></ul><p>Cancellation notification must be received by Annupuri Village Asset Management either by email to reservations@annupurivillage.com or by fax to 0136-59-2112 (From overseas, +81-136-59-2112). The following information used in the booking must be included in order to process cancellation.</p><ul><li>Name and Surname</li><li>Dates of booking</li><li>Email Address</li></ul><h2>Amendment</h2><p>Any change made to a confirmed booking will incur an amendment fee of JPY 5,000.</p><h2>Check-In / Out</h2><p>The accommodation is available for occupation from 3:00pm on the first day of the booking and must be vacated before 11:00am on the last day of the booking, unless pre-arranged otherwise. In case accommodation is not vacated by 11:00am of the last day of the booking, a late check-out fee of JPY 10,000 will be charged for each hour the accommodation is occupied by the guest after 11:00am.</p><h2>Cleaning</h2><p>All properties occupied by guests will have a cleaning service at a minimum of every other day. This cleaning service includes cleaning of bathrooms / kitchen, and removal of rubbish. Towels will be replaced every 3 days and linen at least every 8 days.</p><h2>Complimentary Services</h2><p>Cots can be arranged if requested prior to check-in. Complimentary tea, coffee, milk and sugar will be provided at check-in. Replenishment of these items during the stay is the guest\'s responsibility.</p><h2>Property Damage</h2><p>The guest staying at any of the properties managed by Annupuri Village Asset Management accepts full responsibility for any loss and damage caused to the property, fittings, furniture and keys during the stay. Personal belongings are at the guest\'s own risk.</p> <h2>No Smoking</h2><p>All properties managed by Annupuri Village Asset Management incur a strict "No Smoking"  policy within their premises, except on the decks outside the chalets.</p><h2>No Pets</h2><p>All properties managed by Annupuri Village Asset Management incur a strict  "No Pet"  policy inside the properties.</p><h2>Extra Person Policy</h2><p>All properties managed by Annupuri Village Asset Management have a maximum number of guests allowed to stay. Extra guest charges apply in case guest numbers exceed this maximum number. Children under 5 years incur no charge. Children at age of 5 and above will be considered as full persons.</p><p>Annupuri Village Asset Management reserves the right without notice to modify, cancel or withdraw any of the arrangements made and will refund the full amounts paid to the customer in this event.</p><p>Annupuri Village Asset Management and/or the owners of the properties shall not be liable for any injury, damage, loss, accident, delay and/or irregularity which may be caused to any person or property during the guest\'s stay. In case of inclement weather or snow conditions, Annupuri Village Asset Management cannot be held responsible under any circumstances for any booking cancelled or amended.</p>';
		}else{
			document.getElementById("termsandconditions").innerHTML = '<h1>Booking Terms and Conditions</h1><h2>Annupuri Village Winter Season 2008-2009</h2><h3>Valid from November 26th 2008 to April 26th 2009</h3><p>Annupuri Village Asset Management and the owners of the properties managed by Annupuri Village Asset Management rent the properties to guests under the following terms and conditions. These terms and conditions apply to all properties of Annupuri Village. Guests accept these terms and conditions in full when bookings are confirmed.</p><h2>Booking Procedure</h2><p>Bookings are not valid until a booking confirmation is sent by email or fax from Annupuri Village Asset Management and the booking has been secured with a deposit by a bank deposit payment.</p><h2>Payment</h2><p>All prices and charges are in Japanese Yen and should be paid by bank deposit for all payments except for those payments paid on site at Annupuri Village after guest arrival. Payments to be made on site at Annupuri Village for any additional services rendered can be paid by credit card (VISA, Master, Dinners Club, American Express, JCB).</p><h2>Deposit</h2><p>A deposit payment of 20% of the total accommodation charge is required as confirmation of your booking and must be received within 7 days of receipt of the quote. In case the deposit payment is not made within those 7 days, the available accommodation may be offered to other parties. The deposit is fully refundable in case the booking is cancelled within 7 days of the booking. After 7 days, the deposit is not refundable. Bookings made within 60 days of arrival will require full payment at the time of confirmation.</p><h2>Total Accommodation Charge</h2><p>Balance after the deposit payment is due in full by bank deposit no later than 60 days prior to arrival.</p><p>Bank Deposit to<br />Name of Bank: North Pacific Bank (Hokuyo Bank)<br />Branch: Kutchan Branch<br />Account Type: Ordinary Saving<br />Account #:<br />Account Name:K.K. Annupuri Village Asset Management<br />SWIFT Code:NORPJPJP<br />Branch Code:015<br />Bank Code:05013562728 </p><h2>Cancellation</h2><p>The following cancellation fees apply. We recommend taking out travel insurance to cover the need to cancel due to illness or other unforeseen events.</p><ul><li>Cancellation before 60 days prior to arrival - 20% of the total accommodation charge (non-refundable deposit).</li><li>Cancellation within 60 days prior to arrival and during the booked stay period - 100% of the total accommodation charge.</li></ul><p>Cancellation notification must be received by Annupuri Village Asset Management either by email to <strong>reservations@annupurivillage.com </strong>or by fax to <strong>0136-59-2112</strong> (From overseas, +81-136-59-2112). The following information used in the booking must be included in order to process cancellation.</p><ul>	<li>Name and Surname</li><li>Dates of booking</li><li>Email Address</li></ul><h2>Amendment</h2><p>Any change made to a confirmed booking will incur an amendment fee of JPY 5,000.</p><h2>Check-In / Out</h2><p>The accommodation is available for occupation from 3:00pm on the first day of the booking and must be vacated before 11:00am on the last day of the booking, unless pre-arranged otherwise. In case accommodation is not vacated by 11:00am of the last day of the booking, a late check-out fee of JPY 10,000 will be charged for each hour the accommodation is occupied by the guest after 11:00am.</p><h2>Cleaning</h2><p>All properties occupied by guests will have a cleaning service at a minimum of every other day. This cleaning service includes cleaning of bathrooms / kitchen, and removal of rubbish. Towels will be replaced every 3 days and linen at least every 8 days.</p><h2>Complimentary Services</h2><p>Cots can be arranged if requested prior to check-in. Complimentary tea, coffee, milk and sugar will be provided at check-in. Replenishment of these items during the stay is the guest\'s responsibility.</p><h2>Property Damage</h2><p>The guest staying at any of the properties managed by Annupuri Village Asset Management accepts full responsibility for any loss and damage caused to the property, fittings, furniture and keys during the stay. Personal belongings are at the guest\'s own risk.</p> <h2>No Smoking</h2><p>All properties managed by Annupuri Village Asset Management incur a strict "No Smoking"  policy within their premises, except on the decks outside the chalets.</p><h2>No Pets</h2><p>All properties managed by Annupuri Village Asset Management incur a strict "No Pet"  policy inside the properties.</p>Extra Person Policy</h2><p>All properties managed by Annupuri Village Asset Management have a maximum number of guests allowed to stay. Extra guest charges apply in case guest numbers exceed this maximum number. Children under 5 years incur no charge. Children at age of 5 and above will be considered as full persons.</p><p>Annupuri Village Asset Management reserves the right without notice to modify, cancel or withdraw any of the arrangements made and will refund the full amounts paid to the customer in this event.</p><p>Annupuri Village Asset Management and/or the owners of the properties shall not be liable for any injury, damage, loss, accident, delay and/or irregularity which may be caused to any person or property during the guest\'s stay. In case of inclement weather or snow conditions, Annupuri Village Asset Management cannot be held responsible under any circumstances for any booking cancelled or amended.</p>';
		}
	}else{
		document.getElementById("termsandconditions").innerHTML = '<em>Select the check in and check out date</em>';
	}
}