<!--#include file="LibStream.asp"-->

<%

InitContentOro

Dim mystr

if BookID <> "" Then

    if ChapterID="" OR CHapterID<1 Then    

        InitDB
        GetBook(BookID)
        
        mystr = Left(BookDescription, 154)

        if mystr = "" Then
            mystr = Title
        else
        
            MyPos = InstrRev(mystr, ".", -1, 1)
            if MyPos > 50 Then            
                mystr = Left(mystr, MyPos)
            end if
        
        end if
        
        response.write(mystr)
        
        Conn.Close

    else
    
        InitDB

  	    mystr = Left(DisplayFirstParagraph, 154)
        
	    if mystr = "" Then
	    
	        GetChapter BookID, ChapterID	    
            mystr = ChapterTitle
            
        else
        
            MyPos = InstrRev(mystr, ".", -1, 1)
            
	    if MyPos > 50 Then            
                mystr = Left(mystr, MyPos)
            end if
        
        end if

        response.write(mystr)
        Conn.Close
    
    end if  
    
end if

response.end
%>


