<?php
    //connection
	include("connection.php");
	
	$regionarray=array();
	array_pop($regionarray);
	$idanatarray=array();
	array_pop($idanatarray);
	
	
	if(isset($_POST["celllist"])){
		$regionarray=split(":",$_POST["celllist"]);
		array_pop($regionarray);
	    $idanatarray=$regionarray;
        array_pop($idanatarray);
	}else{
	
	if(isset($_GET["region"])){
		$regionarray=split(":",$_GET["region"]);
		array_pop($regionarray);
	}
    if(isset($_GET["idanat"])){
	    $idanatarray=split(":",$_GET["idanat"]);
        array_pop($idanatarray);
	}
	
	}
	
?>

<SCRIPT>

var selected_part=new Array();

<?php

    //init du tableau avec les valeurs de l'espece precedente
	if(count($regionarray)==count($idanatarray)){
		for($a=0;$a<count($regionarray);++$a){
			print "self.addtoarray('$regionarray[$a]','$idanatarray[$a]');";
		}
	}

?>

function popup_anatomy_selector() {

  tab=window.document.formulaire2.iddev.value.split(":");
  dev = "";
  names = "";
  for(a=1; a<window.document.formulaire.devstage.options.length; ++a){
  	if(window.document.formulaire.devstage.options[a].selected==true){
	  	dev+= tab[a-1]+':';
		names+= window.document.formulaire.devstage.options[a].text+':';
	}
  }
  if(dev.length<=1){
  	alert("Select an Ascidian species and specific developmental stages first");
	return;
  }
  
  species=window.document.formulaire.species.options[window.document.formulaire.species.selectedIndex].text;

  if ((window.document.anat_keywords == null) || (window.document.anat_keywords.closed == true)) {
    window.document.anat_keywords = window.open("anatomytree.php?namedev="+names+"&iddev="+dev+"&species="+species,"anat_keywords","menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,height=500,width=600");
  } else {
    window.document.anat_keywords.focus();
  } 
}

function reset_structures(){
	window.document.formulaire.region.options.length=1;
	selected_part=new Array();
	window.document.formulaire.idanat.value='';
	reloadit();
}

function remove_structures(){
	
	for(a=0; a<selected_part.length; ++a){
		if(window.document.formulaire.region.options[a+1].selected == true){
			selected_part.splice(a,1);
			window.document.formulaire.region.options[a+1]=null;
			a-=1;
		}
	}
	update();
	reloadit();
}

function addtoarray(name,value){
	selected_part[selected_part.length]=[name,value];
}

function retrenchtoarray(num){
	selected_part.splice(num,1);
}

function update(){
	window.document.formulaire.region.options.length = selected_part.length + 1;
	ids="";
	for(a=0; a<selected_part.length; ++a){
		window.document.formulaire.region.options[a+1].text = selected_part[a][0];//+" ("+selected_part[a][1]+")";
		ids+=selected_part[a][1]+":";
	}
	window.document.formulaire.idanat.value=ids;
	
}

function reloadit(){
  	tab=window.document.formulaire2.iddev.value.split(":");
	dev='';
	for(a=1; a<window.document.formulaire.devstage.options.length; ++a){
  		if(window.document.formulaire.devstage.options[a].selected==true){
	  		dev+= tab[a-1]+':';
		}	
  	}
	window.document.formulaire.selectediddev.value=dev;
	
	
	if( (window.document.anat_keywords != null)&&(window.document.anat_keywords.closed == false) ) {
		window.document.anat_keywords.close();
		popup_anatomy_selector();
	}
}

function getSelectedAnatomy(){
    str="";
    for(a=1; a<window.document.formulaire.region.options.length ;++a){
	    str+=window.document.formulaire.region.options[a].text+":";
	}
	return (str);
}

function getTarget(){
//    $targ="";
//    if(window.document.formulaire.target.value.length <= 50000){
	    $targ=window.document.formulaire.target.value;
//	}else{
//	    $targ="";
//	}
	return ($targ);
}


