function ubbcode(temp) {
temp = temp.replace(/([^]='])(| |<br>)((http|https|ftp|rtsp|mms):(\/\/|\\\\)[^< ]+)(| |<br>)/ig,"$1$2<A TARGET=_blank HREF='$3'>$3</A>");
temp = temp.replace(/(\[em)([0-9]*)(\])/ig,"<IMG border=0 SRC=images/Emotions/$2.gif>");
temp = temp.replace(/(\[URL\])([^]]*)(\[\/URL\])/ig,"<A TARGET=_blank HREF='$2'>$2</A>");
temp = temp.replace(/(\[URL=)([^]]*)(\])/ig,"<A TARGET=_blank HREF='$2'>");
temp = temp.replace(/\[\/URL\]/ig,"<\/A>");
return (temp);
}

function anatilcom(user,t,title,name,mazmun,home,email,ip,time,replay,id,OICQ,img,image,sex)
{
document.write("<SCRIPT>anatiltop()</SCRIPT>")
document.write("<table  table cellspacing=1 cellpadding=4 width=720 border=0 class=a1  align=center height=134 >")
document.write("  <tr>")
  document.write("  <td width=2% height=16 colspan=2 >　第 <font color=red>"+t+"</font>    条留言</td>")
document.write(" <td width=66% height=16><font color=#000080>主题:</font>"+title+"</td>")
document.write("<td width=32% height=16> <img height=16 src=images/homepage.gif  width=16><a href="+home+" target=_blank title=访问"+name+"的主页> 主页</a><img height=16 alt=给"+name+"发信 src=images/email.gif ><a href=mailto:"+email+"   title=给"+email+"发信 >E-mail</a><img height=16 src=images/oicq.gif  alt= QQ：号码"+OICQ+"！  >OICQ <img src=images/ip.gif align=absmiddle alt="+ip+"> IP</td>")
document.write(" </tr>")
 document.write(" <tr>")
document.write(" <td width=1% height=46 bgcolor=#FFFFFF><b><img src=images/face/"+sex+""+img+".gif ></b></td>")
if(image=="ON"){    
document.write(" <td    bgcolor=#FFFFFF width=115% height=80 colspan=3><div style=line-height:200% class=auto><font color=red>[密]</font> 此留言为悄悄话，留言内容只有版主才能查看…… <a href=\"#\" onclick=\"javascript:open('see.asp?id="+user+"&see="+id+"','','width=458 ,height=250')\"><font color=red>[查看]</font></a> </td>")
 }else{
document.write("<td  bgcolor=#FFFFFF  width=115% height=80 colspan=3><div style=line-height:200% class=auto>"+ubbcode(mazmun)+"</td>")
}

document.write("</tr>")
document.write(" <tr>")
document.write(" <td  class=a1 width=1%  height=16>名字:"+name+"</td>")
document.write(" <td  class=a1 width=115% height=1 colspan=4 >")
document.write(" <table cellspacing=0 cellpadding=0 height=16 border=0  align=center  width=114% >")
document.write(" <tr>")
document.write("  <td width=20%  >发表于:"+time+"</td>")
document.write("<td width=80%  >")
//document.write(b[talet].under)
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
document.write("<a href=replay.asp?id="+user+"&re="+id+"><font color=#000080>[回复]</font></a>[<a href=del.asp?id="+user+"&del="+id+"><font color=#555555>删除</font></a>]</td>")
document.write(" </tr>")
document.write("</table>")
document.write("</td>")
document.write("</tr>")
if(replay!=''){
document.write("<tr bgcolor=#FFFFFF>")
document.write("<td class=a4 rowSpan=2 width=1% height=23  ><font color=#000080>[版主回复]</font></td>")
document.write("<td class=a4 width=115% height=52 colspan=4 rowspan=2>")
document.write("<font color=#CC3300 ><div style=line-height:200% class=re>"+replay+"</font>")
document.write("</td></tr>")
document.write("<tr class=a4>")
document.write("  <td width=1% height=29></td>")
document.write("</tr>")
}
document.write("</table>")
document.write("<SCRIPT>anatilbottom()</SCRIPT><br>")

}


function emoticon(theSmilie){
document.form.text.value += theSmilie + ' ';
document.form.text.focus();
}

