// $Id: bioverse.js,v 1.3 2006/10/27 07:28:11 mikeg Exp $

/* ******** Bioverse-specific functions ********** */

function donothing(stuff)
{
}

/* Update the "Search in" form by retrieving "search_form?"
   and putting its output into the "simple_search" element's
   innerHTML.
*/
function simple_search(myform, organism_id, update_status)
{
  if (myform.elements)
  {
    organism_id = myform.elements["organism_id"].value;
  }

  if (update_status !== 0)
  {
    // announce the action
    puthtml('status', 'Updating context...');
  }

  url = 'getform?form=simple_search&organism_id='+organism_id;
  url_callback(url, update);

  return false;
}

function update(stuff)
{
  saydebug("Update, calling eval with: " + stuff );

  try { eval(stuff); }
  catch (e) { }

  if (go_dot_interval !== 0)
  {
    clearInterval(go_dot_interval);
    go_dot_interval = 0;
    go_dot_counter = 0;
  }

  puthtml('status','');
}

function moldetails()
{
  puthtml('status', 'updating moldetails...');
 
  url_callback("render?app=render;what=moldetails", update);

  return false;
}

