InBlock.gif /*加入收藏夹*/
InBlock.giffunction addfavorite(url,title)
InBlock.gif{
InBlock.gif         try
InBlock.gif        {
InBlock.gif                window.external.addfavorite(url,title);
InBlock.gif        }
InBlock.gif         catch (e)
InBlock.gif        {
InBlock.gif                 try
InBlock.gif                {
InBlock.gif                        window.sidebar.addPanel(title, url, "");
InBlock.gif                }
InBlock.gif                 catch (e)
InBlock.gif                {
InBlock.gif                        alert( "加入收藏失败,请使用ctrl+d进行添加");
InBlock.gif                }
InBlock.gif        }
InBlock.gif}
InBlock.gif
InBlock.gif /*设为首页*/
InBlock.giffunction sethome(obj,vrl){
InBlock.gif                 try{
InBlock.gif                                obj.style.behavior='url(# default#homepage)';obj.setHomePage(vrl);
InBlock.gif                }
InBlock.gif                 catch(e){
InBlock.gif                                 if(window.netscape) {
InBlock.gif                                                 try {
InBlock.gif                                                                netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect");
InBlock.gif                                                }
InBlock.gif                                                 catch (e) {
InBlock.gif                                                                alert( "此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
InBlock.gif                                                }
InBlock.gif                                                var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
InBlock.gif                                                prefs.setCharPref('browser.startup.homepage',vrl);
InBlock.gif                                 }
InBlock.gif                }
InBlock.gif}