if(typeof Zapatec=="undefined"){Zapatec={}}Zapatec.Utils={};Zapatec.Utils.getAbsolutePos=function(e){var a=0,d=0;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.fixBoxPosition=function(d){if(d.x<0){d.x=0}if(d.y<0){d.y=0}var e=Zapatec.Utils.createElement("div");var c=e.style;c.position="absolute";c.right=c.bottom=c.width=c.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 a=d.x+d.width-b.x;if(a>0){d.x-=a}a=d.y+d.height-b.y;if(a>0){d.y-=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.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.addEvent=function(a,c,b){if(a.attachEvent){a.attachEvent("on"+c,b)}else{if(a.addEventListener){a.addEventListener(c,b,false)}else{a["on"+c]=b}}};Zapatec.Utils.removeEvent=function(a,c,b){if(a.detachEvent){a.detachEvent("on"+c,b)}else{if(a.removeEventListener){a.removeEventListener(c,b,false)}else{a["on"+c]=null}}};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=window.self.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(/\22/,"\\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||window.self.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+'" scroll="no" frameborder="0" style="z-index:0;position:absolute;visibility:hidden;'+b+'border:0;top:10;left:100;width:0;height:0;" src="javascript:false;"></iframe>');c=window.self.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(){return window.pageYOffset||document.documentElement.scrollTop||(document.body?document.body.scrollTop:0)||0};Zapatec.ScrollWithWindow={};Zapatec.ScrollWithWindow.list=[];Zapatec.ScrollWithWindow.stickiness=0.25;Zapatec.ScrollWithWindow.register=function(a){var c=parseInt(a.style.top)||0;var b=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop||0;c-=b;if(c<0){c=0}Zapatec.ScrollWithWindow.list[Zapatec.ScrollWithWindow.list.length]={node:a,origTop:c}};Zapatec.ScrollWithWindow.unregister=function(b){for(var a=0;a<Zapatec.ScrollWithWindow.list.length;a++){var c=Zapatec.ScrollWithWindow.list[a];if(b==c.node){Zapatec.ScrollWithWindow.list.splice(a,1);return}}};Zapatec.ScrollWithWindow.handler=function(a){oldScrollY+=((a-oldScrollY)*this.stickiness);if(Math.abs(oldScrollY-a)<=1){oldScrollY=a}for(var c=0;c<Zapatec.ScrollWithWindow.list.length;c++){var d=Zapatec.ScrollWithWindow.list[c];var b=d.node;if(!d.origTop){d.origTop=Zapatec.Utils.getAbsolutePos(b).y;b.style.position="absolute"}b.style.top=d.origTop+parseInt(oldScrollY)+"px"}};var oldScrollY=Zapatec.Utils.getPageScrollY();setInterval("var newScrollY = Zapatec.Utils.getPageScrollY(); if (newScrollY != oldScrollY) { Zapatec.ScrollWithWindow.handler(newScrollY); }",50);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(document.compatMode&&document.compatMode=="CSS1Compat"){if(window.opera){a=document.body.clientWidth||0;b=document.body.clientHeight||0}else{a=document.documentElement.clientWidth||0;b=document.documentElement.clientHeight||0}}else{a=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth||0;b=window.innerHeight||document.body.clientHeight||document.documentElement.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.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(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.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.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(b,a)};Zapatec.isLite=true;Zapatec.Utils.checkActivation=function(){if(!Zapatec.isLite){return true}var g=[];add_product=function(j,i,k){g[j]={webdir:i,name:k,bActive:false}};add_product("calendar.js","prod1","Calendar");add_product("menu.js","prod2","Menu");add_product("tree.js","prod3","Tree");add_product("form.js","forms","Forms");add_product("effects.js","effects","Effects");add_product("hoverer.js","effects","Effects - Hoverer");add_product("slideshow.js","effects","Effects - Slidshow");add_product("zpgrid.js","grid","Grid");add_product("slider.js","slider","Slider");add_product("zptabs.js","tabs","Tabs");add_product("zptime.js","time","Time");add_product("window.js","windows","Window");var e,h,d;var b=false;var a=document.getElementsByTagName("script");for(d=0;d<a.length;d++){if(/wizard.js/i.test(a[d].src)){return true}h=a[d].src.split("/");if(h.length==0){e=a[d]}else{e=h[h.length-1]}e=e.toLowerCase();if(typeof g[e]!="undefined"){b=true;g[e].bActive=true}}if(!b){return true}var f=document.getElementsByTagName("A");for(d=0;d<f.length;d++){if(/(dev|www)\.zapatec\.com/i.test(f[d].href)){return true}}var c="You are using the Free version of the Zapatec Software.\nWhile using the Free version, a link to www.zapatec.com in this page is required.";for(d in g){if(g[d].bActive==true){c+="\nTo purchase the Zapatec "+g[d].name+" visit www.zapatec.com/website/main/products/"+g[d].webdir+"/"}}return false};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);if(!Function.prototype.call){Function.prototype.call=function(){var self=arguments[0];self._this_func=this;var args=new Array();for(var i=1;i<arguments.length;i++){args[args.length]="arguments["+i+"]"}var ret=eval("self._this_func("+args.join(",")+")");self._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.Log=function(a){if(!a){return}var b=a.description;if(a.severity){b=a.severity+":\n"+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};