function kapIPv6(ip)
dim s
iF ip<>"" AND InStr(ip,":")>0 Then
s=Replace(ip,":","|",1,3)
s=Left(s,Instr(s,":")-1)
s=Replace(s,"|",":",1,3)
kapIPv6=s
else
kapIPv6=""
end if
end function