if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.version="07-01";if(typeof Zapatec.zapatecPath=="undefined"){Zapatec.zapatecPath=function(){if(document.documentElement){var a=document.documentElement.innerHTML.match(/<script[^>]+src="([^"]*zapatec(-core|-src)?.js[^"]*)"/i);if(a&&a.length>=2){a=a[1].split("?");a=a[0].split("/");if(Array.prototype.pop){a.pop()}else{a.length-=1}return a.length?a.join("/")+"/":""}}return""}()}if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Utils={};Zapatec.Utils.getAbsolutePos=function(e,g){var a=0,d=0;if(!g){var c=/^div$/i.test(e.tagName);if(c&&e.scrollLeft){a=e.scrollLeft}if(c&&e.scrollTop){d=e.scrollTop}}var f={x:e.offsetLeft-a,y:e.offsetTop-d};if(e.offsetParent){var b=this.getAbsolutePos(e.offsetParent);f.x+=b.x;f.y+=b.y}return f};Zapatec.Utils.getElementOffset=function(c){var d=iTop=iWidth=iHeight=0;if(c.getBoundingClientRect){var f=c.getBoundingClientRect();d=f.left;iTop=f.top;iWidth=f.right-d;iHeight=f.bottom-iTop;d+=Zapatec.Utils.getPageScrollX()-2;iTop+=Zapatec.Utils.getPageScrollY()-2}else{iWidth=c.offsetWidth;iHeight=c.offsetHeight;var a=Zapatec.Utils.getStyleProperty(c,"position");if(a=="fixed"){d=c.offsetLeft+Zapatec.Utils.getPageScrollX();iTop=c.offsetTop+Zapatec.Utils.getPageScrollY()}else{if(a=="absolute"){while(c){var b=c.tagName;if(b){b=b.toLowerCase();if(b!="body"&&b!="html"){d+=parseInt(c.offsetLeft,10)||0;iTop+=parseInt(c.offsetTop,10)||0}}c=c.offsetParent;var b=c?c.tagName:null;if(b){b=b.toLowerCase();if(b!="body"&&b!="html"){d-=c.scrollLeft;iTop-=c.scrollTop}}}}else{var e=c;while(e){d+=parseInt(e.offsetLeft,10)||0;iTop+=parseInt(e.offsetTop,10)||0;e=e.offsetParent}e=c;while(e.parentNode){e=e.parentNode;var b=e.tagName;if(b){b=b.toLowerCase();if(b!="body"&&b!="html"&&b!="tr"){d-=e.scrollLeft;iTop-=e.scrollTop}}}}}}return{left:d,top:iTop,x:d,y:iTop,width:iWidth,height:iHeight}};Zapatec.Utils.getElementOffsetScrollable=function(b){var a=Zapatec.Utils.getElementOffset(b);if(b.scrollLeft){a.left-=b.scrollLeft;a.x=a.left}if(b.scrollTop){a.top-=b.scrollTop;a.y=a.top}return a};Zapatec.Utils.fixBoxPosition=function(e,a){var c=Zapatec.Utils.getPageScrollX();var b=Zapatec.Utils.getPageScrollY();var d=Zapatec.Utils.getWindowSize();a=parseInt(a,10)||0;if(e.x<c){e.x=c+a}if(e.y<b){e.y=b+a}if(e.x+e.width>c+d.width){e.x=c+d.width-e.width-a}if(e.y+e.height>b+d.height){e.y=b+d.height-e.height-a}};Zapatec.Utils.isRelated=function(c,a){a||(a=window.event);var f=a.relatedTarget;if(!f){var b=a.type;if(b=="mouseover"){f=a.fromElement}else{if(b=="mouseout"){f=a.toElement}}}try{while(f){if(f==c){return true}f=f.parentNode}}catch(d){}return false};Zapatec.Utils.removeClass=function(e,d){if(!(e&&e.className)){return}var a=e.className.split(" ");var b=[];for(var c=a.length;c>0;){if(a[--c]!=d){b[b.length]=a[c]}}e.className=b.join(" ")};Zapatec.Utils.addClass=function(b,a){Zapatec.Utils.removeClass(b,a);b.className+=" "+a};Zapatec.Utils.getElement=function(a){if(Zapatec.is_ie){return window.event.srcElement}else{return a.currentTarget}};Zapatec.Utils.getTargetElement=function(a){if(Zapatec.is_ie){return window.event.srcElement}else{return a.target}};Zapatec.Utils.getMousePos=function(d){d||(d=window.event);var c={pageX:0,pageY:0,clientX:0,clientY:0};if(d){var b=(typeof d.pageX!="undefined");var a=(typeof d.clientX!="undefined");if(b||a){if(b){c.pageX=d.pageX;c.pageY=d.pageY}else{c.pageX=d.clientX+Zapatec.Utils.getPageScrollX();c.pageY=d.clientY+Zapatec.Utils.getPageScrollY()}if(a){c.clientX=d.clientX;c.clientY=d.clientY}else{c.clientX=d.pageX-Zapatec.Utils.getPageScrollX();c.clientY=d.pageY-Zapatec.Utils.getPageScrollY()}}}return c};Zapatec.Utils.stopEvent=function(a){a||(a=window.event);if(a){if(Zapatec.is_ie){a.cancelBubble=true;a.returnValue=false}else{a.preventDefault();a.stopPropagation()}}return false};Zapatec.Utils.removeOnUnload=[];Zapatec.Utils.addEvent=function(c,d,b,a){if(c.addEventListener){if(!a){a=false}c.addEventListener(d,b,a)}else{if(c.attachEvent){c.detachEvent("on"+d,b);c.attachEvent("on"+d,b);if(a){c.setCapture(false)}}}Zapatec.Utils.removeOnUnload.push({element:c,event:d,listener:b,capture:a})};Zapatec.Utils.removeEvent=function(e,f,d,c){if(e.removeEventListener){e.removeEventListener(f,d,c)}else{if(e.detachEvent){e.detachEvent("on"+f,d)}}for(var b=Zapatec.Utils.removeOnUnload.length-1;b>=0;b--){var a=Zapatec.Utils.removeOnUnload[b];if(!a){continue}if(e==a.element&&f==a.event&&d==a.listener&&c==a.capture){Zapatec.Utils.removeOnUnload[b]=null;Zapatec.Utils.removeEvent(a.element,a.event,a.listener,a.capture)}}};Zapatec.Utils.createElement=function(d,c,a){var b=null;if(window.self.document.createElementNS){b=window.self.document.createElementNS("http://www.w3.org/1999/xhtml",d)}else{b=document.createElement(d)}if(typeof c!="undefined"&&c!=null){c.appendChild(b)}if(!a){if(Zapatec.is_ie){b.setAttribute("unselectable",true)}if(Zapatec.is_gecko){b.style.setProperty("-moz-user-select","none","")}}return b};Zapatec.Utils.writeCookie=function(c,e,d,f,b){e=escape(e);var a=c+"="+e,g;if(d){a+=";domain="+d}if(f){a+=";path="+f}if(b){g=new Date();g.setTime(b*86400000+g.getTime());a+=";expires="+g.toGMTString()}document.cookie=a};Zapatec.Utils.getCookie=function(b){var e=b+"=";var d=0;while(d<document.cookie.length){var a=d+e.length;if(document.cookie.substring(d,a)==e){var c=document.cookie.indexOf(";",a);if(c==-1){c=document.cookie.length}return unescape(document.cookie.substring(a,c))}d=document.cookie.indexOf(" ",d)+1;if(d==0){break}}return null};Zapatec.Utils.makePref=function(c){function d(e){if(typeof e=="object"&&!e){return"null"}else{if(typeof e=="number"||typeof e=="boolean"){return e}else{if(typeof e=="string"){return'"'+e.replace(/\x22/,"\\22")+'"'}else{return 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(a,c){for(var b in c){a[b]=c[b]}};Zapatec.Utils.__wch_id=0;Zapatec.Utils.createWCH=function(a){var c=null;a=a||document.body;if(Zapatec.is_ie&&!Zapatec.is_ie5){var b="filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);";var d="WCH"+(++Zapatec.Utils.__wch_id);a.insertAdjacentHTML("beforeEnd",'<iframe id="'+d+'" scrolling="no" frameborder="0" style="z-index:0;position:absolute;visibility:hidden;'+b+'border:0;top:0;left:0;width:0;height:0" src="javascript:false"></iframe>');c=document.getElementById(d)}return c};Zapatec.Utils.setupWCH_el=function(j,a,d){if(j){var k=Zapatec.Utils.getAbsolutePos(a),g=k.x,n=k.y,c=g+a.offsetWidth,m=n+a.offsetHeight;if(d){var l=Zapatec.Utils.getAbsolutePos(d),i=l.x,e=l.y,h=i+d.offsetWidth,b=e+d.offsetHeight;if(g>i){g=i}if(n>e){n=e}if(c<h){c=h}if(m<b){m=b}}Zapatec.Utils.setupWCH(j,g,n,c-g,m-n)}};Zapatec.Utils.setupWCH=function(e,a,g,b,d){if(e){var c=e.style;(typeof a!="undefined")&&(c.left=a+"px");(typeof g!="undefined")&&(c.top=g+"px");(typeof b!="undefined")&&(c.width=b+"px");(typeof d!="undefined")&&(c.height=d+"px");c.visibility="inherit"}};Zapatec.Utils.hideWCH=function(a){if(a){a.style.visibility="hidden"}};Zapatec.Utils.getPageScrollY=function(){if(window.pageYOffset){return window.pageYOffset}else{if(document.body&&document.body.scrollTop){return document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}}}return 0};Zapatec.Utils.getPageScrollX=function(){if(window.pageXOffset){return window.pageXOffset}else{if(document.body&&document.body.scrollLeft){return document.body.scrollLeft}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}}}return 0};Zapatec.ScrollWithWindow={};Zapatec.ScrollWithWindow.list=[];Zapatec.ScrollWithWindow.stickiness=0.25;Zapatec.ScrollWithWindow.register=function(a){var c=a.offsetTop||0;var b=a.offsetLeft||0;Zapatec.ScrollWithWindow.list.push({node:a,origTop:c,origLeft:b});if(!Zapatec.ScrollWithWindow.interval){Zapatec.ScrollWithWindow.on()}};Zapatec.ScrollWithWindow.unregister=function(a){for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var c=Zapatec.ScrollWithWindow.list[b];if(a==c.node){Zapatec.ScrollWithWindow.list.splice(b,1);if(!Zapatec.ScrollWithWindow.list.length){Zapatec.ScrollWithWindow.off()}return}}};Zapatec.ScrollWithWindow.moveTop=function(c){Zapatec.ScrollWithWindow.top+=(c-Zapatec.ScrollWithWindow.top)*Zapatec.ScrollWithWindow.stickiness;if(Math.abs(Zapatec.ScrollWithWindow.top-c)<=1){Zapatec.ScrollWithWindow.top=c}for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var d=Zapatec.ScrollWithWindow.list[b];var a=d.node;a.style.position="absolute";if(!d.origTop&&d.origTop!==0){d.origTop=parseInt(a.style.top)||0}a.style.top=d.origTop+parseInt(Zapatec.ScrollWithWindow.top)+"px"}};Zapatec.ScrollWithWindow.moveLeft=function(c){Zapatec.ScrollWithWindow.left+=(c-Zapatec.ScrollWithWindow.left)*Zapatec.ScrollWithWindow.stickiness;if(Math.abs(Zapatec.ScrollWithWindow.left-c)<=1){Zapatec.ScrollWithWindow.left=c}for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var d=Zapatec.ScrollWithWindow.list[b];var a=d.node;a.style.position="absolute";if(!d.origLeft&&d.origLeft!==0){d.origLeft=parseInt(a.style.left)||0}a.style.left=d.origLeft+parseInt(Zapatec.ScrollWithWindow.left)+"px"}};Zapatec.ScrollWithWindow.cycle=function(){var b=Zapatec.Utils.getPageScrollY();var a=Zapatec.Utils.getPageScrollX();if(b!=Zapatec.ScrollWithWindow.top){Zapatec.ScrollWithWindow.moveTop(b)}if(a!=Zapatec.ScrollWithWindow.left){Zapatec.ScrollWithWindow.moveLeft(a)}};Zapatec.ScrollWithWindow.on=function(){if(Zapatec.ScrollWithWindow.interval){return}Zapatec.ScrollWithWindow.top=Zapatec.Utils.getPageScrollY();Zapatec.ScrollWithWindow.left=Zapatec.Utils.getPageScrollX();Zapatec.ScrollWithWindow.interval=setInterval(Zapatec.ScrollWithWindow.cycle,50)};Zapatec.ScrollWithWindow.off=function(){if(!Zapatec.ScrollWithWindow.interval){return}clearInterval(Zapatec.ScrollWithWindow.interval);Zapatec.ScrollWithWindow.interval=null};Zapatec.FixateOnScreen={};Zapatec.FixateOnScreen.getExpression=function(b,a){return"Zapatec.Utils.getPageScroll"+a.toUpperCase()+"() + "+b};Zapatec.FixateOnScreen.parseCoordinates=function(b){if(!this.isRegistered(b)){return false}var a=0;var d=0;var c=b.style;if(Zapatec.is_ie&&!Zapatec.is_ie7){a=c.getExpression("left").split(" ");a=parseInt(a[a.length-1],10);d=c.getExpression("top").split(" ");d=parseInt(d[d.length-1],10)}else{a=parseInt(c.left,10);d=parseInt(c.top,10)}a+=Zapatec.Utils.getPageScrollX();d+=Zapatec.Utils.getPageScrollY();return{x:a,y:d}};Zapatec.FixateOnScreen.correctCoordinates=function(a,b){position={x:a,y:b};if(position.x||position.x===0){position.x-=Zapatec.Utils.getPageScrollX();if(Zapatec.is_ie&&!Zapatec.is_ie7){position.x=this.getExpression(position.x,"X")}else{position.x+="px"}}if(position.y||position.y===0){position.y-=Zapatec.Utils.getPageScrollY();if(Zapatec.is_ie&&!Zapatec.is_ie7){position.y=this.getExpression(position.y,"Y")}else{position.y+="px"}}return position};Zapatec.FixateOnScreen.register=function(b){if(!Zapatec.isHtmlElement(b)){return false}if(this.isRegistered(b)){return true}var c=Zapatec.Utils.getElementOffset(b);c={x:parseInt(b.style.left,10)||c.x,y:parseInt(b.style.top,10)||c.y};c=this.correctCoordinates(c.x,c.y);if(!Zapatec.is_ie||Zapatec.is_ie7){var a=b.restorer;if(!a||!a.getObject||a.getObject()!=b){a=b.restorer=new Zapatec.SRProp(b)}a.saveProp("style.position");b.style.position="fixed";b.style.left=c.x;b.style.top=c.y}else{b.style.setExpression("left",c.x);b.style.setExpression("top",c.y)}b.zpFixed=true;return true};Zapatec.FixateOnScreen.unregister=function(a){if(!Zapatec.isHtmlElement(a)){return false}var b=this.parseCoordinates(a);if(b===false){return true}if(Zapatec.is_ie&&!Zapatec.is_ie7){a.style.removeExpression("left");a.style.removeExpression("top")}a.style.left=b.x+"px";a.style.top=b.y+"px";if(!Zapatec.is_ie||Zapatec.is_ie7){a.restorer.restoreProp("style.position",true)}a.zpFixed=false;return true};Zapatec.FixateOnScreen.isRegistered=function(a){if(a.zpFixed){return true}return false};Zapatec.Utils.destroy=function(a){if(a&&a.parentNode){a.parentNode.removeChild(a)}};Zapatec.Utils.newCenteredWindow=function(a,h,b,i,f){var d=0;var g=0;if(screen.width){d=(screen.width-b)/2}if(screen.height){g=(screen.height-i)/2}var c="height="+i+",width="+b+",top="+g+",left="+d+",scrollbars="+f+",resizable";var e=window.open(a,h,c);return e};Zapatec.Utils.getWindowSize=function(){var a=0;var b=0;if(Zapatec.is_opera){a=document.body.clientWidth||0;b=document.body.clientHeight||0}else{if(Zapatec.is_khtml){a=window.innerWidth||0;b=window.innerHeight||0}else{if(document.compatMode&&document.compatMode=="CSS1Compat"){a=document.documentElement.clientWidth||0;b=document.documentElement.clientHeight||0}else{a=document.body.clientWidth||0;b=document.body.clientHeight||0}}}return{width:a,height:b}};Zapatec.Utils.selectOption=function(sel,val,call_default){var a=sel.options,i,o;for(i=a.length;--i>=0;){o=a[i];o.selected=(o.value==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(c,a,b){c=c.nextSibling;if(!a){return c}a=a.toLowerCase();if(b){b=b.toLowerCase()}while(c){if(c.nodeType==1&&(c.tagName.toLowerCase()==a||(b&&c.tagName.toLowerCase()==b))){return c}c=c.nextSibling}return c};Zapatec.Utils.getPreviousSibling=function(c,a,b){c=c.previousSibling;if(!a){return c}a=a.toLowerCase();if(b){b=b.toLowerCase()}while(c){if(c.nodeType==1&&(c.tagName.toLowerCase()==a||(b&&c.tagName.toLowerCase()==b))){return c}c=c.previousSibling}return c};Zapatec.Utils.getFirstChild=function(c,a,b){if(!c){return null}c=c.firstChild;if(!c){return null}if(!a){return c}a=a.toLowerCase();if(c.nodeType==1){if(c.tagName.toLowerCase()==a){return c}else{if(b){b=b.toLowerCase();if(c.tagName.toLowerCase()==b){return c}}}}return Zapatec.Utils.getNextSibling(c,a,b)};Zapatec.Utils.getLastChild=function(c,a,b){if(!c){return null}c=c.lastChild;if(!c){return null}if(!a){return c}a=a.toLowerCase();if(c.nodeType==1){if(c.tagName.toLowerCase()==a){return c}else{if(b){b=b.toLowerCase();if(c.tagName.toLowerCase()==b){return c}}}}return Zapatec.Utils.getPreviousSibling(c,a,b)};Zapatec.Utils.getChildText=function(c){if(c==null){return""}var b=[];var a=c.firstChild;while(a!=null){if(a.nodeType==3){b.push(a.data)}a=a.nextSibling}return b.join(" ")};Zapatec.Utils.insertAfter=function(b,a){if(b.nextSibling){b.parentNode.insertBefore(a,b.nextSibling)}else{b.parentNode.appendChild(a)}};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({target:b,tooltip:a})};Zapatec.isLite=true;Zapatec.Utils.checkLinks=function(){var b=document.getElementsByTagName("A");for(var a=0;a<b.length;a++){if(Zapatec.Utils.checkLink(b[a])){return true}}return false};Zapatec.Utils.checkLink=function(e){if(!e){return false}if(!/^https?:\/\/((dev|www)\.)?zapatec\.com/i.test(e.href)){return false}var c="";for(var b=0;b<e.childNodes.length;b++){if(e.childNodes[b].nodeType==3){c+=e.childNodes[b].nodeValue}}if(c.length<4){return false}var a=e;while(a&&a.nodeName.toLowerCase()!="html"){if(Zapatec.Utils.getStyleProperty(a,"display")=="none"||Zapatec.Utils.getStyleProperty(a,"visibility")=="hidden"||Zapatec.Utils.getStyleProperty(a,"opacity")=="0"||Zapatec.Utils.getStyleProperty(a,"-moz-opacity")=="0"||/alpha\(opacity=0\)/i.test(Zapatec.Utils.getStyleProperty(a,"filter"))){return false}a=a.parentNode}var d=Zapatec.Utils.getElementOffset(e);if(d.left<0||d.top<0){return false}return true};Zapatec.Utils.checkActivation=function(){if(!Zapatec.isLite){return true}var e=[];add_product=function(h,g,i){e[h]={webdir:g,name:i,bActive:false}};add_product("zpmenu.js","menu","Menu");add_product("tree.js","prod3","Tree");var d,f,c;var b=false;var a=document.getElementsByTagName("script");for(c=0;c<a.length;c++){if(/wizard.js/i.test(a[c].src)){return true}f=a[c].src.split("/");if(f.length==0){d=a[c]}else{d=f[f.length-1]}d=d.toLowerCase();if(typeof e[d]!="undefined"){b=true;e[d].bActive=true}}for(c in e){if(e[c].bActive==true){strMsg+="\nTo purchase the Zapatec "+e[c].name+" visit www.toa21.com"+e[c].webdir+"/"}}alert(strMsg);return false};Zapatec.Utils.clone=function(a){var c;if(!a&&typeof a=="object"){return null}else{if(typeof a=="undefined"){return c}}if((a instanceof String)||(a instanceof Number)||(a instanceof Boolean)){c=new a.constructor(a.valueOf())}else{c=new a.constructor()}for(var b in a){if(typeof a[b]=="object"){c[b]=Zapatec.Utils.clone(a[b],true)}else{c[b]=a[b]}}return c};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_ie7=(Zapatec.is_ie&&/msie 7\.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);Zapatec.is_webkit=/WebKit/i.test(navigator.userAgent);Zapatec.webkitVersion=Zapatec.is_webkit?parseInt(navigator.userAgent.replace(/.+WebKit\/([0-9]+)\..+/,"$1")):-1;if(!Object.prototype.hasOwnProperty){Object.prototype.hasOwnProperty=function(a){try{var b=this.constructor.prototype;while(b){if(b[a]==this[a]){return false}b=b.prototype}}catch(c){}return true}}if(!Function.prototype.call){Function.prototype.call=function(){var objThis=arguments[0];objThis._this_func=this;var arrArgs=[];for(var iArg=1;iArg<arguments.length;iArg++){arrArgs[arrArgs.length]="arguments["+iArg+"]"}var ret=eval("objThis._this_func("+arrArgs.join(",")+")");objThis._this_func=null;return ret}}if(!Function.prototype.apply){Function.prototype.apply=function(){var objThis=arguments[0];var objArgs=arguments[1];objThis._this_func=this;var arrArgs=[];if(objArgs){for(var iArg=0;iArg<objArgs.length;iArg++){arrArgs[arrArgs.length]="objArgs["+iArg+"]"}}var ret=eval("objThis._this_func("+arrArgs.join(",")+")");objThis._this_func=null;return ret}}if(!Array.prototype.pop){Array.prototype.pop=function(){var a;if(this.length){a=this[this.length-1];this.length-=1}return a}}if(!Array.prototype.push){Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length}}if(!Array.prototype.shift){Array.prototype.shift=function(){var b;if(this.length){b=this[0];for(var a=0;a<this.length-1;a++){this[a]=this[a+1]}this.length-=1}return b}}if(!Array.prototype.unshift){Array.prototype.unshift=function(){if(arguments.length){var b,a=arguments.length;for(b=this.length+a-1;b>=a;b--){this[b]=this[b-a]}for(b=0;b<a;b++){this[b]=arguments[b]}}return this.length}}if(!Array.prototype.splice){Array.prototype.splice=function(a,c){var d=[],e=[],b;for(b=2;b<arguments.length;b++){d.push(arguments[b])}for(b=a;(b<a+c)&&(b<this.length);b++){e.push(this[b])}for(b=a+c;b<this.length;b++){this[b-c]=this[b]}this.length-=e.length;for(b=this.length+d.length-1;b>=a+d.length;b--){this[b]=this[b-d.length]}for(b=0;b<d.length;b++){this[a+b]=d[b]}return e}}Zapatec.Utils.arrIndexOf=function(a,b,c){if(Array.prototype.indexOf){return a.indexOf(b,c)}if(!c){c=0}for(var d=c;d<a.length;d++){if(a[d]==b){return d}}return -1};Zapatec.Log=function(a){if(!a){return}var b=a.description;if(a.severity){b=a.severity+":\n"+b}if(a.type!="warning"){alert(b)}};Zapatec.Utils.Array={};Zapatec.Utils.Array.insertBefore=function(b,f,e,a){var d=new Array();for(var c in b){if(c==a){if(e){d[e]=f}else{d.push(f)}}d[c]=b[c]}return d};Zapatec.inherit=function(d,b,a){var c=function(){};c.prototype=b.prototype;d.prototype=new c();d.prototype.constructor=d;d.SUPERconstructor=b;d.SUPERclass=b.prototype;if(typeof b.path!="undefined"){if(a&&a.keepPath){d.path=b.path}else{d.path=Zapatec.getPath(d.id)}}};Zapatec.getPath=function(c){var a;if(typeof c=="string"){var e=document.getElementById(c);if(e){a=e.getAttribute("src")}}if(!a){if(typeof Zapatec.lastLoadedModule=="string"){return Zapatec.lastLoadedModule}if(document.documentElement){var f=document.documentElement.innerHTML;var b=f.match(/<script[^>]+src=[^>]+>/gi);if(b&&b.length){f=b[b.length-1];b=f.match(/src="([^"]+)/i);if(b&&b.length==2){a=b[1]}}}if(!a){return""}}a=a.replace(/\\/g,"/");var d=a.split("?");d=d[0].split("/");d=d.slice(0,-1);if(!d.length){return""}return d.join("/")+"/"};Zapatec.Utils.setWindowEvent=function(a){if(a){window.event=a}};Zapatec.Utils.emulateWindowEvent=function(b){if(document.addEventListener){for(var a=0;a<b.length;a++){document.addEventListener(b[a],Zapatec.Utils.setWindowEvent,true)}}};Zapatec.windowLoaded=typeof(document.readyState)!="undefined"?(document.readyState=="loaded"||document.readyState=="complete"):document.getElementsByTagName!=null&&typeof(document.getElementsByTagName("body")[0])!="undefined";Zapatec.Utils.addEvent(window,"load",function(){Zapatec.windowLoaded=true});Zapatec.Utils.warnUnload=function(b,a){Zapatec.Utils.warnUnloadFlag=true;if(typeof(b)!="string"){b="All your changes will be lost."}if(typeof(a)=="undefined"){a=window}Zapatec.Utils.addEvent(a,"beforeunload",function(c){if(Zapatec.Utils.warnUnloadFlag!=true){return true}if(typeof(c)=="undefined"){c=window.event}c.returnValue=b;return false})};Zapatec.Utils.unwarnUnload=function(b,a){Zapatec.Utils.warnUnloadFlag=false};Zapatec.Utils.warnUnloadFlag=false;Zapatec.Utils.getMaxZindex=function(){if(window.opera||Zapatec.is_khtml){return 2147483583}else{if(Zapatec.is_ie){return 2147483647}else{return 10737418239}}};Zapatec.Utils.correctCssLength=function(a){if(typeof a=="undefined"||(typeof a=="object"&&!a)){return"auto"}a+="";if(!a.length){return"auto"}if(/\d$/.test(a)){a+="px"}return a};Zapatec.Utils.destroyOnUnload=[];Zapatec.Utils.addDestroyOnUnload=function(b,a){Zapatec.Utils.destroyOnUnload.push([b,a])};Zapatec.Utils.createProperty=function(b,a,c){b[a]=c;Zapatec.Utils.addDestroyOnUnload(b,a)};Zapatec.Utils.addEvent(window,"unload",function(){for(var d=Zapatec.Utils.destroyOnUnload.length-1;d>=0;d--){var c=Zapatec.Utils.destroyOnUnload[d];c[0][c[1]]=null;c[0]=null}for(var b=Zapatec.Utils.removeOnUnload.length-1;b>=0;b--){var a=Zapatec.Utils.removeOnUnload[b];if(!a){continue}Zapatec.Utils.removeOnUnload[b]=null;Zapatec.Utils.removeEvent(a.element,a.event,a.listener,a.capture)}});Zapatec.Utils.htmlEncode=function(a){a=a.replace(/&/ig,"&amp;");a=a.replace(/</ig,"&lt;");a=a.replace(/>/ig,"&gt;");a=a.replace(/\x22/ig,"&quot;");return a};Zapatec.Utils.applyStyle=function(c,a){if(typeof(c)=="string"){c=document.getElementById(c)}if(c==null||a==null||c.style==null){return null}if(Zapatec.is_opera){var b=a.split(";");for(var j=0;j<b.length;j++){var g=b[j].split(":");if(!g[1]){continue}var h=g[1].replace(/^\s*/,"").replace(/\s*$/,"");var i="";for(var d=0;d<g[0].length;d++){if(g[0].charAt(d)=="-"){d++;if(d<g[0].length){i+=g[0].charAt(d).toUpperCase()}continue}i+=g[0].charAt(d)}switch(i){case"float":i="cssFloat";break}try{c.style[i]=h}catch(f){}}}else{c.style.cssText=a}return true};Zapatec.Utils.getStyleProperty=function(c,a){if(document.defaultView&&document.defaultView.getComputedStyle){a=a.replace(/([A-Z])/g,"-$1").toLowerCase();var b=document.defaultView.getComputedStyle(c,"");if(b){return b.getPropertyValue(a)}}else{if(c.currentStyle){return c.currentStyle[a]}}return c.style[a]};Zapatec.Utils.getPrecision=function(a){return(a+"").replace(/^\d*\.*/,"").length};Zapatec.Utils.setPrecision=function(a,c){a*=1;if(a.toFixed){return(a*1).toFixed(c)*1}var b=Math.pow(10,c);return parseInt(a*b,10)/b};Zapatec.Utils.setPrecisionString=function(c,e){var a=Zapatec.Utils.setPrecision(c,e)+"";var b=e-Zapatec.Utils.getPrecision(a);for(var d=0;d<b;d++){a+="0"}return a};Zapatec.Utils.createNestedHash=function(c,d,e){if(c==null||d==null){return null}var a=c;for(var b=0;b<d.length;b++){if(typeof(a[d[b]])=="undefined"){a[d[b]]={}}if(b==d.length-1&&typeof(e)!="undefined"){a[d[b]]=e}a=a[d[b]]}};Zapatec.implement=function(c,d){if(typeof d!="string"){return false}if(typeof c=="function"){c=c.prototype}if(!c||typeof c!="object"){return false}var b=window;var g=d.split(".");try{for(var a=0;a<g.length;++a){b=b[g[a]]}}catch(f){return false}if(typeof c.interfaces!="object"){c.interfaces={};c.interfaces[d]=true}else{if(c.interfaces[d]!==true){c.interfaces=Zapatec.Utils.clone(c.interfaces);c.interfaces[d]=true}else{return true}}for(var h in b){c[h]=b[h]}c.hasInterface=function(e){if(this.interfaces[e]===true){return true}return false};return true};Zapatec.Utils.getCharFromEvent=function(a){if(!a){a=window.event}var b={};if(Zapatec.is_gecko&&!Zapatec.is_khtml&&a.type!="keydown"&&a.type!="keyup"){if(a.charCode){b.chr=String.fromCharCode(a.charCode)}else{b.charCode=a.keyCode}}else{b.charCode=a.keyCode||a.which;b.chr=String.fromCharCode(b.charCode)}if(Zapatec.is_opera&&b.charCode==0){b.charCode=null;b.chr=null}if(Zapatec.is_khtml&&b.charCode==63272){b.charCode=46;b.chr=null}return b};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Transport=function(){};if(typeof ActiveXObject!="undefined"){Zapatec.Transport.XMLDOM=null;Zapatec.Transport.XMLHTTP=null;Zapatec.Transport.pickActiveXVersion=function(a){for(var d=0;d<a.length;d++){try{var b=new ActiveXObject(a[d]);if(b){return a[d]}}catch(c){}}return null};Zapatec.Transport.XMLDOM=Zapatec.Transport.pickActiveXVersion(["Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"]);Zapatec.Transport.XMLHTTP=Zapatec.Transport.pickActiveXVersion(["Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);Zapatec.Transport.pickActiveXVersion=null}Zapatec.Transport.createXmlHttpRequest=function(){if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject(Zapatec.Transport.XMLHTTP)}catch(a){}}if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()}return null};Zapatec.Transport.isBusy=function(e){var b=e.busyContainer;if(typeof b=="string"){b=document.getElementById(b)}if(!b){return}var a=e.busyImage;if(typeof a!="string"){a=""}a=a.split("/").pop();if(!a.length){a="zpbusy.gif"}var d=b.firstChild;if(d){d=d.firstChild;if(d){d=d.firstChild;if(d&&d.tagName&&d.tagName.toLowerCase()=="img"){var c=d.getAttribute("src");if(typeof c=="string"&&c.length){c=c.split("/").pop();if(c==a){return true}}}}}return false};Zapatec.Transport.showBusy=function(a){if(Zapatec.Transport.isBusy(a)){return}var l=a.busyContainer;if(typeof l=="string"){l=document.getElementById(l)}if(!l){return}var g=a.busyImage;var i=a.busyImageWidth;var k=a.busyImageHeight;if(typeof g!="string"||!g.length){g="zpbusy.gif"}else{if(typeof i=="number"||(typeof i=="string"&&/\d$/.test(i))){i+="px"}if(typeof k=="number"||(typeof k=="string"&&/\d$/.test(k))){k+="px"}}if(!i){i="65px"}if(!k){k="35px"}var f="";if(g.indexOf("/")<0){if(Zapatec.zapatecPath){f=Zapatec.zapatecPath}else{f=Zapatec.Transport.getPath("transport.js")}}var d=[];d.push('<img src="');d.push(f);d.push(g);d.push('"');if(i||k){d.push(' style="');if(i){d.push("width:");d.push(i);d.push(";")}if(k){d.push("height:");d.push(k)}d.push('"')}d.push(" />");var b=l.offsetWidth;var j=l.offsetHeight;var h=Zapatec.Utils.createElement("div");h.style.position="relative";h.style.zIndex=2147483583;var e=Zapatec.Utils.createElement("div",h);e.style.position="absolute";e.innerHTML=d.join("");if(l.firstChild){l.insertBefore(h,l.firstChild)}else{l.appendChild(h)}var m=e.offsetWidth;var c=e.offsetHeight;if(b>m){e.style.left=l.scrollLeft+(b-m)/2+"px"}if(j>c){e.style.top=l.scrollTop+(j-c)/2+"px"}};Zapatec.Transport.removeBusy=function(b){var a=b.busyContainer;if(typeof a=="string"){a=document.getElementById(a)}if(!a){return}if(Zapatec.Transport.isBusy(b)){a.removeChild(a.firstChild)}};Zapatec.Transport.fetch=function(b){if(b==null||typeof b!="object"){return null}if(!b.url){return null}if(!b.method){b.method="GET"}if(typeof b.async=="undefined"){b.async=true}if(!b.contentType&&b.method.toUpperCase()=="POST"){b.contentType="application/x-www-form-urlencoded"}if(!b.content){b.content=null}if(!b.onLoad){b.onLoad=null}if(!b.onError){b.onError=null}var c=Zapatec.Transport.createXmlHttpRequest();if(c==null){return null}Zapatec.Transport.showBusy(b);var e=false;var d=function(){Zapatec.Transport.removeBusy(b);try{if(c.status==200||c.status==304||(location.protocol=="file:"&&!c.status)){if(typeof b.onLoad=="function"){b.onLoad(c)}}else{if(!e){e=true;Zapatec.Transport.displayError(c.status,"Error: Can't fetch "+b.url+".\n"+(c.statusText||""),b.onError)}}}catch(f){if(!e){e=true;if(f.name&&f.name=="NS_ERROR_NOT_AVAILABLE"){Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\nFile not found.",b.onError)}else{Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\n"+(f.message||""),b.onError)}}}};try{if(typeof b.username!="undefined"&&typeof b.password!="undefined"){c.open(b.method,b.url,b.async,b.username,b.password)}else{c.open(b.method,b.url,b.async)}if(b.async){c.onreadystatechange=function(){if(c.readyState==4){d();c.onreadystatechange={}}}}if(b.contentType){c.setRequestHeader("Content-Type",b.contentType)}c.send(b.content);if(!b.async){d();return c}}catch(a){Zapatec.Transport.removeBusy(b);if(!e){e=true;if(a.name&&a.name=="NS_ERROR_FILE_NOT_FOUND"){Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\nFile not found.",b.onError)}else{Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\n"+(a.message||""),b.onError)}}}return null};Zapatec.Transport.parseHtml=function(b){b+="";b=b.replace(/^\s+/g,"");var a;if(document.createElementNS){a=document.createElementNS("http://www.w3.org/1999/xhtml","div")}else{a=document.createElement("div")}a.innerHTML=b;return a};Zapatec.Transport.evalGlobalScope=function(sScript){if(typeof sScript!="string"||!sScript.match(/\S/)){return}if(window.execScript){window.execScript(sScript,"javascript")}else{if(window.eval){window.eval(sScript)}}};Zapatec.Transport.setInnerHtml=function(c){if(!c||typeof c.html!="string"){return}var n=c.html;var p=null;if(typeof c.container=="string"){p=document.getElementById(c.container)}else{if(typeof c.container=="object"){p=c.container}}var l=[];if(n.match(/<\s*\/\s*script\s*>/i)){var k=n.split(/<\s*\/\s*script\s*>/i);var g=[];for(var e=k.length-1;e>=0;e--){var f=k[e];if(f.match(/\S/)){var b=f.match(/<\s*script([^>]*)>/i);if(b){var i=f.split(/<\s*script[^>]*>/i);while(i.length<2){if(f.match(/^<\s*script[^>]*>/i)){i.unshift("")}else{i.push("")}}g.unshift(i[0]);var q=b[1];var a=i[1];if(q.match(/\s+src\s*=/i)){a=""}else{a=a.replace(/function\s+([^(]+)/g,"$1=function")}l.push([q,a])}else{if(e<k.length-1){k[e-1]+="<\/script>"+f}else{g.unshift(f)}}}else{g.unshift(f)}}n=g.join("")}if(p){if(window.opera){p.innerHTML="<form></form>"}p.innerHTML=n}for(var o=0;o<l.length;o++){if(l[o][1].length){Zapatec.Transport.evalGlobalScope(l[o][1])}var q=l[o][0];q=q.replace(/\s+/g," ").replace(/^\s/,"").replace(/\s$/,"").replace(/ = /g,"=");if(q.indexOf("src=")>=0){var p=document.body;if(!p){p=document.getElementsByTagName("head")[0];if(!p){p=document}}var h=q.split(" ");var d=Zapatec.Utils.createElement("script");for(var m=0;m<h.length;m++){var j=h[m].split("=");if(j.length>1){d.setAttribute(j[0],j[1].match(/^[\s|"|']*([\s|\S]*[^'|"])[\s|"|']*$/)[1])}else{d.setAttribute(j[0],j[0])}}p.appendChild(d)}}};Zapatec.Transport.fetchXmlDoc=function(c){if(c==null||typeof c!="object"){return null}if(!c.url){return null}if(typeof c.async=="undefined"){c.async=true}if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(!c.method&&typeof c.username=="undefined"&&typeof c.password=="undefined"){if(document.implementation&&document.implementation.createDocument){var a=null;if(!c.reliable){c.reliable=false}var e={};for(var f in c){e[f]=c[f]}if(c.async){e.onLoad=function(h){e.onLoad=null;var i=new DOMParser();a=i.parseFromString(h.responseText,"text/xml");Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError)}}else{e.onLoad=null}var d=Zapatec.Transport.fetch(e);if(!c.async&&d){var g=new DOMParser();a=g.parseFromString(d.responseText,"text/xml");Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}return null}if(typeof ActiveXObject!="undefined"){Zapatec.Transport.showBusy(c);try{var a=new ActiveXObject(Zapatec.Transport.XMLDOM);a.async=c.async;if(c.async){a.onreadystatechange=function(){if(a.readyState==4){Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);a.onreadystatechange={}}}}a.load(c.url);if(!c.async){Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}return null}catch(b){Zapatec.Transport.removeBusy(c)}}}var e={};for(var f in c){e[f]=c[f]}if(c.async){e.onLoad=function(h){Zapatec.Transport.parseXml({strXml:h.responseText,onLoad:c.onLoad,onError:c.onError})}}else{e.onLoad=null}var d=Zapatec.Transport.fetch(e);if(!c.async&&d){return Zapatec.Transport.parseXml({strXml:d.responseText,onLoad:c.onLoad,onError:c.onError})}return null};Zapatec.Transport.parseXml=function(c){if(c==null||typeof c!="object"){return null}if(!c.strXml){return null}if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(window.DOMParser){try{var a=(new DOMParser()).parseFromString(c.strXml,"text/xml");Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}catch(b){Zapatec.Transport.displayError(0,"Error: Can't parse.\nString does not appear to be a valid XML fragment.",c.onError)}return null}if(typeof ActiveXObject!="undefined"){try{var a=new ActiveXObject(Zapatec.Transport.XMLDOM);a.loadXML(c.strXml);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}catch(b){}}return null};Zapatec.Transport.onXmlDocLoad=function(a,b,d){var c=null;if(a.parseError){c=a.parseError.reason;if(a.parseError.srcText){c+="Location: "+a.parseError.url+"\nLine number "+a.parseError.line+", column "+a.parseError.linepos+":\n"+a.parseError.srcText+"\n"}}else{if(a.documentElement&&a.documentElement.tagName=="parsererror"){c=a.documentElement.firstChild.data+"\n"+a.documentElement.firstChild.nextSibling.firstChild.data}else{if(!a.documentElement){c="String does not appear to be a valid XML fragment."}}}if(c){Zapatec.Transport.displayError(0,"Error: Can't parse.\n"+c,d)}else{if(typeof b=="function"){b(a)}}};Zapatec.Transport.serializeXmlDoc=function(a){if(window.XMLSerializer){return(new XMLSerializer).serializeToString(a)}if(a.xml){return a.xml}};Zapatec.Transport.fetchJsonObj=function(a){if(a==null||typeof a!="object"){return null}if(!a.url){return null}if(typeof a.async=="undefined"){a.async=true}if(!a.reliable){a.reliable=false}var c={};for(var d in a){c[d]=a[d]}if(a.async){c.onLoad=function(e){Zapatec.Transport.parseJson({strJson:e.responseText,reliable:a.reliable,onLoad:a.onLoad,onError:a.onError})}}else{c.onLoad=null}var b=Zapatec.Transport.fetch(c);if(!a.async&&b){return Zapatec.Transport.parseJson({strJson:b.responseText,reliable:a.reliable,onLoad:a.onLoad,onError:a.onError})}return null};Zapatec.Transport.parseJson=function(oArg){if(oArg==null||typeof oArg!="object"){return null}if(!oArg.reliable){oArg.reliable=false}if(!oArg.onLoad){oArg.onLoad=null}if(!oArg.onError){oArg.onError=null}var oJson=null;try{if(oArg.reliable){if(oArg.strJson){oJson=eval("("+oArg.strJson+")")}}else{oJson=Zapatec.Transport.parseJsonStr(oArg.strJson)}}catch(oExpn){var sError="Error: Can't parse.\nString doesn't appear to be a valid JSON fragment: ";sError+=oExpn.message;if(typeof oExpn.text!="undefined"&&oExpn.text.length){sError+="\n"+oExpn.text}sError+="\n"+oArg.strJson;Zapatec.Transport.displayError(0,sError,oArg.onError);return null}if(typeof oArg.onLoad=="function"){oArg.onLoad(oJson)}return oJson};Zapatec.Transport.parseJsonStr=function(text){var p=/^\s*(([,:{}\[\]])|"(\\.|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)\s*/,token,operator;function error(m,t){throw {name:"JSONError",message:m,text:t||operator||token}}function next(b){if(b&&b!=operator){error("Expected '"+b+"'")}if(text){var t=p.exec(text);if(t){if(t[2]){token=null;operator=t[2]}else{operator=null;try{token=eval(t[1])}catch(e){error("Bad token",t[1])}}text=text.substring(t[0].length)}else{error("Unrecognized token",text)}}else{token=operator=null}}function val(){var k,o;switch(operator){case"{":next("{");o={};if(operator!="}"){for(;;){if(operator||typeof token!="string"){error("Missing key")}k=token;next();next(":");o[k]=val();if(operator!=","){break}next(",")}}next("}");return o;case"[":next("[");o=[];if(operator!="]"){for(;;){o.push(val());if(operator!=","){break}next(",")}}next("]");return o;default:if(operator!==null){error("Missing value")}k=token;next();return k}}next();return val()};Zapatec.Transport.serializeJsonObj=function(c){var b=[];function f(a){b[b.length]=a}function d(a){var j,h,e,g;switch(typeof a){case"object":if(a){if(a instanceof Array){f("[");e=b.length;for(h=0;h<a.length;h+=1){g=a[h];if(typeof g!="undefined"&&typeof g!="function"){if(e<b.length){f(",")}d(g)}}f("]");return}else{if(typeof a.toString!="undefined"){f("{");e=b.length;for(h in a){g=a[h];if(a.hasOwnProperty(h)&&typeof g!="undefined"&&typeof g!="function"){if(e<b.length){f(",")}d(h);f(":");d(g)}}return f("}")}}}f("null");return;case"number":f(isFinite(a)?+a:"null");return;case"string":e=a.length;f('"');for(h=0;h<e;h+=1){j=a.charAt(h);if(j>=" "){if(j=="\\"||j=='"'){f("\\")}f(j)}else{switch(j){case"\b":f("\\b");break;case"\f":f("\\f");break;case"\n":f("\\n");break;case"\r":f("\\r");break;case"\t":f("\\t");break;default:j=j.charCodeAt();f("\\u00"+Math.floor(j/16).toString(16)+(j%16).toString(16))}}}f('"');return;case"boolean":f(String(a));return;default:f("null");return}}d(c);return b.join("")};Zapatec.Transport.displayError=function(a,c,b){if(typeof b=="function"){b({errorCode:a,errorDescription:c})}else{alert(c)}};Zapatec.Transport.translateUrl=function(a){if(!a||!a.url){return null}var g=a.url.split("?",2);var e=g[0];if(e.charAt(0)=="/"||e.indexOf(":")>=0){return a.url}var h;if(typeof a.relativeTo!="string"){h=document.location.toString().split("?",2)[0]}else{h=a.relativeTo.split("?",2)[0];if(h.indexOf("/")<0){h=document.location.toString().split("?",2)[0]}else{if(h.charAt(0)!="/"&&h.indexOf(":")<0){h=Zapatec.Transport.translateUrl({url:h})}}}var c=e.split("/");var b=h.split("/");b.pop();for(var d=0;d<c.length;d++){var f=c[d];if(f==".."){b.pop()}else{if(f!="."){b.push(f)}}}g[0]=b.join("/");return g.join("?")};Zapatec.Transport.loading={};Zapatec.Transport.setupEvents=function(a){if(!a){return{}}if(a.force||!Zapatec.EventDriven||!a.url){return{onLoad:a.onLoad,onError:a.onError}}var b=a.url;if(typeof a.onLoad=="function"){Zapatec.EventDriven.addEventListener("zpTransportOnLoad"+b,a.onLoad)}if(typeof a.onError=="function"){Zapatec.EventDriven.addEventListener("zpTransportOnError"+b,a.onError)}if(Zapatec.Transport.loading[b]){return{loading:true}}else{Zapatec.Transport.loading[b]=true;return{onLoad:new Function("Zapatec.EventDriven.fireEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnError"+b+"');Zapatec.Transport.loading['"+b+"'] = false;"),onError:new Function("oError","Zapatec.EventDriven.fireEvent('zpTransportOnError"+b+"',oError);Zapatec.EventDriven.removeEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnError"+b+"');Zapatec.Transport.loading['"+b+"'] = false;")}}};Zapatec.Transport.loadedJS={};Zapatec.Transport.isLoadedJS=function(d,e){if(typeof e=="undefined"){e=Zapatec.Transport.translateUrl({url:d})}if(Zapatec.Transport.loadedJS[e]){return true}var c=document.getElementsByTagName("script");for(var a=0;a<c.length;a++){var b=c[a].getAttribute("src")||"";if(b==d){Zapatec.Transport.loadedJS[e]=true;return true}}return false};Zapatec.Transport.getPath=function(b){var e=document.getElementsByTagName("script");for(var a=e.length-1;a>=0;a--){var c=e[a].getAttribute("src")||"";var d=c.split("/");var f=d.pop();if(f==b){return d.length?d.join("/")+"/":""}}for(var c in Zapatec.Transport.loadedJS){var d=c.split("/");var f=d.pop();if(f==b){return d.length?d.join("/")+"/":""}}return""};Zapatec.Transport.include=function(a,b,c){if(Zapatec.doNotInclude){return}var d=Zapatec.Transport.translateUrl({url:a});if(!c&&Zapatec.Transport.isLoadedJS(a,d)){return}document.write('<script type="text/javascript" src="'+a+(typeof b=="string"?'" id="'+b:"")+'"><\/script>');Zapatec.Transport.loadedJS[d]=true};Zapatec.include=Zapatec.Transport.include;Zapatec.Transport.includeJS=function(a,b){setTimeout(function(){var c=document.body;if(!c){c=document.getElementsByTagName("head")[0];if(!c){c=document}}var d=document.createElement("script");d.type="text/javascript";d.src=a;if(typeof b=="string"){d.id=b}c.appendChild(d)},0)};Zapatec.Transport.loadJS=function(c){if(!(c instanceof Object)){return}if(typeof c.async=="undefined"){c.async=true}var d=null;if(c.url){d=c.url}else{if(c.module){var a="";if(typeof c.path!="undefined"){a=c.path}else{if(typeof Zapatec.zapatecPath!="undefined"){a=Zapatec.zapatecPath}}d=a+c.module+".js"}else{return}}var e=Zapatec.Transport.translateUrl({url:d});if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(Zapatec.doNotInclude||(!c.force&&Zapatec.Transport.isLoadedJS(d,e))){if(typeof c.onLoad=="function"){c.onLoad()}return}var b=Zapatec.Transport.setupEvents({url:e,force:c.force,onLoad:c.onLoad,onError:c.onError});if(b.loading){return}Zapatec.Transport.fetch({url:d,async:c.async,onLoad:function(g){if(c.force||!Zapatec.Transport.loadedJS[e]){var f=d.split("/");var h=f.pop();Zapatec.lastLoadedModule=f.join("/")+"/";Zapatec.Transport.evalGlobalScope(g.responseText);Zapatec.lastLoadedModule=null;Zapatec.Transport.loadedJS[e]=true}if(typeof b.onLoad=="function"){b.onLoad()}},onError:b.onError})};Zapatec.Transport.includeCSS=function(b){var a=document.getElementsByTagName("head")[0];if(!a){return}var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",b);a.appendChild(c)};Zapatec.Transport.loadedCss={};Zapatec.Transport.loadCss=function(a){if(Zapatec.StyleSheet){Zapatec.Transport.loadCssWithStyleSheet(a)}else{Zapatec.Transport.loadJS({module:"stylesheet",async:a.async,onLoad:function(){Zapatec.Transport.loadCssWithStyleSheet(a)}})}};Zapatec.Transport.loadCssWithStyleSheet=function(c){if(!(c instanceof Object)){return}if(!c.url){return}if(typeof c.async=="undefined"){c.async=true}var e=Zapatec.Transport.translateUrl({url:c.url});if(!c.force){if(Zapatec.Transport.loadedCss[e]){if(typeof c.onLoad=="function"){c.onLoad()}return}var a=document.getElementsByTagName("link");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href")||"";d=Zapatec.Transport.translateUrl({url:d});if(d==e){Zapatec.Transport.loadedCss[e]=true;if(typeof c.onLoad=="function"){c.onLoad()}return}}}var b=Zapatec.Transport.setupEvents({url:e,force:c.force,onLoad:c.onLoad,onError:c.onError});if(b.loading){return}Zapatec.Transport.fetch({url:c.url,async:c.async,onLoad:function(h){var n=h.responseText;var l=[];var o=[];var g=[];var j=0;var k=n.indexOf("url(",j);while(k>=0){k+=4;var i=n.substring(j,k);var p=/@import\s+url\($/.test(i);l.push(i);j=k;k=n.indexOf(")",j);if(k>=0){var m=n.substring(j,k);m=m.replace(/['"]/g,"");m=Zapatec.Transport.translateUrl({url:m,relativeTo:c.url});m=Zapatec.Transport.translateUrl({url:m});l.push(m);if(p){g.push(m)}else{o.push(m)}j=k;k=n.indexOf("url(",j)}}l.push(n.substr(j));n=l.join("");Zapatec.Transport.loadCssList({urls:g,async:c.async,onLoad:function(){(new Zapatec.StyleSheet()).addParse(n);if(typeof b.onLoad=="function"){b.onLoad()}}});Zapatec.Transport.loadedCss[e]=true;Zapatec.Transport.preloadImages({urls:o,timeout:60000})},onError:b.onError})};Zapatec.Transport.loadCssList=function(b){if(!(b instanceof Object)){return}if(typeof b.async=="undefined"){b.async=true}if(!b.onLoad){b.onLoad=null}if(!b.onError){b.onError=null}if(!b.urls||!b.urls.length){if(typeof b.onLoad=="function"){b.onLoad()}return}var c=b.urls.shift();var a=function(){Zapatec.Transport.loadCssList({urls:b.urls,async:b.async,force:b.force,onLoad:b.onLoad,onError:b.onError})};Zapatec.Transport.loadCss({url:c,async:b.async,force:b.force,onLoad:a,onError:function(d){Zapatec.Transport.displayError(d.errorCode,d.errorDescription,b.onError);a()}})};Zapatec.Transport.imagePreloads=[];Zapatec.Transport.preloadImages=function(a){if(Zapatec.PreloadImages){Zapatec.Transport.imagePreloads.push(new Zapatec.PreloadImages(a))}else{Zapatec.Transport.loadJS({module:"preloadimages",onLoad:function(){Zapatec.Transport.imagePreloads.push(new Zapatec.PreloadImages(a))}})}};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.StyleSheet=function(d){if(d){if(document.createStyleSheet){if(document.styleSheets.length){this.styleSheet=document.styleSheets[document.styleSheets.length-1]}}else{var a=document.getElementsByTagName("style");if(a.length){this.styleSheet=a[a.length-1]}}}if(!this.styleSheet){if(document.createStyleSheet){try{this.styleSheet=document.createStyleSheet()}catch(c){this.styleSheet=document.styleSheets[document.styleSheets.length-1]}}else{this.styleSheet=document.createElement("style");this.styleSheet.type="text/css";var b=document.getElementsByTagName("head")[0];if(!b){b=document.documentElement}if(b){b.appendChild(this.styleSheet)}}}};Zapatec.StyleSheet.prototype.addRule=function(a,b){if(!this.styleSheet){return}if(document.createStyleSheet){this.styleSheet.cssText+=a+" { "+b+" }"}else{this.styleSheet.appendChild(document.createTextNode(a+" { "+b+" }"))}};Zapatec.StyleSheet.prototype.removeRules=function(){if(!this.styleSheet){return}if(document.createStyleSheet){var a=this.styleSheet.rules.length;for(var b=0;b<a;b++){this.styleSheet.removeRule()}}else{while(this.styleSheet.firstChild){this.styleSheet.removeChild(this.styleSheet.firstChild)}}};Zapatec.StyleSheet.prototype.addParse=function(c){var i=[];var d=c.split("/*");for(var g=0;g<d.length;g++){var a=d[g].split("*/");i.push(a[a.length-1])}c=i.join("");c=c.replace(/@[^{]*;/g,"");var e=c.split("}");for(var f=0;f<e.length;f++){var b=e[f].split("{");if(b[0]&&b[1]){var j=b[0].split(",");for(var h=0;h<j.length;h++){this.addRule(j[h],b[1])}}}};Zapatec.ImagePreloader=function(a){this.job=null;this.image=null;if(arguments.length>0){this.init(a)}};Zapatec.ImagePreloader.prototype.init=function(b){if(!b||!b.job){return}this.job=b.job;this.image=new Image();this.job.images.push(this.image);var a=this;this.image.onload=function(){a.job.loadedUrls.push(b.url);setTimeout(function(){a.onLoad()},0)};this.image.onerror=function(){a.job.invalidUrls.push(b.url);a.onLoad()};this.image.onabort=function(){a.job.abortedUrls.push(b.url);a.onLoad()};this.image.src=b.url;if(typeof b.timeout=="number"){setTimeout(function(){if(a.job){if(a.image.complete){a.job.loadedUrls.push(b.url)}else{a.job.abortedUrls.push(b.url)}a.onLoad()}},b.timeout)}};Zapatec.ImagePreloader.prototype.onLoad=function(){if(!this.job){return}this.image.onload=null;this.image.onerror=null;this.image.onabort=null;var b=this.job;this.job=null;b.leftToLoad--;if(b.leftToLoad==0&&typeof b.onLoad=="function"){var a=b.onLoad;b.onLoad=null;a(b)}};Zapatec.PreloadImages=function(a){this.images=[];this.leftToLoad=0;this.loadedUrls=[];this.invalidUrls=[];this.abortedUrls=[];this.onLoad=null;if(arguments.length>0){this.init(a)}};Zapatec.PreloadImages.prototype.init=function(b){if(!b){return}if(!b.urls||!b.urls.length){if(typeof b.onLoad=="function"){b.onLoad(this)}return}this.images=[];this.leftToLoad=b.urls.length;this.loadedUrls=[];this.invalidUrls=[];this.abortedUrls=[];this.onLoad=b.onLoad;for(var a=0;a<b.urls.length;a++){new Zapatec.ImagePreloader({job:this,url:b.urls[a],timeout:b.timeout})}};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.EventDriven=function(){};Zapatec.EventDriven.prototype.init=function(){this.events={}};Zapatec.EventDriven.prototype.addEventListener=function(b,a){if(typeof a!="function"){return false}if(!this.events[b]){this.events[b]={listeners:[]}}else{this.removeEventListener(b,a)}this.events[b].listeners.push(a)};Zapatec.EventDriven.prototype.unshiftEventListener=function(b,a){if(typeof a!="function"){return false}if(!this.events[b]){this.events[b]={listeners:[]}}else{this.removeEventListener(b,a)}this.events[b].listeners.unshift(a)};Zapatec.EventDriven.prototype.removeEventListener=function(d,b){if(!this.events[d]){return 0}var c=this.events[d].listeners;var e=0;for(var a=c.length-1;a>=0;a--){if(c[a]==b){c.splice(a,1);e++}}return e};Zapatec.EventDriven.prototype.getEventListeners=function(a){if(!this.events[a]){return[]}return this.events[a].listeners};Zapatec.EventDriven.prototype.isEventListener=function(d,b){if(!this.events[d]){return false}var c=this.events[d].listeners;for(var a=c.length-1;a>=0;a--){if(c[a]==b){return true}}return false};Zapatec.EventDriven.prototype.isEvent=function(a){if(this.events[a]){return true}return false};Zapatec.EventDriven.prototype.removeEvent=function(b){if(this.events[b]){var a;this.events[b]=a}};Zapatec.EventDriven.prototype.fireEvent=function(c){if(!this.events[c]){return}var b=this.events[c].listeners.slice();for(var a=0;a<b.length;a++){var d=[].slice.call(arguments,1);b[a].apply(this,d)}};Zapatec.EventDriven.events={};Zapatec.EventDriven.addEventListener=function(b,a){if(typeof a!="function"){return false}if(!Zapatec.EventDriven.events[b]){Zapatec.EventDriven.events[b]={listeners:[]}}else{Zapatec.EventDriven.removeEventListener(b,a)}Zapatec.EventDriven.events[b].listeners.push(a)};Zapatec.EventDriven.unshiftEventListener=function(b,a){if(typeof a!="function"){return false}if(!Zapatec.EventDriven.events[b]){Zapatec.EventDriven.events[b]={listeners:[]}}else{Zapatec.EventDriven.removeEventListener(b,a)}Zapatec.EventDriven.events[b].listeners.unshift(a)};Zapatec.EventDriven.removeEventListener=function(d,b){if(!Zapatec.EventDriven.events[d]){return 0}var c=Zapatec.EventDriven.events[d].listeners;var e=0;for(var a=c.length-1;a>=0;a--){if(c[a]==b){c.splice(a,1);e++}}return e};Zapatec.EventDriven.getEventListeners=function(a){if(!Zapatec.EventDriven.events[a]){return[]}return Zapatec.EventDriven.events[a].listeners};Zapatec.EventDriven.isEventListener=function(d,b){if(!Zapatec.EventDriven.events[d]){return false}var c=Zapatec.EventDriven.events[d].listeners;for(var a=c.length-1;a>=0;a--){if(c[a]==b){return true}}return false};Zapatec.EventDriven.isEvent=function(a){if(Zapatec.EventDriven.events[a]){return true}return false};Zapatec.EventDriven.removeEvent=function(b){if(Zapatec.EventDriven.events[b]){var a;Zapatec.EventDriven.events[b]=a}};Zapatec.EventDriven.fireEvent=function(c){if(!Zapatec.EventDriven.events[c]){return}var b=Zapatec.EventDriven.events[c].listeners.slice();for(var a=0;a<b.length;a++){var d=[].slice.call(arguments,1);b[a].apply(b[a],d)}};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Widget=function(a){this.config={};Zapatec.Widget.SUPERconstructor.call(this);this.init(a)};Zapatec.inherit(Zapatec.Widget,Zapatec.EventDriven);Zapatec.Widget.path=Zapatec.getPath("Zapatec.Widget");Zapatec.Widget.prototype.init=function(a){Zapatec.Widget.SUPERclass.init.call(this);if(typeof this.id=="undefined"){var b=0;while(Zapatec.Widget.all[b]){b++}this.id=b;Zapatec.Widget.all[b]=this}this.configure(a);this.addUserEventListeners();this.addStandardEventListeners();this.loadTheme()};Zapatec.Widget.prototype.reconfigure=function(a){this.configure(a);this.loadTheme()};Zapatec.Widget.prototype.configure=function(a){this.defineConfigOption("theme","default");if(typeof this.constructor.path!="undefined"){this.defineConfigOption("themePath",this.constructor.path+"themes/")}else{this.defineConfigOption("themePath","themes/")}this.defineConfigOption("asyncTheme",false);this.defineConfigOption("source");this.defineConfigOption("sourceType");this.defineConfigOption("callbackSource");this.defineConfigOption("asyncSource",true);this.defineConfigOption("reliableSource",true);this.defineConfigOption("eventListeners",{});if(a){for(var b in a){if(typeof this.config[b]!="undefined"){this.config[b]=a[b]}else{Zapatec.Log({description:"Unknown config option: "+b})}}}};Zapatec.Widget.prototype.getConfiguration=function(){return this.config};Zapatec.Widget.all=[];Zapatec.Widget.getWidgetById=function(a){return Zapatec.Widget.all[a]};Zapatec.Widget.prototype.addCircularRef=function(a,b){if(!this.widgetCircularRefs){this.widgetCircularRefs=[]}this.widgetCircularRefs.push([a,b])};Zapatec.Widget.prototype.createProperty=function(a,b,c){a[b]=c;this.addCircularRef(a,b)};Zapatec.Widget.prototype.removeCircularRefs=function(){if(!this.widgetCircularRefs){return}for(var a=this.widgetCircularRefs.length-1;a>=0;a--){var b=this.widgetCircularRefs[a];b[0][b[1]]=null;b[0]=null}};Zapatec.Widget.prototype.discard=function(){Zapatec.Widget.all[this.id]=null;this.removeCircularRefs()};Zapatec.Widget.removeCircularRefs=function(){for(var b=Zapatec.Widget.all.length-1;b>=0;b--){var a=Zapatec.Widget.all[b];if(a){a.removeCircularRefs()}}};Zapatec.Utils.addEvent(window,"unload",Zapatec.Widget.removeCircularRefs);Zapatec.Widget.prototype.defineConfigOption=function(b,a){if(typeof this.config[b]=="undefined"){if(typeof a=="undefined"){this.config[b]=null}else{this.config[b]=a}}};Zapatec.Widget.prototype.addUserEventListeners=function(){for(var a in this.config.eventListeners){if(this.config.eventListeners.hasOwnProperty(a)){this.addEventListener(a,this.config.eventListeners[a])}}};Zapatec.Widget.prototype.addStandardEventListeners=function(){this.addEventListener("loadThemeError",Zapatec.Widget.loadThemeError)};Zapatec.Widget.loadThemeError=function(b){var a="Can't load theme.";if(b&&b.errorDescription){a+=" "+b.errorDescription}Zapatec.Log({description:a})};Zapatec.Widget.prototype.loadTheme=function(){if(typeof this.config.theme=="string"&&this.config.theme.length){var c=this.config.theme.lastIndexOf("/");if(c>=0){c++;this.config.themePath=this.config.theme.substring(0,c);this.config.theme=this.config.theme.substring(c)}c=this.config.theme.lastIndexOf(".");if(c>=0){this.config.theme=this.config.theme.substring(0,c)}this.config.theme=this.config.theme.toLowerCase()}else{this.config.theme=""}if(this.config.theme){this.fireEvent("loadThemeStart");this.themeLoaded=false;var a=this;var b=this.config.themePath+this.config.theme+".css";Zapatec.Transport.loadCss({url:b,async:this.config.asyncTheme,onLoad:function(){a.fireEvent("loadThemeEnd");a.themeLoaded=true;a.hideLoader()},onError:function(d){a.fireEvent("loadThemeEnd");a.fireEvent("loadThemeError",d);a.themeLoaded=true;a.hideLoader()}})}};Zapatec.Widget.prototype.getClassName=function(a){var b=[];if(a&&a.prefix){b.push(a.prefix)}if(this.config.theme!=""){b.push(this.config.theme.charAt(0).toUpperCase());b.push(this.config.theme.substr(1))}if(a&&a.suffix){b.push(a.suffix)}return b.join("")};Zapatec.Widget.prototype.formElementId=function(a){var b=[];if(a&&a.prefix){b.push(a.prefix)}else{b.push("zpWidget")}b.push(this.id);if(a&&a.suffix){b.push(a.suffix)}else{b.push("-")}if(typeof this.widgetUniqueIdCounter=="undefined"){this.widgetUniqueIdCounter=0}else{this.widgetUniqueIdCounter++}b.push(this.widgetUniqueIdCounter);return b.join("")};Zapatec.Widget.prototype.showLoader=function(b){if(this.container!=null&&this.config.theme&&!this.themeLoaded){if(!Zapatec.windowLoaded){var a=this;Zapatec.Utils.addEvent(window,"load",function(){a.showLoader(b)});return null}if(typeof(Zapatec.Indicator)=="undefined"){var a=this;Zapatec.Transport.loadJS({module:"indicator",onLoad:function(){if(a.themeLoaded){return null}a.showLoader(b)}});return null}this.loader=new Zapatec.Indicator({container:this.container,themePath:Zapatec.zapatecPath+"../zpextra/themes/indicator/"});this.loader.start(b||"loading");this.container.style.visibility="hidden"}};Zapatec.Widget.prototype.hideLoader=function(){if(this.loader&&this.loader.isActive()){this.container.style.visibility="";this.loader.stop()}};Zapatec.Widget.prototype.showContainer=function(a,c,b){return this.showHideContainer(a,c,b,true)};Zapatec.Widget.prototype.hideContainer=function(a,c,b){return this.showHideContainer(a,c,b,false)};Zapatec.Widget.prototype.showHideContainer=function(c,e,d,a){if(this.container==null){return null}if(c&&c.length>0&&typeof(Zapatec.Effects)=="undefined"){var b=this;Zapatec.Transport.loadJS({url:Zapatec.zapatecPath+"../zpeffects/src/effects.js",onLoad:function(){b.showHideContainer(c,e,d,a)}});return false}if(e==null&&isNaN(parseInt(e))){e=5}if(!c||c.length==0){if(a){this.container.style.display=this.originalContainerDisplay;this.originalContainerDisplay=null}else{this.originalContainerDisplay=this.container.style.display;this.container.style.display="none"}if(d){d()}}else{if(a){Zapatec.Effects.show(this.container,e,c,d)}else{Zapatec.Effects.hide(this.container,e,c,d)}}return true};Zapatec.Widget.prototype.loadData=function(oArg){if(typeof this.config.callbackSource=="function"){var oSource=this.config.callbackSource(oArg);if(oSource){if(typeof oSource.source!="undefined"){this.config.source=oSource.source}if(typeof oSource.sourceType!="undefined"){this.config.sourceType=oSource.sourceType}}}if(this.config.source!=null&&this.config.sourceType!=null){var sSourceType=this.config.sourceType.toLowerCase();if(sSourceType=="html"){this.fireEvent("loadDataStart");this.loadDataHtml(Zapatec.Widget.getElementById(this.config.source));this.fireEvent("loadDataEnd")}else{if(sSourceType=="html/text"){this.fireEvent("loadDataStart");this.loadDataHtmlText(this.config.source);this.fireEvent("loadDataEnd")}else{if(sSourceType=="html/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetch({url:this.config.source,async:this.config.asyncSource,onLoad:function(oRequest){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataHtmlText(oRequest.responseText);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}else{if(sSourceType=="json"){this.fireEvent("loadDataStart");if(typeof this.config.source=="object"){this.loadDataJson(this.config.source)}else{if(this.config.reliableSource){this.loadDataJson(eval("("+this.config.source+")"))}else{this.loadDataJson(Zapatec.Transport.parseJson({strJson:this.config.source}))}}this.fireEvent("loadDataEnd")}else{if(sSourceType=="json/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetchJsonObj({url:this.config.source,async:this.config.asyncSource,reliable:this.config.reliableSource,onLoad:function(oResult){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataJson(oResult);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}else{if(sSourceType=="xml"){this.fireEvent("loadDataStart");if(typeof this.config.source=="object"){this.loadDataXml(this.config.source)}else{this.loadDataXml(Zapatec.Transport.parseXml({strXml:this.config.source}))}this.fireEvent("loadDataEnd")}else{if(sSourceType=="xml/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetchXmlDoc({url:this.config.source,async:this.config.asyncSource,onLoad:function(oResult){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataXml(oResult);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}}}}}}}}else{this.fireEvent("loadDataStart");this.loadDataHtml(Zapatec.Widget.getElementById(this.config.source));this.fireEvent("loadDataEnd")}};Zapatec.Widget.prototype.loadDataHtml=function(a){};Zapatec.Widget.prototype.loadDataHtmlText=function(a){var b=Zapatec.Transport.parseHtml(a);this.loadDataHtml(b.firstChild)};Zapatec.Widget.prototype.loadDataJson=function(a){};Zapatec.Widget.prototype.loadDataXml=function(a){};Zapatec.Widget.prototype.editData=function(a){this.fireEvent("editData",a)};Zapatec.Widget.prototype.editDataGet=function(){return null};Zapatec.Widget.prototype.editDataCancel=function(){this.fireEvent("editDataCancel");if(typeof this.hide=="function"){this.hide()}};Zapatec.Widget.prototype.editDataReturn=function(a){this.fireEvent("editDataReturn",a);if(!a.widget||typeof a.widget.editDataReceive!="function"){return}a.widget.editDataReceive({data:this.editDataGet()});this.editDataCancel()};Zapatec.Widget.prototype.editDataReceive=function(a){this.fireEvent("editDataReceive",a)};Zapatec.Widget.callMethod=function(b,c){var a=Zapatec.Widget.getWidgetById(b);if(a&&typeof a[c]=="function"){var d=[].slice.call(arguments,2);return a[c].apply(a,d)}};Zapatec.Widget.getElementById=function(a){if(typeof a=="string"){return document.getElementById(a)}return a};Zapatec.Widget.getStyle=function(a){var b=a.getAttribute("style")||"";if(typeof b=="string"){return b}return b.cssText};Zapatec.Drag={};Zapatec.Utils.emulateWindowEvent(["mousedown","mousemove","mouseup"]);Zapatec.Drag.currentId=null;Zapatec.Drag.start=function(f,c,e){if(Zapatec.Drag.currentId){return true}var b=document.getElementById(c);if(!b||b.zpDrag){return true}if(!e){e={}}var a=Zapatec.Utils.getMousePos(f||window.event);Zapatec.EventDriven.fireEvent("dragStart",{id:c});b.zpDrag=true;b.zpDragPageX=a.pageX;b.zpDragPageY=a.pageY;if(b.offsetParent){var a=Zapatec.Utils.getElementOffset(b);var d=Zapatec.Utils.getElementOffset(b.offsetParent);b.zpDragLeft=a.left-d.left;b.zpDragTop=a.top-d.top}else{b.zpDragLeft=b.offsetLeft;b.zpDragTop=b.offsetTop}b.zpDragPrevLeft=b.zpDragLeft;b.zpDragPrevTop=b.zpDragTop;b.zpDragV=e.vertical;b.zpDragH=e.horizontal;b.zpDragLimTop=typeof e.limitTop=="number"?e.limitTop:-Infinity;b.zpDragLimBot=typeof e.limitBottom=="number"?e.limitBottom:Infinity;b.zpDragLimLft=typeof e.limitLeft=="number"?e.limitLeft:-Infinity;b.zpDragLimRgh=typeof e.limitRight=="number"?e.limitRight:Infinity;Zapatec.Drag.currentId=c;Zapatec.Utils.addEvent(document,"mousemove",Zapatec.Drag.move);Zapatec.Utils.addEvent(document,"mouseup",Zapatec.Drag.end);return true};Zapatec.Drag.move=function(d){d||(d=window.event);if(!Zapatec.Drag.currentId){return Zapatec.Utils.stopEvent(d)}var c=document.getElementById(Zapatec.Drag.currentId);if(!(c&&c.zpDrag)){return Zapatec.Utils.stopEvent(d)}var b=Zapatec.Utils.getMousePos(d);var a={id:Zapatec.Drag.currentId,startLeft:c.zpDragLeft,startTop:c.zpDragTop,prevLeft:c.zpDragPrevLeft,prevTop:c.zpDragPrevTop,left:0,top:0};if(!c.zpDragV){var f=c.zpDragLeft+b.pageX-c.zpDragPageX;if(c.zpDragLimLft<=f&&c.zpDragLimRgh>=f){c.style.right="";c.style.left=f+"px";a.left=f;c.zpDragPrevLeft=f}else{a.left=a.prevLeft}}if(!c.zpDragH){var e=c.zpDragTop+b.pageY-c.zpDragPageY;if(c.zpDragLimTop<=e&&c.zpDragLimBot>=e){c.style.bottom="";c.style.top=e+"px";a.top=e;c.zpDragPrevTop=e}else{a.top=a.prevTop}}Zapatec.EventDriven.fireEvent("dragMove",a);return Zapatec.Utils.stopEvent(d)};Zapatec.Drag.end=function(c){c||(c=window.event);if(!Zapatec.Drag.currentId){return Zapatec.Utils.stopEvent(c)}var b=document.getElementById(Zapatec.Drag.currentId);if(!(b&&b.zpDrag)){return Zapatec.Utils.stopEvent(c)}Zapatec.Utils.removeEvent(document,"mousemove",Zapatec.Drag.move);Zapatec.Utils.removeEvent(document,"mouseup",Zapatec.Drag.end);var a={id:Zapatec.Drag.currentId,startLeft:b.zpDragLeft,startTop:b.zpDragTop,left:b.zpDragPrevLeft,top:b.zpDragPrevTop};Zapatec.Drag.currentId=null;b.zpDrag=null;b.zpDragPageX=null;b.zpDragPageY=null;b.zpDragLeft=null;b.zpDragTop=null;b.zpDragPrevLeft=null;b.zpDragPrevTop=null;b.zpDragV=null;b.zpDragH=null;b.zpDragLimTop=null;b.zpDragLimBot=null;b.zpDragLimLft=null;b.zpDragLimRgh=null;Zapatec.EventDriven.fireEvent("dragEnd",a);return Zapatec.Utils.stopEvent(c)};