<%
Dim re, strMatches, strMatch, tmpStr1, tmpStr2
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern="\[img\](.*?)\[\/img\]"
Set strMatches=re.Execute(strContent)
For Each strMatch In strMatches
tmpStr1=CheckLinkStr(strMatch.SubMatches(0))
strContent=Replace(strContent,strMatch.Value,"<img src="""&tmpStr1&""" border=""0"" onload=""javascript:DrawImage(this);"" alt=""按此在新窗口打开图片"" onmouseover=""this.style.cursor='hand';"" onclick=""window.open(this.src);"" />")
Next
Set strMatches=Nothing
re.Pattern="\[img=(left|right|center|absmiddle)\](.*?)\[\/img\]"
Set strMatches=re.Execute(strContent)
For Each strMatch In strMatches
tmpStr1=strMatch.SubMatches(0)
tmpStr2=CheckLinkStr(strMatch.SubMatches(1))
strContent=Replace(strContent,strMatch.Value,"<img src="""&tmpStr2&""" align="""&tmpStr1&""" onload=""javascript:DrawImage(this);"" border=""0"" alt=""按此在新窗口打开图片"" onmouseover=""this.style.cursor='hand';"" onclick=""window.open(this.src);"" />")
Next
Set strMatches=Nothing
%>