<%
     dim fs, folder, file, item, url
     dim strLastFile, strLastDate
     Dim Rapportarray(13)
     Dim AndraPDFarray()
     Dim strPDFlink, strPDFname




If Session("Year") <> "" then 
    path = "\rapporter\" & Session("Year")
end if

ArchiveYear = "2010"

path = "/rapporter/" & ArchiveYear
path = Server.MapPath("/rapporter/" & ArchiveYear)
path = "../../rapporter/" & ArchiveYear

     Antal_pdf = 0
     set fs = CreateObject("Scripting.FileSystemObject")
     set folder = fs.GetFolder(path)
     for each item in folder.Files
      if InStr(item.Name, ".pdf") > 0 then
        if InStr(item.Name, "Jan") = 1 then
            Rapportarray(1) = path & "/" & item.Name
        elseif InStr(item.Name, "Feb") = 1 then
            Rapportarray(2) = path & "/" & item.Name
        elseif InStr(item.Name, "Mar") = 1 then
            Rapportarray(3) = path & "/" & item.Name
        elseif InStr(item.Name, "Apr") = 1 then
            Rapportarray(4) = path & "/" & item.Name
        elseif InStr(item.Name, "Maj") = 1 then
            Rapportarray(5) = path & "/" & item.Name
        elseif InStr(item.Name, "Jun") = 1 then
            Rapportarray(6) = path & "/" & item.Name
        elseif InStr(item.Name, "Jul") = 1 then
            Rapportarray(7) = path & "/" & item.Name
        elseif InStr(item.Name, "Aug") = 1 then
            Rapportarray(8) = path & "/" & item.Name
        elseif InStr(item.Name, "Sep") = 1 then
            Rapportarray(9) = path & "/" & item.Name
        elseif InStr(item.Name, "Okt") = 1 then
            Rapportarray(10) = path & "/" & item.Name
        elseif InStr(item.Name, "Nov") = 1 then
            Rapportarray(11) = path & "/" & item.Name
        elseif InStr(item.Name, "Slut") = 1 then
            Rapportarray(12) = path & "/" & item.Name
        else
            ReDim Preserve AndraPDFarray(Antal_pdf+1)
            AndraPDFarray(Antal_pdf) = item.Name
            Antal_pdf = Antal_pdf + 1            
        end if
      end if
     next
%>

<html>


<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="SEH">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title>Arkiv</title>
<!--
<base target="_blank">
-->
</head>

<body style="color: rgb(255, 0, 0);" background="../../../bilder/bakgrund.jpg" bgcolor="#ffcccc">


