<?php
   require_once "/home/mtyrents/www/montereyrentals.com/cmsAdmin/lib/viewer_functions.php";
    require_once "init.php";
  
  list($vacation_rentalsRecords, $vacation_rentalsMetaData) = getRecords(array(
    'tableName'   => 'vacation_rentals',
    'joinTable'   => 'homepages',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $vacation_rentalsRecord = @$vacation_rentalsRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$vacation_rentalsRecord) {
    print "Record not found!";
    exit;
  }
  
     list($homepagesRecords, $homepagesMetaData) = getRecords(array(
    'tableName'   => 'homepages',
  ));
  
 list($reviewsRecords, $reviewsMetaData) = getRecords(array(
    'tableName'   => 'reviews',
    'where' => 'property_code='."'".$vacation_rentalsRecord['property_code']."'",
  ));
  
  // calculate ratings
  $query   = mysql_escapef("SELECT ROUND(AVG(quality_of_furnishings)),
                                   ROUND(AVG(comfort_of_beds)),
                                   ROUND(AVG(quality_of_appliances)),
                                   ROUND(AVG(quality_of_cookware_kitchen_equiptment)),
                                   ROUND(AVG(quality_of_bed_bath_linen)),
                                   ROUND(AVG(condition_of_outdoor_spaces)),
                                   ROUND(AVG(condition_of_paint_wallpaper)),
                                   ROUND(AVG(condition_of_floors_floor_coverings)),
                                   ROUND(AVG(good_value_for_the_price_you_paid)),
                                   ROUND(AVG(overall_quality_of_this_property))
                              FROM {$TABLE_PREFIX}ratings
                             WHERE property_num = ?", @$vacation_rentalsRecord['num']);
  $record = mysql_query_fetch_row_array($query);
  @list($quality_of_furnishings,
        $comfort_of_beds,
        $quality_of_appliances,
        $quality_of_cookware_kitchen_equiptment,
        $quality_of_bed_bath_linen,
        $condition_of_outdoor_spaces,
        $condition_of_paint_wallpaper,
        $condition_of_floors_floor_coverings,
        $good_value_for_the_price_you_paid,
        $overall_quality_of_this_property) = $record;
?>
   <!-- favorites -->
  <script type="text/javascript" src="../cmsAdmin/plugins/websiteFavorites/websiteFavorites.js"></script>
  <script type="text/javascript" src="../cmsAdmin/3rdParty/jquery/jquery1.3.2.js"></script>
  <script type="text/javascript">jQuery.noConflict();</script>
  <?php $GLOBALS['WSF_SCRIPTS_LOADED'] = true; ?>
  <!-- /favorites -->

<title><?php echo join(', ', getListLabels('vacation_rentals', 'City', $vacation_rentalsRecord['City'])); ?> Vacation Housing Rental Information &amp; 
Accommodations.</title>

<script type="text/javascript" src="js/thumbnailviewer2.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

</script>
<?php include "include_header.php"; ?>

 

<div align="center">
	<table border="0" width="97%" id="table22">
	  <?php
    $tableOrTag = 'vacation_rentals';       // Update with your section's table name
    $recordNum  = $vacation_rentalsRecord['num'];  // Update this with current record number
  ?>  	<tr>
			<td valign="top">
			<p align="right">	<a href="http://www.montereyrentals.com/MyProfile.php">
				<img border="0" src="images/fav.gif" width="44" height="33" alt="View Favorites"></a>
			</td>
			<td width="51" valign="bottom">
			<div align="right" class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'add'); ?>" style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'add'); ?>">
				<font face="Verdana" size="1">
  			<a onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'add'); ?>" href="#"><img border="0" src="images/add.gif" width="44" height="33" alt="Add to Favorites"></a>&nbsp; </div></font>  <div align="right" class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'remove'); ?>" style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'remove'); ?>">
				<font face="Verdana" size="1">
				<a onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'remove'); ?>" href="#">
				<img border="0" src="images/remove.gif" width="44" height="33" alt="Remove from Favorites"></a> <br><font size="1" face="Verdana">
			
			</font></div></td>
		</tr>
	</table>
