I think I got it. Unless there is a major problem I'm not seeing. It seems to be working...
First I added this to inc_header.asp:
not(Instr(Request.ServerVariables("Path_Info"), "myfiles.asp") > 0) and _
Then in myfiles.asp I replaced this:
With this:
Lastly, I had to remove an end if arond line 289.
The only thing I think could be a problem would be removing the else in the code I replaced. If I kept it, it gave an error. Removing it fixed the error.