// this script is used to set up the default tabs for the search box
var currentTab = 1;

function resetDefaultTab(fgSearchForm) {
    activateTab(fgSearchForm, currentTab);
}

function activateTab(fgSearchForm, tabNum){
    if  (typeof(fgSearchForm) == "undefined" )
		return;
    if ( currentTab != null) {
		deactivateTab();
	}
	currentTab = tabNum;
	document.getElementById('tab'+currentTab).className = 'search_on_tab';
	if (tabNum == 1) {
		//fgSearchForm.vproject.value = 'firstgov-espanol';
		document.getElementsByName("v:project")[0].value = 'firstgov-espanol';
	}
	else if (tabNum == 2) {
		//fgSearchForm.vproject.value = 'firstgov-espanol-images';
		document.getElementsByName("v:project")[0].value = 'firstgov-espanol-images';
	}
	else if (tabNum == 3) {
		//fgSearchForm.vproject.value = 'firstgov-espanol-only';
		document.getElementsByName("v:project")[0].value = 'firstgov-espanol-only';
	}
	return;
}

function deactivateTab(){
	document.getElementById('tab'+currentTab).className = 'search_off_tab';
}

function setState(tabNum){
	if(tabNum==currentTab){
		document.getElementById('tab'+currentTab).className = 'search_on_tab';
	}else{
		document.getElementById('tab'+tabNum).className = 'search_off_tab';
	}
}

function hover(tabNum){
	if(tabNum != currentTab){
		document.getElementById('tab'+tabNum).className = 'search_hover_tab';
	}
}
