%
' The editor base path
' You have to update it with you web site configuration
Dim FCKeditorBasePath
FCKeditorBasePath = "/FCKeditor/"
Dim FCKCanUpload, FCKCanBrowse
Function CreateFCKeditor(instanceName, width, height, toolbarSetName, initialValue)
If FCK_IsCompatible() Then
Dim sLink
sLink = FCKeditorBasePath & "fckeditor.html?FieldName=" & instanceName
If (toolbarSetName & "") <> "" Then
sLink = sLink & "&Toolbar=" & toolbarSetName
End If
If FCKCanUpload & "" <> "" Then
If FCKCanUpload = True Then
sLink = sLink & "&Upload=true"
ElseIf FCKCanUpload = False Then
sLink = sLink & "&Upload=false"
End If
End If
If FCKCanBrowse & "" <> "" Then
If FCKCanBrowse = True Then
sLink = sLink & "&Browse=true"
ElseIf FCKCanBrowse = False Then
sLink = sLink & "&Browse=false"
End If
End If
Response.Write ""
Response.Write ""
Else
Response.Write ""
End If
End Function
Function FCK_IsCompatible()
Dim sAgent
sAgent = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(sAgent, "MSIE") > 0 AND InStr(sAgent, "Windows") > 0 AND InStr(sAgent, "Opera") <= 0 Then
Dim iVersion
iVersion = CInt(Mid(sAgent, InStr(sAgent, "MSIE") + 5, 1))
FCK_IsCompatible = (iVersion >= 5)
Else
FCK_IsCompatible = False
End If
End Function
%>