<div id="primary_header">
  <h1><?php print $this->translate('Sent Messages')?></h1>

	<div id="back_button" style="filter: none;">
		<a href="#" id='day'>
			<span class="stronglastword"><?php echo $this->translate('Day') ?></span>
		</a>
		
		<a href="#" id='week'>
			<span class="stronglastword"><?php echo $this->translate('Week') ?></span>
		</a>

		<a href="#" id='month'>
			<span class="stronglastword"><?php echo $this->translate('Month') ?></span>
		</a>
		
		<a href="#" id='year'>
			<span class="stronglastword"><?php echo $this->translate('Year') ?></span>
		</a>
	</div>

</div>

<div id="primary_content">
  <div id="primary_content_inner">

<div class='statContainer'>
<div id="loginGraph" class='statGraph'></div>

	<div class='statLeft'>

		<div class='statBlock'>
			<div id="sentGraphTotal" class='statGraphSmall' logtype=''></div>
			<span class="downloadLog"></span>
			<span class="statTotal"></span>
			<span class='statName'><?php echo $this->translate('Sent Messages') ?></span>
		</div>

		<!--
		<div class='statBlock'>
			<div id="sentGraphSMTP" class='statGraphSmall' logtype=''></div>
			<span class="statTotal"></span>
			<span class='statName'>SMTP Sent</span>
		</div>
	-->
	</div>

	<div class='statRight'>
	
		<!--
		<div class='statBlock'>
			<div id="sentGraphWebmail" class='statGraphSmall' logtype=''></div>
			<span class="statTotal"></span>
			<span class='statName'>Webmail Sent</span>
		</div>
		-->
	
	</div>

  </div>
</div>

<script type="text/javascript" language="JavaScript">
$( function() {  

    var data = [];

    generateLargeGraph($("#sentGraph"), '<?php echo $this->moduleBaseUrl ?>/graph/json/view/', '<?php echo $this->view; ?>', 'Log_SendMail');
    generateSmallGraph($('#sentGraph'), "<?php echo $this->moduleBaseUrl ?>/graph/json/view/", "<?php echo $this->view; ?>", "Log_SendMail");

	$('#sentGraph #back_button A').each(function(n) {
		var record = this;

		$(this).bind('click', function() {
			$("#sentGraph").load('<?php echo $this->moduleBaseUrl ?>/dashboard/sent/view/' + $(record).attr('id'));		
		});

	});

	// Make the graphs available to click
	$('.statTotal').viewLogs('<?php echo $this->moduleBaseUrl ?>', 'Log_SendMail', '<?php echo $this->view ?>');

	$('.stronglastword').each( function() { $(this).stronglastword() });
	
	// Update the activeState
	$("#sentGraph #back_button #<?php echo $this->view ?> SPAN").addClass('activeState');
	$("#sentGraph #back_button #<?php echo $this->view ?>").addClass('activeState');

});

</script>
