Something is wrong with this function and I'm not seeing it.

Input please.

function center_ text(txt)
{
var cen; var len;
len = str_len(txt);
cen = (screenwidth - len) /2) +1;

return(cen);

}

screenwidth is declared as 480. I've also tried hard-coding this value.

thx.

- Geoff