<link rel="stylesheet" type="text/css" href="catalog/template/default/css/search.css">

<div class="heading"><?php echo $heading_title; ?></div>

<div id="search">

  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">

    <div class="a"><?php echo $text_critea; ?></div>

    <div class="b">

      <div class="c">

        <table>

          <tr>

            <td><?php echo $entry_search; ?></td>

            <td><?php if ($search) { ?>

              <input type="text" name="search" value="<?php echo $search; ?>" />

              <?php } else { ?>

              <input type="text" name="search" value="<?php echo $text_keywords; ?>" onclick="this.value = ''" />

              <?php } ?></td>

          </tr>

          <tr>

            <td colspan="2"><?php if (!$description) { ?>

              <input type="checkbox" name="description" />

              <?php } else { ?>

              <input type="checkbox" name="description" CHECKED />

              <?php } ?>

              <?php echo $entry_description; ?></td>

          </tr>

        </table>

      </div>

      <div class="buttons">

        <table>

          <tr>

            <td align="right"><input type="submit" value="<?php echo $button_search; ?>" /></td>

          </tr>

        </table>

      </div>

    </div> 

  </form>

  <div class="heading"><?php echo $text_search; ?></div>

  <?php if (isset($products)) { ?>

  <div class="results">

    <div class="left"><?php echo $text_results; ?></div>

    <div class="right"><?php echo $entry_page; ?>

      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">

        <select name="page" onchange="this.form.submit();">

          <?php foreach ($pages as $pages) { ?>

          <?php if ($pages['value'] == $page) { ?>

          <option value="<?php echo $pages['value']; ?>" SELECTED><?php echo $pages['text']; ?></option>

          <?php } else { ?>

          <option value="<?php echo $pages['value']; ?>"><?php echo $pages['text']; ?></option>

          <?php } ?>

          <?php } ?>

        </select>

      </form>

    </div>

  </div>

  <?php foreach ($products as $product) { ?>

  <div class="products"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a><br />

    <b><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></b><br />

    <?php echo $product['price']; ?></div>

  <?php } ?>

  <div class="results">

    <div class="left"><?php echo $text_results; ?></div>

  </div>

  <?php } else { ?>

  <div class="d"><?php echo $text_error; ?></div>

  <?php }?>

</div>

