function setHome(a,b){try{a.style.behavior="url(#default#homepage)";a.setHomePage(b)}catch(c){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(d){alert("\u62b1\u6b49\uff01\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u76f4\u63a5\u8bbe\u4e3a\u9996\u9875\u3002\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165\u201cabout:config\u201d\u5e76\u56de\u8f66\u7136\u540e\u5c06[signed.applets.codebase_principal_support]\u8bbe\u7f6e\u4e3a\u201ctrue\u201d\uff0c\u70b9\u51fb\u201c\u52a0\u5165\u6536\u85cf\u201d\u540e\u5ffd\u7565\u5b89\u5168\u63d0\u793a\uff0c\u5373\u53ef\u8bbe\u7f6e\u6210\u529f\u3002")}Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).setCharPref("browser.startup.homepage", b)}}}function AddFavorite(a,b){try{window.external.addFavorite(a,b)}catch(c){try{window.sidebar.addPanel(b,a,"")}catch(d){alert("\u52a0\u5165\u6536\u85cf\u5931\u8d25\uff0c\u8bf7\u4f7f\u7528Ctrl+D\u8fdb\u884c\u6dfb\u52a0")}}}function showMenu(a){document.getElementById(a).style.display="block"}function hideMenu(a){document.getElementById(a).style.display="none"} function setTab(a,b){var c=document.getElementById("menu"+a).getElementsByTagName("li");a="main"+a;for(i=0;i<c.length;i++){c[i].className=i==b?"hover":"";document.getElementById(a+"_"+i).style.display=i==b?"block":"none"}} function ScrollText(a,b,c,d,e,f){this.Speed=10;this.Timeout=e;this.stopscroll=false;this.isSmoothScroll=f;this.LineHeight=20;this.NextButton=this.$(c);this.PreviousButton=this.$(b);this.ScrollContent=this.$(a);this.ScrollContent.innerHTML+=this.ScrollContent.innerHTML;if(this.PreviousButton){this.PreviousButton.onclick=this.GetFunction(this,"Previous");this.PreviousButton.onmouseover=this.GetFunction(this,"MouseOver");this.PreviousButton.onmouseout=this.GetFunction(this,"MouseOut")}if(this.NextButton){this.NextButton.onclick= this.GetFunction(this,"Next");this.NextButton.onmouseover=this.GetFunction(this,"MouseOver");this.NextButton.onmouseout=this.GetFunction(this,"MouseOut")}this.ScrollContent.onmouseover=this.GetFunction(this,"MouseOver");this.ScrollContent.onmouseout=this.GetFunction(this,"MouseOut");d&&this.Start()} ScrollText.prototype={$:function(a){return document.getElementById(a)},Previous:function(){this.stopscroll=true;this.Scroll("up")},Next:function(){this.stopscroll=true;this.Scroll("down")},Start:function(){this.AutoScrollTimer=this.isSmoothScroll?setInterval(this.GetFunction(this,"SmoothScroll"),this.Timeout):setInterval(this.GetFunction(this,"AutoScroll"),this.Timeout)},Stop:function(){clearTimeout(this.AutoScrollTimer);this.DelayTimerStop=0},MouseOver:function(){this.stopscroll=true},MouseOut:function(){this.stopscroll= false},AutoScroll:function(){if(!this.stopscroll){this.ScrollContent.scrollTop++;if(parseInt(this.ScrollContent.scrollTop)%this.LineHeight!=0)this.ScrollTimer=setTimeout(this.GetFunction(this,"AutoScroll"),this.Speed);else{if(parseInt(this.ScrollContent.scrollTop)>=parseInt(this.ScrollContent.scrollHeight)/2)this.ScrollContent.scrollTop=0;clearTimeout(this.ScrollTimer)}}},SmoothScroll:function(){if(!this.stopscroll){this.ScrollContent.scrollTop++;if(parseInt(this.ScrollContent.scrollTop)>=parseInt(this.ScrollContent.scrollHeight)/ 2)this.ScrollContent.scrollTop=0}},Scroll:function(a){if(a=="up")this.ScrollContent.scrollTop--;else this.ScrollContent.scrollTop++;if(parseInt(this.ScrollContent.scrollTop)>=parseInt(this.ScrollContent.scrollHeight)/2)this.ScrollContent.scrollTop=0;else if(parseInt(this.ScrollContent.scrollTop)<=0)this.ScrollContent.scrollTop=parseInt(this.ScrollContent.scrollHeight)/2;if(parseInt(this.ScrollContent.scrollTop)%this.LineHeight!=0)this.ScrollTimer=setTimeout(this.GetFunction(this,"Scroll",a),this.Speed)}, GetFunction:function(a,b,c){return function(){a[b](c)}}};
