// Source code Copyright © vanAnnies.  All Rights Reserved.
// Contact GetTheGhost.com for Licensing
function vanGhostMove(l,s,r,t) { this.layer = null; this.repeat = true; this.steps = null; this.stepndx = 0; this.text = null; this.textndx = 0; this.step = vanGhostMove.step; if(l) this.layer = document.getElementById(l); if(s) this.steps = s; if(r !== undefined) this.repeat = r; if(t) this.text = t; } vanGhostMove.step = function() { var keepgoing = false; if(this.stepndx >= this.steps.length && (!this.text || (this.textndx >= this.text.length)) && !this.repeat) return false; else keepgoing = true; var s = this.layer.style; do { if(this.stepndx >= this.steps.length) this.stepndx = 0; var op = this.steps[this.stepndx]; if(op == 'x') { if(this.text) { if(this.textndx >= this.text.length && this.repeat) this.textndx = 0; this.layer.innerHTML = this.text[this.textndx]; this.textndx++; } } else { var pnt = this.steps[this.stepndx]; var x = pnt[0]; var y = pnt[1]; s.position = 'absolute'; s.left = x; s.top = y; } this.stepndx++; } while (op == 'x'); return keepgoing; }; 