DataBase relation

Last post 01-22-2007, 8:13 AM by Maximus5684. 8 replies.
Sort Posts: Previous Next
  •  01-15-2007, 4:56 AM 25787

    DataBase relation

    I recently purchased the “cute_editor”.

     

    I am experiencing some problems regarding displaying content from the database in the editor.



    I am able to display my content in an Iframe using  :

    <iframe src="<%=srcURL%>" id="message" width="100%" height="402" marginwidth="1" marginheight="0" name="message"  border="1" frameborder="1" ></iframe>

     

    Here is the code for the cute_editor src:

    <%

                                                    Dim editor

                                                    Set editor = New CuteEditor

                                                    editor.ID = "Editor1"

                                                   

                                                   

                                        editor.Text = srcURL

                                        editor.FilesPath = "CuteEditor_Files"

                                                    editor.EditorBodyStyle = "font:normal 12px arial;"

                                                    editor.EditorWysiwygModeCss = "asp.css"

                                                    editor.Draw()

                                                                                                                                                                                                   

                                                    ' Request.Form(ID) access from other page

                                    %>

     

     

    What should I change in order to be able to display my database content in the cute_editor’s window?

     

    One more question.

    My website uses a language that is being written from right to left.

    Where should I change the code so when the page is loading, the default writing side will be right to left.

     

    Thanks in advance.

     

    Best regards,

     

    --

     

    O.B

  •  01-15-2007, 10:41 AM 25798 in reply to 25787

    Re: DataBase relation

    Are you sure you get the data from your DB and pass it to srcURL?
     
    Let us pass some value to srcURL and test it:
     
    <%
    srcURL = "Hello World"

                                                    Dim editor

                                                    Set editor = New CuteEditor

                                                    editor.ID = "Editor1"

                                                   

                                                   

                                        editor.Text = srcURL

                                        editor.FilesPath = "CuteEditor_Files"

                                                    editor.EditorBodyStyle = "font:normal 12px arial;"

                                                    editor.EditorWysiwygModeCss = "asp.css"

                                                    editor.Draw()

                                                                                                                                                                                                   

                                                    ' Request.Form(ID) access from other page

                                    %>


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-15-2007, 2:53 PM 25800 in reply to 25798

    Re: DataBase relation

    yes i am sure.
     
    after inserting srcURL="Hello World" i can see it in the cute_editor.
    any ideas on how to display the real content?
     
    thanks
    --
     
    O.B
     
  •  01-16-2007, 3:50 PM 25829 in reply to 25800

    Re: DataBase relation

    Are you sure you get the data from your DB and pass it to srcURL?
     
    Let us pass some value to srcURL and test it:
     
     
    <%
     srcURL = srcURL & "Hello World"
     Dim editor
            Set editor = New CuteEditor
            editor.ID = "Editor1"
     
     editor.Text = srcURL
            editor.FilesPath = "CuteEditor_Files"
            editor.EditorBodyStyle = "font:normal 12px arial;"
            editor.EditorWysiwygModeCss = "asp.css"
            editor.Draw()
     
     ' Request.Form(ID) access from other page
    %>
    If you still get "Hello world", that means you get an empty string from your DB.
     
    You have to find the code of your script to debug that part.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-17-2007, 9:54 AM 25850 in reply to 25829

    Re: DataBase relation

    O.B.,
     
    Here's a couple of suggestions:
     
    1.  If you're pulling this from a database and are using a recordset, such as
     
    recordsetobject
    set recordsetobject = Server.CreateObject("ADODB.Recordset")
     
    to get the data from your DB, you may want to just use
     
    editor.Text = recordsetobject.Fields.Item("nameofhtmlfield").Value
     
    If you're not using a recordset, try using:
     
    editor.Text = <%=srcURL%>
     
    I've had limited success with this, but in some cases it works.  If you're using another method of extracting the data from your DB, please post the code for the extraction part of your ASP page here, and I will take a look at it.
     
    Thanks,
     
    Max.
  •  01-19-2007, 11:46 AM 25950 in reply to 25850

    Re: DataBase relation

    Hi Max,
    I am having hard time configuring this.
    here is my code:
     
    <!--#include file=header.asp-->
    <%
    Class CuteEditor
     ' version 5.0
     Private s_AccessKey
     Private s_activetab
     Private s_AllowEditServerSideCode
     Private s_allowpastehtml
     Private s_autoconfigure
     Private s_AutoParseClasses
     Private s_BaseHref
     Private s_breakelement
     Private s_codeviewtemplateitemlist
     Private s_ConfigurationPath
     Private s_ConvertHTMLTagstoLowercase
     Private s_CustomCulture
     Private s_DisableAutoFormatting
     Private s_DisableClassList
     Private s_disableitemlist
     Private s_DOCTYPE
     Private s_DownLevelColumns
     Private s_TabSpaces
     Private s_ResizeStep
     Private s_DownLevelRows
     Private s_editcompletedocument
     Private s_editorbodystyle
     Private s_EditorOnPaste
     Private s_editorwysiwygmodecss
     Private s_EnableAntiSpamEmailEncoder
     Private s_EnableBrowserContextMenu
     Private s_enableclientscript
     Private s_EnableContextMenu
     Private s_EnableContextMenuEditing
     Private s_EnableContextMenuFormat
     Private s_EnableContextMenuInsert
     Private s_EnableContextMenuInsertAdvanced
     Private s_EnableContextMenuInsertFiles
     Private s_EnableContextMenuInsertForms
     Private s_EnableContextMenuRelative
     Private s_EnableContextMenuTags
     Private s_EnableContextMenuVerbs
     Private s_EnableStripScriptTags
     Private s_filespath 
     Private s_FocusOnLoad
     Private s_ullpageonload
     Private s_ToggleBorder
     Private s_height
     Private s_helpurl
     Public ID
     Private s_maxhtmllength
     Private s_maxtextlength
     Private s_PrintFullWebPage
     Private s_readonly
     Private s_removeservernamesfromurl
     Private s_RemoveTBODYTag
     Private s_SecurityPolicyFile
     Private s_showBottomBar
     Private s_ShowCodeViewToolBar
     Private s_ShowDecreaseButton
     Private s_ShowEnlargeButton
     Private s_showgroupmenuimage
     Private s_showhtmlmode
     Private s_showpreviewmode
     Private s_tabindex
     Private s_templateitemlist
     Private s_TextAreaStyle
     Private s_ThemeType
     Private s_UseFontTags
     Private s_UseHTMLEntities
     Private s_UsePhysicalFormattingTags
     Private s_UseRelativeLinks
     Private s_UseSimpleAmpersand
     Private s_width 
     Private s_cssclassdropdownMenuNames
     Private s_cssclassdropdownMenuList
     Private s_ParagraphsListMenuNames
     Private s_ParagraphsListMenuList
     Private s_FontFacesList
     Private s_FontSizesList
     Private s_linksdropdownMenuList
     Private s_linksdropdownMenuNames
     Private s_codesnippetdropdownMenuNames
     Private s_codesnippetdropdownMenuList
     Private s_imagesdropdownMenuNames
     Private s_imagesdropdownMenuList
     Private s_maxImageSize
     Private s_maxMediaSize
     Private s_maxFlashSize
     Private s_maxDocumentSize
     Private s_MaxTemplateSize
     Private s_AllowUpload
     Private s_AllowCreateFolder
     Private s_AllowRename
     Private s_AllowDelete
     Private s_imagegallerypath 
     Private s_MediaGalleryPath
     Private s_FlashGalleryPath
     Private s_TemplateGalleryPath
     Private s_FilesGalleryPath
     Private s_ImageFilters
     Private s_MediaFilters
        Private s_DocumentFilters
        Private s_XMLOutput
     ' version 5.0
     
     
     Private s_Text
     Private s_flashpath 
     Private s_mediapath 
     Private s_documentpath 
     Private s_UseNetSpell
     Private s_subsequent
     Private s_ParagraphsDropDownWidth
     Private s_SizesDropDownWidth 
     Private s_ZoomsDropDownWidth 
     Private s_StylesDropDownWidth
     Private s_CodeSnippetsDropDownWidth
     Private s_ImagesDropDownWidth
     Private s_FontsDropDownWidth
     Private s_LinksDropDownWidth
     Private s_ZoomsList
     
     
     '****** version 5.1 ******
     
     Private s_MaintainAspectRatioWhenDraggingImage
     Private s_EnableObjectResizing
     Private s_ShowVersion
     
     Public Property Let MaintainAspectRatioWhenDraggingImage(yesornot)
      s_MaintainAspectRatioWhenDraggingImage = CStr(yesornot)
     End Property 
     Public Property Let EnableObjectResizing(yesornot) 
      s_EnableObjectResizing =  CStr(yesornot) 
     End Property
     
     Public Property Let ShowVersion(yesornot) 
      s_ShowVersion =  CStr(yesornot) 
     End Property
     
     '****** version 5.1 ******
     
     
     'version 5.0
     Public Property Let AccessKey(s)
      s_AccessKey = s
     End Property 
     Public Property Let ActiveTab(input_string) 
      s_activetab =  input_string 
     End Property
     Public Property Let AllowEditServerSideCode (yesornot)
      s_AllowEditServerSideCode = CStr(yesornot)
     End Property
     Public Property Let AllowPasteHtml(yesornot)
      s_allowpastehtml = CStr(yesornot)
     End Property 
     Public Property Let AutoConfigure(cfg)
      s_autoconfigure = cfg
     End Property
     Public Property Let AutoParseClasses (yesornot)
      s_AutoParseClasses = CStr(yesornot)
     End Property
     Public Property Let BaseHref(input_string)
      s_BaseHref = input_string
     End Property
     Public Property Let BreakElement(input_string)
      s_breakelement = input_string
     End Property  
     Public Property Let CodeViewTemplateItemList(Input_list)
      s_codeviewtemplateitemlist = Input_list
     End Property  
     Public Property Let ConfigurationPath(s)
      s_ConfigurationPath = s
     End Property  
     Public Property Let ConvertHTMLTagstoLowercase(yesornot)
      s_ConvertHTMLTagstoLowercase = CStr(yesornot)
     End Property
     Public Property Let DisableAutoFormatting(yesornot)
      s_DisableAutoFormatting = CStr(yesornot)
     End Property 
     Public Property Let DisableClassList(yesornot)
      s_DisableClassList = CStr(yesornot)
     End Property   
     Public Property Let DisableItemList(Input_list)
      s_disableitemlist = Input_list
     End Property  
     Public Property Let DOCTYPE(s)
      s_DOCTYPE = s
     End Property
     Public Property Let DownLevelColumns(n)
      s_DownLevelColumns = n
     End Property 
     Public Property Let TabSpaces(n)
      s_TabSpaces = n
     End Property 
     Public Property Let ResizeStep(n)
      s_ResizeStep = n
     End Property
     Public Property Let DownLevelRows (n)
      s_DownLevelRows  = n
     End Property 
     Public Property Let EditCompleteDocument (yesornot)
      s_editcompletedocument = CStr(yesornot)
     End Property   
     Public Property Let EditorBodyStyle(input_string)
      s_editorbodystyle = input_string
     End Property
     Public Property Let EditorOnPaste(yesornot)
      s_EditorOnPaste= CStr(yesornot)
     End Property 
     Public Property Let EditorWysiwygModeCss(input_string)
      s_editorwysiwygmodecss = input_string
     End Property
     Public Property Let EnableAntiSpamEmailEncoder(yesornot)
      s_EnableAntiSpamEmailEncoder = CStr(yesornot)
     End Property 
     Public Property Let EnableBrowserContextMenu (yesornot)
      s_EnableBrowserContextMenu = CStr(yesornot)
     End Property  
     Public Property Let EnableClientScript(trueornot)
      s_enableclientscript = trueornot
     End Property  
     Public Property Let EnableContextMenu(trueornot)
      s_EnableContextMenu = trueornot
     End Property  
     Public Property Let EnableContextMenuEditing(trueornot)
      s_EnableContextMenuEditing= trueornot
     End Property  
     Public Property Let EnableContextMenuFormat(trueornot)
      s_EnableContextMenuFormat = trueornot
     End Property  
     Public Property Let EnableContextMenuInsert (trueornot)
      s_EnableContextMenuInsert  = trueornot
     End Property  
     Public Property Let EnableContextMenuInsertAdvanced(trueornot)
      s_EnableContextMenuInsertAdvanced = trueornot
     End Property  
     Public Property Let EnableContextMenuInsertFiles(trueornot)
      s_EnableContextMenuInsertFiles = trueornot
     End Property  
     Public Property Let EnableContextMenuInsertForms(trueornot)
      s_EnableContextMenuInsertForms = trueornot
     End Property  
     Public Property Let EnableContextMenuRelative(trueornot)
      s_EnableContextMenuRelative = trueornot
     End Property  
     Public Property Let EnableContextMenuTags(trueornot)
      s_EnableContextMenuTags = trueornot
     End Property  
     Public Property Let EnableContextMenuVerbs(trueornot)
      s_EnableContextMenuVerbs = trueornot
     End Property 
     Public Property Let EnableStripScriptTags(yesornot)
      s_EnableStripScriptTags = CStr(yesornot)
     End Property   
     Public Property Let FilesPath(s)
      If Right(s,1) = "/" Then
       editor_filespath = Left(s, Len(s)-1)
      End If
      s_filespath = s
     End Property 
     Public Property Let FocusOnLoad(yesornot)
      s_FocusOnLoad= CStr(yesornot)
     End Property
     Public Property Let FullPageOnLoad(yesornot)
      s_ullpageonload= CStr(yesornot)
     End Property
     Public Property Let ToggleBorder(yesornot)
      s_ToggleBorder= CStr(yesornot)
     End Property
     Public Property Let Height(n)
      s_height = n
     End Property 
     Public Property Let HelpUrl(s)
      s_helpurl = s
     End Property 
     Public Property Let MaxHTMLLength(n)
      s_maxhtmllength = n
     End Property  
     Public Property Let MaxTextLength(n)
      s_maxtextlength = n
     End Property  
     Public Property Let PrintFullWebPage(trueornot)
      s_PrintFullWebPage = trueornot
     End Property
     Public Property Let ReadOnly(yesornot)
      s_readonly = CStr(yesornot)
     End Property  
     Public Property Let RemoveServerNamesFromUrl(yesornot)
      s_removeservernamesfromurl  = CStr(yesornot)
     End Property  
     Public Property Let RemoveTBODYTag(yesornot)
      s_RemoveTBODYTag = CStr(yesornot)
     End Property 
     Public Property Let SecurityPolicyFile (s)
      s_SecurityPolicyFile = s
     End Property 
     Public Property Let ShowBottomBar(yesornot)
      s_showBottomBar = CStr(yesornot)
     End Property
     Public Property Let ShowCodeViewToolBar(yesornot)
      s_ShowCodeViewToolBar = CStr(yesornot)
     End Property 
     Public Property Let ShowDecreaseButton(yesornot)
      s_ShowDecreaseButton = CStr(yesornot)
     End Property 
     Public Property Let ShowEnlargeButton(yesornot)
      s_ShowEnlargeButton = CStr(yesornot)
     End Property  
     Public Property Let ShowGroupMenuImage(yesornot)
      s_showgroupmenuimage = CStr(yesornot)
     End Property
     Public Property Let ShowHtmlMode(yesornot)
      s_showhtmlmode = CStr(yesornot)
     End Property 
     Public Property Let ShowPreviewMode(yesornot)
      s_showpreviewmode = CStr(yesornot)
     End Property
     Public Property Let TabIndex(i)
      s_tabindex = i
     End Property 
     Public Property Let TemplateItemList(s)
      s_templateitemlist = s
     End Property
     Public Property Let TextAreaStyle(s)
      s_TextAreaStyle = s
     End Property
     Public Property Let ThemeType(Input_theme)
      s_ThemeType = Input_theme
     End Property
     Public Property Let UseFontTags (yesornot)
      s_UseFontTags = CStr(yesornot)
     End Property
     Public Property Let UseHTMLEntities (yesornot)
      s_UseHTMLEntities = CStr(yesornot)
     End Property
     Public Property Let UsePhysicalFormattingTags (yesornot)
      s_UsePhysicalFormattingTags = CStr(yesornot)
     End Property 
     Public Property Let UseSimpleAmpersand(yesornot)
      s_UseSimpleAmpersand= CStr(yesornot)
     End Property 
     Public Property Let Width(n)
      s_width = n
     End Property     
     Public Property Let CssClassStyleDropDownMenuNames(input_string)
      s_cssclassdropdownMenuNames = input_string
     End Property 
     Public Property Let CssClassStyleDropDownMenuList(input_string)
      s_cssclassdropdownMenuList = input_string
     End Property 
     Public Property Let ParagraphsListMenuNames(list)
      s_ParagraphsListMenuNames = list
     End Property 
     Public Property Let ParagraphsListMenuList(list)
      s_ParagraphsListMenuList = list
     End Property   
     Public Property Let FontFacesList(list)
      s_FontFacesList = list
     End Property
     Public Property Let FontSizesList(list)
      s_FontSizesList = list
     End Property 
     Public Property Let LinksDropDownMenuList(list)
      s_linksdropdownMenuList = list
     End Property  
     Public Property Let LinksDropDownMenuNames(list)
      s_linksdropdownMenuNames = list
     End Property  
     Public Property Let CodeSnippetDropDownMenuNames(input_string)
      s_codesnippetdropdownMenuNames = input_string
     End Property 
     Public Property Let CodeSnippetDropDownMenuList(input_string)
      s_codesnippetdropdownMenuList = input_string
     End Property  
     Public Property Let ImagesDropDownMenuNames(input_string)
      s_imagesdropdownMenuNames = input_string
     End Property 
     Public Property Let ImagesDropDownMenuList(input_string)
      s_imagesdropdownMenuList = input_string
     End Property  
     Public Property Let ZoomsList(list)
      s_ZoomsList = list
     End Property
     Public Property Let MaxImageSize(size)
      s_maxImageSize = size
     End Property  
     Public Property Let MaxMediaSize(size)
      s_maxMediaSize = size
     End Property
     Public Property Let MaxFlashSize(size)
      s_maxFlashSize = size
     End Property 
     Public Property Let MaxDocumentSize(size)
      s_maxDocumentSize = size
     End Property
     Public Property Let MaxTemplateSize(size)
      s_MaxTemplateSize = size
     End Property
     Public Property Let ImageGalleryPath(path)
      s_imagegallerypath = path
     End Property 
     Public Property Let MediaGalleryPath(path)
      s_MediaGalleryPath = path
     End Property 
     Public Property Let FlashGalleryPath(path)
      s_FlashGalleryPath = path
     End Property 
     Public Property Let TemplateGalleryPath(path)
      s_TemplateGalleryPath = path
     End Property  
     Public Property Let FilesGalleryPath(path)
      s_FilesGalleryPath = path
     End Property  
     Public Property Let AllowCreateFolder(yesornot)
      s_AllowCreateFolder = CStr(yesornot)
     End Property 
     Public Property Let AllowUpload(yesornot)
      s_AllowUpload = CStr(yesornot)
     End Property 
     Public Property Let AllowRename(yesornot)
      s_AllowRename = CStr(yesornot)
     End Property 
     Public Property Let AllowDelete(yesornot)
      s_AllowDelete = CStr(yesornot)
     End Property   
     Public Property Let ImageFilters(s)
      s_ImageFilters = s
     End Property   
     Public Property Let MediaFilters(s)
      s_MediaFilters = s
     End Property   
     Public Property Let DocumentFilters(s)
      s_DocumentFilters = s
     End Property 
     
     Public Property Get Text
      Text = Request.Form(ID)
     End Property 
      
     Public CustomAddons 
     Public Property Get obj_ID
      obj_ID = "obj_"&ID
     End Property     
     Public Property Let Text(initialText)
      s_Text = initialText & ""
     End Property  
     Public Property Let UseRelativeLinks(yesornot)
      s_UseRelativeLinks  = CStr(yesornot)
     End Property 
     Public Property Let UseNetSpell(yesornot)
      s_UseNetSpell= CStr(yesornot)
     End Property   
     Public Property Let subsequent(yesornot)
      s_subsequent = CStr(yesornot)
     End Property
     Public Property Let CustomCulture(s)
      s_CustomCulture= s
     End Property 
     Public Property Let XHTMLOutput (yesornot)
      s_XMLOutput = CStr(yesornot)
     End Property 
     '********************************************************
     ' Begin Event Handlers
     '********************************************************
     Private Sub Class_Initialize()
      s_activetab = "Edit"
      s_AllowEditServerSideCode = "false"
      s_allowpastehtml = "true"
      s_autoconfigure = "default"
      s_AutoParseClasses = "true"
      s_BaseHref=""
      s_breakelement = "div"
      s_codeviewtemplateitemlist="Save,Print,Cut,Copy,Paste,Find,ToFullPage,FromFullPage,SelectAll"
      s_ConvertHTMLTagstoLowercase  = "true"
      s_CustomCulture = "en-en"
      s_DisableAutoFormatting  = "false"
      s_DownLevelColumns = 50
      s_DownLevelRows  = 13
      s_TabSpaces = 3
      s_ResizeStep = 100
      s_DOCTYPE=""
      s_editcompletedocument = "false"
      s_editorbodystyle=""
      s_EditorOnPaste = "ConfirmWord"
      s_editorwysiwygmodecss = ""
      s_EnableAntiSpamEmailEncoder = "true"
      s_EnableBrowserContextMenu = "true"
      s_enableclientscript = "true"
      s_EnableContextMenu = "true"
      s_EnableContextMenuEditing  = "true"
      s_EnableContextMenuFormat = "true"
      s_EnableContextMenuInsert = "true"
      s_EnableContextMenuInsertAdvanced = "true"
      s_EnableContextMenuInsertFiles = "true"
      s_EnableContextMenuInsertForms = "true"
      s_EnableContextMenuRelative = "true"
      s_EnableContextMenuTags = "true"
      s_EnableContextMenuVerbs = "true"
      s_EnableStripScriptTags  = "false"
      s_filespath="CuteEditor_Files"
      s_FocusOnLoad = "false"
      s_ullpageonload = "false"
      s_ToggleBorder = "true"
      s_height = "300px"
      s_maxhtmllength = 0
      s_maxtextlength = 0
      s_PrintFullWebPage = "false"
      s_readonly = "false"
      s_removeservernamesfromurl  = "true"
      s_RemoveTBODYTag  = "false"
      s_SecurityPolicyFile = "default.config"
      s_showBottomBar = "true"
      s_ShowCodeViewToolBar = "true"
      s_ShowDecreaseButton = "true"
      s_ShowEnlargeButton = "true"
      s_showgroupmenuimage = "true"
      s_showhtmlmode = "true"
      s_showpreviewmode = "true"
      s_ThemeType = "Office2003_BlueTheme"
      s_UseFontTags= "false"
      s_UseHTMLEntities = "true"
      s_UsePhysicalFormattingTags = "true"
      s_UseRelativeLinks  = "true"
      s_MaintainAspectRatioWhenDraggingImage   = "true"
      s_EnableObjectResizing   = "true"
      s_ShowVersion  = "false"
      s_width = "765px"
      
      s_subsequent = "false"
      s_UseSimpleAmpersand  = "false"
      s_UseNetSpell = "true"
      s_tabindex = 0
      s_XMLOutput = "false"
     End Sub
     
     Public Property Get BrowserType
      Dim userAgent
      BrowserType = "false"
      userAgent = Request.ServerVariables("HTTP_USER_AGENT")
      If InStr(1, userAgent, "MSIE", 1) > 0 AND InStr(1, userAgent, "Win", 1) > 0 AND InStr(1, userAgent, "Opera", 1) = 0 Then
       If Trim(Mid(userAgent, inStr(1, userAgent, "MSIE", 1)+5, 3)) >= "5.5" OR Trim(Mid(userAgent, inStr(1, userAgent, "MSIE", 1)+5, 3)) = "5,5" Then
        BrowserType = "winIE"
       Else
        BrowserType = "false"
       End If
      ElseIf inStr(1, userAgent, "Firebird", 1) Then
        If CLng(Trim(Mid(userAgent, CInt(inStr(1, userAgent, "Gecko/", 1)+6), 8))) >= 20030728 Then
         BrowserType = "Gecko"
       Else
        BrowserType = "false"
       End If
      ElseIf inStr(1, userAgent, "Gecko", 1) > 0 AND inStr(1, userAgent, "Firebird", 1) = 0 AND isNumeric(Trim(Mid(userAgent, CInt(inStr(1, userAgent, "Gecko/", 1)+6), 8))) Then
       If CLng(Trim(Mid(userAgent, CInt(inStr(1, userAgent, "Gecko/", 1)+6), 8))) => 20030312 Then
        BrowserType = "Gecko"
       Else
        BrowserType = "false"
       End If
      ElseIf inStr(1, userAgent, "Safari", 1) > 0  Then
       If CLng(Trim(Mid(userAgent, CInt(inStr(1, userAgent, "AppleWebKit/", 1)+12), 3))) => 412 Then
        BrowserType = "Safari"
       ElseIf CLng(Trim(Mid(userAgent, CInt(inStr(1, userAgent, "AppleWebKit/", 1)+12), 3))) => 312 Then
        BrowserType = "Safari13"   
       Else
        BrowserType = "false"
       End If
      Else
       BrowserType = "false"
      End If
      
     End Property
     
     
     Private Function GetFormatBlockCode (s_block)
      Select case Lcase(s_block)
       Case "normal":
        GetFormatBlockCode = "<P>"
       Case "heading 1":
        GetFormatBlockCode = "<H1>"
       Case "heading 2":
        GetFormatBlockCode = "<H2>"
       Case "heading 3":
        GetFormatBlockCode = "<H3>"
       Case "heading 4":
        GetFormatBlockCode = "<H4>"
       Case "heading 5":
        GetFormatBlockCode = "<H5>"
       Case "heading 6":
        GetFormatBlockCode = "<H6>"
       Case "address":
        GetFormatBlockCode = "Address"
       Case "formatted":
        GetFormatBlockCode = "Formatted"
       Case "definition term":
        GetFormatBlockCode = "Definition Term"
       Case Else
        GetFormatBlockCode = "<P>"   
      End Select
     End Function
     Private Function CreateToolBar()
         Dim strTemp 
      if s_templateitemlist <> "" then
       strTemp = GetToolbarFromItemList(s_disableitemlist)
      elseif s_ConfigurationPath <> "" then
       strTemp = GetToolbarItems(s_ConfigurationPath,s_disableitemlist)
      else
       strTemp = GetToolbarItems(GetURL("Configuration/AutoConfigure/"&s_autoconfigure&".config"),s_disableitemlist)   
      end if 
      'response.Write strTemp
      CreateToolBar = strTemp          
     End Function
     
     Private Function BuildBottomBar()
         Dim strTemp 
      If (s_showBottomBar) Then
       strTemp = "<tr><td class=""CuteEditorBottomBarContainer"" style=""padding:0 0 2px 3px;"">"
       strTemp = strTemp & "<img title="""&G_Str("Normal")&""" class=""CuteEditorButton"" Command=""TabEdit""  src="""&ProcessThemeWebPath("design.gif")&""" border=""0"" />"
       If (s_showhtmlmode) Then
        strTemp = strTemp & "<img title="""&G_Str("HTML")&""" class=""CuteEditorButton"" Command=""TabCode""  src="""&ProcessThemeWebPath("htmlview.gif")&""" border=""0"" />"
       End If
       If (s_showpreviewmode) Then
        strTemp = strTemp & "<img title="""&G_Str("Preview")&""" class=""CuteEditorButton"" Command=""TabView""  src="""&ProcessThemeWebPath("preview.gif")&""" border=""0"" />"
       End If
       strTemp = strTemp & "</td>"
       strTemp = strTemp & "<td align=""right"">"
       if s_ShowVersion Then
        strTemp = strTemp & "Cute Editor version 5.2"
       End if   
       if s_ShowEnlargeButton Then
        strTemp = strTemp & "<img title="""&G_Str("Enlarge")&""" class=""CuteEditorButton"" Command=""sizeplus""   src="""&ProcessThemeWebPath("plus.gif")&""" border=""0"" />"
       End if
       If s_ShowDecreaseButton Then
        strTemp = strTemp & "<img title="""&G_Str("Decrease")&""" class=""CuteEditorButton"" Command=""sizeminus""  src="""&ProcessThemeWebPath("minus.gif")&""" border=""0"" />"
       End if
       strTemp = strTemp & "&nbsp;&nbsp;&nbsp;&nbsp;</td>"
       strTemp = strTemp & "</tr>"
      End If
      'response.Write strTemp
      BuildBottomBar = strTemp
     End Function
      
     
     Private Function EditorInitialise()
      dim t
      t= "<script language=""javascript""> "
      t= t& "  var "&obj_ID&" =  new _CState('"&ID&"','"&obj_ID&"',"
      t= t& "'"&s_ActiveTab&"',"
      t= t& "'"&s_AllowEditServerSideCode&"',"
      t= t& "'"&s_allowpastehtml&"',"
      t= t& "'"&s_BaseHref&"',"
      t= t& "'"&s_breakelement&"',"
      t= t& "'"&s_codeviewtemplateitemlist&"',"
      t= t& "'"&s_ConvertHTMLTagstoLowercase&"',"
      t= t& "'"&s_DisableAutoFormatting&"',"
      t= t& "'"&s_DOCTYPE&"',"
      t= t& "'"&s_editcompletedocument&"',"
      t= t& "'"&s_editorbodystyle&"',"
      t= t& "'"&s_EditorOnPaste&"',"
      t= t& "'"&s_EditorWysiwygModeCss&"',"
      t= t& "'"&s_EnableAntiSpamEmailEncoder&"',"
      t= t& "'"&s_EnableBrowserContextMenu&"',"
      t= t& "'"&s_EnableContextMenu&"',"
      t= t& "'"&s_EnableContextMenuEditing&"',"
      t= t& "'"&s_EnableContextMenuFormat&"',"
      t= t& "'"&s_EnableContextMenuInsert&"',"
      t= t& "'"&s_EnableContextMenuInsertAdvanced&"',"
      t= t& "'"&s_EnableContextMenuInsertFiles&"',"
      t= t& "'"&s_EnableContextMenuInsertForms&"',"
      t= t& "'"&s_EnableContextMenuRelative&"',"
      t= t& "'"&s_EnableContextMenuTags&"',"
      t= t& "'"&s_EnableContextMenuVerbs&"',"
      t= t& "'"&s_EnableStripScriptTags&"',"
      t= t& "'"&s_FocusOnLoad&"',"
      t= t& "'"&s_ullpageonload&"',"
      t= t& "'"&s_ToggleBorder&"',"
      t= t& "'"&s_helpurl&"',"
      t= t& ""&s_maxhtmllength&","
      t= t& ""&s_maxtextlength&","
      t= t& "'"&s_PrintFullWebPage&"',"
      t= t& "'"&s_readonly&"',"
      t= t& "'"&s_removeservernamesfromurl&"',"
      t= t& "'"&s_RemoveTBODYTag&"',"
      t= t& "'"&s_ShowCodeViewToolBar&"',"
      t= t& "'"&s_UseFontTags&"',"
      t= t& "'"&s_UseHTMLEntities&"',"
      t= t& "'"&s_UsePhysicalFormattingTags&"',"
      t= t& "'"&s_UseRelativeLinks&"',"
      t= t& "'"&s_UseSimpleAmpersand&"',"
      t= t& "'"&s_MaintainAspectRatioWhenDraggingImage&"',"
      t= t& "'"&s_EnableObjectResizing&"',"
      t= t& "'"&s_CustomCulture&"',"
      t= t& "'"&s_UseNetSpell&"',"
      t= t& "'"&s_XMLOutput&"',"
      t= t& "'"&s_TabSpaces&"',"
      t= t& "'"&s_ResizeStep&"',"
      t= t& "'"&s_filespath&"');"
      
      Select case Lcase(BrowserType)
       Case "safari":
        t= t& "  setTimeout('EditorLoad("&obj_ID&")',800);"
       Case "safari13":
        t= t& "  setTimeout('EditorLoad("&obj_ID&")',800);"
       Case "gecko":
        t= t& " EditorLoad("&obj_ID&")"
       Case "winie":
        t= t& "  setTimeout('EditorLoad("&obj_ID&")',500);"
      End Select
      
      t= t& "</script>"
      'response.Write "T--<textarea size=""12"">" & t & "</textarea>"
      EditorInitialise = t 
     End Function
     
     Private Function editorClientScript ()
         Dim strTemp
      If s_subsequent = "false" then
       strTemp = "<script language=""JavaScript"" SRC="""&s_filespath&"/spell.js""></script><script language=""JavaScript"" SRC="""&s_filespath&"/CuteEditorconstants.js""></script><script language=""JavaScript"" SRC="""&s_filespath&"/license/CuteEditorLic.js""></script><script language=""JavaScript"" SRC="""&s_filespath&"/"&BrowserType&".js.asp?UC="&s_CustomCulture&"""></script>"
      End if
      editorClientScript =  strTemp
     End Function
     
     Private Function editorStylesheet ()
      Dim s ,strTemp
      Select case Lcase(BrowserType)
       Case "safari":
        s="safari"
       Case "safari13":
        s="safari"
       Case "gecko":
        s="gecko"
       Case "winie":
        s="winie"
      End Select
      strTemp =  "<link href='"&s_filespath&"/Themes/"&s_ThemeType&"/style."&s&".css.asp?EditorID=CE_"&ID&"_ID' type='text/css' rel='stylesheet'/>"
      editorStylesheet = strTemp
     End Function
     
     Public Sub Draw()
      Dim s
      
      Call DoSecurity_v2 ()
      
     ' Response.Write "BrowserType:"&BrowserType
      
      If Not s_enableclientscript OR BrowserType="false" Then
       if s_AccessKey <> "" Then
        s=s&" AccessKey="""&s_AccessKey&""""
       End if
       Response.Write "<TEXTAREA name="""&ID&""" "&s&" rows="""&s_DownLevelRows &""" cols="""&s_DownLevelColumns&""" style=""WIDTH: " & s_width & "; HEIGHT: " & s_height & """ ID="""&ID&""">" & Server.HTMLEncode( s_Text ) & "</TEXTAREA>"
      Else 
       Call editorClientScript_v2 ()
       Call editorStylesheet_v2 ()
       Response.Write ("")
       if s_tabindex <> 0 Then
        s="TabIndex="&s_tabindex
       End if
       if s_AccessKey <> "" Then
        s=s&" AccessKey="""&s_AccessKey&""""
       End if
       Response.Write("<table "&s&" id=""CE_"&ID&"_ID"" cellspacing=""0"" cellpadding=""0"" height="&s_height&" width="&s_width&" style=""table-layout:auto;height:"&s_height&";width:"&s_width&";"">")
       Response.Write("<tr><td colspan=""2"" class=""CuteEditorToolBarContainer"" style=""padding:3px 2px 0 3px;height:1px;overflow-y:visible;"" unselectable=""on"">")
       Response.Write("<div id=""CE_"&ID&"_ID_ToolBar"" class=""CuteEditorToolbar"" style=""margin-left:1px;margin-bottom:2px;"">")
       Call CreateToolBar_v2()
       if CustomAddons <> "" then
        Response.Write CustomAddons
       end if
       Response.Write("</div></td></tr>")
       Response.Write("<tr><td colspan=""2"" class=""CuteEditorFrameContainer"" style=""padding:1px 3px 2px 3px;"" height=""100%"">")
       Response.Write("<iframe id="""&obj_ID&"_editBox"" src="""&GetURL("template.asp")&""" FrameBorder=""0"" class=""CuteEditorFrame"" style=""background-color:White;border-color:#C0C0C0;border-width:1px;border-style:Solid;height:100%;width:100%;""></iframe>")
       Response.Write "<input type=""hidden"" name="""&ID&""" ID="""&ID&""" value=""" & Server.HTMLEncode( s_Text ) & """>"
       Response.Write("</td></tr>")
       Call BuildBottomBar_v2 ()
       Response.Write("</table>")
       Response.Write("<Div id="""&ID&"_sandbox"" style=""VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px;""></Div>")
       Call EditorInitialise_v2 ()
      End If
      'Response.Write BrowserType
     End Sub
     
     '---------------------------------------- OXCYON CHANGES
     Sub DoSecurity_v2()
        call DoSecurity()
     End Sub
     
     Sub editorClientScript_v2()
      response.Write(editorClientScript)
     End Sub
     
     Sub editorStylesheet_v2 ()
      response.Write(editorStylesheet)
     End Sub
     
     Sub CreateToolBar_v2()
         response.Write(CreateToolBar)
     End Sub
     
     Sub BuildBottomBar_v2 ()
       response.Write(BuildBottomBar)
     End Sub
     
     Sub EditorInitialise_v2 ()
       response.Write(EditorInitialise)
     End Sub
     
     Public Function GetString()
      Dim s, strTemp
      
      Call DoSecurity ()
      
     ' Response.Write "BrowserType:"&BrowserType
      
      If Not s_enableclientscript OR BrowserType="false" Then
       if s_AccessKey <> "" Then
        s=s&" AccessKey="""&s_AccessKey&""""
       End if
       strTemp = "<TEXTAREA name="""&ID&""" "&s&" rows="""&s_DownLevelRows &""" cols="""&s_DownLevelColumns&""" style=""WIDTH: " & s_width & "; HEIGHT: " & s_height & """ ID="""&ID&""">" & Server.HTMLEncode( s_Text ) & "</TEXTAREA>"
      Else 
       strTemp = strTemp & editorClientScript ()
       strTemp = strTemp & editorStylesheet ()
       strTemp = strTemp & ""
       if s_tabindex <> 0 Then
        s="TabIndex="&s_tabindex
       End if
       if s_AccessKey <> "" Then
        s=s&" AccessKey="""&s_AccessKey&""""
       End if
       strTemp = strTemp & "<table "&s&" id=""CE_"&ID&"_ID"" cellspacing=""0"" cellpadding=""0"" height="&s_height&" width="&s_width&" style=""table-layout:auto;height:"&s_height&";width:"&s_width&";"">"
       strTemp = strTemp & "<tr><td colspan=""2"" class=""CuteEditorToolBarContainer"" style=""padding:3px 2px 0 3px;height:1px;overflow-y:visible;"" unselectable=""on"">"
       strTemp = strTemp & "<div id=""CE_"&ID&"_ID_ToolBar"" class=""CuteEditorToolbar"" style=""margin-left:1px;margin-bottom:2px;"">"
       strTemp = strTemp & CreateToolBar()
       if CustomAddons <> "" then
        strTemp = strTemp &  CustomAddons
       end if
       strTemp = strTemp & "</div></td></tr>"
       strTemp = strTemp & "<tr><td colspan=""2"" class=""CuteEditorFrameContainer"" style=""padding:1px 3px 2px 3px;"" height=""100%"">"
       strTemp = strTemp & "<iframe id="""&obj_ID&"_editBox"" src="""&GetURL("template.asp")&""" FrameBorder=""0"" class=""CuteEditorFrame"" style=""background-color:White;border-color:#C0C0C0;border-width:1px;border-style:Solid;height:100%;width:100%;""></iframe>"
       strTemp = strTemp &  "<input type=""hidden"" name="""&ID&""" ID="""&ID&""" value=""" & Server.HTMLEncode( s_Text ) & """>"
       strTemp = strTemp & "</td></tr>"
       strTemp = strTemp & BuildBottomBar ()
       strTemp = strTemp & "</table>"
       strTemp = strTemp & "<Div id="""&ID&"_sandbox"" style=""VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px;""></Div>"
       strTemp = strTemp & EditorInitialise ()
      End If
      'Response.Write " Browser:" & BrowserType
      GetString = strTemp
     End Function
     
     '-------------------------------------- 
     
     
     Public Sub DoSecurity()
         dim s
      s=""
      
      If CStr(s_maxImageSize) <> "" Then
          s=s&s_maxImageSize&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MaxImageSize")&"|"
      End If
      
      If CStr(s_MaxMediaSize) <> "" Then
          s=s&s_MaxMediaSize&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MaxMediaSize")&"|"
      End If
      
      If CStr(s_MaxFlashSize) <> "" Then
          s=s&s_MaxFlashSize&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MaxFlashSize")&"|"
      End If
      
      If CStr(s_MaxDocumentSize) <> "" Then
          s=s&s_MaxDocumentSize&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MaxDocumentSize")&"|"
      End If
      
      If CStr(s_MaxTemplateSize) <> "" Then
          s=s&s_MaxTemplateSize&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MaxTemplateSize")&"|"
      End If
      
      If CStr(s_ImageGalleryPath) <> "" Then
          s=s&s_ImageGalleryPath&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("ImageGalleryPath")&"|"
      End If
      
      If CStr(s_MediaGalleryPath) <> "" Then
          s=s&s_MediaGalleryPath&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MediaGalleryPath")&"|"
      End If
      
      If CStr(s_FlashGalleryPath) <> "" Then
          s=s&s_FlashGalleryPath&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("FlashGalleryPath")&"|"
      End If
      
      If CStr(s_TemplateGalleryPath) <> "" Then
          s=s&s_TemplateGalleryPath&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("TemplateGalleryPath")&"|"
      End If
      
      If CStr(s_FilesGalleryPath) <> "" Then
          s=s&s_FilesGalleryPath&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("FilesGalleryPath")&"|"
      End If
      
      If CStr(s_AllowUpload) <> "" Then
          s=s&s_AllowUpload&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("AllowUpload")&"|"
      End If
      
      If CStr(s_AllowCreateFolder) <> "" Then
          s=s&s_AllowCreateFolder&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("AllowCreateFolder")&"|"
      End If
      
      If CStr(s_AllowRename) <> "" Then
          s=s&s_AllowRename&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("AllowRename")&"|"
      End If
      If CStr(s_AllowDelete) <> "" Then
          s=s&s_AllowDelete&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("AllowDelete")&"|"
      End If
      If CStr(s_ImageFilters) <> "" Then
          s=s&s_ImageFilters&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("ImageFilters")&"|"
      End If
        
      If CStr(s_MediaFilters) <> "" Then
          s=s&s_MediaFilters&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("MediaFilters")&"|"
      End If
      
      If CStr(s_DocumentFilters) <> "" Then
          s=s&s_DocumentFilters&"|"
      Else
          s=s&G_SettingFromSecurityPolicyFile("DocumentFilters")&"|"
      End If  
      
      Session("CESecurity")  = s 
      'Response.Write Session("CESecurity")     
     End Sub
     
     Public Function G_SettingFromSecurityPolicyFile(instring)
      dim scriptname,xmlfilename,doc,temp
      dim node,selectednode,optionnodelist,errobj
      dim selectednodes,i,Nodes,objNode
      xmlfilename = Server.MapPath(GetURL("Configuration/Security/"&s_SecurityPolicyFile&""))
      ' Create an object to hold the XML
      set doc = server.CreateObject("Microsoft.XMLDOM")
      ' For ASP, wait until the XML is all ready before continuing
      doc.async = False
      ' Load the XML file or return an error message and stop the script
      if not Doc.Load(xmlfilename) then
       Response.Write "Failed to load the language text from the XML file.<br>"
       Response.End
      end if
      ' Make sure that the interpreter knows that we are using XPath as our selection language
      doc.setProperty "SelectionLanguage", "XPath"
     
         If InStr(1, instring, "Filters", 1) > 0 Then
             set Nodes = doc.DocumentElement.selectNodes("/configuration/security[@name='"&instring&"']/item")
             dim s
          For Each objNode in Nodes
           s = s&objNode.Text&","
       Next
             G_SettingFromSecurityPolicyFile= s
         Else
          set selectednode= doc.selectSingleNode("/configuration/security[@name='"&instring&"']")
          if IsObject(selectednode) and not selectednode is nothing  then
           G_SettingFromSecurityPolicyFile= Server.HTMLEncode(selectednode.text)
          else
           G_SettingFromSecurityPolicyFile= ""  
          end if
      End if
     End Function
     
     public Sub LoadHTML(ByVal FilePath)
      dim fso
      dim file
      dim fileContents
       
      set fso = Server.CreateObject("Scripting.FileSystemObject")
      FilePath = Server.mapPath(FilePath)
       
      if fso.FileExists(FilePath) then
       set file = fso.OpenTextFile(FilePath, 1, "false", -2)
       if not (file.AtEndOfStream) then
                    fileContents = file.ReadAll
                end if
       Text = fileContents
       exit Sub
      else
       Text = "File " & FilePath & " doesn't exist"
      end if
     end Sub
     
     
     public Sub SaveFile (ByVal FilePath)
      dim fso
      dim file
      dim stream
      dim fileContents
       
      set fso = Server.CreateObject("Scripting.FileSystemObject")
      FilePath = Server.MapPath(FilePath)
       
      if len(Text) = 0 then
       response.Write ""
       exit Sub
      else
       if NOT fso.FileExists(FilePath) then
        set file = fso.CreateTextFile(FilePath)
       end if
       set file = fso.GetFile(FilePath)
       set stream = file.OpenAsTextStream(2)     
       stream.Write(Text)
       stream.Close
      end if
     end Sub
     
     Private Property Get SaveButton 
      SaveButton = "<INPUT type=""image"" src="""&ProcessThemeWebPath("save.gif")&""" name=""Save"" alt="""&G_Str("Save")&""" class=""CuteEditorButton"">"
     End Property
      
     Private Property Get GetURL(path)
      GetURL = ""&s_filespath&"/"&path 
     End Property 
     
     Private Property Get ProcessThemeWebPath(imageURL)
      Select case Lcase(s_ThemeType)
       Case "Office2003_BlueTheme":
        ProcessThemeWebPath = GetURL("Themes/Office2003_BlueTheme/Images/"&imageURL)
       Case "office2003":
        ProcessThemeWebPath = GetURL("Themes/office2003/Images/"&imageURL)
       Case "officexp":
        ProcessThemeWebPath = GetURL("Themes/officexp/Images/"&imageURL)
       Case "office2000":
        ProcessThemeWebPath = GetURL("Themes/office2000/Images/"&imageURL)   
       Case "custom":
        ProcessThemeWebPath = GetURL("Themes/custom/Images/"&imageURL)    
       Case Else
        ProcessThemeWebPath = GetURL("Themes/Office2003_BlueTheme/Images/"&imageURL)
      End Select
     End Property
     
     Public Function G_Str(instring)
      dim t
      
      t = GetStringByCulture(instring,s_CustomCulture)
      
      If t = ""  then
       t= GetStringByCulture(instring,"_default")
      End If
      
      If t = ""  then
       t= "{"&instring&"}" 
      End If
      G_Str= t
     End Function 
     
     Public Function GetStringByCulture(instring,input_culture)
      dim scriptname,xmlfilename,doc,temp
      dim node,selectednode,optionnodelist,errobj
      dim selectednodes
      
      xmlfilename= Server.MapPath(GetURL("languages/"&input_culture&".xml"))
      ' Create an object to hold the XML
      set doc = server.CreateObject("Microsoft.XMLDOM")
      ' For ASP, wait until the XML is all ready before continuing
      doc.async = False
      ' Load the XML file or return an error message and stop the script
      if not Doc.Load(xmlfilename) then
       Response.Write "Failed to load the language text from the XML file.<br>"
       Response.End
      end if
      ' Make sure that the interpreter knows that we are using XPath as our selection language
      doc.setProperty "SelectionLanguage", "XPath"
     
      set selectednode= doc.selectSingleNode("/resources/resource[@name='"&instring&"']")
      if IsObject(selectednode) and not selectednode is nothing  then
       GetStringByCulture=Server.HTMLEncode(selectednode.text)
      else
       GetStringByCulture=""  
      end if
     End Function
     
     
     '/* version 5.0 */
     
     Public function GetToolbarFromItemList(d_list)
      dim scriptname,cfgfilename,doc,temp
      dim node,selectednode,optionnodelist,errobj
      dim selectednodes,s
      s=""
        
      cfgfilename = Server.MapPath(GetURL("Configuration/AutoConfigure/full.config"))
      
      ' Create an object to hold the XML
      set doc = server.CreateObject("Microsoft.XMLDOM")
      ' For ASP, wait until the XML is all ready before continuing
      doc.async = False
      ' Load the XML file or return an error message and stop the script
      if not Doc.Load(cfgfilename) then
       Response.Write "Failed to load the Configure file.<br>"
       Response.End
      end if
      ' Make sure that the interpreter knows that we are using XPath as our selection language
      doc.setProperty "SelectionLanguage", "XPath"
     
      'set selectednode= doc.selectSingleNode("/toolbars")
      Dim Nodes
      set Nodes = doc.DocumentElement.selectNodes("//toolbars/*")
      
      Dim ToolbarStrings
      Dim i
        
      If BrowserType="Gecko" Then
       d_list = d_list & ",zoom"
      End If
      
      If BrowserType="Safari" or BrowserType="Safari13" Then  
       d_list = d_list & ",zoom,find,tofullpage,fromfullpage,linktree,inserttemplate,modifytable,insertrowtop,insertrowbottom,insertcolumnleft,insertcolumnright,deletecell,deleterow,deletecolumn,insertcell,editrow,editcell"
       d_list = d_list & ",mergeright,mergebottom,horsplitcell,versplitcell,blockdirltr,blockdirrtl,insertorderedlist,insertunorderedlist,indent,outdent,imagemap,insertanchor,documentpropertypage,absoluteposition"
       d_list = d_list & ",bringforward,bringbackward,cssclass,cssstyle"
      End If
      
      ToolbarStrings = Split(s_templateitemlist,",")
      For i = 0 to Ubound(Split(s_templateitemlist,","))
       dim itemname   
       itemname = Trim(ToolbarStrings(i))
       
       dim disable_toolbarstrings, j,found
       found = false
       disable_toolbarstrings = Split(d_list,",")
       for j = 0 to Ubound(disable_toolbarstrings)      
        if lcase(itemname) = lcase(trim(disable_toolbarstrings(j))) then
         found = true
         Exit for     
        end if
       next
       if found = false then
       Select Case lcase(itemname)
        case "g_start":
         s =  s &  AddToolbarGroupStart
        case "g_end":
         s =  s &  AddToolbarGroupEnd
        case "separator":
         s =  s &  AddToolbarSeparator
        case "linebreak":
         s =  s &  AddToolbarLineBreak
        case "table":
       '  s =  s &  AddToolbarLineBreak
        case "forecolor":
         s =  s &  AddToolbarForeColor
        case "backcolor":
         s =  s &  AddToolbarBackColor
        case "dropdown":
       '  s =  s &  AddToolbarLineBreak
        case "holder":
       '  s =  s &  AddToolbarLineBreak
        Case else
         Dim objNode,objType,objName,objImgName,objVisible,v
         For Each objNode in Nodes
          With objNode.Attributes 
              set objType = .GetNamedItem("type")
           set objName = .GetNamedItem("name")
           set objVisible = .GetNamedItem("Visible") 
           v = "true"             
           If not objVisible is nothing  then
            v = objVisible.Text
           End If
           If not objName is nothing AND lcase(v) <> "false" then 
            if lcase(objName.Text) = lcase(itemname) then         
             If lcase(objType.Text) = "image" then
              dim n,t       
              n = objName.Text 
              set objImgName = .GetNamedItem("imagename")
              If not objImgName is nothing  then
               t = .GetNamedItem("imagename").Text
              else
               t = n        
              End If  
              s =  s & AddToolbarItem(n,ProcessThemeWebPath(t & ".gif"), n,20,20) 
             Else
              Dim objCmd
              set objCmd = .GetNamedItem("command")
              s =  s & AddToolbarDropDown(objName.Text,objCmd.Text)
             End If
            end if 
           End if 
          End With      
         Next          
       End Select
       end if
      Next 
      GetToolbarFromItemList = s
     End function
     
     Public function GetToolbarItems(cfgfilename,d_list)
      dim scriptname,doc,temp
      dim node,selectednode,optionnodelist,errobj
      dim selectednodes,i,s,Nodes,objNode,objType,objName,objImgName
      s=""
        
      cfgfilename = Server.MapPath(cfgfilename)
      
      ' Create an object to hold the XML
      set doc = server.CreateObject("Microsoft.XMLDOM")
      ' For ASP, wait until the XML is all ready before continuing
      doc.async = False
      ' Load the XML file or return an error message and stop the script
      if not Doc.Load(cfgfilename) then
       Response.Write "Failed to load the Configure file.<br>"
       Response.End
      end if
      
      If BrowserType="Gecko" Then
       d_list = d_list & ",zoom"
      End If
      
      If BrowserType="Safari" or BrowserType="Safari13" Then  
       d_list = d_list & ",zoom,find,tofullpage,fromfullpage,linktree,inserttemplate,modifytable,insertrowtop,insertrowbottom,insertcolumnleft,insertcolumnright,deletecell,deleterow,deletecolumn,insertcell,editrow,editcell"
       d_list = d_list & ",mergeright,mergebottom,horsplitcell,versplitcell,blockdirltr,blockdirrtl,insertorderedlist,insertunorderedlist,indent,outdent,imagemap,insertanchor,documentpropertypage,absoluteposition"
       d_list = d_list & ",bringforward,bringbackward,cssclass,cssstyle"
      End If  
      ' Make sure that the interpreter knows that we are using XPath as our selection language
      doc.setProperty "SelectionLanguage", "XPath"
     
      'set selectednode= doc.selectSingleNode("/toolbars")
      set Nodes = doc.DocumentElement.selectNodes("//toolbars/*")
      
      For Each objNode in Nodes
       With objNode.Attributes
        Dim objVisible, v
        set objType = .GetNamedItem("type")
        set objName = .GetNamedItem("name")
        set objVisible = .GetNamedItem("Visible")
        v = "true"       
        If not objVisible is nothing  then
         v = objVisible.Text
        End If
        If not objType is nothing AND lcase(v) <> "false" then
         dim disable_toolbarstrings, j,found
         found = "false"
         disable_toolbarstrings = Split(d_list,",")
         for j = 0 to Ubound(disable_toolbarstrings)      
          if (lcase(trim(objType.Text)) = lcase(trim(disable_toolbarstrings(j)))) then
           found = "true"
           Exit for
          else
           If not objName is nothing  then
            if (lcase(trim(.GetNamedItem("name").Text)) = lcase(trim(disable_toolbarstrings(j)))) then
             found = "true"
             Exit for
            End If
           End If       
          end if
         next
         
         dim n,c,w,t     
         if(found = "false") then     
          Select Case lcase(objType.Text)
           case "g_start":
            s =  s &  AddToolbarGroupStart
           case "g_end":
            s =  s &  AddToolbarGroupEnd
           case "separator":
            s =  s &  AddToolbarSeparator
           case "linebreak":
            s =  s &  AddToolbarLineBreak
           case "table":
          '  s =  s &  AddToolbarLineBreak
           case "forecolor":
            s =  s &  AddToolbarForeColor
           case "backcolor":
            s =  s &  AddToolbarBackColor
           case "dropdown":
               If not objName is nothing  then  
             n = .GetNamedItem("name").Text  
             c = .GetNamedItem("command").Text         
             s =  s & AddToolbarDropDown(n,c)
            End if
           case "holder":
          '  s =  s &  AddToolbarLineBreak
           Case "image"
            If not objName is nothing  then 
             n = .GetNamedItem("name").Text 
             set objImgName = .GetNamedItem("imagename")
             If not objImgName is nothing  then
              t = .GetNamedItem("imagename").Text
             else
              t = n        
             End If  
             s =  s & AddToolbarItem(n,ProcessThemeWebPath(t & ".gif"), n,20,20)      
            End if    
           Case else
            s =  s & AddToolbarSeparator
          End Select
         end if
        End If    
       End With
      Next
      GetToolbarItems = s
     End function
     
     
     Public function AddToolbarDropDownfromConfig(name,command)
      dim scriptname,cfgfilename,doc,temp,Nodes,objNode,objText,objValue
      dim node,selectednode,optionnodelist,errobj
      dim selectednodes,i,s
      s=""
        
      cfgfilename = Server.MapPath(GetURL("Configuration/Shared/Common.config"))
      
      ' Create an object to hold the XML
      set doc = server.CreateObject("Microsoft.XMLDOM")
      ' For ASP, wait until the XML is all ready before continuing
      doc.async = False
      ' Load the XML file or return an error message and stop the script
      if not Doc.Load(cfgfilename) then
       Response.Write "Failed to load the Configure file.<br>"
       Response.End
      end if
      ' Make sure that the interpreter knows that we are using XPath as our selection language
      doc.setProperty "SelectionLanguage", "XPath"
     
      'set selectednode= doc.selectSingleNode("/toolbars")
      set Nodes = doc.DocumentElement.selectNodes("//dropdowns/"&name&"/*")
      s = s&"<select id="""&ID&name&"""  OnChange=""_Format("&obj_ID&",'"&command&"',this.options[this.selectedIndex].value); this.selectedIndex=0;"" class=""CuteEditorSelect"">"
      s = s&"<option value='"&G_Str(name)&"'>"&G_Str(name)&"</option>"
      For Each objNode in Nodes
       With objNode.Attributes
        set objText = .GetNamedItem("text")
        set objValue = .GetNamedItem("value")
        If not objText is nothing  and not objValue is nothing  then
            dim t
            t = objText.Text
            If InStr(1, t, "[[", 1) > 0 Then
                t = Mid(t,3,len(t)-4)
                t=G_Str(t)       
            End IF
           
         s = s&"<option value='"&objValue.Text&"'>"&t&"</option>"
        End If    
       End With
      Next
      s = s&"</select>"
      AddToolbarDropDownfromConfig = s
     End function
      
     Private Property Get AddToolbarGroupStart
      AddToolbarGroupStart = "<table class=CuteEditorGroupMenu cellSpacing=0 cellPadding=0 border=0><tr><td class=CuteEditorGroupMenuCell><nobr>"
     End Property
     Private Property Get AddToolbarGroupEnd
      AddToolbarGroupEnd = "</nobr></td></tr></table>"
     End Property 
     Private Property Get AddToolbarSeparator
      AddToolbarSeparator = "<img src='"&ProcessThemeWebPath("separator.gif")&"' unselectable='on' class='separator'/>"
     End Property 
     Private Property Get AddToolbarLineBreak
      AddToolbarLineBreak = "<br clear='both'/>"
     End Property 
     Public Function AddToolbarItem(command, imageURL, title,l_width,l_height)
      If lcase(command) = "save" Then
       AddToolbarItem = SaveButton
      Else
       If IsNumeric(l_width) and IsNumeric(l_height) Then 
        dim t
        t=""
        
        If lcase(command) = "tofullpage" Then
         t = "id='cmd_tofullpage'"
        End If   
        
        If lcase(command) = "fromfullpage" Then
         t = "id='cmd_fromfullpage'"   
        End If
        
        AddToolbarItem = "<img "&t&" title="""&G_Str(title)&""" class=""CuteEditorButton"" Command="""&command&""" src='"&imageURL&"' width="&l_width&" height="&l_height&" border=0 />"
       Else
        AddToolbarItem = "<img "&t&" title="""&G_Str(title)&""" class=""CuteEditorButton"" Command="""&command&""" src='"&imageURL&"' border=0 />"
       End If
      End If
     End Function 
     
     
     Public Function AddToolbarDropDown(name,command)
      Dim temp,i,name_array,list_array,name_s,list_s
      temp = ""
      
      Select Case lcase(name)
       case "cssclass":
           name_s=s_cssclassdropdownMenuNames
              list_s=s_cssclassdropdownMenuList
       case "formatblock":
           name_s=s_ParagraphsListMenuNames
              list_s=s_ParagraphsListMenuList
       case "fontname":
           name_s=s_FontFacesList
              list_s=s_FontFacesList
       case "fontsize":
           name_s=s_FontSizesList
              list_s=s_FontSizesList
       case "links":
           name_s=s_linksdropdownMenuNames
              list_s=s_linksdropdownMenuList
       case "codes":
           name_s=s_codesnippetdropdownMenuNames
              list_s=s_codesnippetdropdownMenuList
       case "images":
           name_s=s_imagesdropdownMenuNames
              list_s=s_imagesdropdownMenuList
       case "zoom":
           name_s=s_ZoomsList
              list_s=s_ZoomsList
       Case else
        '
      End Select
      
      if name_s <> "" AND list_s <> "" Then
          name_array = Split(name_s,",")
          list_array = Split(list_s,",")
          if lcase(name)= "links" then
           temp = temp&"<select id="""&ID&name&""" OnChange=""_Format("&obj_ID&",'"&command&"',this.options[this.selectedIndex].value,this.options[this.selectedIndex].text); this.selectedIndex=0;"" class=""CuteEditorSelect"">"
       else
        temp = temp&"<select id="""&ID&name&""" OnChange=""_Format("&obj_ID&",'"&command&"',this.options[this.selectedIndex].value); this.selectedIndex=0;"" class=""CuteEditorSelect"">"
       end if
          temp = temp&"<option value='"&G_Str(name)&"'>"&G_Str(name)&"</option>"
          if IsArray(name_array) and IsArray(list_array) then
           if not IsArrayEmpty(list_array) then
            For i=0 to Ubound(list_array)
             temp = temp&"<option value='"&trim(list_array(i))&"'>"&trim(name_array(i))&"</option>"
            Next
           end if
          end if
          temp = temp&"</select>"  
          AddToolbarDropDown = temp  
         else
          AddToolbarDropDown = AddToolbarDropDownfromConfig(name,command)        
      End If
      
     End Function 
     Private Property Get AddToolbarForeColor
      AddToolbarForeColor = "<div id=""colorbox"" style=""display:none;width:200px;height:120px;overflow:visible;""></div>"
      AddToolbarForeColor = AddToolbarForeColor & "<img id="""&obj_ID&"_forecolorimg"" Command=""ForeColor"" title="""&G_Str("ForeColor")&""" class=""CuteEditorButton"" onclick=""_Format("&obj_ID&",'ForeColor',"&obj_ID&"_forecolorimg.style.backgroundColor)""  src='"&ProcessThemeWebPath("fontcolor.gif")&"' width='17' height='20' border=0 style='BACKGROUND-COLOR: red;' />"
      AddToolbarForeColor = AddToolbarForeColor & "<img id=""Set_forecolorimg"" Command=""SetForeColor"" title="""&G_Str("SetForeColor")&""" class=""CuteEditorButton"" onclick=""SelectColor("&obj_ID&",'"&obj_ID&"_forecolorimg',1);""  src='"&ProcessThemeWebPath("tbdown.gif")&"' width='9' height='20' border='0' />"
     End Property  
     Private Property Get AddToolbarBackColor
      AddToolbarBackColor = AddToolbarBackColor & "<img id="""&obj_ID&"_bkcolorimg"" Command=""BackColor"" title="""&G_Str("BackColor")&""" class=""CuteEditorButton"" onclick=""_Format("&obj_ID&",'BackColor',"&obj_ID&"_bkcolorimg.style.backgroundColor)""  src='"&ProcessThemeWebPath("colorpen.gif")&"' width='17' height='20' border=0 style='BACKGROUND-COLOR: yellow;' />"
      AddToolbarBackColor = AddToolbarBackColor & "<img id=""Set_backcolorimg"" Command=""SetBackColor"" title="""&G_Str("SetBackColor")&""" class=""CuteEditorButton"" onclick=""SelectColor("&obj_ID&",'"&obj_ID&"_bkcolorimg',2);""  src='"&ProcessThemeWebPath("tbdown.gif")&"' width='9' height='20' border='0' />"
     End Property 
      
     '/* version 5.0 */
    End Class
     
    Private Function IsArrayEmpty(varArray)
       Dim lngUBound
       On Error Resume Next
       lngUBound = UBound(varArray)
       If Err.Number <> 0 Then
          IsArrayEmpty = True
       Else
          IsArrayEmpty = False
       End If
    End Function
    %>

    <%
    verify
    session("editorBody")=""
    productid=valid_sql(request.querystring("productid"))
    stage=request.querystring("stage")
    editcomplete=false
     
     
    if not(productid=null and productid="" and not(isnumeric(productid))) then  'מצב עריכה
      'get the relevant products details
     set rsprod=db.execute("SELECT * FROM products WHERE productid = " & productid)
      if rsprod.eof then
       response.redirect("error.asp?msg=" & Server.URLEncode("המוצר אינו נמצא בבסיס הנתונים של החנות"))
      end if
      name=rsprod("name")
      description=rsprod("description")
      session("editorBody")=Replace(description&"",chr(13),"<BR>")
      price=rsprod("price")
      saleprice=rsprod("saleprice")
      image=rsprod("image")
      Files=rsprod("Files")
      catcode=rsprod("catcode")
      'arrcatcode=rsprod("catcode")
      notes=rsprod("notes")
      featured=rsprod("featured")
      productid=rsprod("productid")
      AddToBullets=rsprod("AddToBullets")
      show=rsprod("show")
      relatedprod=rsprod("relatedprod")
      
      p1=rsprod("p1")
      p2=rsprod("p2")
      p3=rsprod("p3")
      v1=rsprod("v1")
      v2=rsprod("v2")
      v3=rsprod("v3")
      
      CatalogNumber=rsprod("CatalogNumber")
      SubName=rsprod("SubName")
      Remarks=rsprod("Remarks")
      Phight=rsprod("Phight")
      Pwidth=rsprod("Pwidth")
      Pdepth=rsprod("Pdepth")
      Pweight=rsprod("Pweight")
      SupplyTime=rsprod("SupplyTime")
      ProdOrder=rsprod("ProdOrder")
      IndexProdOrder=rsprod("IndexProdOrder")
      SalesProdOrder=rsprod("SalesProdOrder")
      SearchWord=rsprod("SearchWord")
      Warranty=rsprod("Warranty")
      CompName=rsprod("CompName")
      GroupSale=rsprod("GroupSale")
      GroupSaleQty=rsprod("GroupSaleQty")
      GroupSaleQty_Show=rsprod("GroupSaleQty_Show")
      GroupSaleLastDate=rsprod("GroupSaleLastDate")
      GroupSaleLastTime=rsprod("GroupSaleLastTime")
      ProfitPercent=rsprod("ProfitPercent")
      Vat=rsprod("Vat")
      CurrencyType=rsprod("CurrencyType")
      
      ProducerId=rsprod("ProducerId")
      DeliveryPrice=rsprod("DeliveryPrice")
      AdminCostPrice=rsprod("AdminCostPrice")
      ProductPayment=rsprod("ProductPayment")
      PaymentTax=rsprod("PaymentTax")
      ShortDesc=rsprod("ShortDesc")
        
      
    end if  'סוף מצב עריכה

    '*******************************************************  מצב מחיקה *********************
    if stage="delete" and productid<>"" then    ' מחיקת כל התמונות של המוצר
    Set fs = CreateObject("Scripting.FileSystemObject")
    if fs.fileexists(server.mappath("../uploadimages/"&rsprod("image"))) then
     fs.deletefile server.mappath("../uploadimages/"&rsprod("image"))
    end if  
    if fs.fileexists(server.mappath("../uploadimages/75/"&rsprod("image"))) then
     fs.deletefile server.mappath("../uploadimages/75/"&rsprod("image"))
    end if  
    if fs.fileexists(server.mappath("../uploadimages/180/"&rsprod("image"))) then
     fs.deletefile server.mappath("../uploadimages/180/"&rsprod("image"))
    end if  
    if fs.fileexists(server.mappath("../uploadimages/40/"&rsprod("image"))) then
     fs.deletefile server.mappath("../uploadimages/40/"&rsprod("image"))
    end if  
        ' נמחוק את כל הקבצים המצורפים
        If len(Files)>2 then
           ArrFiles=split(Files,",")
           For IndexFiles=0 to ubound(arrFiles)
           if fs.fileexists(server.mappath("../UploadProductFiles/"&arrFiles(IndexFiles))) then
           fs.deletefile server.mappath("../UploadProductFiles/"&arrFiles(IndexFiles))
          end if  
           Next
        End if

    '*******************  נמחוק את כל ההזמנות שעוד לא בוצעו שיש להם את המוצר בהזמנה ***********
        set rsbasket=db.execute("SELECT * FROM customers WHERE NOT  basketIds IS NULL  ")
     Do until rsBasket.eof  'לולאה על כל מי שקיימות לו הזמנות שעוד לא בוצעו     
          dbbasket=rsbasket("basketids")&""
           dbbasketqty=rsbasket("basketqty")&""
           arrbasketids=split(dbbasket,",")
           arrbasketqty=split(dbbasketqty,",")
       index=validinbasket(arrbasketids,ProductId)
           If index>=0 then  'נמצא בהזמנה ןלכן נערוך אותו מחדש
             arrbasketids(index)=""
             arrbasketqty(index)=""
             flag=0
             For j=0 to ubound(arrbasketids)   'נבנה מערך חדש ללא רווחים
              If arrbasketids(j)<>"" then   ' אם אין רווח
               If flag=0 then      'אם זה מוצר ראשון נשים ללא פסיק
                arrbasketids1=arrbasketids1&arrbasketids(j)
                arrbasketqty1=arrbasketqty1&arrbasketqty(j)
                flag=1
               Else       'אם זה לא מוצר ראשון נשים פסיק
                arrbasketids1=arrbasketids1&","&arrbasketids(j)
                arrbasketqty1=arrbasketqty1&","&arrbasketqty(j)
               End if      'סוף מוצר ראשון
              End if 
                 'סוף אם זה לא רווח
             Next
         arrbasketids=join(arrbasketids,",")
             arrbasketqty=join(arrbasketqty,",")
             arrbasketids=arrbasketids1    'נחזיר את מערכי העזר למערכים המקוריים
             arrbasketqty=arrbasketqty1
              db.execute("UPDATE customers set basketids='"&arrbasketids&"',basketqty='"&arrbasketqty&"' WHERE custid="&rsbasket("custid"))
       End if 'נמצא בהזמנה
      rsBasket.MoveNext
      Loop
      set rsBasket=nothing 
    '*******************************************************************************************
     
       
     
     db.execute("delete  from products where productid=" & productid)
     editMSG="המוצר נמחק בהצלחה"
     editcomplete=true
    elseif stage="delete" and pruductid="" then
     editMSG="לא נבחר מוצר למחיקה"
     editcomplete=true
    end if   ''סוף מצב מחיקה
     
    if stage="save" then  'מצב שמירה

     productid=request.querystring("productid")
     name=request.form("name")
     description=request.form("description")
     session("editorBody")=description
     price=request.form("price")
     saleprice=request.form("saleprice")
     image=request.form("image")
     Files=request.form("Files")
     catcode=request.form("catcode")
     notes=request.form("notes")
     featured=request.form("featured")
     AddToBullets=request.form("AddToBullets")
     show=request.form("show")
     relatedprod=request.form("relatedprod")
     
     p1=request.form("p1")
     p2=request.form("p2")
     p3=request.form("p3")
     v1=request.form("v1")
     v2=request.form("v2")
     v3=request.form("v3")
     
     CatalogNumber=request.form("CatalogNumber")
     SubName=request.form("SubName")
     Remarks=request.form("Remarks")
     Phight=request.form("Phight")
     Pwidth=request.form("Pwidth")
     Pdepth=request.form("Pdepth")
     Pweight=request.form("Pweight")
     SupplyTime=request.form("SupplyTime")
     ProdOrder=request.form("ProdOrder")
     IndexProdOrder=request.form("IndexProdOrder")
     SalesProdOrder=request.form("SalesProdOrder")
     SearchWord=request.form("SearchWord")
     Warranty=request.form("Warranty")
     CompName=request.form("CompName")
     
     GroupSale=request.form("GroupSale")
     GroupSaleQty=request.form("GroupSaleQty")
     GroupSaleQty_Show=request.form("GroupSaleQty_Show")
     GroupSaleLastDate=request.form("GroupSaleLastDate")
     GroupSaleLastTime=request.form("GroupSaleLastTime")
     ProfitPercent=request.form("ProfitPercent")
     Vat=request.form("Vat")
     CurrencyType=request.form("CurrencyType")
     
     ProducerId=request.form("ProducerId")
     DeliveryPrice=request.form("DeliveryPrice")
     AdminCostPrice=request.form("AdminCostPrice")
     ProductPayment=request.form("ProductPayment")
     PaymentTax=request.form("PaymentTax")
     ShortDesc=request.form("ShortDesc")
      
     'Error check the information passed
     ' If complete then either add a new record or update depending on value of pruductid
     
     If GroupSale="ON" then
      If GroupSaleQty="" or GroupSaleLastDate="" or GroupSaleLastTime="" or not(isnumeric(GroupSaleQty)) then
       msg=msg&"<br>בחרת במוצר כמכירה קבוצתית ולכן עליך למלא את הכמות(ערך מספרי) , תאריך הסיום , ושעת הסיום למכירה"
        End if
        If GroupSaleLastTime<>"" then  'בדיקת פורמט של השעה
          If len(GroupSaleLastTime)<>5 then
           msg=msg&"<br>פורמט שעה אינו מתאים HH:MM "
          Elseif mid(GroupSaleLastTime,3,1)<>":" then
           msg=msg&"<br>פורמט שעה אינו מתאים HH:MM חסר את התו :"
          Else 
           arrTime=split(GroupSaleLastTime,":")
           If isarray(arrTime) then
            If not(isnumeric(arrTime(0))) OR not(isnumeric(arrTime(1))) then
             msg=msg&"<br>פורמט שעה אינו מתאים HH:MM "
            End if 'isnumeric
           Else  'isarray
            msg=msg&"<br>פורמט שעה אינו מתאים HH:MM "
           End if
         End if  ' <>5
          
        End if 'not empty
     End if 'ON
     if name="" or isnull(name) or len(name)>255 then
      msg=msg & "<br>עליך להקליד שם תקף"
     end if
     if description="" or description=null then
      msg=msg & "<br>עליך להקליד תיאור תקף"
     end if
     if len(price&"")>1 then
      If not isnumeric(price) then
       msg=msg & "<br> עליך להקליד מחיר פריט בפורמט מספרי"
      End if
     end if
     
     if saleprice="" or not(isnumeric(saleprice)) then
      msg=msg & "<br>עליך להקליד מחיר בחנות"
     end if
     
     if AdminCostPrice<>"" AND not(isnumeric(AdminCostPrice)) then
      msg=msg & "<br>עליך להקליד מחיר עלות חוקי בלבד"
     end if
     
     if len(price)>0 AND len(saleprice)>0 AND isnumeric(price) AND isnumeric(saleprice) then
      If cdbl(price)>0 then
       If cdbl(price) < cdbl(saleprice) then
        msg=msg & "<br>  עליך להקליד מחיר בחנות קטן ממחיר רגיל או לא לציין מחיר"
       End if
      End if 
     end if
     
     if price="" or isnull(price) then
      price=0
     end if
     if AdminCostPrice="" or isnull(AdminCostPrice) then
      AdminCostPrice=0
     end if

      if len(trim(ProfitPercent))>0 then
       If not isnumeric(ProfitPercent) then
        msg=msg & "<br>יש לציין אחוז רווח חוקי בלבד  "
       Elseif ProfitPercent<0  then
        msg=msg & "<br>יש לציין אחוז רווח חוקי בלבד  "
       End if
      end if

     if len(image)>255 then
      msg=msg & "<br>מסלול התמונה ארוך מדי"
     end if
     if catcode="" then
      msg=msg & "<br>לא נבחרה קטגוריה"
     Else 
      catcode="-"&catcode&"-"
      catcode=replace(catcode , " " ,"")
      catcode=replace(catcode , "," ,"-")
     end if
     
     If relatedProd<>"" Then
      relatedprod="-"&relatedprod&"-"
      relatedprod=replace(relatedprod," ","")
      relatedprod=replace(relatedprod,",","-")
     End if 
     If (p1<>"" AND v1="") OR (p1="" AND v1<>"") Then
      msg=msg & "<br>ציינת מאפיינים נוספים למוצר ועליך להכניס את השורה הראשונה במלואה "
     End if 
     If (p2<>"" AND v2="") OR (p2="" AND v2<>"") Then
      msg=msg & "<br>ציינת מאפיינים נוספים למוצר ועליך להכניס את השורה השנייה במלואה"
     End if 
     If (p3<>"" AND v3="") OR (p3="" AND v3<>"") Then
      msg=msg & "<br>ציינת מאפיינים נוספים למוצר ועליך להכניס את השורה השלישית במלואה"
     End if 
     
     if DeliveryPrice = "" OR NOT isnumeric(DeliveryPrice) then
      msg=msg & "<br>עליך לציין דמי משלוח למוצר"
     End if
     
     
     if msg="" then   'עבר את כל הבדיקות , נכניס לבסיס הנתונים
      set rsProd=server.createObject("ADODB.recordset")
      'Check wether this is an update or insert
      if productid=null or productid="" then
       sql="select * from products where productId=0"
       rsProd.open sql,strconn,3,3
       rsProd.addNew
      else
       sql="select * from products where productId="&productid
             rsProd.open sql,strconn,3,3
       end if
     
      rsProd("name")=name
      rsProd("description")=description
      rsProd("price")=price
      rsProd("saleprice")=saleprice
      'catcode="-"&catcode&"-"
      'catcode=replace(catcode , " " ,"")
      'catcode=replace(catcode , "," ,"-")
      rsProd("catCode")=catCode
      rsProd("featured")=featured
      rsProd("image")=image
      rsProd("Files")=Files
      rsProd("notes")=notes
      rsprod("AddToBullets")=AddToBullets
      rsprod("show")=show
      rsprod("relatedprod")=relatedprod
      
      rsprod("p1")=p1
      rsprod("p2")=p2
      rsprod("p3")=p3
      rsprod("v1")=v1
      rsprod("v2")=v2
      rsprod("v3")=v3
      
      rsprod("GroupSale")=GroupSale
     If GroupSale="ON" then 
      rsprod("GroupSale")=GroupSale
      rsprod("GroupSaleQty")=GroupSaleQty
      rsprod("GroupSaleQty_Show")=GroupSaleQty_Show
      rsprod("GroupSaleLastDate")=GroupSaleLastDate
      rsprod("GroupSaleLastTime")=GroupSaleLastTime
      rsprod("GroupSaleLastDateTime")=GroupSaleLastDate&" "&GroupSaleLastTime&":00"
      rsprod("GroupSaleStatus")=0
     End if
      
      
      rsprod("CatalogNumber")=CatalogNumber
      rsprod("SubName")=SubName
      rsprod("Remarks")=Remarks
      rsprod("Phight")=Phight
      rsprod("Pwidth")=Pwidth
      rsprod("Pdepth")=Pdepth
      rsprod("Pweight")=Pweight
      rsprod("SupplyTime")=SupplyTime
      rsprod("ProdOrder")=ProdOrder
      rsprod("IndexProdOrder")=IndexProdOrder
      rsprod("SalesProdOrder")=SalesProdOrder
      rsprod("SearchWord")=SearchWord
      rsprod("Warranty")=Warranty
      rsprod("CompName")=CompName
      
      
      
          If not(isnumeric(ProfitPercent)) OR len(trim(ProfitPercent))<1 then 'בדיקת אחוז רווח
         ProfitPercent=0
        End if
      rsprod("ProfitPercent")=ProfitPercent
      rsprod("Vat")=Vat
      rsprod("CurrencyType")=CurrencyType
      
      rsprod("ProducerId")=ProducerId
      if isnull(productid) OR productid="" then
        Temp_Product_ID=GetMaxId("products","productid")
        rsprod("ProductId")=GetMaxId("products","productid")
      else
        Temp_Product_ID=productid
      End if 
      rsprod("DeliveryPrice")=DeliveryPrice
      rsprod("AdminCostPrice")=AdminCostPrice
      rsprod("ProductPayment")=ProductPayment
      rsprod("PaymentTax")=PaymentTax
      rsprod("ShortDesc")=ShortDesc
      
      rsProd.update
      
        Temp_SQL="DELETE FROM t_Temp_Group_Show " & _
           " WHERE ProductID = " & Temp_Product_ID
        DB.Execute(Temp_SQL)
      
      If GroupSale="ON" then
      Temp_QQQ=cint(GroupSaleQty_Show)-cint(GroupSaleQty)
     ' Temp_SQL="INSERT INTO t_Temp_Group_Show " & _
        ' "(ProductID, User_Name) " & _
         '"SELECT TOP " & Temp_QQQ & " " & Temp_Product_ID & " AS Expr1, CAST(LEFT(fname, 1) + '. ' + city AS nvarchar) AS Expr2 " & _ 
         '"FROM customers " & _
         '"ORDER BY NEWID() "
        
      Temp_SQL = "INSERT INTO t_Temp_Group_Show " & _
         " (ProductID, User_Name) " & _
         " SELECT TOP " & Temp_QQQ & " " & Temp_Product_ID & " AS Expr1, CAST(ab + '. ' + city AS nvarchar) AS Expr2 " & _
         " FROM tblcity CROSS JOIN " & _
         " tblab " & _
         " ORDER BY NEWID()      "
        
      DB.Execute(Temp_SQL)
      
      end if
        
      
     editMSG="<br>פרטי המוצר נשמרו בהצלחה<br>"
     editMSG=editMSG&"<a class=menu href=product.asp>הוסף מוצר נוסף </a><br>"
      editcomplete=true
     end if
    end if 'stage

    %>
    <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">document.write(CalendarPopup_getStyles());</SCRIPT>
    <script>
    function ShowHideGroupSale()
    {
    if(document.FrmAdd.GroupSale.checked)
     ShowGroupSale.style.display=''
    else
     ShowGroupSale.style.display='none'
    }
    </script>

    <script language="JavaScript" src="editor.js"></script>
    <link rel="StyleSheet" type="text/css" href="editor.css">
    <script language="javascript">
    function tableDialog()
    {
       //----- Creates A Table Dialog And Passes Values To createTable() -----
       var rtNumRows = null;
       var rtNumCols = null;
       var rtTblAlign = null;
       var rtTblWidth = null;
       var rtBorderWidth = null;
       showModalDialog("table.htm",window,"status:false;dialogWidth:16em;dialogHeight:14em");
    }
    function createTable()
    {
       //----- Creates User Defined Tables -----
       frames.message.focus();
       var cursor = frames.message.document.selection.createRange();
       if (rtNumRows == "" || rtNumRows == "0")
       {
          rtNumRows = "1";
       }
       if (rtNumCols == "" || rtNumCols == "0")
       {
          rtNumCols = "1";
       }
       var rttrnum=1
       var rttdnum=1
       var rtNewTable = "<table bordercolor='#c0c0c0' style='border-collapse:collapse' BorDer='"+rtBorderWidth+"' align='" + rtTblAlign + "' cellpadding='0' cellspacing='0' width='" + rtTblWidth + "'>"
       while (rttrnum <= rtNumRows)
       {
          rttrnum=rttrnum+1
          rtNewTable = rtNewTable + "<tr>"
          while (rttdnum <= rtNumCols)
          {
             rtNewTable = rtNewTable + "<td>&nbsp;</td>"
             rttdnum=rttdnum+1
          }
          rttdnum=1
          rtNewTable = rtNewTable + "</tr>"
       }
       rtNewTable = rtNewTable + "</table>"
       frames.message.focus();
       cursor.pasteHTML(rtNewTable);
       message.focus();
    }
    </script>
    <script language="JavaScript">
    <!--
    function newwin() { //v2.0
     ww = open('upload.asp','endwin','width=250,height=250,top=100,left=100,scrollbars=no,status=yes');
     
    }
    //-->
    </script>
    <script language="JavaScript">
    <!--
    function newwinFiles() { //v2.0
     ww = open('uploadFiles.asp','endwin','width=400,height=250,top=100,left=100,scrollbars=yes,status=yes');
     }
    //-->
    </script>
     
    <script language="javascript">
    function FncSubmit(){
    document.FrmAdd.description.value = frames.message.document.body.innerHTML;    
    document.FrmAdd.btnSave.value='...אנא המתן';
    document.FrmAdd.btnSave.disabled=true;
    }
    </script>
          <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
     
            <TR>
              <TD>
                <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                 
                  <TR>
                    <TD vAlign=top width=10>
                                  <!--left-->
               <!--left ends...-->
                    </TD>
                    <TD vAlign=top align=middle>
                    <IMG
                      src="../images/gaps.gif" width="6" height="6"><BR>
                  
                      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                       
                        <TR>
                          <TD width="1%"><IMG height=1
                            src="../images/shim.gif" width=3></TD>
                          <TD width="98%">
                            <TABLE height=12 cellSpacing=0 cellPadding=0
                            width="100%"
                            background="../images/contentarea_topmiddle.gif"
                            border=0>
                             
                              <TR>
                                <TD vAlign=bottom align=right width=11
                                  height=12><IMG height=12
                                  src="../images/contentarea_topleft.gif"
                                  width=12></TD>
                                <TD align=right width="100%" height=12><IMG
                                  height=12
                                  src="../images/contentarea_topright.gif"
                                  width=8></TD></TR></TABLE>
                            <TABLE cellSpacing=0 cellPadding=0 width="100%"
                            bgColor=#ffffff border=0>
                             
                              <TR>
                                <TD align=left width=1
                                background="../images/contentarea_leftmiddle.gif"><IMG
                                  height=1
                                  src="../images/shim.gif"
                                  width=1></TD>
                                <TD align=middle>
                                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
                                    <tr>
                                      <td width="100%">
                                      <!--Main Contennt-->
                  <table width=100% >
            <tr><td align=right width="90%">
     <% if editcomplete then %>
    <font class=red align=right> 
      <%= editmsg %>
    </font>
     <% else %>
     

      <form onSubmit="return FncSubmit(this)" onClick="highlight(event);" action="product.asp?stage=save&productid=<%= productid %>" method=POST name=FrmAdd style="font-family: Arial" dir="rtl">
       <table   cellspacing=0 cellpadding="0" border="0" dir=rtl width="100%" style="border-collapse: collapse" bordercolor="#111111">
       <tr>
       <td width="5%" colspan="2" align="right"  >
        <p>
       </td>
      </center>
       </tr>
          
      <center>
          
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
        <% if productid="" then %>
        <font class=bigtitle>הוספת מוצר חדש</font>
        <br><b>
        <font class=standartFont>
        <% else %>
    <font class=bigtitle>ערוך פרטי מוצר</font>
       <% end if %>
        
                    </font></font>
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b>
       <% if productid<>"" then %>
       <a target="_blank" href="../product.asp?productid=<%=productid %>">
                <img border="0" src="../images/preview.jpg" alt="צפייה בדף המוצר"></a>
                <% Else %>
                &nbsp;
                <% End if %>
                <font class=standartfont> השדות שמסומנים <font color="#FF0000">באדום</font> הם שדות חובה.<br>
                <img border="0" src="../images/info.gif"><font color="#FF0000">לידיעתך</font>!!
                אם אתה משייך מוצר למכירה קבוצתית המחיר בחנות הוא המחיר הסופי (כולל
                מע&quot;מ&nbsp; ובשקלים).</font></td>
       
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%"><b><font class=red><%= msg %><br>
       </font></b></td>
       </tr>

       <tr>
       <td   align=right valign="top" width="5%">&nbsp;
                </td>
       <td   align=right valign="top" width="95%">
                <table border="0" cellpadding="0" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2">
                  <tr>
                    <td>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"> <font color="#FF0000">שם המוצר:</font>&nbsp;</font></b>
       </td>
                    <td width="108">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2">כותרת משנה:</font></b>
       </td>
                    <td>
       <font face="arial" size="1" color="<%= text %>">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2">מק&quot;ט:</font></b></td>
                    <td>
       <font color="#FF0000">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"><span lang="he">מהי</span> </font></b><font face="Arial" size="2" color="<%= text %>"><b>תקופת
       אחריות?</b></font></font></td>
                    <td>
       <b><font color="#FF0000" size="2" face="Arial">של איזה חברה המוצר?</font></b></td>
                  </tr>
                  <tr>
                    <td>
       <font face="arial" size="1" color="<%= text %>">
       <input size=25 name="name" value="<%=replace(name & "","""","&quot;")%>" maxlength=100 class="inputText"></td>
                    <td width="108">
       <input type="text" name="subName" size="20" dir="rtl" value="<%= subName %>" class="inputText"></td>
                    <td>
       <font face="arial" size="1" color="<%= text %>">
       <input type="text" name="catalogNumber" size="10" dir="ltr" value="<%= catalogNumber %>" class="inputText"></td>
                    <td>
       <input type="text" name="Warranty" size="15" dir="rtl" value="<%= Warranty %>" class="inputText"></td>
                    <td>
       <input type="text" name="CompName" size="15" dir="rtl" value="<%= CompName %>" class="inputText"></td>
                  </tr>
                </table>
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;
                </td>
       <td   align=right valign="top" width="95%">
       <font color="<%= COLdark %>">
       &nbsp;</font><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"><font color="#FF0000">תיאור
       <span lang="he">קצר ( עבור זאפ )</span>:</font></font></b></td>
       </tr>

       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <textarea rows="3" name="ShortDesc" cols="45" dir="rtl"><%= ShortDesc %></textarea></td>
       </tr>

       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"><span style="background-color: #FFFF00">הערות,
       לשימוש עודד בלבד:</span></font></b></td>
       </tr>

       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <textarea rows="3" name="Remarks" cols="45" dir="rtl"><%= Remarks %></textarea></td>
       </tr>

       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"><font color="#FF0000">תיאור המוצר:&nbsp;</font></font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%"><font size="2" face="Arial"><BR></font></td>
       <td   align=right valign="top" width="95%">
    <!--Editor Table-->
            
     
      
    <%
        srcURL = srcURL
        Dim editor
                    Set editor = New CuteEditor
                    editor.ID = "Editor1"
                                                   
                                                   
                    editor.Text = srcURL
                    editor.FilesPath = "CuteEditor_Files"
                    editor.EditorBodyStyle = "font:normal 12px arial;"
                    editor.EditorWysiwygModeCss = "asp.css"
                    editor.Draw()
                                                                                                                                                                                                   
                   ' Request.Form(ID) access from other page
    %>
    <% Randomize Timer
      srcURL="messagebody.asp?BlaBla="&CInt(RND * 2000) %>
     
     
     <input type=hidden name=description value="">
              <table border="1" cellspacing="0"  cellpadding="0" style="border-collapse: collapse; font-family:Arial" bordercolor="#111111" width=400>
               <tr>
                <td align=right>
                 <table unselectable="on" id="editor" border="0" cellspacing="0" cellpadding="2" dir="rtl" style="border-collapse: collapse" bordercolor="#111111" width="100%">
              
                  <tr bgcolor=ButtonFace   onmouseout="hover(false)"  onmouseover="hover(true)" >
           <td class="rebar"><nobr><span class="toolbar">
           <img class="spacer" src="EditorImages/spacer.gif" width="2">&nbsp;
                    <img src="EditorImages/icon_paste.gif" align="middle" onClick="FormatText('paste')" style="cursor: hand;" alt="<% = strTxtPaste %>">
                    <img src="EditorImages/icon_copy.gif" align="middle" onClick="FormatText('copy')" style="cursor: hand;" alt="<% = strTxtCopy %>">
                    <img src="EditorImages/icon_cut.gif" align="middle" onClick="FormatText('cut')" style="cursor: hand;" alt="<% = strTxtCut %>" width="20" height="20">
             <img class="spacer" src="EditorImages/spacer.gif" width="2">&nbsp;
                    <img src="EditorImages/icon_italic.gif" width="20" height="20"  align="absmiddle" alt="<% = strTxtItalic %>" onClick="doStyle1();FormatText('italic', '');" style="cursor: hand;">
                    <img src="EditorImages/icon_underline.gif" width="20" height="20" align="absmiddle" alt="<% = strTxtUnderline %>" onClick="doStyle1();FormatText('underline', '');" style="cursor: hand;">
                    <img src="EditorImages/icon_bold.gif" width="20" height="20" align="absmiddle" alt="<% = strTxtBold %>" onClick="doStyle1();FormatText('bold', '');" style="cursor: hand;">
                      <img class="spacer" src="EditorImages/spacer.gif" width="2">
                    <img id=JustifyRight src="EditorImages/icon_right.gif" width="20" height="20" align="absmiddle" onClick="doStyle1();FormatText('JustifyRight', '')" style="cursor: hand;" alt="<% = strTxtRightJustify %>">
                    <img id=JustifyCenter src="EditorImages/icon_center.gif" width="20" height="20" align="absmiddle" border="0" alt="<% = strTxtCentreJustify %>" onClick="doStyle1();FormatText('JustifyCenter', '')" style="cursor: hand;">
                    <img id=JustifyLeft src="EditorImages/icon_left.gif" width="20" height="20" align="absmiddle" onClick="doStyle1();FormatText('JustifyLeft', '')" style="cursor: hand;" alt="<% = strTxtLeftJustify %>">&nbsp;&nbsp;&nbsp;
                    <img id="RTL" src="EditorImages/icon_RTL.gif" align="middle" onClick="doStyle1();FormatText('BlockDirRTL', '')" style="cursor: hand;" alt="<% = strTxtOutdent %>">
                    <img id="LTR" src="EditorImages/icon_LTR.gif" align="middle" border="0" alt="<% = strTxtIndent %>" onClick="doStyle1();FormatText('BlockDirLTR', '')" style="cursor: hand;">&nbsp;
                         <img class="spacer" src="EditorImages/spacer.gif" width="2">
                    <img src="EditorImages/icon_rem_link.gif" align="middle" border="0" alt="הסר קישור" onClick="FormatText('unLink')" style="cursor: hand;">
                    <img src="EditorImages/icon_ins_link.gif" width="20" height="20" align="absmiddle" border="0" alt="<% = strTxtAddHyperlink %>" onClick="FormatText('createLink')" style="cursor: hand;">&nbsp;               
              <img class="spacer" src="EditorImages/spacer.gif" width="2">&nbsp;
    </td>
    </tr>
       <tr bgcolor=ButtonFace onmouseover="hover(true)" onmouseout="hover(false)">
           <td class="rebar"><nobr><span class="toolbar">
          <img class="spacer" src="EditorImages/spacer.gif" width="2">&nbsp;
                    <select hidefocus class="fontselect" name="selectFont" onChange="FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);document.FrmAdd.selectFont.options[selectFont.selectedIndex].selected = true;" dir="ltr" style="width: 150"  >
                 <option selected></option>
        <option id="Arial" value="Arial, Helvetica, sans-serif">Arial,
        Helvetica, sans-serif</option>
        <option id="Times New Roman" value="Times New Roman, Times, serif">
        Times New Roman, Times, serif</option>
        <option id="Courier New" value="Courier New, Courier, mono">
        Courier New, Courier, mono</option>
        <option id="Georgia" value="Georgia, Times New Roman, Times, serif">
        Georgia, Times New Roman, Times, serif</option>
        <option id="Verdana" value="Verdana, Arial, Helvetica, sans-serif">
        Verdana, Arial, Helvetica, sans-serif</option>
        <option id="Geneva" value="Geneva, Arial, Helvetica, sans-serif">
        Geneva, Arial, Helvetica, sans-serif</option>
       </select>
                    <select name="selectSize" onChange="FormatText('fontsize', selectSize.options[selectSize.selectedIndex].value);document.FrmAdd.selectSize.options[selectSize.selectedIndex].selected = true;" dir="ltr" style="width: 40" >
                     <option selected>-- <% = strTxtSize %> --</option>
                     <option value="1">1</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="6">6</option>
                    </select>&nbsp;
                    <a href="BLOCKED SCRIPTopenWin('color.htm','colors','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=500,height=100,top=0,left=0')">
                    <img src="EditorImages/icon_color_text.gif" align="middle" alt="קבע צבע טקסט" border="0"></a>
                    <a href="BLOCKED SCRIPTopenWin('frmUpload.asp','insertImage','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=350,height=250,left=0, top=0')">
                    <img src="EditorImages/icon_ins_image.gif" width="20" height="20" align="absmiddle" border="0" alt="<% = strTxtAddImage %>"  style="cursor: hand;"></a>
                    <a href="BLOCKED SCRIPTopenWin('IE_emoticons_smilies.asp','smilies','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=400,height=400')">
                    <img src="EditorImages/em.icon.smile.gif" width="15" height="15" align="absmiddle" alt="<% = strTxtEmoticonSmilies %>" border="0"></a>
                    <img src="EditorImages/icon_redo.gif" align="middle" onClick="FormatText('Redo', '')" style="cursor: hand;" alt="חזור"><img src="EditorImages/icon_undo.gif" align="middle" onClick="FormatText('Undo', '')" style="cursor: hand;" alt="בטל"></td>
                  </tr>
        </tr>
                 </table>
                </td></tr>
              <tr>
            <td align=center width=100%>
       <iframe src="<%=srcURL%>" id="message" width="100%" height="402" marginwidth="1" marginheight="0" name="message"  border="1" frameborder="1" ></iframe>
            <script language="javascript">
      //Create an iframe and turn on the design mode for it
            frames.message.document.designMode = "On";
            FormatText('BlockDirRTL', '');
                </script>
             &nbsp;</td>
           </tr>         
           <tr>
            <td align="center">
          </td>
           </tr>
         </table>
    <!--End of editor table-->

       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%"><b><font color="#FF0000">
       מידות המוצר, נא למלא ! ! !</font></b><br>
    &nbsp;<table border="0" cellpadding="0" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" id="table1" width="290">
                  <tr>
                    <td align="center" width="75">
       <img border="0" src="../images/hight.gif" width="72" height="24"></td>
                    <td align="center" width="75">
       <img border="0" src="../images/Width.gif" width="72" height="24"></td>
                    <td align="center" width="75">
       <img border="0" src="../images/Depth.gif" width="72" height="24"></td>
                    <td align="center" width="75">
       <img border="0" src="../images/weight.gif" width="72" height="24"></td>
                  </tr>
                  <tr>
                    <td width="75">
       <font face="arial" size="1" color="<%= text %>">
       <input type="text" name="Phight" size="10" dir="rtl" value="<%= Phight %>" class="inputText"></td>
                    <td width="75">
       <input type="text" name="Pwidth" size="10" dir="rtl" value="<%= Pwidth %>" class="inputText"></td>
                    <td width="75">
       <input type="text" name="Pdepth" size="10" dir="rtl" value="<%= Pdepth %>" class="inputText"></td>
                    <td width="75">
       <input type="text" name="Pweight" size="10" dir="rtl" value="<%= Pweight %>" class="inputText"></td>
                  </tr>
                </table>
                </td>
       </tr> 
       <tr>
       <td   align=right valign="top" width="5%"><font size="2" face="Arial"><BR>&nbsp;</font></td>
       <td   align=right valign="top" width="95%">
       <font face="arial" size="1" color="<%= text %>">
       <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#DEDEDE" id="AutoNumber1" height="42">
                  <tr>
                    <td height="16" nowrap>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
           <img border="0" src="../images/arrow.gif"></font></b></font><b><font face="Arial" size="2" color="<%= text %>">מחיר
       מחירון:</font></b></td>
                    <td height="16" nowrap>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
           <img border="0" src="../images/arrow.gif"><font color="#FF0000">מחיר
       בחנות:</font>&nbsp;</font></b></td>
                    <td height="16" nowrap>
                    <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
           <img border="0" src="images/arrow.gif">מחיר עלות</font></b></td>
                    <td height="16" nowrap>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
           <img border="0" src="../images/arrow.gif">מע&quot;מ?</font></b></td>
                    <td height="16" nowrap>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
           <img border="0" src="../images/arrow.gif">סוג מטבע:</font></b></td>
                    <td height="16" nowrap>
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif">אחוז רווח:</font></b></td>
                  </tr>
                  <tr>
                    <td height="18" nowrap>
       <font face="arial" size="1" color="<%= text %>">
       <input size=8 name="price" value="<%= price %>" maxlength=100 class="inputText"></td>
                    <td height="18" nowrap>
       <font face="arial" size="1" color="<%= text %>">
       <input size=8 name="saleprice" value="<%= saleprice %>" maxlength=255 class="inputText"></td>
                    <td height="18" nowrap>
                    <font face="arial" size="1" color="<%= text %>">
                    <input type="text" class="inputtext" name="AdminCostPrice" size="10" dir="ltr" value="<%= AdminCostPrice %>"></td>
                    <td height="18" nowrap>
       <font face="arial" size="1" color="<%= text %>">
                    <select size="1" name="Vat">
                    <option value="1" <% if cstr(vat&"")="1" then response.write "selected" %>>
        כולל</option>
                    <option value="0" <% if cstr(vat&"")="0" then response.write "selected" %>>
        לא כולל</option>
                </select></td>
                    <td height="18" nowrap>
       <select size="1" name="CurrencyType">
                <option value="0" <% if cstr(CurrencyType&"")="0" then response.write "selected" %>><%= CurNis %></option>
                <option value="1" <% if cstr(CurrencyType&"")="1" then response.write "selected" %>><%= CurDollar %></option>
                </select></td>
                    <td height="18" align="left" nowrap>
       <font face="arial" size="1" color="<%= text %>">
                    <span lang="en-us">%</span><input type="text" name="ProfitPercent" size="5" dir="ltr" value="<%= ProfitPercent %>" class="inputText"></td>
                  </tr>
                </table>
       </td>
       </tr> 
     
       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">&nbsp;
                </td>
       </tr>
     
     
     
       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">
                <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#DEDEDE" id="AutoNumber5">
                  <tr>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2" color="#FF0000">מיקום
                המוצר:</font></b></td>
                    <td dir="rtl">&nbsp;
                </td>
                    <td dir="rtl">&nbsp;
                </td>
                    <td dir="rtl">&nbsp;
                </td>
                    <td dir="rtl">&nbsp;
                </td>
                    <td dir="rtl">&nbsp;
                </td>
                    <td dir="rtl">&nbsp;
                </td>
                  </tr>
                  <tr>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><span lang="he"><font face="Arial" size="2">בקטגוריות:</font></span></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><span lang="he"><font face="Arial" size="2">בדף
                הבית:</font></span></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><span lang="he"><font face="Arial" size="2">
                במבצעים:</font></span></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2" color="#FF0000">זמן
                אספקה (מקסימום ימי עסקים):</font></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"> <font color="#FF0000">דמי משלוח</font></font></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"> <font color="#FF0000">מס'
       תשלומים</font></font></b></td>
                    <td dir="rtl">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><font color="#FF0000" size="2" face="Arial">ריבית</font></b></td>
                  </tr>
                  <tr>
                    <td dir="rtl" align="center">
       <select size="1" name="prodOrder">
        <% for iorder=1 to 99 %>
                     <option <% if cstr(iorder&"")=cstr(prodOrder&"") then response.write "selected" %>><%= iorder %></option>
        <% next %>
       </select></td>
                    <td dir="rtl" align="center">
       <select size="1" name="IndexProdOrder">
        <% for iorder=1 to 99 %>
                     <option <% if cstr(iorder&"")=cstr(IndexprodOrder&"") then response.write "selected" %>><%= iorder %></option>
        <% next %>
       </select></td>
                    <td dir="rtl" align="center">
       <select size="1" name="SalesProdOrder">
        <% for iorder=1 to 99 %>
                     <option <% if cstr(iorder&"")=cstr(SalesProdOrder&"") then response.write "selected" %>><%= iorder %></option>
        <% next %>
       </select></td>
                    <td dir="rtl" align="center">
       <select size="1" name="supplyTime">
        <% 
        for iSupply=1 to 30
         StrSelected=""
        if not( productid="" and not(isnumeric(productid))) OR stage="save" then  'מצב עריכה
         If cstr(iSupply&"")=cstr(supplyTime&"") then
          StrSelected=" selected "
         End if
        Else
         If iSupply=7 then
          StrSelected=" selected "
         End if
        End if
        
        %>
                     <option <%= StrSelected %>>
                         <%= iSupply %>
                         </option>
        <% next %>
       </select></td>
                    <td dir="rtl" align="center">
       <font face="arial" size="1" color="<%= text %>">
       <input size=10 name="DeliveryPrice" value="<%= DeliveryPrice %>" maxlength=255 class="inputText" dir="ltr"></td>
                    <td dir="rtl" align="center">
    <select size="1" name="ProductPayment">
        <% 
        iSupply = 1
        for iSupply=1 to 24
        StrSelected=""
        if not( productid="" and not(isnumeric(productid))) OR stage="save" then  'מצב עריכה
         If cstr(iSupply&"")=cstr(ProductPayment&"") then
          StrSelected=" selected "
         End if
        Else
         If ProductPayment=1 then
          StrSelected=" selected "
         End if
        End if
        
        %>
                     <option <%= StrSelected %>>
                         <%= iSupply %>
                         </option>
        <% next %>
       </select>    </td>
                    <td dir="rtl" align="center">
    <select size="1" name="PaymentTax" dir="rtl">
    <option value="0" <% if cstr(PaymentTax) = "0" then response.write " SELECTED "%>>ללא ריבית</option>
    <option value="1"  <% if cstr(PaymentTax) = "1" then response.write " SELECTED "%>>עם ריבית</option>
    </select></td>
                  </tr>
                </table>
                </td>
       </tr>

       

       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">&nbsp;
       </td>
       </tr>

       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif">תמונה:</font></b></td>
       </tr>
       <tr>
       <td  align=right valign="top" width="5%"></td>
       <td align=right valign="top" width="95%">
       <font size="2" face="Arial" id="pic" color=red>
       <%
       if image="" then
       response.write "לא הועלתה תמונה<BR>"
       else
       response.write "<img src='../UploadImages/"&image&"' width=120 ><Br>"
       end if
       %>
       </font>
                <input type=text name=image value="<%=image%>" size="20" dir="ltr" class="inputText">
                <input type=button onclick="newwin()" value="העלאת תמונה" class="OutButtL"  onmouseover="this.className='OnButtL'" onmouseout="this.className='OutButtL'"><br>
       </td>
       </tr>

       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif">העלאת קבצים:
                <span lang="he"><a class="menu" style="cursor:hand" onclick=BLOCKED SCRIPTwindow.FrmAdd.Files.value="">
                [למחיקת
                הקבצים לחץ כאן]</a></span></font></b></td>
       </tr>

       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">
       <input type=text name=Files value="<%=Files%>" size="20" dir="ltr" class="inputText">
                <input type=button onclick="newwinFiles()" value="העלאת קבצים" class="OutButtL"  onmouseover="this.className='OnButtL'" onmouseout="this.className='OutButtL'">
                </td>
       </tr>

       <tr>
       <td  align=right valign="top" width="5%">&nbsp;</td>
       <td align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"><font color="#FF0000">בחר קטגוריה:</font></font></b></td>
       </tr>
       <tr>
       <td  align=right valign="top" width="5%"></td>
       <td align=right valign="top" width="95%">
          <%  
       if request.querystring("productid")<> "" or catcode<>"" then
             createproductcombo "catcode" , catcode
       Else
           createproductcombo "catcode" , "0"
       end if 
       %>
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;
                </td>
       <td   align=right valign="top" width="95%">
       <table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber3">
                  <tr>
                    <td nowrap valign="top">
       <input type="checkbox" name="GroupSale" onclick="ShowHideGroupSale()" value="ON"  <% if lcase(GroupSale)="on" then response.write "checked" %> class="empty"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2"><span lang="he">מכירה קבוצתית?</span></font></b></td>
                 
                 
                  </tr>
                </table>
                </td>
       </tr>
     
     
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       
                     
       <div align="right" id="ShowGroupSale" style="display:'<% if  GroupSale="" OR isnull(GroupSale) then response.write "none" %>'">
                  <table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#DEDEDE" id="AutoNumber4" class="standartfont">
                    <tr>
          <td bgcolor="#CCCCCC" dir="rtl"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font></b>כמות תצוגה:</td>
                      <td dir="rtl"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font></b>כמות במלאי:</td>
                      <td dir="rtl"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font></b>תאריך סיום:</td>
                      <td dir="rtl"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font></b>שעת סיום<span lang="he">
                      (</span>HH:MM<span lang="he">)</span>:</td>
                    </tr>
                    <tr>
                      <td dir="rtl" valign="top"  bgcolor="#CCCCCC">
                     
                            <img border="0" src="../images/inc.gif" onclick="GroupSaleQty_Show.value++" style="cursor:hand">
               <input type="text" name="GroupSaleQty_Show" size="1" dir="ltr" class="InputText" value="<% If GroupSaleQty_Show<>"" then response.write GroupSaleQty_Show else response.write "1"%>">&nbsp;
              <img border="0" src="../images/dec.gif" onclick="if(GroupSaleQty_Show.value>1) GroupSaleQty_Show.value--" style="cursor:hand"> </td>
                      <td dir="rtl" valign="top">
                     
                            <img border="0" src="../images/inc.gif" onclick="GroupSaleQty.value++" style="cursor:hand">
               <input type="text" name="GroupSaleQty" size="1" dir="ltr" class="InputText" value="<% If GroupSaleQty<>"" then response.write GroupSaleQty else response.write "1"%>">&nbsp;
              <img border="0" src="../images/dec.gif" onclick="if(GroupSaleQty.value>1) GroupSaleQty.value--" style="cursor:hand"> </td>
                      <td dir="rtl" valign="top">
           <input type="text" name="GroupSaleLastDate" size="10" dir="ltr" class="inputText" value="<%= GroupSaleLastDate%>">
               
         <SCRIPT LANGUAGE="JavaScript">
          var cal2 = new CalendarPopup();
          cal2.showYearNavigation();
             </SCRIPT>
          <A HREF="#" onClick="cal2.select(document.FrmAdd.GroupSaleLastDate,'anchor2','dd/MM/yyyy'); return false;" NAME="anchor2" ID="anchor2">
          <img src="images/calendar.gif" border=0 align="top">
         </A>
           </td>
                      <td dir="rtl" valign="top">
           <input type="text" name="GroupSaleLastTime" size="10" dir="ltr" class="inputText" value="<%= GroupSaleLastTime%>">&nbsp; </td>
                    </tr>
                  </table>
                </div>
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <font face="arial" size="1" color="<%= text %>">
        <input type="checkbox" name="featured" value="ON" <% if featured="ON" then response.write "checked" %> class="empty"></font><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2">ל<font color="<%= COLdark %>">הציג
                בעמוד הבית?</font></font></b>
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <input type="checkbox" name="addToBullets" value="ON"  <% if AddToBullets="ON" then response.write "checked" %> class="empty"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2">להוסיף למבצעים?</font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <input type="checkbox" name="Show" value="ON"  <% if lcase(show)="on" then response.write "checked" %> class="empty"><b><font color="<%= COLdark %>" size="2" face="Arial"><img border="0" src="../images/arrow.gif"></font><font face="Arial" size="2"><span lang="he">הסתר מוצר?</span></font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">&nbsp;
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><span lang="he"><font face="Arial" size="2">מוצרים נילווים:</font></span></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <select size="6" name="relatedprod" dir="rtl" multiple>
        <% 
        prodId=request.querystring("productid")
        If prodid="" then
         prodid=0
        End if 
        set rsallprod=db.execute("select * from products WHERE productid<>"&prodid&" order by name") 'בחירת מוצרים נילווים
         do until rsallprod.eof
        %>
       <option value="<%=rsallprod("productid")%>" <% if instr(relatedprod,"-"&rsallprod("productid")&"-")>0 then response.write " selected "%>><%= rsallprod("name") %></option>
        <%
        rsallprod.movenext
        loop
        %>
       
       
       </select>
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">&nbsp;
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"><span lang="he">שיוך
                ליצרן:</span></font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
                <select size="5" name="ProducerId" dir="rtl">
                <option value="0">ללא שיוך</option>
                <%
                set rsProducer=db.execute("SELECT Producerid,ProducerName FROM TblProducers ORDER BY producerOrder")
                Do Until rsProducer.eof
                %>
                <option value="<%= rsProducer("ProducerId") %>" <% If cstr(rsProducer("ProducerId")&"")=cstr(ProducerId&"") then response.write " selected " %>><%= rsProducer("ProducerName") %></option>
                <%
                rsProducer.movenext
                loop
                set rsProducer=nothing
                %>
                </select>
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">&nbsp;
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif">מאפיינים נוספים כולל
       תוספות מיוחדות (מופרדות ע&quot;י התו * ):</font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <b><font face="Arial" size="2">לדוגמא: קיים ב:<font color="#FF0000">צבע</font>
                : <font color="#000080">ירוק *15*,כחול *150*,אדום *0*,צהוב *-5*,חום
       *0*</font><font color="#008000"> </font>
                <font color="#FF0000">(חובה
                התו (,) בין המאפיינים)</font></font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl">
       <b><font face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                : קיים ב:<font color="#FF0000">מידה</font> : <font color="#000080">
                38 *25*,40 *0*,42 *45*,44 *-50*</font><font color="#FF0000">
                (חובה התו (,) בין המאפיינים)</font></font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%" dir="rtl" nowrap>
       <% '--------------------------------------------- מאפיינים נוספים  %>
                <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber6">
                  <tr>
                    <td dir="rtl" class="standartfont" align="right" nowrap>1.קיים ב:</td>
                    <td dir="rtl" class="standartfont" align="right" nowrap>
                    <input class="Inputtext" name="p1" size="10" dir="rtl" value="<%= p1 %>">
                    : </td>
                    <td dir="rtl" class="standartfont" align="right" nowrap>
                    <input class="Inputtext" name="v1" size="50" dir="rtl" value="<%= v1 %>"></td>
                  </tr>
                </table>
                <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber6">
                  <tr>
                    <td dir="rtl" class="standartfont" align="right">2.קיים ב:</td>
                    <td dir="rtl" class="standartfont" align="right">
                    <input class="Inputtext" name="p2" size="10" dir="rtl" value="<%= p2 %>">
                    : </td>
                    <td dir="rtl" class="standartfont" align="right">
                    <input class="Inputtext" name="v2" size="50" dir="rtl" value="<%= v2 %>"></td>
                  </tr>
                </table>
                <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber6">
                  <tr>
                    <td dir="rtl" class="standartfont" align="right">3.קיים ב:</td>
                    <td dir="rtl" class="standartfont" align="right">
                    <input class="Inputtext" name="p3" size="10" dir="rtl" value="<%= p3 %>">
                    : </td>
                    <td dir="rtl" class="standartfont" align="right">
                    <input class="Inputtext" name="v3" size="50" dir="rtl" value="<%= v3 %>"></td>
                  </tr>
                </table>
                <% '-------------------------------------------- סוף מאפיינים נוספים  %>
               
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">&nbsp;
                </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
                <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif"></font><span lang="he"><font face="Arial" size="2">מילות חיפוש נוספות עבור
                המוצר (מופרדות ע&quot;י פסיק בין מילה למילה)</font></span></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <input type="text" name="SearchWord" size="40" dir="rtl" value="<%= SearchWord %>" class="inputText"></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">&nbsp;
       </td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%">&nbsp;</td>
       <td   align=right valign="top" width="95%">
       <b>
       <font color="<%= COLdark %>" size="2" face="Arial">
       <img border="0" src="../images/arrow.gif">הערות:&nbsp;&nbsp;</font></b></td>
       </tr>
       <tr>
       <td   align=right valign="top" width="5%"><font size="2" face="Arial"><BR></font></td>
       <td   align=right valign="top" width="95%">
       <font face="arial" size="1" color="<%= text %>">
       <textarea name="notes" rows=6 cols=50><%=notes%></textarea>
                </font>
       </td>
       </tr>
       </table>
       <br>
       <center>
       <% if productid<>"" then %>
                <input type=button onclick="BLOCKED SCRIPTverifydel('product.asp?stage=delete&productid=<%= productid %>')" value="מחיקת מוצר" class="OutButtL"  onmouseover="this.className='OnButtL'" onmouseout="this.className='OutButtL'">
       <% end if %>
       <input type=submit  alt="Save" name="btnSave" value="שמור שינויים" border=0 class="OutButtL"  onmouseover="this.className='OnButtL'" onmouseout="this.className='OutButtL'">
     
       
                </form>
     <% end if %>
        </center>
        </center>
     </td>

    </tr>
    </table>
                                        <!--Main Contennt Ends...-->
                                      </td>
                                    </tr>
                                  </table>
                                  <p><BR></TD>
                                <TD align=right width=1
                                background="../images/contentarea_rightmiddle.gif"><IMG
                                  height=1
                                  src="../images/shim.gif"
                                  width=1></TD></TR></TABLE>
                            <TABLE height=1 cellSpacing=0 cellPadding=0 width="100%"
                            bgColor=#C7D9E4 border=0>
                             
                              <TR>
                                <TD vAlign=bottom align=right colSpan=2
                                  height=1><IMG height=1
                                  src="../images/shim.gif"
                                  width=1></TD></TR></TABLE>
                            </TD>
                          <TD width="1%"><IMG height=1
                            src="../images/shim.gif"
                        width=3></TD></TR></TABLE>
                    
                    </TD>
                    <TD vAlign=top align=right width=150>
                    <!--#include file=right.asp-->
                    </TD></TR>
                    </TABLE>
    </BODY>
    </HTML>
     
     
     
    i would be greatfull if you yould help me.
     
    thanks,
     
    O.B
  •  01-19-2007, 11:57 AM 25951 in reply to 25950

    Re: DataBase relation

    I see what's happening here... You're putting the URL of the file you want to edit into the editor rather than the CODE for the page.  This is why it works when you create an <iframe> with it, because the <iframe> is calling the page using the URL.  editor.Text will not take a URL and edit the code from it.  editor.Text wants the code itself.  You'll have to pull the CODE from your database and use editor.Text = <%=variable_with_code_in_it %>
     
    Good luck,
     
    Max
  •  01-21-2007, 9:45 AM 25976 in reply to 25951

    Re: DataBase relation

    Hi Max.
    thanks for the quick replay !
     
    i know that i need to use editor.Text = <%=variable_with_code_in_it %>
     
    the only problem is that this all function is in <% %>
    so if i will use for example
     
    <%
    srcURL = srcURL

                                                    Dim editor

                                                    Set editor = New CuteEditor

                                                    editor.ID = "Editor1"

                                                   

                                                   

                                        editor.Text = <%=variable_with_code_in_it %>

                                        editor.FilesPath = "CuteEditor_Files"

                                                    editor.EditorBodyStyle = "font:normal 12px arial;"

                                                    editor.EditorWysiwygModeCss = "asp.css"

                                                    editor.Draw()

                                                                                                                                                                                                   

                                                    ' Request.Form(ID) access from other page

                                    %>
     
    i will recieve a syntax error.
     
    any ideas ?
     
    thanks,
     
    O.B
  •  01-22-2007, 8:13 AM 25994 in reply to 25976

    Re: DataBase relation

    O.B,
     
       I understand this.  This is not the issue.  There are two problems in your code that are causing issues.  One is that you give the variable srcURL a value AFTER you try to use that variable in your editor.  You are doing this:
     
    <%
     
       Dim editor
       ...
       editor.Text = srcURL
     
    %>
     
    <% srcURL = ... %>
     
    When you need to be doing this:
     
    <% srcURL = ... %>
     
    <%
     
       Dim editor
       ...
       editor.Text = srcURL
     
    %>
     
    The second is that you are giving srcURL a value like:
     
    messagebody.asp?blabla=1462
     
    rather than the actual code to that page which would be something like:
     
    <html>
    ...
    </html>
     
    Hope this answers your questions.
     
    Thanks,
     
    Max
     
View as RSS news feed in XML