//随机显示小贴士
var a = Math.random() + ""
var rand1 = a.charAt(5)
quotes = new Array
quotes[1] = '您可以对以下检索条件重新进行组配，以获得更理想的检索结果'
quotes[2] = '您可以对以下检索条件重新进行组配，以获得更理想的检索结果'
quotes[3] = '您可以对以下检索条件重新进行组配，以获得更理想的检索结果'
quotes[4] = '您可以对以下检索条件重新进行组配，以获得更理想的检索结果'
quotes[5] = '您可以对以下检索条件重新进行组配，以获得更理想的检索结果'
quotes[6] = '知道吗？每次检索都会为您推荐10家最符合的机构'
quotes[7] = '知道吗？每次检索都会为您推荐10家最符合的机构'
quotes[8] = '知道吗？每次检索都会为您推荐10家最符合的机构'
quotes[9] = '知道吗？每次检索都会为您推荐10家最符合的机构'
quotes[0] = '知道吗？每次检索都会为您推荐10家最符合的机构'
var quote = quotes[rand1]
jQuery.fn.smartFocus = function(text) {
$(this).val(text).focus(function(){
if($(this).val() == text){
$(this).val('');
}
}).blur(function(){
if( $(this).val() == '' ){
$(this).val(text);
}
});
};

//检索框中的文字
jQuery(document).ready(function(){
var S_Havving = '可输入专家姓名或机构名称，也可启用高级搜索(见右侧)';
$('#S_Havving').smartFocus(S_Havving);
});

//切换高级检索普通检索
function show_example(obj1,obj2)
{

	if (document.getElementById(obj1).style.display=="none")
		{
			document.getElementById(obj1).style.display="";
		}
		else
		{
			document.getElementById(obj1).style.display="none";
		}
	if (document.getElementById(obj2).style.display=="none")
		{
			document.getElementById(obj2).style.display="";
		}
		else
		{
			document.getElementById(obj2).style.display="none";
		}
}

//？？
function change(id) 
{ 
var url="Search.asp?Src_Child="+id; 
document.location.href=url; 
} 

//取消检索条件
function ExprCancel(id) 
{
if (id == "0")
	{
	document.GetSearchStr.elements["S_havving"].value="";
	}
if (id == "1")
	{
	document.GetSearchStr.elements["Src_Title"].value="";
	}
if (id == "2")
	{
	document.GetSearchStr.elements["dw"].value="";
	document.GetSearchStr.elements["dw_exact"].value="";
	}
if (id == "3")
	{
	document.GetSearchStr.elements["area_code"].value="";
	}
if (id == "4")
	{
	document.GetSearchStr.elements["Src_Child"].value="";
	}
if (id == "5")
	{
	document.GetSearchStr.elements["Info_Major"].value="";
	}
document.forms["GetSearchStr"].submit();

}

//页码、单位、学科代码、地区代码关联检索
function GetPage(page,op) 
{
if (op == "2")
	{
	page = page + 1;
	document.frm_Page_2.page.value= page;
	}
frm_Page_2.submit();
}
function Getdw(aa) 
{
	document.GetSearchStr.elements["dw_exact"].value=aa
	document.forms["GetSearchStr"].submit();
}
function GetSrc_Child(bb) 
{
	document.GetSearchStr.elements["Src_Child"].value=bb;
	document.forms["GetSearchStr"].submit();
}
function GetArea_code(cc) 
{
	document.GetSearchStr.elements["area_code"].value=cc;
	document.forms["GetSearchStr"].submit();
}


//编辑专家信息
	function resubmits(src_id)
	{
		location.href="/resubmits.asp?Src_ID="+src_id;
	}
//申请实名认证
	function BindApply(src_id,bound)
	{
		location.href="/BindApply.asp?src_id="+src_id+"&Is_bound="+bound;
	}
//网友纠错
	function editresubmits(src_id)
	{
		location.href="/edit_resubmits.asp?Src_ID="+src_id;
	}

//我要留言
	function Revert(src_id)
	{
		location.href="/SrcRevert.asp?Src_ID="+src_id;
	}
//编辑留言
	function EditRevert(src_id,Re_ID)
	{
		location.href="/EditRevert.asp?Src_ID="+src_id+"&Re_ID="+Re_ID;
	}
	function IsDel(src_id)
	{
		if(confirm("您确定要下撤此专家吗？"))
		{
			location.href="/SrcShow.asp?action=delSrc&src_id="+src_id;
		}
	}
	function CIsDel(src_id)
	{
		if(confirm("您确定要发布此专家吗？"))
		{
			location.href="/SrcShow.asp?action=CdelSrc&src_id="+src_id;
		}
	}
	function IsDelJC(F_id,Src_id)
	{
		if(confirm("确定要删除纠错信息吗？"))
		{
			location.href="/SrcShow.asp?action=delJC&F_id="+F_id+"&Src_id="+Src_id;
		}
	}
	function IsDel2(re_id,src_id)
	{
		if(confirm("您确定要删除这条留言吗？"))
		{
			location.href="/SrcShow.asp?action=delRevert&src_id="+src_id+"&re_id="+re_id;
		}
	}

//提示输入密码、用户名
	function frm_onsubmit(frm){
		frm = eval(frm);
		if(frm.user_name.value==""){
			alert("请输入用户名！");
			frm.user_name.focus();
			return false;
		}
		if(frm.user_pass.value==""){
			alert("请输入密码！");
			frm.user_pass.focus();
			return false;			
		}
	}

function show_example(obj1,obj2)
{

	if (obj1.style.display=="none")
		{
			obj1.style.display=""
		}
		else
		{
			obj1.style.display="none"
		}
	if (obj2.style.display=="none")
		{
			obj2.style.display=""
		}
		else
		{
			obj2.style.display="none"
		}
}
//讨论区排序
function frm_orderby(id) 
{
if (id == "3")
	{
	document.frm_orderby1.elements["Order_By"].value="3";
	}
if (id == "4")
	{
	document.frm_orderby1.elements["Order_By"].value="4";
	}
document.forms["frm_orderby1"].submit();

}
//讨论区发布话题
	function SrcSmtRq(Src_Child)
	{
		location.href="/SrcSubmit_requirement.asp?Src_Child="+Src_Child;
	}
//讨论区编辑话题
	function resubmits_Requirement(src_id)
	{
		location.href="/resubmits_requirement.asp?Src_ID="+src_id;
	}
//讨论区删除话题
	function IsDel_Requirement(src_id)
	{
		if(confirm("确定要删除话题吗？"))
		{
			location.href="/SrcShow_requirement.asp?action=delSrc&src_id="+src_id;
		}
	}
//讨论区发布留言
	function Revert_Requirement(src_id)
	{
		location.href="/SrcRevert_requirement.asp?Src_ID="+src_id;
	}
//讨论区编辑留言
	function EditRevert_Requirement(src_id,Re_ID)
	{
		location.href="/editrevert_requirement.asp?Src_ID="+src_id+"&Re_ID="+Re_ID;
	}
//讨论区删除留言
function IsDel_Requirement2(re_id,src_id)
{
	if(confirm("确定要删除留言吗？"))
	{
		location.href="/SrcShow_requirement.asp?action=delRevert&src_id="+src_id+"&re_id="+re_id;
	}
}