AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){var a;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}return a},addClass:function(){var c=AJS.forceArray(arguments);var b=c.pop();var a=function(d){if(!new RegExp("(^|\\s)"+b+"(\\s|$)").test(d.className)){d.className+=(d.className?" ":"")+b}};AJS.map(c,function(d){a(d)})},setStyle:function(){var c=AJS.forceArray(arguments);var b=c.pop();var a=c.pop();AJS.map(c,function(d){d.style[a]=AJS.getCssDim(b)})},extend:function(d){var c=new this("no_init");for(k in d){var b=c[k];var a=d[k];if(b&&b!=a&&typeof a=="function"){a=this._parentize(a,b)}c[k]=a}return new AJS.Class(c)},log:function(a){if(window.console){console.log(a)}else{var b=AJS.$("ajs_logger");if(!b){b=AJS.DIV({id:"ajs_logger",style:"color: white; position: absolute; left: 0"});b.style.top=AJS.getScrollTop()+"px";AJS.ACN(AJS.getBody(),b)}AJS.setHTML(b,""+a)}},setHeight:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"height");AJS.setStyle.apply(null,a)},_getRealScope:function(a,c){c=AJS.$A(c);var b=a._cscope||window;return function(){var d=AJS.$FA(arguments).concat(c);return a.apply(b,d)}},documentInsert:function(a){if(typeof(a)=="string"){a=AJS.HTML2DOM(a)}document.write('<span id="dummy_holder"></span>');AJS.swapDOM(AJS.$("dummy_holder"),a)},getWindowSize:function(c){c=c||document;var b,a;if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(c.documentElement&&c.documentElement.clientHeight){b=c.documentElement.clientWidth;a=c.documentElement.clientHeight}else{if(c.body){b=c.body.clientWidth;a=c.body.clientHeight}}}return{w:b,h:a}},flattenList:function(b){var c=[];var a=function(e,d){AJS.map(d,function(f){if(f==null){}else{if(AJS.isArray(f)){a(e,f)}else{e.push(f)}}})};a(c,b);return c},isFunction:function(a){return(typeof a=="function")},setEventKey:function(a){a.key=a.keyCode?a.keyCode:a.charCode;if(window.event){a.ctrl=window.event.ctrlKey;a.shift=window.event.shiftKey}else{a.ctrl=a.ctrlKey;a.shift=a.shiftKey}switch(a.key){case 63232:a.key=38;break;case 63233:a.key=40;break;case 63235:a.key=39;break;case 63234:a.key=37;break}},removeElement:function(){var a=AJS.forceArray(arguments);AJS.map(a,function(b){AJS.swapDOM(b,null)})},_unloadListeners:function(){if(AJS.listeners){AJS.map(AJS.listeners,function(c,b,a){AJS.REV(c,b,a)})}AJS.listeners=[]},join:function(b,a){try{return a.join(b)}catch(d){var c=a[0]||"";AJS.map(a,function(e){c+=b+e},1);return c+""}},getIndex:function(d,c,b){for(var a=0;a<c.length;a++){if(b&&b(c[a])||d==c[a]){return a}}return -1},isIn:function(c,a){var b=AJS.getIndex(c,a);if(b!=-1){return true}else{return false}},isArray:function(a){return a instanceof Array},setLeft:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"left");AJS.setStyle.apply(null,a)},appendChildNodes:function(a){if(arguments.length>=2){AJS.map(arguments,function(b){if(AJS.isString(b)){b=AJS.TN(b)}if(AJS.isDefined(b)){a.appendChild(b)}},1)}return a},getElementsByTagAndClassName:function(g,f,d,b){var h=[];if(!AJS.isDefined(d)){d=document}if(!AJS.isDefined(g)){g="*"}var a=d.getElementsByTagName(g);var e=a.length;var c=new RegExp("(^|\\s)"+f+"(\\s|$)");for(i=0,j=0;i<e;i++){if(c.test(a[i].className)||f==null){h[j]=a[i];j++}}if(b){return h[0]}else{return h}},isOpera:function(){return(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)},isString:function(a){return(typeof a=="string")},hideElement:function(b){var a=AJS.forceArray(arguments);AJS.map(a,function(c){c.style.display="none"})},setOpacity:function(b,a){b.style.opacity=a;b.style.filter="alpha(opacity="+a*100+")"},insertBefore:function(b,a){a.parentNode.insertBefore(b,a);return b},setWidth:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"width");AJS.setStyle.apply(null,a)},createArray:function(a){if(AJS.isArray(a)&&!AJS.isString(a)){return a}else{if(!a){return[]}else{return[a]}}},isDict:function(b){var a=String(b);return a.indexOf(" Object")!=-1},isMozilla:function(){return(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210)},removeEventListener:function(e,d,a,c){var b="ajsl_"+d+a;if(!c){c=false}a=e[b]||a;if(e["on"+d]==a){e["on"+d]=e[b+"old"]}if(e.removeEventListener){e.removeEventListener(d,a,c);if(AJS.isOpera()){e.removeEventListener(d,a,!c)}}else{if(e.detachEvent){e.detachEvent("on"+d,a)}}},callLater:function(a,c){var b=function(){a()};window.setTimeout(b,c)},setTop:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"top");AJS.setStyle.apply(null,a)},_createDomShortcuts:function(){var b=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];var a=function(c){AJS[c.toUpperCase()]=function(){return AJS.createDOM.apply(null,[c,arguments])}};AJS.map(b,a);AJS.TN=function(c){return document.createTextNode(c)}},addCallback:function(a){this.callbacks.unshift(a)},bindMethods:function(c){for(var b in c){var a=c[b];if(typeof(a)=="function"){c[b]=AJS.$b(a,c)}}},partial:function(b){var a=AJS.$FA(arguments);a.shift();return function(){a=a.concat(AJS.$FA(arguments));return b.apply(window,a)}},isNumber:function(a){return(typeof a=="number")},getCssDim:function(a){if(AJS.isString(a)){return a}else{return a+"px"}},isIe:function(){return(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)},removeClass:function(){var c=AJS.forceArray(arguments);var a=c.pop();var b=function(d){d.className=d.className.replace(new RegExp("\\s?"+a,"g"),"")};AJS.map(c,function(d){b(d)})},setHTML:function(b,a){b.innerHTML=a;return b},map:function(d,f,c,a){var e=0,b=d.length;if(c){e=c}if(a){b=a}for(e;e<b;e++){var g=f(d[e],e);if(g!=undefined){return g}}},addEventListener:function(h,g,l,f,e){var d="ajsl_"+g+l;if(!e){e=false}AJS.listeners=AJS.$A(AJS.listeners);if(AJS.isIn(g,["keypress","keydown","keyup","click"])){var c=l;l=function(m){AJS.setEventKey(m);return c.apply(window,arguments)}}var b=AJS.isIn(g,["submit","load","scroll","resize"]);var a=AJS.$A(h);AJS.map(a,function(n){if(f){var m=l;l=function(q){AJS.REV(n,g,l);return m.apply(window,arguments)}}if(b){var p=n["on"+g];var o=function(){if(p){l(arguments);return p(arguments)}else{return l(arguments)}};n[d]=o;n[d+"old"]=p;h["on"+g]=o}else{n[d]=l;if(n.attachEvent){n.attachEvent("on"+g,l)}else{if(n.addEventListener){n.addEventListener(g,l,e)}}AJS.listeners.push([n,g,l])}})},forceArray:function(a){var b=[];AJS.map(a,function(c){b.push(c)});return b},update:function(b,a){for(var c in a){b[c]=a[c]}return b},getBody:function(){return AJS.$bytc("body")[0]},HTML2DOM:function(b,a){var c=AJS.DIV();c.innerHTML=b;if(a){return c.childNodes[0]}else{return c}},getElement:function(a){if(AJS.isString(a)||AJS.isNumber(a)){return document.getElementById(a)}else{return a}},showElement:function(){var a=AJS.forceArray(arguments);AJS.map(a,function(b){b.style.display=""})},bind:function(b,c,a){b._cscope=c;return AJS._getRealScope(b,a)},createDOM:function(f,d){var e=0,c;var h=document.createElement(f);var a=d[0];if(AJS.isDict(d[e])){for(k in a){c=a[k];if(k=="style"||k=="s"){h.style.cssText=c}else{if(k=="c"||k=="class"||k=="className"){h.className=c}else{h.setAttribute(k,c)}}}e++}if(a==null){e=1}for(var b=e;b<d.length;b++){var c=d[b];if(c){var g=typeof(c);if(g=="string"||g=="number"){c=AJS.TN(c)}h.appendChild(c)}}return h},swapDOM:function(c,b){c=AJS.getElement(c);var a=c.parentNode;if(b){b=AJS.getElement(b);a.replaceChild(b,c)}else{a.removeChild(c)}return b},isDefined:function(a){return(a!="undefined"&&a!=null)}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$p=AJS.partial;AJS.$b=AJS.bind;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.$AP=AJS.absolutePosition;AJS.$FA=AJS.forceArray;AJS.addEventListener(window,"unload",AJS._unloadListeners);AJS._createDomShortcuts();AJS.Class=function(b){var a=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments)}};a.prototype=b;AJS.update(a,AJS.Class.prototype);return a};AJS.Class.prototype={extend:function(c){var b=new this("no_init");for(k in c){var a=b[k];var d=c[k];if(a&&a!=d&&typeof d=="function"){d=this._parentize(d,a)}b[k]=d}return new AJS.Class(b)},implement:function(a){AJS.update(this.prototype,a)},_parentize:function(b,a){return function(){this.parent=a;return b.apply(this,arguments)}}};script_loaded=true;script_loaded=true;var GB_CURRENT=null;GB_hide=function(a){GB_CURRENT.hide(a)};GreyBox=new AJS.Class({init:function(a){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=true;this.salt=0;this.root_dir="/es/img/";this.callback_fns=[];this.reload_on_close=false;this.show_loading=true;AJS.update(this,a)},addCallback:function(a){if(a){this.callback_fns.push(a)}},show:function(b){GB_CURRENT=this;this.url=b;var a=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(a),function(c){c.style.visibility="hidden"});this.createElements();return false},hide:function(a){var b=this;AJS.callLater(function(){var e=b.callback_fns;if(e!=[]){AJS.map(e,function(f){f()})}b.onHide();if(b.use_fx){var d=b.overlay;AJS.fx.fadeOut(b.overlay,{onComplete:function(){AJS.removeElement(d);d=null},duration:300});AJS.removeElement(b.g_window)}else{AJS.removeElement(b.g_window,b.overlay)}b.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var c=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(c),function(f){f.style.visibility="visible"});GB_CURRENT=null;if(b.reload_on_close){window.location.reload()}if(AJS.isFunction(a)){a()}},10)},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition()},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({id:"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var a=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){a.onShow();AJS.showElement(a.g_window);a.startLoading()}})}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading()}AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update)},removeFrame:function(){try{AJS.removeElement(this.iframe)}catch(a){}this.iframe=null},startLoading:function(){this.iframe.src=this.url;AJS.showElement(this.iframe)},setOverlayDimension:function(){var b=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%")}else{AJS.setWidth(this.overlay,b.w)}var a=Math.max(AJS.getScrollTop()+b.h,AJS.getScrollTop()+this.height);if(a<AJS.getScrollTop()){AJS.setHeight(this.overlay,a)}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+b.h)}},initOverlay:function(){this.overlay=AJS.DIV({id:"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide)}AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild)},initFrame:function(){if(!this.iframe){var a={name:"GB_frame","class":"GB_frame",frameBorder:0};if(AJS.isIe()){a.src='javascript:false;document.write("");'}this.iframe=AJS.IFRAME(a);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt)}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update()}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension()}};script_loaded=true;var GB_SETS={};function decoGreyboxLinks(){var a=AJS.$bytc("a");AJS.map(a,function(d){if(d.getAttribute("href")&&d.getAttribute("rel")){var b=d.getAttribute("rel");if(b.indexOf("gb_")==0){var f=b.match(/\w+/)[0];var e=b.match(/\[(.*)\]/)[1];var c=0;var g={caption:""||"",url:d.href};if(f=="gb_pageset"||f=="gb_imageset"){if(!GB_SETS[e]){GB_SETS[e]=[]}GB_SETS[e].push(g);c=GB_SETS[e].length}if(f=="gb_pageset"){d.onclick=function(){GB_showFullScreenSet(GB_SETS[e],c);return false}}if(f=="gb_imageset"){d.onclick=function(){GB_showImageSet(GB_SETS[e],c);return false}}if(f=="gb_image"){d.onclick=function(){GB_showImage(g.caption,g.url);return false}}if(f=="gb_page"){d.onclick=function(){var h=e.split(/, ?/);GB_show(g.caption,g.url,parseInt(h[1]),parseInt(h[0]));return false}}if(f=="gb_page_fs"){d.onclick=function(){GB_showFullScreen(g.caption,g.url);return false}}if(f=="gb_page_center"){d.onclick=function(){var h=e.split(/, ?/);GB_showCenter(g.caption,g.url,parseInt(h[1]),parseInt(h[0]));return false}}}}})}AJS.AEV(window,"load",decoGreyboxLinks);GB_showImage=function(c,d,a){var b={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:c,callback_fn:a};var e=new GB_Gallery(b);return e.show(d)};GB_showPage=function(e,a,d){var b={type:"page",caption:e,callback_fn:d,fullscreen:true,center_win:false};var c=new GB_Gallery(b);return c.show(a)};GB_Gallery=GreyBox.extend({init:function(a){this.parent({});this.img_close=this.root_dir+"cerrar.gif";AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var d=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},d);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var b=AJS.TD({id:"GB_caption","class":"caption",width:"40%"},this.caption);var g=AJS.TD({id:"GB_middle","class":"middle",width:"20%"});var f=AJS.IMG({src:this.img_close});AJS.AEV(f,"click",GB_hide);var e=AJS.TD({"class":"close",width:"40%"},f);var c=AJS.TBODY(AJS.TR(b,g,e));var a=AJS.TABLE({cellspacing:"0",cellpadding:0,border:0},c);AJS.ACN(d,a);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}else{AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this))}},setFrameSize:function(){var a=this.overlay.offsetWidth;var b=AJS.getWindowSize();if(this.fullscreen){this.width=a-40;this.height=b.h-80}AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,a)},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10)},setWindowPosition:function(){var c=this.overlay.offsetWidth;var b=AJS.getWindowSize();AJS.setLeft(this.g_window,((c-50-this.width)/2));var a=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,a)}else{var d=((b.h-this.height)/2)+20+AJS.getScrollTop();if(d<0){d=0}if(a>d){d=a}AJS.setTop(this.g_window,d)}this._setHeaderPos()},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery")},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1})}else{AJS.setOpacity(this.header,1)}}});GB_showFullScreenSet=function(e,d,c){var b={type:"page",fullscreen:true,center_win:false};var a=new GB_Sets(b,e);a.addCallback(c);a.showSet(d-1);return false};GB_showImageSet=function(e,d,c){var b={type:"image",fullscreen:false,center_win:true,width:300,height:300};var a=new GB_Sets(b,e);a.addCallback(c);a.showSet(d-1);return false};GB_Sets=GB_Gallery.extend({init:function(a,b){this.parent(a);if(!this.img_next){this.img_next=this.root_dir+"next.gif"}if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif"}this.current_set=b},showSet:function(b){this.current_index=b;var a=this.current_set[this.current_index];this.show(a.url);this._setCaption(a.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus()},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled")}else{AJS.removeClass(this.btn_prev,"disabled")}if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled")}else{AJS.removeClass(this.btn_next,"disabled")}},_setCaption:function(a){AJS.setHTML(AJS.$("GB_caption"),a)},updateFrame:function(){var a=this.current_set[this.current_index];this._setCaption(a.caption);this.url=a.url;this.startLoading()},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus()}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus()}}});AJS.AEV(window,"load",function(){});GB_show=function(b,c,g,f,d){var a={caption:b,height:g||500,width:f||500,fullscreen:false,callback_fn:d};var e=new GB_Window(a);return e.show(c)};GB_showCenter=function(g,a,e,c,d){var b={caption:g,center_win:true,height:e||500,width:c||500,fullscreen:false,callback_fn:d};var f=new GB_Window(b);return f.show(a)};GB_Window=GreyBox.extend({init:function(a){this.parent({});this.img_close=this.root_dir+"cerrar.gif";this.show_close_img=true;AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"Header"});this.header.style.backgroundColor="White";var e=AJS.TD({"class":"caption"},this.caption);var c=AJS.TD({"class":"close"});if(this.show_close_img){var b=AJS.IMG({src:this.img_close});var a=AJS.SPAN("");var d=AJS.DIV(b,a);AJS.AEV([b,a],"mouseover",function(){AJS.addClass(a,"on")});AJS.AEV([b,a],"mouseout",function(){AJS.removeClass(a,"on")});AJS.AEV([b,a],"mousedown",function(){AJS.addClass(a,"click")});AJS.AEV([b,a],"mouseup",function(){AJS.removeClass(a,"click")});AJS.AEV([b,a],"click",GB_hide);AJS.ACN(c,d)}tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(e,c));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}},setFrameSize:function(){if(this.fullscreen){var a=AJS.getWindowSize();overlay_h=a.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10)}AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height)},setWindowPosition:function(){var b=AJS.getWindowSize();AJS.setLeft(this.g_window,((b.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop())}else{var a=((b.h-this.height)/2)-20+AJS.getScrollTop();if(a<0){a=0}AJS.setTop(this.g_window,a)}}});script_loaded=true;OpenSplash=function(c,d,a,f){var b={height:a||480,width:d||750,fullscreen:false,show_loading:false,center_win:true,callback_fn:f};var e=new GB_Window(b);return e.show(c)};function OpenSplashFlash(a){OpenSplash(a)};