    //==========================================================================================================
    // PC home Online 網路家庭的文字、圖片、資料、商標、標識、及網頁設計等皆受中華民國相關智慧財產權法令的保護。
    // 嚴禁任何未經事先同意的非法轉載和使用。若經查知，PC home Online 網路家庭將採取必要之法律行動
    //==========================================================================================================
    function RollingNotice(id, DataObj) {
        this.id = id;
        this.DataObj = DataObj;
        this.CodeSection = this.DataObj.CodeSection;
        this.ElementWidth = this.DataObj.ElementWidth;
        this.ElementHeight = this.DataObj.ElementHeight;
        this.ElementRowAmt = (this.DataObj.ElementRowAmt) ? this.DataObj.ElementRowAmt : 1;
        this.NoticeAmt =  this.DataObj.NoticeInfo.length;
        this.TotalAmt = Math.ceil(this.NoticeAmt/this.ElementRowAmt);
        this.ColAmt = this.DataObj.ColAmt;
        this.SectionHeight = this.ElementRowAmt * this.ElementHeight;
        this.Timer = this.DataObj.Timer; //ms
        this.TodatTime = new Date();
        this.TetxLength = [Math.floor(this.ElementWidth/6)-3, Math.floor((this.ElementWidth-22)/6)-3];
        this.FuncID = -1;
        this.getNoticeSet = '';
        this.getNoticeElement = [];
        this.BlockAction = (this.TotalAmt == 1) ? true : false;
        this.IntervalID = '';
        this.TimerIntervalID = '';
        //method
        this.SignConfirm = function(SerialID) {
            var DateArray = this.DataObj.NoticeInfo[SerialID].regidate.split('-');
            var FuncDate = new Date(DateArray[0], parseInt(DateArray[1], 10) - 1, DateArray[2]);
            return ((this.TodatTime.getTime()-FuncDate.getTime())/86400000 > 7) ? false : true;
        }
        this.CalculateTxt = function(Content) {
            var LengthTmp = 0;
            for (var i=0; i<Content.length; i++) {
                if (Content.charCodeAt(i) == ' ') LengthTmp += 1;
                else if (Content.charCodeAt(i) >= 33 && Content.charCodeAt(i) <= 255) {
                    LengthTmp = (Content.charCodeAt(i) >= 65 && Content.charCodeAt(i) <= 90) ? LengthTmp + 2 : LengthTmp + 1;
                } else LengthTmp += 2;
            }//end for
            return LengthTmp;
        }
        this.TextLengthLimit = function(Content, LengthLimit) {
            var NewContent = '';
            var LengthTmp = 0;
            var LengthNow = this.CalculateTxt(Content);
            if (LengthNow > LengthLimit) {
                for (var i=0; i<Content.length; i++) {
                    if (Content.charCodeAt(i) == ' ') LengthTmp += 1;
                    else if (Content.charCodeAt(i) >= 33 && Content.charCodeAt(i) <= 255) {
                        LengthTmp = (Content.charCodeAt(i) >= 65 && Content.charCodeAt(i) <= 90) ? LengthTmp + 2 : LengthTmp + 1;
                    } else LengthTmp += 2;
                    if (LengthTmp <= LengthLimit) NewContent += Content.charAt(i); else break;
                }
                NewContent += '...';
            } else NewContent = Content;
            return NewContent;
        }
        this.VaryAction = function() {
            if (this.BlockAction) return;
            this.FuncID++;
            if (this.FuncID > this.getNoticeElement.length-1) this.FuncID = 0;
            this.getNoticeSet.MoveFlagX = false;
            this.getNoticeSet.MoveFlagY = false;
            this.getNoticeSet.GoalX = this.getNoticeElement[this.FuncID].GoalX;
            this.getNoticeSet.GoalY = this.getNoticeElement[this.FuncID].GoalY;
            //doMove
            var speed = 10;
            clearInterval(this.IntervalID);
            this.IntervalID = setInterval('RollingNotice'+this.id+'.realMoveNew('+speed+')', 15);
            this.BlockAction = true;
        }
        this.realMoveNew = function(speed) {
            var ObjX = this.getNoticeSet.PosX;
            var ObjY = this.getNoticeSet.PosY;

            var a = this.getNoticeSet.GoalX - ObjX;
            var speedx = a/speed;
            var SignX = (speedx < 0) ? -1 : 1;
            speedx = Number(SignX * ((Math.abs(speedx) <= 1) ? 1 : Math.abs(speedx)));

            var b = this.getNoticeSet.GoalY - ObjY;
            var speedy = b/speed;
            var SignY = (speedy < 0) ? -1 : 1;
            speedy = Number(SignY * ((Math.abs(speedy) <= 1) ? 1 : Math.abs(speedy)));

            //check x position
            if (!this.getNoticeSet.MoveFlagX) {
                if (Math.abs(ObjX-this.getNoticeSet.GoalX) <= Math.abs(speedx)) { this.getNoticeSet.PosX = this.getNoticeSet.GoalX; this.getNoticeSet.MoveFlagX = true;    }
                else this.getNoticeSet.PosX = ObjX + speedx;
            }

            //check y position
            if (!this.getNoticeSet.MoveFlagY) {
                if (Math.abs(ObjY-this.getNoticeSet.GoalY) <= Math.abs(speedy)) { this.getNoticeSet.PosY = this.getNoticeSet.GoalY; this.getNoticeSet.MoveFlagY = true;    }
                else this.getNoticeSet.PosY = ObjY + speedy;
            }

            this.getNoticeSet.style.left = this.getNoticeSet.PosX + 'px';
            this.getNoticeSet.style.top = this.getNoticeSet.PosY + 'px';

            if (this.getNoticeSet.MoveFlagX && this.getNoticeSet.MoveFlagY) {
                clearInterval(this.IntervalID);
                this.BlockAction = false;
                clearTimeout(this.TimerIntervalID);
                this.TimerIntervalID = setTimeout('RollingNotice'+this.id+'.VaryAction()', this.Timer);
            }
        }
        this.constructor = RollingNoticeConstructor;
        this.constructor();
    }

    function RollingNoticeConstructor() {
        if (!$(this.CodeSection)) return;
        var RollingNotice = $(this.CodeSection);
        while (RollingNotice.childNodes.length > 0) RollingNotice.removeChild(RollingNotice.firstChild);
        RollingNotice.style.width = this.ElementWidth + 'px';
        RollingNotice.style.height = this.SectionHeight + 'px';
        RollingNotice.style.clip = 'rect(3px, ' + this.ElementWidth + 'px, ' + (parseInt(this.SectionHeight)+3) + 'px, 0px)';

        var NoticeSet = document.createElement('div');
        NoticeSet.className = 'RollingNotice';
        NoticeSet.style.left = '0px';
        NoticeSet.style.top = '0px';
        NoticeSet.PosX = 0;
        NoticeSet.PosY = 0;
        NoticeSet.MoveFlagX = false;
        NoticeSet.MoveFlagY = false;
        NoticeSet.GoalX = 0;
        NoticeSet.GoalY = 0;
        RollingNotice.appendChild(NoticeSet);
        this.getNoticeSet = NoticeSet;
        this.getNoticeElement = [];
        for (var i=0; i<this.TotalAmt; i++) {
            var Column = i % this.ColAmt;
            var Row = Math.floor(i/this.ColAmt);
            var PosX = Column * this.ElementWidth;
            var PosY = Row * this.SectionHeight;
            var BaseValue = i * this.ElementRowAmt;
            var RollingNoticeElement = document.createElement('div');
            RollingNoticeElement.style.position = 'absolute';
            RollingNoticeElement.style.width = this.ElementWidth + 'px';
            RollingNoticeElement.style.height = this.SectionHeight + 'px';
            RollingNoticeElement.style.left = PosX + 'px';
            RollingNoticeElement.style.top = PosY + 'px';
            RollingNoticeElement.ClassID = this.id;
            RollingNoticeElement.Serial = i;
            RollingNoticeElement.GoalX = PosX * -1;
            RollingNoticeElement.GoalY = PosY * -1;

            for (var j=0; j<this.ElementRowAmt; j++) {
                var SerialID = BaseValue + j;
                if (!this.DataObj.NoticeInfo[SerialID]) break;
                var TextL = this.TetxLength[0];
                var NoticeElement = document.createElement('div');
                NoticeElement.className = 'NoticeElement';
                NoticeElement.style.width = this.ElementWidth + 'px';
                NoticeElement.style.height = this.ElementHeight + 'px';
                NoticeElement.style.lineHeight = this.ElementHeight + 'px';
                if (this.SignConfirm(SerialID)) {
                    var SignNew = document.createElement('span');
                    SignNew.style.height = this.ElementHeight + 'px';
                    NoticeElement.appendChild(SignNew);
                    TextL = this.TetxLength[1];
                }
                var LinkSet = document.createElement('div');
                LinkSet.style.width="100%";
                LinkSet.style.overflow = "hidden";
                LinkSet.innerHTML = this.DataObj.NoticeInfo[SerialID].textset;
                NoticeElement.appendChild(LinkSet);
                RollingNoticeElement.appendChild(NoticeElement);
            }//end for

            RollingNoticeElement.onmouseover = function() {
                var ObjMapping = eval('RollingNotice'+this.ClassID);
                if (ObjMapping.BlockAction) return;
                clearTimeout(ObjMapping.TimerIntervalID);
            }
            RollingNoticeElement.onmouseout = function() {
                var ObjMapping = eval('RollingNotice'+this.ClassID);
                if (ObjMapping.BlockAction) return;
                clearTimeout(ObjMapping.TimerIntervalID);
                ObjMapping.TimerIntervalID = setTimeout('RollingNotice'+ObjMapping.id+'.VaryAction()', ObjMapping.Timer);
            }
            NoticeSet.appendChild(RollingNoticeElement);
            this.getNoticeElement.push(RollingNoticeElement);
        }//end for

        //VaryAction
        this.VaryAction();
    }

    // 全選
    function my_select_all(obj,tar_obj){
        var chk = obj.checked;
        var arr = document.getElementsByTagName("INPUT");
        for(var i = 0;i<arr.length;i++){
            if(arr[i].id == tar_obj)
                arr[i].checked = chk
        }
    }

    function show_msg_box_speak(mb_id){
        if(document.body.scrollTop){
            document.body.scrollTop = 0;
        }else {
            document.documentElement.scrollTop = 0;
        }
        $(document.body).setStyle({scroll:"no",overflow:"hidden"});
        var w = parseInt($(document.body).getStyle('width'))-12;
        var h = parseInt($(document.body).getStyle('height'));
        if(h>950)h=800;
        var obj = $(mb_id);
        var w1 = (w-parseInt(obj.getStyle("width")))/2;
        var h1 = (h-parseInt(obj.getStyle("height")))/3;
        obj.setStyle({left:w1+"px",top:h1+"px"});
        $('cover_layer').setStyle({left:w1+"px",top:h1+"px"});
        $('cover_layer').style.display = 'block';
        obj.style.display = 'block';
        obj.style.zIndex = parseInt($('cover_layer').getStyle("zIndex"))+1;
        $('cover_iframe').width = parseInt($(mb_id).getStyle("width"))-5+"px";
        $('cover_iframe').height = parseInt($(mb_id).getStyle("height"))-5+"px";
        if(navigator.appVersion.indexOf("MSIE 6.0"))//ie6 div width 100% 似乎被設定到css了~
            $('mask_layer').setStyle({width:$(document.body).getStyle('width')});
        $('mask_layer').style.display = 'block';
        if(navigator.appVersion.indexOf("MSIE")>0){//ie無法隱藏scroll bar暫時將mask長度設成跟body長度一樣長
            $('mask_layer').setStyle({height:$(document.body).getStyle('height')});
            obj.setStyle({left:w1+"px",top:"150px"});
            $('cover_layer').setStyle({left:w1+2+"px",top:"155px"});
            if(mb_id == "fwd"){
                var obj = $($('fwd'));
                var obj1 = $($('fwd').childNodes[0]);
                var w = parseInt(obj.getStyle("width"))+"px";
                var h = parseInt(obj.getStyle("height"))+12+"px";
                obj1.setStyle({width:w,height:h});
            }
        }
    }

    function show_msg_box2(mb_id){
        if(document.body.scrollTop){
            document.body.scrollTop = 0;
        }else {
            document.documentElement.scrollTop = 0;
        }
        //alert($('fwd_iframe').src);
        if($('fwd_iframe').src == "" || $('fwd_iframe').src == location.href) {
            $('fwd_iframe').src = "/active/2009/bt_fortune/alert.htm"
        }
        $(document.body).setStyle({scroll:"no",overflow:"hidden"});
        var w = parseInt($(document.body).getStyle('width'))-12;
        var h = parseInt($(document.body).getStyle('height'));
        if(h>950)h=800;

        var obj = $(mb_id);
        var w1 = (w-parseInt(obj.getStyle("width")))/2;
        var h1 = (h-parseInt(obj.getStyle("height")))/3;
        obj.setStyle({left:w1+"px",top:h1+"px"});
        $('cover_layer').setStyle({left:w1+"px",top:h1+"px"});
        $('cover_layer').style.display = 'block';
        obj.style.display = 'block';
        obj.style.zIndex = parseInt($('cover_layer').getStyle("zIndex"))+1;
        $('cover_iframe').width = parseInt($(mb_id).getStyle("width"))-5+"px";
        $('cover_iframe').height = parseInt($(mb_id).getStyle("height"))-5+"px";

        if(navigator.appVersion.indexOf("MSIE 6.0"))//ie6 div width 100% 似乎被設定到css了~
            $('mask_layer').setStyle({width:$(document.body).getStyle('width')});

        $('mask_layer').style.display = 'block';
        if(navigator.appVersion.indexOf("MSIE")>0){//ie無法隱藏scroll bar暫時將mask長度設成跟body長度一樣長
            $('mask_layer').setStyle({height:$(document.body).getStyle('height')});
            obj.setStyle({left:w1+"px",top:"150px"});
            $('cover_layer').setStyle({left:w1+2+"px",top:"154px"});
            if(mb_id == "alert"){
                var obj = $($('fwd'));
                var obj1 = $($('fwd').childNodes[0]);
                var w = parseInt(obj.getStyle("width"))+"px";
                var h = parseInt(obj.getStyle("height"))+12+"px";
                obj1.setStyle({width:w,height:h});
            }
        }
    }

    function close_msg(mb_id){
        $(mb_id).style.display = 'none';
        $('cover_layer').style.display = 'none';
        $('mask_layer').style.display = 'none';
        $(document.body).setStyle({scroll:"",overflow:""});
    }
    function close_msg2(mb_id){
        $(mb_id).style.display = 'none';
        $('cover_layer').style.display = 'none';
        $('mask_layer').style.display = 'none';
        $(document.body).setStyle({scroll:"",overflow:""});
    }

    function speak(){
        if($F('speak_target') == ""){
            show_msg('請輸入對象');
            $('speak_target').focus();
            return false;
        } else {
            if($F('speak_target').match(/^[a-zA-Z\d\`\~\!\@\#\$\%\^\&\*\(\)\_\-\+\=\|\\\{\}\[\]\"\'\?\/\.\,\>\<\ \;\:]+$/)) {
                var len = 8
            } else {
                var len = 4
            }
            if($F('speak_target').length > len) {
                show_msg('對象只能輸入 4 個全型字或 8 個半型字以內');
                return false;
            }
        }
        if($F('speak_content') == ""){
            show_msg('請輸入紙條內容');
            $('speak_content').focus();
            return false;
        }
        if(gcode_test("Gcode_Space") == 0){
            reset_gcode();
            return false;
        }
        new Ajax.Request("/speak_do.htm", {
        parameters: $H({target      : $F('speak_target'),
                        content     : $F('speak_content'),
                        Auth_Code   : $('Auth_Code').value}),
        asynchronous:false,
        onSuccess: function(transport) {
                if(transport.responseText == "success"){
                    location.href='index.htm';
                    return false;
                } else {
                    if(transport.responseText == "此為會員專屬功能，請先登入") {
                        location.href='/oops/login/1/';
                        return false;
                    } else if (transport.responseText == "此為美學院會員專屬功能，請先加入") {
                        location.href='/oops/notfound/9/';
                        return false;
                    } else if(transport.responseText == "一天只能傳紙條一次，您今天已經傳過了!"){
                        show_msg(transport.responseText);
                        close_msg('speak');
                        reset_gcode('Gcode_Space');
                        return false;
                    }
                    show_msg(transport.responseText);
                    reset_gcode('Gcode_Space');
                    return false;
                }
            }
        });
    }

    //gcode驗證用
    function gcode_test(Gcode_Space){
        //暫時關閉gcode
        //return 1;
        var flag = 0;
        new Ajax.Request("/Gcode_Auth.php", {
            parameters: $H({authRandnum: $('authRandnum').value,
                            authRandcode:$('authRandcode').value,
                            authAddr:$('authAddr').value}).toQueryString(),
            asynchronous: false,
            onSuccess: function(transport) {
                if(transport.responseText.substr(0,1) == "1") {
                    flag = 1;
                    $('Auth_Code').value = transport.responseText.substr(2,transport.responseText.length);
                } else {
                    flag = 0;
                    alert('驗證失敗！驗證碼重新產生');
                    reset_gcode(Gcode_Space);
                }
            }
        });
        return flag;
    }

    //gcode重設
    function reset_gcode(Gcode_Space){
        new Ajax.Request("/Gcode_Api1.php", {
            parameters: $H({abc: "def"}).toQueryString(),
            onSuccess: function(transport) {
                $(Gcode_Space).innerHTML = transport.responseText;
                //Gcode_Space為存放gcode的容器（div or td or 其它tag的id)
            }
        });

    }

    function show_msg(msg){//暫時用show_msg的方式
        alert(msg);
    }

   // 首頁的專欄
   function special_change(pic,dno,title,author,author_link,content,ch_css_no) {
        $('special_pic').src = '/public_file/get_pic_index.php?pic=' + pic;                  //圖片

        $('special_link').href = '/myroom/' + author_link + '/article/' + dno;               //全文連結
        $('content_path').href = '/myroom/' + author_link + '/article/' + dno;               //標題連結

        $('special_title').innerHTML = title;                                                //標題
        $('special_author').innerHTML = author;                                              //作者
        $('author_link').href = '/myroom/' + author_link;                                    //作者連結
        $('special_content').innerHTML = content;                                            //內文

        for(var i =0;i<3;i++){
            if(i == ch_css_no) {
                $('ch_css_'+i).className = "tbbut_on";
            } else {
                $('ch_css_'+i).className = "tbbut_of";
            }
        }

        return false;
   }

    function mypaper_article_reply(){
        if($('nick') != null) {
            if($F('nick') == ""){
                alert('請輸入您的大名');
                $('nick').focus();
                return false;
            }
        }
        if($F('text') == ""){
            alert('您尚未輸入留言內容');
            $('text').focus();
            return false;
        }
        if(gcode_test("Gcode_Space") == 0){
            reset_gcode();
            return false;
        }

    }

    // 愛用品牌
    function fav_brand_check() {
        var nums = 0;
        $A(document.getElementsByTagName("INPUT")).each(function(s){
            if(s.id == "brand" && s.checked == true)
                nums++;
        });
        if(nums < 3 || nums > 10) {
            alert('請選擇 3~10 項愛用品牌');
            return false;
        } else {
            return true;
        }
        return false;

    }


    // 個人資料 髮色選擇
    function hair_color_sel(obj){
        if (obj.checked == true){
            $('hair_color').style.display='inline';
        }else{
            $('hair_color').style.display='none';
        }
    }

    //編輯個人資料上傳圖片用
    function set_img(pic_path){
        $('head_pic_view').style.display= 'inline';

        //若使用pchome photo圖，就用+set的縮圖
        reg = /photo.pchome.com.tw/;

        if (reg.test(pic_path)){
            pic_path  = pic_path +'set';
        }

        $('head_pic_view').src=pic_path;
    }

    //編輯個人資料上傳圖片用
    function hide_pic(obj){
            $('head_pic_link').innerHTML = "還原";
            $('head_pic_link').onclick = show_pic;
            $('head_pic_view').style.display = "none";
            //新增加, 如清除則使用預設
            $('head_pic_def').style.display = "block";
            $('head_pic_def').src = '/img/icon_def_110.gif';
            $('head_pic').value = '/img/icon_def_110.gif';
    }

    //編輯個人資料上傳圖片用
    function show_pic(obj){
        $('head_pic_link').innerHTML = "清除";
        $('head_pic_link').onclick = hide_pic;
        $('head_pic_view').style.display = "";
        //新增加, 如還原則使用原來圖片
        $('head_pic_def').style.display = "none";
    }

    // 個人資料(申請、修改)頁  點擊預設圖，將圖丟入圖片欄
    function big_head(obj){
            var def_head_type = document.getElementsByName("def_head");
            choose_head = 0;
            for(i=0;i<def_head_type.length;i++)
                {
                    if(def_head_type[i].checked){
                        choose_head = def_head_type[i].value;
                    }
               }
            $('head_pic_view').style.display = 'inline';
            $('head_pic_view').src= choose_head;
            $('head_block').style.display = 'none';
    }


    // 個人資料(申請、修改)頁 送出前檢查
    function check(){

        if($('head_pic_view').style.display == 'none'){
            //alert('未上傳頭像請選擇預設頭像');
            //return false;
            $('pic_url').value = $('head_pic_def').src;
        }else{
            $('pic_url').value = $('head_pic_view').src;
        }

        //部屋物語
        if (document.getElementById("blogintro").value == ''){
            alert('尚未填寫部屋物語');
            return false;
        }

        //推薦人網址
        if (document.getElementById("myroom_url").value != ''){
            re = /^http:\/\/.*$/;
            if (!re.test(document.getElementById("myroom_url").value)){
                alert('推薦人部屋網址必須是 http:// 開頭');
                return false;
            }
        }

        //膚質
        var skin = document.getElementsByName("skin");
        choose_skin = 0;

        for(i=0;i<skin.length;i++)
            {
                if(skin[i].checked){
                    choose_skin = skin[i].value;
                }
           }
        if (choose_skin == 0){
            alert('未選擇膚質');
            return false;
        }

        //髮型
        var hair_type = document.getElementsByName("hair_type");
        choose_hair_type = 0;

        for(i=0;i<hair_type.length;i++)
            {
                if(hair_type[i].checked){
                    choose_hair_type = hair_type[i].value;
                }
           }
        if (choose_hair_type == 0){
            alert('未選擇髮型');
            return false;
        }

        //髮色
       // if ($('color_check').checked == true){
            if ($('hair_color').value == 0){
                alert('請選擇髮色');
                return false;
            }
      //  }

        //外型特質
        var look_like = document.getElementsByName("look_like");
        choose_look_like = 0;

        for(i=0;i<look_like.length;i++)
            {
                if(look_like[i].checked){
                    choose_look_like = look_like[i].value;
                }
           }
        if (choose_look_like == 0){
            alert('未選擇外型特質');
            return false;
        }

        //化妝喜好
        var make_up = document.getElementsByName("make_up[]");
        choose_make_up = 0

        for(i=0;i<make_up.length;i++)
            {
                if(make_up[i].checked){
                    choose_make_up++ ;
                }
           }
        if (choose_make_up == 0){
            alert('未選擇化妝喜好');
            return false;
        }
    }

    // sign4  合約checkbox檢查
    function law_check(){
        var check = document.getElementsByName("law");

        if ( check[0].checked == true){
            $('next').style.display= 'inline';
        }else{
            $('next').style.display= 'none';
        }
    }

    // sign4 開新站台check
    function station_check(){
        if ($('mypaper_id').value == ""){
            alert('未輸入站台網址');
            return false;
        }
    }

    // 首頁 學院長、生切換
    function index_blog(status) {
        if (status == 't'){
            $('index_t').className= 'blogm_on';
            $('index_s').className= 'blogs_of';
            $('teacher').style.display='block';
            $('student').style.display='none';
        }else{
            $('index_t').className= 'blogm_of';
            $('index_s').className= 'blogs_on';
            $('teacher').style.display='none';
            $('student').style.display='block';
        }
    }

    // 首頁 學院長、生切換
    function index_blog2(status) {
        if (status == 't'){
            $('index_c').className= 'blogc_of';
            $('index_t').className= 'blogm_on';
            $('index_s').className= 'blogs_of';
            $('gm').style.display='none';
            $('teacher').style.display='block';
            $('student').style.display='none';
        }else if(status == 'c'){
            $('index_c').className= 'blogc_on';
            $('index_t').className= 'blogm_of';
            $('index_s').className= 'blogs_of';
            $('gm').style.display='block';
            $('teacher').style.display='none';
            $('student').style.display='none';
        }else{
            $('index_c').className= 'blogc_of';
            $('index_t').className= 'blogm_of';
            $('index_s').className= 'blogs_on';
            $('gm').style.display='none';
            $('teacher').style.display='none';
            $('student').style.display='block';
        }
    }

    // 內頁 學院長、生切換
    function inner_blog(status) {

        if (status == 't'){
            $('inner_c').className= 'blogc_of';
            $('inner_t').className= 'blogm_on';
            $('inner_s').className= 'blogs_of';
            $('gm').style.display='none';
            $('teacher').style.display='block';
            $('student').style.display='none';
        }else if(status == 'c'){
            $('inner_c').className= 'blogc_on';
            $('inner_t').className= 'blogm_of';
            $('inner_s').className= 'blogs_of';
            $('gm').style.display='block';
            $('teacher').style.display='none';
            $('student').style.display='none';
        }else{
            $('inner_c').className= 'blogc_of';
            $('inner_t').className= 'blogm_of';
            $('inner_s').className= 'blogs_on';
            $('gm').style.display='none';
            $('teacher').style.display='none';
            $('student').style.display='block';
        }
    }

    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }

    function defpic(objImg){
        objImg.src = "/img/def_01.gif";
    }