window.addEvent('load',function(){if($("pagina").getCoordinates().bottom>$("pie").getCoordinates().top) {$("pie").setStyles({'position':'relative','bottom':'0px','width':'100%'});}});window.addEvent('resize',function(){if(window.getScrollSize().y==window.getSize().y){$("pie").setStyles({'position':'absolute','bottom':'0px','width':'100%'});}else{$("pie").setStyles({'position':'relative','bottom':'0px','width':'100%'});} if($("pagina").getCoordinates().bottom>$("pie").getCoordinates().top) {$("pie").setStyles({'position':'relative','bottom':'0px','width':'100%'});}});window.addEvent('domready',function(){if(window.getScrollSize().y==window.getSize().y){$("pie").setStyles({'position':'absolute','bottom':'0px','width':'100%'});} $$('#menu_subsecciones ul li div').setStyle('display','none');if($('zona_banners')){$('fichas').setStyle('background','none');} if($('documentos-buscar')||$('documentos-enviar')||$('usuario-recordar')||$('usuario-login')||$('usuario-validar')||$('usuario-baja')||$('usuario-modificar')||$('usuario-alta')){$('panel_3_1').setStyle('display','block');} $each($$('a'),function(item){if(item.get('rel')=='external') item.set('target','_blank');});if(!hasPlaceholderSupport()){addPlaceHolders();} if($('pasador_partners')){new Galeria($('lista_partners'),$('siguiente_elemento_partners'),$('anterior_elemento_partners'),3,'x',1);} $$('#menu_subsecciones strong a').addEvent('click',function(e){if(e)e.stop();_rel=this.get('rel');if(_rel){$$('#contenido_subsecciones .panel').setStyle('display','none');$(_rel).getFirst('.panel').setStyle('display','block');} window.fireEvent('resize');});$$('#menu_subsecciones strong a').addEvent('mouseenter',function(e){_rel=this.get('rel');if(_rel){_rel='menu_'+_rel;$$('#menu_subsecciones ul li div').setStyle('display','none');$(_rel).setStyle('display','block');}});$$('#menu_subsecciones ul li div').addEvent('mouseleave',function(){this.setStyle('display','none');});$$('#menu_subsecciones div a').addEvent('click',function(e){if(e)e.stop();_rel=this.get('rel');$$('#contenido_subsecciones .panel').setStyle('display','none');$(_rel).setStyle('display','block');window.fireEvent('resize');});$$('.buscador_faqs a').addEvent('click',function(e){if(e)e.stop();showFaqList();});if($('scrollable')) var scrollbar=new MooScroll({selector:'#scrollable'});if($$('#lista_faqs .cerrar')){$$('#lista_faqs .cerrar').addEvent('click',function(e){if(e)e.stop();hideFaqList();});}});function hideFaqList(){$('lista_faqs').setStyle('left','-10000px');} function showFaqList(){$('lista_faqs').setStyle('left','417px');} function showFaqAnswer(_id){hideFaqList();var _div=''+$("pregunta_"+_id).getElement("a").get('html')+''+'
'+$("respuesta_"+_id).get('html')+'
';$("faqs_respuesta").set('html',_div);} window.addEvent('load',function(){hs.graphicsDir="http://www.farell-i.com/js/common/highslide/graphics/";hs.showCredits=false;hs.outlineType='custom';hs.dimmingOpacity=0.5;hs.align='center';});function addPlaceHolders(){$each($$('.hasPlaceHolder'),function(item){if(item.value=='')item.value=item.get('placeholder');item.addEvents({focus:function(){if(item.value==item.get('placeholder')){item.value='';}},blur:function(){if(item.value==''){item.value=item.get('placeholder');}}});});} function removePlaceHolders(){$each($$('.hasPlaceHolder'),function(item){if(item.value==item.get('placeholder'))item.value='';});} function hasPlaceholderSupport(){var input=new Element('input');return('placeholder'in input);} function changeTab(_seccion,_tab){$$("div#"+_seccion+" div.tab").removeClass('tab_activo');$("a_"+_tab).addClass('tab_activo');$$("div#"+_seccion+" div.content div.content_tab").setStyle("display","none");$(""+_tab).setStyle("display","block");} function showInnerTab(_innerTab,_a){$(_innerTab).getParent().getElements('div.inner_content').setStyle('display','none');$(_innerTab).setStyle('display','block');$(_innerTab).getParent().getElements('div.inner_tabs a').removeClass('on');$('a_'+_innerTab).addClass("on");} function showFaqPopup(){$("faqs_popup").show();$("faqs_popup").setStyle('top',0).setStyle('bottom',0);} function closeFaqPopup(){$("faqs_popup").hide();} function mostrarRespuesta(_id){$("faqs_popup").hide();var _div=''+$("pregunta_"+_id).getElement("a").get('html')+''+'
'+$("respuesta_"+_id).get('html')+'
';$("in_faqs_respuesta").set('html',_div);} function Galeria(_contenedor,_siguiente,_anterior,_visibles,_axis,_rowSize){this.revisarBotones=function(){$(this.anterior).removeClass('off');$(this.siguiente).removeClass('off');if(this.totalElementos<=this.visibles){$(this.anterior).addClass('off');$(this.siguiente).addClass('off');}else if(this.actual==0){$(this.anterior).addClass('off');}else if(this.actual*this.rowSize==(this.totalElementos-this.visibles)) $(this.siguiente).addClass('off');};this.reset=function(){if(this.totalElementos>0){this.scroll=new Fx.Scroll($(_contenedor),{});this.scroll.toElement(this.elementos[0]);}} this.contenedor=_contenedor;this.siguiente=_siguiente;this.anterior=_anterior;this.visibles=parseInt(_visibles);this.elementos=_contenedor.getChildren('ul')[0].getChildren('li');this.totalElementos=this.elementos.length;this.actual=0;this.enMovimiento=false;this.axis=_axis;this.rowSize=_rowSize;if(this.totalElementos>0){this.scroll=new Fx.Scroll($(_contenedor),{});this.scroll.toElement(this.elementos[0]);this.ancho=(this.elementos[0].getStyle("width").toInt()+this.elementos[0].getStyle("padding-left").toInt()+this.elementos[0].getStyle("padding-right").toInt()+this.elementos[0].getStyle("margin-left").toInt()+this.elementos[0].getStyle("margin-right").toInt());this.alto=(this.elementos[0].getStyle("height").toInt()+this.elementos[0].getStyle("padding-top").toInt()+this.elementos[0].getStyle("padding-bottom").toInt()+this.elementos[0].getStyle("margin-top").toInt()+this.elementos[0].getStyle("margin-bottom").toInt());this.revisarBotones();$(this.siguiente).addEvent('click',function(e){e.stop();if(((this.actual+this.visibles)<=(this.totalElementos-1))&&(!this.enMovimiento)){this.enMovimiento=true;this.actual++;if(this.axis=='x') this.scroll.start(this.actual*this.ancho,0).chain(function(){this.enMovimiento=false;}.bind(this));else this.scroll.start(0,this.actual*this.alto).chain(function(){this.enMovimiento=false;}.bind(this));this.revisarBotones();}}.bind(this));$(this.anterior).addEvent('click',function(e){e.stop();if((this.actual>0)&&(!this.enMovimiento)){this.enMovimiento=true;this.actual--;if(this.axis=='x') this.scroll.start(this.actual*this.ancho,0).chain(function(){this.enMovimiento=false;}.bind(this));else this.scroll.start(0,this.actual*this.alto).chain(function(){this.enMovimiento=false;}.bind(this));this.revisarBotones();}}.bind(this));}}