  var bbsSend={    
    badword:[" ","去死","吃屎","妈的","娘的","日你","尻","操你","干死你","王八","傻逼","傻B","贱人","狗娘","婊子","表子","靠你","靠","KAO","叉你","叉死","插你","插死","干你","干死","日死","鸡巴","睾丸","包皮","龟头","屄","赑","妣","肏","奶子","尻","屌","法轮","李乃胜","求购","供应","采购","大量供应","法轮工","干你娘","九评共产党","法轮大法","反宇宙","群体灭绝","kel18","狗娘养的","日你妈","胡锦涛","网络赚钱","网赚","做爱","诚信商务网","六四","法轮","轮功","明慧","洪志","李洪志","一边一国","一中一台","江八条","西藏独立","台湾独立","分裂中国","支那猪","网站一夜成名","西单墙"],    
    msg:function(m){
        for(var i=0;i<bbsSend.badword.length;i++){
            if(m.search(bbsSend.badword[i])!= -1){
                return true;
            };
        };
        return false;
    }, 
 checkSendtopic:function()
    {
     var sendTitle=document.getElementById("bbsTitle");
    var Content=document.getElementById("sendContent");
    if(strTrim(sendTitle.value)!="")
    {
      if(!bbsSend.msg(sendTitle.value))
      {
        if(strTrim(Content.value).length>20)
        {
         return true;
        }else
        {
            alert("发帖内容要二十字符以上");
            return false;
        }        
      }else
      {
       alert("标题不能为敏感字符");
            return false;
      }
    }else
    {
      alert("标题不能为空");
        return false;
    }    
 },
 dataClear: function()
 {    
    window.clipboardData.setData("Text", document.getElementById("sendContent").value); 
   document.getElementById("sendContent").value="";
 },
 dataReconver: function()
 {         
   document.getElementById("sendContent").value=window.clipboardData.getData("Text")!=null?window.clipboardData.getData("Text"):"";
 }
};
 

 var strTrim= function(str)
 {   
 str=str.replace(/^\s+|\s+$/g,''); 
 return str;
 }

var facepage=function(obj)
{ 
   var facehtml =  "<table width=\"180\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
           facehtml  += "<tr>";
           for(i=1;i<6;i++)
           {
            var imgName="00"+(10*obj+i);                        
            facehtml+=  "<td height=\"50\" align=\"center\" valign=\"middle\"><a href='javascript:faceSend("+imgName.substring(imgName.length-2,imgName.length)+");'><img src='face/"+imgName.substring(imgName.length-3,imgName.length)+".gif'"+" width=\"19\" border=\"0\" height=\"19\" /></a></td>";
           }
           facehtml+="</tr>";
           facehtml  += "<tr>";
            for(k=6;k<11;k++)
           {
            var imgName1="00"+(10*obj+k);
            facehtml+=  "<td height=\"50\" align=\"center\" valign=\"middle\"><a href='javascript:faceSend("+imgName1.substring(imgName1.length-2,imgName1.length)+");'><img src='face/"+imgName1.substring(imgName1.length-3,imgName1.length)+".gif'"+" width=\"19\" border=\"0\" height=\"19\" /></a></td>";
           }
           facehtml+="</tr>";
           facehtml+="</table>";                                               
           $('#fack').html(facehtml);          
   }
   
   var subclass=function()
{
 var myDate = new Date();	 
    var  subBlock=document.getElementById("subBlock");
    var mainBlock=$('#mainBlock').val();
    if(mainBlock!="0")
    {
    $.ajax({
                    type: "POST",
                    url: "server/bbs.aspx",
                    data: "type=subClass&id="+mainBlock+"&t="+myDate.getMilliseconds(),
                    success: function(msg){  
                        if(msg!="")
                        {
                            msg=msg.substring(1,msg.length).split('|');
                            subBlock.length=msg.length+1;
                             subBlock.options[0]=new Option("主题选择","0");
                            for(i=0;i<msg.length;i++)
                            {
                                subBlock.options[i+1]=new Option(msg[i].split(':')[1],msg[i].split(':')[0]);
                            }                        
                        }                
                    }
        });
    }else
    {
    subBlock.length=1;
    subBlock.options[0]=new Option("主题选择","0");
    }    
}
var subBlockChange=function()
{
    var obj =$('#subBlock').val();
   document.getElementById("hdnSubBolck").value=obj;
}
   
var faceSend=function(obj)
{

    var send =document.getElementById("sendContent").value;
    send=send+"/"+obj+"$";
    document.getElementById("sendContent").value=send;
}
var sendNewTopic=function(obj)
{    
      var myDate = new Date();	  
 $.ajax({
            type: "POST",
            url: "server/bbs.aspx",
            data: "type=checkLogin&t="+myDate.getMilliseconds(),
            success: function(msg){  
                if(msg!="")
                {                
                   if(msg=="2")
                   {
                     var cookValue=obj=="1"?"CrateTopic.aspx?type=s":"CrateVote.aspx";
                    $.cookie("hidUrl",cookValue);
                    alert("请先登录");window.location.href="login.aspx";
                    
                   }
                   else
                   {
                   window.location.href=obj=="1"?"CrateTopic.aspx?type=s":"CrateVote.aspx";                  
                   }
                }                
            }
        });
}
var NowImg = 1;
var bStart = 0;
var bStop =0;
var MaxImg = 4; //总共多少张图片
function fnToggle()
{
var next = NowImg + 1;
if(next == MaxImg+1)
{
   NowImg = MaxImg;
   next = 1;
}
if(bStop!=1)
{
   if(bStart == 0)
   {
    bStart = 1;  
    setTimeout('fnToggle()', 5000); //第一张图过多久秒后进行切换
    return;
   }
   else
   {  
       oTransContainer.filters.revealTrans.Transition=Math.floor(Math.random()*23);
       oTransContainer.filters.revealTrans.apply();
    document.images['oDIV'+next].style.display = "";
    document.images['oDIV'+NowImg].style.display = "none";
       oTransContainer.filters.revealTrans.play();    
    if(NowImg == MaxImg)
     NowImg = 1;
    else
     NowImg++;
   }
   setTimeout('fnToggle()', 5000); //以后的图片是过多久切换
}
}
