// JavaScript Document, common to all pages

/* 
 * Called by the quicklinks drop down menu to open up one of the Allen Institute webapps
 * in a new browser window.
 * The value of each option (selectId) should be an url.
 * The name of each option (selectId) will be the name of the new window.
 *
 * selectId - select tag's id
 * index - selectedIndex of the drop down menu option
 */
function goToUrl(selectId, index) {
	var element = document.getElementById(selectId);
	var urlValue = element.options[index].value;
	if (urlValue === undefined || urlValue === "none") {
		return;
	}
	else {
		windowName = "_blank"; // can't use arbitrary names because of IE. grrr.
		window.open(urlValue, windowName);
	}
}

