<style>

<!--
#geo_openners_chart .jqplot-grid-canvas,#geo_clickers_chart .jqplot-grid-canvas
{
	display:none;
}
.no_datao
{
    background-color: #F9BB8B;
    border: 1px solid #FF7200;
    color: white;
    margin: 10px;
    padding: 10px;
    text-align: center;
}
.no_datac
{
    background-color: #76BFE0;
    border: 1px solid #006699;
    color: white;
    margin: 10px;
    padding: 10px;
    text-align: center;
}
-->
</style>
<table width="100%" cellspacing="0" cellpadding="0" class="DashboardPanel">
				<tr>
					<td class="PanelContent" valign="top" style="height:auto;">
						<div id="GraphPanel">
							<div class="PanelHeaderBox1 IndexPage_GettingStarted_Header" style="padding:0px 0px 10px 5px;">
								<div id="HomeStartTitle">%%LNG_Addon_geostats_title_open%%</div>
							</div>
							<div>
{if $openners_count==0}
		<div class="no_datao">No data</div>
	{else}
		<table width="100%" border="0" class="Text" align="center" cellpadding="10">
		<tr>
			<td valign="top" style="width:60%;height:300px;">
				<div id="geo_openners_chart" style="text-align:center;margin-left:auto;margin-right:auto;border:1px solid #EEE;height:100%;width:100%;"></div>
			</td>
			<td valign="top" style="width:40%;">
				<div style="height:300px;overflow:auto;">
    				<table border="0" cellspacing="0" cellpadding="0" class="Text" id="SubscriberListManageList" style="width:99%; margin-top: 7px;">
    					<tr>
    						<td></td>
    						<td  style="text-align:center;border-bottom:2px solid #CCC;" width="70%">
    							%%LNG_Addon_geostats_country%%
    						</td>
    						<td  style="text-align:center;border-bottom:2px solid #CCC;" width="30%">
    							Total
    						</td>
    					</tr>
    					{foreach key=key item=item from=$openners_html}
    					<tr class="GridRow">
    						<td><img src="{if $item.country_code=='-'}addons/geostats/templates/unknown.gif{else}addons/geostats/templates/flags/{$item.country_code}.png{/if}" /></td>
    						<td style="font-size:8pt;" class="{if ($maborak.lastindex.$key % 2) == 0}te_r2{/if}">
    							{if $item.country_name=="Unknown"}{$item.country_name}{else}{$item.country_name}
    							<span style="font-size:7pt;">
    							[<a style="font-size:7pt;" href="#" onclick="tb_show('', 'index.php?Page=Addons&Addon=geostats&Action=gc&c={$item.country_code}&t=o&statid={$statid}&Ajax=1&keepThis=true&height=630&width=900&modal=true', '');return false;">%%LNG_Addon_geostats_details%%</a>]
    							[<a style="font-size:7pt;" href="index.php?Page=Addons&Addon=geostats&Action=export&c={$item.country_code}&t=o&statid={$statid}&Ajax=1" >%%LNG_Addon_geostats_export%%</a>]
    							
    							</span>
    							{/if}
    						</td>
    						<td  style="background-color:#FFF;">
    							{$item.total}
    						</td>
    					</tr>
    					{/foreach}
    				</table>
				</div>
			</td>
		</tr>
	</table>
	{/if}
	{if $openners_count>0}
			<div id="openners_chart" style="border:2px solid #FF7200;width:100%;margin-left:auto;margin-right:auto;"></div>
			<script type="text/javascript">
			var drawed_openners_chart = false;
			function draw_openners_chart(id,data)
			{
				if(drawed_openners_chart==true)
				{
					return false;
				}
				drawed_openners_chart = true;
				data= (data.length==0)?[['No Data',1]]:data;
				plot2 = $.jqplot(id, [data], {
					//seriesColors: [ "#FF8928", "#627AAD","#5DA0C1","#3274D0","#00730B","#666","#000"],
				    seriesDefaults:{renderer:$.jqplot.PieRenderer, rendererOptions:{sliceMargin:3,shadowAlpha: 0.07,padding:10}
			    	 },
				    legend:{show:true}
				});
			}
			$(function(){
				/*Opens*/
			      var data = new google.visualization.DataTable();
			      data.addRows({$openners_count});
			      data.addColumn('string', 'Country');
			      data.addColumn('number', 'Opens');
			      {foreach from=$openners item=item key=key}
			      	data.setValue({$key}, 0, '{$item.country_name_filtered}');
				    data.setValue({$key}, 1, {$item.total});
			      {/foreach}
			      new google.visualization.GeoMap(document.getElementById('openners_chart')).draw(data, {'width':"100%",'height':400,colors:[0xFFEBDB,0xFF7200],dataMode:'regions','region':'world','showLegend':true});
			      draw_openners_chart('geo_openners_chart',[{$geo_openners_chart}]);
		      });
			</script>
		{/if}
							</div>
						</div>
					</td>
				</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" class="DashboardPanel">
				<tr>
					<td class="PanelContent" valign="top" style="height:auto;">
						<div id="GraphPanel">
							<div class="PanelHeaderBox1 IndexPage_GettingStarted_Header" style="padding:0px 0px 10px 5px;">
								<div id="HomeStartTitle">%%LNG_Addon_geostats_title_click%%</div>
							</div>
							<div>
	{if $clickers_count==0}
		<div class="no_datac">No data</div>
	{else}
		<table width="100%" border="0" class="Text" align="center" cellpadding="10">
		<tr>
			<td valign="top" style="width:60%;">
				<div id="geo_clickers_chart" style="text-align:center;margin-left:auto;margin-right:auto;border:1px solid #EEE;height:100%;width:100%;"></div>
			</td>
			<td valign="top" style="width:40%;">
				<div style="height:300px;overflow:auto;">
    				<table border="0" cellspacing="0" cellpadding="0" class="Text" id="SubscriberListManageList" style="width:99%; margin-top: 7px;">
    					<tr>
    						<td></td>
    						<td  style="text-align:center;border-bottom:2px solid #CCC;" width="70%" nowrap="nowrap">
    							%%LNG_Addon_geostats_country%%
    						</td>
    						<td  style="text-align:center;border-bottom:2px solid #CCC;" width="30%" nowrap="nowrap">
    							Total
    						</td>
    					</tr>
    					{foreach key=key item=item from=$clickers_html}
    					<tr class="GridRow">
    						<td><img src="{if $item.country_code=='-'}addons/geostats/templates/unknown.gif{else}addons/geostats/templates/flags/{$item.country_code}.png{/if}" /></td>
    						<td style="font-size:8pt;" class="{if ($maborak.lastindex.$key % 2) == 0}te_r2{/if}">
    							{if $item.country_name=="Unknown"}{$item.country_name}{else}{$item.country_name}
    							<span style="font-size:7pt;">
    								[<a style="font-size:7pt;" href="#" onclick="tb_show('', 'index.php?Page=Addons&Addon=geostats&Action=gc&c={$item.country_code}&t=c&statid={$statid}&Ajax=1&keepThis=true&height=630&width=900&modal=true', '');return false;">%%LNG_Addon_geostats_details%%</a>]
    								[<a style="font-size:7pt;" href="index.php?Page=Addons&Addon=geostats&Action=export&c={$item.country_code}&t=c&statid={$statid}&Ajax=1" >%%LNG_Addon_geostats_export%%</a>]
    							
    								</span>
    							{/if}    							
    						</td>
    						<td style="background-color:#FFF;">
    							{$item.total}
    						</td>
    					</tr>
    					{/foreach}
    				</table>
				</div>
			</td>
			</tr>
		</table>
	{/if}
			{if $clickers_count>0}
			<div id="clicks_chart" style="border:2px solid #006699;margin-left:auto;margin-right:auto;"></div>
			<script type="text/javascript">
				var drawed_clickers_chart = false;
				function draw_clickers_chart(id,data)
				{
					if(drawed_clickers_chart==true)
					{
						return false;
					}
					drawed_clickers_chart = true;
					data= (data.length==0)?[['No Data',1]]:data;
					plot2 = $.jqplot(id, [data], {
						//seriesColors: [ "#FF8928", "#627AAD","#5DA0C1","#3274D0","#00730B","#666","#000"],
					    seriesDefaults:{renderer:$.jqplot.PieRenderer, rendererOptions:{sliceMargin:3,shadowAlpha: 0.07,padding:10}
				    	 },
					    legend:{show:true}
					});
				}
				$(function(){
				      var data = new google.visualization.DataTable();
				      data.addRows({$clickers_count});
				      data.addColumn('string', 'Country');
				      data.addColumn('number', 'Click');
				      {foreach from=$clickers item=item key=key}
				      	data.setValue({$key}, 0, '{$item.country_name_filtered}');
					    data.setValue({$key}, 1, {$item.total});
				      {/foreach}
				      new google.visualization.GeoMap(document.getElementById('clicks_chart')).draw(data, {'width':"100%",'height':400,dataMode:'regions','region':'world','showLegend':true});
				      draw_clickers_chart('geo_clickers_chart',[{$geo_clickers_chart}]);
				});
			</script>
		{/if}
							</div>
						</div>
					</td>
				</tr>
</table>