/*function toggle(targetId) {
	target = document.getElementById(targetID);
	if (target.style.display == "none"){
		target.style.display = "";
	} else {
		target.style.display = "none";
	}
}
*/
// Resist frames from other sites.
if(top.frames.length > 0) window.open(document.location, "_top",
				      "toolbar,location,directories,status,menubar,scrollbars,resizable");

// Attempt to find the document object model.
var w3_dom = (document.getElementById) ? true : false;

// Define a function for setting toggle text.
function SetText(item, text)
{
	object = document.getElementById(item);

	if(object)
	{
		object.appendChild(document.createTextNode(text));
	}

	return;
}

// Define a function for toggling displays.
function ToggleDisplay(item, show)
{
	if(!w3_dom)
	{
		return;
	}

	itemObject = document.getElementById(item);
	showObject = document.getElementById(item + 'Show');
	hideObject = document.getElementById(item + 'Hide');

	if(!itemObject || !showObject || !hideObject)
	{
		return;
	}

	if(show != 0)
	{
		itemObject.style.display = 'block';
		showObject.style.display = 'none';
		hideObject.style.display = 'inline';
	}
	else
	{
		itemObject.style.display = 'none';
		showObject.style.display = 'inline';
		hideObject.style.display = 'none';
	}

	return;
}

function InitializeToggles(name_list, hide, show)
{
	if(!w3_dom)
	{
		return;
	}

	names = name_list.split(',')

		  for(index = 0; index < names.length; index++)
	{
		name = names[index];

		SetText(name + 'Hide', ' ' + hide + ' ');
		SetText(name + 'Show', ' ' + show + ' ');
		ToggleDisplay(name, 0);
	}

	return;
}
/*
 _____________________________________
/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\
| Another JavaScript from Uncle Jim   |
| Feel free to copy, use and change   |
| this script as long as this part    |
| remains unchanged. You can visit    |
| my website at http://jdstiles.com   |
| for more scripts like this one.     |
| Created: 1996 Updated: 2006         |
\_____________________________________/
 ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
*/
	     function popupMessage() {
  // SET MESSAGE VALUES
	var to = "paul.rudnick@nist.gov";
	var cc = "";
	var bcc = "";
	var subject = "Interested in donating peptide mass spectra to NIST Libraries";
	var body = 
		  "Dear NIST Mass Spectrometry Data Center,\n\n\tI'd like to donate peptide spectra for inclusion in the next build of the libraries.\n\n" +
		  "Here is some basic information about my spectra:\n\n" +
		  "Organism=\n" +
		  "Tissue (or cell type)=\n" +
		  "Instrument Make/Model=\n" +
		  "Alkylation Reagent=\n" +
		  "Digestion Enzyme=\n" +
		  "Other labeling=\n\n" +
		  "My data is approximately (MB|GB|TB) in size=\n\n" +
		  "My data is=published/unpublished\n\n" +
		  "I can be contacted at the following:\n\n";
	var doc = "mailto:" + to + 
		  "?cc=" + cc + 
		  "&bcc=" + bcc + 
		  "&subject=" + escape(subject) + 
		  "&body=" + escape(body); 

	window.location = doc;
}