// CodeThatMenu PRO // Version: 2.3.1 (12.09.04.1) // IT IS ILLEGAL TO USE UNREGISTERED VERSION OF THE SCRIPT. WE PERFORM // MONITORING OF THE SITES THAT USE SCRIPT USING GOOGLE AND SPECIAL WORDS // INCLUDED INTO THE SCRIPT. WE WILL INITIATE LEGAL ACTIONS AGAINST THE // PARTIES THAT VIOLATE LICENSE AGREEMENT. PLEASE REGISTER THE SCRIPT. // Copyright (c) 2003-04 by CodeThat.Com // http://www.codethat.com/ var CT_IMG_BLANK="img/1x1.gif";function CT_pre(src){ return CodeThat.preload(src)};function CT_FALSE(){ return false};var CT_fnv=ua.old?CT_vis:CT_inhvis;function CT_copy(src,dest,menu,box){for(var i in src)if(Und(dest[i]))if(menu||!box||i!='bgcolor'&&i!='bgimg'&&i!='border'&&i!='shadow'&&i!='itemoffset'&&i!='opacity')dest[i]=src[i]};function CT_mnuLrSource(w,h,t,l,ox,oy,z,a,v,bgc,bgi,b,html,ev,al){var i=this._l.length,lw=w,lh=h;var st,lr=this._l[i]=[CodeThat.newID(),ox,oy,0];if(b){var bw=b.width;lr[3]=bw;if(ua.moz||ua.old||ua.css1cm){lw-=2*bw;if(lh)lh-=2*bw}if(!ua.nn4&&bw>0)st="border:"+bw+"px "+(b.style||'solid')+' '+b.color;else{html=CT_lrSource('s'+lr[0],lw,lh,bw,bw,1,1,'',bgc||this._p.style.bgcolor,bgi,'','','','',z+1,'','',html);lw=w;lh=h;bgc=b.color;bgi=''}} return CT_lrSource(lr[0],lw,lh,t+oy,l+ox,a,v,'',bgc,bgi,'','','',st,z,al,ev,html)};function CT_Border(d,b,hor,w){var bw=b.width,bc=b.color;var def=d||{},bsrc='',sz=def.size||w;if(Def(d)){var i,tdw,tblw,tblh,atr,add,diff=sz;bw=pI(def.width||bw);bc=def.color||bc;tblw=hor?sz:bw;tblh=hor?bw:sz;atr=hor?' width=':' height=';add=hor?' height='+tblh:' width='+tblw;if(Def(def.el)){var elw,elm=def.el;for(i=0;i'+(hor?'':'');for(i=0;i'+'';if(!hor)bsrc+='';}bsrc+=(hor?'':'')+''}} return Def(d)||Def(bw)&&Und(d)?[bsrc,hor?sz:bw,bc,pI(def.offset||(hor?-bw:0)),hor?bw:sz]:null};function CMenu(def,id){var t=this;t.id=id;t.open=[];if(Undef(def))def={};if(Undef(def.type))def.type="bar";t.dd=def.type=="dropdown";if(Undef(def.style))def.style={};var o=def.style;o.box=pB(o.box,1);if(Und(o.bgcolor))o.bgcolor='white';o.z=o.z||1;if(Undef(def.position))def.position={};o=def.position;o.pos=o.pos||[0,0];o.pos[0]=pI(o.pos[0]);o.pos[1]=pI(o.pos[1]);o.anchor_side=o.anchor_side||"nw";o.absolute=pB(o.absolute,1);t.menu=new CPopupMenu(def,t,null,t.id+".menu");t.timer=def.timer||1000;t.otime=def.otime||10;t.aclose=pB(def.autoclose,0);CT_IMG_BLANK=def.imgblank||CT_IMG_BLANK;CT_pre(CT_IMG_BLANK);_CT_menus.push(t)};{var CMp=CMenu.prototype;CMp.create=function(){this.menu.createTop()};CMp.handleEvent=function(e,s1,s2,src){if(!this._dis){var t=this;t.clearTimer();if(e=='i'){var o=t.open,l=o.length;if(Undef(s1))t.hide();else if(Undef(s2)||(l!=0&&o[l-1].id!=s2.id))t.hideAfter(s1);if(Def(s2))t.showTimer(s2);if(Def(src))src.over();}else if(e=='o'){t.setTimer();if(Def(src))src.out()}}};CMp.clearTimer=function(){if(Def(this._to))clearTimeout(this._to);this._to=''};CMp.setTimer=function(){if(this._to) return;this._to=setTimeout(this.id+'.hide()',this.timer)};CMp.showTimer=function(m){if(this._to) return;this._to=setTimeout(this.id+'.show('+m._path+')',this.otime)};CMp.show=function(path){var t=this;path.visible(1);t.open.push(path);t._to='';if(path.type=='popup'&&t.aclose)t.setTimer()};CMp.hide=function(){if(this.open.length>0)this.hideAfter({"id":''});this._to=''};CMp.hideAfter=function(path){var i,l,o;while((l=(o=this.open).length)>0&&o[l-1].id!=path.id){i=l-1;o[i].visible(0);this.open=o.slice(0,i)}};CMp.popupAt=function(x,y){this.menu.moveRel(x,y);this._ap=this.menu.AbsPos();this.popup()};CMp.popupEv=function(e){this.popupAt(e.x,e.y)};CMp.popup=function(){this.handleEvent('i',null,this.menu)};CMp.run=function(){var r=arguments.length>0;if(!r)this.menu.create();if(!(ua.ie4up&&!ua.ie55up||ua.oldOpera)||r){this.menu.moveLayers();if(this.menu.type!='popup')this.menu.visible(1);this._op=1;this._ap=this.menu.AbsPos();this.checkMove()}else if(!ua.oldOpera)setTimeout(this.id+'.run(1)',1);};CMp.checkMove=function(){if(this.menu.AbsPos().join()!=this._ap.join())this.movePos();this._mv=setTimeout(this.id+'.checkMove()',200)};CMp.movePos=function(){var ap=this.menu.AbsPos();if(ap.join()==this._ap.join()) return;this._ap=ap;this.menu.Repos()};CMp.state=function(b){if(b)this.checkMove();else if(Def(this._mv))clearTimeout(this._mv);this._dis=!b};CMp.obj=function(){ return this.menu};}function CPopupMenu(def,p,p_lvl,path){var t=this;t.id=CodeThat.newID();if(Undef(def))def={};t._p=p;t._p_lvl=p_lvl;t._top=Undef(p_lvl);t._tid=t._p._tid||t._p.id;t.dd=p_lvl&&p_lvl.dd||p.dd;t._path=path;var o=t.style=def.style||{};if(Def(o.box))o.box=pB(o.box,1);if(Def(o.itemoffset)){o.itemoffset.x=pI(o.itemoffset.x||0);o.itemoffset.y=pI(o.itemoffset.y||0)}if(Def(o.size)){o.size[0]=pI(o.size[0]);o.size[1]=pI(o.size[1])}if(Def(o.shadow))o.shadow.width=pI(o.shadow.width||5);if(Def(o.border))o.border.width=pI(o.border.width||1);t.itemover=def.itemover||{};t.itemon=def.itemon||{};o=t.position=def.position||{};if(Def(o.pos)){o.pos[0]=pI(o.pos[0]);o.pos[1]=pI(o.pos[1])}else o.pos=[0,0];if(Def(o.menuoffset)){o.menuoffset.x=pI(o.menuoffset.x||0);o.menuoffset.y=pI(o.menuoffset.y||0)}if(t._top||t.dd){t.style.direction=t.style.direction||(t._top&&t.dd?"h":"v");o.anchor=o.anchor||(p_lvl&&p_lvl._p.dd?"sw":"ne")}t.separator=def.separator||{};t.defaction=def.defaction||{};if(!t._top){t.style.z=t.style.z||(p.style.z+5);CT_copy(p_lvl.style,t.style,1);CT_copy(p_lvl.itemover,t.itemover,1);CT_copy(p_lvl.itemon,t.itemon,1);CT_copy(p_lvl.separator,t.separator,1);CT_copy(p_lvl.position,t.position,1);CT_copy(p_lvl.defaction,t.defaction,1);}else{t.type=def.type;t.style.z=t.style.z||1;if(t.type=='toolbar'){o=t.style.bar=t.style.bar||{};o.drag=pB(o.drag,1)}}if(Def(o=t.style.bar)){o.size=o.size||[10,10];if(!o.src&&!o.bgcolor)o.bgcolor="blue";o.dir=o.dir||t.style.direction;o.size[0]=pI(o.size[0]);o.size[1]=pI(o.size[1])}t.createItems(def);t._l=[];};{var CPp=CPopupMenu.prototype;CPp.createTop=function(){var mw,mh,t=this,st=t.style;var p=t.position.pos,w=t.width(),h=t.height();if(st.box){mw=w;mh=h}else{mw=pI(st.fixwidth)||w;mh=pI(st.fixheight)||h}var y,x=t.getAlignX(p[0]);if(Def(x))p[0]=x;y=t.getAlignY(p[1]);if(Def(y))p[1]=y;t.createLr(mw,mh,p[1],p[0],0,0,st.z,t.position.absolute,0)};CPp.createLr=function(w,h,t,l,ox,oy,z,a,v,bgc,bgi,html,ev,al){var i=this._l.length;var lr=this._l[i]=[CodeThat.newID(),ox,oy];var b=this.style.box;CT_createLayer(lr[0],w,h,t+oy,l+ox,a,v,'',bgc,bgi,'',b||ua.nn4?'hidden':'visible','','',z,al,ev,html); return i};CPp.apply=function(){this.create();this._p.refresh()};CPp.create=function(){var t=this;var i,b=t.style.box;var p=t.position.pos,w=t.width(),h=t.height(),st=t.style,z=st.z;var al=st.opacity;if(!st.autosize)t.moveItems();var itsrc=t.itSrc();t._b=t.createLr(w,h,p[1],p[0],0,0,b?z+2:z,1,0,b?st.bgcolor:'',b?st.bgimg:'',ua.nn4?'':itsrc,['mouseover',t._tid+'.clearTimer()','mouseout',t._tid+'.setTimer()'],b?al:'');if(ua.nn4)dw(itsrc);if(st.autosize){t.sizeItems();t.moveItems(1);h=t.height(1);CT_resize(t._l[t._b][0],w,h);if(t._top&&b)CT_resize(t._l[0][0],w,h)}var iw=w,ih=h,iox=0,ioy=0;if(b){var j=st.shadow;if(j){t.createLr(j.width,h,p[1],p[0],w,j.width,z,1,0,j.color,'','','',j.opacity||al);t.createLr(w,j.width,p[1],p[0],j.width,h,z,1,0,j.color,'','','',j.opacity||al)}j=st.border;if(j){var bpr,bw=w;bpr=CT_Border(j.l,j,0,h);if(bpr){iox=-bpr[1];t.createLr(bpr[1],bpr[4],p[1],p[0],-bpr[1],bpr[3],z+1,1,0,bpr[2],'',bpr[0],'',al);bw+=bpr[1]}bpr=CT_Border(j.r,j,0,h);if(bpr){t.createLr(bpr[1],bpr[4],p[1],p[0],w,bpr[3],z+1,1,0,bpr[2],'',bpr[0],'',al);bw+=bpr[1]}bpr=CT_Border(j.t,j,1,bw);if(bpr){ioy=-bpr[4];t.createLr(bpr[1],bpr[4],p[1],p[0],bpr[3],-bpr[4],z+1,1,0,bpr[2],'',bpr[0],'',al);}bpr=CT_Border(j.b,j,1,bw);if(bpr){ih+=bpr[4];t.createLr(bpr[1],bpr[4],p[1],p[0],bpr[3],h,z+1,1,0,bpr[2],'',bpr[0],'',al)}iw=bw}j=st.bar;if(j){var o,bh=j.size[1],bw=j.size[0];if(bh<0)bh=h;if(bw<0)bw=w;bh=Math.min(bh,h);bw=Math.min(bw,w);t._bar=t.createLr(bw,bh,p[1],p[0],0,0,z+3,1,0,j.bgcolor,j.src,'',['mouseover',t._tid+'.clearTimer()','mouseout',t._tid+'.setTimer()'],al);CT_pre(j.src);if(j.drag){t._dragbar=t._bar;var o=CT_el(t._l[t._bar][0])[0];CodeThat.regEventHandler("mousedown",t._path+".startDrag(ev)",o);CodeThat.regEventHandler("mouseup",t._path+".stopDrag()",o)}}}else{iox=t._fx1;ioy=t._fy1;iw=Math.max(iw,t._fx2-iox);ih=Math.max(ih,t._fy2-ioy)}t._iw=iw;t._ih=ih;if(ua.ie55up)t.createLr(iw,ih,p[1],p[0],iox,ioy,z-1,1,0,'','','');for(i=t.items.length;i>0;)t.items[--i].createChild();t.created=1};CPp.itSrc=function(){var i=0,src='',it=this.items;for(;i0){CT_moveTo(this._l[0][0],x,y);this.moveLayers()}};CPp.moveRel=function(x,y){var w,h,off,wp,t=this,p=t.position,a=p.anchor,as=p.anchor_side;if(t._p.width){w=t._p.width();h=t._p.height();if(a=='nw'||a=='sw'||a=='w'){}else if(a=='ne'||a=='se'||a=='e')x+=w;if(a=='nw'||a=='ne'||a=='n'){}else if(a=='sw'||a=='se'||a=='s')y+=h;if(a=='n'||a=='s')x=Math.ceil(x+w/2);if(a=='e'||a=='w')y=Math.ceil(y+h/2);}w=t.width(),h=t.height();if(as=='nw'||as=='sw'||as=='w'){}else if(as=='ne'||as=='se'||as=='e')x-=w;if(as=='nw'||as=='ne'||as=='n'){}else if(as=='sw'||as=='se'||as=='s')y-=h;if(as=='n'||as=='s')x-=Math.floor(w/2);if(as=='e'||as=='w')y-=Math.floor(h/2);if(Def(off=p.menuoffset)){x+=off.x;y+=off.y}wp=CodeThat.getScrollX()+CodeThat.getWinWidth()-t._iw;if(x>wp)x=wp;if(x<0)x=0;wp=CodeThat.getScrollY()+CodeThat.getWinHeight()-t._ih;if(y>wp)y=wp;if(y<0)y=0;t.moveTo(x,y)};CPp.hor=function(){ return this.style.direction=='h'};CPp.width=function(c){var i,obj,h,r=0,ix=0,t=this,it=t.items;if(t.style.box)if(!Und(t._b)&&!c)r=CT_getWidth(t._l[t._b][0]);else{h=t.hor();if(Def(obj=t.style.itemoffset))ix=obj.x;for(i=0;i=0){it[i]=null;it=this.items=it.slice(0,i).concat(it.slice(i+1));for(j=0;j'}if(!m_o){t._imid=CodeThat.newID();src=t.lrSrc(w,h,y,x,0,0,_z+5,1,vis,'','','',src+''+(anch?'':''),['mouseover',t._tid+".handleEvent('i',"+p_p+(!m_o?","+t.child()+","+t._path:'')+");CodeThat.cancelEvent(event)",'mouseout',t._tid+".handleEvent('o',"+p_p+",null"+(!m_o?","+t._path:'')+");CodeThat.cancelEvent(event)"])}var bg=st.bgimg,bgc=st.bgcolor,brd=st.border;src+=t.lrSrc(w,h,y,x,ox,oy,_z+2,1,vis,bgc,bg,brd,t.sep?'':t.gHTML(0),'',op);if(!m_o)src+=t.lrSrc(w,h,y,x,ox,oy,_z+4,1,0,t.styleover.bgcolor||bgc,t.styleover.bgimg||bg,t.styleover.border||brd,t.gHTML(1),'',op);if(!m_o&&t.bool&&!t.menu)src+=t.lrSrc(w,h,y,x,ox,oy,_z+3,1,vis&&t.val,t.styleon.bgcolor||bgc,t.styleon.bgimg||bg,t.styleon.border||brd,t.gHTML(2),'',op);var v=st.shadow;if(v)src+=t.lrSrc(w,h,y,x,v.width,v.width,_z,1,vis,v.color,'','','','',v.opacity||op); return src};CMp.gHTML=function(n){var t=this;var sto,st=t.style;var im,ei,sub_ei,brd=st.border,w=st.size[0],h=st.size[1],txt=t.text;sub_ei=ei=st.imgendoff;if(t.menu)im=st.imgdir;else{im=st.imgitem;ei=st.imgitemend;if(sub_ei&&!ei)ei={src:CT_IMG_BLANK,width:sub_ei.width,height:sub_ei.height}}var al=st.align,css=st.css,tcol=st.color;if(n==0) return t.mkHTML(w,h,tcol,css,al,t.text,im,ei,brd);if(n==1){txt=t.textover||txt;sto=t.styleover;if(t.menu){im=sto.imgdir||st.imgdiropen||im;ei=st.imgendon||ei}else{im=sto.imgitem||im;ei=sto.imgitemend||ei}}else if(n==2){txt=t.texton||txt;sto=t.styleon;im=sto.imgitem||im;ei=sto.imgitemend||ei} return t.mkHTML(w,h,sto.color||tcol,sto.css||css,sto.align||al,txt,im,ei,sto.border||brd)};CMp.apply=function(){if(this._p.created)this.fillLr()};CMp.fillLr=function(){var t=this;CT_HTML(t._l[1][0],t.gHTML(0));if(!t.sep)CT_HTML(t._l[2][0],t.gHTML(1));if(t.bool)CT_HTML(t._l[3][0],t.gHTML(2));};CMp.mkHTML=function(lw,lh,fn,css,al,txt,img,ei,b){var spc,iw,ih,w,isrc='',src='';if(txt||Def(img)||Def(ei)){src='';if(b){lw-=2*b.width;lh-=2*b.width;}if(img){spc=img.space||this.style.imgspace;spc=pI(spc||0);iw=pI(img.width);ih=pI(img.height);w=iw+spc*2;lw-=w;src+=''}if(ei){spc=ei.space||this.style.imgspace;spc=pI(spc||0);iw=pI(ei.width);ih=pI(ei.height);w=iw+spc*2;lw-=w;isrc=''}if(txt)src+=''+(fn?''+txt+'':txt)+'';src+=isrc+'
';} return src};CMp.createChild=function(){if(this.menu)this.menu.create()};CMp.child=function(){ return this._path+".menu"};CMp.St=function(a,v){this.style[a]=v};CMp.StOver=function(a,v){this.styleover[a]=v};CMp.StOn=function(a,v){this.styleon[a]=v};CMp.z=function(z){this.style.z=z};CMp.Act=function(a,v){this.action[a]=v};CMp.visible=function(v){var i,t=this;if(t._l.length){for(i=0;i