var selectedTab = 1;
	
function searchTabOn(tab) 
{
	var anxasearchform = document.getElementById('anxasearchform');
	
	for (i=1; i<=5 ;i++) {
		if (i==2) continue;
		currTab = document.getElementById('tab' + i);
		if (currTab == tab) {
			currTab.className = 'on';
			selectedTab = i;
		} else {
			currTab.className = '';
		}
	}
	switch (selectedTab) {
		case 1:
			anxasearchform.action = '/recipe/search.asp';
			break;
		case 2:
			anxasearchform.action = '/recipe/search.asp';
			document.getElementById('tab2').className = '';
			document.getElementById('tab1').className = 'on';
			selectedTab = 1;
			break;
		case 3:
			anxasearchform.action = '/regime-mincir/search.asp';
			break;
		case 4:
			anxasearchform.action = '/profile/search.asp';
			break;
		case 5:
			//anxasearchform.action = '/forum/default.asp';
			anxasearchform.action = '/forum/forum-topics.asp';
			break;
	}
}

function setParams() 
{
	var anxasearchform = document.getElementById('anxasearchform');

	switch (selectedTab) {
		case 2:
			anxasearchform.stext.value = '';
			break;
		case 3:
			anxasearchform.s.value = anxasearchform.search.value;
			break;
		case 4:
			anxasearchform.frm_user.value = anxasearchform.search.value;
			break;
		case 5:
			anxasearchform.topicsearch.value = anxasearchform.search.value;
			break;
		default:
			anxasearchform.stext.value = anxasearchform.search.value;
	}
	return true;
}
