function setupBstirValues() {bstirFadeTitles[0] = "GAME: 經典直昇機"; bstirFadeLinks[0] = "http://sunsygame.blogspot.com/2009/06/blog-post_24.html"; bstirFadeSnippets[0] = "Wed, 24 Ju"; bstirFadeTitles[1] = "GAME: BUBBLY TUNE"; bstirFadeLinks[1] = "http://sunsygame.blogspot.com/2007/09/bubbly-tune.html"; bstirFadeSnippets[1] = "Sun, 02 Se"; bstirFadeTitles[2] = "GAME: 豬仔逃亡"; bstirFadeLinks[2] = "http://sunsygame.blogspot.com/2007/09/blog-post_7354.html"; bstirFadeSnippets[2] = "Sun, 02 Se"; bstirFadeTitles[3] = "GAME: 快手壽司"; bstirFadeLinks[3] = "http://sunsygame.blogspot.com/2007/10/blog-post.html"; bstirFadeSnippets[3] = "Sat, 06 Oc"; bstirFadeTitles[4] = "GAME: Badaboom"; bstirFadeLinks[4] = "http://sunsygame.blogspot.com/2008/07/badaboom.html"; bstirFadeSnippets[4] = "Thu, 17 Ju"; }

        var bstir_FadeOut = 255;
        var bstir_FadeIn=0;
        var bstir_Fade = 0;
        var bstir_FadeStep = 3;
        var bstir_FadeWait = 10000;
        var bstir_bFadeOut = true;
        var bstir_iFadeInterval;

        var bstirFadeLinks;
        var bstirFadeTitles;
        var bstirFadeSnippets;
        var bstirFadeCursor = 0;
        var bstirFadeMax;
        var bstirTitleElement;
        var bstirSnippetElement;

        function startBstir() {
          bstirTitleElement = document.getElementById("bstir_title");
          bstirSnippetElement = document.getElementById("bstir_snippet");
          bstir_iFadeInterval = setInterval(showBstirItem, 10);
          bstirFadeLinks = new Array();
          bstirFadeTitles = new Array();
          bstirFadeSnippets = new Array();
          setupBstirValues();
          bstirFadeMax = bstirFadeLinks.length-1;
          setBstirItem();
        }

        function setBstirItem() {
          bstirTitleElement.innerHTML = bstirFadeTitles[bstirFadeCursor];
          bstirTitleElement.href = bstirFadeLinks[bstirFadeCursor];
          bstirSnippetElement.innerHTML = bstirFadeSnippets[bstirFadeCursor];
        }

        function showBstirItem() {
          if (bstir_bFadeOut) {
            bstir_Fade+=bstir_FadeStep;
            if (bstir_Fade>bstir_FadeOut) {
                  bstirNext();
            }
          } else {
            bstir_Fade-=bstir_FadeStep;
            if (bstir_Fade<bstir_FadeIn) {
              clearInterval(bstir_iFadeInterval);
              setTimeout(bstirResume, bstir_FadeWait);
              bstir_bFadeOut=true;
            }
          }
          if ((bstir_Fade<bstir_FadeOut)&&(bstir_Fade>bstir_FadeIn)){
            bstirTitleElement.style.color = "#" + bstirToHex(bstir_Fade);
            bstirSnippetElement.style.color = "#" + bstirToHex(bstir_Fade);
          }
        }

        function bstirResume() {
          bstir_iFadeInterval = setInterval(showBstirItem, 10);
        }

        function bstirNext() {
                bstirFadeCursor++;
            if (bstirFadeCursor>bstirFadeMax)
              bstirFadeCursor=0;
            setBstirItem();
                bstir_bFadeOut = false;
        }

        function bstirToHex(strValue) {
          try {
            var result= (parseInt(strValue).toString(16));

            while (result.length !=2)
                    result= ("0" +result);
            result = result + result + result;
            return result.toUpperCase();
          }
          catch(e){}
        }

        startBstir();

        