Lå inde et med, du måske kan bruge?
-------------------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
if(sWidth!=ix || sHeight!=iy) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div></body></html>");
win.document.close();
}
</script>
<html>
<head>
<title>Billeder</title>
<link href="../../css/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#E9E9E9" leftmargin="0">
<table width="100%">
<tr>
<td>
<%
'------------------------------------------------
'henter info om siden
'------------------------------------------------
page = trim(Request.QueryString("page"))
start = trim(Request.QueryString("start"))
'------------------------------------------------
'Åbner Filsystem
'------------------------------------------------
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
'------------------------------------------------
'grund variabler
'------------------------------------------------
row_count = 0
row = 1
max_row = 2
count = 1
If NOT start <> "" then
Start = 1
End If
%>
<p align=center>
<%
'------------------------------------------------
'Info variabler
'------------------------------------------------
info_page = 0
info_page_count = 0
info_Count = 0
'------------------------------------------------
'Info Script, udregner og udskriver info til siden
'------------------------------------------------
If page <> "" then
response.write "Side <a href='index.asp'>1</a> "
else
Response.write "Side 1 "
End If
For Each objFileItem in objFolderContents
info_Count = info_Count + 1
info_page = info_page + 1
if info_page = 6 then
info_page_count = info_page_count + 1
info_page = 0
End If
If info_page = 0 then
If trim(info_page_count + 1) = trim(page) then
response.write info_page_count + 1 & " "
Else
response.write "<a href='index.asp?start=" & info_count & "&page=" & info_page_count + 1 & "'>" & info_page_count + 1 & "<a> "
End If
End If
Next
Response.write "<br>Der er ialt <b>" & (info_Count) & "</b> billeder"
if (info_page_count) * 6 = info_count then
Response.write " på <b>" & (info_page_count) & "</b> sider<br>"
Else
Response.write " på <b>" & (info_page_count) + 1 & "</b> sider<br>"
End If
%>
<div align="center">
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<%
For Each objFileItem in objFolderContents
If objFileItem.Name = "index.asp" then
Else
If CLng(count) < CLng(start) then
count = count + 1
Else
If CLng(row) => CLng(max_row) And row_count = 3 then
Else
If row_count > 2 then
response.write "<tr>"
row_count = 0
row = row + 1
End If
Response.write " <td><a href=""javascript:ViewImage("
Response.Write "'" & objFileItem.Name & "',800,600,'Billeder - Grundforening')"""
Response.write "'><img border=0 src='" & (objFileItem.Name) & "' alt='" & (objFileItem.Name) & "' width=157 height=97></a>"
row_count = row_count + 1
count = count + 1
End If
End If
End If
Next
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>