<?php include('header.php'); ?>

<div id="cover_screen" style="display: block">
<a href="javascript:;"><img id="cover_image" src="cover_screen.png" onclick="cover_more()" onmouseover="this.src = 'cover_screen_active.png'" onmouseout="this.src = 'cover_screen.png'" /></a>
	<div id="cover_more" style="display: none">

	<form id="route" name="route" method="post" action="index.php" onsubmit="return formValidator()">
		Is your trip to Whistler <label><input name="Routing" type="radio" value="oneway" <?php echo (($_SESSION['Routing'] == "oneway") ? 'checked="checked"' : "" ) ?> />One way</label> <label><input name="Routing" type="radio" value="return" <?php echo (($_SESSION['Routing'] != "oneway") ? 'checked="checked"' : "" ) ?> />Return</label><br />

		Are you flying? <label><input name="FlyModeYes" type="radio" checked="checked" id="air" onclick="flying()" />Yes</label> <label><input name="FlyMode" type="radio" value="ground" id="ground" onclick="riding()" />No</label><br />

		<div id="flying_from"><label>Where are you coming from <input name="destination0" id="destination0" class="ajax align_right" type="text" value="<?php echo $_SESSION['destination0'] ?>" size="28" style="border: 2px solid #929295" /></label><br /></div>

		<div id="riding" style="display: none"><label>Where are you coming from <select name="ground_dest" id="ground_dest" style="border: 2px solid #929295">
		<?php
			$ground_dest = mysql_query('SELECT City FROM ground ORDER BY City ASC');
			while ($ground_city = mysql_fetch_row($ground_dest))
			{
				echo '<option value="'.$ground_city[0].'"';
				if ($_SESSION['ground_dest'] == $ground_city[0]) echo ' selected="selected"';
				echo '>'.$ground_city[0].'</option>';
			}
		?>
		</select></label><br /></div>

		<div id="flying">Are you arriving into <label><input name="FlyMode" type="radio" value="yvr" id="yvr" checked="checked" />Vancouver</label> <label><input name="FlyMode" type="radio" value="sea" />Seattle</label><br /></div>

		<label>How are you getting to Whistler

		<?php $mode[$_SESSION['mode']] = 'selected="selected"'; ?>

		<select name="mode" class="align_right">
			<option value="bus" <?php echo $mode['bus'] ?>>Bus</option>
			<option value="cab" <?php echo $mode['cab'] ?>>Cab</option>
			<option value="car" <?php echo $mode['car'] ?>>Car</option>
			<option value="hcar" <?php echo $mode['hcar'] ?>>Hybrid Car</option>
			<option value="hsuv" <?php echo $mode['hsuv'] ?>>Hybrid SUV</option>
			<option value="limo" <?php echo $mode['limo'] ?>>Limo</option>
			<option value="truck" <?php echo $mode['truck'] ?>>Pickup truck</option>
			<option value="sport" <?php echo $mode['sport'] ?>>SUV</option>
			<option value="van" <?php echo $mode['van'] ?>>Van</option>
		</select></label><br />

		<label>How many travellers are you offsetting <input name="passengers" id="passengers" type="text" value="<?php echo isset($_SESSION['passengers']) ? $_SESSION['passengers'] : '1' ?>" size="13" style="border: 2px solid #929295" class="align_right" /></label><br /><br />

		<input type="hidden" name="destination" value="1" />
		<input type="hidden" name="destination1" value="vancouver" class="ajax" />
		<input name="confirm" type="hidden" value="calculate" />
		<input type="image" id="submit" value="calculate" src="calculate.png" />
	</form>


	<script type="text/javascript" src="functions.js"></script>


	<script type="text/javascript">
		function flying()
		{
			document.getElementById('riding').style.display='none';
			document.getElementById('flying').style.display='';
			document.getElementById('flying_from').style.display='';
			document.getElementById('ground').checked=false;
			document.getElementById('yvr').checked=true;
		}

		function riding()
		{
			document.getElementById('riding').style.display='';
			document.getElementById('flying').style.display='none';
			document.getElementById('flying_from').style.display='none';
			document.getElementById('air').checked=false;
			document.getElementById('ground').checked=true;
		}

		<?php if ($_SESSION['flymode'] == 'ground') echo 'riding();' ?>
	</script>
</div>
</div>

<?php

if ($_SESSION['destination0'] || $_SESSION['ground_dest']) echo '<script type="text/javascript">cover_more()</script>';

include('footer.php');

?>