<script>
		 $("#tambahkpi").flexigrid({
                url : 'response-asli.php',
                dataType : 'json',
				        method: 'POST',
                colModel :
								[
									{display:'<b class="w3-small">NO</b>', name:'nomor', width:50, align:'center'},
									{display:'<b class="w3-small">OPTION</b>', name:'tomb', width:80, sortable:true, align:'left'},
									//{display:'<b class="w3-small">ID</b>', name:'id', width:200, sortable:true, align:'center'},
									{display:'<b class="w3-small">KPI</b>', name:'kpi',width:100,sortable:true, align:'left'},
									{display:'<b class="w3-small">KODE</b>', name:'kode', width:100, sortable:true, align:'center'},
									{display:'<b class="w3-small">POLARISASI</b>', name:'pola', width:100, sortable:true, align:'left'},
									{display:'<b class="w3-small">DESCRIPTION</b>', name:'des', width:600, sortable:true, align:'left'},
									{display:'<b class="w3-small">SATUAN</b>', name:'sat', width:80, sortable:true, align:'left'},
									{display:'<b class="w3-small">FOKUS</b>', name:'fok', width:200, sortable:true, align:'left'},
									{display:'<b class="w3-small">AREA</b>', name:'area', width:200, sortable:true, align:'left'}
								],
								buttons :
								[
                  {separator:true}
                ],
                searchitems :
								[
                  {display:'KPI', name:'kpi'},
									{display:'KODE', name:'kode', isdefault:false},
                  {display:'POLARISASI', name:'pola', isdefault:false},
									{display:'DESCRIPTION', name:'des', isdefault : false},
									{display:'SATUAN', name:'sat', isdefault : false},
									{display:'FOKUS', name:'fok', isdefault : false},
									{display:'KODE JABATAN', name:'kodejab', isdefault : false},
									{display:'AREA', name:'area', isdefault : false}
               	],
                sortname:"id",
                sortorder:"asc",
                usepager:true,
                title:'<h6>DATA KPI</h6>',
                useRp:true,
                rp:500,
                showTableToggleBtn:true,
								//height:'600',
								striped:true,
                width:'auto'
            });


function masukan(x){
  document.getElementById('id01').style.display='block';
	idkar = document.getElementById('idkarx').value;
	smt = document.getElementById('smtx').value;
	document.getElementById('rangka').src="formeditkpi.php?id="+x+"&idkar="+idkar+"&smt="+smt;
}
function kembaliawal(x){
	location.href="../userkpi/formuserkpiver2.php?idkar="+x;
}
function hapuskan(x,n){
	var r = confirm("APAKAH DATA KPI DENGAN KODE : "+n+" AKAN DIHAPUS ?...");
	if(r == true){
		document.getElementById('rangka').src="hapuskan.php?id="+x;
	}
}

function tambahkan(){
	document.getElementById('id01').style.display='block';
	document.getElementById('rangka').src="tambahdatakpi.php";
}

function keluar(){
	document.getElementById('id01').style.display='none';
	//document.getElementById('rangka').src="hapusrec.php";
}

function kembalikan(){
  $("#piutang").flexReload();
}

function tambah(){
  document.getElementById('ipack').src="tes.php";
}

function uploadkan(){
  document.getElementById('formdoc').submit();
  document.getElementById('keluar').click();
  //alert('uploadkan');
}
</script>
