function searchCondition() {
	doSearch("condition",document.getElementById("condition_search2").value);
}

function searchType() {
	doSearch("type",document.getElementById("service_type_search2").value);
}

function searchKeyword() {
	if (document.getElementById("keyword_search2").value == "") {
		alert ("Please enter one or more keywords and try your search again.");
	} else {
		doSearch("keyword",document.getElementById("keyword_search2").value);
	}
}

function doSearch(sType, sRef) {
  var oXmlHttp = zXmlHttp.createRequest();
  oXmlHttp.open ("post","includes/search.php",false);
  oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  var requestBody = "type="+sType+"&ref="+encodeURI(sRef);
  //alert (requestBody); // zzz
  oXmlHttp.send(requestBody); 
  //alert (oXmlHttp.responseText); // zzz
  document.getElementById("infoSpace").innerHTML = oXmlHttp.responseText;
}

function showhide(idSvc) {
	var elmDetail = document.getElementById("detail" + idSvc);
	var elmIcon = document.getElementById("shicon" + idSvc);
	if (elmDetail.style.display != "none") {
		elmDetail.style.display = "none";
		elmIcon.src = "includes/images/plus.jpg";
	} else {
		elmDetail.style.display = "block";
		elmIcon.src = "includes/images/minus.jpg";
	}
}