</div>



      <div align="center">
	<table border="0" width="99%" id="table7">
		<tr>
			<td width="21" valign="top" height="340">
     	<br>
									<img border="0" src="images/propd.gif" width="21" height="218"></td>
			<td width="480" valign="top" rowspan="3">
                  <div align="center">
					<table border="0" width="99%" id="table16" cellspacing="1" height="330">
						<tr>
							<td valign="bottom" bgcolor="#FFFFFF" background="back2a.jpg" height="320"><div id="loadarea" style="width: 470px; height: 310px"  align="center">
                                            	<?php foreach ($vacation_rentalsRecord['photos'] as $upload): ?>	                                               
                                                 <img id="placeholder" src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['thumbWidth3'] ?>" height="<?php echo $upload['thumbHeight3'] ?>" alt="" border="0" />
                                                  <?php break; ?>
                                                <?php endforeach ?></div></td>
						</tr>
					</table>
					</div>
					<div style="overflow:auto; height:270px; width:460px;"> 	
                  <div align="center">
                  <table width="94%" border="0" cellspacing="4" cellpadding="0">
                       <tr>
		                    	<?php foreach ($vacation_rentalsRecord['photos'] as $upload): ?>														  <td>
  <p align="center">
  <a href="<?php echo $upload['urlPath'] ?>" rel="enlargeimage::mouseover" rev="loadarea"><img onmouseover="return showPic(this)" src="<?php echo $upload['thumbUrlPath2'] ?>" width="<?php echo $upload['thumbWidth2'] ?>" height="<?php echo $upload['thumbHeight2'] ?>" alt="" border="0" /></a>                                                                                                          						        
														  </td> 
														  <?php $maxCols=4; if (@++$count % $maxCols == 0): ?> 
														    </tr><tr> 
														  <?php endif; ?>  
												  <?php endforeach ?>						
                  </table>
                	</div>
                </div>

		<div align="center">
			<table border="0" width="98%" id="table8">
				<tr>
					<td width="99%">
					<div align="justify"><font size="2" font face="Verdana"><b>DESCRIPTION:</b> 
				<?php echo $vacation_rentalsRecord['description'] ?></font></div></td>
				</tr>
			</table>
		</div>
		 
							</td>
                                                
			<td width="2%" height="340" valign="top">&nbsp;</td>
			<td rowspan="3" valign="top">
			<div align="center">
				<table border="0" width="98%" id="table17">
					<tr>
						<td>
			<p align="center"><font face="Verdana" color="#0E8A8A"><b>&nbsp;<?php echo $vacation_rentalsRecord['property_code'] ?> 
			- <?php echo join(', ', getListLabels('vacation_rentals', 'City', $vacation_rentalsRecord['City'])); ?></b></font></p>
			<p align="center"><font face="Verdana" size="2" color="#2A4480">
      			<b>
      			<?php echo $vacation_rentalsRecord['bedroom'] ?> Beds&nbsp;- <?php echo $vacation_rentalsRecord['bath'] ?> Baths</b></font></p>
			<p align="center"> <font face="Verdana" size="2" color="#800000"> <b><?php if ($vacation_rentalsRecord['special_pricing']): ?> 
 <?php echo $vacation_rentalsRecord['special_pricing'] ?> </b></font><?php endif ?></p>

			<p align="center"><b><font size="2" face="Verdana" color="#2A4480"><?php echo $vacation_rentalsRecord['nightly_price'] ?><br> <?php echo $vacation_rentalsRecord['weekly_price'] ?><br>
			<?php echo $vacation_rentalsRecord['monthly_price'] ?></font></b></p>
			
			<p align="center">
				<?php if ($vacation_rentalsRecord['pet_friendly'] == 'Yes'): ?> 
									<b><font color="#0E8A8A" size="2"><span style="text-decoration: none">PET FRIENDLY </span></font>
			</b><img src="http://www.montereyrentals.com/images/paw4.gif" border="0"></a>
			<?php endif ?>
			<p align="center">			
			<b>			
			<font color="#2A4480" face="Verdana" size="2"><?php if ($vacation_rentalsRecord['virtual_tour']): ?> 
