<?php
    include("connection.php");
    include("frames_header.php");
?>

<SCRIPT>
function enableField(){
    if(document.formulaire.type[0].checked==true){
        document.formulaire.user.disabled=false;
		document.formulaire.auto.disabled=false;
		document.formulaire.blast.disabled=false;
	}else{
        document.formulaire.user.disabled=true;
		document.formulaire.auto.disabled=true;
		document.formulaire.blast.disabled=true;
	}
}
</SCRIPT>

<h2><strong><em>Molecule search.</em></strong> </h2>
<center>
<form name="formulaire" action="molecule-result.php" method="get" target="_blank">
	        
    <table width="99%" border="0" cellspacing="0" cellpadding="0" background="pictures/barre.jpg">
      <tr bgcolor="#990000"> 
        <td></td>
        <td></td>
        <td></td>
        <td align="right" background="pictures/barre-red.jpg"><em><strong>Molecule 
          search</strong></em></td>
      </tr>
      <tr> 
        <td align="right"><br> <br> <strong>Species</strong></td>
        <td align="left"> <br> <br> <select name="species" size="1">
            <option></option>
			
				<?php
						$requete="Select \"NAME\" from \"SPECIES\" order by \"NAME\"";
						$stmt = pg_query($c,$requete);
						while( $row=pg_fetch_array($stmt) ){
							$name=$row["NAME"];
							print "<option>$name</option>";
						}
				?>
			
          </select> </td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr> 
        <td align="right"><br> <strong>Name</strong></td>
        <td align="left"> <br> <input name="name" type="text" size="20"> </td>
        <td align="right"><br> <strong>Type</strong></td>
        <td align="left"> <br> 
	<input name="type" type="radio" value="2" checked  onClick="javascript: self.enableField();">
          Gene <font size="-1">(e.g. ci0100133709, otx, tyrosinase)</font> <br> 
          <input name="type" type="radio" value="3" onClick="javascript: self.enableField();">
          Clone <font size="-1">(e.g. 002ZE11)</font> <br> <input name="type" type="radio" value="1" onClick="javascript: self.enableField();">
          Clone sequence <font size="-1">(e.g. 002ZE11, AF305499) </font> </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr> 
        <td valign="top"><hr color="#505F70" size="1"></td>
        <td valign="top"><hr color="#505F70" size="1"></td>
        <td valign="top"><hr color="#505F70" size="1"></td>
        <td valign="top"><hr color="#505F70" size="1"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td align="center"><strong>Search gene name in:</strong></td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td><input type="checkbox" name="user" value="y" checked> &nbsp;Manual 
          annotation</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td><input type="checkbox" name="auto" value="y" checked> &nbsp;Automatic 
          annotation (Ortholog prediction)</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td><input type="checkbox" name="blast" value="y"> &nbsp;Best BLAST 
          hits</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr> 
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;&nbsp;&nbsp;</td>
        <td align="right"> <br> <br> <input name="submit" type="image" src="pictures/button-submit.jpg" onClick="submit"> 
          &nbsp;&nbsp;&nbsp; <br> <br> </td>
      </tr>
    </table>

</form>
</center>





<?php
    include("frames_footer.php");
?> 