<!-- Original: Kai Lien (kai@lenseco.com)   -->
<!-- Web Site: http://www.lenseco.com       -->
<!-- Copyright: Lense Consulting Company -->

<!-- Begin

var june_first = new Date(2005, 6, 3);
var MS_june_first = june_first.getTime();
var june_twotwo = new Date(2005, 6, 24);
var MS_june_twotwo = june_twotwo.getTime();

var june_twothree = new Date(2005, 6, 25);
var MS_june_twothree = june_twothree.getTime();
var july_twofive = new Date(2005, 7, 28);
var MS_july_twofive = july_twofive.getTime();

var july_twosix = new Date(2005, 7, 29);
var MS_july_twosix = july_twosix.getTime();
var sept_first = new Date(2005, 9, 5);
var MS_sept_first = sept_first.getTime();



//single rate function
function single_bed()
{
with (document.quote_single)
	 {

		// get string from drop down menu array //	
	for (var m = 0; m < document.quote_single.arrival_month.length; m++)
		{
		if (document.quote_single.arrival_month.options[m].selected)
			{
			var amonth = document.quote_single.arrival_month.options[m].value;
			}
		}	
	
	for (var d = 0; d < document.quote_single.arrival_date.length; d++)
		{
		if (document.quote_single.arrival_date.options[d].selected)
			{
			var adate = document.quote_single.arrival_date.options[d].value;
			}
		}	
	
var arrival = new Date(2005, amonth, adate);
var MS_arrival = arrival.getTime();
//document.write(MS_arrival); -- it worked

if (MS_arrival < MS_june_first) single.value = 85;
if (MS_arrival > MS_sept_first) single.value = 85;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) ) single.value = 85;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) ) single.value = 99;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) ) single.value = 112;

	
	// get string from drop down menu array //	
	for (var i = 0; i < document.quote_single.adult.length; i++)
		{
		if (document.quote_single.adult.options[i].selected)
			{
			var man = document.quote_single.adult.options[i].value;
			}
		}	
	
	for (var j = 0; j < document.quote_single.children.length; j++)
		{
		if (document.quote_single.children.options[j].selected)
			{
			var kid = document.quote_single.children.options[j].value;
			}
		}	
	
	// convert string to integer for addition //
	var temp = parseInt (man);	
	var temp2 = parseInt (kid);
	//test to see if temp and temp2 are numbers //
	if (isNaN (temp) || isNaN (temp2))
		return;
	var person = temp + temp2;

if (person  <= 2)
	{
	total.value = single.value * day.value;
	//var one = eval(document.quote_single.person.value)
	var two = eval(document.quote_single.day.value)
	var three = eval(document.quote_single.total.value)
		alert ("The total price for  " +  person + " person(s) and " +  two + " night(s) is $" +   three + ".\n\n" + 
	"Holidays and special dates are subject to change.\n" +
	"Please call 1-800-334-5727 to reserve this room.\n")
	}
else	
	{
	alert ("The maximum number of people allowed in this room is 2.\n\n")
	total.value = 0;
	};
	}
}	

// double rate function
function two_bed()
{
with (document.quote_double)
	 {

		// get string from drop down menu array //	
	for (var m = 0; m < document.quote_double.arrival_month.length; m++)
		{
		if (document.quote_double.arrival_month.options[m].selected)
			{
			var amonth = document.quote_double.arrival_month.options[m].value;
			}
		}	
	
	for (var d = 0; d < document.quote_double.arrival_date.length; d++)
		{
		if (document.quote_double.arrival_date.options[d].selected)
			{
			var adate = document.quote_double.arrival_date.options[d].value;
			}
		}	
	
var arrival = new Date(2005, amonth, adate);
var MS_arrival = arrival.getTime();
//document.write(MS_arrival); -- it worked


if (MS_arrival < MS_june_first) twobed.value = 89;
if (MS_arrival > MS_sept_first) twobed.value = 89;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) ) twobed.value = 89;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) ) twobed.value = 110;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) ) twobed.value = 124;


	
	// get string from drop down menu array //	
	for (var i = 0; i < document.quote_double.adult.length; i++)
		{
		if (document.quote_double.adult.options[i].selected)
			{
			var man = document.quote_double.adult.options[i].value;
			}
		}	
	
	for (var j = 0; j < document.quote_double.children.length; j++)
		{
		if (document.quote_double.children.options[j].selected)
			{
			var kid = document.quote_double.children.options[j].value;
			}
		}	
	
	// convert string to integer for addition //
	var temp = parseInt (man);	
	var temp2 = parseInt (kid);
	//test to see if temp and temp2 are numbers //
	if (isNaN (temp) || isNaN (temp2))
		return;
	var person = temp + temp2;

