bytefx=new function(){this.alpha=function(K,J){var L=G(K).style;L.opacity=L.MozOpacity=L.KhtmlOpacity=J/100;L.filter="alpha(opacity="+J+")"};this.clear=function(L){var J=["size","scroll","move","fade","color"],K=J.length;while(K--){clearInterval(G(L).bytefx[J[K]])}};this.color=function(K,L,O,J,M,N){J=bytefx.color$(J);clearInterval(G(K).bytefx.color);K.bytefx.color=setInterval(function(){var P=bytefx.color$(O),Q=3;while(Q--){P[Q]=I(P[Q],J[Q],M)}K.style[L]=O=bytefx.$color(P);if(""+P==""+J){C(K,"color",N)}},1)};this.drag=function(M,P,K,O,J){function N(Q,R){if(R){R.call(M,Q)}return false}var L=G(M).bytefx.drag;bytefx.$event(M,"onmousedown",function(Q){L.start=true;L.onmousedown=D.onmousedown;L.onmouseup=D.onmouseup;D.onmouseup=M.onmouseup;D.onmousedown=N;return N(Q,P)});bytefx.$event(M,"onmouseup",function(Q){L.start=false;D.onmousedown=L.onmousedown;D.onmouseup=L.onmouseup;return N(Q,K)});bytefx.$event(D,"onmousemove",function(R){var Q=R.clientX,T=R.clientY,S={x:Q-L.x,y:T-L.y};if(L.start){if(J){S.x=E(S.x,J.$x);S.y=E(S.y,J.$y);S.x=B(S.x,J.x$);S.y=B(S.y,J.y$)}bytefx.position(M,S);N(R,O)}else{L.x=Q-M.offsetLeft;L.y=T-M.offsetTop}return false})};this.fade=function(K,N,J,L,M){clearInterval(G(K).bytefx.fade);K.bytefx.fade=setInterval(function(){N=I(N,J,L);bytefx.alpha(K,N);if(N==J){C(K,"fade",M)}},1)};this.move=function(K,J,L,N){var M=bytefx.$position(G(K));A(K,"move",L/100,M,J,["x","y"],"position",N)};this.position=function(K,J){var L=G(K).style;L.position="absolute";L.left=J.x+"px";L.top=J.y+"px"};this.scroll=function(L,M,O){function J(P){return D.documentElement?D.documentElement[P]:D.body[P]}var N=bytefx.$scroll(),K={x:N.x,y:B(bytefx.$position(L).y,E(J("offsetHeight"),D.body.offsetHeight)-B(J("clientHeight"),D.body.clientHeight))};A(G(bytefx),"scroll",M/100,N,K,["x","y"],"scroll$",O?function(){O.call(L)}:null)};this.size=function(L,K,M,O){var N=bytefx.$size(G(L)),J=F.opera;if(!/msie/i.test(navigator.userAgent)||(J&&parseInt(J.version())>=9)){if(K.$width){N.width-=K.$width}if(K.$height){N.height-=K.$height}if(K.width$){K.width-=K.width$}if(K.height$){K.height-=K.height$}}L.style.overflow="hidden";A(L,"size",M/100,N,K,["width","height"],"size$",O)};this.$color=function(J){function K(L){var M=J[L].toString(16);return M.length==1?"0"+M:M}return"#"+K(0)+K(1)+K(2)};this.color$=function(J){function K(L){return J.charAt(L)}J=J.substring(1);if(J.length==3){J=K(0)+K(0)+K(1)+K(1)+K(2)+K(2)}return[parseInt(K(0)+K(1),16),parseInt(K(2)+K(3),16),parseInt(K(4)+K(5),16)]};this.$event=function(K,J,M){var L=K[J];K[J]=function(N){if(!N){N=F.event}if(L){L.call(this,N)}return M.call(this,N)}};this.$position=function(K){var J={x:K.offsetLeft,y:K.offsetTop};while(K=K.offsetParent){J.x+=K.offsetLeft;J.y+=K.offsetTop}return J};this.$scroll=function(){function J(L,K){return(D.documentElement?D.documentElement[L]:F[K]||D.body[L])||0}return{x:J("scrollLeft","pageXOffset"),y:J("scrollTop","pageYOffset")}};this.scroll$=function(K,J){F.scrollTo(J.x,J.y)};this.$size=function(J){return{width:J.offsetWidth,height:J.offsetHeight}};this.size$=function(K,J){var L=K.style;L.width=J.width+"px";L.height=J.height+"px"};function C(K,J,L){clearInterval(K.bytefx[J]);if(L){L.call(K)}}function G(J){if(!J.bytefx){J.bytefx={color:0,drag:{},fade:0,move:0,scroll:0,size:0}}return J}function I(J,L,K){return J<L?B(J+K,L):E(J-K,L)}function A(M,K,O,Q,J,N,L,P){clearInterval(M.bytefx[K]);M.bytefx[K]=setInterval(function(){Q[N[0]]+=(J[N[0]]-Q[N[0]])*O;Q[N[1]]+=(J[N[1]]-Q[N[1]])*O;bytefx[L](M,Q);if(H(Q[N[0]])==J[N[0]]&&H(Q[N[1]])==J[N[1]]){bytefx[L](M,J);C(M,K,P)}},1)}var F=window,D=document,E=Math.max,B=Math.min,H=Math.round}