function JsUBB(str)
{
var re=//[i/](.[^/[]*)/[//i/]/gi;
str=str.replace(re,"<i>$1</i>"); //斜體字
re=//[b/](.[^/[]*)/[//b/]/gi;
str=str.replace(re,"<b>$1</b>"); //粗體字
re=//[u/](.[^/[]*)/[//u/]/gi;
str=str.replace(re,"<u>$1</u>"); //底線
re=//[color=(.[^/[]*)/](.[^/[]*)/[//color/]/gi;
str=str.replace(re,"<font color=$1>$2</font>"); //字型顏色
re=//[size=([1-7])/](.[^/[]*)/[//size/]/gi;
str=str.replace(re,"<font size=$1>$2</font>"); //字型大小
re=//[face=(.[^/[]*)/](.[^/[]*)/[//face/]/gi;
str=str.replace(re,"<font face=$1>$2</font>"); //字型
re=//[center/](.[^/[]*)/[//center/]/gi;
str=str.replace(re,"<div align='center'>$1</div>"); //置中
re=//[right/](.[^/[]*)/[//right/]/gi;
str=str.replace(re,"<div align='right'>$1</div>"); //靠右對齊
re=//[quote/](.[^/[]*)/[//quote/]/gi; //引用
str=str.replace(re,"<table bgcolor='#E6FFE6' width='90%' style='border:1px #009900 dotted' align='center'><tr><td class='td1'>$1</td></tr></table>");
re=//[fly/](.*)/[//fly/]/gi; //飛行
str=str.replace(re,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>");
re=//[move/](.*)/[//move/]/gi; //移動
str=str.replace(re,"<MARQUEE scrollamount=3>$1</marquee>");
re=//[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)/](.[^/[]*)/[//SHADOW]/gi; //陰影
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; //外光暈
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>"); //超連結1
re=//[URL=(.[^/[]*)/](.[^/[]*)/[//URL/]/gi;
str=str.replace(re,"<a href='$1' target=_blank>$2</a>"); //超連結2
re=//[EMAIL/]([/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+)/[//EMAIL/]/gi;
str=str.replace(re,"<a href='mailto:$1'>$1</a>"); //電子郵件連結1
re=//[EMAIL=([/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+)/](.[^/[]*)/[//EMAIL/]/gi;
str=str.replace(re,"<a href='mailto:$1'>$4</a>"); //電子郵件連結2
re=//[img/](.[^/[]*)/[//img/]/gi;
str=str.replace(re,"<a href='$1' target=_blank><img src='$1' border='0' alt='單擊在新視窗瀏覽'></a>"); //圖片
re=/:em(/d{1,}):/gi;
str=str.replace(re,"<img src='emot/$1.gif' border='0'>"); //表情表徵圖
return str;
}