Want to PASS DYNAMIC URL created by query into a Value in another page

Hi there I m trying to make an include file for navigation. and that does it for normal asp pages but I m having problem with details page. hich is after search, and results page. It shows the details of the results page and actual problem this navigation.asp having trouble with results.asp cause results.asp creates the details.asp 's url at the end of the query. So that url with parameters need to be on that navigation.asp

All below has include file = inc_navigation.asp and inc_navigation_config.asp files.
Up to 3rd step everything is Ok, but 4th step isn’t. and That’s because the 2nd file (search) makes query and displays on 3rd page and that 3rd page has the 4th page’s URL and I cant pass that URL to Navigation config file ( that query result url should replace this on below config file > “a_details.asp” )so that file can display urls in index style on top of each pages.

1.http://www.akbuk-didim.com
2. http://www.akbuk-didim.com/a_search.asp
3. http://www.akbuk-didim.com/a_results.asp
4. http://www.akbuk-didim.com/a_details.asp

This works because there is no search and query on these pages and the urls are static:

http://www.akbuk-didim.com/innova
http://www.akbuk-didim.com/innova/search2.asp

++++++++++++++++++++ here is the navigation config file +++++++++++++
<%
' SITE NAVIGATION CONFIG

arrMenu = Array( _
Array("default.asp","","Home","online"), _
Array("a_search.asp","","Search","online"), _
Array("a_results.asp", "a_search.asp", "Results","online"), _
Array("a_details.asp", "a_results.asp", "Details","online"), _
Array("about.asp","","About","online") _
}
%>


++++++++++++++++++++++++++

THIS SHOULD BE THE URL :

"a_details.asp?T_PropertyREF=<%=objRst("T_PropertyREF")%>&mVarTable=[details]"

instead of just “a_details.asp”


++++++++++++++++++++++++++

<%
' SITE NAVIGATION SCRIPT
Dim sCurrPage, n, sFileName
sCurrPage = Request.ServerVariables("SCRIPT_NAME")
n = InstrRev(sCurrPage,"/")
sFileName = Mid(sCurrPage,n+1)

Function TopMenu()
For i = 0 to UBound(arrMenu)
Item = arrMenu(i)
If Item(1) = "" AND Item(3)<>"hidden" Then
last_item_index = i
End If
Next

For i = 0 to UBound(arrMenu)
Item = arrMenu(i)
If Item(1) = "" AND Item(3)<>"hidden" Then
if not i = last_item_index Then
If Lcase(Item(0)) = LCase(sFileName) Then
Response.write "A<span class=mainbuttonactive>" & Item(2) & "</span> <span class=msep>+</span> "
Else
Response.write "B<a href='" & Item(0) & "' class='mainbutton'>" & Item(2) & "</a> <span class=msep>+</span> "
End If
else
If LCase(Item(0)) = LCase(sFileName) Then
Response.write "C<span class=mainbuttonactive>" & Item(2) & "</span>"
Else
Response.write "D<a href='" & Item(0) & "' class='mainbutton'>" & Item(2) & "</a>"
End If
end if
End If
Next
End Function

Function GetDetail(sCurrPage)
For i = 0 to UBound(arrMenu)
Item = arrMenu(i)
If LCase(Item(0)) = LCase(sCurrPage) Then
GetDetail = Array(Item(0),Item(1),Item(2))
End If
Next
End Function

Function Navigation()
if LCase(sFileName)<>"default.asp" then
Response.Write ""
Response.Write "<a href='default.asp'>Home</a>" & Position(sFileName)
Response.Write ""
end if
End Function

Function Position(sCurrPage)
if sCurrPage = "" then exit function
sLink = GetDetail(sCurrPage)(0)
sParent = GetDetail(sCurrPage)(1)
sTitle = GetDetail(sCurrPage)(2)

if LCase(sCurrPage) = LCase(sFileName) then
Position = Position(sParent) & " \ " & sTitle
else
Position = Position(sParent) & " \ " & "<a href='" & sLink & "'>" & sTitle & "</a>"
end if
End Function

Function isHaveSubMenu()
For i = 0 to UBound(arrMenu)
Item = arrMenu(i)
If LCase(Item(1)) = LCase(sFileName) AND Item(3)<>"hidden" Then
isHaveSubMenu = true
exit function
End If
Next
isHaveSubMenu = false
End Function

Function SubMenu()
For i = 0 to UBound(arrMenu)
Item = arrMenu(i)
If LCase(Item(1)) = LCase(sFileName) AND Item(3)<>"hidden" Then
Response.Write "<a href='" & Item(0) & "'>" & Item(2) & "</a><br>"
End If
Next
End Function
%>