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 noRet(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isRet = (key==13 || key=="35" || key=="34" || key=="126" || key=="124") ? false:true;
	window.event.keyCode = (!isRet && isIE) ? 0:key;
	return (isRet);
}
function GetContribuyente(){
 	var command = "GetBack('SRCH','contribuyentes','i8_contribuyente_id,v128_contribuyente|v128_nuc','parent.opener.form',300,100,'','v128_contribuyente')";
	alert(command);
	eval(command);	
}
function GetExpediente(){
      var generador = document.form.v64_tipo_generador.value.toLowerCase();
    if(generador!=""){
	var command = "GetBack('LTMD','contribuyente_"+generador+"s','i8_"+generador+"_id|i8_expediente_id,txt_ubicacion|txt_expediente_direccion,txt_propietarios|txt_expediente_propietarios','parent.opener.form',100,100,'i8_contribuyente_id','i8_expediente_id')";
	eval(command);
    }else{alert("Seleccione el Generador")}
}
function change(id,h){
  var new_hght= 0;
    var ids	= id.split(',');
    var owidth  = 650;
    var oheight = 650;
    var hght	= parent.document.body.clientHeight;
    var wdth	= parent.document.body.clientWidth;    
    for(var i=0;i<ids.length;i++){
      identity = document.getElementById(ids[i]);
      if(identity.style.display=="none"){
          identity.style.display = "";
          new_hght= hght+h;
          eval("parent.window.resizeTo(650,"+new_hght+")");
      }else{
          identity.style.display="none";
          new_hght= hght-h+72;
          eval("parent.window.resizeTo(650,"+new_hght+")");
      }
    }
}