// inspired by and adapted from WOCO - Word Complete 1.01 // http://www.challenger.se/include/js/xWoco.js // The sourcecode is licensed under a Creative Commons License. // http://creativecommons.org/licenses/LGPL/2.1/ // Jonathan Puckey 2006 var texto={ initialize : function(first){ if(!window.document.header){ setTimeout("texto.initialize('"+first+"')",100); return; } this.t=-1; this.firstTitle=first+" "; this.tt=this.firstTitle; this.oldTitle=this.firstTitle; this.db = " ability abrupt approach arranged artistic background basic beautiful beginning blue body breath broad choice classic colour completed concrete contemporary context conversation culture death depict detail difference discourse drawing elements everyday experience experiment fascination flexibility formal future gesture hate identity individual influence interest intervention intimate life love material medium mental moment movement naked object observe paradox pattern perception performance period perspective physical picture play possibilities potential power presence question quiet random reaction reason relevance repetition result revealing selection shape shock sight statement stop story strategy structure studio territory theme traditional transform transparent unreal viewer violence vision word yellow zoom"; this.rgx = /[\w<]/gi; this.text=""; this.header=window.document.header; this.interval(); }, doLetter : function (tLetter){ this.text+=tLetter; if (!tLetter.match(this.rgx)){ this.match=""; return this.setText(); } var frgStart=this.text.length; var frgEnd=frgStart; while (frgStart > 0 && this.text.substring(frgStart-1, frgStart).match(this.rgx)) frgStart--; wordFragment = this.text.substring(frgStart, frgEnd); rgx = new RegExp(' '+ wordFragment +'[\\w]+', 'i'); this.match = this.db.match(rgx); if (!this.match || this.match == 'null') { this.match=""; }else{ if(this.match[0].length>2) this.match=this.match[0].substring(frgEnd-frgStart+1); this.wait=200; } this.setText(); }, setText : function(){ var s = "SMBA "; s += this.text; s += ""; s += this.match; s += ""; if(this.header) this.header.SetVariable('smbaContent', s); }, resetText : function(e){ e = e || window.event; var related = e.relatedTarget || e.toElement; if(related.nodeName == 'A') return; this.text=""; this.tt=this.firstTitle+" "; this.t=-1; }, hide : function(){ this.hidden=true; if(this.header) this.header.SetVariable('smbaContent', " "); }, show : function(){ this.hidden=false; this.setText(); }, interval : function(){ if(!this.hidden){ this.t++; this.wait=100; if(this.t