<div class="middleLeft">
	<div class="middleRight">
		<div class="bottom">
			<div class="bottomLeft">
				<div class="bottomRight" align="center">

<!--- Start --->

{ERROR}
{MESSAGE}
<script src="{global:PATH}js/Trends.js"></script>
<script src="{global:PATH}js/statistics.js"></script>
<script>
	PATH=				'{global:PATH}';
	newsletter_id=			'{global:n_id}';
	currentSourceMenuItem=		'source_{global:graph_source}';
	currentRateSourceMenuItem=	'rate_source_{global:rate_source}';
	currentRateViewMenuItem=	'rate_view_{global:rate_view}';
	currentTrendByMenuItem=		'trend_by_{global:trend_by}';
	sourceMenuActiveContainer=	'<div class="fields_s"><div class="left"><div class="right">%item%</div></div></div>';
	Trend.setUrl('trendData.php');
	Trend.setParameter('n_id', '{n_id}');
	Trend.setParameter('trend_by', '{trend_by}');
</script>
<div class="statistics">
	<div class="top_fields">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
		{row:TOP_FIELDS}
		<td>
			{if:selected}<div class="active">{/if}
			<a href="{global:PATH}statistics/{global:MODULE_NAME}/{id}/?n_id={global:n_id}">{title}</a>
			{if:selected}</div>{/if}
		</td>
		{/row}
		</tr>
		</table>
	</div>
	<div><img src="{global:PATH}img/spacer.gif" width="1" height="25" border="0"></div>

	<form action="{global:LINK}" method="POST">
	<div class="newsletter_list">
		<div>{rs:SELECT_NEWSLETTER}:</div>
		<select name="n_id" onchange="submit();">
		{row:NEWSLETTER_LIST}
		<option value="{id}"{if:selected} selected{/if} title="{title}">{name}</option>
		{/row}
		</select>
	</div>
	<div><img src="{global:PATH}img/spacer.gif" width="1" height="50" border="0"></div>
	</form>

	<div class="filters" id="sourceMenu">
		<div class="title">{rs:STATISTICS_GRAPH_SOURCE}:</div>
		{row:GRAPH_SOURCE_SELECT}
		<div class="item" id="source_{id}">
			{if:active}<div class="fields_s"><div class="left"><div class="right">{/if}
			<div class="text">{title}</div>
			{if:active}</div></div></div>{/if}
		</div>
		{/row}
		<div class="br"></div>
	</div>

	<div id="chartTopContainer" align="center">
		<script type="text/javascript" src="{global:PATH}js/swfobject.js"></script>
		<div id="flashcontent"><strong>You need to upgrade your Flash Player</strong></div>
		<script>createSourceChart('{n_id}', '{graph_source}');</script>
	</div>
	<div><img src="{global:PATH}img/spacer.gif" width="1" height="25" border="0"></div>

	<div class="trend">
		<div class="header">{trend_title} {rs:TREND} <span class="count" id="trend_header_count">{trend_count}</span> <span class="percent">(<span id="trend_header_percent">{trend_percent}%</span>)</span></div>
		<div id="trendByMenu" class="filters">
			<div class="title">{rs:STATISTICS_TREND_BY}:</div>
			{row:TREND_BY_SELECT}
			<div class="item" id="trend_by_{id}">
				{if:active}<div class="fields_s"><div class="left"><div class="right">{/if}
				<div class="text">{title}</div>
				{if:active}</div></div></div>{/if}
			</div>
			{/row}
			<div class="br"></div>
		</div>
		<div class="brr"></div>
		<table width="100%" cellspacing="0" cellpadding="0" border="0" class="grid">
		<tr>
		{row:TRENDS}
		<td width="20%" class="items">
			<div id="trend_{id}_container" class="{class}">
				<div class="field">{title}:</div>
				<div class="count"><span id="trend_{id}_count">{count}</span> <span class="percent">(<span id="trend_{id}_percent">{percent}%</span>)</span></div>
			</div>
		</td>
		{/row}
		</tr>
		</table>
		<!--- <script language="JavaScript">Trend.getData();</script> --->
	</div>


	<table width="100%" cellspacing="0" cellpadding="0" border="0" class="statistic_info">
	<tr>
	<td colspan="2" class="header">{rs:STATISTICS_BRIEF_DETAILS}</td>
	<td id="rateSourceMenu">
		{row:RATE_SOURCE}
		{if:!first}<div class="splitter">|</div>{/if}
		<div class="item{if:selected} active{/if}" id="rate_source_{id}">{title}</div>
		{/row}
		<div class="br"></div>
	</td>
	</tr>

	<tr>
	<td valign="top" width="50%" class="field">{rs:STATISTICS_OVERVIEW_SUBJECT}:</td>
	<td valign="top" width="50%" class="value"><b><a href="{global:PATH}newsletters/?edit={n_id}" class="red">{subject}</a></b></td>
	<td align="center" valign="center" rowspan="10" class="graph">
		<div id="rateChartContainer"><strong>You need to upgrade your Flash Player</strong></div>
		<script>createRateChart('{n_id}', '{rate_source}', '{rate_view}');</script>
	</td>
	</tr>

	<tr class="dark">
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_GROUPS}:</td>
	<td valign="top" class="value">
		{row:GROUPS_LIST}<span class="arrow"><b>{n}. <a href="{global:PATH}subscribers/?g_id={id}" class="red">{title}</a></b> ({count})</span><br/>{/row}
	</td>
	</tr>

	<tr>
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_TOTAL_SUBSCRIBERS}:</td>
	<td valign="top" class="value">{subscribers}</td>
	</tr>

	<tr class="dark">
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_CREATED}:</td>
	<td valign="top" class="value">{date_created}</td>
	</tr>

	<tr>
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_LAST_MODIFIED}:</td>
	<td valign="top" class="value">{modify_time}</td>
	</tr>

	<tr class="dark">
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_TOTAL_MAILING_DELIVERIES}:</td>
	<td valign="top" class="value">{deliveries_count}</td>
	</tr>

	<tr>
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_LAST_MAILING_DELIVERY}:</td>
	<td valign="top" class="value">
		{unless:!last_delivery}
		{last_delivery}<br />
		{rs:BY}
		<span class="red"><b>{if:last_delivery_user}<a href="{global:PATH}users/?edit={last_delivery_user}">{/if}{if:last_delivery_name}{last_delivery_name}{/if}{if:!last_delivery_name}{rs:UNKNOWN}{/if}{if:last_delivery_user}</a>{/if}</b></span></td>
		{/unless}
		{unless:last_delivery}-{/unless}
	</td>
	</tr>

	<tr class="dark">
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_ACCESSED_BY}:</td>
	<td valign="top" class="value">
		{row:ACCESSED_BY_LIST}
		<div><b><a href="{global:PATH}users/?edit={id}" class="red arrow">{title}</a></b></div>
		{/row}
	</td>
	</tr>

	<tr>
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_DELIVERY_RATE}:</td>
	<td valign="top" class="value">{delivery_rate}%</td>
	</tr>

	<tr class="dark">
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_CLICK_RATE}:</td>
	<td valign="top" class="value">{click_rate}%</td>
	</tr>

	<tr>
	<td valign="top" class="field">{rs:STATISTICS_OVERVIEW_CLICK_BOUNCED_RATE}:</td>
	<td valign="top" class="value">{bounced_rate}%</td>
	<td class="rate_view" valign="bottom">
		<div id="rateViewMenu" class="filters">
			<div class="title">{rs:STATISTICS_RATE_VIEW}:</div>
			{row:RATE_VIEW}
			<div id="rate_view_{id}" class="item">
				{if:active}<div class="fields_s"><div class="left"><div class="right">{/if}
				<div class="text">{title}</div>
				{if:active}</div></div></div>{/if}
			</div>
			{/row}
			<div class="br"></div>
		</div>
		<div class="brr"></div>
	</td>
	</tr>

	<tr>
	<td width="170" class="bottom_line"><img src="{global:PATH}img/spacer.gif" width="150" height="1" border="0"></td>
	<td class="bottom_line"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0"></td>
	<td width="50%" class="bottom_line"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0"></td>
	</tr>
	</table>
</div>
<!--- End --->

				</div>
			</div>
		</div>
	</div>
</div>

<script language="JavaScript">
	Trend.getData();
</script>