function enableField(){
    if(window.document.formulaire.fatemode[0].checked==true){
        window.document.formulaire.region.disabled=false;
		window.document.formulaire.elements['fate[]'].disabled=true;
	}else{
        window.document.formulaire.region.disabled=true;
		window.document.formulaire.elements['fate[]'].disabled=false;
	}
}
</SCRIPT>

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

<?php
    $species="";
	if (isset($_GET["species"])) $species=$_GET["species"];

	if(strlen($species)>0){
		$query="SELECT \"NAME\", \"DEV_STAGE_ID\" FROM \"DEV_STAGE\" WHERE \"SPECIES\"='$species' ORDER BY \"DEV_PERCENT\"";
		$stmt = pg_query($c,$query);
	}
	
	$author="";
	if((isset($_GET["author"]))and(strlen($_GET["author"])>0))
	    $author=$_GET["author"];

	$annotator="";
	if((isset($_GET["annotator"]))and(strlen($_GET["annotator"])>0))
	    $annotator=$_GET["annotator"];

	$pmid="";
	if((isset($_GET["pmid"]))and(strlen($_GET["pmid"])>0))
	    $pmid=$_GET["pmid"];
	
	$mutant="";
	if((isset($_GET["mutant"]))and(strlen($_GET["mutant"])>0))
	    $mutant=$_GET["mutant"];
	
	$target="";
	if((isset($_GET["target"]))and(strlen($_GET["target"])>0))
	    $target=$_GET["target"];
	else{
	    if((isset($_POST["genelist"]))and(strlen($_POST["genelist"])>0)) //get the gene set to refine
	        $target=$_POST["genelist"];
	}
	
	$moltype="";
	if((isset($_GET["MOLtype"]))and(strlen($_GET["MOLtype"])>0))
	    $moltype=$_GET["MOLtype"];
		
	$order="";
	if((isset($_GET["Order"]))and(strlen($_GET["Order"])>0))
	    $order=$_GET["Order"];
	else
	    $order="SPECIES";
		
	$boolmut="";
	if((isset($_GET["BOOLmut"]))and(strlen($_GET["BOOLmut"])>0))
	    $boolmut=$_GET["BOOLmut"];
	else
	    $boolmut="0";
		
	$moltype="";
	if((isset($_GET["MOLtype"]))and(strlen($_GET["MOLtype"])>0))
	    $moltype=$_GET["MOLtype"];
	else
	    $moltype="1";
		
	$booltarg="";
	if((isset($_GET["BOOLtarg"]))and(strlen($_GET["BOOLtarg"])>0))
	    $booltarg=$_GET["BOOLtarg"];
	else
	    $booltarg="0";
		
	$only="";
	if((isset($_GET["only"]))and(strlen($_GET["only"])>0))
	    $only=$_GET["only"];
	else
	    $only="0";
		
	$boolanat="";
	if((isset($_GET["BOOLanat"]))and(strlen($_GET["BOOLanat"])>0))
	    $boolanat=$_GET["BOOLanat"];
	else
	    $boolanat="0";
		
	$boolmanip="";
	if((isset($_GET["BOOLmanip"]))and(strlen($_GET["BOOLmanip"])>0))
	    $boolmanip=$_GET["BOOLmanip"];
	else
	    $boolmanip="0";
		
	$fateonly="";
	if((isset($_GET["fateonly"]))and(strlen($_GET["fateonly"])>0))
	    $fateonly=$_GET["fateonly"];
	else
	    $fateonly="0";
		
	$fatemode="";
	if((isset($_GET["fatemode"]))and(strlen($_GET["fatemode"])>0))
	    $fatemode=$_GET["fatemode"];
	else
	    $fatemode="0";

//AJOUT
if((isset($_GET["dateto"]))and(strlen($_GET["dateto"])>0))
	    $dateto=$_GET["dateto"];

if((isset($_GET["datefrom"]))and(strlen($_GET["datefrom"])>0))
	    $datefrom=$_GET["datefrom"];
//FIN AJOUT


