<% ' Return a formatted html link ' ************************************************************************************************ Function FormattedLink(text, location) FormattedLink = "" FormattedLink = FormattedLink & text & "" End Function ' Escape the HTML to avoid vulnerabilities ' ************************************************************************************************ Function H(str) H = Server.HTMLEncode(str) End Function ' Escape the URL to avoid vulnerabilities ' ************************************************************************************************ Function U(str) U = Server.URLEncode(str) End Function ' return the full location for URL ' ************************************************************************************************ Function AbsUrl(relative_path) AbsUrl = Application("AbsLinkUrl") & relative_path End Function ' Return the URL Path to a document ' ************************************************************************************************ Function DocumentTypeUrl(section, folder, basename, format) DocumentTypeUrl = "documents/" & section & "/" & folder & "/" & basename & "." & format End Function ' Return the breadcrumbs links ' ************************************************************************************************ Sub PrintBreadCrumbs() Dim rows, result, i result = FormattedLink("Home", "") & " | " & FormattedLink("Search", "") rows = RunQuery("SELECT secid, name FROM Section", null) For i=0 To UBound(rows,2) result = result & " | " & FormattedLink(H(rows(1,i)), "section.asp?secid=" & U(rows(0,i))) Next Response.write "" End Sub ' Return an array of words from a string ' ************************************************************************************************ Function SplitWords(str) Dim regEx Set regEx = new RegExp regEx.Global = true regEx.Pattern = " +" SplitWords = Split(regEx.Replace(Trim(str), " ")) End Function ' Is the string a valid integer? ' ************************************************************************************************ Function IsValidInt(str) IsValidInt = Not IsEmpty(str) And IsNumeric(str) End Function ' Return a size in human readable units ' ************************************************************************************************ Function FormattedSizeUnits(size) Dim str, unit str = "" unit = "" if size > 1048576 then str = FormatNumber(size/1048576, 2) unit = "MB" elseif size > 1024 then str = FormatNumber(size/1024, 2) unit = "KB" else str = size unit = "B" end if FormattedSizeUnits = str & " " & unit End Function ' Return a formatted date string ' ************************************************************************************************ Function FormattedDateString(date) Dim myMon, myDay, str If IsNull(date) OR date = "" Then FormattedDateString = "--" Else FormattedDateString = Year(date) & "-" If Len(Month(date)) < 2 Then FormattedDateString = FormattedDateString & "0" End If FormattedDateString = FormattedDateString & Month(date) & "-" If Len(Day(date)) < 2 Then FormattedDateString = FormattedDateString & "0" End If FormattedDateString = FormattedDateString & Day(date) End If End Function ' Return a link to a document type ' ************************************************************************************************ Function FormattedDocumentType(location, doctype, size) Dim lead Select Case doctype case "pdf" lead = "PDF" case "doc" lead = "DOC" case "txt" lead = "TXT" case "rtf" lead = "RTF" case "zip" lead = "ZIP" case "docx" lead = "DOCX" End Select If IsNull(location) Then FormattedDocumentType = lead & " (" & _ FormattedSizeUnits(size) & ")" Else FormattedDocumentType = FormattedLink(lead, location) & _ " (" & FormattedSizeUnits(size) & ")" End If End Function ' Remove any illegal characters from the String ' ************************************************************************************************ Function RemoveIllegalChars(str) str = replace(str,"'", "''") Dim regEx Set regEx = New RegExp regEx.Global = true regEx.Pattern = "[^ :,._*()/\-'0-9a-zA-Z]" RemoveIllegalChars = regEx.Replace(str, "") End Function ' Print out a two column table ' ************************************************************************************************ Sub PrintTwoColumnTable(title, summary, entries) Dim max, middle, i, row Response.write "" Response.write "" ' In case there is only one entry If UBound(entries)=0 Then Response.write "" Else max = UBound(entries) + 1 middle = max/2 If Int(middle) < middle Then middle = Int(middle) + 1 End If row = 1 For i = 0 To middle - 1 Response.write "" If (i+middle) < max Then Response.write "" Else Response.write "" End If Response.write "" row = 1 - row Next End If Response.write "
" & title & "
" Response.write entries(0) Response.write "
" Response.write entries(i) Response.write "" & entries(i+middle) & "              
" End Sub ' Got this from 4guysfromrolla.com ' ************************************************************************************************ Class DynamicArray Private aData Private Sub Class_Initialize() Redim aData(0) End Sub Public Property Get Data(iPos) 'Make sure the end developer is not requesting an '"out of bounds" array element If iPos < LBound(aData) or iPos > UBound(aData) then Exit Property 'Invalid range End If Data = aData(iPos) End Property Public Property Get DataArray() DataArray = aData End Property Public Property Let Data(iPos, varValue) 'Make sure iPos >= LBound(aData) If iPos < LBound(aData) Then Exit Property If iPos > UBound(aData) then 'We need to resize the array Redim Preserve aData(iPos) aData(iPos) = varValue Else 'We don't need to resize the array aData(iPos) = varValue End If End Property Public Function StartIndex() StartIndex = LBound(aData) End Function Public Function StopIndex() StopIndex = UBound(aData) End Function Public Sub Delete(iPos) 'Make sure iPos is within acceptable ranges If iPos < LBound(aData) or iPos > UBound(aData) then Exit Sub 'Invalid range End If Dim iLoop For iLoop = iPos to UBound(aData) - 1 aData(iLoop) = aData(iLoop + 1) Next Redim Preserve aData(UBound(aData) - 1) End Sub End Class %> Error processing SSI file
VA Software Document Library -
Attention A T users. To access the menus on this page please perform the following steps. 1. Please switch auto forms mode to off. 2. Hit enter to expand a main menu option (Health, Benefits, etc). 3. To enter and activate the submenu links, hit the down arrow. You will now be able to tab or arrow up or down through the submenu options to access/activate the submenu links.
Attention A T users. To access the combo box on this page please perform the following steps. 1. Press the alt key and then the down arrow. 2. Use the up and down arrows to navigate this combo box. 3. Press enter on the item you wish to view. This will take you to the page listed.
Menu
Menu
Veterans Crisis Line Badge