if (person  <= 4)
	{
	total.value = twobed.value * day.value;
	//var one = eval(document.quote_single.person.value)
	var two = eval(document.quote_double.day.value)
	var three = eval(document.quote_double.total.value)
	alert ("The total price for  " +  person + " person(s) and " +  two + " night(s) is $" +   three + ".\n\n" + 
	"Holidays and special dates are subject to change.\n" +
	"Please call 1-800-334-5727 to reserve this room.\n")
	}
else	
	{
	alert ("The maximum number of people allowed in this room is 4.\n\n")
	total.value = 0;
	};
	}
}	





// super queen rate function
function queen_bed()
{
with (document.quote_queen)
	 {

		// get string from drop down menu array //	
	for (var m = 0; m < document.quote_queen.arrival_month.length; m++)
		{
		if (document.quote_queen.arrival_month.options[m].selected)
			{
			var amonth = document.quote_queen.arrival_month.options[m].value;
			}
		}	
	
	for (var d = 0; d < document.quote_queen.arrival_date.length; d++)
		{
		if (document.quote_queen.arrival_date.options[d].selected)
			{
			var adate = document.quote_queen.arrival_date.options[d].value;
			}
		}	
	
var arrival = new Date(2005, amonth, adate);
var MS_arrival = arrival.getTime();
//document.write(MS_arrival); -- it worked

	// get string from drop down menu array //	
	for (var i = 0; i < document.quote_queen.adult.length; i++)
		{
		if (document.quote_queen.adult.options[i].selected)
			{
			var man = document.quote_queen.adult.options[i].value;
			}
		}	
	
	for (var j = 0; j < document.quote_queen.children.length; j++)
		{
		if (document.quote_queen.children.options[j].selected)
			{
			var kid = document.quote_queen.children.options[j].value;
			}
		}	
	
	// convert string to integer for addition //
	var temp = parseInt (man);	
	var temp2 = parseInt (kid);
	//test to see if temp and temp2 are numbers //
	if (isNaN (temp) || isNaN (temp2))
		return;
	var person = temp + temp2;

if (MS_arrival < MS_june_first) queen.value = 120;
if (MS_arrival > MS_sept_first) queen.value = 120;

if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person < 5) ) queen.value = 99;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 5) ) queen.value = 120;

if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person <= 2) ) queen.value = 148;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 3) ) queen.value = 148;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 4) ) queen.value = 148;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 5) ) queen.value = 148;

if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person <= 4) ) queen.value = 168;	
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person >= 5) ) queen.value = N/A;


if (person <= 5) 
	{
	total.value = queen.value * day.value;
	//var one = eval(document.quote_queen.person.value)
	var two = eval(document.quote_queen.day.value)
	var three = eval(document.quote_queen.total.value)
	alert ("The total price for  " +  person + " person(s) and " +  two + " night(s) is $" +   three + ".\n\n" + 
	"Holidays and special dates are subject to change.\n" +
	"Please call 1-800-334-5727 to reserve this room.\n")
	}
else	
	{
	alert ("The maximum number of people allowed in this room is 5.\n\n")
	total.value = 0;
	};
	}
}	

// suite rate function
function suite_bed()
{
with (document.quote_suite)
	 {
suite.value = 160;

// get string from drop down menu array //	
	for (var m = 0; m < document.quote_suite.arrival_month.length; m++)
		{
		if (document.quote_suite.arrival_month.options[m].selected)
			{
			var amonth = document.quote_suite.arrival_month.options[m].value;
			}
		}	
	
	for (var d = 0; d < document.quote_suite.arrival_date.length; d++)
		{
		if (document.quote_suite.arrival_date.options[d].selected)
			{
			var adate = document.quote_suite.arrival_date.options[d].value;
			}
		}	
	
var arrival = new Date(2005, amonth, adate);
var MS_arrival = arrival.getTime();
//document.write(MS_arrival); -- it worked

	// get value from drop down menu array //	
	for (var i = 0; i < document.quote_suite.adult.length; i++)
		{
		if (document.quote_suite.adult.options[i].selected)
			{
			var man = document.quote_suite.adult.options[i].value;
			}
		}	
	
	for (var j = 0; j < document.quote_suite.children.length; j++)
		{
		if (document.quote_suite.children.options[j].selected)
			{
			var kid = document.quote_suite.children.options[j].value;
			}
		}	

	// convert string to integer for addition //
	var temp = parseInt (man);	
	var temp2 = parseInt (kid);
	//test to see if temp and temp2 are numbers //
	if (isNaN (temp) || isNaN (temp2))
		return;
	var person = temp + temp2;


if (MS_arrival < MS_june_first) suite.value = 150;
if (MS_arrival > MS_sept_first) suite.value = 150;

if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person <= 2) ) suite.value = 125;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 3) ) suite.value = 130;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 4) ) suite.value = 140;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 5) ) suite.value = 150;

