<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */

  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('C:/inetpub/wwwroot/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
  
    list($categoriesRecords, $selectedCategory) = getCategories(array( 
    'tableName'   => 'categories',
  )); 

  // load records
  list($productsRecords, $productsMetaData) = getRecords(array(
    'tableName'   => 'products',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $productsRecord = @$productsRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$productsRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  

?>
<?PHP function textLimit($string, $length, $replacer = '...') 
{ 
if(strlen($string) > $length) 
return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer; 
 
return $string; 
} 
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>Wilson Trailer - Store - <?php echo $productsRecord['title'] ?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name = "description" content="" />
	<meta name = "keywords" content = "" />
	<link rel="stylesheet" type="text/css" href="../stylesheets/screen.css" />
   	<script type="text/javascript" src="../swfobject.js"></script>
    	<script src="../SpryAssets/SpryEffects.js" type="text/javascript"></script>
    	<script type="text/javascript">
var flashvars = {};
			var params = {};
			params.scale = "noscale";
			params.salign = "tl";
			params.wmode = "transparent";
			params.allowfullscreen = "false";
			var attributes = {};
			swfobject.embedSWF("BannerRotatorFX.swf", "BannerRotatorFXDiv", "970", "400", "9.0.0", false, flashvars, params, attributes);
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
        </script>
    <script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>

	<script src="../navigation.js"></script>
    
    
    
    		<script type="text/javascript" src="../jquery-1.4.4.min.js"></script>
		<script type="text/javascript">
			$(function() {
			$('ul.hover_block li').hover(function(){
				$(this).find('img').animate({top:'68px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
			});
			$('ul.hover_block2 li').hover(function(){
				$(this).find('img').animate({top:'68px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
			});
			$('ul.hover_block3 li').hover(function(){
				$(this).find('img').animate({top:'68px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
			});
			$('ul.hover_block4 li').hover(function(){
				$(this).find('img').animate({top:'68px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
			});
		});
		</script>
<SCRIPT language="JavaScript">
    	<!--
		    if (document.images)
		    {
		      preload_image_object = new Image();
		      // set image url
		      image_url = new Array();
			  image_url.push("/images/NavigationRollovers/CommodityDefault.jpg");
			  image_url.push("http://www.jdgordonadvertising.com/wilsontrailerimages/NavigationRollovers/FlatbedDefault.jpg");
			  image_url.push("/images/NavigationRollovers/GooseneckDefault.jpg");
			  image_url.push("/images/NavigationRollovers/LivestockDefault.jpg");
			  image_url.push("/images/NavigationRollovers/PSAGL.jpg");
			  image_url.push("/images/NavigationRollovers/PSAL.jpg");
			  image_url.push("/images/NavigationRollovers/SilverStar.jpg");
		      for(var i=0; i < image_url.length; i++) 
			  {
		        preload_image_object.src = image_url[i];
			  }
		    }
	    //-->
	    </SCRIPT>
    <link href="../wilson.css" rel="stylesheet" type="text/css" />
</head>
	<body>
   	  <div class="container" id="container">
      <!--START OF NAVIGATION HEADER-->
	<?php include("../navigation.php"); ?>
<!--END OF NAVIGATION HEADER-->
<div class="content floatleft" style="z-index: 1; position: relative"><div id="sidenavigationwrapper"><img src="/_images/sidenav-topbar.jpg" alt=" " width="200" height="22" border="1" />
  <div id="sidenavigation">
  <ul class="productSideNav"> 
    <?php foreach ($categoriesRecords as $categoryRecord): ?> 
      <?php echo $categoryRecord['_listItemStart'] ?> 
       
      <?php if ($categoryRecord['_isSelected']): ?><b><?php endif ?> 
      <a href="product_list.php?category=<?php echo $categoryRecord['num'] ?>"><?php echo $categoryRecord['name'] ?></a> 
      <?php if ($categoryRecord['_isSelected']): ?></b><?php endif ?> 
       
      <?php echo $categoryRecord['_listItemEnd'] ?> 
    <?php endforeach ?> 
  </ul> 
<p>&nbsp;</p>
  </div>
  <img src="/_images/sidenav-bottombar.jpg" width="200" height="18" alt=" " /></div>

  <div id="storecontent">
    <div id="saleslocationheaderwrapper">
      <p><span class="saleslocationheader">Store</span>  </p>
    </div>
    <div id="storewrapper">
      <p><img src="StoreBanner.jpg" width="741" height="143" alt="parts header" /></p>
      <p>Pride of ownership is one of those emotions most people don't try to suppress.</p>
      <p>Owning a Wilson trailer means you have an appreciation for quality, performance, and design. Why not display that Wilson pride with some of the quality items we have selected for purchase here? Choose a category from the menu on the left to browse through the available merchandise. Call <strong>800-728-5334</strong> to speak to one of our customer service representatives. We accept Mastercard, Visa, and Discover.</p>
      <p class="productHeader"><?php echo htmlspecialchars($_REQUEST['category']) ?></p>    <!-- STEP 2a: Display Uploads for field 'product_image' (Paste this anywhere inside STEP2 to display uploads) -->
        <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
        <?php foreach ($productsRecord['product_image'] as $upload): ?>
          <?php if ($upload['isImage']): ?>
        <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" class="imageProductRight" /><br/>

          <?php else: ?>
            <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->
      <?php if ($productsRecord['notice']): ?><p><?php echo $productsRecord['notice'] ?></p><?php endif ?>
      <h2><?php echo $productsRecord['title'] ?></h2>
      <p><?php echo $productsRecord['content'] ?></p>
      <?php if ($productsRecord['features']): ?>
      <p><strong>FEATURES:</strong><br />
      <?php echo $productsRecord['features'] ?></p><?php endif ?>
      <?php if ($productsRecord['price_range']): ?><p><?php echo $productsRecord['price_range'] ?></php><?php else: ?><p class="productPriceDisplay"><?php echo $productsRecord['price'] ?></p><?php endif ?>
      <p class="productCall">Call 800-728-5334</p>
<p>&nbsp;</p>
    </div>
       


    <div id="subpagecontentbottom"></div><div id="subpagecontentseperatorline">&nbsp;</div>
  </div>
</div>
<?php include("../_include/banner-footer.php"); ?>
<?php include("../_include/footer.php"); ?>
	</body>
</html>