<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NF47Q8S"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<div class="header clearfix">
  <div class="mashead clearfix">
    <div class="utils">
      <a href="<? echo $main_site_url ?>/Swim/index.html" class="sprite-swim">Swim</a>
      <a href="<? echo $main_site_url ?>/Bike/index.html" class="sprite-bike">Bike</a>
      <a href="<? echo $main_site_url ?>/Run/index.html" class="sprite-run">Run</a>
    </div>
    <div class="grphead clearfix">
      <div class="brand">
        <a href="<? echo $main_site_url ?>" alt="Slowtwitch" class="sprite-brand">Slowtwitch.com</a>
      </div>

      <div class="navbar utility">
        <ul class="nav">
          <li class="welcome">
            <? if (is_logged_in($user)) { ?>
              <a href="<? echo $forum_url . "?do=logout" ?>" class="logout">Log out</a>
            <? } else { ?>
              <a href="<? echo $forum_url . "?do=login" ?>">Login <span>&gt;</span></a>
            <? } ?>
          </li>
          <li class="subscribe">
              <a href="#>">Subscribe <span>&gt;</span></a>
              <div class="subscribe-form clearfix">
                <? include $common_path . "/templates/include_subscribe.html" ?>
              </div>
          </li>
        </ul>
        <div class="clearall"></div>
        <div class="brand-b clearfix">
          <a href="<? echo $main_site_url ?>" alt="Slowtwitch" class="sprite-brand">Slowtwitch.com</a>
          <div class="controller">
            <a rel="main-search" href="#" class="sprite-magnify">Search</a>
            <a href="#" class="sprite-menu">menu</a>
            <div class="navbar menu-b"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- tablet & mobile floating search box -->
    <div id="main-search" class="form search-form search-widget">
      <? $search_url = $main_site_url . '/cgi-bin/articles/search.cgi'; ?>
      <form action="<? echo $search_url ?>" method="post" enctype="application/x-www-form-urlencoded">
        <input type="hidden" name="do" value="search_results" />
        <div class="row-b">
          <span class="sprite-search-btn"></span>
          <input type="text" name="query" class="txt article_keyword" placeholder="Search keyword..." />
          <a href="<? echo $main_site_url ?>" class="sprite-x">x</a>
        </div>
        <div class="row">
          <select>
              <option value="<? echo $search_url ?>" selected>Knowledge Base</option>
              <option value="<? echo $forum_url . '/gforum.cgi' ?>">All forums</option>
          </select>
          <a href="<? echo $search_url ?>" title="Advanced Search">Advanced Search</a>
          <input type="submit" value="Search" class="btn" />
        </div>
      </form>
    </div>
  </div><!-- end mashead -->

  <div class="mashead-b clearfix">
    <a href="<? echo $main_site_url ?>" class="sprite-logo">Logo</a>
    <div class="adbox">
      <div class="adhori">
        <? include($common_path . "/ads/ad_728x90.html"); ?>
      </div>
    </div>
    <div class="social-sm">
        <? include $common_path . "/templates/include_social.html" ?>
        <div class="main-search search-widget">
            <form action="<? echo $search_url ?>" method="get">
                <input type="hidden" name="do" value="search_results" />
                <select>
                    <option value="<? echo $search_url ?>" selected>Knowledge Base</option>
                    <option value="<? echo $forum_url . '/gforum.cgi' ?>">Forum</option>
                    <option value="<? echo $search_url ?>">Advanced Search</option>
                </select>
                <input type="text" name="query" class="txt article_keyword" placeholder="Search keyword..." />
            </form>
        </div>
        <a href="#" class="sprite-magnify">Search</a>
    </div>
  </div><!-- end mashead-b -->

  <div id="menu" class="navbar menu">
    <ul class="nav">
      <li>
          <a href="<? echo $main_site_url ?>/Products/index.html" rel="products">Products</a>
          <span class="expand"><a class="sprite-expand"></a></span>
          <div class="subnav clearfix">
            <ul>
              <li><a href="<? echo $main_site_url ?>/Products/Running_Footwear_by_brand/index.html">Running Footwear</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/Cycling_footwear/index.html">Cycling Footwear</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/Wetsuit_by_brand/index.html">Wetsuits</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/Products/Components/index.html">Components</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/Electronics/index.html">Electronics</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/Lights/index.html">Lights</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/Products/Saddles/index.html">Saddles</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/Handlebars/index.html">Handlebars</a></li>
              <li><a href="<? echo $main_site_url ?>/Products/index.html">Tri Bike</a></li>
