Jeg har ikke testet det, men dette burde virke:
<% Response.Buffer = True %><html>
<head>
<script language="JavaScript">
<!--
function jumppage(sel)
{
var i = sel.selectedIndex
self.location.href = sel.options.value
}
// -->
</script>
</head>
<body>
<b><font size="4"> Billed-galleri:</font></b><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="789" id="galleri" height="1">
<tr>
<td align="center" width="39%" height="1" rowspan="2">
</td>
<td align="center" width="49%" height="1">
<form action=<%=CurFile%> method="POST">
<p align="right">
<b><font size="2">Vælg album</font></b> </p>
</form>
</td>
<td align="center" width="12%" height="1">
<p align="left">
<%
ShowSub = request("ShowSub")
ShowPic = request("ShowPic")
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
For each Folder in objFolder.SubFolders
If Left(Folder.Name,1)<>"_" Then
Response.write "<a href='Javascript:void(0);' "
If ShowSub=Folder.Name Then
Response.Write "style='color=#009900;' "
End if
Response.Write"onclick='jumppage('" & CurFile & "?ShowSub="
Response.Write(Replace(Folder.Name, " ", "%20');"))
response.write "'>"
Response.Write(Folder.Name & "</a><br>")
If ShowSub <= " " Then
ShowSub = Folder.Name
End if
End if
Next
Set objFSO = Nothing
%>
</td>
</tr>
<tr>
<td align="center" width="49%" height="1">
</td>
<td align="center" width="12%" height="1">
</td>
</tr>
</table>
<%
If ShowPic > " " then
ShowPic = Replace(ShowPic, " ", "%20")
Response.Write "<a href='JavaScript:history.go(-1)'><img border=1 src='" & ShowPic & "'><BR><BR><B><font size='2'>Tilbage til sidste side</font></B></a>"
Else
%>
<table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#000000" width="789" id="Pics1">
<tr>
<%
strPhysicalPath = Server.MapPath(".\\" & ShowSub)
If ShowSub > " " then
ShowSub = Replace(ShowSub, " ", "%20")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPhysicalPath)
Set objFolderContents = objFolder.Files
For Each objFileItem in objFolderContents
If Ucase(Right(objFileItem.Name,4))=".GIF" OR Ucase(Right(objFileItem.Name,4))=".JPG" OR Ucase(Right(objFileItem.Name,4))=".BMP" THEN
ShowPic = Replace(objFileItem.Name, " ", "%20")
'Response.write "<td align='center' width='25%'><a href=" & ShowSub & "\\"
Response.write "<td align='center' width='25%'><a href=" & CurFile & "?ShowPic=" & ShowSub & "\\" & ShowPic
'Response.Write(Replace(objFileItem.Name, " ", "%20"))
Response.write ">"
Response.Write("<img border=1 src='" & ShowSub & "\\" & objFileItem.Name & "' width=100>")
Response.Write("<p align='center'><b>" & Mid(objFileItem.Name,1,Len(objFileItem.Name)-4) & "</b>")
Response.write "</a></td>"
PictureNo = PictureNo + 1
If PictureNo=4 Then
Response.write "</tr><tr>"
PictureNo = 0
End if
End if
Next
Set objFSO = Nothing
End if
%>
</tr>
</table>
<%
End if
%>
</body>
</html>