


     function ShowColumn(id)
     {
         var url = "";
         if (id == 36) 
         { 
            url = "bbs/index.asp";            
         }
         else if(id == 31)  //
         {
            url = "Drugs/index.asp"
         }
         else if(id == 33)  //教师博客
         {
            url = "ShowBlogPersonal.asp?ClassID=" + id + "&user_flag=0"
         }
         else if(id == 39)  //学生博客
         {
            url = "ShowBlogPersonal.asp?ClassID=" + id + "&user_flag=1"
         }
         else if(id == 21)  //学科专栏
         {
            url = "ShowBlogGroup.asp?ClassID=" + id + "&ZBBZ=1";
         }         
         else if(id == 53)  //班级专栏
         {
            url = "ShowClassInfo.asp?ClassID=" + id + "&ZBBZ=11";
         }
         else
         {
            url = "ShowColumns.asp?ClassID=" + id;                     
         }
         window.location = url;         
     }
     function SetColor(MenuTd,c)
     {
         MenuTd.style.color = c;
     }
     function ShowSubColumn(MenuTd,id,Pos)
     {
         SetColor(MenuTd,"#000000");
         
         
         var id,title;
         var tmp = GetSubMenu(id);
         tmp = tmp.split("|");
         if(tmp.length != 2) return;
         id = tmp[0].split(";");
         title = tmp[1].split(";");
         if (id.length != title.length) return;
         
         var tbl = document.getElementById("MenuSubTitle");
         while (tbl.rows.length > 0 ) 
           tbl.deleteRow(0);           
         var tr = tbl.insertRow(-1);
                 
         td = document.createElement("<td width='" + (Pos * 90 + 10) + "'>");         
         tr.appendChild(td);
             
         for(i = 0;i<id.length;i++)
         {             
             title[i] = decodeURI(title[i]);
             if (title[i] == "") continue; 
             if(id[i]==27) continue; 
             if(id[i]==20) continue;   
             //if(id[i]==24) continue;
             td = document.createElement("<td width='1%' nowrap>");
             td.innerHTML = "<a href=\"javascript:ShowColumn('" + id[i] + "')\">" + title[i] + "</a>"
             td.innerHTML += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
             tr.appendChild(td);
         }
         td = document.createElement("<td>");         
         tr.appendChild(td);
         
     }
     function GetSubMenu(id)
     {
        var rtn = "";
        var url = "GetSubMenu.asp?cls_ID=" + id;
        var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
        XmlHttp.Open("POST", url, false);
        XmlHttp.Send();
        if (XmlHttp.status == 200) rtn = XmlHttp.responseText;
        return rtn;
     }