<html>
<head>
    <title>Washington Yacht Club Calendar</title>
    <link rel="stylesheet" type="text/css" href="wyc.css">
	<script type="text/javascript" language="javascript">
		function validateMyForm(form)
		{alert("hi");
			if (form.fname.value == "")
			{
				form.fname.focus();
				form.fname.select();

				return false;
			}
			if (form.lname.value == "")
			{
				form.lname.focus();
				form.lname.select();
				return false;
			}
			if (form.from.value == "")
			{
				form.from.focus();
				form.from.select();
				return false;
			}
			if (form.until.value == "")
			{
				form.until.focus();
				form.until.select();
				return false;
			}
			if (form.destination.value == "")
			{
				form.destination.focus();
				form.destination.select();
				return false;
			}
			if (form.numcrew.value == "")
			{
				form.numcrew.focus();
				form.numcrew.select();
				return false;
			}
			if (form.phone.value == "")
			{
				form.phone.focus();
				form.phone.select();
				return false;
			}

			return true;
		}
	</script>
</head>
<body>
	<form action="reserve.php" OnSubmit("validateMyForm(this);") method="post">

		<table>
		<tr>
			<td>

			</td>
			<td>
				<SELECT NAME="boatname">
					<OPTION selected>Choose a boat
					<OPTION value="Charlotte">Charlotte
					<OPTION value="Deception">Deception
					<OPTION value="Rascal">Rascal
					<OPTION value="Nightshade">Nightshade
					<OPTION value="Talaria">Talaria
				</SELECT>
			</td>
		</tr>
		<tr>
			<td>
				WYC Number:
			</td>
			<td>
				<?php echo $wycnumber ?>&nbsp;&nbsp;&nbsp;<span style="font-size:9pt">Not your WYC number? <a href="logout.php">Logout</a></span>
			</td>
		</tr>
		<tr>
			<td>
				Reserve from:
			</td>
			<td>
				<input type="text" value="<?php echo date("Y-m-d", $fromdate); ?>" name="from" /> <input type="radio" name="rFrom" value="morning" />Morning <input type="radio" name="rFrom" checked value="afternoon" />Afternoon
			</td>
		</tr>
		<tr>
			<td>
				Reserve until:
			</td>
			<td>
				<input type="text" value="<?php echo date("Y-m-d", $untildate); ?>" name="until" /> <input type="radio" name="rUntil" value="morning" />Morning <input type="radio" name="rUntil" checked value="afternoon" />Afternoon
			</td>
		</tr>
		<tr>
			<td>
				Destination:
			</td>
			<td>
				<input type="text" name="destination" />
			</td>
		</tr>
		<tr>
			<td>
				Number of crew:
			</td>
			<td>
				<input type="text" name="numcrew" />
			</td>
		</tr>
		<tr>
			<td>
				Contact phone:
			</td>
			<td>
				<input type="text" name="phone" value = "<?php echo $defaultPhoneNumber ?>"/>
			</td>
		</tr>
		<tr>
			<td style="vertical-align:top">
				Comments:
			</td>
			<td>
				<TEXTAREA NAME="comments" ROWS=4 COLS=16></TEXTAREA>


			</td>
		</tr>
		</table>
		<?php echo $error_message; ?><br />
		<input type="reset" />
		<input type="submit" name="submit" value="Reserve" />
	</form>

</body>
</head>
