<?
    global $vis_language;
    $slaLevel = $slaStaff = $slaLevelData = $slaStaffData = array();
    if($staff==-1)
    {
		echo '<script> $("#pdfDiv").hide();</script>';
		echo $vis_language['TXTNOMATCHFOUND'];
	}
    else {
        //$report_data='';
        for($i=0;$i<10;$i++) { //$report_data.='{"level":'.$staff[$i]['level'].', "title":"'.$staff[$i]['staff_name'].'"},';
        //$report_data=trim($report_data, ',');
        $temp = $temp1 = array();
		$temp[] = $temp1[] = $i;
		$temp[] = $staff[$i]['level'];
		$slaLevel[] = $temp;
		$temp1[] = $staff[$i]['staff_name'];
		$slaStaff[] = $temp1;
		}
		$slaLevelData = json_encode($slaLevel);
		$slaStaffData = json_encode($slaStaff);
		$chart_area = "#top_performer";
		$yaxisLabel = $vis_language['TXTPOINTS'];
		?>
		<script>
		var domain = $('#department_id option:selected').text();$('.otherSelected').val(domain);
		var durationID = $('#duration option:selected').val(); if(durationID == 4){var custom = $('#vis_top_performance_from_date').val()+ " to " +$('#vis_top_performance_to_date').val(); $('.durationSelected').val(custom);}else{var duration = $('#duration option:selected').text();$('.durationSelected').val(duration);}
		</script>
		<?
		echo "<script>display_bar_chart('".$chart_area."',$slaStaffData,$slaLevelData,'".$yaxisLabel."');</script>";
    }
?>
<div class="col-sm-12">
	<div class="col-sm-4">
		<strong><? echo $vis_language['TXTTKTREPLIEDAFTEROVERDUETIME']?>:</strong> 1 <? echo $vis_language['TXTPOINTS']?>
	</div>
	<div class="col-sm-4">
		<strong><? echo $vis_language['TXTTKTREPLIEDWITHOUTSLA']?>:</strong> 2 <? echo $vis_language['TXTPOINTS']?>
	</div>
	<div class="col-sm-4">
		<strong><? echo $vis_language['TXTTKTREPLIEDWITHINDUETIME']?>:</strong> 3 <? echo $vis_language['TXTPOINTS']?>
	</div>
</div>
<div class="col-sm-12 portlet">
	<div class="panel-body">
		<div id="top_performer" style="height:300px">
		</div>
	</div>
</div>
<input class="durationSelected" type="hidden">
<input class="otherSelected" type="hidden">