<a target="blank" href="<?php echo $vacation_rentalsRecord['virtual_tour'] ?>"><img src="http://www.montereyrentals.com/images/vt.jpg" border="0">Click to View Virtual Tour</a></font></b><font size="2">  
<?php endif ?></font></p>

			<p align="center">
						<b><font size="2" face="Verdana" color="#2A4480">
				<?php if ($vacation_rentalsRecord['floor_plan']): ?> 
				<a target="blank" href="<?php echo $vacation_rentalsRecord['floor_plan'] ?>"><img src="http://www.montereyrentals.com/images/fp.jpg" border="0">Click to View Floor Plan</a></font></b><font size="2">
					<?php endif ?></font></p>
			 
			<p align="center">
			<a target="blank"  href="<?php echo $vacation_rentalsRecord['availabilitylink'] ?>"><img name="check" src="images/reserve.gif" width="181" height="43" border="0" alt=""></a> 
			<a href="nameyourprice.php">
			<img name="bid" src="images/bid.gif" width="181" height="43" border="0" alt=""></a></p>
			<div align="center">
				<table border="0" width="95%" id="table18">
					<tr>
						<td align="left" valign="top" width="48%"> 
									
			<font color="#2A4480" font size="2" face="Verdana"><b>View:</b></font><br>
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'view', $vacation_rentalsRecord['view'])); ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"><b>Amenities:</b></font><br>
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'amenities', $vacation_rentalsRecord['amenities'])); ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"> <b>	Communications:</b> </font><br>
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'communications', $vacation_rentalsRecord['communications'])); ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"><b>Fireplace(s):</b></font><br>
			<font size="1" color="#000000" face="Verdana"><?php echo $vacation_rentalsRecord['fireplace'] ?>-<?php echo join(', ', getListLabels('vacation_rentals', 'fireplace_location', $vacation_rentalsRecord['fireplace_location'])); ?>&nbsp; <?php echo join(', ', getListLabels('vacation_rentals', 'fireplace_type', $vacation_rentalsRecord['fireplace_type'])); ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"><b>Parking:</b></font><br>
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'parking', $vacation_rentalsRecord['parking'])); ?></font></td>
						<td align="left" valign="top" width="1">
						</td>
						<td align="left" valign="top" width="49%"><font face="Verdana">
						<font color="#2A4480" font size="2" face="Verdana"><b>Bed Types:</b></font><br>
			<font size="1" color="#000000"><?php echo $vacation_rentalsRecord['bed_types'] ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"><b>Kitchen Features:</b></font><br>
			
			<font size="1" color="#000000"><?php echo join(', ', getListLabels('vacation_rentals', 'kitchen_features', $vacation_rentalsRecord['kitchen_features'])); ?></font><p>
			<font color="#2A4480" font size="2" face="Verdana"><b>Entertainment:</b></font><br>
						
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'entertainment', $vacation_rentalsRecord['entertainment'])); ?></font><p>
		
			<font color="#2A4480" font size="2" face="Verdana">	<b>Outdoor Features:</b></font><br> 
			<font size="1" color="#000000" face="Verdana"><?php echo join(', ', getListLabels('vacation_rentals', 'outdoor_features', $vacation_rentalsRecord['outdoor_features'])); ?></font><p>
					<b>
					<font color="#2A4480" size="2">
					Applicable Taxes:<br>
					</font></b>
					<font face="Arial Narrow" size="1" color="#0E8A8A">(NIGHTLY &amp; WEEKLY 
					ONLY)</font><br>
<font size="1" color="#000000" face="Verdana"><?php echo $vacation_rentalsRecord['applicable_taxes'] ?></font></td>
					</tr>
				</table>
				&nbsp;</div>
			
			<div align="center">
