// (c) 2004-2006 Rob Rohan, Richard Applebaum, and Barney Boisvert

var EYECANDY_VERSION="0.1";function findPosX(obj)
{var curleft=0;if(obj.offsetParent)
{while(1)
{curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}}
else if(obj.x)
{curleft+=obj.x;}
return curleft;}
function findPosY(obj)
{var curtop=0;if(obj.offsetParent)
{while(1)
{curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}}
else if(obj.y)
{curtop+=obj.y;}
return curtop;}
function linearTween(t,b,c,d){return c*t/d+b;}
function easeInQuad(t,b,c,d){t/=d;return c*t*t+b;}
function easeOutQuad(t,b,c,d){t/=d;return-c*t*(t-2)+b;}
function easeInOutQuad(t,b,c,d){t/=d/2;if(t<1)return c/2*t*t+b;t--;return-c/2*(t*(t-2)-1)+b;}
function easeInExpo(t,b,c,d){return c*Math.pow(2,10*(t/d-1))+b;}
function easeOutExpo(t,b,c,d){return c*(-Math.pow(2,-10*t/d)+1)+b;}
function Detect()
{var agent=navigator.userAgent.toLowerCase();this._mac=agent.indexOf('mac')!=-1;this._win=!this._mac;this._w3c=document.getElementById;this._iex=document.all;this._ns4=document.layers;}
Detect.prototype.getObj=function _det_getObj(name){if(this._w3c){return document.getElementById(name);}else if(this._iex){return document.all[name];}else if(this._ns4){return this.getObjNS4(document,name);}};Detect.prototype.getObjNS4=function _det_getObjNS4(obj,name){var d=obj.layers;var result,temp;for(var i=0;i<d.length;i++){if(d[i].id==name){result=d[i];}else if(d[i].layers.length){var temp=this.getObjNS4(d[i],name);}
if(temp){result=temp;}}
return result;};Detect.prototype.getStyle=function _det_getStyle(obj){return(this._ns4)?obj:obj.style;};function getWindowWidth(){return this._iex?document.body.clientWidth:window.innerWidth;}
Detect.prototype.getWindowWidth=getWindowWidth;Detect.prototype.getWindowHeight=function _det_getWindowHeight(){return this._iex?document.body.clientHeight:window.innerHeight;};Detect.prototype.getScrollTop=function _det_getScrollTop(){return this._iex?document.body.scrollTop:window.pageYOffset;};Detect.prototype.getScrollLeft=function _det_getScrollLeft(){return this._iex?document.body.scrollLeft:window.pageXOffset;};Detect.prototype.setScrollTop=function _det_setScrollTop(n){window.scrollTo(this.getScrollLeft(),n);};Detect.prototype.setScrollLeft=function _det_setScrollLeft(n){window.scrollTo(n,this.getScrollTop());};Detect.prototype.setScroll=function _det_setScroll(x,y){window.scrollTo(x,y);};function HTMLobj(name)
{if(name){this._inherit=Detect;this._inherit(name);this._id=name;this._el=this.getObj(this._id);this._css=this.getStyle(this._el);this._obj=name+'Object';eval(this._obj+'=this');this._timer=null;this._glideRunning=false;this._tweenRunning=false;this._fadeRunning=false;this._randNum=null;this._startFade=false;return this;}}
HTMLobj.prototype=new Detect();HTMLobj.prototype.getLeft=function _htmo_getLeft(){return parseInt(this._css.left||0);};HTMLobj.prototype.getTop=function _htmo_getTop(){return parseInt(this._css.top||0);};HTMLobj.prototype.getWidth=function _htmo_getWidth(){if(this._ns4){return this._el.document.width;}else{return this._el.offsetWidth;}};HTMLobj.prototype.getHeight=function _htmo_getHeight(){if(this._ns4){return this._el.document.height;}else{return this._el.offsetHeight;}};HTMLobj.prototype.getClipWidth=function _htmo_getClipWidth(){if(this._ns4){return this._el.clip.width;}else{return this._el.offsetWidth;}};HTMLobj.prototype.getClipHeight=function _htmo_getClipHeight(){if(this._ns4){return this._el.clip.height;}else{return this._el.offsetHeight;}};HTMLobj.prototype.setStyle=function _htmo_setStyle(prop,val){if(!this._ns4){this._el.style[prop]=val;if(this._iex&&this._mac){this._el.innerHTML=this._el.innerHTML;}}};HTMLobj.prototype.show=function _htmo_show(){this._css.visibility='visible';};HTMLobj.prototype.hide=function _htmo_hide(){this._css.visibility='hidden';};HTMLobj.prototype.showhide=function _htmo_showhide(){if(this._css.visibility=='hidden'||this._css.visibility=='hide'){this._css.visibility='visible';}else{this._css.visibility='hidden';}};HTMLobj.prototype.setInner=function _htmo_setInner(html){if(this._ns4){this._el.document.open();this._el.document.write(html);this._el.document.close();}else{this._el.innerHTML=html;}};HTMLobj.prototype.moveTo=function _htmo_moveTo(x,y){if(this._ns4){this._el.moveTo(x,y);}else{this._css.left=x;this._css.top=y;}};HTMLobj.prototype.moveBy=function _htmo_moveBy(x,y){if(this._ns4){this._el.moveBy(x,y);}else{this._css.left=this.getLeft()+x;this._css.top=this.getTop()+y;}};HTMLobj.prototype.sizeTo=function _htmo_sizeTo(w,h){if(!this._ns4){this._css.width=w+'px';this._css.height=h+'px';}};HTMLobj.prototype.sizeBy=function _htmo_sizeBy(w,h){if(!this._ns4){this._css.width=this.getWidth()+w+'px';this._css.height=this.getHeight()+h+'px';}};HTMLobj.prototype.glideTo=function _htmo_glideTo(x,y,callback){if(this._glideRunning){var left=this.getLeft();var top=this.getTop();if(Math.abs(left-x)<=1&&Math.abs(top-y)<=1){this.moveTo(x,y);this.cancelGlide();if(callback){eval(this._obj+'.'+callback+'()');}}else{this.moveTo(left+(x-left)/2,top+(y-top)/2);}}else{var c=(callback)?',\"'+callback+'\"':'';this._timer=setInterval(this._obj+'.glideTo('+x+','+y+c+')',100);this._glideRunning=true;}};HTMLobj.prototype.cancelGlide=function _htmo_cancelGlide(){clearInterval(this._timer);this._timer=null;this._glideRunning=false;};HTMLobj.prototype.swapDepth=function _htmo_swapDepth(obj){var temp=this._css.zIndex;this._css.zIndex=obj._css.zIndex;obj._css.zIndex=temp;};HTMLobj.prototype.tweenTo=function _htmo_tweenTo(method,start,end,time){if(!this._tweenRunning){this._tweenTime=0;var s='['+start.toString()+']';var e='['+end.toString()+']';this._timer=setInterval(this._obj+'.tweenTo('+method+','+s+','+e+','+time+')',33);this._tweenRunning=true;}
if(++this._tweenTime>time){this.cancelTween();}else{var w=method(this._tweenTime,start[0],end[0]-start[0],time);var h=method(this._tweenTime,start[1],end[1]-start[1],time);this.sizeTo(w,h);}};HTMLobj.prototype.cancelTween=function _htmo_cancelTween(){clearInterval(this._timer);this._timer=null;this._tweenRunning=false;this._startFade=true;};HTMLobj.prototype.getRandom=function _htmo_getRandom(start,end){this._randNum=Math.round(start+((end-start)*Math.random()));return this._randNum;};HTMLobj.prototype.setOpacity=function _htmo_setOpacity(opacity){opacity=(opacity==100)?99.999:opacity;this._css.filter="alpha(opacity:"+opacity+")";this._css.KHTMLOpacity=opacity/100;this._css.MozOpacity=opacity/100;this._css.opacity=opacity/100;};HTMLobj.prototype.fadeOut=function _htmo_fadeOut(opacity,change,speed){if(opacity>=0){this._fadeRunning=true;this.setOpacity(opacity);opacity-=change;setTimeout(this._obj+'.fadeOut('+opacity+','+change+','+speed+')',speed);}else{this._fadeRunning=false;this.hide();}};HTMLobj.prototype.fadeIn=function _htmo_fadeIn(opacity,change,speed){if(opacity<=100){this.show();this._fadeRunning=true;this.setOpacity(opacity);opacity+=change;setTimeout(this._obj+'.fadeIn('+opacity+','+change+','+speed+')',speed);}else{this._fadeRunning=false;this.setOpacity(100);}};HTMLobj.prototype.displayShow=function _htmo_displayShow(){this._css.display='block';};HTMLobj.prototype.displayHide=function _htmo_displayHide(){this._css.display='none';};HTMLobj.prototype.setSrc=function _htmo_setSrc(target){this._el.src=target;};HTMLobj.prototype.setHref=function _htmo_setHref(target){this._el.href=target;};HTMLobj.prototype.setInnerHtml=function _htmo_setInnerHtml(content){this._el.innerHTML=content;};