TransMenu.spacerGif="img/common/spacer.gif";TransMenu.dingbatOn="img/common/menu/submenu-on.gif";TransMenu.dingbatOff="img/common/menu/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=1;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#FFFFFF";TransMenu.shadowPng="img/common/menu/grey-40.png";TransMenu.backgroundColor="#FFFFFF";TransMenu.backgroundPng="img/common/menu/yellow-90.png";TransMenu.hideDelay=400;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var b=navigator.userAgent.toLowerCase();var a=navigator.platform.toLowerCase();var d=navigator.appName;var c=false;if(b.indexOf("gecko")>-1&&navigator.productSub>=20020605){c=true}else{if(d=="Microsoft Internet Explorer"){if(document.getElementById){if(a.indexOf("mac")==0){c=/msie (\d(.\d*)?)/.test(b)&&Number(RegExp.$1)>=5.1}else{c=true}}}}return c};TransMenu.initialize=function(){for(var a=0,b=null;b=this.registry[a];a++){b.initialize()}};TransMenu.renderAll=function(){var b=[];for(var a=0,c=null;c=this.registry[a];a++){b[a]=c.toString()}document.write(b.join(""))};function TransMenu(u,s,n,W,V,S,d,c){this.addItem=R;this.addItem2=r;this.addMenu=p;this.toString=g;this.initialize=i;this.SetForcePos=O;this.isOpen=false;this.show=G;this.hide=L;this.items=[];this.ForcePos=false;this.ForceX=d;this.ForceY=c;if(typeof(d)!="undefined"&&typeof(c)!="undefined"){this.ForcePos=true}this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var F="TransMenu"+this.index;var I=null;var N=null;var M=null;var t=false;var k=[];var J=-1;var x=null;var h=false;var f=this;var U=null;var D=s==TransMenu.direction.down?"top":"left";var b=null;function O(Y,a){f.ForcePos=true;f.ForceX=Y;f.ForceY=a}function R(a,Z){var Y=new TransMenuItem(a,Z,this);Y._index=this.items.length;this.items[Y._index]=Y}function r(Z,a){var Y=new TransMenuItem(a,Z,this);Y._index=this.items.length;this.items[Y._index]=Y}function p(Y){if(!Y.parentMenu==this){throw new Error("Cannot add a menu here")}if(M==null){M=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight)}var a=M.addMenu(Y);k[Y._index]=a;a.onmouseover=y;a.ondeactivate=v;a.onqueue=w;a.ondequeue=q;return a}function i(){z();j();X();h=true}function G(){if(h){f.isOpen=true;t=true;m();x.clip.style.visibility="visible";x.clip.style.display="";x.clip.style.zIndex=TransMenu._maxZ++;H();f.onactivate()}}function L(){if(h){f.isOpen=false;t=true;for(var a=0,Y=null;Y=x.item[a];a++){C(Y)}if(M){M.hide()}H();f.ondeactivate()}}function m(){var Y=u.constructor==TransMenuItem;var ad=Y?u.parentMenu.elmCache.item[u._index]:u;var aa=ad;var af=0;var ae=0;var ac=0;var Z=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(x.clip.style.width);var ab=0;var a=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(x.clip.style.height);while(Y?aa.parentNode.className.indexOf("transMenu")==-1:aa.offsetParent){af+=aa.offsetLeft;ae+=aa.offsetTop;if(aa.scrollLeft){af-=aa.scrollLeft}if(aa.scrollTop){ae-=aa.scrollTop}aa=aa.offsetParent}if(u.constructor==TransMenuItem){af+=parseInt(aa.parentNode.style.left);ae+=parseInt(aa.parentNode.style.top)}switch(V){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:af+=ad.offsetWidth;break;case TransMenu.reference.bottomLeft:ae+=ad.offsetHeight;break;case TransMenu.reference.bottomRight:af+=ad.offsetWidth;ae+=ad.offsetHeight;break}af+=n;ae+=W;af=Math.max(Math.min(af,Z),ac);ae=Math.max(Math.min(ae,a),ab);if(f.ForcePos==true){x.clip.style.left=f.ForceX+"px";x.clip.style.top=f.ForceY+"px"}else{x.clip.style.left=af+"px";x.clip.style.top=ae+"px"}}function H(){var Y=parseInt(x.content.style[D]);var a=f.isOpen?0:-b;if(U!=null){U.stop()}U=new Accelimation(Y,a,TransMenu.slideTime,J);U.onframe=o;U.onend=E;U.start()}function o(a){x.content.style[D]=a+"px"}function E(){if(!f.isOpen){x.clip.style.visibility="hidden";x.clip.style.display="none"}t=false}function X(){var a=x.items.offsetWidth;var Z=x.items.offsetHeight;var Y=navigator.userAgent.toLowerCase();x.clip.style.width=a+TransMenu.shadowSize+2+"px";x.clip.style.height=Z+TransMenu.shadowSize+2+"px";x.content.style.width=a+TransMenu.shadowSize+"px";x.content.style.height=Z+TransMenu.shadowSize+"px";I=Z+TransMenu.shadowSize;N=a+TransMenu.shadowSize;b=s==TransMenu.direction.down?I:N;x.content.style[D]=-b-TransMenu.shadowSize+"px";x.clip.style.visibility="hidden";x.clip.style.display="none";if(Y.indexOf("mac")==-1||Y.indexOf("gecko")>-1){x.background.style.width=a+"px";x.background.style.height=Z+"px";x.background.style.backgroundColor=TransMenu.backgroundColor;x.shadowRight.style.left=a+"px";x.shadowRight.style.height=Z-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";x.shadowRight.style.backgroundColor=TransMenu.shadowColor;x.shadowBottom.style.top=Z+"px";x.shadowBottom.style.width=a-TransMenu.shadowOffset+"px";x.shadowBottom.style.backgroundColor=TransMenu.shadowColor}else{x.background.firstChild.src=TransMenu.backgroundPng;x.background.firstChild.width=a;x.background.firstChild.height=Z;x.shadowRight.firstChild.src=TransMenu.shadowPng;x.shadowRight.style.left=a+"px";x.shadowRight.firstChild.width=TransMenu.shadowSize;x.shadowRight.firstChild.height=Z-(TransMenu.shadowOffset-TransMenu.shadowSize);x.shadowBottom.firstChild.src=TransMenu.shadowPng;x.shadowBottom.style.top=Z+"px";x.shadowBottom.firstChild.height=TransMenu.shadowSize;x.shadowBottom.firstChild.width=a-TransMenu.shadowOffset}}function z(){var Z=document.getElementById(F);var Y=Z.all?Z.all:Z.getElementsByTagName("*");x={};x.clip=Z;x.item=[];for(var a=0,aa=null;aa=Y[a];a++){switch(aa.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":x[aa.className]=aa;break;case"item":aa._index=x.item.length;x.item[aa._index]=aa;break}}f.elmCache=x}function j(){for(var a=0,Y=null;Y=x.item[a];a++){Y.onmouseover=A;Y.onmouseout=l;Y.onclick=e}if(typeof u.tagName!="undefined"){u.onmouseover=K;u.onmouseout=P}x.content.onmouseover=T;x.content.onmouseout=B}function Q(a){a.className="item hover";if(k[a._index]){a.lastChild.firstChild.src=TransMenu.dingbatOn}}function C(a){a.className="item";if(k[a._index]){a.lastChild.firstChild.src=TransMenu.dingbatOff}}function A(){if(!t){Q(this);if(k[this._index]){M.showMenu(k[this._index])}else{if(M){M.hide()}}}}function l(){if(!t){if(k[this._index]){M.hideMenu(k[this._index])}else{C(this)}}}function e(){if(!t){if(f.items[this._index].url){location.href=f.items[this._index].url}}}function K(){S.showMenu(f)}function P(){S.hideMenu(f)}function T(){if(!t){S.showMenu(f);f.onmouseover()}}function B(){if(!t){S.hideMenu(f)}}function y(){if(!t){S.showMenu(f)}}function v(){for(var a=0;a<k.length;a++){if(k[a]==this){C(x.item[a]);break}}}function w(){S.hideMenu(f)}function q(){S.showMenu(f)}function g(){var a=[];var Y="transMenu"+(u.constructor!=TransMenuItem?" top":"");for(var Z=0,aa=null;aa=this.items[Z];Z++){a[Z]=aa.toString(k[Z])}return'<div id="'+F+'" class="'+Y+'"><div class="content"><table class="items" cellpadding="0" cellspacing="0" border="0"><tr><td colspan="2"><img src="'+TransMenu.spacerGif+'" width="1" height="'+TransMenu.menuPadding+'"></td></tr>'+a.join("")+'<tr><td colspan="2"><img src="'+TransMenu.spacerGif+'" width="1" height="'+TransMenu.menuPadding+'"></td></tr></table><div class="shadowBottom"><img src="'+TransMenu.spacerGif+'" width="1" height="1"></div><div class="shadowRight"><img src="'+TransMenu.spacerGif+'" width="1" height="1"></div><div class="background"><img src="'+TransMenu.spacerGif+'" width="1" height="1"></div></div></div>'}}TransMenuSet.registry=[];function TransMenuSet(n,g,e,d){this.addMenu=b;this.showMenu=l;this.hideMenu=k;this.hide=h;this.hideCurrent=c;var f=[];var i=this;var j=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function b(r,q,p){if(r){var o=new TransMenu(r,n,g,e,d,this,q,p);f[f.length]=o;return o}else{return null}}function l(o){if(o!=j){if(j!=null){h(j)}j=o;o.show()}else{m(o)}}function k(o){if(j==o&&o.isOpen){if(!o.hideTimer){a(o)}}}function a(o){o.onqueue();o.hideTimer=window.setTimeout("TransMenuSet.registry["+i.index+"].hide(TransMenu.registry["+o.index+"])",TransMenu.hideDelay)}function m(o){if(o.hideTimer){o.ondequeue();window.clearTimeout(o.hideTimer);o.hideTimer=null}}function h(o){if(!o&&j){o=j}if(o&&j==o&&o.isOpen){c()}}function c(){if(null!=j){m(j);j.hideTimer=null;j.hide();j=null}}}function TransMenuItem(a,b,d){this.toString=c;this.text=a;this.url=b;this.parentMenu=d;function c(e){var h=e?TransMenu.dingbatOff:TransMenu.spacerGif;var g=TransMenu.itemPadding+TransMenu.menuPadding;var i="padding:"+TransMenu.itemPadding+"px; padding-left:"+g+"px;";var f="padding:"+TransMenu.itemPadding+"px; padding-right:"+g+"px;";return'<tr class="item"><td nowrap style="'+i+'">'+a+'</td><td width="14" style="'+f+'"><img src="'+h+'" width="14" height="14"></td></tr>'}}function Accelimation(d,c,b,a){if(typeof a=="undefined"){a=0}if(typeof unit=="undefined"){unit="px"}this.x0=d;this.x1=c;this.dt=b;this.zip=-a;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function()}Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var a=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*a/3);this.c2=this.x0+((2+this.zip)*a/3);Accelimation._add(this)};Accelimation.prototype.stop=function(){Accelimation._remove(this)};Accelimation.prototype._paint=function(b){if(b<this.t1){var a=b-this.t0;this.onframe(Accelimation._getBezier(a/this.dt,this.x0,this.x1,this.c1,this.c2))}else{this._end()}};Accelimation.prototype._end=function(){Accelimation._remove(this);this.onframe(this.x1);this.onend()};Accelimation._add=function(b){var a=this.instances.length;this.instances[a]=b;if(this.instances.length==1){this.timerID=window.setInterval("Accelimation._paintAll()",this.targetRes)}};Accelimation._remove=function(b){for(var a=0;a<this.instances.length;a++){if(b==this.instances[a]){this.instances=this.instances.slice(0,a).concat(this.instances.slice(a+1));break}}if(this.instances.length==0){window.clearInterval(this.timerID);this.timerID=null}};Accelimation._paintAll=function(){var a=new Date().getTime();for(var b=0;b<this.instances.length;b++){this.instances[b]._paint(a)}};Accelimation._B1=function(a){return a*a*a};Accelimation._B2=function(a){return 3*a*a*(1-a)};Accelimation._B3=function(a){return 3*a*(1-a)*(1-a)};Accelimation._B4=function(a){return(1-a)*(1-a)*(1-a)};Accelimation._getBezier=function(e,d,c,b,a){return c*this._B1(e)+a*this._B2(e)+b*this._B3(e)+d*this._B4(e)};Accelimation.instances=[];Accelimation.targetRes=10;Accelimation.timerID=null;if(window.attachEvent){var cearElementProps=["data","onmouseover","onmouseout","onmousedown","onmouseup","ondblclick","onclick","onselectstart","oncontextmenu"];window.attachEvent("onunload",function(){var a;for(var b=document.all.length;b--;){a=document.all[b];for(var e=cearElementProps.length;e--;){a[cearElementProps[e]]=null}}})};
