function Capa(id){this.id=id;if(gInf.nn){this.css=eval("document."+id);this.x=this.css.left;this.y=this.css.top;this.an=this.css.clip.width;this.al=this.css.clip.height;this.ct=this.css.clip.top;this.cl=this.css.clip.left;this.cb=this.css.clip.bottom;this.cr=this.css.clip.right;this.cf=this.css.bgColor}else{this.css=eval(id+".style");this.x=parseInt(this.css.left);this.y=parseInt(this.css.top);this.an=parseInt(this.css.width);this.al=parseInt(this.css.height);cv=this.css.clip.split("rect(")[1].split(")")[0].split("px");this.ct=Number(cv[0]);this.cl=Number(cv[3]);this.cb=Number(cv[2]);this.cr=Number(cv[1]);this.cf=this.css.backgroundColor};this.obj="CSt"+id;eval(this.obj+"=this")};Capa.prototype.pnX=function(x){this.css.left=this.x=x};Capa.prototype.pnY=function(y){this.css.top=this.y=y};Capa.prototype.poner=function(x,y){this.pnX(x);this.pnY(y)};Capa.prototype.arriba=function(){this.css.top=this.y=0};Capa.prototype.izquierda=function(){this.css.top=this.y=0};Capa.prototype.abajo=function (){this.css.top=gInf.al-this.al};Capa.prototype.derecha=function(){this.css.left=gInf.an-this.an};Capa.prototype.mvH=function(x){this.css.left=this.x+=x};Capa.prototype.mvV=function(y){this.css.top=this.y+=y};Capa.prototype.mover=function(x,y){this.mvH(x);this.mvV(y)};Capa.prototype.dlH=function(x,p,t){var an=(x-this.x)/p;for(var i=1;i<p;i++)setTimeout(this.obj+".mvH("+an+")",t*i);setTimeout(this.obj+".pnX("+x+")",t*i)};Capa.prototype.dlV=function(y,p,t){var al=(y-this.y)/p;for(var i=1;i<p;i++)setTimeout(this.obj+".mvV("+al+")",t*i);setTimeout(this.obj+".pnY("+y+")",t*i)};Capa.prototype.deslizar=function(x,y,p,t){var an=(x-this.x)/p;var al=(y-this.y)/p;for(var i=1;i<p;i++)setTimeout(this.obj+".mover("+an+","+al+")",t*i);setTimeout(this.obj+".poner("+x+","+y+")",t*i)};Capa.prototype.ctH=function(x){if(gInf.an>this.an)x=(gInf.an-this.an)/2;this.pnX(x)};Capa.prototype.ctV=function(y){if(gInf.al>this.al)y=(gInf.al-this.al)/2;this.pnY(y)};Capa.prototype.centrar=function(x,y){this.ctH(x);this.ctV(y)};Capa.prototype.rcH=function(l,r){if(gInf.nn){this.cl=this.css.clip.left=l;this.cr=this.css.clip.right=r}else{this.cl=l;this.cr=r;this.css.clip="rect("+this.ct+" "+this.cr+" "+this.cb+" "+this.cl+")"}};Capa.prototype.rdH=function(an){this.an=an;if(gInf.nn){this.css.clip.width=an;this.cr=this.css.clip.right}else{this.css.width=an;this.cr=this.cl+an;this.css.clip="rect("+this.ct+" "+this.cr+" "+this.cb+" "+this.cl+")"}};Capa.prototype.rdRH=function(ian){this.rdH(this.an+ian)};Capa.prototype.rdV=function(al){this.al=al;if(gInf.nn){this.css.clip.height=al;this.cb=this.css.clip.bottom}else{this.css.height=this.al=al;this.cb=this.ct+al;this.css.clip="rect("+this.ct+" "+this.cr+" "+this.cb+" "+this.cl+")"}};Capa.prototype.rdRV=function(ial){this.rdV(this.al+ial)};Capa.prototype.rd=function(an,al){this.rdH(an);this.rdV(al)};Capa.prototype.rdR=function(ian,ial){this.rdRH(ian);this.rdRV(ial)};Capa.prototype.mostrar=function(){this.css.visibility=gInf.nn?"show":"visible"};Capa.prototype.ocultar=function(){this.css.visibility=gInf.nn?"hide":"hidden"};Capa.prototype.pnCF=function(c){this.cf=gInf.nn?this.css.bgColor=c:this.css.backgroundColor=c}