function | conversion <%
function Urlconvert (str)
Convertstr=str
Urllocation=instr (convertstr, "http://")
if (urllocation=0) and (maillocation=0) then
Urlconvert=convertstr
Exit function
End If
If Urllocation<>0 Then
Rightstr=str
Do While Urllocation<>urllocationend
Urllocation=instr (Rightstr, "http://")
Urllocationend=instrrev (Rightstr, "http://")
Finalstr=finalstr&left (rightstr,urllocation-1)
Midurlstr=mid (rightstr,urllocation+1,1)
Do while (ASC (MIDURLSTR) >=45) and (ASC (MIDURLSTR) <=126)
Loopint=loopint+1
Midurlstr=mid (rightstr,urllocation+loopint,1)
If midurlstr= "" Then Exit Do
Loop
Endurlstr=mid (Rightstr,urllocation,loopint)
Urlstr= "<a href=" &endURLstr& ">" &endURLstr& "</a>"
Rightstr=mid (Rightstr,urllocation+loopint)
Finalstr=finalstr&urlstr
Loopint=1
Loop
End If
Finalstr=finalstr&rightstr
Convertstr1=finalstr
Finalstr= ""
Maillocation=instr (CONVERTSTR1, "@")
If Maillocation<>0 Then
Do While Maillocation<>maillocationend
Maillocation=instr (CONVERTSTR1, "@")
Maillocationend=instrrev (CONVERTSTR1, "@")
Mainmidmailstr=mid (convertstr1,maillocation+1,1)
Midmailstr=mainmidmailstr
Do while (ASC (MIDMAILSTR) >=45) and (ASC (MIDMAILSTR) <=126)
Loopint1=loopint1+1
Midmailstr=mid (convertstr1,maillocation-loopint1,1)
Loop
Firststr=mid (Convertstr1,maillocation-loopint1+1,loopint1-1)
Finalstr=finalstr&left (CONVERTSTR1,MAILLOCATION-LOOPINT1)
Midmailstr1=mainmidmailstr
Do while (ASC (MIDMAILSTR1) >=45) and (ASC (MIDMAILSTR1) <=126)
Loopint2=loopint2+1
Midmailstr1=mid (convertstr1,maillocation+loopint2,1)
If midmailstr1= "" Then Exit Do
Loop
Secondstr=mid (Convertstr1,maillocation,loopint2)
Endmailstr=firststr&secondstr
Mailstr= "<a href=mailto:" &endmailstr& ">" &endmailstr& "</a>"
Finalstr=finalstr&mailstr
Convertstr1=mid (Convertstr1,maillocation+loopint2)
Loopint1=1
Loopint2=1
Loop
End If
Finalstr=finalstr&convertstr1
Urlconvert=finalstr
End Function
%>