// Source code Copyright © vanAnnies.  All Rights Reserved.
// Contact GetTheGhost.com for Licensing
function vanGhostSwap(l, t, p, r) { this.repeat = true; this.pause = 0; this.countdown = 0; this.steps = null; this.stepndx = 0; this.text = null; this.textndx = 0; this.step = vanGhostSwap.step; if(p != undefined) this.pause = p * vanGhostTimer.getStepsPerSecond(); if(r != undefined) this.repeat = r; if(l != undefined) this.layer = document.getElementById(l); if(t != undefined) this.text = t; } vanGhostSwap.step = function() { if(this.text) { if(this.textndx >= this.text.length) this.textndx = 0; if(this.countdown == 0) { this.layer.innerHTML = this.text[this.textndx]; this.textndx++; this.countdown = this.pause; } this.countdown--; } return this.countdown || this.repeat; }; 
