if(!Zapatec)var Zapatec={};Zapatec.Effect=[];Zapatec.Effect.applyFunc=function(a,b){b(a);for(var i=0;i<a.childNodes.length;i++){Zapatec.Effect.applyFunc(a.childNodes[i],b)}};Zapatec.Effect.elOffsetX=function(a){var x=0;while(a){if(typeof(a.offsetParent)!='undefined')x+=a.offsetLeft;a=(typeof(a.offsetParent)!='undefined')?a.offsetParent:null}return x};Zapatec.Effect.elOffsetY=function(a){var y=0;while(a){if(typeof(a.offsetTop)!='undefined')y+=a.offsetTop;a=typeof(a.offsetTop)!='undefined'?a.offsetParent:null}return y};Zapatec.Effect.fade=function(a,b){if(a.origfilter==null){a.origfilter=document.all?a.style.filter:a.style.opacity!=null?a.style.opacity:a.style.MozOpacity}var f=a.filters;var c=(b>=100);if(f){if(!c&&a.style.filter.indexOf("alpha")==-1){a.style.filter+=' alpha(opacity='+b+')'}else if(f.length&&f.alpha){if(c){f.alpha.enabled=false}else{f.alpha.opacity=b;f.alpha.enabled=true}}}else{if(b<100&&b>0)a.style.opacity=a.style.MozOpacity=b/100}if(b<=0){a.style.display='none'}if(b>=100&&a.origfilter!=null){if(a.origfilter!=""){a.style.filter=a.style.opacity=a.style.MozOpacity=a.origfilter}a.origfilter=null}};Zapatec.Effect.slide=function(a,b){var c=Math.pow(Math.sin(Math.PI*b/200),0.75);var d=((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto, auto, auto, auto)');if(typeof a.__zp_origmargintop=='undefined'){a.__zp_origmargintop=a.style.marginTop}a.style.marginTop=(b==100)?a.__zp_origmargintop:'-'+(a.offsetHeight*(1-c))+'px';a.style.clip=(b==100)?d:'rect('+(a.offsetHeight*(1-c))+', '+a.offsetWidth+'px, '+a.offsetHeight+'px, 0)';if(b<=0){a.style.display='none'}};Zapatec.Effect.glide=function(a,b){var c=Math.pow(Math.sin(Math.PI*b/200),0.75);var d=((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto, auto, auto, auto)');a.style.clip=(b==100)?d:'rect(0, '+a.offsetWidth+'px, '+(a.offsetHeight*c)+'px, 0)';if(b<=0){a.style.display='none'}};Zapatec.Effect.wipe=function(a,b){var c=((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto, auto, auto, auto)');a.style.clip=(b==100)?c:'rect(0, '+(a.offsetWidth*(b/100))+'px, '+(a.offsetHeight*(b/100))+'px, 0)';if(b<=0){a.style.display='none'}};Zapatec.Effect.unfurl=function(a,b){var c=((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto, auto, auto, auto)');if(b<=50){a.style.clip='rect(0, '+(a.offsetWidth*(b/50))+'px, 10px, 0)'}else if(b<100){a.style.clip='rect(0, '+a.offsetWidth+'px, '+(a.offsetHeight*((b-50)/50))+'px, 0)'}else{a.style.clip=c}if(b<=0){a.style.display='none'}};Zapatec.Effect.shrink=function(a,b){var c=((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto, auto, auto, auto)');var d=Math.floor(a.offsetWidth*b/200);var e=Math.floor(a.offsetHeight*b/200);a.style.clip=(b>=100)?c:"rect("+(a.offsetHeight/2-e)+"px, "+(a.offsetWidth/2+d)+"px, "+(a.offsetHeight/2+e)+"px, "+(a.offsetWidth/2-d)+"px)";if(b<=0){a.style.display='none'}};Zapatec.Effect.grow=function(a,b){Zapatec.Effect.shrink(a,100-b)};Zapatec.Effect.highlight=function(b,c){if(b.origbackground==null){Zapatec.Effect.applyFunc(b,function(){var a=arguments[0];if(a.nodeType==1){a.origbackground=a.style.backgroundColor}})}Zapatec.Effect.applyFunc(b,function(){var a=arguments[0];if(a.nodeType==1){a.style.backgroundColor="#FFFF"+(255-Math.floor(c*1.5)).toString(16)}});if(c<=0||c>=100){Zapatec.Effect.applyFunc(b,function(){var a=arguments[0];if(a.nodeType==1){a.style.backgroundColor=a.origbackground;a.origbackground=null}})}};Zapatec.Effect.roundCorners=function(a,b,c){if(!document.getElementById||!document.createElement){return}var d=navigator.userAgent.toLowerCase();if(d.indexOf("msie 5")!=-1&&d.indexOf("opera")==-1){return}var e=document.createElement("div");e.className="rtop";e.style.backgroundColor=b;for(var i=1;i<=4;i++){var f=document.createElement("span");f.className="r"+i;f.style.backgroundColor=c;e.appendChild(f)}a.firstChild==null?a.appendChild(e):a.insertBefore(e,a.firstChild);var g=document.createElement("div");g.className='rbottom';g.style.backgroundColor=b;for(var i=4;i>=1;i--){var f=document.createElement("span");f.className='r'+i;f.style.backgroundColor=c;g.appendChild(f)}a.appendChild(g);a.__zp_roundCorners=true;a.__zp_outerColor=b;if(a.__zp_dropshadow!=null){document.body.removeChild(a.__zp_dropshadow);a.__zp_dropshadow=null;Zapatec.Effect.dropShadow(a,a.__zp_deep)}};Zapatec.Effect.dropShadow=function(a,b){if(a.__zp_dropshadow!=null){return}if(b==null||isNaN(parseInt(b))){b=5}a.__zp_deep=b;var c=document.createElement("div");c.style.position="absolute";c.style.backgroundColor="#666666";c.style.MozOpacity=0.50;c.style.filter="Alpha(Opacity=50)";c.style.left=(Zapatec.Effect.elOffsetX(a)+b)+"px";c.style.top=(Zapatec.Effect.elOffsetY(a)+b)+"px";c.style.width=a.offsetWidth+"px";c.style.height=a.offsetHeight+"px";var d=document.createElement('div');d.style.height=(parseInt(c.style.height)-10)+"px";d.appendChild(document.createTextNode(''));c.appendChild(d);a.__zp_dropshadow=c;document.body.insertBefore(c,document.body.firstChild);if(a.__zp_roundCorners){Zapatec.Effects.apply(c,'roundCorners',{outerColor:a.__zp_outerColor,innerColor:"#666666"})}};Zapatec.Effects=[];Zapatec.Effects.show=function(a,b,c,d){Zapatec.Effects.init(a,true,b,c,d)};Zapatec.Effects.hide=function(a,b,c,d){Zapatec.Effects.init(a,false,b,c,d)};Zapatec.Effects.init=function(a,b,c,d,e){if(a==null||d==null||d.length==0){return null}if(typeof a=="string"){a=document.getElementById(a)}if(a==null){return null}a.animations=[];if(typeof d=="string")d=[d];for(var i=0;i<d.length;i++){var f=null;switch(d[i]){case'fade':f=Zapatec.Effect.fade;break;case'slide':f=Zapatec.Effect.slide;break;case'glide':f=Zapatec.Effect.glide;break;case'wipe':f=Zapatec.Effect.wipe;break;case'unfurl':f=Zapatec.Effect.unfurl;break;case'grow':f=Zapatec.Effect.grow;break;case'shrink':f=Zapatec.Effect.shrink;break;case'highlight':f=Zapatec.Effect.highlight;break}if(f!=null)a.animations[a.animations.length]=f}if(a.animations.length!=0&&a.running==null){a.running=true;Zapatec.Effects.run(a,c,b,null,e)}};Zapatec.Effects.run=function(a,b,c,d,e){if(b==null)b=10;if(d<0){d=0}if(d>100){d=100}if(d==null){if(c){d=0;if(a.style.display=="none"){a.style.display='';if(a.__zp_dropshadow!=null){a.__zp_dropshadow.style.display=''}}}else{d=100}}d+=(c?1:-1)*b;for(var i=0;i<a.animations.length;i++){a.animations[i](a,d);if(a.__zp_dropshadow!=null){a.animations[i](a.__zp_dropshadow,d)}}if(d<=0||d>=100){a.running=null;if(e!=null){e()}return}else{setTimeout(function(){Zapatec.Effects.run(a,b,c,d,e)},50)}};Zapatec.Effects.apply=function(a,b,c){if(a==null||b==null){return}if(typeof a=="string"){a=document.getElementById(a)}if(a==null){return}switch(b){case'roundCorners':Zapatec.Effect.roundCorners(a,c['outerColor'],c['innerColor']);break;case'dropShadow':Zapatec.Effect.dropShadow(a,c['deep']);break}};