function TTECAcciones(B,A){this.Padre=B;this.DirImagenes=A;this.Acciones=new Array();this.Count=0;this.AccionSeleccionada=null;this.onItemChange=this.funcionNull}TTECAcciones.prototype.funcionNull=function(){return true};TTECAcciones.prototype.AddAccion=function(G,D,B,F,E,C){var A=new TTECAccion(this,G,F,E,C);A.Persistente=((sinDefinir(D)||D==null||D=="")?false:true);A.UsaCaja=(sinDefinir(B)?false:B);A.SetCursor((sinDefinir(D)?"":D));this.Acciones[this.Count]=A;this.Count++;return A};TTECAcciones.prototype.GetId=function(B){for(var A=0;A<this.Count;A++){if(this.Acciones[A].Id==B){return this.Acciones[A]}}return null};TTECAcciones.prototype.setAccionSeleccionadaId=function(C){var A=null;for(var B=0;B<this.Count;B++){if(this.Acciones[B].Id==C){A=this.Acciones[B];break}}this.setAccionSeleccionada(A)};TTECAcciones.prototype.setAccionSeleccionada=function(B){if(B.Id!=20){var A=0}var C=this.AccionSeleccionada;this.AccionSeleccionada=B;if(C){C.LanzaDeseleccionaAccion()}B.LanzaSeleccionaAccion();if(!B.Persistente){B.LanzaDeseleccionaAccion();this.AccionSeleccionada=C;if(C){this.AccionSeleccionada.LanzaSeleccionaAccion()}}else{this.onItemChange(this.Padre,B,C)}};function TTECAccion(B,E,D,C,A){this.Padre=B;this.Id=E;this.Persistente=false;this.UsaCaja=false;this._cursor="";this.funcionASeleccionar=D;this.funcionAEjecutar=C;this.funcionADeseleccionar=A}TTECAccion.prototype.GetCursorClass=function(){return"TTECCursor"+this.Id};TTECAccion.prototype.GetCursor=function(){if(this._cursor==""){return"url("+this.Padre.DirImagenes+"cruz.cur),crosshair"}else{return"url("+this.Padre.DirImagenes+this._cursor+"),auto"}};TTECAccion.prototype.SetCursor=function(A){this._cursor=A};TTECAccion.prototype.LanzaSeleccionaAccion=function(){if(!sinDefinir(this.funcionASeleccionar)){this.funcionASeleccionar(this.Padre.Padre,this)}};TTECAccion.prototype.LanzaDeseleccionaAccion=function(){if(!sinDefinir(this.funcionADeseleccionar)){this.funcionADeseleccionar(this.Padre.Padre,this)}};TTECAccion.prototype.LanzaEjecutaAccion=function(D,A,E,C,B){if(!sinDefinir(this.funcionAEjecutar)){if(this.UsaCaja){this.funcionAEjecutar(this.Padre.Padre,D,A,E,C,B)}else{this.funcionAEjecutar(this.Padre.Padre,D,A,E)}}}
