var Zapatec={};Zapatec.Utils={};Zapatec.Utils.getAbsolutePos=function(a){var e=0,f=0,c=/^div$/i.test(a.tagName);if(c&&a.scrollLeft)e=a.scrollLeft;if(c&&a.scrollTop)f=a.scrollTop;var b={x:a.offsetLeft-e,y:a.offsetTop-f};if(a.offsetParent){var d=this.getAbsolutePos(a.offsetParent);b.x+=d.x;b.y+=d.y}return b};Zapatec.Utils.fixBoxPosition=function(a){if(a.x<0)a.x=0;if(a.y<0)a.y=0;var e=Zapatec.Utils.createElement("div"),d=e.style;d.position="absolute";d.right=d.bottom=d.width=d.height="0px";window.document.body.appendChild(e);var b=Zapatec.Utils.getAbsolutePos(e);window.document.body.removeChild(e);if(Zapatec.is_ie){b.y+=window.document.body.scrollTop;b.x+=window.document.body.scrollLeft}else{b.y+=window.scrollY;b.x+=window.scrollX}var c=a.x+a.width-b.x;if(c>0)a.x-=c;c=a.y+a.height-b.y;if(c>0)a.y-=c};Zapatec.Utils.isRelated=function(d,b){b||(b=window.event);var a=b.relatedTarget;if(!a){var c=b.type;if(c=="mouseover")a=b.fromElement;else if(c=="mouseout")a=b.toElement}try{while(a){if(a==d)return true;a=a.parentNode}}catch(e){}return false};Zapatec.Utils.removeClass=function(a,e){if(!(a&&a.className))return;for(var b=a.className.split(" "),c=[],d=b.length;d>0;)if(b[--d]!=e)c[c.length]=b[d];a.className=c.join(" ")};Zapatec.Utils.addClass=function(b,a){Zapatec.Utils.removeClass(b,a);b.className+=" "+a};Zapatec.Utils.getElement=function(a){if(a==null)a=window.event;return Zapatec.is_ie?window.event.srcElement:a.currentTarget};Zapatec.Utils.getTargetElement=function(a){if(a==null)a=window.event;return Zapatec.is_ie?window.event.srcElement:a.target};Zapatec.Utils.stopEvent=function(a){a||(a=window.event);if(Zapatec.is_ie){a.cancelBubble=true;a.returnValue=false}else{a.preventDefault();a.stopPropagation()}return false};Zapatec.Utils.addEvent=function(a,b,c){if(a.attachEvent)a.attachEvent("on"+b,c);else if(a.addEventListener)a.addEventListener(b,c,true);else a["on"+b]=c};Zapatec.Utils.removeEvent=function(a,b,c){if(a.detachEvent)a.detachEvent("on"+b,c);else if(a.removeEventListener)a.removeEventListener(b,c,true);else a["on"+b]=null};Zapatec.Utils.createElement=function(c,b){var a=null;if(window.self.document.createElementNS)a=window.self.document.createElementNS("http://www.w3.org/1999/xhtml",c);else a=window.self.document.createElement(c);typeof b!="undefined"&&b.appendChild(a);Zapatec.is_ie&&a.setAttribute("unselectable",true);Zapatec.is_gecko&&a.style.setProperty("-moz-user-select","none","");return a};Zapatec.Utils.writeCookie=function(g,c,e,f,d){c=escape(c);var b=g+"="+c,a;if(e)b+=";domain="+e;if(f)b+=";path="+f;if(d){a=new Date;a.setTime(d*864e5+a.getTime());b+=";expires="+a.toGMTString()}document.cookie=b};Zapatec.Utils.getCookie=function(b){var c=new RegExp("(^|;\\s*)"+b+"\\s*=(.*?)(;|$)");if(c.test(document.cookie)){var a=RegExp.$2;a=unescape(a);return a}return null};Zapatec.Utils.makePref=function(c){function d(a){return typeof a=="object"&&!a?"null":typeof a=="number"||typeof a=="boolean"?a:typeof a=="string"?'"'+a.replace(/\22/,"\\22")+'"':null}var a="",b;for(b in c)a+=(a?",'":"'")+b+"':"+d(c[b]);return a};Zapatec.Utils.loadPref=function(txt){var obj=null;try{eval("obj={"+txt+"}")}catch(e){}return obj};Zapatec.Utils.mergeObjects=function(c,a){for(var b in a)c[b]=a[b]};Zapatec.Utils.__wch_id=0;Zapatec.Utils.createWCH=function(){var b=null;if(Zapatec.is_ie&&!Zapatec.is_ie5){var c="filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);",a="WCH"+ ++Zapatec.Utils.__wch_id;window.self.document.body.insertAdjacentHTML("beforeEnd",'<iframe id="'+a+'" scroll="no" frameborder="0" style="z-index:0;position:absolute;visibility:hidden;'+c+'border:0;top:0;left:0;width:0;height:0;" src="javascript:false;"></iframe>');b=window.self.document.getElementById(a)}return b};Zapatec.Utils.setupWCH_el=function(m,f,c){if(m){var i=Zapatec.Utils.getAbsolutePos(f),a=i.x,b=i.y,g=a+f.offsetWidth,h=b+f.offsetHeight;if(c){var l=Zapatec.Utils.getAbsolutePos(c),d=l.x,e=l.y,j=d+c.offsetWidth,k=e+c.offsetHeight;if(a>d)a=d;if(b>e)b=e;if(g<j)g=j;if(h<k)h=k}Zapatec.Utils.setupWCH(m,a,b,g-a,h-b)}};Zapatec.Utils.setupWCH=function(b,e,f,d,c){if(b){var a=b.style;typeof e!="undefined"&&(a.left=e+"px");typeof f!="undefined"&&(a.top=f+"px");typeof d!="undefined"&&(a.width=d+"px");typeof c!="undefined"&&(a.height=c+"px");a.visibility="visible"}};Zapatec.Utils.hideWCH=function(a){if(a)a.style.visibility="hidden"};Zapatec.Utils.destroy=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)};Zapatec.Utils.newCenteredWindow=function(h,f,d,c,e){var a=0,b=0;if(screen.width)a=(screen.width-d)/2;if(screen.height)b=(screen.height-c)/2;var g="height="+c+",width="+d+",top="+b+",left="+a+",scrollbars="+e+",resizable",i=window.open(h,f,g);return i};Zapatec.Utils.selectOption=function(sel,val,call_default){for(var a=sel.options,o,i=a.length;--i>=0;){o=a[i];o.selected=o.val==val}sel.value=val;if(call_default)if(typeof sel.onchange=="function")sel.onchange();else if(typeof sel.onchange=="string")eval(sel.onchange)};Zapatec.Utils.getNextSibling=function(a,b){a=a.nextSibling;if(!b)return a;b=b.toLowerCase();while(a&&(a.nodeType!=1||a.tagName.toLowerCase()!=b))a=a.nextSibling;return a};Zapatec.Utils.getFirstChild=function(a,b){a=a.firstChild;if(!b)return a;b=b.toLowerCase();return a.nodeType==1&&a.tagName.toLowerCase()==b?a:Zapatec.Utils.getNextSibling(a,b)};Zapatec.Utils._ids={};Zapatec.Utils.generateID=function(a,b){if(typeof b=="undefined"){if(typeof this._ids[a]=="undefined")this._ids[a]=0;b=++this._ids[a]}return"zapatec-"+a+"-"+b};Zapatec.Utils.addTooltip=function(b,a){return new Zapatec.Tooltip(b,a)};Zapatec.is_opera=/opera/i.test(navigator.userAgent);Zapatec.is_ie=/msie/i.test(navigator.userAgent)&&!Zapatec.is_opera;Zapatec.is_ie5=Zapatec.is_ie&&/msie 5\.0/i.test(navigator.userAgent);Zapatec.is_mac_ie=/msie.*mac/i.test(navigator.userAgent)&&!Zapatec.is_opera;Zapatec.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Zapatec.is_konqueror=/Konqueror/i.test(navigator.userAgent);Zapatec.is_gecko=/Gecko/i.test(navigator.userAgent)
