String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
//**************************************************************************
function fFiltrar(){
	document.getElementById("TxtAc").value="F";
	document.getElementById("Frm").submit();
}
//**************************************************************************
function fCancelar(){
	document.getElementById("TxtNom").value="";
	document.getElementById("CmdE").disabled =true;
	document.getElementById("CmdG").value="Guardar";
	document.getElementById("TxtId").value="";
	document.getElementById("TxtAc").value="";
	document.getElementById("TxtNom").focus();
}
function fGuardar(){
	var Nom=document.getElementById("TxtNom").value;
	if(Nom.trim().length==0){
		alert("Ingrese el nombre del departamento");
		document.getElementById("TxtNom").focus();
		return;
	}
	if(document.getElementById("CmdG").value=="Guardar"){
		document.getElementById("TxtAc").value="G";
	}else{
		document.getElementById("TxtAc").value="M";
	}
	document.getElementById("Frm").submit();
}
//**************************************************************************
