var masterjenissurat=(function(){
	var hal=0;
	var jumlah=30;
	var idmasterjenissurat=0;
	var boxjenissurat=null;
	return{
		caricanggih:function(){
			var loadercari=mload.loader({"keterangan":"Proses data..."});
			var ik_data = {ajax: 1,mode: "mod",cl: "masterjenissurat",
				ikdata: {0:"datacari01",1:1}
			};
			
			$.ajax({url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					loadercari.tutup();
					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){
				masterjenissurat.loade();
			}
		},
		loade:function(){
			$("#hal_ke").val(0);
			masterjenissurat.load();
		},
		load:function(){
			var nohal=$("#hal_ke").val()
			jumlah=$("#jumlah_hal").val();
			hal=(nohal-1)*jumlah;
			var cr=$("#cari").val();
			
			$("#grid_masterjenissurat").html("");
			var loaderdata=mload.loading({"el":"loader_datamasterjenissurat"});
			var ik_data = {
				ajax: 1,
				mode: "mod",
				cl: "masterjenissurat",
				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){
					
					loaderdata.tutup();
					//alert(JSON.stringify(e));
					if(e!=false && e.length>0){
						
						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_masterjenissurat",
							data:e,
							lebarmin:"500px",
							trklik:{"data":"id","fungsi":"barisklik"},
							title:"kategori Menu",
							isi:[
									{"col":"id","judul":"ID","tipe":"data","align":"center","lebar":"50px"},
									{"col":"kategori","judul":"Kategori Surat","tipe":"data","lebar":"120px"},
									{"col":"nama","judul":"Nama Jenis Surat","tipe":"data"},
									{"col":"kodesurat","judul":"Kode Surat","tipe":"data","lebar":"80px"},
									{"align":"center","judul":"Sub","tipe":"tpl","tpl":"btjumlahsub","lebar":"60px"},
									{"align":"center","judul":"Masuk/ Keluar","tipe":"tpl","tpl":"btinout","lebar":"70px"},
									{"align":"center","judul":"Sub","tipe":"tpl","tpl":"btjumlahsub","lebar":"60px"},
									{"align":"center","judul":"TPL","tipe":"tpl","tpl":"bttemplate","lebar":"60px"},
									{"align":"center","judul":"Status","tipe":"tpl","tpl":"btstatus","lebar":"60px"},
									{"align":"center","judul":"","tipe":"tpl","tpl":"btedit","lebar":"60px"},
									
								],
							mod:"mod",
							module:"masterjenissurat"
						};
						tabel.multisub(datatb);
					}else{
						loaderdata.pesan("BELUM ADA JENIS SURAT");
					}
				}
			});
		},
		buat:function(a){
			document.location=lokal+"member/mod/masterjenissurat?id="+a+"&scrmenu="+modmenu.getmenuscr();
		},
		kembali:function(){
			document.location=lokal+"member/mod/masterjenissurat?scrmenu="+modmenu.getmenuscr();
		},
		edit:function(a){
			idmasterjenissurat=a['id'];
			$("#sl_kategori").val(a['idkategori']);
			$("#sl_inout").val(a['inout']);
		},
		simpan:function(){
			$("#loader_masterjenissurat").html("");
			var nm=$("#nama").val();
			var iddata=$("#iddata").val();
			var kodesurat=$("#kodesurat").val();
			var idkategori=$("#sl_kategori").val();
			var libsurat=$("#libsurat").val();
			var inout=$("#sl_inout").val();
			
			var err="";
			if(nm=="") err+="Nama Jenis surat belum diisi.</br>";
			if(parseInt(iddata)<=0) err+="ID Jenis surat belum diisi.</br>";
			
			if(err!=""){
				$("#loader_masterjenissurat").html(err);
				return;
			}
			var fg="inputmasterjenissurat";
			if(idmasterjenissurat>0){
				fg="editmasterjenissurat";
			}
			
			var loadersimpan=mload.loader({"keterangan":"Proses simpan data"});
			var ik_data = {
				ajax: 1,
				mode: "mod",
				cl: "masterjenissurat",
				ikdata: {0:fg,nama:nm,
					kodesurat:kodesurat,
					idkategori:idkategori,
					iddata:iddata,
					libsurat:libsurat,
					inout:inout,
					id:idmasterjenissurat}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",
				type: "POST",
				dataType: "json",
				async:true,
				data: ik_data,
				success: function(e){
					if(e!=false && e.hasOwnProperty("status")){
						if(e['status']==1){
							masterjenissurat.kembali();
						}else{
							loadersimpan.error(e['pesan']);
						}
						
					}else{
						loadersimpan.error([{"pesan":"Gagal proses simpan data"}]);
					}
				}
			});
		},
		hapus:function(a){
			if(a<=0) return;
			var boxyesno=null;
			var databox={
				judul:"Yakin akan menghapus data jenis surat ini ?? ",
				proses:function(){
					var loaderhapus=mload.loader({"keterangan":"Proses hapus data.."});
					boxyesno.tutup();
					var ik_data = {
						ajax: 1,
						mode: "mod",
						cl: "masterjenissurat",
						ikdata: {0:"hapusData",id:a}
					};
					
					$.ajax({
						url: lokal+"man.ajax.php",
						type: "POST",
						dataType: "json",
						async:true,
						data: ik_data,
						success: function(e){
							if(e!=false && e.hasOwnProperty("status")){
								if(e['status']==1){
									loaderhapus.tutup();
									masterjenissurat.load();
								}else{
									loaderhapus.error(e['pesan']);
								}
							}else{
								loaderhapus.error([{"pesan":"Gagal hapus data"}]);
							}
						}
					});
				}
			};
			boxyesno=boxwin.yesno(databox);
			boxyesno.buka();
		},
		setstatus:function(a,b,c,d){
			var st=1;
			if(tabel.gettabel(b).getdata(c,"status")==1){
				st=0;
			}
			
			var loaderstatus=mload.loader({"keterangan":"Proses update status.."});
			var ik_data = {ajax: 1,mode: "mod",cl: "masterjenissurat",
				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){
					
					
					if(e==1){
						loaderstatus.tutup();
						if(st==1){
							d.className="mini_ok";
						}else{
							d.className="mini_dis";
						}
						tabel.gettabel(b).setdata(c,"status",st)
					}else{
						loaderstatus.error([{"pesan":"Gagal update status"}]);
					}
				}
			});
		},
		bukasub:function(a,b,c,d){
			var namaparr=(tabel.gettabel(b).getdata(c,"nama")).toUpperCase();
			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>SUB JENIS SURAT \""+namaparr+"\"</b></div>";
            htm+="<select id=\"jumlah_hal_"+idtb+"\" class=\"slkecil\" onchange=\"masterjenissurat.loadloadtrxe("+b+","+c+")\">";
            htm+="<option value=\"30\">30</option>";
            htm+="<option value=\"50\">50</option>";
            htm+="<option value=\"100\">100</option>";
            htm+="</select>";
            htm+="&nbsp;&nbsp;Hal <select id=\"hal_ke_"+idtb+"\" class=\"slkecil\" onchange=\"masterjenissurat.loadtrx("+b+","+c+")\"><option value=\"1\">1</option></select>";
            htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
            htm+="<div id='loader_sub_"+idtb+"'></div>";
            htm+="<div id='grid_sub_"+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 SUB JENIS SURAT BARU</span>";
            
            htm+="</div>";
            htm+="</div>";
            
            htm+="</div>";
            var obj=new Object;
            obj.html=htm;
            
            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(){
                var ps={"box":"box_subjenissurat",
					"judul":"INPUT SUB "+namaparr,tinggi:"auto","lebar":"700"};
		
				boxjenissurat=boxwin.load(ps);
				boxjenissurat.id=0;
				boxjenissurat.kode=tabel.gettabel(b).getdata(c,"kode");
				boxjenissurat.idparrent=tabel.gettabel(b).getdata(c,"id");
				boxjenissurat.tabel=b;
				boxjenissurat.baris=c;
				boxjenissurat.el=d;
				boxjenissurat.buka();
				
				$("#loader_sub").html("");
				$("#idsub").val("");
				$("#namasub").val("");
            };
            
			var loaderdatasub=mload.loading({"el":"loader_sub_"+idtb});
			var hal=$("#hal_ke_"+idtb).val();
			var jumlah=$("#jumlah_hal_"+idtb).val();
			var posisiawal=(hal-1)*jumlah;
			
			var ik_data = {
				ajax: 1,
				mode: "mod",
				cl: "masterjenissurat",
				ikdata: {0:"getsubjenissurat",
					halaman:hal,jumlah:jumlah,
					idparrent:a}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",
				type: "POST",
				dataType: "json",
				async:true,
				data: ik_data,
				success: function(e){
					
					if(e!=false && e.hasOwnProperty("data")){
						loaderdatasub.tutup();
						var data=e['data'];
						var jumlahhalaman=e['totalhalaman'];
						if(data.length>0){
							var htm="";
							for(var i=0;i<jumlahhalaman;i++){
								htm+="<option value=\""+(i+1)+"\">"+(i+1)+"</option>";
							}
							$("#hal_ke_"+idtb).html(htm);
							$("#hal_ke_"+idtb).val(hal);
							
							var tabeldata={
								box:"grid_sub_"+idtb,
								data:data,
								lebarmin:"500px",
								trklik:{"data":"id","fungsi":"barisklik"},
								title:"kategori Menu",
								tbclass:"table_grid-1",
								tabelpar:b,
                            	barispar:c,
								isi:[
										{"col":"id","judul":"ID","tipe":"data","align":"center","lebar":"50px"},
										{"col":"nama","judul":"Nama Jenis Surat","tipe":"data"},
										{"align":"center","judul":"Sub","tipe":"tpl","tpl":"btjumlahsub","lebar":"60px"},
										{"align":"center","judul":"Status","tipe":"tpl","tpl":"btstatus","lebar":"60px"},
										{"align":"center","judul":"","tipe":"tpl","tpl":"bteditsub","lebar":"60px"},
									],
								mod:"mod",
								module:"masterjenissurat"
							};
							tabel.multisub(tabeldata);
						}else{
							loaderdatasub.pesan("TIDAK ADA DATA");
						}
					}
				}
			});
		},
		editsub:function(a,b,c,d){
			var tbpar=tabel.gettabel(b).parrent;
			var el=document.getElementById("btjumlahsub_"+tbpar.tabel+"_"+tbpar.baris);
			var namaparr=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"nama");
			
			var ps={"box":"box_subjenissurat",
				"judul":"Edit Sub "+namaparr,tinggi:"auto","lebar":"700"};
			
			boxjenissurat=boxwin.load(ps);
			boxjenissurat.id=a;
			boxjenissurat.kode=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"kode");
			boxjenissurat.idparrent=tabel.gettabel(b).getdata(c,"idparrent");
			boxjenissurat.tabel=tbpar.tabel;
			boxjenissurat.baris=tbpar.baris;
			boxjenissurat.el=el;
			boxjenissurat.buka();
			
			$("#loader_sub").html("");
			$("#idsub").val(tabel.gettabel(b).getdata(c,"id"));
			$("#namasub").val(tabel.gettabel(b).getdata(c,"nama"));
		},
		batalsub:function(){
			if(boxjenissurat!=null) boxjenissurat.tutup();
			boxjenissurat=null;
		},
		inputsub:function(){
			var idtb=boxjenissurat.tabel+"_"+boxjenissurat.baris;
			$("#loader_sub_"+idtb).html("");
			var idsub=$("#idsub").val();
			var namasub=$("#namasub").val();
			var idkategori=tabel.gettabel(boxjenissurat.tabel).getdata(boxjenissurat.baris,"idkategori");
			var err="";
			if(idsub=="") err+="ID sub jenis surat belum diisi!<br/>";
			if(namasub=="") err+="Nama sub jenis surat belum diisi!<br/>";
			if(err!="") {
				$("#loader_sub").html(err);
				return;
			}
			
			var loadersimpansub=mload.loader({"keterangan":"Proses simpan data ..."});
			var fg="inputdatasub";
			if(boxjenissurat.id>0) fg="updatedatasub";
			
			var ik_data = {ajax: 1,mode: "mod",cl: "masterjenissurat",
				ikdata: {0:fg,
					kode:boxjenissurat.kode,
					idkategori:idkategori,
					idsub:idsub,
					namasub:namasub,
					idparrent:boxjenissurat.idparrent,
					id:boxjenissurat.id}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					if(e!=false && e.hasOwnProperty("status")){
						if(e['status']==1){
							loadersimpansub.tutup();
							if(boxjenissurat.id<=0){
								var jumlahsub=parseInt(tabel.gettabel(boxjenissurat.tabel).getdata(boxjenissurat.baris,"jumlah_sub"))+1;
								tabel.gettabel(boxjenissurat.tabel).setdata(boxjenissurat.baris,"jumlah_sub",jumlahsub);
								boxjenissurat.el.innerHTML=jumlahsub;
							}
							var idparrent=boxjenissurat.idparrent;
							masterjenissurat.bukasub(idparrent,boxjenissurat.tabel,boxjenissurat.baris,boxjenissurat.el);
							masterjenissurat.batalsub();
						}else{
							loadersimpansub.error(e['pesan']);
						}
					}else{
						loadersimpansub.error([{"pesan":"Terjadi kesalahan"}]);
					}
				}
			});
		},
		hapussub:function(a,b,c,d){
			if(a<=0) return;
			var boxyesno=null;
			var databox={
				judul:"Yakin akan menghapus data alat ini ?? ",
				proses:function(){
					var loaderhapussub=mload.loader({"keterangan":"Proses hapus data sub..."});
					boxyesno.tutup();
					
					var ik_data = {
						ajax: 1,
						mode: "mod",
						cl: "masterjenissurat",
						ikdata: {0:"hapusdatasub",
							id:a}
					};
					
					$.ajax({
						url: lokal+"man.ajax.php",
						type: "POST",
						dataType: "json",
						async:true,
						data: ik_data,
						success: function(e){
							if(e!=false && e.hasOwnProperty("status")){
								if(e['status']==1){
									var tbpar=tabel.gettabel(b).parrent;
									var el=document.getElementById("btjumlahsub_"+tbpar.tabel+"_"+tbpar.baris);
									var jumlahsub=parseInt(tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"jumlah_sub"))-1;
									tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"jumlah_sub",jumlahsub);
									el.innerHTML=jumlahsub;
									var idparrent=tabel.gettabel(b).getdata(c,"idparrent");
									
									masterjenissurat.bukasub(idparrent,tbpar.tabel,tbpar.baris,el);
									loaderhapussub.tutup();
								}else{
									loaderhapussub.error(e['pesan']);
								}
								
								
							}else{
								loaderhapussub.error([{"pesan":"Gagal hapus data"}]);
							}
						}
					});
				}
			};
			boxyesno=boxwin.yesno(databox);
			boxyesno.buka();
		},
		bukatemplate:function(a,b,c,d){
			var idtb=b+"_"+c;
			var idtpl=tabel.gettabel(b).getdata(c,"idtemplate");
			var namasurat=tabel.gettabel(b).getdata(c,"nama").toUpperCase();
			var htm="<div align='left' style='padding-top:10px;padding-bottom:10px;width:100%;'>";
            htm+="<div style='margin-top:10px;margin-bottom:10px;'><b>TEMPLATE SURAT \""+namasurat+"\"</b></div>";
           	htm+="<div style='margin-top:10px;margin-bottom:10px;'>";
            htm+="<div id='loader_sub_"+idtb+"'></div>";
            htm+="<div id='grid_sub_"+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;";
            if(idtpl<=0){
	            htm+="<span class='bthijau medium' id='bt_input_"+idtb+"'>INPUT TEMPLATE SURAT</span>";
            }
            
            htm+="</div>";
            htm+="</div>";
            
            htm+="</div>";
            var obj=new Object;
            obj.html=htm;
            
            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");
                }
            };
            if(idtpl<=0){
            	document.getElementById("bt_input_"+idtb).onclick=function(){
	                var obj=new Object;
					obj['judul']="Pilih Data Template";
					obj['modepilih']="tunggal";
					obj.pilih=function(a){
						var datatemplate=a;
						var cari=false;
						
						masterjenissurat.simpantpl(datatemplate,a,b,c,d);
					};
					
					pilihtemplate.bukatemplt(obj);
	            };
	            $("#grid_sub_"+idtb).html("Belum ada Template");
            }else{
            	datatb=[];
	            datatb.push({"id":idtpl,"namatemplate":tabel.gettabel(b).getdata(c,"namatemplate")})
            	
            	masterjenissurat.tabeltpl(datatb,a,b,c,d);
            }
            
		},
		edittpl:function(a,b,c,d){
			var tbpar=tabel.gettabel(b).parrent;
			var idjenissurat=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
			var el=document.getElementById("bttemplate_"+tbpar.tabel+"_"+tbpar.baris);
			
			var obj=new Object;
			obj['judul']="Pilih Data Template";
			obj['modepilih']="tunggal";
			obj.pilih=function(a){
				var datatemplate=a;
				var cari=false;
				
				masterjenissurat.simpantpl(datatemplate,idjenissurat,tbpar.tabel,tbpar.baris,el);
			};
			
			pilihtemplate.bukatemplt(obj);
		},
		hapustpl:function(a,b,c,d){
			var tbpar=tabel.gettabel(b).parrent;
			var idtb=tbpar.tabel+"_"+tbpar.baris;
			
			var idjenissurat=tabel.gettabel(tbpar.tabel).getdata(tbpar.baris,"id");
			var el=document.getElementById("bttemplate_"+tbpar.tabel+"_"+tbpar.baris);
			var boxyesno=null;
			var databox={
				judul:"Yakin akan menghapus template pada jenis surat ini ?? ",
				proses:function(){
					var loaderhapussub=mload.loader({"keterangan":"Proses hapus data sub..."});
					boxyesno.tutup();
					
					var ik_data = {
						ajax: 1,
						mode: "mod",
						cl: "masterjenissurat",
						ikdata: {0:"hapusdatatpl",
							idjenissurat:idjenissurat}
					};
					
					$.ajax({
						url: lokal+"man.ajax.php",
						type: "POST",
						dataType: "json",
						async:true,
						data: ik_data,
						success: function(e){
							if(e==1){
								tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"idtemplate",0);
								tabel.gettabel(tbpar.tabel).setdata(tbpar.baris,"namatemplate",'');
								$("#grid_sub_"+idtb).html("Tidak ada data template");
								$("#bt_input_"+idtb).show();
	            				el.className="dok_tidak";
								loaderhapussub.tutup();
							}else{
								loaderhapussub.error([{"pesan":"Gagal hapus data template"}]);
							}
						}
					});
				}
			};
			boxyesno=boxwin.yesno(databox);
			boxyesno.buka();
		},
		tabeltpl:function(datatb,a,b,c,d){
			var idtb=b+"_"+c;
			var tabeldata={
				box:"grid_sub_"+idtb,
				data:datatb,
				lebarmin:"500px",
				trklik:{"data":"id","fungsi":"barisklik"},
				title:"kategori Menu",
				tbclass:"table_grid-1",
				tabelpar:b,
            	barispar:c,
				isi:[
						{"col":"namatemplate","judul":"Nama Template","tipe":"data"},
						{"align":"center","judul":"","tipe":"tpl","tpl":"bthapustpl","lebar":"60px"},
					],
				mod:"mod",
				module:"masterjenissurat"
			};
			tabel.multisub(tabeldata);
		},
		simpantpl:function(datatpl,a,b,c,d){
			var idtb=b+"_"+c;
			var loadersimpanstatus=mload.loader({"keterangan":"Proses update data.."});
			var idjenissurat=tabel.gettabel(b).getdata(c,"id");
			
			var ik_data = {ajax: 1,mode: "mod",cl: "masterjenissurat",
				ikdata: {0:"edittplsurat",
					idtemplate:datatpl['id'],
					idjenissurat:idjenissurat}
			};
			
			$.ajax({
				url: lokal+"man.ajax.php",type: "POST",dataType: "json",async:true,data: ik_data,
				success: function(e){
					
					
					if(e==1){
						loadersimpanstatus.tutup();
						tabel.gettabel(b).setdata(c,"idtemplate",datatpl['id']);
						tabel.gettabel(b).setdata(c,"namatemplate",datatpl['nama']);
						
						datatb=[];
			            datatb.push({"id":datatpl['id'],"namatemplate":datatpl['nama']})
		            	
		            	masterjenissurat.tabeltpl(datatb,a,b,c,d);
		            	$("#bt_input_"+idtb).hide();
		            	d.className="dok_ya";
		            	
					}else{
						loaderstatus.error([{"pesan":"Gagal update status"}]);
					}
				}
			});
		}
	};
})();