function display(sSelected)
{
	window.open("/people/index.shtml?" + sSelected);	
}


function SearchByType(sAttr, sValue)
{
	switch(sAttr)
	{
		case  "2932": case  "2938":
			if (/^\s*$/.test(sValue))
			{
				alert("请输入搜索关键字");
				return false;
			}			
			break;
		case  "2940": 
		    if (/^\s*$/.test(sValue))
			{
				alert("请输入搜索关键字");
				return false;
			}	
			sAttr = "2940,3058";		
			sValue = sValue + "," + sValue;
			break;
		
		case  "2953":
			if (/^\s*$/.test(sValue))
			{
				alert("请选择学历");
				return false;
			}
			break;
		case  "2936":
			if (/^\s*$/.test(sValue))
			{
				alert("请选择分类");
				return false;
			}
			break;
	}
	document.frmSearch.FilterAttrAND.value = sAttr;
	document.frmSearch.FilterValueAND.value = sValue;
	document.frmSearch.target = "_blank";
	document.frmSearch.submit();
}

//文章列表
function ArticleList(sObjName, arrList, nNumPerPage, sContainer)
{
	Page.call(this, sObjName, arrList.length, nNumPerPage);
	this._arrList = arrList;
	this._sContainer = sContainer; 
}

ArticleList.prototype = new Page();

ArticleList.prototype.getCount = function(nGotoPage) {
	return this._arrList.length;
}

ArticleList.prototype.goPage = function(nGotoPage) {
	this._nCurPage = parseInt(nGotoPage,10);
	
	var bufferList = new StringBuffer();
	bufferList.append('<table width="620" border="0" cellspacing="0" cellpadding="0">');
	if(this._arrList.length == 0)	{
		bufferList.append('暂无文章');
	}
	else {	
		for(var i = (nGotoPage-1) * this._nNumPerPage; i < this._arrList.length && i < nGotoPage * this._nNumPerPage; i++)
		{
		    bufferList.append('<tr>');
            bufferList.append('<td width="456" align="left" class="line24">');
            bufferList.append('<div style="width:450px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">');
            bufferList.append('·<a target="_blank" href="' + this._arrList[i].sUrl + '" title="' + this._arrList[i].sTitle + '">' + this._arrList[i].sTitle + '</a>');
            bufferList.append('</div>');
            bufferList.append('</td>');
            bufferList.append('<td width="164" align="right" class="fsgary">' + this._arrList[i].sPubtime + '</td>');
            bufferList.append('</tr>');	    
		}		
	}
    bufferList.append('</table>');
	$(this._sContainer).innerHTML = bufferList.toString();
	$("page_info").innerHTML = this.getPageInfo();
}

//显示品牌新闻列表
var oBrandNewsList = null;
function dispArticleNews()
{
	var nNumPerPage = 25;
	//全部文章
	if(typeof oNewsAll != "undefined")
	{
	    oBrandNewsList = new ArticleList("oBrandNewsList", oNewsAll.arrArticle, nNumPerPage, "disp_news");
		oBrandNewsList.goPage(1);				
	}
}


