﻿//加入收藏夹 
//lizjmnew 2009.11.20
$(document).ready(function() { 
    $('#CollectionClick').click(function(){
        var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL'; 
        if(jQuery.browser.msie){ 
            window.external.addFavorite('http://www.5dxt.com','我的学堂 校园协同服务平台');
        }
        else if (document.all){
            window.external.addFavorite('http://www.5dxt.com','我的学堂 校园协同服务平台'); 
        }
       else if (window.sidebar){ 
            window.sidebar.addPanel('我的学堂 校园协同服务平台', 'http://www.5dxt.com', ""); 
       }
       else { 
           alert('您可以尝试通过快捷键' + ctrl + ' + D 加入到收藏夹'); 
       } 

    });
});

//设为首页 
//lizjmnew 2009.11.20
$(document).ready(function() { 
    $('#siteClick').click(function(){
        try{
            this.style.behavior='url(#default#homepage)';this.setHomePage("http://www.5dxt.com");
        }
        catch(e){
             if(window.netscape){
                 alert("此操作被浏览器拒绝！请在浏览器地址栏输入“about:config”并回车然后将 [signed.applets.codebase_principal_support]设置为'true'");
                 }
        }
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
        prefs.setCharPref('browser.startup.homepage',vrl);
    });
});

//标题栏信息提醒
//step=0 
//function flash_title() 
//{ 
//step++ 
//if (step==3) {step=1} 
//if (step==1) {document.title='您有新的信息'} 
//if (step==2) {document.title='...........'} 
//setTimeout("flash_title()",400); 
//} 
//flash_title() 
