Function JsUBB (str)
{
Var re = // [I/] (. [^/[] *)/[// I/]/gi;
Str = str. replace (re, "<I> $1 </I>"); // Italic
Re = // [B/] (. [^/[] *)/[// B/]/gi;
Str = str. replace (re, "<B> $1 </B>"); // bold
Re = // [u/] (. [^/[] *)/[// u/]/gi;
Str = str. replace (re, "<u> $1 </u>"); // underline
Re = // [color = (. [^/[] *)/] (. [^/[] *)/[// color/]/gi;
Str = str. replace (re, "<font color = $1> $2 </font>"); // font color
Re = // [size = ([1-7])/] (. [^/[] *)/[// size/]/gi;
Str = str. replace (re, "<font size = $1> $2 </font>"); // font size
Re = // [face = (. [^/[] *)/] (. [^/[] *)/[// face/]/gi;
Str = str. replace (re, "<font face = $1> $2 </font>"); // font
Re = // [center/] (. [^/[] *)/[// center/]/gi;
Str = str. replace (re, "<div align = 'center'> $1 </div>"); // center
Re = // [right/] (. [^/[] *)/[// right/]/gi;
Str = str. replace (re, "<div align = 'right'> $1 </div>"); // right-aligned
Re = // [quote/] (. [^/[] *)/[// quote/]/gi; // reference
Str = str. replace (re, "<table bgcolor = '# E6FFE6 'width = '000000' style = 'border: 1px #009900 dotted 'align = 'center'> <tr> <td class = 't1'> $1 </td> </tr> </table> ");
Re = // [fly/] (. *)/[// fly/]/gi; // flight
Str = str. replace (re, "<marquee width = 90% behavior = alternate scrollamount = 3> $1 </marquee> ");
Re = // [move/] (. *)/[// move/]/gi; // move
Str = str. replace (re, "<MARQUEE scrollamount = 3> $1 </marquee> ");
Re = // [SHADOW = * ([0-9] *), * (# * [a-z0-9] *), * ([0-9] *)/] (. [^/[] *)/[// SHADOW]/gi; // SHADOW
Str = str. replace (re, "<table width = $1> <tr> <td style = 'filter: shadow (color = $2, strength = $3) '> $4 </td> </tr> </table> ");
Re = // [GLOW = * ([0-9] *), * (# * [a-z0-9] *), * ([0-9] *)/] (. [^/[] *)/[// GLOW]/gi; // outshines
Str = str. replace (re, "<table width = $1> <tr> <td style = 'filter: glow (color = $2, strength = $3) '> $4 </td> </tr> </table> ")
Re = // [URL/] (. [^/[] *)/[// URL/]/gi;
Str = str. replace (re, "<a href = '$ 1' target = _ blank> $1 </a>"); // hyperlink 1
Re = // [URL = (. [^/[] *)/] (. [^/[] *)/[// URL/]/gi;
Str = str. replace (re, "<a href = '$ 1' target = _ blank> $2 </a>"); // hyperlink 2
Re = // [EMAIL/] ([/w-] + (/. [/w-] +) * @ [/w-] + (/. [/w-] +)/[// EMAIL/]/gi;
Str = str. replace (re, "<a href = 'mailto: $ 1'> $1 </a>"); // email link 1
Re = // [EMAIL = ([/w-] + (/. [/w-] +) * @ [/w-] + (/. [/w-] +)/] (. [^/[] *)/[// EMAIL/]/gi;
Str = str. replace (re, "<a href = 'mailto: $ 1'> $4 </a>"); // email link 2
Re = // [img/] (. [^/[] *)/[// img/]/gi;
Str = str. replace (re, "<a href = '$ 1' target = _ blank> </> "); // Image
Re =/: em (/d {1,}):/gi;
Str = str. replace (re, "Return str;
}