<script type="text/javascript">
$(function(){	
	
window.parent.$('#content_title').panel('setTitle', '<?=$this->title?>');	
setdg();
$('.validatebox-text').bind('blur', function(){
	$(this).validatebox('enableValidation').validatebox('validate');
});
$('#TpPrshn').combobox({  
	width:100,
	url:'<?=site_url('general/gridTpPrshn'); ?>',  
	valueField:'id_tp_prshn',  
	textField:'nm_tp_prshn'  
});
$('#Negara').combobox({  
	width:250,
	url:'<?=site_url('general/gridNegara'); ?>',  
	valueField:'KdNegara',  
	textField:'NmNegara'   
});
$('#Valuta').combobox({  
	width:80,
	mode:'remote', 
	url:'<?=site_url('general/gridValuta'); ?>',  
	valueField:'KdVal',  
	textField:'KdVal',
	onSelect:function(rowdata){
		$('#Kurs').numberbox('setValue',rowdata.Kurs);
	}, 
});
$('#Kurs').numberbox({  
    min:-1000, 
	precision:4, 
	groupSeparator:',',
	decimalSeparator:'.'
});
	
$('#btnTbh').click(function(){
	tambah();
});
$('#btnUbh').click(function(){	
	ubah();
});
$('#btnHps').click(function(){
	hapus();
});
$('#btnSim').click(function(){
	simpan();
});
$('#btnPrint').click(function(){
	toprint();
});
$('#btnExcel').click(function(){
	toxls();
});
$('#btnSubmit').click(function(){
	simpan();
});
$('#btnReset').click(function(){
	$('#fm').form('clear');
});
$('#q').searchbox({
	width:200,
	searcher:function(value,name){  
		///alert(value + "," + name)  
		cari(value);
	},
	prompt:'Cari Kode & Nama'  
});  
});//Akhir Document Ready
</script>