% '==================================================
' Microsoft Server Appliance
'
' Serves tabs and help links
'
' Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved.
'================================================== %>
<%
on error resume next
Dim strSourceNameLoc
strSourceNameLoc = "sakitmsg.dll"
Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
if Err.number <> 0 then
Response.Write "Error in localizing the web content "
Response.End
end if
'-----------------------------------------------------
'START of localization content
dim L_HELPTOOLTIP_TEXT
dim L_ABOUTLABEL_TEXT
L_HELPTOOLTIP_TEXT = objLocMgr.GetString(strSourceNameLoc,"&H40010023", varReplacementStrings)
L_ABOUTLABEL_TEXT = objLocMgr.GetString(strSourceNameLoc,"&H40010025", varReplacementStrings)
'End of localization content
'-----------------------------------------------------
Set ObjLocMgr = nothing
'----------------------------------------------------------------------------
'
' Function : ServeTabBar
'
' Synopsis : Gets the tabs to display from elementmgr and calls
' CreateTabHTML to display them.
'
' Arguments: None
'
' Returns : None
'
'----------------------------------------------------------------------------
Function ServeTabBar
dim objElements
dim intTabCount, i, intCurTab
dim strActiveTabImage, strInactiveTabImage
dim objItem
dim strArrSource()
dim strArrTabText()
dim strArrTabURL()
dim strArrTabStyle()
dim strArrTabImage()
strActiveTabImage = m_VirtualRoot & "images/light_spacer.gif"
strInactiveTabImage = m_VirtualRoot &"images/dark_spacer.gif"
on Error resume next
Set objElements = GetElements("TABS")
intTabCount = objElements.Count
if Err<>0 then
intTabCount=0
end if
redim strArrSource(intTabCount)
redim strArrTabText(intTabCount)
redim strArrTabURL(intTabCount)
redim strArrTabStyle(intTabCount)
redim strArrTabImage(intTabCount)
intCurTab = GetCurrentTab()
i=0
for each objItem in objElements
strArrSource(i) = objItem.GetProperty("Source")
if Err<>0 then
strArrSource(i) = ""
end if
strArrTabText(i) = GetLocString(strArrSource(i), objItem.GetProperty("CaptionRID"), "")
if Err<>0 then
strArrTabText(i) = ""
end if
strArrTabURL(i) = objItem.GetProperty("URL")
if Err<>0 then
strArrTabURL(i) = ""
else
strArrTabURL(i) = m_VirtualRoot & strArrTabURL(i)
end if
if i=intCurTab then
strArrTabStyle(i) = "ACTIVETAB"
strArrTabImage(i)= strActiveTabImage
else
strArrTabStyle(i) = "INACTIVETAB"
strArrTabImage(i)= strInactiveTabImage
end if
i = i + 1
next
Call CreateTabHTML(i, strArrSource, strArrTabText, strArrTabURL, strArrTabStyle, strArrTabImage)
End Function
'----------------------------------------------------------------------------
'
' Function : CreateTabHTML
'
' Synopsis : Generates HTML to display the tabs.
'
' Arguments: intNumTabs(IN) - number of tab to be displayed
' strArrSource(IN) - resource dll for each tab string (array)
' strArrTabText(IN) - text on tab (array)
' strArrTabURL(IN) - URL for each tab(array)
' strArrTabStyle(IN) - state of tab - current tab or not(array)
' strArrTabImage(IN) - image on tab - current tab or not(array)
'
' Returns : None
'
'----------------------------------------------------------------------------
Function CreateTabHTML(intNumTabs, strArrSource, strArrTabText, strArrTabURL, strArrTabStyle, strArrTabImage)
on error resume next
dim i
dim objElements
dim objItem
dim objLocMgr
dim intCaptionIDNav
dim strCaptionText
Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
%>
|
<%if intNumTabs=0 then%>
--------
|
<%else%>
<% for i=0 to intNumTabs-1 step 1 %>
<%=strArrTabText(i)%>
|
|
|
<% next %>
|
<%end if%>
|
|
|
|
<% if not isIE() then %>
<% end if%>
<%
End Function
'----------------------------------------------------------------------------
'
' Function : GetCurrentTab
'
' Synopsis : Return index of current tab
'
' Arguments: None
'
' Returns : Zero-based index of current tab
'
'----------------------------------------------------------------------------
Function GetCurrentTab
dim intTab
intTab = Request.QueryString("Tab")
if (intTab = "") then
intTab=0
end if
GetCurrentTab = CInt(intTab)
End Function
%>