<!-- 
// for dynamic html forms; updates the form pane based on user selection 
function update_condition_pane(pane_id, id) {
        var pane_name = "pane";
	var url = "http://m3d.bu.edu/ajax_info.php";
        pane_name += pane_id;
	var pars = 'feature_id=' + id + '&pane_id=' + pane_id;
	//	parameters: {condition_id : id}   for some reason this wouldn't work
	new Ajax.Updater(pane_name, url, 
		{ 
			method: 'get', 
			parameters: pars
		}
	);
}

/* this function is because the ajax form elements seem to only be visible to javascript and
   not the browser.  the browser won't pass on my stinkin paramaters, so I'm passing them through
   a javascript redirect.  if anyone knows a better way, I'd be happy to hear it!!
*/
function check_form() {
	var x = document.getElementsByTagName('input');
	var str = "";
	var getStuff = "";
	
	for (var i=0;i<x.length;i++) {
		// skip unchecked checkboxes
		if ((x[i].type == 'checkbox' || x[i].type == 'radio') && !x[i].checked) {
			continue;
		}
	
		if (i == 0) { getStuff = x[i].name + '=' + x[i].value; }
		else { getStuff +=  "&" + x[i].name + "=" + x[i].value; }
	}
	this.document.location.href='index.pl?' + getStuff; 

	return false;  // is there no better way????????  	
}

// tool tip code
function SO2(category,id) {
	var url = 'http://m3d.bu.edu/error.php';
	var pars = 'c=' + category + '&i=' + id;
	var myAjax = new Ajax.Request(
		url,
	     {
		method: 'get',
		parameters: pars,
		onComplete: showResponse2
	     });
}
// call overlib
function showResponse2(originalRequest) { overlib(originalRequest.responseText, NOFOLLOW, DELAY, 250, WRAP, WRAPMAX, 400, TIMEOUT, 10000, HAUTO, FGCOLOR, '#eaddba', AUTOSTATUS);}

// get tooltip info
function SO3(expid,chipid) {
	var url = 'http://m3d.bu.edu/ajax_info.php';
	var pars = 'chipid=' + chipid + '&expid=' + expid;
	var db = gup('db'); // if db was declared in the url; use that instead of the one in the cookie

	if (db) {
		pars += '&db='+db;
	}

	var myAjax = new Ajax.Request(
	url,
	{
	method: 'get',
	parameters: pars,
	onComplete: showResponse3
	});
}

// taken from http://www.netlobo.com/url_query_string_javascript.html 
// this grabs specific values from a get string
function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
// call overlib
function showResponse3(originalRequest) { return overlib(originalRequest.responseText, NOFOLLOW, WRAP, WRAPMAX,400, TEXTSIZE, 2, STICKY, TIMEOUT, 10000, CAPTION, 'M<sup>3D</sup>', CAPTIONSIZE, 2);}
-->
