function changeTab(tabBox,tab,totalTabs) {
	for (var i=1; i<=totalTabs; i++) {
		if ($('tab_'+tabBox+'_'+i).hasClassName('selected') && i !== tab) {
			$('tab_'+tabBox+'_'+i).removeClassName('selected');
		} else if (i == tab) {
			$('tab_'+tabBox+'_'+i).addClassName('selected');
		}
		if ($('tab_content_'+tabBox+'_'+tab).visible && i !== tab) {
			Element.hide('tab_content_'+tabBox+'_'+i);
		} else if (i == tab) {
			Element.show('tab_content_'+tabBox+'_'+i);
		}
	}
	//$('focus').focus();
	return false;
}

function searchMode(MODE) {
	var search_options = new Array('default','web');
	for (var i=0; i < search_options.length; i++) {
		if ($(search_options[i]+'_link').hasClassName('active') && 'search_'+MODE !== 'search_'+search_options[i]) {
			$($(search_options[i]+'_link')).removeClassName('active');
		} else if ('search_'+MODE == 'search_'+search_options[i]) {
			$(search_options[i]+'_link').addClassName('active');
		}
	}
	if (MODE == 'default' || MODE == 'null') { $('cx').value = "partner-pub-7395890353660701";	}
		else if (MODE == 'web') { $('cx').value = "partner-pub-7395890353660701";	}
				else if (MODE == 'vb') { $('cx').value = "partner-pub-7395890353660701";	}
	$('q').focus();
	return false;
}

function showSubnav(SECTION) {
	if (default_section !== '' && SECTION == 'default' && default_section !== 'home') { 
		SECTION = default_section;
	}
	var sections = new Array('home','reviews','guides','downloads','drivers','forums','pricewatch','ts_extra');
	var show_default = true;
	for (var i=0; i<=sections.length; i++) {
		if (sections[i] !== SECTION && $(sections[i]+'_subnav')) {
			Element.hide(sections[i]+'_subnav');
		} else if (sections[i] == SECTION && $(sections[i]+'_subnav')) {
			Element.show(SECTION+'_subnav');
			show_default = false;
		}
	}
	if (show_default) {
		showSubnav(default_section);
	}
	return false;
}

function clearInput(valu){
	if(valu.value==''){
		valu.setAttribute('class', 'textfocusout');
		}
	}

function checkInput(valu){
	
	if(valu.value==''){
		valu.setAttribute('class', 'textfocus');
		}
	}


