<?php
/*
function output_dealer($dealer_row, $output2, $dealertype, $demo_program_product_line){
$demo_link="";

$name = ucwords(strtolower($dealer_row["Name"]));
$city = ucwords(strtolower($dealer_row["City"]));
 $output2 = $output2."<font size=\"2\" color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>".stripslashes($name)."</strong> - ".$city.", ".$dealer_row["StateCode"]."</font><br><a href=\"javascript:demo_window('".$dealer_row["Id"]."','$demo_program_product_line')\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Demo Program Details</font></a> - <a href=\"/company/results.php?dealercode=".$dealer_row["DealerNumber"].$dealer_row["LocationCode"]."&dealertype=$dealertype\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Contact ".$name."</font></a><br><br>";
return $output2;
}
require("/var/www/php/db_fns.php");
$demo_program_product_line = stripslashes($_GET["demo_program_product_line"]);
if ($demo_program_product_line == "S"){
$title = "Sailboat";
$switch1 = "K";
$switch1title = "Kayak";
$dealertype="W";
}
elseif ($demo_program_product_line == "K"){
$title = "Kayak";
$switch1= "S";
$switch1title = "Sailboat";
$dealertype="K";
}

else{
$demo_program_product_line = "S";
$title = "Sailboat";
$switch1 = "K";
$switch1title = "Kayak";
}

$output = "";
$result = "";

db_connect();
mysql_select_db("www");

$query = "select D.DealerNumber, DL.*, C.Name as country from DealerLocations as DL INNER JOIN Dealers as D on DL.DealerId = D.Id INNER JOIN Countries C on DL.CountryCode = C.CountryCode where DL.IsActive = 1 and D.IsActive = 1 AND DL.LocationTypes LIKE '%R%' AND DL.DemoProgramProductLines like '%$demo_program_product_line%' order by DL.CountryCode desc, DL.StateCode asc";
$result = mysql_query($query);

$num_rows = mysql_num_rows($result);

$state = "";
$country = "";
for ($i=0; $i<$num_rows; $i++){
$row = mysql_fetch_array($result);
if ($row["country"] <> $country) {
$output .= "<font size=\"2\" color=\"#6666CC\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong><u>".$row["country"]."</u></strong></font><br><br>";
$country = $row["country"];
}
$output = output_dealer($row, $output, $dealertype, $demo_program_product_line);
}
if ($num_rows == 0){
$output = "<font size=\"2\" color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>There are currently no $title demo locations.</strong></font>";
}
*/ ?>
<HTML>
<HEAD>
  <META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win">
  <TITLE>Hobie Company</TITLE>
  <link rel="stylesheet" type="text/css" href="/media/site_styles.css">
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><script language="JavaScript1.2" src="/scripts/javascript/menu_data.js"></script>      
  <script language="JavaScript1.2" src="/scripts/javascript/dqm_script.js"></script>
  
<SCRIPT language="JavaScript" src="../scripts/javascript/standardscripts.js"></SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">

  <!--Begin Header -->
  <!-- #BeginLibraryItem "/media/library/Company_Header.lbi" -->

<tr>
      
  
<td background="/media/images/header_background.gif" height="80"> 
    <table width="660" border="0" cellspacing="0" cellpadding="0" height="73">
        <tr> 
          <td width="29" height="73"> <img src="/media/images/header_left_spacer.gif" width="29" height="75"naturalsizeflag="0" align="BOTTOM"> 
		  </td>
		  
          <td width="135" height="73"> <a href="/index.html" target="_top"><img src="/media/images/header_hobie.gif" width="135" height="75" border="0" naturalsizeflag="0" align="BOTTOM" alt="Hobie Cat - Home"></a> 
		  </td>

          <td width="247" height="73"> <img src="/company/images/header_sectionname.gif" width="247" height="75" naturalsizeflag="0" align="BOTTOM"> 
		  </td>
		  
          <td width="74" height="73"> <a href="/sailing/index.html" target="_top"><img src="/media/images/header_products.gif" border="0" width="74" height="75" naturalsizeflag="0" align="BOTTOM" name="menu0" id="menu0" onMouseOver="showMenu(event)" onMouseOut="hideMenu(event)"></a> 
		  </td>
        
		  <td width="62" height="73"> <a href="/support/index.html" target="_top"><img src="/media/images/header_support.gif" border="0" width="67" height="75" naturalsizeflag="0" align="BOTTOM" name="menu1" id="menu1" onMouseOver="showMenu(event)" onMouseOut="hideMenu(event)"></a> 
		  </td>
		  
          <td height="73"> <a href="/company/contact.html" target="_top"><img src="/media/images/header_company.gif"  border="0" width="108"height="75" naturalsizeflag="0" align="BOTTOM" name="menu2" id="menu2" onMouseOver="showMenu(event)" onMouseOut="hideMenu(event)"></a> 
		  </td>
      </tr>
   </table>
