function TTECCapaCampo(D,A,B,C){this.Nombre=D;this.Titulo=A;this.Formato=B;this.Principal=C}function TTECCapaLeyenda(B,D,F,E,C,A){this.Titulo=B;this.Imagen=D;this.Top=(F?F:0);this.Left=(E?E:0);this.Width=(C?C:0);this.Height=(A?A:0)}function TTECCapaDatos(B,A){this.Id=B;this.Nombre="";this.Visible=false;this.VisibleIni=false;this.MaxEscala=Number.MAX_VALUE;this.MinEscala=0;this.Tipo=0;this.TieneInfo=true;this.Leyendas=new Array();this.Campos=new Array();this.Ids=new Array();this.Tipos=new Array();this.OnCambioVisible=null;this.Padre=A;this.Metadatos="";this.ajaxNElementos=null;this.ajaxElementos=null}TTECCapaDatos.prototype.SetVisible=function(B){this.Visible=B;if(this.Ids.length!=0){for(var A=0;A<this.Ids.length;A++){this.Padre.GetCapa(this.Ids[A]).SetVisible(B)}}};TTECCapaDatos.prototype.GetId=function(){return this.Id+(this.Ids.length==0?"":","+this.Ids.toString())};TTECCapaDatos.prototype.GetTipo=function(){return this.Tipo+(this.Tipos.length==0?"":","+this.Tipos.toString())};function TTECCapasDatos(){this.UrlBaseMetadatos="";this.DirImgLeyendas="";this.ImgLeyendasAlVuelo="";this.Capas=new Array();this.ListaAjaxNum=new TTECAjaxLista();this.ListaAjaxInfo=new TTECAjaxLista();this.onNElementosCargardos=null;this.onElementosCargardos=null;this.getUrlNElementos=null;this.getUrlElementos=null}TTECCapasDatos.prototype.Count=function(){return this.Capas.length};TTECCapasDatos.prototype.Add=function(B){var A=this.Count();this.Capas[A]=new TTECCapaDatos(B,this);return this.Capas[A]};TTECCapasDatos.prototype.GetCapa=function(B){for(var A=0;A<this.Capas.length;A++){if(this.Capas[A].Id==B){return this.Capas[A]}}return null};TTECCapasDatos.prototype.CadenaCapasVisible=function(){var B="";for(var A=0;A<this.Capas.length;A++){if(this.Capas[A].Id>=0){B+="c"+this.Capas[A].Id+(this.Capas[A].Visible?"t":"f")}}return B};TTECCapasDatos.prototype.CadenaTodosVisible=function(){var B="";for(var A=0;A<this.Capas.length;A++){B+="c"+this.Capas[A].Id+(this.Capas[A].Visible?"t":"f")}return B}