<!--              <li><a href="<? echo $main_site_url ?>/Products/Stationary/index.html">Stationary</a></li> -->
              <li><a href="<? echo $main_site_url ?>/Products/Things_that_Roll/index.html">Things that Roll</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/Products/Old_reviews/index.html">Archive</a></li>
            </ul>
          </div>
      </li>
      <li>
          <a href="<? echo $main_site_url ?>/local/" rel="local">Local Listing</a>
          <span class="expand"><a class="sprite-expand"></a></span>
          <div class="subnav clearfix">
            <ul>
              <li><a href="<? echo $main_site_url ?>/runshops/">Running Stores</a></li>
              <li><a href="<? echo $main_site_url ?>/retailers/">Bike Shops</a></li>
              <li><a href="<? echo $main_site_url ?>/coaches/">Coaches</a></li>
              <li><a href="<? echo $main_site_url ?>/fitters/">Fitter's Database</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/triclubs/">Triathlon Clubs</a></li>
              <li><a href="<? echo $main_site_url ?>/calendar/">Race Calendar</a></li>
              <li><a href="<? echo $main_site_url ?>/local/map.php">Map Of Everything</a></li>
              <li><a href="<? echo $main_site_url ?>/local/user_listings.php">Your Local Listings</a></li>
            </ul>
          </div>
      </li>
      <li>
        <a href="<? echo $main_site_url ?>/Articles/index.html" rel="articles">Articles</a>
        <span class="expand"><a class="sprite-expand"></a></span>
        <div class="subnav clearfix">
          <ul>
            <li><a href="<? echo $main_site_url ?>/News/index.html">News</a></li>
            <li><a href="<? echo $main_site_url ?>/Features/index.html">Features</a></li>
            <li><a href="<? echo $main_site_url ?>/Lifestyle/index.html">Lifestyle</a></li>
            <li><a href="<? echo $main_site_url ?>/Opinion/index.html">Opinion</a><hr /></li>
          </ul>
          <ul>
            <li><a href="<? echo $main_site_url ?>/Interview/index.html">Interviews</a></li>
          </ul>
          <ul>
            <li><a href="<? echo $main_site_url ?>/Tech/index.html">Tech</a></li>
            <li><a href="<? echo $main_site_url ?>/Training/index.html">Training</a></li>
          </ul>
          <ul>
            <li><a href="<? echo $main_site_url ?>/Bike_Fit/index.html">Bike Fit</a><hr /></li>
          </ul>
        </div>
      </li>
      <li>
        <a href="<? echo $main_site_url ?>/Photos/index.html" rel="photos">Photos</a>
      </li>
      <li>
        <a href="<? echo $main_site_url ?>/Indoor_Training/index.html" rel="indoor_training">Indoor</a>
      </li>
<li>
        <a href="<%main_site_url%>/Races/index.html" rel="races">Race</a>
        <span class="expand"><a class="sprite-expand"></a></span>
        <div class="subnav clearfix">
          <ul>
            <li><a href="<? echo $main_site_url ?>/calendar/">Race Calendar</a></li>
            <li><a href="<? echo $main_site_url ?>/RD_Aids/index.html">RD Aids</a></li>
          </ul>
        </div>
      </li>
		<li>
      <a href="<? echo $main_site_url ?>/Training/index.html" rel="training">Train</a>
        <span class="expand"><a class="sprite-expand"></a></span>
        <div class="subnav clearfix">
          <ul>
            <li><a href="<? echo $main_site_url ?>/Training/Beginners/index.html">Beginner</a></li>
            <li><a href="<? echo $main_site_url ?>/Training/General_Training/index.html">General Training</a></li>
            <li><a href="<? echo $main_site_url ?>/Training/General_Physiology/index.html">General Physiology</a><hr /></li>
          </ul>
          <ul>
            <li><a href="<? echo $main_site_url ?>/Training/Swimming/index.html">Swimming</a></li>
            <li><a href="<? echo $main_site_url ?>/Training/Running/index.html">Running</a></li>
            <li><a href="<? echo $main_site_url ?>/Training/Cycling/index.html">Cycling</a></li>
          </ul>
        </div>
      </li>
      <li>
        <a href="https://shop.slowtwitch.com/" rel="shop">Shop</a>
        </li>
      <li>
        <a href="<? echo $main_site_url ?>/Podcast/index.html" rel="podcast">Podcast</a>
        </li>
      <li>
          <a href="<? echo $main_site_url ?>/Bike_Fit/index.html" rel="bikefit">Bike Fit</a>
          <span class="expand"><a class="sprite-expand"></a></span>
          <div class="subnav clearfix">
            <ul>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/General_Fit_Articles/index.html">General</a></li>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/Bike_Fit_Equipment_and_Tools/index.html">Equipment and tools</a></li>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/Geometry_and_Handling/index.html">Geometry &amp; Handling</a></li>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/Choosing_a_Tri_Bike_via_Stack_and_Reach/index.html">Choosing via Stack/Reach</a><hr /></li>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/Road_Bike_Fit/index.html">Road Bike Fit</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/F_I_S_T__Workshops/index.html">F.I.S.T. Workshops</a></li>
              <li><a href="<? echo $main_site_url ?>/Bike_Fit/F_I_S_T__Tri_bike_fit_system/index.html">F.I.S.T. Tri Bike System</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/fit_calculator/stem_calc.php">STEM Calculator</a></li>
              <li><a href="<? echo $main_site_url ?>/fit_calculator/bar_bore_calc.php">Bar to HT Calculator</a></li>
              <li><a href="<? echo $main_site_url ?>/fit_calculator/fit_calculator.php">TRI Geometry Calculator</a><hr /></li>
              <li><a href="<? echo $main_site_url ?>/stackreach/">Stack/Reach Database</a><hr /></li>
            </ul>
            <ul>
              <li><a href="<? echo $main_site_url ?>/fitters/">Fitter's Database</a></li>
              <li><a href="<? echo $forum_url ?>?forum=10">Fitter's Forum</a></li>
            </ul>
          </div>
      </li>
      <li>
          <a href="<? echo $forum_url ?>">Forum</a>
      </li>
    </ul>
  </div><!-- end navbar -->
</div><!-- end header -->
