<!--
  String.prototype.trim=trim;
  String.prototype.ltrim=ltrim;
  String.prototype.rtrim=rtrim;
	
	//---------------
  function trim() 
  {
    return this.replace(/^\s+|\s+$/g, "");
  } 
	//---------------
  function ltrim()
  {
    return this.replace(/(^\s*)/g, "");
  }
	//---------------
  function rtrim()
  {
    return this.replace(/(\s*$)/g, "");
  }
	//---------------
	//addBookmark("Tsung Blog", "http://plog.longwin.com.tw"); 
	function addBookmark(sTitle, sUrl)
	{
    if (window.sidebar && window.sidebar.addPanel) {
      addBookmark = function(sTitle, sUrl) {
        window.sidebar.addPanel(sTitle, sUrl, "");
      }
    } 
		else if (window.external) {
      addBookmark = function(sTitle, sUrl) {
        window.external.AddFavorite(sUrl, sTitle);
      }
    } 
		else {
      addBookmark = function() {
        alert("本功能無效，請手動加入!");
      }
    }
    return addBookmark(sTitle, sUrl);
	}
	//-------------------------- 設置首頁 
	function setHomepage(){
			if (document.all){ 
					document.body.style.behavior = 'url(#default#homepage)'; 
					document.body.setHomePage('http://www.az-sportsnet.com'); 
			}else if (window.sidebar){ 
					if (window.netscape){ 
							try { 
									netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
							}catch (e) { 
									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', 'http://www.az-sportsnet.com'); 
			} 
	} 
	//---下拉選單
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) 
			selObj.selectedIndex=0;
	}
	function gotoBall(sports_category) {
		lnkBall = "?"+jaBID+"=" + spID[sports_category];
		location = lnkBall;
	}
//-->

