To be honest I have never seen a code like this before. Your layout, indenting and general good code practice id very irregular. IMO This is why you are having difficulty finding which condition is not closed. Very hard to follow code this this. EG lets take you first conditional statement layout:
If Session("Access_Status") = "" _
AND Request.QueryString("test") <> 1 then
Session("Access_Status") = "Test"
Response.Redirect "login.asp?test=1"
ElseIf Session("Access_Status") = "" _
AND Request.QueryString("test") = 1 then
Response.Redirect "cookie_error.asp"
End If %>
Most people I know would write it similar to this:
If Session("Access_Status") = "" AND Request.QueryString("test") <> 1 then
Session("Access_Status") = "Test"
Response.Redirect "login.asp?test=1"
ElseIf Session("Access_Status") = "" AND Request.QueryString("test") = 1 then
Response.Redirect "cookie_error.asp"
End If
It just makes it easier to follow. Anyhow I dont mean to sound to suggestive. Everyone has thier own style and I thought to give you my opinion. I wouldnt have a person working for me who did not practice industry standard indenting of some kind.
Wind is your friend
Matt
www.elitemarquees.com.au