<%
If 	Session("statmentor_date1") = "" Then
	Response.Redirect "selectperiod.asp"
End If
%>
<!--#include file="incstats.asp"-->
<!--#include file="menu.inc"-->
<!--#include Virtual="/common/config.inc"-->
<html>

<head>
<%


%>



<title><%=strtitle%></title>
<style type="text/css">
<!--
     body {  font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
     td {  font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
     th {  font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
A:link	{color: blue;}
A:visited	{color: blue;}
A:hover	{color: red; text-decoration: underline;}
a{text-decoration:none}
-->
</style>
</head>

<body>

<table align="center" bgColor="#003399" border="0" cellPadding="3" cellSpacing="0" height="100%" width="100%">
  <tbody>
    <tr>
      <td vAlign="top" width="50%" height="60">
      <b><font color="#ECECD9" face="verdana,arial,helvetica" size="1"><%=straddress%></font></b>
      </td>
      <td vAlign="top" width="468" height="60">
      <b><font color="#FFFFFF" face="verdana,arial,helvetica" size="+2"><%=strtitle%> Stats</font></b>
      </td>
    </tr>
    <tr>
      <td height="100%" vAlign="top" width="100%" colspan="2">
        <table align="center" bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
          <tbody>
            <tr>
              <td height="100%" vAlign="top" width="85%">
                <table bgColor="#ffffff" border="0" cellPadding="10" cellSpacing="0" height="100%" width="100%">
                  <tbody>
                    <tr>
                      <td align="left" height="100%" vAlign="top" width="65%">
                        <table border="0" width="100%">
                          <tr>
                            <td width="50%"><b><font color="#aa3333" face="verdana,arial,helvetica" size="4">Pageviews</font></b>
                             
                            </td>
                            <td width="50%">
                            <b>
                            Selected period</b><br>
                            From: <%
                            If Session("statmentor_date1")<> "" Then 
                            	Response.Write Session("statmentor_date1") 
                            End If%><br>
                            To: <%
                            If Session("statmentor_date2")<> "" Then 
                            	Response.Write Session("statmentor_date2") 
                            End If%>
                            </td>
                          </tr>
                        </table>
                        <font color="#aa3333" face="verdana,arial,helvetica" size="+2">
                        <hr color="#000066" noShade SIZE="1">
                             
                        </font>
                             
                        <table border="0" width="100%">
                          <tr>
                            <td width="120" valign="top">
                              <%StatWriteMenu%></td>
                            <td width="70%">
                             
                        &nbsp;
                        <table border="1">
                          <tr>
                            <td bgcolor="#ECECD9"><b>Page</b></td>
                            <td bgcolor="#ECECD9"><b>Nr of pageviews</b></td>
                          </tr>
<%
Dim oDict, oKey, nSum, strfilter
nSum = 0
Set oDict = GetPageViewCount2(Session("statmentor_date1") , Session("statmentor_date2") )
For Each oKey In oDict.Keys 

 strfilter = StrReverse(oKey)
 strfilter = Mid(strfilter,5,Len(strfilter))
 strfilter = Left(strfilter,Instr(1,strfilter, "/",1) - 1)
 strfilter = StrReverse(strfilter)
%>                          
                          <tr>
                            <td><a href="<%=oKey%>?MLS=<%=Left(Right(oKey,9),5)%>"><%=oKey%></a></td>
                            <td><a href="pageviews_graph2.asp?T=3dbar&MLS=<%=strfilter%>" TITLE="Click to View Historical Data for <%=strfilter%>"><% Response.Write oDict.Item(oKey)
    nSum = nSum + oDict.Item(oKey)
    %></a></td>
                          </tr>
<%Next%>  
  <tr>
    <td><b>SUM</b></td>
    <td><b><%=nSum%></b></td>
  </tr>
                        </table>
                             
</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>

</body>

</html>
