var thoughtcount = 0; var thoughtTimer = 0; var thought = '"' + "May I joyfully transcend all the wounded areas in my ego heart, that I may receive the fuller measure of grace and wisdom." + '"'; thought = thought.replace(/@/g,'"'); thought = thought.replace(/~/g,"'"); var spanstart = ''; var spanend = '<\/span>'; var endtitle = '
- Master Djwhal Khul<\/div>'; function writeDailyThought(){ if(thought != ''){ var myelem = getId('dailythoughtheader'); var text = ''; thoughtcount++; if(thoughtcount > thought.length){ clearTimeout(thoughtTimer); myelem.innerHTML = thought + endtitle; } else { text = thought.substr(0,thoughtcount-2); if(thoughtcount < thought.length-1) text = text + spanstart + thought.substr(thoughtcount,2); else text = thought.substr(0,thoughtcount); myelem.innerHTML = text; thoughtTimer = setTimeout('writeDailyThought()', 40); } } }