?>

		
        <h2><strong><em>In situ staining search.</em></strong> </h2>
        <center>

		<form Method="GET" Action="insitu-result.php" name="formulaire" target="_blank">
		<!--  <form Method="GET" Actions="insitu-result.php" name="formulaire" target="_blank">  -->
		
		




            <table width="99%" border="0" cellspacing="0" cellpadding="0" background="pictures/barre.jpg">
              <tr bgcolor="#990000"> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td width="80">&nbsp;</td>
                <td align="right" background="pictures/barre-red.jpg"> <em><strong>In 
                  situ search</strong></em> </td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>
				  <input type="checkbox" name="being" value="1">
				  <strong>Limit to ISH being manually curated </strong>
				  <br/>				  
				  <input type="checkbox" name="news" value="1" checked>
                  <strong>Limit to uncurated records only</strong>
				  <br/>
				  <input type="checkbox" name="private" value="1">
                  <strong>Hide private in situs</strong>                  
                  <br/>
				  <input type="checkbox" name="only_constructs" value="1">
                  <strong>Limit to regulatory region report gene assays</strong>
				</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td> <center>
                    <strong>Developmental stages:</strong></center></td>
              </tr>
              <tr> 
                <td align="right"><center>
                    <strong>Species:</strong></center></td>
                <td> <div align="left"> 
                    <!--  
                      <select name="species" size="1" onChange="javascript: self.location.href = 'insitu-search.php?species=' + this.options[ this.selectedIndex ].value + '&author=' + window.document.formulaire.author.value + '&mutant=' + window.document.formulaire.mutant.value + '&Order=' + window.document.formulaire2.radioOrder.value + '&BOOLmut=' + window.document.formulaire2.radioBOOLmut.value + '&MOLtype=' + window.document.formulaire2.radioMOLtype.value + '&BOOLtarg=' + window.document.formulaire2.radioBOOLtarg.value + '&only=' + window.document.formulaire2.radioOnly.value + '&BOOLanat=' + window.document.formulaire2.radioBOOLanat.value + '&idanat=' + window.document.formulaire.idanat.value + '&BOOLmanip=' + window.document.formulaire2.radioBOOLmanip.value + '&region=' + self.getSelectedAnatomy() + '&target=' + self.getTarget();">
                 -->
                    <select name="species" size="1" onChange="javascript: self.location.href = 'insitu-search.php?species=' + this.options[ this.selectedIndex ].value + '&author=' + window.document.formulaire.author.value+ '&pmid=' + window.document.formulaire.pmid.value   + '&annotator=' + window.document.formulaire.annotator.value + '&mutant=' + window.document.formulaire.mutant.value + '&Order=' + window.document.formulaire2.radioOrder.value + '&BOOLmut=' + window.document.formulaire2.radioBOOLmut.value + '&MOLtype=' + window.document.formulaire2.radioMOLtype.value + '&BOOLtarg=' + window.document.formulaire2.radioBOOLtarg.value + '&only=' + window.document.formulaire2.radioOnly.value + '&BOOLanat=' + window.document.formulaire2.radioBOOLanat.value + '&idanat=' + window.document.formulaire.idanat.value + '&BOOLmanip=' + window.document.formulaire2.radioBOOLmanip.value + '&fatemode=' + window.document.formulaire2.radiofatemode.value + '&fateonly=' + window.document.formulaire2.radiofateonly.value + '&region=' + self.getSelectedAnatomy() + '&target=' + self.getTarget() + '&dateto='+window.document.formulaire.dateto.value+ '&datefrom=' + window.document.formulaire.datefrom.value ;">
                      <option ></option>
                      <?php

						$requete5="Select \"NAME\" from \"SPECIES\" order by \"NAME\"";

							$query5=pg_query($c,$requete5);							

							while( $row5=pg_fetch_array($query5) ){
								$name=$row5["NAME"];
								print "<option value=\"$name\"";
								if($species==$name)
									print " selected";
								print ">$name</option>";
							}

					  /*if ($species=="Ciona intestinalis")
						echo "<option value=\"Ciona intestinalis\" selected>Ciona intestinalis</option>";
					  else
						echo "<option value=\"Ciona intestinalis\">Ciona intestinalis</option>";
					  
					  if ($species=="Ciona savignyi")
						echo "<option value=\"Ciona savignyi\" selected>Ciona savignyi</option>";
					  else
						echo "<option value=\"Ciona savignyi\">Ciona savignyi</option>";
					  
					  if ($species=="Halocynthia roretzi")
						echo "<option value=\"Halocynthia roretzi\" selected>Halocynthia roretzi</option>";
					  else
						echo "<option value=\"Halocynthia roretzi\">Halocynthia roretzi</option>";*/
				    ?>
                    </select>
                  </div></td>
                <td>&nbsp;</td>
                <td align="center"> <select name="devstage" size="5" multiple onChange="self.reloadit()">
                    <option>_____________any____________</option>
                    <?php
						 $id="";
						 while($row=pg_fetch_array($stmt))
						 {
							print "<option value=\"".$row["DEV_STAGE_ID"]."\">";
							print $row["NAME"]."</option>\n";
							
							$id .= $row["DEV_STAGE_ID"].":";
						 }
					  	?>
                  </select> <input type="hidden" name="selectediddev" value=""> 
                  <input type="hidden" name="idanat" value="<?php if (isset ($_GET["idanat"])) print $_GET["idanat"]; else if (isset ($_POST["celllist"])) print $_POST["celllist"];?>"> 
                </td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
              <tr> 
                <td>&nbsp; <strong>Search by: &nbsp;</strong></td>
                <td align="center"> <center>
				    <input name="fatemode" type="radio" value="0" onClick="javascript: self.enableField(); if(this.checked){window.document.formulaire2.radiofatemode.value='0'};" <?php if($fatemode=="0")print"checked"; ?> >
                    <strong>Stained anatomy parts**: </strong></center></td>
                <td>&nbsp;</td>
                <td align="center"> <center>
                    <input name="fatemode" type="radio" value="1"  onClick="javascript: self.enableField();  if(this.checked){window.document.formulaire2.radiofatemode.value='1'};" <?php if($fatemode=="1")print"checked"; ?> >
                    <strong>Cell fates: </strong> 
                  </center></td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
                <td align="left" valign="top"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td align="right" valign="top">
					      <select name="region" size="10" multiple>
                          <option>__________________________</option>
                          <?php
							  for($a=0;$a<count($regionarray);++$a)
							      print "<option>".$regionarray[$a]."</option>";
						  ?>
                          </select>
                        <br> <center>
                        <input name="only" type="radio" value="0" <?php if($only=="0")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioOnly.value='0';}">
                        At least 
                        <input name="only" type="radio" value="1" <?php if($only=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioOnly.value='1';}">
                        Only </center>
					  </td>
                      <td align="left"> &nbsp;&nbsp;<img src="pictures/button-add.jpg" onClick="self.popup_anatomy_selector();" border="0">&nbsp;&nbsp;<br> 
                        &nbsp;&nbsp;<img src="pictures/button-remove.jpg" onClick="self.remove_structures();" border="0">&nbsp;&nbsp;<br> 
                        &nbsp;&nbsp;<img src="pictures/button-reset.jpg" onClick="self.reset_structures();" border="0">&nbsp;&nbsp;<br> 
                        &nbsp;&nbsp; <input name="BOOLanat" type="radio" value="1" <?php if($boolanat=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLanat.value='1';}">
                        and<br> &nbsp;&nbsp; <input name="BOOLanat" type="radio" value="0" <?php if($boolanat=="0")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLanat.value='0';}">
                        or<br> </td>
                    </tr>
                  </table>
				
				</td>
                <td>&nbsp;</td>
                <td valign="top" align="center">

						   <select name="fate[]" size="10" multiple <?php if($fatemode=="0")print"disabled"; ?>>
							  <option>__________________________</option>
							  <?php

								  $query="SELECT \"KEYWORDS\" FROM \"FATE_KW\" ORDER BY \"KEYWORDS\"";
								  $stmt = pg_query($c,$query);
								  while($row=pg_fetch_array($stmt))
									  print "<option>".$row["KEYWORDS"]."</option>";
							  ?>
							</select>
							<br>
							<br> <center>
							<!--
							<input name="fateonly" type="radio" value="0" onClick="javascript: if(this.checked){window.document.formulaire2.radiofateonly.value='0'};" <?php /*if($fateonly=="0")print"checked"; */?>>
							At least 
							<input name="fateonly" type="radio" value="1" onClick="javascript: if(this.checked){window.document.formulaire2.radiofateonly.value='1'};" <?php /*if($fateonly=="1")print"checked"; */?>>
							Only 
							-->
							</center>

				</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
              <tr valign="top"> 
                <td align="right"><center>
                    <strong>Stained molecule*: </strong></center></td>
                <td> <div align="left"> 
                    <input name="target" type="text" size="30" value="<?php print $target ?>">
                  </div></td>
                <td align="left"> <input name="BOOLtarg" type="radio" value="1" <?php if($booltarg=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLtarg.value='1';}">
                  and <br> <input name="BOOLtarg" type="radio" value="0" <?php if($booltarg=="0")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLtarg.value='0';}">
                  or <br> </td>
                <td>&nbsp;</td>
              </tr>
              <tr valign="top"> 
                <td height="26" align="right">&nbsp;</td>
                <td> <input name="MOLtype" type="radio" value="1" <?php if($moltype=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioMOLtype.value='1';}">
                  Clone &nbsp;&nbsp;<font size="-1"><br>
                  (e.g. 002ZE11, AF305499)</font> <br> <input name="MOLtype" type="radio" value="2" <?php if($moltype=="2")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioMOLtype.value='2';}">
                  Gene model &nbsp;&nbsp;<br> <font size="-1">(e.g. ci0100133709)</font> 
                  
                  <br> <input name="MOLtype" type="radio" value="3" <?php if($moltype=="3")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioMOLtype.value='3';}">
                  Regulatory region reporter construct &nbsp;&nbsp;<br> <font size="-1">(e.g. a-pBra (otx cis-reg -1541 to -1417))</font> 
                  
                </td>
                <td>&nbsp;</td>
                <td> <u>Note: </u>You can search your molecule ID using the "<a href="molecule-search.php"  target="_blank"><font color="#3366CC">molecule 
                  search tool</font></a>".</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
              <tr valign="top"> 
                <td height="26" align="right"><center>
                    <strong>Deregulated molecule*: </strong></center></td>
                <td> <input name="mutant" type="text" size="30" value="<?php print $mutant; ?>"> 
                  <center>
                    <input name="BOOLmut" type="radio" value="2" <?php if($boolmut=="2")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmut.value='2';}">
                    any 
                    <input name="BOOLmut" type="radio" value="3" <?php if($boolmut=="3")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmut.value='3';}">
                    none <br>
                    <font size="-1">(e.g. ci0100140606)</font> </center></td>
                <td align="left"> <input name="BOOLmut" type="radio" value="1" <?php if($boolmut=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmut.value='1';}">
                  and <br> <input name="BOOLmut" type="radio" value="0" <?php if($boolmut=="0")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmut.value='0';}">
                  or </td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
              <tr valign="top"> 
                <td height="26" align="right"><center>
                    <strong>Embryo manipulation: </strong></center></td>
                <td> <center>
                    <input name="BOOLmanip" type="radio" value="0" <?php if($boolmanip=="0")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmanip.value='0';}">
                    include 
                    <input name="BOOLmanip" type="radio" value="1" <?php if($boolmanip=="1")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmanip.value='1';}">
                    any 
                    <input name="BOOLmanip" type="radio" value="2" <?php if($boolmanip=="2")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioBOOLmanip.value='2';}">
                    none </center></td>
                <td>&nbsp; </td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
              <!--
              <tr bgcolor="#CCCC99"> 
                <td align="right"><font color="#000000"><strong>Removed structures:</strong></font></td>
                <td><select name="amputation" size="10" multiple="multiple">
                    <option>_________________________</option>
                  </select> 
                <td align="left">
					<img src="pictures/button-add.jpg" onClick="self.popup_anatomy_selector();" border="0"><br>
					<img src="pictures/button-remove.jpg" onClick="self.remove_structures();" border="0"><br>
					<img src="pictures/button-reset.jpg" onClick="self.reset_structures();" border="0"><br>
					<input name="BOOLamput" type="radio" value="1"><font color="#000000">and</font><br>
					<input name="BOOLamput" type="radio" value="0" checked><font color="#000000">or</font><br>
                </td>
                <td>&nbsp; </td>
              </tr>
			  // -->
              <tr valign="top"> 
                <td height="28" align="right"><center>
                    <!--<strong>Annotator name*:</strong></center></td>-->
			<strong>Author name*:</strong></center></td>
                <td> <input name="author" type="text" size="30" value="<?php print $author; ?>"> 
                  <br> <font size="-1">(e.g. Lemaire)</font> </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
