function jquerySearch() {
	$("#contentChoice").hide();
	$("#contentSearch").hide();	
	$("#contentOldSearch").hide();
	$("#contentLoading").show();
	$("#contentNewSearch").show();
	params = "?";
	$("#searchCriteria input").each(function() {
		if($(this).attr("value") != "") 
			{ 
				if($(this).attr("value") != 'Search' && $(this).attr("value") != 'Clear All Search Criteria') {
					params += $(this).attr("name")+"="+$(this).attr("value")+"&";
				}
			}
	});
	$('#searchCriteria :selected').each(function(i, selected){
		if($(selected).text() != "") {
			params += $(selected).parent().attr("name")+"="+$(selected).val()+"&";
		} 
	});	
	params += "pid="+(new Date()).getTime();
	params = encodeURI(params);
	$("#contentChoice").hide().empty();
	$("#contentResult").hide().empty();
	$("#contentResult").load("/membership/searchResults.php"+params, {}, function() { $("#contentLoading").hide(); });
	$("#contentResult").show();
	$("#contentHide").show();
}

function jqueryDisplay(id,type) {
	if(!type) {
		var type = 1;
	}
	$("#contentChoice").hide();
	$("#contentSearch").hide();	
	$("#contentNewSearch").hide();
	$("#contentLoading").show();
	$("#contentOldSearch").show();

	$("#contentChoice").hide().empty();
	$("#contentResult").hide().empty();
	params = "?id="+id;
	if(type == 2) {
		params = params+"&type=2";
	}
	$("#contentChoice").load("/memberdirectory/member-details-lite.cfm"+params, {}, function() { $("#contentLoading").hide(); });
	$("#contentChoice").show();
	$("#contentHide").show();	
}

function jquerySearchReset() {
	$("#contentLoading").hide();
	$("#contentSearch").show();
	$("#contentNewSearch").hide();	
	$("#contentOldSearch").hide();
	$("#contentResult").hide();
	$("#contentChoice").hide().empty();
}

function toggleDiv(divid){
	if(document.getElementById(divid).style.display == 'none'){
		document.getElementById(divid).style.display = 'block';
	}else{
		document.getElementById(divid).style.display = 'none';
	}
}