
function show_SearchResult(srt)
{
	if(srt == 'site'){
		document.getElementById('ServiceID').style.display = "none";
		document.getElementById('siteID').style.display = "block";
		//document.getElementById('siteType').checked = true;

		
	}else{
		document.getElementById('siteID').style.display = "none";
		document.getElementById('ServiceID').style.display = "block";
		//document.getElementById('ServiceType').checked = true;
	}
}


function check_SiteInfo()
{
		if (window.document.MyformSite.province.value == "-1")
        {
		    alert("请选择省份.");
			document.MyformSite.province.focus();
			return false;
	    }
		if(window.document.MyformSite.province.value != "3" && window.document.MyformSite.province.value != "25" && window.document.MyformSite.province.value != "28" && window.document.MyformSite.province.value != "34"){
			if (window.document.MyformSite.city.value == "-1")
			{
				alert("请选择城市.");
				document.MyformSite.city.focus();
				return false;
			}
		}
		if (window.document.MyformSite.minRen.value != "" || window.document.MyformSite.maxRen.value != "")
        {
		    if(window.document.MyformSite.minRen.value != "" && !IsInt(document.MyformSite.minRen.value)){
				alert("请正确输入活动人数.");
				document.MyformSite.minRen.focus();
				return false;
			}
			if(window.document.MyformSite.maxRen.value != "" && !IsInt(document.MyformSite.maxRen.value)){
				alert("请正确输入活动人数.");
				document.MyformSite.maxRen.focus();
				return false;
			}
			if (window.document.MyformSite.Feature.value == ""){
				alert("请选择摆台形式.");
				document.MyformSite.Feature.focus();
				return false;
			}
	    }
		return true;
  } 
function IsInt (s)
         {
              var re = /^\d+$/;
              return re.test(s);
         }

function SubmitSearch() { 
		if(check_SiteInfo())
		document.getElementById("MyformSite").submit();
} 


function SearchSiteRenNum(Url,Feature)
{
	var FeatureID = document.getElementById('Feature').value;
	if(FeatureID){
		var SearchUrl = Url.replace(Feature,'&Feature='+FeatureID);
		parent.location= SearchUrl;
	}else{
		alert("请选择摆台类型以便精确搜索.");
		document.MyformList.Feature.focus();
		return false;
	}
	return true;
}
