var eventShow=null,eventHide=null,eventHideAll=null,visibles=null,ie6=false,ie=false;if(window.navigator!=null&&window.navigator.appVersion!=null){ie=window.navigator.appVersion.indexOf("MSIE ")>=0;if(ie)ie6=window.navigator.appVersion.indexOf("MSIE 6.0")>=0}function appenParam(a,b,c){if(a.indexOf("?")<0)a+="?";else if(a.charAt[a.length-1]!="&")a+="&";a+=b+"="+c;return a}function registerClick(e,c){var a=c;if(a.tagName!="A")a=c.childNodes(0);else c=c.parentNode;if(a.tagName!="A")return;Cpo.StopPropagation(e);var b=a.getAttribute("href");if(!b)return;if(b&&b.length>0){var d=a.getAttribute("target");if(d&&d.length>0)window.open(b,d);else e.shiftKey&&window.open(b)}}function findParentAttrib(a,c,b,d){var e=0;while(a!=null&&a.getAttribute!=null&&a.getAttribute(c)!=b&&e++<d)a=a.parentNode;return a!=null&&a.getAttribute!=null&&a.getAttribute(c)==b?a:null}function registerOver(h,a,f,e,c,g,d){if(eventHideAll!=null){window.clearTimeout(eventHideAll.thread);eventHideAll=null}if(!a.initialized){a.mouseOverClass=c;a.popDown=a.getAttribute("popdir")=="down";a.parentSubMenu=findParentAttrib(a.parentNode,"menutype","submenu",1);if(a.parentSubMenu!=null)a.parentRootMenu=a.parentSubMenu.parentRootMenu;if(a.parentRootMenu==null)a.parentRootMenu=findParentAttrib(a.parentNode,"menutype","menu",50);if(a.parentSubMenu!=null)a.parentMenu=a.parentSubMenu;else a.parentMenu=a.parentRootMenu;a.panel=findParentAttrib(a.parentMenu,"menutype","panel",1);if(a.panel==null)a.panel=a.parentMenu;a.parentMenu.panel=a.panel;a.parentItem=a.parentMenu.parentNode;a.subMenu=document.getElementById(f);a.menuStyle=e;a.imageId=g;a.imageHoverId=d;a.image=document.getElementById(a.id+"img");if(a.subMenu!=null){a.subPanel=findParentAttrib(a.subMenu,"menutype","panel",1);if(a.subPanel==null)a.subPanel=a.subMenu;a.subMenuNoHide=a.subPanel.getAttribute("nohide")=="1";a.subMenu.panel=a.subPanel;a.subMenu.parentSubMenu=a.parentSubMenu;a.subMenu.parentMenu=a.parentMenu;a.subMenu.parentRootMenu=a.parentRootMenu}else a.subPanel=a.subMenu;if(a.subMenu!=null)a.subMenu.firstItem=a.subMenu.getElementsByTagName("li")[0];if(a.parentSubMenu==null&&a.parentMenu.firstItem==null)a.parentMenu.firstItem=a.parentMenu.getElementsByTagName("li")[0];a.initialized=true;if(ie6&&a.menuStyle=="pop")a.style.width=a.offsetWidth+"px";var b=a.parentRootMenu;b.expandAnimation=b.getAttribute("expandAnimation");b.expandTime=b.getAttribute("expandTime");b.collapseAnimation=b.getAttribute("collapseAnimation");b.collapseTime=b.getAttribute("collapseTime");b.fps=b.getAttribute("fps")}if(a.mouseOverClass!=null){if(a.orgClass==undefined)a.orgClass=a.className;a.className=a.mouseOverClass}if(a.image&&a.imageHoverId)a.image.src="/file.cpo?id="+a.imageHoverId;if(a.subVisible||a.subMenuNoHide)return;h.cancelBubble=true;clearShowEvent();if(a.subMenu!=null)eventShow=new eventClass(a,a.subMenu,window.setTimeout(doShowSub,300));else eventHide=new eventClass(a,null,window.setTimeout(doHideSub,300))}function registerOut(a){if(a.orgClass!=undefined)a.className=a.orgClass;if(a.image&&a.imageId)a.image.src="/file.cpo?id="+a.imageId;if(eventHideAll==null)eventHideAll=new eventClass(a,null,window.setTimeout(doHideAll,500))}function clearHideEvent(){if(eventHide!=null){window.clearTimeout(eventHide.thread);eventHide=null}}function clearShowEvent(){if(eventShow!=null){window.clearTimeout(eventShow.thread);eventShow=null}}function eventClass(b,c,a){this.item=b;this.sub=c;this.thread=a}function doHideAll(){while(visibles!=null&&visibles.length>0)hideSub(visibles.pop().subVisible)}function getPosition(a){var b={};b.x=0;b.y=0;b.w=a.offsetWidth;b.h=a.offsetHeight;while(a.offsetParent!=null&&a.offsetParent.style.position!="absolute"&&a.offsetParent.style.position!="relative"){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}return b}function doShowSub(){var f=eventShow;clearShowEvent();if(f==null)return;var b=f.item,a=f.sub;b.subVisible=a;a.parentItem=b;hideSubs(b);if(visibles==null)visibles=[];visibles.push(b);if(b.menuStyle=="nest"){if(b.parentRootMenu.expandAnimation){var e=b.parentRootMenu;a.style.visibility="hidden";a.style.display="";if(!a.animHeight)a.animHeight=a.clientHeight;a.style.display="none";new CpoAnimate(a,e.expandTime,e.fps,0,a.animHeight,"height",CpoAnimate.Effects[e.expandAnimation],function(){this.style.visibility="";this.style.display=""},function(){this.style.height="auto"})}else a.style.display="block";return}a.panel.style.position="absolute";a.panel.style.display="block";a.panel.style.visibility="hidden";var c=getPosition(b),h=0,i=0;if(b.parentSubMenu==null){var c=getPosition(b);if(b.popDown){var g=getPosition(b.parentMenu);c.y=g.y+b.parentMenu.offsetHeight}else{var g=getPosition(b.parentMenu);c.x=g.x+b.parentMenu.offsetWidth;if(ie)c.y-=(a.firstItem.parentNode.offsetHeight-a.firstItem.parentNode.clientHeight)/2;else c.y-=a.firstItem.parentNode.offsetHeight-a.firstItem.parentNode.clientHeight}c.x+=document.body.offsetLeft;c.y+=document.body.offsetTop}else{var c=getPosition(b);c.x+=b.parentMenu.clientWidth-b.offsetLeft;c.y+=b.offsetTop-(a.firstItem.parentNode.offsetHeight-a.firstItem.parentNode.clientHeight)}var d=parseInt(b.parentMenu.getAttribute("popoffsetx"));if(d!=0&&!isNaN(d))c.x+=d;d=parseInt(b.parentMenu.getAttribute("popoffsety"));if(d!=0&&!isNaN(d))c.y+=d;a.panel.style.left=c.x+"px";a.panel.style.top=c.y+"px";if(b.parentRootMenu.expandAnimation){var e=b.parentRootMenu;if(!a.panel.animHeight)a.panel.animHeight=a.panel.clientHeight;a.panel.style.height="0px";a.panel.style.visibility="";new CpoAnimate(a.panel,e.expandTime,e.fps,0,a.panel.animHeight,"height",CpoAnimate.Effects[e.expandAnimation],function(){this.style.visibility=""},function(){this.style.height="auto"})}else a.panel.style.visibility=""}function hideSub(a){if(a.parentItem.parentRootMenu.collapseAnimation){var b=a.parentItem.parentRootMenu;if(!a.panel.animHeight)a.panel.animHeight=a.panel.clientHeight;a.panel.owner=a;new CpoAnimate(a.panel,b.collapseTime,b.fps,a.panel.animHeight,0,"height",CpoAnimate.Effects[b.collapseAnimation],function(){this.style.visibility=""},function(){this.style.display="none";this.style.height="auto";this.owner.parentItem.subVisible=null})}else{a.panel.style.display="none";a.parentItem.subVisible=null}}function hideSubs(a){if(visibles==null||visibles.length==0)return;if(a.subVisible==visibles[visibles.length-1])return;while(visibles.length>0&&a.parentSubMenu!=visibles[visibles.length-1].subVisible)hideSub(visibles.pop().subVisible)}function doHideSub(){var a=eventHide;clearHideEvent();if(a==null)return;hideSubs(a.item)}function CpoAnimate(a,c,d,f,h,i,b,e,g){a.cpoAnimate&&a.cpoAnimate.stop();this.element=a;a.cpoAnimate=this;this.fromValue=f;this.endValue=h;this.propName=i;if(!c)this.duration=200;else this.duration=c;if(!d)this.fps=60;else this.fps=d;this.interval=1e3/this.fps;this.totalFrames=this.duration/this.interval;this.startTime=(new Date).getTime();if(!b)this.animFunc=CpoAnimate.Effects.InQuad;else this.animFunc=b;this.onStartFunc=e;this.onEndFunc=g;a.style.overflow="hidden";a.style[this.propName]=this.fromValue+"px";this.timer=window.setInterval(CpoCreateDelegate(this,this.animator),this.interval)}function CpoCreateDelegate(a,b){return function(){return b.apply(a,arguments)}}CpoAnimate.prototype={stop:function(){this.duration=-1e3},reset:function(){clearInterval(this.timer);this.element.cpoAnimate=null;this.element.style[this.propName]=this.endValue+"px";this.element.style.overflow="";this.onEndFunc&&this.onEndFunc.call(this.element);this.element=null},animator:function(){var c=(new Date).getTime(),b=c-this.startTime;if(b>=this.duration){this.reset();return}var d=(c-this.startTime)/this.interval,a=Math.abs(this.endValue-this.fromValue)/this.totalFrames*d;a=this.animFunc(b,0,a,this.duration);if(this.endValue<this.fromValue)a=this.fromValue-a;try{this.element.style[this.propName]=Math.ceil(a)+"px"}catch(e){}if(!this.didAnimate){this.didAnimate=true;this.onStartFunc&&this.onStartFunc.call(this.element)}}};CpoAnimate.Effects=[];CpoAnimate.Effects.Linear=function(d,a,b,c){return b*d/c+a};CpoAnimate.Effects.InQuad=function(a,b,c,d){return c*(a/=d)*a+b};CpoAnimate.Effects.OutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};CpoAnimate.Effects.InOutQuad=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b};CpoAnimate.Effects.InCubic=function(a,b,c,d){return c*(a/=d)*a*a+b};CpoAnimate.Effects.OutCubic=function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b};CpoAnimate.Effects.InOutCubic=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b};CpoAnimate.Effects.InQuart=function(a,b,c,d){return c*(a/=d)*a*a*a+b};CpoAnimate.Effects.OutQuart=function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b};CpoAnimate.Effects.InOutQuart=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b};CpoAnimate.Effects.InQuint=function(a,b,c,d){return c*(a/=d)*a*a*a*a+b};CpoAnimate.Effects.OutQuint=function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b};CpoAnimate.Effects.InOutQuint=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b};CpoAnimate.Effects.InSine=function(d,b,a,c){return-a*Math.cos(d/c*(Math.PI/2))+a+b};CpoAnimate.Effects.OutSine=function(d,a,b,c){return b*Math.sin(d/c*(Math.PI/2))+a};CpoAnimate.Effects.InOutSine=function(d,a,b,c){return-b/2*(Math.cos(Math.PI*d/c)-1)+a};CpoAnimate.Effects.InExpo=function(b,a,c,d){return b==0?a:c*Math.pow(2,10*(b/d-1))+a};CpoAnimate.Effects.OutExpo=function(d,a,b,c){return d==c?a+b:b*(-Math.pow(2,-10*d/c)+1)+a};CpoAnimate.Effects.InOutExpo=function(a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b};CpoAnimate.Effects.InCirc=function(a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b};CpoAnimate.Effects.OutCirc=function(a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b};CpoAnimate.Effects.InOutCirc=function(a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b};CpoAnimate.Effects.InElastic=function(d,e,c,f,a,b){if(d==0)return e;if((d/=f)==1)return e+c;if(!b)b=f*.3;if(!a||a<Math.abs(c)){a=c;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(d-=1))*Math.sin((d*f-g)*(2*Math.PI)/b))+e};CpoAnimate.Effects.OutElastic=function(d,e,b,f,a,c){if(d==0)return e;if((d/=f)==1)return e+b;if(!c)c=f*.3;if(!a||a<Math.abs(b)){a=b;var g=c/4}else var g=c/(2*Math.PI)*Math.asin(b/a);return a*Math.pow(2,-10*d)*Math.sin((d*f-g)*(2*Math.PI)/c)+b+e};CpoAnimate.Effects.InOutElastic=function(a,e,d,f,b,c){if(a==0)return e;if((a/=f/2)==2)return e+d;if(!c)c=f*(.3*1.5);if(!b||b<Math.abs(d)){b=d;var g=c/4}else var g=c/(2*Math.PI)*Math.asin(d/b);return a<1?-.5*(b*Math.pow(2,10*(a-=1))*Math.sin((a*f-g)*(2*Math.PI)/c))+e:b*Math.pow(2,-10*(a-=1))*Math.sin((a*f-g)*(2*Math.PI)/c)*.5+d+e};CpoAnimate.Effects.InBack=function(b,c,d,e,a){if(a==undefined)a=1.70158;return d*(b/=e)*b*((a+1)*b-a)+c};CpoAnimate.Effects.OutBack=function(b,c,d,e,a){if(a==undefined)a=1.70158;return d*((b=b/e-1)*b*((a+1)*b+a)+1)+c};CpoAnimate.Effects.InOutBack=function(a,c,d,e,b){if(b==undefined)b=1.70158;return(a/=e/2)<1?d/2*(a*a*(((b*=1.525)+1)*a-b))+c:d/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)+c};CpoAnimate.Effects.OutBounce=function(a,b,c,d){return(a/=d)<1/2.75?c*(7.5625*a*a)+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b};CpoAnimate.Effects.InBounce=function(d,c,a,b){return a-CpoAnimate.Effects.OutBounce(b-d,0,a,b)+c};CpoAnimate.Effects.InOutBounce=function(c,d,b,a){return c<a/2?CpoAnimate.Effects.InBounce(c*2,0,b,a)*.5+d:CpoAnimate.Effects.OutBounce(c*2-a,0,b,a)*.5+b*.5+d};