<!-- AJOUT -->

              <tr valign="top"> 
                <td height="28" align="right"><center>
                   <strong>Annotator name*:</strong></center></td>
                <td> <input name="annotator" type="text" size="30" value="<?php print $annotator; ?>"> 
                  <br> <font size="-1">(e.g. Lemaire)</font> </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>


<!-- FIN AJOUT -->

<!-- AJOUT -->

              <tr valign="top"> 
                <td height="28" align="right"><center>
                   <strong>Search by Pubmed id:</strong></center></td>
                <td> <input name="pmid" type="text" size="30" value="<?php print $pmid; ?>"> 
                  <br> <font size="-1">(e.g. 12441299)</font> </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>


<!-- FIN AJOUT -->

<!-- AJOUT -->
              <tr valign="top"> 
                <td height="28" align="right"><center>
                    <strong>Search by entry date:</strong></center></td>
                <td> <small>Between (eg. YYYY-MM-DD )</small><br/><input name="datefrom" type="text" size="30" value="<?php print $datefrom; ?>"> 
                  </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr valign="top"> 
                <td height="28" align="right"><center>
                    <strong>&nbsp;</strong></center></td>
                <td><small>and (eg. YYYY-MM-DD ) </small><br/><input name="dateto" type="text" size="30" value="<?php print $dateto; ?>">   
                  </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
                <td><hr color="#999966" size="1"></td>
              </tr>
