<?php include_once "php/head.php"; ?>
<body onload="javascript:prepara('<?php echo $page ?>'); initialize_map();searchAnagrafiche();imposta_scroll();">
  <div id="schermo">
    <div id="slide_0" class="bg" style="background-image:url(<?php echo MAIN_DIR; ?>img/index.jpg); filter: alpha(opacity=00); opacity:.00; visibility:hidden;">&nbsp;</div>
    <div id="slide_1" class="bg" style="background-image:url(<?php echo MAIN_DIR; ?>img/index_1.jpg); filter: alpha(opacity=00); opacity:.00; visibility:hidden;">&nbsp;</div>
    <div id="slide_2" class="bg" style="background-image:url(<?php echo MAIN_DIR; ?>img/index_2.jpg); filter: alpha(opacity=00); opacity:.00; visibility:hidden;">&nbsp;</div>
    <div id="slide_3" class="bg" style="background-image:url(<?php echo MAIN_DIR; ?>img/index_3.jpg); filter: alpha(opacity=00); opacity:.00; visibility:hidden;">&nbsp;</div>
  </div>

  <div id="content">
    <table id="schema" cellpadding="0" cellspacing="0">
      <tr>
        <td id="logo">
          <a href="<?php echo MAIN_DIR; ?>">
            <img src="<?php echo MAIN_DIR; ?>img/logo_macagn.jpg" width="230" height="118" alt="MacagN - Formaggio di Regine e Gentiluomini" title="MacagN - Formaggio di Regine e Gentiluomini" />
          </a>
        </td>
        <td class="spacer_vert"></td>
        <td id="header" valign="top">
        </td>
        <td class="spacer_vert"></td>
        <td id="slow_food">
          <?php  include_once "php/sc_lingua.php"; ?>
          <a href="http://www.fondazioneslowfood.it/pagine/ita/presidi_italia/dettaglio_presidi.lasso?-id=3648">
          <img src="<?php echo MAIN_DIR; ?>img/fondino.png" width="150" height="116" alt="Macagn - Presidio Slow Food" title="Macagn - Presidio Slow Food" />
          </a>
        </td>
      </tr>
      <tr>
        <td class="forza"><img src="<?php echo MAIN_DIR; ?>img/forza.png" height="1" width="250" alt="" title=""/></td>
        <td class="forza"><img src="<?php echo MAIN_DIR; ?>img/forza.png" height="1" width="10" alt="" title=""/></td>
        <td class="forza"><img src="<?php echo MAIN_DIR; ?>img/forza.png" height="1" width="560" alt="" title=""/></td>
        <td class="forza"><img src="<?php echo MAIN_DIR; ?>img/forza.png" height="1" width="10" alt="" title=""/></td>
        <td class="forza"><img src="<?php echo MAIN_DIR; ?>img/forza.png" height="1" width="170" alt="" title=""/></td>
      </tr>
      <tr>
        <td id="spacer" colspan="5"></td>
      </tr>
      <tr>
        <td id="menu" valign="top">
          <?php  include_once "php/menu.php"; ?>
          <?php  include_once "php/traccia.php"; ?>
          <?php  include_once "php/news.php"; ?>
          <?php  include_once "php/search.php"; ?>
        </td>
        <td class="spacer_vert"></td>
        <td id="article" colspan="3" valign="top">
           <div class="notizia">
              <h1>Trova il tuo MacagN!!!</h1>
							<form name="ricerca" method="post" action="../ricerca">
              <table id="trova_macagn" cellpadding="0" cellspacing="0">
                <tr>
                  <td>
                    <span class="label">Nome Azienda</span><br />
                    <select name="cod">
                      <option value="">Scegli l'azienda..</option>
<?php
	if ($anagrafica = getAnagrafiche("",$_GET['lang'])) {
		foreach($anagrafica as $a) {
?>
                      <option value="<?php echo $a['cod']; ?>"><?php echo $a['nome']." ".$a['cognome']; ?></option>
<?php
		}
	}
?>
                    </select>
                  </td>
                  <td>
                    <span class="label">Tipologia</span><br />
                    <select name="tipologia">
                      <option value="">Scegli la tipologia..</option>
                      <option value="PRODUTTORE">Produttore</option>
                      <option value="STAGIONATORE">Stagionatore</option>
                      <option value="PUNTO VENDITA">Punto Vendita</option>
                      <option value="RISTORATORE">Ristoratore</option>
                      <option value="CUOCO">Cuochi dell'alleanza</option>
                    </select>
                  </td>
                  <td></td>
                </tr>
                <tr>
                  <td>
                    <span class="label">Codice Produttore</span><br />
                    <input name="codice_produttore" type="text" />
                  </td>
                  <td>
                    <span class="label">Codice Univoco Forma</span><br />
                    <input name="codice_stagionatore" type="text" />
                  </td>
                  <td></td>
                </tr>
                <tr>
                  <td><span class="label">Provincia</span><br />
                    <select name="provincia">
                      <option value="">Scegli la Provincia..</option>
<?php
	$locations = new Application_Model_DbTable_Locations();
	$locations -> _group = 'admin_code2';
	$locations -> _order = 'admin_code2';
	if($result=$locations->getAll())
	foreach($result as $item) {
?>
											<option value="<?php echo $item['admin_code2'];?>"><?php echo $item['admin_code2'];?></option>
<?php
	}
?>
                    </select>
                  </td>
                  <td>
                    <span class="label">Regione</span><br />
                    <select name="regione">
                      <option value="">Scegli la Regione..</option>
<?php
	$locations = new Application_Model_DbTable_Locations();
	$locations -> _group = 'admin_name1';
	$locations -> _order = 'admin_name1';
	if($result=$locations->getAll())
	foreach($result as $item) {
?>
											<option value="<?php echo $item['admin_name1'];?>"><?php echo $item['admin_name1'];?></option>
<?php
	}
?>
                    </select>
                  </td>
                  <td>
                    <button type="reset" value="reset">Cancella</button>
                    <button id="invia" type="submit">Cerca!</button>
                  </td>
                </tr>
              </table>
							</form>
            </div>

            <div class="notizia">
              <h1>Guarda la mappa</h1>
								<div id="map_canvas" style="width:690px;height:500px; margin:10px 25px 10px 25px;"></div>
            </div>
        </td>
      </tr>
      <tr>
        <td id="spazio_sottotesto" colspan="5"></td>
      </tr>
    </table>
  </div>
<?php  include_once "php/footer.php"; ?>

</body>
</html>
