function LookupbyEid($pid, $eid)
 {
     $query_result = DBQueryWarn("select guid,vers from experiment_templates  " . "where pid='{$pid}' and eid='{$eid}'");
     if (!$query_result || !mysql_num_rows($query_result)) {
         return null;
     }
     $row = mysql_fetch_array($query_result);
     $guid = $row['guid'];
     $vers = $row['vers'];
     $foo = new Template($guid, $vers);
     if ($foo->IsValid()) {
         return $foo;
     }
     return null;
 }