function parseUid(uid)
{
  var newuid="";
  var i=0;

  for (i=0; i < uid.length; ++i) {
    if ((uid.substring(i, i+1) >= 'a' && uid.substring(i, i+1) <= 'z')
     || (uid.substring(i, i+1) >= 'A' && uid.substring(i, i+1) <= 'Z')) {
        newuid = newuid + uid.substring(i, i+1);
    }
    else if (uid.substring(i, i+1)) {
        newuid = newuid + "+";
    }
    else {
        newuid = newuid + escape(uid.substring(i, i+1));
    }
  }
  return(newuid)
}
