var isIE = document.all?true:false;
var isNS = document.layers?true:false;
function onlyDigits(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
	window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
	e.which = (!isNum && !dotOK && isNS) ? 0:key;
	return (isNum || dotOK);
}
function EnableTarifa() {
    if(document.form.c3_tipo_tarifa_id.value=="SIM" && document.form.c4_frecuencia_tarifa_id.value=="UNIC"){
	document.getElementById('d82_tarifa').readOnly=false;    
    }else{
	document.getElementById('d82_tarifa').readOnly=true;        
    }
}
function GetTributo(){
    var TipoTributo = document.form.v64_tipo_tributo.value.toLowerCase();
    if(TipoTributo==""){alert("Escojer el Tipo de Tributo Primero");return}
    var TipoTributos = TipoTributo+"S";
    var GetBackStream	 = "c3_"+TipoTributo+"_id|c3_code_id,v64_"+TipoTributo+"|v64_code";
    GetBack('LIST',TipoTributos,GetBackStream,'parent.opener.form',300,100,'','')    
}