﻿function showdiv(o,t)
{
//    for(var i=1;i<=5;i++)
//    {
//        if(i==o)
//        {
//            document.getElementById('menu'+i).className='menuc';
//        }
//        else
//        {
//            document.getElementById('menu'+i).className='menub';
//        }
//    }
    
    if(o==1)
    {
        window.location.href='wenlist.aspx?type=wait&n='+t;
    }
    if(o==2)
    {
        window.location.href='wenlist.aspx?type=high&n='+t;
    }
    if(o==3)
    {
        window.location.href='wenlist.aspx?type=zero&n='+t;
    }
    if(o==4)
    {
        window.location.href='wenlist.aspx?type=exigence&n='+t;
    }
    if(o==5)
    {
        window.location.href='wenlist.aspx?type=already&n='+t;
    }
}

function hidd(obj)
{
    if(obj.checked)
    {
        document.getElementById('sst').style.display='block';
    }else
    {
        document.getElementById('sst').style.display='none';
    }
}

function checkwebsearch(){
if(document.getElementById('txtsearch').value=='')
{
alert('请输入查询内容');
return false;
}else{
if(document.getElementById('txtsearch').value.length>30)
{
alert('查询内容太长，请重新输入');
return false;
}else
return true;
}
}

function searchbaidu(){
if(document.getElementById('txtsearch').value=='')
{
alert('请输入查询内容');
return false;
}else{
window.location.href='http://www.baidu.com/baidu?tn=baiduerr&word='+document.getElementById('txtsearch').value;
return true;
}
}

function sendisd(){
    returnString="";
    var PostInfo="FunctionName=checklogin";
    AJpost(PostInfo);       
    if(returnString=='111')
    {
        alert("请先登陆");
        return false;
    }else{            
        return true;
    }
}

function collectionquestion(question,userinfo){
    alert('开始！');
    returnString="";
    var PostInfo="FunctionName=addcollection&question="+question+"&user="+userinfo+"";    
    AJpost(PostInfo);       
    if(returnString=='succeed')
    {
        alert('收藏成功！');
    }
    if(returnString=='failing')
    {
        alert('收藏失败！');
    }
    if(returnString=='already')
    {
        alert('该问题已收藏，无法重复收藏！');
    }
    alert(returnString);
}
