/// <summary>
///	页面提交的函数
/// </summary>
/// <param name="search_ci">页面提交的查询词</param>
/// <param name="search_type">页面提交的查询类型</param>
/// <returns>Code.by.Web.DNA.2006.11.08</returns> 
function tj(search_ci,search_type)
{
	document.getElementById("searchword").value = search_ci;
	document.getElementById("tjType").value = search_type;
	document.forms[1].submit();
}

function tj2(search_ci,search_type)
{
	document.getElementById("searchword").value = search_ci;
	document.getElementById("tjType").value = search_type;
	document.forms[0].submit();
}

/// <summary>
///	通用检索框里的文本框在页面加载的时候自动获得焦点
/// </summary>
function Getfocus()
{		   
	document.getElementById("txt2").focus();
	//<body topMargin="0" onload="Getfocus();" MS_POSITIONING="GridLayout">			
}

/// <summary>
///	通用检索框里的数字按钮的 Click 事件
/// </summary>
function function_click()
{
	try
	{
		var r = document.getElementById('TurnPage').value;              //  判断是否翻页
	}
	catch(e)
	{
		r = 'No';
	}
	if( r == 'No')
	{
		var t = document.getElementById("txt2").value ;
		document.getElementById("searchword").value = t;
		document.getElementById('tjType').value = "zhishiyuan_search";
//		var url = window.location.href;
//		if(url.indexOf('ShowResult.aspx') != -1)
//		{
//			document.getElementById("clustering").value = "yes";
//		}
		return true;
	}
	else
	{
		return false;              //  这样的话页面只执行一次，否则的话页面总是执行两次
	}
}

/// <summary>
///	通用检索框里的指标按钮的 Click 事件
/// </summary>
function ZhiBiao_click()
{
	try
	{
		var r = document.getElementById('TurnPage').value;              //  判断是否翻页
	}
	catch(e)
	{
		r = 'No';
	}
	if( r == 'No')
	{
		var t = document.getElementById("txt2").value ;
		document.getElementById("searchword").value = t;
		document.getElementById('tjType').value = "ZhiBiao_search";
		return true;
	}
	else
	{
		return false;              //  这样的话页面只执行一次，否则的话页面总是执行两次
	}
}

function secBoard(n) 
{ 
	for(i=1;i<3;i++) 
	{ 
		eval("document.getElementById('cl0"+i+"').className='s02'"); 
		eval("tbx0"+i+".style.display='none'"); 
	} 
	eval("document.getElementById('cl0"+n+"').className='s01'"); 
	eval("tbx0"+n+".style.display='block'"); 
} 

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/// <summary>
///	支持多浏览器的网页收藏
/// </summary>
function addFavor(title, url)
{  
	if (document.all)  
		window.external.AddFavorite(url, title);  
	else if (window.sidebar)  
		window.sidebar.addPanel(title, url, "")  
} 