<% InputString = Request.QueryString("page") RedirectString = Request.QueryString("redirect") If InputString = "" Then If RedirectString <> "" Then Response.Redirect RedirectString Else Response.Redirect "./" End if End If path = Request.ServerVariables("PATH_TRANSLATED") path = left(path, (len(path)-10)) Set fso = CreateObject("Scripting.FileSystemObject") Set ts = fso.OpenTextFile(path & "\" & InputString, 1) fileText = ts.ReadAll %> <% Response.write GetTitle(fileText) 'get the title of the page and return it %>

<%'===========================================================================================%>
N.C. Project Green - Steps to Environmental Sustainability in State Government
AGENCIES   |  UNIVERSITIES  |  HOME  |  PROJECT GREEN
<%'===========================================================================================%>

<%'=========================================================================================== If Request.QueryString("Type") = "" Then %>
















<%'=========================================================================================== Else %>















<% End if %>
<%=FileText%>
<% 'this function grabs the title line from an html page and returns it function GetTitle(htmText) Set regEx = New RegExp regEx.Pattern = ".*" regEx.IgnoreCase = True Set Matches = regEx.Execute(htmText) For Each Match in Matches ' Iterate Matches collection. GetTitle = Match.Value Next End Function %>