﻿function SwitchPart(id,cateID)
{
											 
												var nMenuCount = 12;
												for(var i=1; i<nMenuCount; i++)
												{
													if (document.getElementById("div"+i) != null)
													{
														document.getElementById("li"+i).className = "";
														document.getElementById("div"+i).style.display = "none";
														document.getElementById("div"+i).className = "none";
													}
												}
												document.getElementById("li"+id).className = "Long Cur2";
												document.getElementById("div"+id).style.display = "block";
												document.getElementById("div"+id).className = "Infolist01";
											 
}
										
function clearcontent(obj)
{
	obj.value = "";
}
					 
function search()
{
	var title = encodeURI(document.all.zfcx.value);
	var from = document.all.cxrq.value;
	var to = document.all.cxrq.value;
	var datereg = /\d{4}-[01]\d{1}-[0123]\d{1}/g;
	if(!from.match(datereg)&&from != "" &&from != null)
	{
		window.alert("日起格式不正确，应为XXXX-XX-XX");
		return;
	}
	window.open("../Search/Search_InfoOpen.aspx?SearchCategoryID=3923675f-d678-42fc-9684-a0fee04bf53e&BindCategoryID=3923675f-d678-42fc-9684-a0fee04bf53e&SearchValue="+title+"&from="+from+"&to="+to,"_blank");
}
								
function advanced_search()
{
		window.open("/ycweb/TemplateA/Search/Search_InfoOpen.aspx?SearchCategoryID=3923675f-d678-42fc-9684-a0fee04bf53e&SearchValue=&from=0001-01-01&to=9999-12-31&type=&BindCategoryID=","_blank");
}
							 
 function SwitchAffair(id,cateID)
										{
											var nMenuCount = 12;
											for(var i=1; i<nMenuCount; i++)
											{
												if (document.getElementById("div_affair"+i) != null)
												{
													document.getElementById("li_affair"+i).className = "WebService";
													document.getElementById("div_affair"+i).style.display = "none";
													document.getElementById("div_affair"+i).className = "WebLink";
												}
											}
											document.getElementById("li_affair"+id).className = "WebService Cur";
											document.getElementById("div_affair"+id).style.display = "block";
											document.getElementById("div_affair"+id).className = "WebLink";
										}
										
									
function AffairSearch()
{
	var keyword = encodeURI(document.all.AffairName.value);
	if(keyword == null || keyword =="")
	{
		  window.alert("事项名称不能为空");
		return;
	}
	window.open("../Search/AffairCategory.aspx?Keyword="+keyword,"_blank");
}
				 

                       		