function toggle(obj) {
		var el = document.getElementById(obj);
		el.style.display = (el.style.display != 'none' ? 'none' : '' );
	}

function submitAdminForm(value, deleteRow){
		if(value){admin.whichrow.value = value;}
		if(deleteRow){admin.deleteRow.value = "true";
		}
		admin.submit();
	}
	
function submitWhich(wform){
		wform.submit();
	}

	function updateCats(value, deleteRow){
		if(value){cat.catid.value = value;}
		if(deleteRow){cat.deleteRow.value = "true";
		}
		cat.submit();
	}
	
function sortOrder(which, listorder){
	admin2.sortorder.value = which;
	if(listorder == ""){
		listorder = "asc";
	}
	else if(listorder == "asc"){
		listorder = "desc";
	}else{
		listorder = "asc";
	}
	admin2.listorder.value = listorder;
	admin2.submit();
}
function hideSubnav(){
	$(".lev2").hide();
}

function showSearchOptions(value){
	section = document.searchform.type.value;
	if(section == "Residential"){
		$("#residential").show();
		}
	else{
			$("#residential").hide();
		}
	if(section == "Vacant Land"){
		$("#vacantland").show();
		}
	else{
			$("#vacantland").hide();
		}
	
}


function setImage(thumb){
	document.mainImg.src = thumb.src;
	$(".thumb").css("border", "0px");
	thumb.style.border="2px solid #e6e3da";

}

function showChild(element){
	$(".lev2").hide();
	myelem = $(element).children(".lev2").show();
}