<table border="1" width="90%" id="table19" bordercolor="#2A4480" style="border-collapse: collapse">
					<tr>
						<td bordercolor="#2A4480">
													<p align="center"><b>
													<font face="Verdana" color="#0E8A8A">
													TO MAKE RESERVATIONS...</font></b></p>
													<p align="center"><b>
													<font face="Verdana">
													<a target="blank"  href="<?php echo $vacation_rentalsRecord['availabilitylink'] ?>">
													<font color="#2A4480" size="3">Click 
													Here to Book Online 24/7</font></a></font></b></p>
													<font color="#0E8A8A" face="Verdana">
												
													<p align="center"> 
												<font size="2"><b>or Email: </b>
												</font>
												<span style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">
												<a href="mailto:Reservations@MontereyRentals.com">
												<font color="#2A4480">
												Reservations@MontereyRentals.com</font></a></span></font><font color="#2A4480" face="Verdana"><span style="font-size: 11pt; font-family: Calibri,sans-serif">
												</span></font>
													<font color="#2A4480" face="Verdana">
												


													
													<p align="center">
												</font><b>
												<font face="Verdana" size="2" color="#0E8A8A">
												or Phone: </font></b>
												<font color="#2A4480" size="2" face="verdana">
												831-655-7840</font><font color="#0E8A8A" face="Verdana"></p> </td>
					</tr>
				</table>
				<blockquote>
					<hr color="#0E8A8A">
</blockquote>
<div align="center">
	<table border="1" width="90%" id="table23" bordercolor="#0E8A8A" style="border-collapse: collapse">
		<tr>
			<td align="center">
			
				
				<p align="center"><b><font color="#2A4480" face="Verdana" font size="2">SOCIAL BOOKMARKING</font></b></p>
				<div align="center">
					<a onclick="window.open('http://www.facebook.com/sharer.php?u=<?php echo thisPageUrl() ?>', 'newWindow', 'width=600, height=400'); return false;" href="http://www.facebook.com/sharer.php?u=<?php echo thisPageUrl() ?>" target="_blank" title="Share on Facebook" class="share_icon facebook">
</a>

 <a onclick="window.open('http://twitter.com/home?status=I found a great vacation rental for my trip to the Monterey Bay!  Look!%20-%20<?php echo thisPageUrl() ?>', 'newWindow', 'width=815, height=436'); return false;" href="http://twitter.com/home?status=I found a great vacation rental for my trip to the Monterey Bay!  Look!%20-%20href=<?php echo thisPageUrl() ?>" target="_blank" title="Share on Twitter" class="share_icon twitter"></a> 

<a onclick="window.open('http://www.google.com/buzz/post?url=<?php echo thisPageUrl() ?>&type=normal-count&title=I found a great vacation rental for my trip to the Monterey Bay!  Look!%20-%20?<?php echo thisPageUrl() ?>', 'newWindow', 'width=626, height=436'); return false;" href="http://www.google.com/buzz/post?url=<?php echo thisPageUrl() ?>&type=normal-count&title=I found a great vacation rental for my trip to the Monterey Bay!  Look!" target="_blank" title="Share on Buzz" class="share_icon buzz"></a>
					<a href="mailto:?subject=<?php echo thisPageUrl() ?>" title="Email This Page To A Friend" class="share_icon email"></a></div>
				<iframe src="http://www.facebook.com/widgets/like.php?href=<?php echo thisPageUrl() ?>" scrolling="no" frameborder="0" style="border:none; width:320px; height:75px" name="I1" marginwidth="1" marginheight="1"></iframe>
			</td>
		</tr>
	</table>
	<blockquote>
		<hr color="#0E8A8A">
	</blockquote>
