function fFiltrar(){
	document.getElementById("TxtAc").value="F";
	document.getElementById("Frm").submit();
}
//**************************************************************************
function fCancelar(){
	SM("L");
}
//**************************************************************************
function fGuardar(){
	var cod=gv("TxtId");
	var nom=gv("NomCom");
	var nomcor=gv("NomCor");
	var ruc=gv("Ruc");
	var ext=gv("Ext");
	//
	if(jVac(nom,"Ingrese el nombre comercial","NomCom"))return;
	if(jVac(nomcor,"Ingrese el nombre corto/abreviado","NomCor"))return;
	if(jVac(ext,"Determine si la empresa es externa","Ext"))return;
	/*
	if(jVac(ruc,"Ingrese el numero de ruc","Ruc"))return;
	if(jL(ruc)!=11){
		return AF("El numero de ruc debe tener 11 digitos","Ruc");
	}
	*/
	//	
	if(gv("CmdG")=="Guardar"){
		if(preG()){
			hab("CmdG",0);
			SM("G");
		}
	}else{
		if(preM()){
			hab("CmdG",0);
			SM("M");
		}
	}	
}
//