<!-- FIN AJOUT -->

              <tr> 
                <td align="right"><center>
                    <strong>Order results by:</strong></center></td>
                <td> <input type="radio" name="Order" value="SPECIES" <?php if($order=="SPECIES")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioOrder.value='SPECIES';}">
                  Species <br> <input type="radio" name="Order" value="DEV_STAGE_ID" <?php if($order=="DEV_STAGE_ID")print"checked"; ?> onclick="javascript:if(this.checked){window.document.formulaire2.radioOrder.value='DEV_STAGE_ID';}">
                  Developmental stage <br> </td>
                <td>&nbsp;</td>
                <td align="right"> <input name="submit" type="image" src="pictures/button-submit.jpg" onClick="submit"> 
                  &nbsp;&nbsp; </td>
              </tr>
            </table>
			
			
		</form>
		
	  </center>
	  
        <strong>Notes:</strong><br>
        * You can enter several names by separating your entries with the ":" symbol.<br>
        If you are searching for a gene please use its unique ID (eg. use jgi ci model 
        ID for C.intestinalis genes)<br>
		You can find these unique ID by using the <a href="molecule-search.php"  target="_blank">molecule search tool</a>.
        <br><br>
		
        ** In order to use the &quot;Stained anatomy parts&quot; field, please 
        select first an Ascidian species and one or several development stages 
        then press the 'add' button.<br><br>

        <form name="formulaire2">
          <input type="hidden" name="radioOrder" value="<?php print $order; ?>">
          <input type="hidden" name="radioBOOLmanip" value="<?php print $boolmanip; ?>">
          <input type="hidden" name="radioBOOLmut" value="<?php print $boolmut; ?>">
          <input type="hidden" name="radioMOLtype" value="<?php print $moltype; ?>">
          <input type="hidden" name="radioBOOLtarg" value="<?php print $booltarg; ?>">
          <input type="hidden" name="radioOnly" value="<?php print $only; ?>">
          <input type="hidden" name="radioBOOLanat" value="<?php print $boolanat; ?>">
		  <input type="hidden" name="iddev" value="<?php print $id; ?>">
		  <input type="hidden" name="radiofatemode" value="<?php print $fatemode; ?>">
		  <input type="hidden" name="radiofateonly" value="<?php print $fateonly; ?>">
        </form>

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