function moveUpDown(status,obj) {
if (status =="SHOW")
	{ document.getElementById(obj).className="isShown";	}
if (status =="HIDE")
	{ document.getElementById(obj).className="isHidden"; }
}

function moveDownAll(){
	for(i=1; i<=4; i++){
	var str;
	str="tab"+i;
	if (document.getElementById(str)) document.getElementById(str).className="isHidden";
	}
}

function hideTabs(){
	var str;
	for (i=1; i<5;i++){
	str = "li-" + i;
	if (document.getElementById(str)) document.getElementById(str).className="tab-inactive";
	}
}

function tabToActive(obj){
	hideTabs();
	document.getElementById(obj).className="tab-active";
}

function submit_search(form){
	var keywords = document.getElementById('keyword');
	var categories = document.getElementById('category_id');
	var location = document.getElementById('location');
	if(categories.value=='' || (keywords.value=='' && (location.value=='' || location.value=='City, State or ZIP Code'))) {
		alert('To search you must select a category and enter the name or location.');
		return false;
	} else {
		form.submit();
	}
}