</div>
<div align="center">
	<table border="1" width="90%" id="table20" style="border-collapse: collapse" bordercolor="#2A4480" cellspacing="6" cellpadding="3">
		<tr>
			<td>
		
			 
				<div align="center">
					<blockquote>
						<p align="justify">
					 
						<font face="Verdana" size="2">It is the philosophy of <b>Monterey Bay Property 
						Management</b> that you should need to bring only your 
						clothes and your groceries when you are a guest in our 
						vacation rental homes.</font></p>
						<p align="justify">
					 		<font face="Verdana" size="2">Each home is fully furnished and equipped with cookware, 
						dinnerware, and kitchen linen. Beds have mattress pads, 
						sheets, pillows and pillow cases, blankets and bed 
						spreads or comforters. There are bath towels, hand 
						towels, and washcloths in the bathrooms, as well as 
						enough soap and paper products to get you started 
						comfortably.(<a mce_href="http://www.montereyrentals.com/furnishings.php" href="http://www.montereyrentals.com/furnishings.php">click 
						here for a complete list</a>)</font></p>
					</blockquote>
					<center >
					<div align="center" >
						<table style="WIDTH: 94%" id="table21" border="1" cellSpacing="0" borderColor="#0e8a8a" cellPadding="5">
							<tr>
								<td bgColor="#f0f0f0" borderColor="#2a4480" width="100%">
								<p align="justify">
							 	<font face="Verdana" size="2">Monthly rates include listed communications 
								services, cable or satellite TV, water, trash 
								collection, and all related taxes, fees and 
								move-out housekeeping. Some monthly rates do not 
								include gas and electricity - please inquire.</font></td>
							</tr>
						</table>
					</div>
					</center>
					</div>
				 
			
			</td>
		</tr>
	</table>
</div>
			</div>
				</td>
						</tr>
					</table>
					</div>
			</td>
		</tr>
		<tr>
			<td width="21" valign="top" height="250">&nbsp;               
   </td>
			<td width="2%" height="250" valign="top">&nbsp;</td>
		</tr>
		<tr>
			<td width="21" valign="top">&nbsp;
               
   </td>
			<td width="2%">&nbsp;</td>
		</tr>
	</table>
</div>
			<div align="center">  
			<div align="center">
				<div align="center"> <?php if ($overall_quality_of_this_property): ?>
					&nbsp;<table border="0" id="table25">
						<tr>
							<td>
							<p align="right"><b>
							<font color="#2A4480" face="Verdana">OUR CUSTOMERS'
							OVERALL PROPERTY RATING IS&nbsp;&nbsp; </font></b></td>
							<td width="225">


                                                       
                                                       
                                                          <img border="0" src="images/<?php echo $overall_quality_of_this_property ?>stars.gif" width="225" height="22">
                                                    

							<td><b><font color="#2A4480" face="Verdana">
							&nbsp;<a href="moreratings.php?<?php echo @$_SERVER['QUERY_STRING'] ?>" onclick="NewWindow(this.href,'name','640','420','yes');return false;"><font color="#2A4480">DETAILS HERE</font> </a>
							</font></b></td>
						</tr>
					</table>    <?php endif ?>
			</div>
			<br>
			<?php if($reviewsRecords) : ?>     
				<img border="0" src="images/pr.gif"> <?php endif ?>
				<table border="0" width="90%" id="table23" align="center">	
<p align="justify"><?php foreach ($reviewsRecords as $record): ?><tr> 
						<td align="left">   
	<font face="Verdana" size="3" color="#2A4480"><b><?php echo $record['property_code'] ?>-<?php echo $record['title'] ?></b></font>
	<br>
     		<font face="Verdana" size="2" color="#000000"> 	      <?php echo $record['content'] ?>
     		<font face="Verdana" size="2" color="#2A4480"> 	
      					<b>  <?php echo $record['reviewers_name'] ?> - <?php echo date("M jS, Y", strtotime($record['date'])) ?></b></font></font><font face="Verdana" size="2" color="#2A4480"><br><br><br></td>
		  	 	</tr>
		<?php endforeach ?></p></font></font><br></table>
			</div>	
    						<p align="center"><b><font size="1" face="Verdana">
    <?php if (!$vacation_rentalsRecord): ?>
      						No record found!<br/><br/>
    <?php endif ?>
 

  <a href="<?php echo $vacation_rentalsMetaData['_listPage']; ?>">&lt;&lt; Back to 
							list page</a> - 
  <a href="mailto:?subject=<?php echo thisPageUrl() ?>">Email this Page</a>
							</font>
							</b>




<?php include "include_footer.php"; ?>