



  // ----------------------------- JavaScript - funkce ---------------------------------------------------------------------------------------------------------
  var elmPTextMyDiv = null;
  var strPTextText = '';
  var strPTextLeft = ' ';
  var strPTextRight = '';
  var intPTextIndex = -1;
  // ----------------------------- JavaScript - funkce ---------------------------------------------------------------------------------------------------------
  function fncMoveText()                                // funkce scroluje evektne textik
    {                                                   // zacatek funkce 

      if (strPTextLeft.length == 1)                     // jestlize je delka retezece (Left) rovna jedne tzn je tam uvodni mezera ' ' nebo jedno pismenko z beziciho textu
        {                                               // tak proved 
          strPTextRight += strPTextLeft;                // do praveho textu zretez hodnotu z leveho textu 
          intPTextIndex ++;                             // pricti k indexni promenne jednicku 
          strPTextLeft = '';                            // zinizilizuj levy retezec 
          for (var i=0; i< 50-intPTextIndex; i++) strPTextLeft += '&nbsp;';    // dosad do retezce pevne mezery
          strPTextLeft += strPTextText.charAt(intPTextIndex);                  // a take (samozrejme) znak, ktery se bude pohybovat 
        }                                                                      // ukonci blok 
      strPTextLeft = strPTextLeft.substring(strPTextLeft.length > 24 ? 24 : parseInt(strPTextLeft.length-1), strPTextLeft.length)    // dosad podretezec orezany o mezery, kontrala teke poctu mezer
      
      strOut = '<A href="mailto:michael@stavela.cz">' + strPTextRight + '</A>' + strPTextLeft;
      
      //var S = '';
      //if (intPTextIndex > 2)
      //  {
      //    S = strOut.substring(0, 2) + '<A href="mailto:michael@stavela.cz">' + '</A>' + strOut.substring(2, strOut.length);
      //    strOut = S;
      //  }
      
      
      elmPTextMyDiv.innerHTML = strOut
      // -- konce zobrazeni textiku
      
      if (intPTextIndex == strPTextText.length)         // jestlize byl vybranny cely retezec tak 
        {                                               // blok 
          strPTextLeft = ' ';                           // znovu zinicalizuj retezce 
          strPTextRight = '';                           // 
          intPTextIndex = -1;                           // a indexni promennou
          setTimeout('fncMoveText();', 2000);           // dolej funkci po timeOut
        }
      else
        setTimeout('fncMoveText();', 30);

    }
  // ----------------------------- JavaScript - funkce ---------------------------------------------------------------------------------------------------------
  function fncMoveTextInit()
    {

      elmPTextMyDiv = document.getElementById('PTextMyDiv'); 
      // if (document.all)
      //  {
      //    fncMoveText();
      //  }
      // else 
        elmPTextMyDiv.innerHTML = '<A href="mailto:michael@stavela.cz">'+ strPTextText +'</A>';
        
    }
  // ----------------------------- JavaScript - funkce ---------------------------------------------------------------------------------------------------------
