// JScript File

 function search(key, group)
    {
        key = encodeURI(key);
        if (!!!group)
            group = 0;
        switch (group)
        {
            case 4:
                window.location = "/search/searchForum.aspx?Key=" + key ;
            case 2:
                window.location = "/Shop/search/search_list.html?keyword=" + key;
            default:
                window.location = "/Search/?Key=" + key + "&Group=" + group;
        }
    }
    function znss()
    {
        search(document.getElementById('txtSearchKey').value);
    }
    function bdss()
    {
        window.location ="http://www.baidu.com/s?ie=utf-8&wd="+ document.getElementById('txtSearchKey').value;
       
    }
    function ggss()
    {
        window.location ="http://www.google.com/search?q=" + document.getElementById('txtSearchKey').value;
    }
    function ppss()
    {
        window.location ="http://www.pinsou.com/search.asp?ctype=brand&keyword=" + escape(document.getElementById('txtSearchKey').value);
    }
    function sys()
    {
        window.location ="http://so.netsun.com/web/trade.htm?terms=" + escape(document.getElementById('txtSearchKey').value);
    }
    function submitkeyClick(evt) 
    {   
        evt=evt?evt:window.event; 
     if (evt.keyCode == 13) 
      {                 
//	          evt.keyCode=9;
//	          evt.returnValue = false;
          znss(); 
      }
    }
    function resetValue(evt)
    {
        evt=evt?evt:window.event;
        var obj = evt.srcElement? evt.srcElement: evt.target; 
        if (obj.value == "请输入要搜索的内容")
        {
            obj.value = '';
        }
    }

function pj(id, kind)
{
    if (!!document.getElementById('txtName') && !!!document.getElementById('txtName').value)
    {
        alert('请先登录！');
        return ;
    }
    document.getElementById("txtNewsId").value = id;
    document.getElementById("txtNewsKind").value = kind;
    aspnetForm.submit();
}
function hf(obj,name)
{
    if (!!document.getElementById('txtName') && !!!document.getElementById('txtName').value)
    {
        alert('请先登录！');
        return false;
    }
    document.getElementById('ctl00_ContentPlaceHolder1_Say1_fckEditor').scrollIntoView();
    var fck = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_Say1_fckEditor');
    var s = obj.innerText;
    s ="<br/> > 回复：" + name + "<br/> >" + s.replace(/\n/g, "<br/> > "); 
    fck.SetHTML(s);
    fck.Focus();
    
    
}
function zjhf()
{
    if (!!document.getElementById('txtName') && !!!document.getElementById('txtName').value)
    {
        alert('请先登录！');
        return false;
    }
    document.all('ctl00_ContentPlaceHolder1_Say1_fckEditor').scrollIntoView();
    var fck = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_Say1_fckEditor');
    fck.SetHTML('');
    fck.Focus();
    
    
}
function fckPreview()
{
    var fck = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_Say1_fckEditor');
    if (!!!fck)
        fck = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_fckEditor');
    fck.Preview();
}
function show(id,divName,tblName,n)
{
    for(var i=1;i<=n;i++)
    {
         var obj = document.getElementById(divName+i);
         if (!!obj) obj.className= 'content h';
         var obj = document.getElementById(tblName+i);
         if (!!obj) obj.className= 'n';

    }
    var obj = document.getElementById(divName+id);
    if (!!obj) obj.className= 'content s';
    var obj = document.getElementById(tblName+id);
    if (!!obj) obj.className= 'c';

}