var thoughtcount = 0; var thoughtTimer = 0; var thought = '"' + "I am so happy and grateful that I have been afforded an opportunity to deepen into the mystic~s heart." + '"'; 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); } } }