// ******** Status Bar Javascript Magic by Likno 1.0 **********

function welcomesta_start() {clearInterval(welcomesta.sttm);welcomesta_init();if (arguments.length>0) welcomesta_init2(arguments[0]);welcomesta.sttm=setInterval ("doEffect('welcomesta')",10);}

function welcomesta_stop() {clearInterval(welcomesta.sttm);window.status="";}



welcomesta_init();

function welcomesta_init() {welcomesta={stel:0,stft:"",stec:3,stcel:1,stce:-1,stcl:-1,stls:-1,stcs:0,sttg:0,stea:["You're welcome to Kintampo Health Research Centre",0,10,1,"KHRC - Your health  is our concern.",3,10,2,"2",1,10,3],stwa2:["KHRC"," -"," Research"," To"," Policy!"]};}

function welcomesta_init2 (en) {welcomesta.stea=[welcomesta.stea[(en-1)*4],welcomesta.stea[(en-1)*4+1],welcomesta.stea[(en-1)*4+2],welcomesta.stea[(en-1)*4+3]];welcomesta.stec=1;welcomesta.stel=0;}

function doEffect(es) {var s=eval(es);if (s.stce==s.stec) {if (s.stcel==s.stel) {clearInterval(s.sttm);window.status=s.stft;return;} else {if (s.stel>0) s.stcel++;s.stce=-1;s.stcl=s.stls;}}if (s.stcl==s.stls) {s.stce++;s.sttx=s.stea[s.stce*4];s.sttp=s.stea[s.stce*4+1];s.stsd=s.stea[s.stce*4+2];s.stls=s.stea[s.stce*4+3];s.stcl=0;s.stsp=1;s.sttg=0;}if (21-s.stsd-s.sttg==0) {var stres=eval("stEffect"+s.sttp+"(s.sttx,s.stsp++,es);");s.sttg=0;if (stres!="") window.status=stres;else {s.stcl++;s.stsp=1;}}s.sttg++;}

function stEffect0(text,step){if (step>text.length) return "";else return text.substring(0,step);}

function stEffect3(text,step) {if (step>text.length) return "";else {for (var i=0,r=""; i<text.length-step; i++) r+=" ";return r+text;}}

function stEffect1(text,step,es) {var wa=eval(es+".stwa"+text);if (step>wa.length) return "";else {for (var i=0,r=""; i<step; i++) r+=wa[i];return r;}}

welcomesta_start();