</td>
</tr><!-- #EndLibraryItem --><!--End Header -->
  <tr>
    <td> 
      <table width="661" border="0" cellspacing="0" cellpadding="0">
  <tr> 
          <td width="122"><img src="images/in_top_left.gif" width="106" height="14"></td>
          <td width="30"><img src="images/in_top_middle.gif" width="30" height="14"></td>
          <td width="562"><img src="images/in_top_right.gif" width="508" height="14"></td>
  </tr>
  <tr> 
    <td rowspan="8" valign="top" width="106"> 
      <table border=0 cellpadding=0 cellspacing=0>
        <tr>
          <td><a href="contact.html"><img src="images/left_nav_01.gif" alt="Contact Hobie" width=106 height=24 border="0"></a></td>
        </tr>
        <tr>
          <td><p><a href="dealer.html"><img src="images/left_nav_02.gif" alt="Locate a Dealer" width=106 height=24 border="0"></a></p></td>
        </tr>
        <tr>
          <td><p><a href="demo-dealers.php"><img src="images/left_nav_02demo.gif" alt="Dealer Product Demonstration Locations" width="106" height="38" border="0"></a><a href="news.html"></a></p></td>
        </tr>
        <tr>
          <td><a href="news.html"><img src="images/left_nav_03.gif" alt="Hobie News" width=106 height=24 border="0"></a></td>
        </tr>
        <tr>
          <td><a href="/company/awards.html"><img src="/company/images/left_nav_awards.gif" alt="Hobie Awards" width="106" height="24" border="0"></a></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
<tr>
                <td>&nbsp; </td>
</tr>
</table>
    </td>
          
  </tr>

  <tr> 
          <td width="30" valign="top" background="images/in_bkgdline.gif">&nbsp;</td>
    <td valign="top" width="562"> 
      <table width="547" border="0" cellspacing="0" cellpadding="0">
        <tr valign="top"> 
                <td colspan="2"><img src="images/trans_5x5.gif" width="391" height="5"></td>
                <td rowspan="2" width="152"> 
                  <table width="120" border="0" cellspacing="0" cellpadding="0">
              <tr valign="top"> 
                      <td><img src="images/more_photos_head.gif" width="120" height="60"></td>
              </tr>
			  <tr valign="top"> 
                      <td><a href="/sailing/index.html"><img src="images/addl_photo1.jpg" width="120" height="109" border="0"></a></td>
              </tr>
			  <tr valign="top"> 
                      <td><a href="/kayaking/index.html"><img src="images/addl_photo2.jpg" width="120" height="120" border="0"></a></td>

              <tr valign="top"> 
                      <td><a href="/fishing/index.html"><img src="images/addl_photo3.jpg" width="120" height="109" border="0"></a></td>
              </tr>

            </table>
          </td>
        </tr>
        <tr valign="top"> 
          <td width="4"> 
                  <p><img src="images/trans_5x5.gif" width="4" height="5"></p>
          </td>
                <td width="391"> 
                  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><b><font color="#666666"><font color="#6666cc">Hobie 
                    Cat <?php echo $title; ?> Demo Locations:</font></font></b></font><br>
                    <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font color="#666666"><font color="#6666cc"><?php echo "<a href=\"demo-dealers.php?demo_program_product_line=$switch1\">$switch1title Demos</a>"; ?></font></font></b></font>
					<br><br>
                    <?php echo $output; ?></p>
                  <table border="0"><tr>
                      <td width="180" valign="top"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1">&nbsp;</font></td>
                      <td width="200"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1"><font color="#000000"> 
                        </font></font></td>
                    </tr></table>
                  <p>&nbsp;</p>
                  <br>
                    <br>
                  
                  <hr>

          </td>
        </tr>
        <tr valign="top">
          <td width="4">&nbsp;</td>
          <td width="391">&nbsp;</td>
                <td width="152">&nbsp;</td>
        </tr>
      </table>
            <p>
            <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      </td>
  </tr>
</table>
  

        <tr>
    <td bgcolor="#FF9900"> 
      <table width="636" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="139"> <a href="/sailing/index.html" target="_top"><img src="../media/images/bottom_nav_1.gif"

    width="139" height="36" alt="Hobie Cat" border="0" naturalsizeflag="0"

    align="BOTTOM"></a> </td>
          <td width="101"> <a href="/kayaking/index.html" target="_top"><img src="../media/images/bottom_nav_2.gif"

    width="101" height="36" alt="Float Cat" border="0" naturalsizeflag="0"

    align="BOTTOM"></a> </td>
          <td width="91"> <a href="/fishing/index.html" target="_top"><img src="../media/images/bottom_nav_3.gif"

    width="91" height="36" alt="Fishing" border="0" naturalsizeflag="0"

    align="BOTTOM"></a> </td>
          <td width="93"> <a href="/company/contact.html" target="_top"><img src="../media/images/bottom_nav_4.gif"

    width="93" height="36" alt="Contact" border="0" naturalsizeflag="0"

    align="BOTTOM"></a> </td>
          <td width="131"> <a href="/company/dealer.html" target="_top"><img src="../media/images/bottom_nav_5.gif"

    width="131" height="36" alt="Dealers" border="0" naturalsizeflag="0"

    align="BOTTOM"></a> </td>
          <td> <a href="/index.html" target="_top"><img src="../media/images/bottom_nav_6.gif"

    width="98" height="36" border="0" naturalsizeflag="0" align="BOTTOM"

    alt="Hobie Cat - Home"></a> </td>
        </tr>
      </table></td></tr>
  </table><br>
</BODY>
</HTML>
