% '############################ '############################################################################## '# breadcrumb.asp Version 1.0 # '# Copyright 2000 Adrian Roselli adrian@roselli.org # '# Created 24/4/2000 Last Modified 24/4/2000 # '############################################################################## '# COPYRIGHT NOTICE # '# Copyright [and -left] 2000 Adrian Roselli All Rights Reserved except as # '# provided below. # '# # '# breadcrumb.asp may be used and modified free of charge by anyone so long # '# as this copyright notice and the comments above remain intact. By using # '# this code you agree to indemnify Adrian Roselli from any liability that # '# might arise from it's use. # '# # '# This script is released under the GPL. # '# Selling the code for this program or any derivative work is expressly # '# forbidden. A full copy of the GPL can be found in the Code section of # '# http://evolt.org. In all cases copyright and this header must remain # '# intact. # '############################################################################## Function BreadCrumb(FullPath) Do Until instr(1,FullPath,"/") = 0 '## Create an array of letters in the alphabet. Letters = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z") '## split on the / tmpPath = mid(FullPath,1,instr(1,FullPath,"/")-1) strTmpPath = Trim(tmpPath) DirPath = DirPath & strTmpPath & "/" '## upshift the first character firstLetter = ucase(mid(strTmpPath,1,1)) strTmpPath = firstLetter & mid(strTmpPath,2,len(strTmpPath)) '## replace udnerscores with spaces and upshift the following character for each letter in letters strTmpPath = Replace(Trim(strTmpPath),"_" & lcase(letter)," " & UCase(letter)) next '## split the next one out FullPath = mid(FullPath,instr(1,FullPath,"/")+1,Len(FullPath)-Len(tmpPath)) '## separate them with >> symbols IF strTmpPath = "" THEN response.write "Government > Division of Administration" ELSEIF strTmpPath = "Home" THEN ELSE response.write " > " & strTmpPath & "" END IF Loop IF PageTitle = "" THEN response.write " " ELSE response.write " > " & PageTitle response.write "" END IF End Function %>