' ******************************************************************** ' VBScript file, TXWords for IE ' (C) 2004 by The Imaging Source Europe GmbH ' ******************************************************************** Dim dirtyFlag, openDocument, openDocumentFormat Dim menuVisible, menuFirstClick DINA4_X = 11906 DINA4_Y = 16837 DINA5_X = 8418 DINA5_Y = 11906 B5_X = 9978 B5_Y = 14174 USLET_X = 12240 USLET_Y = 15840 USLEGAL_X = 12240 USLEGAL_Y = 20160 FILE_FORMATS = "Rich Text Format (*.rtf)|*.rtf|Microsoft Word (*.doc)|*.doc|TX Text Control Internal Format (*.tx)|*.tx|" & _ "Hypertext Markup Language (*.html)|*.html|Hypertext Markup Language (*.htm)|*.htm|ANSI Text Documents (*.txt)|*.txt|" EXPORT_FORMATS = "Cascading Style Sheet (*.css)|*.css|Adobe PDF (*.pdf)|*.pdf|" ' ******************************************************************** ' IE status bar functions ' ******************************************************************** Sub display_text(text) window.status = text End Sub Sub clear_text() window.status = "" End Sub ' ******************************************************************** ' dialog functions ' ******************************************************************** Sub dialog_table_insert() If document.all.rows.value <> "" AND document.all.cols.value <> "" Then window.opener.parent.objTX.TableInsert document.all.rows.value, document.all.cols.value, -1 End If window.close() End Sub Sub dialog_page_setup_fill() document.all.left.value = window.opener.parent.objTX.PageMarginL document.all.right.value = window.opener.parent.objTX.PageMarginR document.all.top.value= window.opener.parent.objTX.PageMarginT document.all.bottom.value= window.opener.parent.objTX.PageMarginB if window.opener.parent.objTX.PageWidth = DINA4_X AND window.opener.parent.objTX.PageHeight = DINA4_Y then document.all.size.value = 1 end if if window.opener.parent.objTX.PageWidth = DINA5_X AND window.opener.parent.objTX.PageHeight = DINA5_Y then document.all.size.value = 2 end if if window.opener.parent.objTX.PageWidth = B5_X AND window.opener.parent.objTX.PageHeight = B5_Y then document.all.size.value = 3 end if if window.opener.parent.objTX.PageWidth = USLET_X AND window.opener.parent.objTX.PageHeight = USLET_Y then document.all.size.value = 4 end if if window.opener.parent.objTX.PageWidth = USLEGAL_X AND window.opener.parent.objTX.PageHeight = USLEGAL_Y then document.all.size.value = 5 end if End Sub Sub dialog_page_setup() if document.all.size.value = 1 then window.opener.parent.objTX.PageWidth = DINA4_X window.opener.parent.objTX.PageHeight = DINA4_Y end if if document.all.size.value = 2 then window.opener.parent.objTX.PageWidth = DINA5_X window.opener.parent.objTX.PageHeight = DINA5_Y end if if document.all.size.value = 3 then window.opener.parent.objTX.PageWidth = B5_X window.opener.parent.objTX.PageHeight = B5_Y end if if document.all.size.value = 4 then window.opener.parent.objTX.PageWidth = USLET_X window.opener.parent.objTX.PageHeight = USLET_Y end if if document.all.size.value = 5 then window.opener.parent.objTX.PageWidth = USLEGAL_X window.opener.parent.objTX.PageHeight = USLEGAL_Y end if if document.formatform.format(1).checked then width = window.opener.parent.objTX.PageWidth height = window.opener.parent.objTX.PageHeight window.opener.parent.objTX.PageWidth = height window.opener.parent.objTX.PageHeight = width end if window.opener.parent.objTX.PageMarginL = document.all.left.value window.opener.parent.objTX.PageMarginR = document.all.right.value window.opener.parent.objTX.PageMarginT = document.all.top.value window.opener.parent.objTX.PageMarginB = document.all.bottom.value window.close() End Sub ' ******************************************************************** ' functions for file menu ' ******************************************************************** Sub mnu_menu_file_new() window.open "document.html", "document","width=800,height=600,left=0,top=0,scrollbars=no,resizable=yes" End Sub Sub mnu_menu_file_open() On Error Resume Next ' Create an "Open File" dialog box objComDlg.Filter = FILE_FORMATS objComDlg.DialogTitle = "Open" objComDlg.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowOpen If Err Then Exit Sub ' Pass the filename to the text control If UCase(Right(objComDlg.filename, 3)) = ".TX" Then selectedFormat = 3 ElseIf UCase(Right(objComDlg.filename, 3)) = "RTF" Then selectedFormat = 5 ElseIf UCase(Right(objComDlg.filename, 3)) = "HTM" Or UCase(Right(objComDlg.filename, 4)) = "HTML" Then selectedFormat = 4 ElseIf UCase(Right(objComDlg.filename, 3)) = "DOC" Then selectedFormat = 9 Else selectedFormat = 1 End If objTX.LoadSaveAttribute(txLoadImages) = True objTX.Load objComDlg.filename, 0, selectedFormat, False If objTX.LoadSaveAttribute(0) > 0 Then objTX.PageWidth = objTX.LoadSaveAttribute(0) If objTX.LoadSaveAttribute(1) > 0 Then objTX.PageHeight = objTX.LoadSaveAttribute(1) If objTX.LoadSaveAttribute(2) > 0 Then objTX.PageMarginL = objTX.LoadSaveAttribute(2) If objTX.LoadSaveAttribute(3) > 0 Then objTX.PageMarginT = objTX.LoadSaveAttribute(3) If objTX.LoadSaveAttribute(4) > 0 Then objTX.PageMarginR = objTX.LoadSaveAttribute(4) If objTX.LoadSaveAttribute(5) > 0 Then objTX.PageMarginB = objTX.LoadSaveAttribute(5) openDocument = objComDlg.filename openDocumentFormat = selectedFormat document.title = "TXWords for IE - " + openDocument display_text("File loaded successfully") End Sub Sub mnu_menu_file_save() If openDocument = "" Then mnu_menu_file_saveas() Else If dirtyFlag = True Then objTX.LoadSaveAttribute(0) = objTX.PageWidth objTX.LoadSaveAttribute(1) = objTX.PageHeight objTX.LoadSaveAttribute(2) = objTX.PageMarginL objTX.LoadSaveAttribute(3) = objTX.PageMarginT objTX.LoadSaveAttribute(4) = objTX.PageMarginR objTX.LoadSaveAttribute(5) = objTX.PageMarginB objTX.Save openDocument, 0, openDocumentFormat, False End If display_text("File saved successfully") End If End Sub Sub mnu_menu_file_saveas() On Error Resume Next ' Create an "SaveAs" dialog box objComDlg.Filter = FILE_FORMATS objComDlg.DialogTitle = "Save As " objComDlg.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowSave If Err Then Exit Sub ' Pass the filename to the text control If UCase(Right(objComDlg.filename, 3)) = ".TX" Then selectedFormat = 3 ElseIf UCase(Right(objComDlg.filename, 3)) = "RTF" Then selectedFormat = 5 ElseIf UCase(Right(objComDlg.filename, 3)) = "HTM" Or UCase(Right(objComDlg.filename, 4)) = "HTML" Then selectedFormat = 4 ElseIf UCase(Right(objComDlg.filename, 3)) = "DOC" Then selectedFormat = 9 Else selectedFormat = 1 End If window.status = "Saving file..." objTX.LoadSaveAttribute(0) = objTX.PageWidth objTX.LoadSaveAttribute(1) = objTX.PageHeight objTX.LoadSaveAttribute(2) = objTX.PageMarginL objTX.LoadSaveAttribute(3) = objTX.PageMarginT objTX.LoadSaveAttribute(4) = objTX.PageMarginR objTX.LoadSaveAttribute(5) = objTX.PageMarginB objTX.Save objComDlg.filename, 0, selectedFormat, False openDocument = objComDlg.filename openDocumentFormat = selectedFormat display_text("File saved successfully") document.title = "TXWords for IE - " + openDocument End Sub Sub mnu_menu_file_export() On Error Resume Next ' Create an "SaveAs" dialog box objComDlg.Filter = EXPORT_FORMATS objComDlg.DialogTitle = "Export As " objComDlg.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowSave If Err Then Exit Sub ' Pass the filename to the text control If UCase(Right(objComDlg.filename, 3)) = "PDF" Then selectedFormat = 12 ElseIf UCase(Right(objComDlg.filename, 3)) = "CSS" Then selectedFormat = 11 Else selectedFormat = 1 End If objTX.LoadSaveAttribute(0) = objTX.PageWidth objTX.LoadSaveAttribute(1) = objTX.PageHeight objTX.LoadSaveAttribute(2) = objTX.PageMarginL objTX.LoadSaveAttribute(3) = objTX.PageMarginT objTX.LoadSaveAttribute(4) = objTX.PageMarginR objTX.LoadSaveAttribute(5) = objTX.PageMarginB objTX.Save objComDlg.filename, 0, selectedFormat, False display_text("File exported successfully") End Sub Sub mnu_menu_file_pagesetup() wnd = window.open("pagesetup_dialog.html", "page", "width=320,height=175,left=300,top=300,scrollbars=no,resizable=no,dependent=yes") End Sub Sub mnu_menu_file_print() On Error Resume Next objComDlg.Copies = 1 objComDlg.FromPage = 1 objComDlg.ToPage = objTX.CurrentPages objComDlg.Min = 1 objComDlg.Max = objTX.CurrentPages objComDlg.Flags = cdlPDHidePrintToFile Or cdlPDNoSelection objComDlg.CancelError = True printerDialog = objComDlg.ShowPrinter If Err Then Exit Sub ' Print selected pages objTX.PrintDoc "TXWords", objComDlg.FromPage, objComDlg.ToPage, objComDlg.Copies display_text("File printed successfully") End Sub Sub mnu_menu_file_exit() If dirtyFlag = True Then msg_string = "Save changes" If openDocument = "" Then msg_string = msg_string + "?" Else msg_string = msg_string + " in " + openDocument + "?" End If action = Msgbox(msg_string, vbYesNoCancel, "TXWords for IE") If action = 6 Then mnu_menu_file_save() window.close End If If action = 7 Then window.close End If If action = 2 Then Exit Sub End If Else window.close End If End Sub ' ******************************************************************** ' functions for edit menu ' ******************************************************************** Sub mnu_menu_edit_paste() objTX.Focus objTX.Clip 3 End Sub Sub mnu_menu_edit_copy() objTX.Focus objTX.Clip 2 End Sub Sub mnu_menu_edit_cut() objTX.Focus objTX.Clip 1 End Sub Sub mnu_menu_edit_redo() objTX.Redo End Sub Sub mnu_menu_edit_undo() objTX.Undo End Sub Sub mnu_menu_edit_selectall() objTX.SelStart = 0 objTX.SelLength = Len(objTX.Text) objTX.Focus End Sub Sub mnu_menu_edit_delete() objTX.SelText = "" End Sub Sub mnu_menu_edit_find() objTX.FindReplace 1 End Sub Sub mnu_menu_edit_replace() objTX.FindReplace 2 End Sub ' ******************************************************************** ' functions for view menu ' ******************************************************************** Sub mnu_menu_view_header() objTX.HeaderFooter = 5 objTX.HeaderFooterActivate 1 End Sub Sub mnu_menu_view_page() objTX.ViewMode = 2 End Sub Sub mnu_menu_view_normal() objTX.ViewMode = 0 End Sub ' ******************************************************************** ' functions for insert menu ' ******************************************************************** Sub mnu_menu_insert_imagecharacter() On Error Resume Next objComDlg.DialogTitle = "Insert Image" objComDlg.FileName = "" objComDlg.Filter = objTX.ImageFilters objComDlg.FilterIndex = 1 objComDlg.Flags = cdlOFNPathMustExist Or cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowOpen If Err Then Exit Sub objTX.ObjectInsertAsChar 0, objComDlg.FileName, -1, 100, 100, 0, 1 End Sub Sub mnu_menu_insert_image() On Error Resume Next objComDlg.DialogTitle = "Insert Image" objComDlg.FileName = "" objComDlg.Filter = objTX.ImageFilters objComDlg.FilterIndex = 1 objComDlg.Flags = cdlOFNPathMustExist Or cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowOpen If Err Then Exit Sub objTX.ObjectInsertFixed 0, objComDlg.FileName, 1000, 1000 + objTX.ScrollPosY, 100, 100, 0, 1, 3, 2, 0, 0, 0, 0 End Sub Sub mnu_menu_insert_file() On Error Resume Next ' Create an "Insert File" dialog box objComDlg.Filter = FILE_FORMATS objComDlg.DialogTitle = "File" objComDlg.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly objComDlg.CancelError = True objComDlg.ShowOpen If Err Then Exit Sub ' Pass the filename to the text control If UCase(Right(objComDlg.filename, 3)) = "TX" Then selectedFormat = 3 ElseIf UCase(Right(objComDlg.filename, 3)) = "RTF" Then selectedFormat = 5 ElseIf UCase(Right(objComDlg.filename, 3)) = "HTM" Or UCase(Right(objComDlg.filename, 4)) = "HTML" Then selectedFormat = 4 ElseIf UCase(Right(objComDlg.filename, 3)) = "DOC" Then selectedFormat = 9 Else selectedFormat = 1 End If objTX.Load objComDlg.filename, 0, selectedFormat, True End Sub Sub mnu_menu_insert_pagebreak() objTX.SelText = chr(12) End Sub ' ******************************************************************** ' functions for format menu ' ******************************************************************** Sub mnu_menu_format_character() objTX.FontDialog End Sub Sub mnu_menu_format_paragraph() objTX.ParagraphDialog End Sub Sub mnu_menu_format_styles() objTX.StyleDialog End Sub Sub mnu_menu_format_list() objTX.ListAttrDialog End Sub Sub mnu_menu_format_tabs() objTX.TabDialog End Sub Sub mnu_menu_format_textcolor() objComDlg.ShowColor If Err Then Exit Sub objTX.ForeColor = objComDlg.Color End Sub Sub mnu_menu_format_backcolor() objComDlg.ShowColor If Err Then Exit Sub objTX.TextBkColor = objComDlg.Color End Sub ' ******************************************************************** ' functions for table menu ' ******************************************************************** Sub SelectTable() With objTX .SelStart = .TableCellStart(.TableAtInputPos, 1, 1) - 1 .SelLength = .TableCellStart(.TableAtInputPos, .TableRows(.TableAtInputPos), .TableColumns(.TableAtInputPos)) + _ .TableCellLength(.TableAtInputPos, .TableRows(.TableAtInputPos), .TableColumns(.TableAtInputPos)) + _ -.SelStart End With End Sub Sub mnu_menu_table_delete() If objTX.TableAtInputPos <> 0 then SelectTable() objTX.TableDeleteLines End If End Sub Sub mnu_menu_table_delete_row() If objTX.TableAtInputPos <> 0 then objTX.TableDeleteLines End If End Sub Sub mnu_menu_table_delete_col() If objTX.TableAtInputPos <> 0 then objTX.TableDeleteColumn End If End Sub Sub mnu_menu_table_split_below() objTX.TableSplit 2 End Sub Sub mnu_menu_table_split_above() objTX.TableSplit 1 End Sub Sub mnu_menu_table_insert() wnd = window.open("dialog_table_insert.html", "page", "width=200,height=40,left=300,top=300,scrollbars=no,resizable=no,dependent=yes") End Sub Sub mnu_menu_table_grid() objTX.TableGridLines = not objTX.TableGridLines If objTX.TableGridLines = True Then menu_table_grid_checked.style.display = display Else menu_table_grid_checked.style.display = "none" End If End Sub Sub mnu_menu_table_properties() objTX.TableAttrDialog End Sub ' ******************************************************************** ' functions for help menu ' ******************************************************************** Sub mnu_menu_help_about() Dim str str = "TXWords for Internet Expoler, Copyright (C) 2004 by The Imaging Source Europe GmbH" + VBCrLf + "This sample does not include all features from the offline version of TXWords." str = str + " To learn more about other sophisticated word processing features, please download the trial version of TX Text Control and refer to the TXWords sample." + VBCrLF + VBCrLf str = str + " If you have questions about this sample or TX Text Control, please contact the Support Department at: support@textcontrol.com." msgbox str, VBOKOnly, "About TXWords for Internet Explorer" End Sub Sub mnu_menu_help_bookmark() window.external.AddFavorite "http://textcontrol.dbs.de/applications/wwwwp/", "TX Words for Internet Explorer" End Sub ' ******************************************************************** ' onLoad and connection of controls ' ******************************************************************** Sub Load() objTX.ButtonBarHandle = objBB.hWnd objTX.RulerHandle = objRB.hWnd objTX.StatusBarHandle = objSB.hWnd objSB.PageMode = 0 objSB.FontName = "Arial" objSB.FontSize = 8 objSB.PageMode = 1 setSize() menuVisible = False menuFirstClick = False objTX.LoadFromMemory start_doc,5,False dirtyFlag = True document.title = "TXWords for IE - [untitled]" display_text("Sample document loaded successfully from memory") objTX.HideSelection = False objTX.Focus() End Sub Sub objTX_Change() dirtyFlag = True End Sub Sub objTX_ConnectTools() objTX.ButtonBarHandle = objBB.hWnd objTX.RulerHandle = objRB.hWnd objTX.StatusBarHandle = objSB.hWnd End Sub Sub setSize() objTX.width = document.body.offsetWidth - 5 objBB.width = document.body.offsetWidth - 5 objRB.width = document.body.offsetWidth - 5 objSB.width = document.body.offsetWidth - 5 objTX.height = document.body.offsetHeight - objBB.height - objSB.height - objRB.height - 60 End Sub ' ******************************************************************** ' DHTML menu and shortcut button bar ' ******************************************************************** Sub resetCover() document.all.cover.style.left = "0" document.all.cover.style.height = "0" document.all.cover.style.width = "0" document.all.cover.style.display = none End Sub Sub menuGray() If (objTX.CanUndo = 0) Then document.all.menu_edit_undo.style.color = "#C2C2C2" End If If (objTX.CanRedo = 0) Then document.all.menu_edit_redo.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_properties.style.color = "#C2C2C2" End If If (objTX.ViewMode = 0) Then document.all.menu_view_normal.style.color = "#C2C2C2" End If If (objTX.ViewMode = 2) Then document.all.menu_view_page.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_delete.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_delete_row.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_delete_col.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_split_above.style.color = "#C2C2C2" End If If (objTX.TableAtInputPos = 0) Then document.all.menu_table_split_below.style.color = "#C2C2C2" End If End Sub Sub menuReset() document.all.menu_edit_undo.style.color = "#000000" document.all.menu_edit_redo.style.color = "#000000" document.all.menu_table_properties.style.color = "#000000" document.all.menu_view_normal.style.color = "#000000" document.all.menu_view_page.style.color = "#000000" document.all.menu_table_delete.style.color = "#000000" document.all.menu_table_delete_row.style.color = "#000000" document.all.menu_table_delete_col.style.color = "#000000" document.all.menu_table_split_above.style.color = "#000000" document.all.menu_table_split_below.style.color = "#000000" End Sub Sub show_menu(id) menuVisible = True menuGray() menu_select(id) 'MsgBox("show") End Sub Sub hide_menu() If (menuVisible) Then menuFirstClick = Not menuFirstClick End If If (menuFirstClick = False) Then clear_menu() menuReset() menuVisible = False End If 'MsgBox("hide") End Sub Sub menu_deselect() If (menuVisible = False) Then document.all.menu1.style.backgroundColor= "#D4D0C8" document.all.menu2.style.backgroundColor= "#D4D0C8" document.all.menu3.style.backgroundColor= "#D4D0C8" document.all.menu4.style.backgroundColor= "#D4D0C8" document.all.menu5.style.backgroundColor= "#D4D0C8" document.all.menu6.style.backgroundColor= "#D4D0C8" document.all.menu7.style.backgroundColor= "#D4D0C8" End If End Sub Sub menu_select(id) If (menuVisible = False) Then select case id case 1 document.all.menu1.style.backgroundColor= "#ADB6CD" case 2 document.all.menu2.style.backgroundColor= "#ADB6CD" case 3 document.all.menu3.style.backgroundColor= "#ADB6CD" case 4 document.all.menu4.style.backgroundColor= "#ADB6CD" case 5 document.all.menu5.style.backgroundColor= "#ADB6CD" case 6 document.all.menu6.style.backgroundColor= "#ADB6CD" case 7 document.all.menu7.style.backgroundColor= "#ADB6CD" end select Exit Sub End If clear_menu() Dim obj menuGray() select case id case 1 document.all.cover.style.left = "8" document.all.cover.style.height = "168" document.all.cover.style.width = "130" Set obj = menu1 menu_file.style.left = 8 case 2 document.all.cover.style.left = "38" document.all.cover.style.height = "192" document.all.cover.style.width = "160" Set obj = menu2 menu_edit.style.left = 38 case 3 document.all.cover.style.left = "70" document.all.cover.style.height = "60" document.all.cover.style.width = "160" Set obj = menu3 menu_view.style.left = 70 case 4 document.all.cover.style.left = "107" document.all.cover.style.height = "80" document.all.cover.style.width = "160" Set obj = menu4 menu_insert.style.left = 107 case 5 document.all.cover.style.left = "147" document.all.cover.style.height = "136" document.all.cover.style.width = "160" Set obj = menu5 menu_format.style.left = 147 case 6 document.all.cover.style.left = "193" document.all.cover.style.height = "156" document.all.cover.style.width = "130" Set obj = menu6 menu_table.style.left = 193 case 7 document.all.cover.style.left = "234" document.all.cover.style.height = "44" document.all.cover.style.width = "130" Set obj = menu7 menu_help.style.left = 234 end select document.all.cover.style.display = display obj.style.backgroundColor= "#ADB6CD" obj.style.borderTopWidth = "1" obj.style.borderTopStyle = "solid" obj.style.borderTopColor = "#0A246A" obj.style.borderBottomWidth = "1" obj.style.borderBottomStyle = "solid" obj.style.borderBottomColor = "#0A246A" obj.style.borderLeftWidth = "1" obj.style.borderLeftStyle = "solid" obj.style.borderLeftColor = "#0A246A" obj.style.borderRightWidth = "1" obj.style.borderRightStyle = "solid" obj.style.borderRightColor = "#0A246A" End Sub Sub clear_menu() resetCover() menuReset() Dim obj menu_file.style.left = -1000 menu_edit.style.left = -1000 menu_view.style.left = -1000 menu_insert.style.left = -1000 menu_format.style.left = -1000 menu_table.style.left = -1000 menu_help.style.left = -1000 for i = 1 to 7 select case i case 1 Set obj = menu1 case 2 Set obj = menu2 case 3 Set obj = menu3 case 4 Set obj = menu4 case 5 Set obj = menu5 case 6 Set obj = menu6 case 7 Set obj = menu7 end select obj.style.backgroundColor= "#D4D0C8" obj.style.borderTopWidth = "1" obj.style.borderTopStyle = "solid" obj.style.borderTopColor = "#D4D0C8" obj.style.borderBottomWidth = "1" obj.style.borderBottomStyle = "solid" obj.style.borderBottomColor = "#D4D0C8" obj.style.borderLeftWidth = "1" obj.style.borderLeftStyle = "solid" obj.style.borderLeftColor = "#D4D0C8" obj.style.borderRightWidth = "1" obj.style.borderRightStyle = "solid" obj.style.borderRightColor = "#D4D0C8" next menuGray() End Sub Sub menu_select_item(id) id.style.backgroundColor = "#ADB6CD" End Sub Sub menu_deselect_item(id) id.style.backgroundColor = "#FFFFFF" End Sub Sub bar_select(id) id.style.backgroundColor = "#ADB6CD" id.style.borderTopWidth = "1" id.style.borderTopStyle = "solid" id.style.borderTopColor = "#0A246A" id.style.borderBottomWidth = "1" id.style.borderBottomStyle = "solid" id.style.borderBottomColor = "#0A246A" id.style.borderLeftWidth = "1" id.style.borderLeftStyle = "solid" id.style.borderLeftColor = "#0A246A" id.style.borderRightWidth = "1" id.style.borderRightStyle = "solid" id.style.borderRightColor = "#0A246A" End Sub Sub bar_deselect(id) id.style.backgroundColor = "#D4D0C8" id.style.borderTopWidth = "1" id.style.borderTopStyle = "solid" id.style.borderTopColor = "#D4D0C8" id.style.borderBottomWidth = "1" id.style.borderBottomStyle = "solid" id.style.borderBottomColor = "#D4D0C8" id.style.borderLeftWidth = "1" id.style.borderLeftStyle = "solid" id.style.borderLeftColor = "#D4D0C8" id.style.borderRightWidth = "1" id.style.borderRightStyle = "solid" id.style.borderRightColor = "#D4D0C8" End Sub