var agt      = navigator.userAgent.toLowerCase();
var is_ie    = ( agt.indexOf("msie") != -1 );
var is_nav   = ( ( agt.indexOf("mozilla") != -1 ) && ( agt.indexOf("spoofer") == -1 ) && ( agt.indexOf("compatible") == -1 ) && ( agt.indexOf("opera") == -1 ) && ( agt.indexOf("webtv") == -1 ) );
var is_mac   = ( agt.indexOf("mac")  != -1 );
var is_macie = ( is_mac && is_ie );
var cnt      = -1;
var curr     = "";
var i        = -1;
var concat   = 0;
var endChar  = "";
var timeOut  = 50;
var widOne   = "-";
var widTwo   = "_";
var whisperLayer;

function whisperTicker() {
  if ( cnt < whisperList.length - 1 ) {
    cnt++;
  }
  else {
    cnt = 0;
  }

  if ( is_macie ) {
    // MacIE
    whisperLayer = document.all["mTxt"];
    whisperLayer.innerHTML = whisperList[cnt];
    setTimeout( "whisperTicker()", 120000 );
  }
  else {
    typeWhispers();
  }
}

function typeWhispers() {
  // next character of current item
  tmp  = whisperList[cnt].split( '' );

  if ( i < whisperList[cnt].length - 1 ) {
    i++;

    switch ( tmp[i] ) {
      case "&": {
        concat  = 1;
        timeOut = 1;
        endChar = ";"
      }
      break;
      case "<": {
        concat  = 1;
        timeOut = 1;
        endChar = ">";
      }
      break;
    }

    if( ( i % 2 ) == 1 ) {
      widCur = widOne;
    }
    else {
      widCur = widTwo;
    }

    if ( whisperList[cnt].length - 1 == i ) { widCur = "" }

    curr = curr + tmp[i];
    if ( concat != 1 ) {
      if ( document.layers ) {
        whisperLayer = document.layers[0];
        whisperLayer.document.open();
        whisperLayer.document.write( curr + widCur );
        whisperLayer.document.close();
      }

      if ( document.all ) {
        whisperLayer = document.all["mTxt"];
        whisperLayer.innerHTML = curr + widCur;
      }

      if ( !document.all && document.getElementById ) {
        whisperLayer = document.getElementById("mTxt");
        whisperLayer.innerHTML = curr + widCur;
      }
    }
    else if ( tmp[i] == endChar ) {
      concat  = 0;
      endChar = "";
      timeOut = 50;

      if ( is_ie ) {
        // IE
        whisperLayer = document.all["mTxt"];
        whisperLayer.innerHTML = curr + widCur;
      }

      if ( is_nav ) {
        if ( document.layers ) {
          // NS4
          whisperLayer = document.layers[0];
          whisperLayer.document.open();
          whisperLayer.document.write( curr + widCur );
          whisperLayer.document.close();
        }

        if ( !document.all && document.getElementById ) {
          // NS6
          whisperLayer = document.getElementById("mTxt");
          whisperLayer.innerHTML = curr + widCur;
        }
      }
    }
    setTimeout( "typeWhispers()", timeOut );
    return;
  }

  // new item
  i    = -1;
  curr = "";

  //setTimeout( "whisperTicker()", 5000 );
}