var moduleakses=(function(){
	var hal=0;
	var jumlah=30;
	var boxplugin=null;
	return{
		caricanggih:function(){
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"datacari01",1:1}
			};
			
			$.ajax({url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					mload.hd();
					if(e!=false){
						var boxcari;
						var obj=new Object;
						obj.proses=function(a){
							$("#cari").val(a);
							boxcari.tutup();
							document.getElementById("btcari").click();
						};
						var datacari={"data":e,"proses":obj}
						boxcari=caricanggih.buka(datacari);
					}
				}
			});
		},
		enter:function(e){
			if(e.which == 13 || e.keyCode == 13){
				moduleakses.loade();
			}
		},
		loade:function(){
			$("#hal_ke").val(0);
			moduleakses.load();
		},
		load:function(){
			var nohal=$("#hal_ke").val()
			jumlah=$("#jumlah_hal").val();
			hal=(nohal-1)*jumlah;
			var cr=$("#cari").val();
			
			$("#grid_moduleakses").html("");
			mload.sh();
			var ik_data = {
				ajax: 1,
				mode: "mod",
				cl: "moduleakses",
				ikdata: {0:"getTabel",1:hal,2:jumlah,3:cr}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",
				type: "POST",
				dataType: "json",
				async:true,
				data: ik_data,
				success: function(e){
					
					mload.hd();
					
					if(e!=false){
						if(e.length>0 && e[0]['halaman']>0){
							var htm;
							for(var i=0;i<e[0]['halaman'];i++){
								htm+="<option value='"+(i+1)+"'>"+(i+1)+"</option>";
							}
							$("#hal_ke").html(htm);
							
						}
						$("#hal_ke").val(nohal);
						
						var datatb={
							box:"grid_moduleakses",
							data:e,
							lebarmin:"500px",
							tbheader:"tidak",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							isi:[
									{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":hal,"jumlah":jumlah},
									{"col":"id","judul":"ID/Kode","tipe":"data","lebar":"50px"},
									{"col":"nama","judul":"Nama Module","tipe":"data"},
									{"col":"module","judul":"Module","tipe":"data","lebar":"150px"},
									{"align":"center","judul":"Level Akses","tipe":"tpl","tpl":"btakses","lebar":"80px"},
									{"align":"center","judul":"Upload","tipe":"tpl","tpl":"btupload","lebar":"70px"},
									{"align":"center","judul":"Plg. Cetak","tipe":"tpl","tpl":"btjumlahcetak","lebar":"70px"},
									{"align":"center","judul":"Status","tipe":"tpl","tpl":"btstatus","lebar":"60px"},
									
									
								],
							mod:"mod",
							module:"moduleakses"
						};
						tabel.multisub(datatb);
					}
				}
			});
		},
		loadakses:function(a,b,c,d){
			var idtb=b+"_"+c;
			var htm="<div align='left' style='padding-top:10px;padding-bottom:10px;width:100%;'>";
			htm+="<div style='margin-top:10px;margin-bottom:10px;'><b>MODULE AKSES</b></div>";
			htm+="<div id='grid_akses_"+idtb+"'></div>";
			
			htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
			htm+="<div align='left'>";
			htm+="<span class='btmerah medium' id='bt_hide_"+idtb+"'>TUTUP</span> ";
			htm+="</div>";
			htm+="</div>";
			
			htm+="</div>";
			var obj=new Object;
			obj.html=htm;
			//alert(b);
			
			if(tabel.gettabel(b)!=null){
				
				tabel.gettabel(b).maxim(obj,c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
				d.offsetParent.setAttribute("class","garis_kiri_td bghijau");
			};
			
			document.getElementById("bt_hide_"+idtb).onclick=function(){
				tabel.gettabel(b).minim(c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
			};
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"getakses",1:a,2:tabel.gettabel(b).getdata(c,"level")}};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					mload.hd();
					
					
					if(e!=false && e.length>0){
						
						var datatb={
							box:"grid_akses_"+idtb,
							data:e,
							lebarmin:"500px",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							tbclass:"table_grid-1",
							tabelpar:b,
							barispar:c,
							isi:[
									{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":0},
									{"col":"namalevel","judul":"Level","tipe":"data"},
									{"judul":"Akses","tipe":"tpl","tpl":"btlevelstatus","lebar":"50px","align":"center"}
								],
							mod:"mod",
							module:"moduleakses"
						};
						tabel.multisub(datatb);
					}else{
						$("#grid_akses_"+idtb).html("TIDAK ADA LEVEL");
					}
				}
			});
		},
		setstatus:function(a,b,c,d){
			
			var st=1;
			if(tabel.gettabel(b).getdata(c,"status")==1){
				st=0;
			}
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"setStatus",status:st,id:a}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					mload.hd();
					
					if(e==1){
						if(st==1){
							d.className="mini_ok";
						}else{
							d.className="mini_dis";
						}
						tabel.gettabel(b).setdata(c,"status",st);
					}
				}
			});
		},
		setakses:function(a,b,c,d){
			var st=1;
			if(tabel.gettabel(b).getdata(c,"status")==1){
				st=0;
			}
			
			var tbpar=tabel.gettabel(b).parrent;
			var idmodule=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"setStatusakses",status:st,level:a,
					idmodule:idmodule}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					mload.hd();
					
					if(e==1){
						var el=document.getElementById("btakses_"+tbpar.tabel+"_"+tbpar.baris);
						var total=parseInt(tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"jumlah_akses"));
						if(st==1){
							total=total+1;
							d.className="mini_ok";
						}else{
							total=total-1;
							d.className="mini_dis";
						}
						el.innerHTML=total;
						tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"jumlah_akses",total);
						tabel.gettabel(b).setdata(c,"status",st);
					}
				}
			});
		},
		loadaksessub:function(a,b,c,d){
			var idtb=b+"_"+c;
			var htm="<div align='left' style='padding-top:10px;padding-bottom:10px;width:100%;'>";
			htm+="<div style='margin-top:10px;margin-bottom:10px;'><b>MODULE SUB LEVEL AKSES</b></div>";
			htm+="<div id='grid_subakses_"+idtb+"'></div>";
			
			htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
			htm+="<div align='left'>";
			htm+="<span class='btmerah btnclose' id='bt_hide_"+idtb+"'>TUTUP</span> ";
			htm+="</div>";
			htm+="</div>";
			
			htm+="</div>";
			var obj=new Object;
			obj.html=htm;
			//alert(b);
			
			if(tabel.gettabel(b)!=null){
				
				tabel.gettabel(b).maxim(obj,c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
				d.offsetParent.setAttribute("class","garis_kiri_td bghijau");
			};
			
			document.getElementById("bt_hide_"+idtb).onclick=function(){
				tabel.gettabel(b).minim(c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
			};
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"getaksessub",id:a}};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					mload.hd();
					
					
					if(e!=false && e.length>0){
						
						var datatb={
							box:"grid_subakses_"+idtb,
							data:e,
							lebarmin:"500px",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							tbclass:"table_grid-1",
							tabelpar:b,
							barispar:c,
							isi:[
									{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":0},
									{"col":"namalevel","judul":"Level","tipe":"data","lebar":"150px"},
									{"col":"namasublevel","judul":"Sub","tipe":"data"},
									{"judul":"Akses","tipe":"tpl","tpl":"btlevelsubstatus","lebar":"50px","align":"center"}
								],
							mod:"mod",
							module:"moduleakses"
						};
						tabel.multisub(datatb);
					}else{
						$("#grid_akses_"+idtb).html("TIDAK ADA LEVEL");
					}
				}
			});
		},
		setaksessub:function(a,b,c,d){
			var st=1;
			if(tabel.gettabel(b).getdata(c,"status")>0){
				st=0;
			}
			var tbpar=tabel.gettabel(b).parrent;
			var idmodule=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
			var idlevel=tabel.gettabel(b).getdata(c,"idlevel");
			var kodesub=tabel.gettabel(b).getdata(c,"kode");
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"setStatusaksessub",status:st,kodesub:kodesub,idmodule:idmodule,idlevel:idlevel}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					mload.hd();
					
					if(e==1){
						var el=document.getElementById("btaksessub_"+tbpar.tabel+"_"+tbpar.baris);
						var total=parseInt(tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"jumlah_akses_sub"));
						d.className="mini_dis";
						if(st==1){
							total=total+1;
							d.className="mini_ok";
						}else{
							total=total-1;
							d.className="mini_dis";
						}
						el.innerHTML=total;
						tabel.gettabel(b).setdata(c,"status",st);
						tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"jumlah_akses_sub",total);
						
					}
				}
			});
		},
		loadupload:function(a,b,c,d){
			var idtb=b+"_"+c;
			var htm="<div align='left' style='padding-top:10px;padding-bottom:10px;width:100%;'>";
			htm+="<div style='margin-top:10px;margin-bottom:10px;'><b>MODULE JENIS UPlOAD</b></div>";
			htm+="<div id='grid_akses_"+idtb+"'></div>";
			
			htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
			htm+="<div align='left'>";
			htm+="<span class='btmerah medium' id='bt_hide_"+idtb+"'>TUTUP</span> ";
			htm+="</div>";
			htm+="</div>";
			
			htm+="</div>";
			var obj=new Object;
			obj.html=htm;
			//alert(b);
			
			if(tabel.gettabel(b)!=null){
				
				tabel.gettabel(b).maxim(obj,c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
				d.offsetParent.setAttribute("class","garis_kiri_td bghijau");
			};
			
			document.getElementById("bt_hide_"+idtb).onclick=function(){
				tabel.gettabel(b).minim(c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
			};
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"getupload",idmodule:a}};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					mload.hd();
					
					
					if(e!=false && e.length>0){
						
						var datatb={
							box:"grid_akses_"+idtb,
							data:e,
							lebarmin:"500px",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							tbclass:"table_grid-1",
							tabelpar:b,
							barispar:c,
							isi:[
									//{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":0},
									{"col":"id","judul":"ID/Kode","tipe":"data","lebar":"50px"},
									{"col":"jenis","judul":"Jenis Upload","tipe":"data"},
									{"col":"tipefile","judul":"Ext","tipe":"data","lebar":"180px"},
									{"judul":"Akses","tipe":"tpl","tpl":"btuploadstatus","lebar":"50px","align":"center"}
								],
							mod:"mod",
							module:"moduleakses"
						};
						tabel.multisub(datatb);
					}else{
						$("#grid_akses_"+idtb).html("TIDAK ADA JENIS UPLOAD");
					}
					
				}
			});
		},
		setaksesupload:function(a,b,c,d){
			var st=1;
			if(tabel.gettabel(b).getdata(c,"status")==1){
				st=0;
			}
			
			var tbpar=tabel.gettabel(b).parrent;
			var idmodule=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
			
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"setStatusupload",status:st,idjenis:a,idmodule:idmodule}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					mload.hd();
					//alert(JSON.stringify(e));
					if(e==1){
						var el=document.getElementById("btupload_"+tbpar.tabel+"_"+tbpar.baris);
						var jm=parseInt(tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"jumlah_upload"));
						if(st==1){
							jm++;
							d.className="mini_ok";
						}else{
							jm--;
							d.className="mini_dis";
						}
						el.innerHTML=jm;
						tabel.gettabel(b).setdata(c,"status",st);
						tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"jumlah_upload",jm);
						
					}
				}
			});
		},
		
		bukacetak:function(a,b,c,d){
			var idtb=b+"_"+c;
			var htm="<div align='left' style='padding-top:10px;padding-bottom:10px;width:100%;'>";
			htm+="<div style='margin-top:10px;margin-bottom:10px;'><b>DATA MODULE CETAK</b></div>";
			htm+="<div id='grid_cetak_"+idtb+"'></div>";
			
			htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
			htm+="<div align='left'>";
			htm+="<span class='btmerah medium' id='bt_hide_"+idtb+"'>TUTUP</span>&nbsp;&nbsp;";
			htm+="<span class='bthijau medium' id='bt_input_"+idtb+"'>INPUT PLUGIN CETAK</span> ";
			htm+="</div>";
			htm+="</div>";
			
			htm+="</div>";
			var obj=new Object;
			obj.html=htm;
			//alert(b);
			
			if(tabel.gettabel(b)!=null){
				
				tabel.gettabel(b).maxim(obj,c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
				d.offsetParent.setAttribute("class","garis_kiri_td bghijau");
			};
			
			document.getElementById("bt_hide_"+idtb).onclick=function(){
				tabel.gettabel(b).minim(c);
				var trparr=d.offsetParent.parentNode;
				var tdarr=trparr.childNodes;
				for(var n=0;n<tdarr.length;n++){
					tdarr[n].removeAttribute("class");
					tdarr[n].setAttribute("class","garis_kiri_td");
				}
			};
			
			document.getElementById("bt_input_"+idtb).onclick=function(){
				$("#grid_data_layanan").html("");
			
				var ps={"box":"box_cari_plugin",
					"judul":"Pilih Plugin Cetak",tinggi:"auto","lebar":"500px"};
		
				boxplugin=boxwin.load(ps);
				boxplugin.idmodule=a;
				boxplugin.tabel=b;
				boxplugin.baris=c;
				boxplugin.el=d;
				boxplugin.arrpilih=[];
				boxplugin.buka();
				
				moduleakses.loadeplugin();
			};
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"getDatacetak",idmodule:a}};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					mload.hd();
					
					
					if(e!=false && e.length>0){
						
						var datatb={
							box:"grid_cetak_"+idtb,
							data:e,
							lebarmin:"500px",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							tbclass:"table_grid-1",
							tabelpar:b,
							barispar:c,
							isi:[
									{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":0},
									{"col":"namaplugin","judul":"Plugin Cetak","tipe":"data"},
									{"judul":"Hapus","tipe":"tpl","tpl":"bthapuscetak","lebar":"50px","align":"center"}
								],
							mod:"mod",
							module:"moduleakses"
						};
						tabel.multisub(datatb);
					}else{
						$("#grid_cetak_"+idtb).html("BELUM ADA PLUGIN CETAK");
					}
				}
			});
		},
		loadeplugin:function(){
			$("#hal_ke_plugin").val(0);
			moduleakses.loaddataplugin($("#hal_ke_plugin").val(),$("#jumlah_hal_plugin").val());
		},
		loadplugin:function(){
			moduleakses.loaddataplugin($("#hal_ke_plugin").val(),$("#jumlah_hal_plugin").val());
		},
		enterplugin:function(e){
			if(e.which == 13 || e.keyCode == 13){
				moduleakses.loadeplugin();
			}
		},
		loaddataplugin:function(h,jm){
			$("#grid_data_plugin").html("");
			
			var cr=$("#cari_plugin").val();
			var posisiawal=(h-1)*jumlah;
			
			$("#hal_ke_plugin").html("<option value=\"1\">1</option>");
			
			mload.sh();
			var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
				ikdata: {0:"getdataplugin",halaman:h,jumlah:jm,cari:cr,idmodule:boxplugin.idmodule}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					mload.hd();
					//alert(JSON.stringify(e));
					if(e!=false && e.hasOwnProperty("data")){
						if(e['data'].length>0){
							var jumlahhalaman=e['totalhalaman'];
							if(jumlahhalaman>1){
								var htm;
								for(var i=0;i<jumlahhalaman;i++){
									htm+="<option value='"+(i+1)+"'>"+(i+1)+"</option>";
								}
								$("#hal_ke_plugin").html(htm);
								
							}
							$("#hal_ke_plugin").val(h);
							
							var datatb={
								box:"grid_data_plugin",
								data:e['data'],
								lebarmin:"500px",
								trklik:{"data":"id","fungsi":"barisklik"},
								title:"kategori Menu",
								isi:[
										{"col":"","judul":"No","tipe":"urut","align":"center","lebar":"50px","halaman":posisiawal,"jumlah":jumlah},
										{"col":"nama","judul":"Nama Plugin","tipe":"data"},
										{"col":"module","judul":"Module","tipe":"data","lebar":"170px"},
										{"align":"center","judul":"","tipe":"tpl","tpl":"btpilihplugin","lebar":"60px"}
									],
								mod:"mod",
								module:"moduleakses"
							};
							var tbplugin=tabel.multisub(datatb);
						}else{
							$("#grid_data_plugin").html("Tidak ada data");
						}
						
					}else{
						$("#grid_data_plugin").html("Error");
					}
				}
			});
		},
		pilihdataplugin:function(a,b,c,d){
			var idtb=b+"_"+c;
            var attst=document.getElementById("btpilihplugin_"+idtb).getAttribute("stpilih");
            
            var st=0;
            if(attst==0){
                st=1;
                boxplugin.arrpilih.push(a);
                
                document.getElementById("btpilihplugin_"+idtb).className="bt_ya";
                document.getElementById("btpilihplugin_"+idtb).setAttribute("stpilih",1);
            }else{
                var index = kudus.getindexarr(a,boxplugin.arrpilih);
                if(index > -1)  {
                    boxplugin.arrpilih.splice(index, 1);
                }
                
                document.getElementById("btpilihplugin_"+idtb).className="bt_tidak";
                document.getElementById("btpilihplugin_"+idtb).setAttribute("stpilih",0);
            }
		},
		prosespilihplugin:function(){
			if(boxplugin.arrpilih.length<=0) return;
		 	mload.sh("box_loader_input");
            var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
                ikdata: {0:"simpanmoduleplugin",idmodule:boxplugin.idmodule,
                	dataplugin:boxplugin.arrpilih}
            };
            
            $.ajax({
                url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
                success: function(e){
                    
                    mload.hd();
                    //alert(JSON.stringify(e));
                    if(e==1){
                    	var jumlah=parseInt(tabel.gettabel(boxplugin.tabel).getdata(boxplugin.baris,"jumlah_cetak")) + boxplugin.arrpilih.length;
                    	boxplugin.el.innerHTML=jumlah;
                    	tabel.gettabel(boxplugin.tabel).setdata(boxplugin.baris,"jumlah_cetak",jumlah);
                    	
                    	moduleakses.bukacetak(boxplugin.idmodule,boxplugin.tabel,boxplugin.baris,boxplugin.el);
                        moduleakses.batalpilihplugin();
                    }else if(e==2){
                        alert("Data plugin tidak ada");
                    }else{
                    	alert("Error");
                    }
                }
            });
		},
		hapuscetak:function(a,b,c,d){
			if(a<=0) return;
			var boxyesno=null;
			var databox={
				judul:"Yakin akan menghapus data plugin module ini ?? ",
				proses:function(){
					mload.sh();
		            var ik_data = {ajax: 1,mode: "mod",cl: "moduleakses",
		                ikdata: {0:"hapusplugin",id:tabel.gettabel(b).getdata(c,"id")}
		            };
		            
		            $.ajax({
		                url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
		                success: function(e){
		                    
		                    mload.hd();
		                    //alert(JSON.stringify(e));
		                    if(e==1){
		                    	var tbpar=tabel.gettabel(b).parrent;
		                    	var jumlah=parseInt(tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"jumlah_cetak")) -1;
		                    	var el=document.getElementById("btjumlahcetak_"+tbpar.tabel+"_"+tbpar.baris);
		                    	
		                    	el.innerHTML=jumlah;
		                    	tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"jumlah_cetak",jumlah);
		                    	
		                    	var idmodule=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
		                    	
		                    	moduleakses.bukacetak(idmodule,tbpar.tabel,tbpar.baris,el);
		                        boxyesno.tutup();
		                    }else if(e==2){
		                        alert("Data plugin tidak ada");
		                    }else{
		                    	alert("Error");
		                    }
		                }
		            });
		            
				}
			};
			boxyesno=boxwin.yesno(databox);
			boxyesno.buka();
		},
		batalpilihplugin:function(){
			if(boxplugin!=null) boxplugin.tutup();
			boxplugin=null;
		},
	};
})();