function getCookie(name) {
var dc = document.cookie.toString();
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin < 0) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else {
begin += 2;
}
var end = dc.indexOf(";", begin);
if (end == -1) {
end = dc.length;
}
return unescape(dc.substring(begin + prefix.length, end));
}
function setCookie2(sName,sValue) {
document.cookie = sName + "=" + escape(sValue);
}
function setPersistent(name, value) {
var dt=new Date();
dt.setTime(dt.getTime()+24*60*60*1000);
var expires="; expires="+dt.toGMTString();
document.cookie=name+"="+value+expires+"; path=/";
}
function setCookie (name, value) {
var dt=new Date();
dt.setTime(dt.getTime()+24*60*60*1000);
var expires="; expires="+dt.toGMTString();
document.cookie=name+"="+value+expires+"; path=/";
}
function deleteCookie(sName) {
setCookie(sName,"");
}
function fbForever(id) {
var t=getCookie("fbvisitor");
var dt=new Date();
if (t!=null) { t=t.toString(); t=t+"|"+id; }
else t=id;
dt.setTime(dt.getTime()+24*60*60*1000);
var expires="; expires="+dt.toGMTString();
document.cookie="fbvisitor="+t+expires+"; path=/";
}
function fbPermission(id) {
var qry=false;
var t=getCookie("fbvisitor");
if (t!=null)t=t.toString();
else t="";
if (t.length>0) t="|"+t+"|";
if (t.length>0 && t.indexOf("|"+id+"|")>=0) qry=true;
return qry;
}
function formatphone(raw) {
var out;
if (raw.length == 10) {
out=raw.substring(0,3)+"-"+ raw.substring(3,6)+"-"+raw.substring(6);
}
else {
out=raw;
}
return out;   
}
function eraseMostCookies() {
setCookie("ckprofile","");
setCookie("ckprivate","");
setCookie("ckpublic","");
setCookie("ckcell","");
setCookie("ckemail","");
setCookie("todo2","");
setCookie("todo3","");
setCookie("todo4","");
setCookie("cktimbuktu","");
setCookie("ckbuddy","");
setCookie("ckrecipe","");
setCookie("sendlink_t","");
setCookie("sendlink_u","");
setCookie("cksubscr","");
setCookie("ckchalice","0");
setCookie("ckmerci","");
setCookie("ckminibuzz","");
setCookie("ckbsid","");
setCookie("cktweet","");
setCookie("ckdorsay","");
setCookie("bucketnumber","0");
setCookie("lib_image","");
setCookie("ckvoip","");
setCookie("ckfavmisc","");
setCookie("tmPublic","");
setCookie("letstalk2","");
setCookie("ckparlez","");
setCookie("ckentrenous","");
setCookie("visitcontext","");
setCookie("ckuser","");
setCookie("cktweetauth","");
setCookie("ckuffizi","");
setCookie("ckfbid","");
setCookie("bzaccount","");
}
function eraseCookies() {
eraseMostCookies();
}
function nullpreview() {
var k;
setCookie("textpoll_doc","");
setCookie("textpoll_qr","");
setCookie("card_doc","");
setCookie("invite_doc","");
for (k=0; k<6; k++) setCookie("slide"+k+"_doc","");
}
function handleLogout() {
eraseCookies();
location.href="http://www.isayusay.net/index.htm";
}
function handlelogoutonly() {
eraseCookies();
}
function trimstring(s) {
var out,str;
var k;
out="";
if (s!=null) {
out=s;
str=out.substring(0,1);
while(str == " ") {
out=out.substring(1);
str=out.substring(0,1);
}
str=out.substring(out.length-1);
while(str == " ") {
out=out.substring(0,out.length-1);
str=out.substring(out.length-1);
}
}
return out;
}
function handleRegister() {
var str;
eraseCookies();
str="http://www.isayusay.net/perl/isusRefer.pl?BUDDY=&SEQ=0&LAF=*&TRIAGE=0";
location.href=str;
return true;
}
function handleRemove() {
var str;
var go_on=0;
var email=getCookie("ckemail");
var uid=getCookie("ckuser");
var mask=getCookie("cktimbuktu");
if (uid != null && mask != null && email != null) {
uid=uid.toString();
mask=mask.toString();
email=email.toString();
if (mask.length > 240) go_on=1;
}
if (go_on>0) {
str="http://www.isayusay.net/perl/isusExodus.pl?uid="+uid+"&mask="+mask+"&email="+escape(email);
handleLogout();
location.href=str;
}
else {
handleLogout();
window.alert("Please sign in or register first.");
location.href="http://www.isayusay.net/index.htm";
}
return true;
}
function handleAccess(idex) {
var id;
var mask=getCookie("cktimbuktu");
var isprofile;
var domask;
var dowidget;
var donew;
var docfg;
var doremix;
var dotell;
var pg;
var url;
var subscribe;
var mbz=getCookie("ckminibuzz");
var uid=getCookie("ckuser");
var dorsay=getCookie("ckdorsay");
var tweet=getCookie("cktweetauth");
var fb=getCookie("ckuffizi");
var hdca=0;
var tt;
if (idex > 1000) id=idex-1000;
else id=idex;
pg="";
isprofile=0;
domask=0;
dowidget=0;
donew=0;
docfg=0;
doremix=0;
dofocus=0;
dotell=0;
if (dorsay != null) dorsay=dorsay.toString();
else dorsay="";
if (fb!=null)fb=fb.toString();
else fb="";
if (tweet!=null)tweet=tweet.toString();
else tweet="";
if (dorsay.length==0 && (tweet.length>0||fb.length>0)) {
if (id == 581) { pg="allfocus-media-poll.htm"; donew=1; docfg=8; }
else if (id == 582) { pg="allfocus-media-invite.htm"; donew=1; docfg=7; }
else if (id == 583) { pg="allfocus-media-card.htm"; donew=1; docfg=3; }
else if (id == 584) { pg="allfocus-media-slide.htm"; donew=1; docfg=5; }
else if (id == 586) { pg="allfocus-media-manage.htm"; dowidget=6; }
else if (id == 36) pg="feedback.htm";
if (id == 36) {
feedbackpopup('feedback.htm');
}
else if (donew == 1) {
setCookie("lib_music","");
setCookie("lib_audio","");
setCookie("lib_image","");
url="http://www.isayusay.net/perl/isusNewCalendar.pl?mask="+mask+"&pg="+pg+"&config="+docfg;
if (idex > 1000) url=url+"&host=outbox";
url=url+"&dorsay="+dorsay;
location.href=url; 
}
else if (dowidget > 0) {
if (dowidget == 6) url="http://www.isayusay.net/perl/isusOutboxLoad.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid+"&dorsay="+dorsay;
else if (dowidget == 8) url="http://www.isayusay.net/perl/isusInboxLoad.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid+"&dorsay="+dorsay;
else url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid;
location.href=url;
}
else if (domask > 0) {
url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd=4&page="+pg;
url=url+"&focus="+dofocus;
location.href=url; 
}
}
else if (mask != null) {
mask=mask.toString();
if (mask.length > 240) {
if (id == 1) pg="mobileliving-isayusay.htm"
else if (id == 596) { pg="mobileliving-buzz-open.htm"; dotell=1; setCookie("bucketnumber","0"); }
else if (id == 34) pg="allfocus-whoswho.htm";
else if (id == 581) { pg="allfocus-media-poll.htm"; donew=1; docfg=8; }
else if (id == 582) { pg="allfocus-media-invite.htm"; donew=1; docfg=7; }
else if (id == 583) { pg="allfocus-media-card.htm"; donew=1; docfg=3; }
else if (id == 584) { pg="allfocus-media-slide.htm"; donew=1; docfg=5; }
else if (id == 585) { pg="allfocus-media-inbox.htm"; dowidget=8; }
else if (id == 586) { pg="allfocus-media-manage.htm"; dowidget=6; }
else if (id == 587) { pg="allfocus-media-remix.htm"; doremix=1; }
else if (id == 588) { pg="allfocus-media-network.htm"; donew=1; docfg=9; }
   else if (id == 589) { pg="allfocus-search.htm"; }
else if (id == 57) pg="allfocus-media-send.htm";
else if (id == 59) { pg="allfocus-media-respond.htm"; dowidget=9; }
else if (id == 591) { pg="register-addcontact.htm"; domask=1; dofocus=1; }
else if (id == 592) { pg="register-getaddress.htm"; domask=1; }
else if (id == 593) { pg="register-getaddress-csv.htm"; domask=1; }
else if (id == 594) { pg="register-getaddress-txt.htm"; domask=1; }
else if (id == 31) { pg="allfocus-myprofile.htm"; domask=1; }
else if (id == 36) pg="feedback.htm";
else if (id == 37) { isprofile=1; pg="public-setup.htm"; setCookie("lib_image",""); }
else if (id == 38) { pg="allfocus-myprofile-cellphone.htm"; domask=1; }
else if (id == 39) { pg="allfocus-myprofile.htm"; domask=1; }
else if (id == 40) { pg="allfocus-myaccount-cancel.htm"; domask=1; }
else if (id == 41) { pg="allfocus-support.htm"; domask=1; }
else if (id == 42) pg="allfocus-cancel-recipes.htm";
else if (id == 43) pg="register-invite.htm";
else if (id == 44) pg="allfocus-invite.htm";
else if (id == 45) pg="ml-isayusay-faq-calendar.htm";
else if (id == 46) pg="ml-isayusay-faq-mobile.htm";
else if (id == 47) pg="allfocus-sendlink.htm";
else if (id == 55) pg="allfocus-myaccount-cancel.htm";
else if (id == 56) pg="allfocus-mms.htm";
else if (id == 595) { pg="allfocus-banner-submit.htm"; domask=1; }
else if (id == 597) { pg="mobileliving-buzz-manage.htm"; dotell=1; }
else if (id == 598) { pg="mobileliving-buzz-lead.htm"; dotell=1; }
else if (id == 601) { pg="register-getaddress.htm"; hdca=3; }
else if (id == 602) { pg="register-getaddress-csv.htm"; hdca=1; }
else if (id == 603) { pg="register-getaddress-yahoo.htm"; hdca=2; }
else if (id == 605) { pg="register-getaddress-aol.htm"; hdca=5; }
else if (id == 604) { pg="register-getaddress-hotmail.htm"; hdca=4; }
else if (id == 60) { isprofile=1; pg="allfocus-myprofile-public.htm"; }
if (id == 36) {
feedbackpopup('feedback.htm');
}
else if (id==34) {
if (uid != null) uid=uid.toString();
else uid="";
url="http://www.isayusay.net/perl/isusWSW.pl?mask="+mask;
url=url+"&username="+uid;
location.href=url;
}
else if (id==59) {
url="http://www.isayusay.net/perl/isusLoadRespond.pl?mask="+mask;
respondpopup(url);
}
else if (donew == 1) {
setCookie("lib_music","");
setCookie("lib_audio","");
setCookie("lib_image","");
url="http://www.isayusay.net/perl/isusNewCalendar.pl?mask="+mask+"&pg="+pg+"&config="+docfg+"&dorsay="+dorsay;
if (idex > 1000) url=url+"&host=outbox";
location.href=url; 
}
else if (dowidget > 0) {
if (dowidget == 6) url="http://www.isayusay.net/perl/isusOutboxLoad.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid+"&dorsay="+dorsay;
else if (dowidget == 8) url="http://www.isayusay.net/perl/isusInboxLoad.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid+"&dorsay="+dorsay;
else url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd="+dowidget+"&page="+pg+"&user="+uid+"&dorsay="+dorsay;
location.href=url;
}
else if (domask > 0) {
url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd=4&page="+pg;
url=url+"&focus="+dofocus;
location.href=url; 
}
else if (doremix > 0) {
url="http://www.isayusay.net/perl/isusLoadRemix.pl?mask="+mask+"&uid="+uid;
location.href=url;
}
else if (dotell > 0) {
if (mbz != null) mbz=mbz.toString();
else mbz="";
url="http://www.isayusay.net/perl/isusKiosk.pl?mask="+mask+"&pg="+pg+"&callid="+id+"&uid="+uid+"&minibuzz="+mbz;
location.href=url;
}
else if (isprofile> 0) {
url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd=3&page="+pg;
location.href=url;
}
else if (id == 589) {
url="http://www.isayusay.net/perl/isusWidget.pl?mask="+mask+"&cmd=4&page="+pg;
url=url+"&focus="+dofocus;
searchpopup(url);
}
else if (hdca > 0) {
url="http://www.isayusay.net/perl/isus_addcontacts_directly.pl?mask="+mask;
url=url+"&uid="+uid+"&svc="+hdca+"&fn=";
tt=getCookieChild("ckprofile",1);
if (tt != null) { url=url+tt.toString(); }
tt=getCookieChild("ckprofile",2);
if (tt != null) { url=url+"&ln="+tt.toString(); }
else url=url+"&ln=";
location.href=url;
}
else if (pg.length > 0) location.href=pg;
}
}
if (pg.length <= 0) {
   if (dorsay.length>0 || (fb.length==0 && tweet.length==0)) {
setCookie("cktimbuktu","");
window.alert("Please sign in or register first.");
location.href="index.htm";
}
else {
setCookie("ckerrmsg","For full site access, join for free now! If you don't see the link for the newly added ExpressChat, refresh the page.");
errpopup("http://www.isayusay.net/allfocus-error.htm");
}
}
}
function getCookieChild(ck,member) {
var str=getCookie(ck);
var out;
var j;
var ptr;
var ptr1=-1;
var flag;
out="";
if (str != null) {
str=str.toString();
ptr=0;
flag=0;
for(j=1; j<= member; j++) {
ptr1=str.indexOf("|",ptr);
if (j < member) {
if (ptr1 < 0) { flag=1; break; }
else ptr=ptr1+1;           
}
else {
if (ptr1 >= 0) {
if (ptr1>ptr) out=str.substring(ptr,ptr1);
else out="";
}
else out=str.substring(ptr);
}
} 
}
return out;
}
function launch_planner() {
setCookie("todo3","3");
return true;
}
function launch_recipes() {
setCookie("todo3","3");
location.href="http://www.isayusay.net/mobileliving-recipes.htm";
return true;
}
function xlateString(instr,fromstr,tostr)
{
var outstr=instr;
var ptr=0;
var forever=true;
var temp;
var sz=fromstr.length;
while(forever) {
ptr=outstr.indexOf(fromstr);
if (ptr >= 0) {
if (ptr>0) temp= outstr.substring(0,ptr)+tostr;
else temp=tostr;
if (outstr.substring(ptr).length> sz) {
temp=temp+outstr.substring(ptr+sz);
}         
outstr=temp;  
}
else {
forever=false;
}
}
return outstr;
}
function thirdparty(party) {
var title=document.title;
var url=document.URL;
var temp1;
var temp2;
var ptr;
var b;
var j;
var n;
var ht;
var raw1=escape(url);
var raw2=escape(title);
var raw3;
var temp1;
var temp2;
var b;
var j;
var n;
var ht;
var src;
var result;
var mask;
setCookie("sendlink_t", document.title);
setCookie("sendlink_u", document.URL);
ptr=raw1.indexOf("//");
raw3=raw1.substring(0,ptr)+"//";
temp1=raw1.substring(ptr+2);
b=temp1.split("/");
n=b.length;
temp1=raw3;
for(j=0;j<n;j++) {
temp1=temp1+"%2F"+b[j];
}
if (party.indexOf("facebook")>=0) {
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');
}
else if (party.indexOf("del.icio.us")>=0) {
window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(url)+'&amp;title='+encodeURIComponent(title),'delicious','toolbar=no,width=550,height=550');
}
else if (party.indexOf("digg")>=0) {
window.open('http://digg.com/submit?phase=2&url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title),'digg','toolbar=no,scrollbars=1,resizable=1,width=550,height=550');
}
else if (party.indexOf("reddit")>=0) {
window.open('http://reddit.com/submit?url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title),'reddit','toolbar=no,scrollbars=1,resizable=1,width=550,height=550');
}
else if (party.indexOf("stumbleupon")>=0) {
window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title),'stumbleupon','toolbar=no,scrollbars=1,resizable=1,width=550,height=550');
}
else if (party.indexOf("newsvine")>=0) {
window.open('http://www.newsvine.com/_tools/seed&save?u='+encodeURIComponent(url)+'&h='+encodeURIComponent(title),'newsvine','toolbar=no,scrollbars=1,resizable=1,width=550,height=550');
}
else if (party.indexOf("twitter")>=0) {
window.open('http://twitter.com/home?status=Add+This:+'+encodeURIComponent(url),'twitter','toolbar=no,scrollbars=1,resizable=1,width=550,height=550');
}
else if (party.indexOf("sendlink")>=0) {
mask=getCookie("cktimbuktu");
if (mask != null) mask=mask.toString();
else mask="";
if (mask.length>240) {
src="http://www.isayusay.net/allfocus-sendlink.htm";
result=src;
}
else {
window.alert("Please sign in or register first.");
result=document.URL;
}
location.href=result;
}
}
function dichotomy() {
var str;
var mask=getCookie("cktimbuktu");
if (mask != null) mask=mask.toString();
else mask="";
if (mask.length > 240) {
str="<A HREF=\"javascript: handleLogout(); \" TARGET=\"_parent\" ><IMG BORDER=0 HEIGHT=24 SRC=\"/images/allfocus-signout.jpg\" WIDTH=498 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=firstnav_5></A>";
}
else {
str="<A HREF=\"javascript: loginpopup(); \" TARGET=\"_parent\" ><IMG BORDER=0 HEIGHT=24 SRC=\"/images/allfocus-welcome.jpg\" WIDTH=498 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=firstnav_5></A>";
}
document.write(str);
}
function newdichotomy() {
var str;
var nsa=1;
var q1=getCookieChild("ckpublic",4);
if (q1!=null) q1=q1.toString();
else q1="";
var q3=getCookie("cktimbuktu");
if (q3!=null) q3=q3.toString();
else q3="";
var q4=getCookie("cktweetauth");
if (q4!=null) q4=q4.toString();
else q4="";
var q5=getCookie("ckuffizi");
if (q5!=null) q5=q5.toString();
else q5="";
if ((q3.length>240 && q1.length==12)||q4.length>0||q5.length>0)
str="<A HREF=\"javascript: handleLogout(); \" TARGET=\"_parent\" ><IMG BORDER=0 HEIGHT=19 SRC=\"/images/allfocus-signout.gif\" WIDTH=82 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=topnav_5></A>";
else
str="<A HREF=\"javascript: loginpopup(); \" TARGET=\"_parent\" ><IMG BORDER=0 HEIGHT=19 SRC=\"/images/allfocus-signin.gif\" WIDTH=82 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=topnav_5></A>";
document.write(str);
}
function elsinore() {
var str;
var opt=getCookie("ckchalice");
if (opt != null) opt=opt.toString();
else opt="";
if (opt == "1") {
str="<A ><IMG BORDER=0 HEIGHT=24 SRC=\"/images/allfocus-signup.jpg\" WIDTH=498 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=firstnav_5></A>";
}
else {
str="<A HREF=\"javascript: handleLogout(); \" TARGET=\"_parent\" ><IMG BORDER=0 HEIGHT=24 SRC=\"/images/allfocus-signout.jpg\" WIDTH=498 ALIGN=LEFT HSPACE=0 VSPACE=0 NAME=firstnav_5></A>";
}
document.write(str);
}
function searchContacts()
{
var msk=getCookie("cktimbuktu");
if (msk != null) msk=msk.toString();
else msk="";
location.href="http://www.isayusay.net/perl/isusSearchContacts.pl?mask="+msk;
}
function handleFeedback(id) {
feedbackpopup('http://www.isayusay.net/feedback.htm');  
}
function nautilis(org) {
if (org == "1") history.go(-1);
else history.go(-1);
}
function renderpicture(url,w,h,span,cls) {
var s="<img src=\""+url+"\" hspace=0 vspace=0 name="+cls;
var hmax=0;
var hspan=0;
if (span==400) hmax=300;
else hmax=400;
if (url == "na") {
s="&nbsp";
}
else {
if (w > span) {
hspan=parseInt((h*span)/w);
if (hspan > hmax) hspan=hmax;
s=s+" width="+span+" height="+hspan;
}
s=s+" border=0>";
}
document.write(s);
}
function handleDCA(n)
{
var mask=getCookie("cktimbuktu");
var uid=getCookie("ckuser");
var fnam=getCookieChild("ckprofile",1);
var lnam=getCookieChild("ckprofile",2);
var u;
if (mask != null) mask=mask.toString();
else mask="";
if (uid != null) uid=uid.toString();
else uid="";
if (fnam != null) fnam=fnam.toString();
else fnam="";
if (lnam != null) lnam=lnam.toString();
else lnam="";
u="http://www.isayusay.net/perl/isus_addcontact_direct.pl?mask="+mask;
u=u+"&uid="+uid+"&fn="+fnam+"&ln="+lnam+"&svc="+n;
location.href=u;
}
function textSimplify(t) {
 var tuck=t.split("''");
 var tt="";
 var j=0;
 while (j < tuck.length) {
 if (j > 0) { tt=tt+"\""; }
 tt=tt+tuck[j];
 j=j+1;
 }
 return tt;
}
function ranumber(t) {
var ss;
var j;
var n=t.length;
if (n < 8) {
ss="";
j=8-n;
while(j >= 1) { ss=ss+" "; j=j-1; }
ss=ss+t;
}
else ss=t;
return ss;
}
function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;}
function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;}
function posRight() {return posLeft()+pageWidth();}
function posBottom() {return posTop()+pageHeight();}
function HTMLEncodeString(str){ 
var aStr = str.split(''), 
 i = aStr.length-1, 
 aRet = []; 
 while (i>=0) {
 var iC = aStr[i].charCodeAt();
 if (iC == 10 || iC == 13) { aRet.push(aStr[i]); }
 else if (iC < 32) {}
 else if (iC < 128 ) { aRet.push(aStr[i]); }
 else {
 aRet.push('&#'+iC+';'); 
 }
 i--;
 } 
 return aRet.reverse().join(''); 
} 
function HTMLDecodeString(str) {
 var p=0, p1=-1, p2=-1, forever=1;
 var t="";
 while ( forever > 0) {
 p1=str.indexOf("&#",p);
 if (p1 < 0) { t=t+str.substring(p); forever=0; }
 else {
 if (p1 > p) { t=t+str.substring(p,p1); }
 p2=str.indexOf(';',p1);
 if (p2 > 0) {
 t=t+String.fromCharCode( parseInt(str.substring(p1+2,p2)) );
 p=p2+1;
 }
 else { p=p1+1; }
 }
 }
 return t;
}
