var GestorDestellos={destellos:new Hash(),configurarDestellos:function(A){A.each(function(C,B){GestorDestellos.destellos.set(C,new GestorDestellos.Destello(C,{disparador:B}))})},Destello:new Class({Implements:[Options,Events],options:{disparador:null,colorDestello:"#F0F0F0"},initialize:function(A,B){this.setOptions(B);this.elemento=$(A);this.efecto=new Fx.Tween(this.elemento,{duration:500,link:"chain",transition:Fx.Transitions.Quart.easeOut});if(this.options.disparador){$(this.options.disparador).addEvent("click",this.destellear.bindWithEvent(this))}},destellear:function(){var A=this.elemento.getStyle("border-left-color");this.efecto.start("border-color",this.options.colorDestello).start("border-color",A)}})},GestorPanelesExtensibles={paneles:new Array(),configurarPaneles:function(A){A.each(function(C,B){GestorPanelesExtensibles.paneles.include=new GestorPanelesExtensibles.PanelExtensible(B,C)})},PanelExtensible:new Class({Implements:[Options,Events],options:{botonConmutador:null,botonAbrir:null,botonCerrar:null,duracion:100,cerradoInicialmente:true,indicador:null,imgIndicadorCerrado:"img/fleDer.png",imgIndicadorAbierto:"img/fleAba.png",esIndicadorTransparente:true,imgIndicadorCerradoNT:"img/fleDerIE.png",imgIndicadorAbiertoNT:"img/fleAbaIE.png",depuracion:false},initialize:function(A,B){this.setOptions(B);this.estaAbierto=true;this.panel=$(A);if(!this.panel){if(this.options.depuracion){alert("[Depuración] PanelExtensible::Contructor no ha recibido un id válido para el panel.")}return }this.pngOK=!Browser.Engine.trident4;this.slide=new Fx.Slide(this.panel,{duration:this.options.duracion});if(this.options.botonConmutador){$(this.options.botonConmutador).addEvent("click",this.conmutar.bindWithEvent(this)).setStyle("cursor","pointer")}if(this.options.botonAbrir){$(this.options.botonAbrir).addEvent("click",this.abrir.bindWithEvent(this)).setStyle("cursor","pointer")}if(this.options.botonCerrar){$(this.options.botonCerrar).addEvent("click",this.cerrar.bindWithEvent(this)).setStyle("cursor","pointer")}if(this.options.cerradoInicialmente){this.cerrar()}this.actualizarIndicador()},conmutar:function(){this.slide.toggle();this.estaAbierto=!this.estaAbierto;this.actualizarIndicador()},abrir:function(){if(!this.estaAbierto){this.conmutar()}},cerrar:function(){if(this.estaAbierto){this.conmutar()}},actualizarIndicador:function(){if(this.indicador){if(this.pngOK){if(this.estaAbierto){this.indicador.set("src",this.options.imgIndicadorAbierto)}else{this.indicador.set("src",this.options.imgIndicadorCerrado)}}else{if(this.estaAbierto){this.indicador.set("src",this.options.imgIndicadorAbiertoNT)}else{this.indicador.set("src",this.options.imgIndicadorCerradoNT)}}}}})},GestorBotonesFlecha={botonesFlecha:new Array(),autoConfigurarBotonesFlecha:function(){$$(".botonFlecha").each(function(A){GestorBotonesFlecha.botonesFlecha.include=new GestorBotonesFlecha.BotonFlecha(A)})},configurarBotonesFlecha:function(A){A.each(function(C,B){GestorBotonesFlecha.botonesFlecha.include=new GestorBotonesFlecha.BotonFlecha(B,C)})},BotonFlecha:new Class({Implements:[Options,Events],options:{duracion:"1000",dsplzHaciaIzq:true,longDsplz:"-9px"},constDsplzCorrector:12,initialize:function(B,A){this.setOptions(A);this.elementoBoton=$(B);this.imagen=this.elementoBoton.getElement("img");if(this.options.dsplzHaciaIzq){this.dsplzHIn=this.options.longDsplz;this.dsplzHOut="0px"}else{this.dsplzHIn="0px";this.dsplzHOut=this.options.longDsplz}if((Browser.Engine.trident4||Browser.Engine.trident5)&&this.options.dsplzHaciaIzq){this.dsplzHIn=parseInt(this.dsplzHIn)+this.constDsplzCorrector+"px";this.dsplzHOut=parseInt(this.dsplzHOut)+this.constDsplzCorrector+"px"}this.imagen.setStyles({position:"relative",left:this.options.dsplzHaciaIzq?"0px":this.options.longDsplz});this.tween=new Fx.Tween(this.imagen,{duration:this.options.duracion,wait:false,transition:Fx.Transitions.Expo.easeOut});this.elementoBoton.addEvent("mouseover",this.hoverIn.bindWithEvent(this)).addEvent("mouseout",this.hoverOut.bindWithEvent(this))},hoverIn:function(){this.tween.start("left",this.dsplzHIn)},hoverOut:function(){this.tween.start("left",this.dsplzHOut)}})},GestorMoviolas={Moviola:new Class({Implements:[Options,Events],options:{barrasScroll:false,duracion:350,funcTraducCodDest:null,centrar:false},initialize:function(A,B){this.setOptions(B);this.ventanaMoviola=$(A);this.fondo=this.ventanaMoviola.getFirst();this.efectoMoviola=new Fx.Scroll(this.ventanaMoviola,{duration:this.options.duracion,transition:Fx.Transitions.Quad.easeInOut});if(!this.options.barrasScroll){this.ventanaMoviola.setStyle("overflow","hidden")}if(this.options.centrar){this.puntero=new Element("div",{styles:{position:"absolute",width:"100px",height:"100px",visibility:"hidden","z-index":"9999","background-color":"#ffffff"}});this.fondo.adopt(this.puntero)}},centrarDestino:function(A){this.efectoMoviola.toElement(A)},centrar:function(C){if(this.options.funcTraducCodDest!=null){var C=this.options.funcTraducCodDest(C)}if(C){if(this.options.centrar){var E=$(C),B=E.getPosition(this.fondo),F=E.getSize(),D=this.ventanaMoviola.getSize(),A={x:(B.x+F.x/2)-D.x/2,y:(B.y+F.y/2)-D.y/2};alert(A.x+", "+A.y);this.puntero.setStyles({left:A.x,top:"20px"});this.efectoMoviola.toElement(this.puntero)}else{this.efectoMoviola.toElement(C)}this.fireEvent("centrado",C)}}})};function TransparentaForms(){if(Browser.Engine.gecko||Browser.Engine.trident){$$("input, textarea").setStyle("background-color","transparent")}};