﻿
function showHotOrNew(obj,i)
{
    
    var txt1=$(obj).innerHTML;
    var txt=txt1.substring(0,1);
    var url = location.search; //获取url中"?"符后的字串
    var theRequest = new Object();
    if(url.indexOf("?") != -1)
    { 
        var str = url.substr(1);
        strs = str.split("&");
         for(var i = 0; i < strs.length; i ++)
         { 
             theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
         }
     }

    if(txt=="H")
    {
     
        window.location.href="searchArticle.aspx?key="+encodeURIComponent(theRequest["key"])+"&cid="+theRequest["cid"]+"&name="+encodeURIComponent(theRequest["name"])+"&order=Comment";
    }
    if(txt=="N"){
        window.location.href="searchArticle.aspx?key="+encodeURIComponent(theRequest["key"])+"&cid="+theRequest["cid"]+"&name="+encodeURIComponent(theRequest["name"])+"&order=JoinDate";
    }
}

//分类的链接

function gotoNewPage(cid,name)
{

    var key = document.getElementById("searchkey").value;
    var caid = cid;
    var cname = name;
    window.location.href = "searchArticle.aspx?&cid=" + caid + '&name=' + encodeURIComponent(name);
}


///点击搜索
function JsKeyWordSearch()
{

var keyword=document.getElementById("searchkey").value;



if(keyword=="")
{
    alert("Please enter a keyword!");
    return;
}
 

window.location.href = "searchArticle.aspx?key=" + encodeURIComponent(keyword);


}



//下拉效果
var id = document.getElementById("HiddenField1").value;
new Accordion($ES('div[id^=divClassHandle]'),$ES('div[id^=divClassContent]'),
{  
    display:id,
    onActive:function(a,b)
    {
        a.className = 'open_top';
    },
    onBackground:function(a,b)
    {
        a.className = 'Industry_cate';
    }
});
