// JavaScript Document
function GetRadioButton() {
var chosen = ' ';

len = document.homeform.Searchgroup.length;
for (i = 0; i <len; i++) {
if (document.homeform.Searchgroup[i].checked) {
chosen = document.homeform.Searchgroup[i].value;
}
}
return chosen;
}

function UpdateSG(thisval)	{
	var updatestring = ' ';
	//var valie=document.forms.form1.options[document.forms.form1..selectedIndex].value;

	//thisval=valie;
if (document.getElementById('sglist')!='undefined') {
var dropdownIndex = document.getElementById('sglist').selectedIndex;
var dropdownValue = document.getElementById('sglist')[dropdownIndex].text;
thisval=dropdownValue;
var vpath="subjectguides/" + thisval + ".htm";
Spry.Utils.updateContent('sg',vpath);
   }

}
	
function setTopNav()	{
var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
//alert("fred: "+sPage);
UpdateSG('Aerospace');
}
function searchSite(){
	if(document.searchForm.query.value != "")  {
		  ARCSearchURL = ' http://search.arc.nasa.gov/search/?query=site:ameslib.arc.nasa.gov +' + document.searchForm.query.value + '&hitsPerSite=0';		  
	      window.open(ARCSearchURL)
		 /* window.location.href = ARCSearchURL;
		  */
	}
}