if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person <= 2) ) suite.value = 160;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 3) ) suite.value = 170;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 4) ) suite.value = 180;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 5) ) suite.value = 195;

if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person <= 2) ) suite.value = 190;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 3) ) suite.value = 200;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 4) ) suite.value = 210;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 5) ) suite.value = 225;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 6) ) suite.value = N/A;
	
if (person <= 5)
		{
		total.value = suite.value * day.value;
		
		//var one = eval(document.quote_suite.person.value)
		var two = eval(document.quote_suite.day.value)
		var three = eval(document.quote_suite.total.value)
		alert ("The total price for  " +  person + " person(s) and " +  two + " night(s) is $" +   three + ".\n\n" + 
		"Holidays and special dates are subject to change.\n" +
		"Please call 1-800-334-5727 to reserve this room.\n")
		}
	else	
		{
		alert ("The maximum number of people allowed in this room is 5.\n\n")
		total.value = 0;
		};
   	}
}

// tworoom rate function
function tworoom_bed()
{
with (document.quote_tworoom)
	 {
tworoom.value = 150;

// get string from drop down menu array //	
	for (var m = 0; m < document.quote_tworoom.arrival_month.length; m++)
		{
		if (document.quote_tworoom.arrival_month.options[m].selected)
			{
			var amonth = document.quote_tworoom.arrival_month.options[m].value;
			}
		}	
	
	for (var d = 0; d < document.quote_tworoom.arrival_date.length; d++)
		{
		if (document.quote_tworoom.arrival_date.options[d].selected)
			{
			var adate = document.quote_tworoom.arrival_date.options[d].value;
			}
		}	
	
var arrival = new Date(2005, amonth, adate);
var MS_arrival = arrival.getTime();
//document.write(MS_arrival); -- it worked

	// get value from drop down menu array //	
	for (var i = 0; i < document.quote_tworoom.adult.length; i++)
		{
		if (document.quote_tworoom.adult.options[i].selected)
			{
			var man = document.quote_tworoom.adult.options[i].value;
			}
		}	
	
	for (var j = 0; j < document.quote_tworoom.children.length; j++)
		{
		if (document.quote_tworoom.children.options[j].selected)
			{
			var kid = document.quote_tworoom.children.options[j].value;
			}
		}	

	// convert string to integer for addition //
	var temp = parseInt (man);	
	var temp2 = parseInt (kid);
	//test to see if temp and temp2 are numbers //
	if (isNaN (temp) || isNaN (temp2))
		return;
	var person = temp + temp2;

if (MS_arrival < MS_june_first) tworoom.value = 150;
if (MS_arrival > MS_sept_first) tworoom.value = 150;

if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person <= 3) ) tworoom.value = 135;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 4) ) tworoom.value = 148;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 5) ) tworoom.value = 150;
if ( (MS_arrival  >= MS_june_first) && (MS_arrival <= MS_june_twotwo) && (person == 6) ) tworoom.value = 165;

if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person <= 3) ) tworoom.value = 180;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 4) ) tworoom.value = 199;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 5) ) tworoom.value = 210;
if ( (MS_arrival  >= MS_june_twothree) && (MS_arrival <= MS_july_twofive) && (person == 6) ) tworoom.value = 225;

if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person <= 3) ) tworoom.value = 220;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 4) ) tworoom.value = 238;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 5) ) tworoom.value = 249;
if ( (MS_arrival  >= MS_july_twosix) && (MS_arrival <= MS_sept_first) && (person == 6) ) tworoom.value = N/A;


	
if (person <= 6)
		{
		total.value = tworoom.value * day.value;
		//var one = eval(document.quote_tworoom.person.value)
		var two = eval(document.quote_tworoom.day.value)
		var three = eval(document.quote_tworoom.total.value)
		alert ("The total price for  " +  person + " person(s) and " +  two + " night(s) is $" +   three + ".\n\n" + 
		"Holidays and special dates are subject to change.\n" +
		"Please call 1-800-334-5727 to reserve this room.\n")
		}
	else	
		{
		alert ("The maximum number of people allowed in this room is 6.\n\n")
		total.value = 0;
		};
   	}
}

// End -->