<center>
<u><b><font size="4">Arkiv för <%=ArchiveYear %></font></b></u><i><font size="1"><br>
</font></i><hr color="#ff0000" size="1">
<table style="border-collapse: collapse;" id="AutoNumber3" border="0" bordercolor="#111111" cellpadding="3" cellspacing="0">
  <tbody><tr>
    <td style="width: 207px;" align="center" valign="top">
    
    <font size="4"><u>Rapporter<br>
      </u></font><font size="1"><i>(pdf-filer, öppnas i 
nytt fönster</i></font></td>
    <td style="width: 1px;" align="center" valign="top"></td>
    <td style="width: 138px;" align="center" valign="top"><font size="4"><u>Statistik</u></font></td>
    <td style="width: 3px;" align="center" valign="top"></td>
    <td style="width: 217px;" align="center" valign="top"><font size="4"><u>Övrigt</u></font></td>
  </tr>
 <tr>
    <td style="width: 207px;" align="center" valign="top">


<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2">
  <tr>
  
    <td>
<% if Rapportarray(1) <> "" then %>
    <a target="_blank" onmouseover="JAN_button.src='../../bilder/januarirapporten_b.gif';window.status='Januarirapporten, öppnas i nytt fönster'; return true" onmouseout="JAN_button.src='../../bilder/januarirapporten.gif';window.status=' '; return true" href="<%=Rapportarray(1)%>">
    <img border="0" src="../../bilder/januarirapporten.gif" name="JAN_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(2) <> "" then %>
	<a target="_blank" onmouseover="FEB_button.src='../../bilder/februarirapporten_b.gif';window.status='Februarirapporten, öppnas i nytt fönster'; return true" onmouseout="FEB_button.src='../../bilder/februarirapporten.gif';window.status=' '; return true" href="<%=Rapportarray(2)%>">
    <img border="0" src="../../bilder/februarirapporten.gif" name="FEB_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(3) <> "" then %>
    <a target="_blank" onmouseover="MAR_button.src='../../bilder/marsrapporten_b.gif';window.status='Marsrapporten, öppnas i nytt fönster'; return true" onmouseout="MAR_button.src='../../bilder/marsrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(3)%>">
    <img border="0" src="../../bilder/marsrapporten.gif" name="MAR_button" width="175" height="20"></a>
<% end if %>  
    </td>
  </tr>
  <tr>
    <td>
<% if Rapportarray(4) <> "" then %>
    <a target="_blank" onmouseover="APR_button.src='../../bilder/aprilrapporten_b.gif';window.status='Aprilrapporten, öppnas i nytt fönster'; return true" onmouseout="APR_button.src='../../bilder/aprilrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(4)%>">
    <img border="0" src="../../bilder/aprilrapporten.gif" name="APR_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(5) <> "" then %>
    <a target="_blank" onmouseover="MAJ_button.src='../../bilder/majrapporten_b.gif';window.status='Majrapporten, öppnas i nytt fönster'; return true" onmouseout="MAJ_button.src='../../bilder/majrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(5)%>">
    <img border="0" src="../../bilder/majrapporten.gif" name="MAJ_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(6) <> "" then %>
    <a target="_blank" onmouseover="JUN_button.src='../../bilder/junirapporten_b.gif';window.status='Junirapporten, öppnas i nytt fönster'; return true" onmouseout="JUN_button.src='../../bilder/junirapporten.gif';window.status=' '; return true" href="<%=Rapportarray(6)%>">
    <img border="0" src="../../bilder/junirapporten.gif" name="JUN_button" width="175" height="20"></a>
<% end if %>    
    </td>
  </tr>
  <tr>
    <td>
<% if Rapportarray(7) <> "" then %>
    <a target="_blank" onmouseover="JUL_button.src='../../bilder/julirapporten_b.gif';window.status='Julirapporten, öppnas i nytt fönster'; return true" onmouseout="JUL_button.src='../../bilder/julirapporten.gif';window.status=' '; return true" href="<%=Rapportarray(7)%>">
    <img border="0" src="../../bilder/julirapporten.gif" name="JUL_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(8) <> "" then %>
    <a target="_blank" onmouseover="AUG_button.src='../../bilder/augustirapporten_b.gif';window.status='Augustirapporten, öppnas i nytt fönster'; return true" onmouseout="AUG_button.src='../../bilder/augustirapporten.gif';window.status=' '; return true" href="<%=Rapportarray(8)%>">
    <img border="0" src="../../bilder/augustirapporten.gif" name="AUG_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(9) <> "" then %>
    <a target="_blank" onmouseover="SEP_button.src='../../bilder/septemberrapporten_b.gif';window.status='Septemberrapporten, öppnas i nytt fönster'; return true" onmouseout="SEP_button.src='../../bilder/septemberrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(9)%>">
    <img border="0" src="../../bilder/septemberrapporten.gif" name="SEP_button" width="175" height="20"></a>
<% end if %>    
    </td>
  </tr>
  <tr>
    <td>
<% if Rapportarray(10) <> "" then %>
    <a target="_blank" onmouseover="OKT_button.src='../../bilder/oktoberrapporten_b.gif';window.status='Oktoberrapporten, öppnas i nytt fönster'; return true" onmouseout="OKT_button.src='../../bilder/oktoberrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(10)%>">
    <img border="0" src="../../bilder/oktoberrapporten.gif" name="OKT_button" width="175" height="20"></a>
<% end if %>    
    </td>
    <td>
<% if Rapportarray(11) <> "" then %>
    <a target="_blank" onmouseover="NOV_button.src='../../bilder/novemberrapporten_b.gif';window.status='Novemberrapporten, öppnas i nytt fönster'; return true" onmouseout="NOV_button.src='../../bilder/novemberrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(11)%>">
    <img border="0" src="../../bilder/novemberrapporten.gif" name="NOV_button" width="175" height="20"></a>
<% end if %>    
    </td>


  </tr>
  </table>
  
  

<%
'Response.Write = Antal_pdf
    counter = 0
    Do while counter < Antal_pdf
        strPDFlink = path & "/" & AndraPDFarray(counter)
        
        strPDFlink = path & "/" & Replace(Server.URLencode(AndraPDFarray(counter)),"+"," ")

        
        strPDFname = Mid(AndraPDFarray(counter),1,InStr(AndraPDFarray(counter),".pdf")-1)

        If InStr(strPDFname,"Smaland") = 1 then
            strPDFname = "Småland" & Mid(strPDFname,8,len(strPDFname))
        end if
%>
        <a target="_blank" onmouseover="window.status='Öppnas i nytt fönster'; return true" onmouseout="window.status=' '; return true" href="<% =strPDFlink %>">
        <% =strPDFname %></a> 
        <br>
<%


        'Response.Write "<a target='_blank' onmouseover=" & Chr(34) & "window.status='Öppnas i nytt fönster'; return true" & Chr(34) & " onmouseout=" & Chr(34) & "window.status=' '; return true" & Chr(34) & " href=' & strPDFlink & " & Chr(34) & ">" & strPDFname & "</a><br>"
        counter = counter +1
    Loop
%>

<% if Rapportarray(12) <> "" then %>
    <a target="_blank" onmouseover="SLUT_button.src='../../bilder/slutrapporten_b.gif';window.status='Slutrapporten, öppnas i nytt fönster'; return true" onmouseout="SLUT_button.src='../../bilder/slutrapporten.gif';window.status=' '; return true" href="<%=Rapportarray(12)%>">
    <img border="0" src="../../bilder/slutrapporten.gif" name="SLUT_button" width="175" height="20"></a>
<% end if %>    

</td>

    <td style="width: 1px;" align="center" valign="top"></td>
    <td style="width: 138px;" align="center" valign="top">
    <!--
    <a href="Viktstatistik%202008.html">Viktstatistik </a>
    -->
    </td>
    <td style="width: 3px;" align="center" valign="top"></td>
    <td style="width: 217px;" align="center" valign="top">
        
    <a onmouseover="FOTObutton.src='../../../bilder/foton2b.gif';window.status='Fotogalleri'; return true" onmouseout="FOTObutton.src='../../../bilder/foton2.gif';window.status='  '; return true" onclick="FOTObutton.src='../../../bilder/foton2c.gif';window.status='Fotogalleri'; return true" href="../../foton/<%=ArchiveYear %>/galleri.asp">
    <img src="../../../bilder/foton2.gif" name="FOTObutton" border="0" height="20" width="120"></a>
    <br>
    <a onmouseover="window.status='Deltagande lag'; return true" onmouseout="window.status=' '; return true" href="lag/lag.asp">
    Lagen <%=ArchiveYear %></a>

    <br>
        <br>
    <a onmouseover="window.status='Regler läckebyån'; return true" onmouseout="window.status=' '; return true" href="/dokument/Nya_regler_Lackebyan_2009.pdf">
    Nya regler Läckebyån <%=ArchiveYear %></a>

    </td>




  </tr>
  </table> 
<br>
<hr color="#ff0000" size="1">
</center>



</body>

</html>

<%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''%>
<%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''%>
<% function MapURL(path)

     dim rootPath, url

     'Convert a physical file path to a URL for hypertext links.

     rootPath = Server.MapPath("/")
     url = Right(path, Len(path) - Len(rootPath))
     MapURL = Replace(url, "\", "/")

   end function %>
<%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''%>

