<% PageSize = 5 SiteLocale = "EN-US" FormScope = "/" QueryForm = Request.ServerVariables("PATH_INFO") bNewQuery = True bUseSavedQuery = False SearchString = "" %>
<
 
 
 
 
>
hide
You are viewing a Web site, archived on 08:27:50 Oct 16, 2004. It is now a Federal record managed by the National Archives and Records Administration.
External links, forms, and search boxes may not function within this collection. Note that this document was downloaded, and not saved because it was a duplicate of a previously captured version (17:02:13 Oct 15, 2004). HTTP headers presented here are from the original capture.
Public Health Seal report title shim
contents search order press resources links home curve end shim
shim
sp

Secretary's Message

Foreword

Preface

Acknowledgments

Table of Contents

Chapter 1
Introduction

Chapter 2
The Magnitude of Youth Violence

Chapter 3
The Developmental Dynamics of Youth Violence

Chapter 4
Risk Factors for Youth Violence

Chapter 5
Prevention and Intervention

Chapter 6
A Vision for the Future

Glossary

Index

List of Tables and Figures

Executive Summary

<% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then Action = Request.Form("Action") If Action = "" Then Action = "Go" End If SearchString = Request.Form("SearchString") FreeText = Request.Form("FreeText") If Action = "Go" Then RankBase = 1000 Else bNewQuery = False bUseSavedQuery = True NextPageNumber = Request.Form("Page") RankBase = Request.Form("RankBase") End If End If %>

Search

Enter your query below:
value="CHECKED">Use Free-Text Query.
<% If SearchString <> "" Then If bNewQuery Then Set Session("SurgeonGeneralSearchQuery") = Nothing Set Session("SurgeonGeneralSearchRecordSet") = Nothing NextRecordNumber = 1 ' Remove any leading and ending quotes from SearchString SrchStrLen = Len(SearchString) If Left(SearchString, 1) = Chr(34) Then SrchStrLen = SrchStrLen - 1 SearchString = Right(SearchString, SrchStrLen) End If If Right(SearchString, 1) = Chr(34) Then SrchStrLen = SrchStrLen - 1 SearchString = Left(SearchString, SrchStrLen) End If If FreeText = "CHECKED" Then CompSearch = "$contents " & Chr(34) & SearchString & Chr(34) Else CompSearch = SearchString End If CompSearch = CompSearch & " and #filename *.|(htm|,html|,txt|,doc|)" Set q = Server.CreateObject("ixsso.Query") Set util = Server.CreateObject("ixsso.Util") q.Catalog = "SurgeonGeneral" q.Query = CompSearch q.SortBy = "rank[d]" q.Columns = "DocTitle, vpath, filename, size, write, characterization, rank" q.MaxRecords = 300 util.AddScopeToQuery q, "/library/youthviolence/chapter1/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/chapter2/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/chapter3/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/chapter4/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/chapter5/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/chapter6/", "shallow" util.AddScopeToQuery q, "/library/youthviolence/summary/", "shallow" If SiteLocale <> "" Then q.LocaleID = util.ISOToLocaleID(SiteLocale) End If Set rs = q.CreateRecordSet("nonsequential") rs.PageSize = PageSize bActiveQuery = True Else If bUseSavedQuery Then If IsObject(Session("SurgeonGeneralSearchQuery")) And IsObject(Session("SurgeonGeneralSearchRecordSet")) Then Set q = Session("SurgeonGeneralSearchQuery") Set rs = Session("SurgeonGeneralSearchRecordSet") If rs.RecordCount <> -1 And NextPageNumber <> -1 Then rs.AbsolutePage = NextPageNumber NextRecordNumber = rs.AbsolutePosition End If bActiveQuery = True Else Response.Write "ERROR - No saved query" End If End If End If End If If bActiveQuery Then If Not rs.EOF Then %>
<% LastRecordOnPage = NextRecordNumber + rs.PageSize - 1 CurrentPage = rs.AbsolutePage If rs.RecordCount <> -1 And rs.RecordCount < LastRecordOnPage Then LastRecordOnPage = rs.RecordCount End If Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage If rs.RecordCount <> -1 Then Response.Write " of " & rs.RecordCount End If Response.Write " matching the query " & Chr(34) & "" Response.Write SearchString & "" & Chr(34) & "." If Not rs.EOF And NextRecordNumber <= LastRecordOnPage Then %> <% End If Do While Not rs.EOF and NextRecordNumber <= LastRecordOnPage ' This is the detail portion for Title, Abstract, URL, Size, and Modification Date. ' If there is a title, display it, otherwise display the filename. %> <% rs.MoveNext NextRecordNumber = NextRecordNumber+1 Loop %>
<% ' Graphically indicate rank of document with list of stars (*'s). If NextRecordNumber = 1 Then RankBase = rs("rank") End If If RankBase > 1000 Then RankBase = 1000 Else If RankBase < 1 Then RankBase = 1 End If End if NormRank = rs("rank") / RankBase If NormRank > 0.8 Then stars = "rankbtn5.gif" ElseIf NormRank > 0.6 Then stars = "rankbtn4.gif" ElseIf NormRank > 0.4 Then stars = "rankbtn3.gif" ElseIf NormRank > 0.2 Then stars = "rankbtn2.gif" Else stars = "rankbtn1.gif" End If %>
<%= NextRecordNumber%>   <% If VarType(rs("DocTitle")) = 1 Or rs("DocTitle") = "" Then %>" class="RecordTitle"><%= Server.HTMLEncode(rs("filename")) %><% Else %>" class="RecordTitle"><%= Server.HTMLEncode(rs("DocTitle")) %><% End If %>
stars   <% If VarType(rs("characterization")) = 8 And rs("characterization") <> "" Then %>

Abstract: <%= Server.HTMLEncode(rs("characterization"))%>

<% End If %>


<% Else ' NOT rs.EOF If NextRecordNumber = 1 Then Response.Write "No documents matched the query" Else Response.Write "No more documents in the query" End If End If ' NOT rs.EOF If Not q.OutOfDate Then ' If the index is current, display the fact %> The index is up to date.
<% End If If Q.QueryIncomplete then ' If the query was not executed because it needed to enumerate to ' resolve the query instead of using the index, but AllowEnumeration ' was FALSE, let the user know %>

The query is too expensive to complete.
<% End If If Q.QueryTimedOut then ' If the query took too long to execute (for example, if too much work ' was required to resolve the query), let the user know %>

The query took too long to complete.
<% End If %>
<% SaveQuery = False If CurrentPage > 1 and rs.RecordCount <> -1 Then SaveQuery = True %>
<% Else %>   <% End If %>
<% If Not rs.EOF Then SaveQuery = True NextString = "Next " If rs.RecordCount <> -1 then NextSet = (rs.RecordCount - NextRecordNumber) + 1 If NextSet > rs.PageSize then NextSet = rs.PageSize End If NextString = NextString & NextSet & " documents" Else NextString = NextString & " page of documents" End If %>
<% Else %>   <% End If %>
<% ' Display the page number %> <% If rs.PageCount > 0 Then Response.Write "Page " & CurrentPage & " of " & rs.PageCount End If ' If either of the previous or back buttons were displayed, save the query ' and the recordset in session variables. If SaveQuery then Set Session("SurgeonGeneralSearchQuery") = q Set Session("SurgeonGeneralSearchRecordSet") = rs Else rs.close Set rs = Nothing Set q = Nothing set Session("SurgeonGeneralSearchQuery") = Nothing set Session("SurgeonGeneralSearchRecordSet") = Nothing End If End If %>


Back to Top