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