<NME> utilities.js
<BEF> ADDFILE
<MSG> BOSC 2007, more or less

<DFF> @@ -0,0 +1,433 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+if(typeof YAHOO=="undefined"){var YAHOO={};}
+YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
+return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
+if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
+var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
+if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj=='object'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
+return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
+var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
+if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}
+var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});
+(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
+if(propertyCache[property]){return propertyCache[property];}
+var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
+propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
+var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
+return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
+return val/100;break;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
+if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
+break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
+el.style[property]=val;};}
+YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}
+if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
+return c;}
+if(el){return el;}
+return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
+var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}
+var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}
+else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
+parentNode=parentNode.offsetParent;}}
+if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
+parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
+{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
+parentNode=parentNode.parentNode;}
+return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
+var pageXY=this.getXY(el);if(pageXY===false){return false;}
+var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
+if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
+if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
+if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
+if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
+el.className=[el.className,className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
+var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
+var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
+el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
+if(!el.id){el.id=prefix+id_counter++;}
+return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
+var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
+else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
+else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
+else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
+parent=parent.parentNode;}
+return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
+var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
+for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
+return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
+return method.call(scope,el,o);}
+var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
+collection[collection.length]=method.call(scope,el[i],o);}
+return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
+return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
+return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
+this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});
+YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
+var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
+if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
+this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
+var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
+return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
+var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
+var argslength=args.length;if(!this.silent){}
+for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}
+var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
+ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
+if(false===ret){if(!this.silent){}
+return false;}}}
+return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
+return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
+this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
+return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}
+return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
+if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
+return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
+if(!el){return false;}
+if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
+var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
+var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
+legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
+return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
+le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
+return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
+return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
+return ok;}
+if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
+if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}
+return false;}
+var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
+if(index>=0){cacheItem=listeners[index];}
+if(!el||!cacheItem){return false;}
+if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
+delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
+return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
+return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
+return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
+return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
+c=c.caller;}}
+return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
+return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
+return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
+if(this.isIE&&!DOMReady){return false;}
+this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
+var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
+item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
+for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
+retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
+this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}
+if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
+for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
+return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
+l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
+unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
+j=j-1;}
+l=null;EU.clearCache();}
+for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
+legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){document.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"></script>');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}
+EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
+YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
+subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
+this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
+return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
+return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
+return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
+if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
+var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
+if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
+function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
+if(!keyData.alt){keyData.alt=false;}
+if(!keyData.ctrl){keyData.ctrl=false;}
+if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
+this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
+this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
+this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});
+YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded; charset=UTF-8',_use_default_xhr_header:true,_default_xhr_header:'XMLHttpRequest',_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function()
+{if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,'click',function(e){var obj=YAHOO.util.Event.getTarget(e);if(obj.type=='submit'){YAHOO.util.Connect._submitElementValue=encodeURIComponent(obj.name)+"="+encodeURIComponent(obj.value);}})
+return true;}
+return false;})(),setProgId:function(id)
+{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)
+{this._use_default_post_header=b;},setDefaultXhrHeader:function(b)
+{this._use_default_xhr_header=b;},setPollingInterval:function(i)
+{if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)
+{var obj,http;try
+{http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}
+catch(e)
+{for(var i=0;i<this._msxml_progid.length;++i){try
+{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}
+catch(e){}}}
+finally
+{return obj;}},getConnectionObject:function()
+{var o;var tId=this._transaction_id;try
+{o=this.createXhrObject(tId);if(o){this._transaction_id++;}}
+catch(e){}
+finally
+{return o;}},asyncRequest:function(method,uri,callback,postData)
+{var o=this.getConnectionObject();if(!o){return null;}
+else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri,postData);this.releaseObject(o);return;}
+if(method.toUpperCase()=='GET'){if(this._sFormData.length!=0){uri+=((uri.indexOf('?')==-1)?'?':'&')+this._sFormData;}
+else{uri+="?"+this._sFormData;}}
+else if(method.toUpperCase()=='POST'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}
+o.conn.open(method,uri,true);if(this._use_default_xhr_header){if(!this._default_headers['X-Requested-With']){this.initHeader('X-Requested-With',this._default_xhr_header,true);}}
+if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader('Content-Type',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}
+if(this._has_default_headers||this._has_http_headers){this.setHeader(o);}
+this.handleReadyState(o,callback);o.conn.send(postData||null);return o;}},handleReadyState:function(o,callback)
+{var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}
+this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState===4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}
+oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)
+{if(!callback){this.releaseObject(o);return;}
+var httpStatus,responseObject;try
+{if(o.conn.status!==undefined&&o.conn.status!==0){httpStatus=o.conn.status;}
+else{httpStatus=13030;}}
+catch(e){httpStatus=13030;}
+if(httpStatus>=200&&httpStatus<300||httpStatus===1223){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
+else{callback.success.apply(callback.scope,[responseObject]);}}}
+else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
+else{callback.failure.apply(callback.scope,[responseObject]);}}
+break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
+else{callback.failure.apply(callback.scope,[responseObject]);}}}}
+this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)
+{var obj={};var headerObj={};try
+{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(':');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}
+catch(e){}
+obj.tId=o.tId;obj.status=(o.conn.status==1223)?204:o.conn.status;obj.statusText=(o.conn.status==1223)?"No Content":o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
+return obj;},createExceptionObject:function(tId,callbackArg,isAbort)
+{var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}
+else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}
+if(callbackArg){obj.argument=callbackArg;}
+return obj;},initHeader:function(label,value,isDefault)
+{var headerObj=(isDefault)?this._default_headers:this._http_headers;if(headerObj[label]===undefined){headerObj[label]=value;}
+else{headerObj[label]=value+","+headerObj[label];}
+if(isDefault){this._has_default_headers=true;}
+else{this._has_http_headers=true;}},setHeader:function(o)
+{if(this._has_default_headers){for(var prop in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,prop)){o.conn.setRequestHeader(prop,this._default_headers[prop]);}}}
+if(this._has_http_headers){for(var prop in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,prop)){o.conn.setRequestHeader(prop,this._http_headers[prop]);}}
+delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers
+this._default_headers={};this._has_default_headers=false;},setForm:function(formId,isUpload,secureUri)
+{this.resetFormState();var oForm;if(typeof formId=='string'){oForm=(document.getElementById(formId)||document.forms[formId]);}
+else if(typeof formId=='object'){oForm=formId;}
+else{return;}
+if(isUpload){this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}
+var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];oDisabled=oForm.elements[i].disabled;oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)
+{switch(oElement.type)
+{case'select-one':case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].attributes['value'].specified?oElement.options[j].value:oElement.options[j].text)+'&';}
+else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].hasAttribute('value')?oElement.options[j].value:oElement.options[j].text)+'&';}}}
+break;case'radio':case'checkbox':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
+break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit===false){if(this._hasSubmitListener){this._sFormData+=this._submitElementValue+'&';}
+else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
+hasSubmit=true;}
+break;default:this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';break;}}}
+this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId='yuiIO'+this._transaction_id;if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof secureUri=='boolean'){io.src='javascript:false';}
+else if(typeof secureURI=='string'){io.src=secureUri;}}
+else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
+io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},appendPostData:function(postData)
+{var formElements=[];var postMessage=postData.split('&');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf('=');if(delimitPos!=-1){formElements[i]=document.createElement('input');formElements[i].type='hidden';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}
+return formElements;},uploadFile:function(id,callback,uri,postData){var frameId='yuiIO'+id;var uploadEncoding='multipart/form-data';var io=document.getElementById(frameId);this._formNode.setAttribute('action',uri);this._formNode.setAttribute('method','POST');this._formNode.setAttribute("target",frameId);if(this._formNode.encoding){this._formNode.encoding=uploadEncoding;}
+else{this._formNode.enctype=uploadEncoding;}
+if(postData){var oElements=this.appendPostData(postData);}
+this._formNode.submit();if(oElements&&oElements.length>0){for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}
+this.resetFormState();var uploadCallback=function()
+{var obj={};obj.tId=id;obj.argument=callback.argument;try
+{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}
+catch(e){}
+if(callback&&callback.upload){if(!callback.scope){callback.upload(obj);}
+else{callback.upload.apply(callback.scope,[obj]);}}
+if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);}
+else if(window.detachEvent){io.detachEvent('onload',uploadCallback);}
+else{io.removeEventListener('load',uploadCallback,false);}
+setTimeout(function(){document.body.removeChild(io);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",uploadCallback);}
+else if(window.attachEvent){io.attachEvent('onload',uploadCallback);}
+else{io.addEventListener('load',uploadCallback,false);}},abort:function(o,callback,isTimeout)
+{if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];}
+this.handleTransactionResponse(o,callback,true);return true;}
+else{return false;}},isCallInProgress:function(o)
+{if(o.conn){return o.conn.readyState!==4&&o.conn.readyState!==0;}
+else{return false;}},releaseObject:function(o)
+{o.conn=null;o=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.2.2",build:"204"});
+YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}
+YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}
+var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}
+return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';}
+return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;}
+start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr]['by'][i];}}else{end=start+attributes[attr]['by'];}}
+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;this.runtimeAttributes[attr].unit=(isset(attributes[attr].unit))?attributes[attr]['unit']:this.getDefaultUnit(attr);},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}
+this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);};this.stop=function(finish){if(finish){this.currentFrame=this.totalFrames;this._onTween.fire();}
+YAHOO.util.AnimMgr.stop(this);};var onStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var attr in this.attributes){this.setRuntimeAttribute(attr);}
+isAnimated=true;actualFrames=0;startTime=new Date();};var onTween=function(){var data={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};data.toString=function(){return('duration: '+data.duration+', currentFrame: '+data.currentFrame);};this.onTween.fire(data);var runtimeAttributes=this.runtimeAttributes;for(var attr in runtimeAttributes){this.setAttribute(attr,this.doMethod(attr,runtimeAttributes[attr].start,runtimeAttributes[attr].end),runtimeAttributes[attr].unit);}
+actualFrames+=1;};var onComplete=function(){var actual_duration=(new Date()-startTime)/1000;var data={duration:actual_duration,frames:actualFrames,fps:actualFrames/actual_duration};data.toString=function(){return('duration: '+data.duration+', frames: '+data.frames+', fps: '+data.fps);};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};this._onStart=new YAHOO.util.CustomEvent('_start',this,true);this.onStart=new YAHOO.util.CustomEvent('start',this);this.onTween=new YAHOO.util.CustomEvent('tween',this);this._onTween=new YAHOO.util.CustomEvent('_tween',this,true);this.onComplete=new YAHOO.util.CustomEvent('complete',this);this._onComplete=new YAHOO.util.CustomEvent('_complete',this,true);this._onStart.subscribe(onStart);this._onTween.subscribe(onTween);this._onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=1000;this.delay=1;this.registerElement=function(tween){queue[queue.length]=tween;tweenCount+=1;tween._onStart.fire();this.start();};this.unRegister=function(tween,index){tween._onComplete.fire();index=index||getIndex(tween);if(index!=-1){queue.splice(index,1);}
+tweenCount-=1;if(tweenCount<=0){this.stop();}};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[0].isAnimated()){this.unRegister(queue[0],0);}}
+queue=[];thread=null;tweenCount=0;}
+else{this.unRegister(tween);}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}
+if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)
+{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}
+tween._onTween.fire();}
+else{YAHOO.util.AnimMgr.stop(tween,i);}}};var getIndex=function(anim){for(var i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return i;}}
+return-1;};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}
+if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}
+tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}
+for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}
+return[tmp[0][0],tmp[0][1]];};};(function(){YAHOO.util.ColorAnim=function(el,attributes,duration,method){YAHOO.util.ColorAnim.superclass.constructor.call(this,el,attributes,duration,method);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var superclass=Y.ColorAnim.superclass;var proto=Y.ColorAnim.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("ColorAnim "+id);};proto.patterns.color=/color$/i;proto.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;proto.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;proto.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;proto.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;proto.parseColor=function(s){if(s.length==3){return s;}
+var c=this.patterns.hex.exec(s);if(c&&c.length==4){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];}
+c=this.patterns.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}
+c=this.patterns.hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}
+return null;};proto.getAttribute=function(attr){var el=this.getEl();if(this.patterns.color.test(attr)){var val=YAHOO.util.Dom.getStyle(el,attr);if(this.patterns.transparent.test(val)){var parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(parent&&this.patterns.transparent.test(val)){parent=parent.parentNode;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperCase()=='HTML'){val='#fff';}}}}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.doMethod=function(attr,start,end){var val;if(this.patterns.color.test(attr)){val=[];for(var i=0,len=start.length;i<len;++i){val[i]=superclass.doMethod.call(this,attr,start[i],end[i]);}
+val='rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')';}
+else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.setRuntimeAttribute=function(attr){superclass.setRuntimeAttribute.call(this,attr);if(this.patterns.color.test(attr)){var attributes=this.attributes;var start=this.parseColor(this.runtimeAttributes[attr].start);var end=this.parseColor(this.runtimeAttributes[attr].end);if(typeof attributes[attr]['to']==='undefined'&&typeof attributes[attr]['by']!=='undefined'){end=this.parseColor(attributes[attr].by);for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}
+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
+return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}
+return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d)==1){return b+c;}
+if(!p){p=d*.3;}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d)==1){return b+c;}
+if(!p){p=d*.3;}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d/2)==2){return b+c;}
+if(!p){p=d*(.3*1.5);}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
+return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}
+return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}
+return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}
+return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(function(){YAHOO.util.Motion=function(el,attributes,duration,method){if(el){YAHOO.util.Motion.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Motion.superclass;var proto=Y.Motion.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Motion "+id);};proto.patterns.points=/^points$/i;proto.setAttribute=function(attr,val,unit){if(this.patterns.points.test(attr)){unit=unit||'px';superclass.setAttribute.call(this,'left',val[0],unit);superclass.setAttribute.call(this,'top',val[1],unit);}else{superclass.setAttribute.call(this,attr,val,unit);}};proto.getAttribute=function(attr){if(this.patterns.points.test(attr)){var val=[superclass.getAttribute.call(this,'left'),superclass.getAttribute.call(this,'top')];}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.doMethod=function(attr,start,end){var val=null;if(this.patterns.points.test(attr)){var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.setRuntimeAttribute=function(attr){if(this.patterns.points.test(attr)){var el=this.getEl();var attributes=this.attributes;var start;var control=attributes['points']['control']||[];var end;var i,len;if(control.length>0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];}
+control=tmp;}
+if(Y.Dom.getStyle(el,'position')=='static'){Y.Dom.setStyle(el,'position','relative');}
+if(isset(attributes['points']['from'])){Y.Dom.setXY(el,attributes['points']['from']);}
+else{Y.Dom.setXY(el,Y.Dom.getXY(el));}
+start=this.getAttribute('points');if(isset(attributes['points']['to'])){end=translateValues.call(this,attributes['points']['to'],start);var pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;i<len;++i){control[i]=translateValues.call(this,control[i],start);}}else if(isset(attributes['points']['by'])){end=[start[0]+attributes['points']['by'][0],start[1]+attributes['points']['by'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}
+this.runtimeAttributes[attr]=[start];if(control.length>0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}
+this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}
+else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.2",build:"204"});
+if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var Event=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(sMethod,args){for(var i in this.ids){for(var j in this.ids[i]){var oDD=this.ids[i][j];if(!this.isTypeOfDD(oDD)){continue;}
+oDD[sMethod].apply(oDD,args);}}},_onLoad:function(){this.init();Event.on(document,"mouseup",this.handleMouseUp,this,true);Event.on(document,"mousemove",this.handleMouseMove,this,true);Event.on(window,"unload",this._onUnload,this,true);Event.on(window,"resize",this._onResize,this,true);},_onResize:function(e){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(oDD,sGroup){if(!this.initialized){this.init();}
+if(!this.ids[sGroup]){this.ids[sGroup]={};}
+this.ids[sGroup][oDD.id]=oDD;},removeDDFromGroup:function(oDD,sGroup){if(!this.ids[sGroup]){this.ids[sGroup]={};}
+var obj=this.ids[sGroup];if(obj&&obj[oDD.id]){delete obj[oDD.id];}},_remove:function(oDD){for(var g in oDD.groups){if(g&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}}
+delete this.handleIds[oDD.id];},regHandle:function(sDDId,sHandleId){if(!this.handleIds[sDDId]){this.handleIds[sDDId]={};}
+this.handleIds[sDDId][sHandleId]=sHandleId;},isDragDrop:function(id){return(this.getDDById(id))?true:false;},getRelated:function(p_oDD,bTargetsOnly){var oDDs=[];for(var i in p_oDD.groups){for(j in this.ids[i]){var dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue;}
+if(!bTargetsOnly||dd.isTarget){oDDs[oDDs.length]=dd;}}}
+return oDDs;},isLegalTarget:function(oDD,oTargetDD){var targets=this.getRelated(oDD,true);for(var i=0,len=targets.length;i<len;++i){if(targets[i].id==oTargetDD.id){return true;}}
+return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}}
+return null;},handleMouseDown:function(e,oDD){this.currentTarget=YAHOO.util.Event.getTarget(e);this.dragCurrent=oDD;var el=oDD.getEl();this.startX=YAHOO.util.Event.getPageX(e);this.startY=YAHOO.util.Event.getPageY(e);this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);}
+this.dragThreshMet=true;},handleMouseUp:function(e){if(!this.dragCurrent){return;}
+clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(e,true);}else{}
+this.stopDrag(e);this.stopEvent(e);},stopEvent:function(e){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(e);}
+if(this.preventDefault){YAHOO.util.Event.preventDefault(e);}},stopDrag:function(e){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(e);this.dragCurrent.endDrag(e);}
+this.dragCurrent.onMouseUp(e);}
+this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(e){if(!this.dragCurrent){return true;}
+if(YAHOO.util.Event.isIE&&!e.button){this.stopEvent(e);return this.handleMouseUp(e);}
+if(!this.dragThreshMet){var diffX=Math.abs(this.startX-YAHOO.util.Event.getPageX(e));var diffY=Math.abs(this.startY-YAHOO.util.Event.getPageY(e));if(diffX>this.clickPixelThresh||diffY>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}
+if(this.dragThreshMet){this.dragCurrent.b4Drag(e);this.dragCurrent.onDrag(e);this.fireEvents(e,false);}
+this.stopEvent(e);return true;},fireEvents:function(e,isDrop){var dc=this.dragCurrent;if(!dc||dc.isLocked()){return;}
+var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);var pt=new YAHOO.util.Point(x,y);var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);var oldOvers=[];var outEvts=[];var overEvts=[];var dropEvts=[];var enterEvts=[];for(var i in this.dragOvers){var ddo=this.dragOvers[i];if(!this.isTypeOfDD(ddo)){continue;}
+if(!this.isOverTarget(pt,ddo,this.mode,curRegion)){outEvts.push(ddo);}
+oldOvers[i]=true;delete this.dragOvers[i];}
+for(var sGroup in dc.groups){if("string"!=typeof sGroup){continue;}
+for(i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(!this.isTypeOfDD(oDD)){continue;}
+if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){if(this.isOverTarget(pt,oDD,this.mode,curRegion)){if(isDrop){dropEvts.push(oDD);}else{if(!oldOvers[oDD.id]){enterEvts.push(oDD);}else{overEvts.push(oDD);}
+this.dragOvers[oDD.id]=oDD;}}}}}
+this.interactionInfo={out:outEvts,enter:enterEvts,over:overEvts,drop:dropEvts,point:pt,draggedRegion:curRegion,sourceRegion:this.locationCache[dc.id],validDrop:isDrop};if(isDrop&&!dropEvts.length){this.interactionInfo.validDrop=false;dc.onInvalidDrop(e);}
+if(this.mode){if(outEvts.length){dc.b4DragOut(e,outEvts);dc.onDragOut(e,outEvts);}
+if(enterEvts.length){dc.onDragEnter(e,enterEvts);}
+if(overEvts.length){dc.b4DragOver(e,overEvts);dc.onDragOver(e,overEvts);}
+if(dropEvts.length){dc.b4DragDrop(e,dropEvts);dc.onDragDrop(e,dropEvts);}}else{var len=0;for(i=0,len=outEvts.length;i<len;++i){dc.b4DragOut(e,outEvts[i].id);dc.onDragOut(e,outEvts[i].id);}
+for(i=0,len=enterEvts.length;i<len;++i){dc.onDragEnter(e,enterEvts[i].id);}
+for(i=0,len=overEvts.length;i<len;++i){dc.b4DragOver(e,overEvts[i].id);dc.onDragOver(e,overEvts[i].id);}
+for(i=0,len=dropEvts.length;i<len;++i){dc.b4DragDrop(e,dropEvts[i].id);dc.onDragDrop(e,dropEvts[i].id);}}},getBestMatch:function(dds){var winner=null;var len=dds.length;if(len==1){winner=dds[0];}else{for(var i=0;i<len;++i){var dd=dds[i];if(this.mode==this.INTERSECT&&dd.cursorIsOver){winner=dd;break;}else{if(!winner||!winner.overlap||(dd.overlap&&winner.overlap.getArea()<dd.overlap.getArea())){winner=dd;}}}}
+return winner;},refreshCache:function(groups){var g=groups||this.ids;for(var sGroup in g){if("string"!=typeof sGroup){continue;}
+for(var i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(this.isTypeOfDD(oDD)){var loc=this.getLocation(oDD);if(loc){this.locationCache[oDD.id]=loc;}else{delete this.locationCache[oDD.id];}}}}},verifyEl:function(el){try{if(el){var parent=el.offsetParent;if(parent){return true;}}}catch(e){}
+return false;},getLocation:function(oDD){if(!this.isTypeOfDD(oDD)){return null;}
+var el=oDD.getEl(),pos,x1,x2,y1,y2,t,r,b,l;try{pos=YAHOO.util.Dom.getXY(el);}catch(e){}
+if(!pos){return null;}
+x1=pos[0];x2=x1+el.offsetWidth;y1=pos[1];y2=y1+el.offsetHeight;t=y1-oDD.padding[0];r=x2+oDD.padding[1];b=y2+oDD.padding[2];l=x1-oDD.padding[3];return new YAHOO.util.Region(t,r,b,l);},isOverTarget:function(pt,oTarget,intersect,curRegion){var loc=this.locationCache[oTarget.id];if(!loc||!this.useCache){loc=this.getLocation(oTarget);this.locationCache[oTarget.id]=loc;}
+if(!loc){return false;}
+oTarget.cursorIsOver=loc.contains(pt);var dc=this.dragCurrent;if(!dc||(!intersect&&!dc.constrainX&&!dc.constrainY)){return oTarget.cursorIsOver;}
+oTarget.overlap=null;if(!curRegion){var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);}
+var overlap=curRegion.intersect(loc);if(overlap){oTarget.overlap=overlap;return(intersect)?true:oTarget.cursorIsOver;}else{return false;}},_onUnload:function(e,me){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}
+this._execOnAll("unreg",[]);for(i in this.elementCache){delete this.elementCache[i];}
+this.elementCache={};this.ids={};},elementCache:{},getElWrapper:function(id){var oWrapper=this.elementCache[id];if(!oWrapper||!oWrapper.el){oWrapper=this.elementCache[id]=new this.ElementWrapper(YAHOO.util.Dom.get(id));}
+return oWrapper;},getElement:function(id){return YAHOO.util.Dom.get(id);},getCss:function(id){var el=YAHOO.util.Dom.get(id);return(el)?el.style:null;},ElementWrapper:function(el){this.el=el||null;this.id=this.el&&el.id;this.css=this.el&&el.style;},getPosX:function(el){return YAHOO.util.Dom.getX(el);},getPosY:function(el){return YAHOO.util.Dom.getY(el);},swapNode:function(n1,n2){if(n1.swapNode){n1.swapNode(n2);}else{var p=n2.parentNode;var s=n2.nextSibling;if(s==n1){p.insertBefore(n1,n2);}else if(n2==n1.nextSibling){p.insertBefore(n2,n1);}else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s);}}},getScroll:function(){var t,l,dde=document.documentElement,db=document.body;if(dde&&(dde.scrollTop||dde.scrollLeft)){t=dde.scrollTop;l=dde.scrollLeft;}else if(db){t=db.scrollTop;l=db.scrollLeft;}else{}
+return{top:t,left:l};},getStyle:function(el,styleProp){return YAHOO.util.Dom.getStyle(el,styleProp);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(moveEl,targetEl){var aCoord=YAHOO.util.Dom.getXY(targetEl);YAHOO.util.Dom.setXY(moveEl,aCoord);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(a,b){return(a-b);},_timeoutCount:0,_addListeners:function(){var DDM=YAHOO.util.DDM;if(YAHOO.util.Event&&document){DDM._onLoad();}else{if(DDM._timeoutCount>2000){}else{setTimeout(DDM._addListeners,10);if(document&&document.body){DDM._timeoutCount+=1;}}}},handleWasClicked:function(node,id){if(this.isHandle(id,node.id)){return true;}else{var p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return true;}else{p=p.parentNode;}}}
+return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}
+(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;YAHOO.util.DragDrop=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=Dom.get(this.id);}
+return this._domRef;},getDragEl:function(){return Dom.get(this.dragElId);},init:function(id,sGroup,config){this.initTarget(id,sGroup,config);Event.on(this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(id,sGroup,config){this.config=config||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof id!=="string"){id=Dom.generateId(id);}
+this.id=id;this.addToGroup((sGroup)?sGroup:"default");this.handleElId=id;Event.onAvailable(id,this.handleOnAvailable,this,true);this.setDragElId(id);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(iTop,iRight,iBot,iLeft){if(!iRight&&0!==iRight){this.padding=[iTop,iTop,iTop,iTop];}else if(!iBot&&0!==iBot){this.padding=[iTop,iRight,iTop,iRight];}else{this.padding=[iTop,iRight,iBot,iLeft];}},setInitPosition:function(diffX,diffY){var el=this.getEl();if(!this.DDM.verifyEl(el)){return;}
+var dx=diffX||0;var dy=diffY||0;var p=Dom.getXY(el);this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p);},setStartPosition:function(pos){var p=pos||Dom.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1];},addToGroup:function(sGroup){this.groups[sGroup]=true;this.DDM.regDragDrop(this,sGroup);},removeFromGroup:function(sGroup){if(this.groups[sGroup]){delete this.groups[sGroup];}
+this.DDM.removeDDFromGroup(this,sGroup);},setDragElId:function(id){this.dragElId=id;},setHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
+this.handleElId=id;this.DDM.regHandle(this.id,id);},setOuterHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
+Event.on(id,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(id);this.hasOuterHandles=true;},unreg:function(){Event.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(e,oDD){var button=e.which||e.button;if(this.primaryButtonOnly&&button>1){return;}
+if(this.isLocked()){return;}
+this.b4MouseDown(e);this.onMouseDown(e);this.DDM.refreshCache(this.groups);var pt=new YAHOO.util.Point(Event.getPageX(e),Event.getPageY(e));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(pt,this)){}else{if(this.clickValidator(e)){this.setStartPosition();this.DDM.handleMouseDown(e,this);this.DDM.stopEvent(e);}else{}}},clickValidator:function(e){var target=Event.getTarget(e);return(this.isValidHandleChild(target)&&(this.id==this.handleElId||this.DDM.handleWasClicked(target,this.id)));},getTargetCoord:function(iPageX,iPageY){var x=iPageX-this.deltaX;var y=iPageY-this.deltaY;if(this.constrainX){if(x<this.minX){x=this.minX;}
+if(x>this.maxX){x=this.maxX;}}
+if(this.constrainY){if(y<this.minY){y=this.minY;}
+if(y>this.maxY){y=this.maxY;}}
+x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return{x:x,y:y};},addInvalidHandleType:function(tagName){var type=tagName.toUpperCase();this.invalidHandleTypes[type]=type;},addInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
+this.invalidHandleIds[id]=id;},addInvalidHandleClass:function(cssClass){this.invalidHandleClasses.push(cssClass);},removeInvalidHandleType:function(tagName){var type=tagName.toUpperCase();delete this.invalidHandleTypes[type];},removeInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
+delete this.invalidHandleIds[id];},removeInvalidHandleClass:function(cssClass){for(var i=0,len=this.invalidHandleClasses.length;i<len;++i){if(this.invalidHandleClasses[i]==cssClass){delete this.invalidHandleClasses[i];}}},isValidHandleChild:function(node){var valid=true;var nodeName;try{nodeName=node.nodeName.toUpperCase();}catch(e){nodeName=node.nodeName;}
+valid=valid&&!this.invalidHandleTypes[nodeName];valid=valid&&!this.invalidHandleIds[node.id];for(var i=0,len=this.invalidHandleClasses.length;valid&&i<len;++i){valid=!Dom.hasClass(node,this.invalidHandleClasses[i]);}
+return valid;},setXTicks:function(iStartX,iTickSize){this.xTicks=[];this.xTickSize=iTickSize;var tickMap={};for(var i=this.initPageX;i>=this.minX;i=i-iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}
+for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}
+this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(iStartY,iTickSize){this.yTicks=[];this.yTickSize=iTickSize;var tickMap={};for(var i=this.initPageY;i>=this.minY;i=i-iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}
+for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}
+this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(iLeft,iRight,iTickSize){this.leftConstraint=parseInt(iLeft,10);this.rightConstraint=parseInt(iRight,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(iTickSize){this.setXTicks(this.initPageX,iTickSize);}
+this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(iUp,iDown,iTickSize){this.topConstraint=parseInt(iUp,10);this.bottomConstraint=parseInt(iDown,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(iTickSize){this.setYTicks(this.initPageY,iTickSize);}
+this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy);}else{this.setInitPosition();}
+if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}
+if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(val,tickArray){if(!tickArray){return val;}else if(tickArray[0]>=val){return tickArray[0];}else{for(var i=0,len=tickArray.length;i<len;++i){var next=i+1;if(tickArray[next]&&tickArray[next]>=val){var diff1=val-tickArray[i];var diff2=tickArray[next]-val;return(diff2>diff1)?tickArray[i]:tickArray[next];}}
+return tickArray[tickArray.length-1];}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(iPageX,iPageY){var x=iPageX-this.startPageX;var y=iPageY-this.startPageY;this.setDelta(x,y);},setDelta:function(iDeltaX,iDeltaY){this.deltaX=iDeltaX;this.deltaY=iDeltaY;},setDragElPos:function(iPageX,iPageY){var el=this.getDragEl();this.alignElWithMouse(el,iPageX,iPageY);},alignElWithMouse:function(el,iPageX,iPageY){var oCoord=this.getTargetCoord(iPageX,iPageY);if(!this.deltaSetXY){var aCoord=[oCoord.x,oCoord.y];YAHOO.util.Dom.setXY(el,aCoord);var newLeft=parseInt(YAHOO.util.Dom.getStyle(el,"left"),10);var newTop=parseInt(YAHOO.util.Dom.getStyle(el,"top"),10);this.deltaSetXY=[newLeft-oCoord.x,newTop-oCoord.y];}else{YAHOO.util.Dom.setStyle(el,"left",(oCoord.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(el,"top",(oCoord.y+this.deltaSetXY[1])+"px");}
+this.cachePosition(oCoord.x,oCoord.y);this.autoScroll(oCoord.x,oCoord.y,el.offsetHeight,el.offsetWidth);},cachePosition:function(iPageX,iPageY){if(iPageX){this.lastPageX=iPageX;this.lastPageY=iPageY;}else{var aCoord=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=aCoord[0];this.lastPageY=aCoord[1];}},autoScroll:function(x,y,h,w){if(this.scroll){var clientH=this.DDM.getClientHeight();var clientW=this.DDM.getClientWidth();var st=this.DDM.getScrollTop();var sl=this.DDM.getScrollLeft();var bot=h+y;var right=w+x;var toBot=(clientH+st-y-this.deltaY);var toRight=(clientW+sl-x-this.deltaX);var thresh=40;var scrAmt=(document.all)?80:30;if(bot>clientH&&toBot<thresh){window.scrollTo(sl,st+scrAmt);}
+if(y<st&&st>0&&y-st<thresh){window.scrollTo(sl,st-scrAmt);}
+if(right>clientW&&toRight<thresh){window.scrollTo(sl+scrAmt,st);}
+if(x<sl&&sl>0&&x-sl<thresh){window.scrollTo(sl-scrAmt,st);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(e){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},b4Drag:function(e){this.setDragElPos(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(id,sGroup,config){if(id){this.init(id,sGroup,config);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var self=this;var body=document.body;if(!body||!body.firstChild){setTimeout(function(){self.createFrame();},50);return;}
+var div=this.getDragEl();if(!div){div=document.createElement("div");div.id=this.dragElId;var s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;body.insertBefore(div,body.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(iPageX,iPageY){var el=this.getEl();var dragEl=this.getDragEl();var s=dragEl.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2));}
+this.setDragElPos(iPageX,iPageY);YAHOO.util.Dom.setStyle(dragEl,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var DOM=YAHOO.util.Dom;var el=this.getEl();var dragEl=this.getDragEl();var bt=parseInt(DOM.getStyle(dragEl,"borderTopWidth"),10);var br=parseInt(DOM.getStyle(dragEl,"borderRightWidth"),10);var bb=parseInt(DOM.getStyle(dragEl,"borderBottomWidth"),10);var bl=parseInt(DOM.getStyle(dragEl,"borderLeftWidth"),10);if(isNaN(bt)){bt=0;}
+if(isNaN(br)){br=0;}
+if(isNaN(bb)){bb=0;}
+if(isNaN(bl)){bl=0;}
+var newWidth=Math.max(0,el.offsetWidth-br-bl);var newHeight=Math.max(0,el.offsetHeight-bt-bb);DOM.setStyle(dragEl,"width",newWidth+"px");DOM.setStyle(dragEl,"height",newHeight+"px");}},b4MouseDown:function(e){this.setStartPosition();var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);this.autoOffset(x,y);this.setDragElPos(x,y);},b4StartDrag:function(x,y){this.showFrame(x,y);},b4EndDrag:function(e){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(e){var DOM=YAHOO.util.Dom;var lel=this.getEl();var del=this.getDragEl();DOM.setStyle(del,"visibility","");DOM.setStyle(lel,"visibility","hidden");YAHOO.util.DDM.moveToEl(lel,del);DOM.setStyle(del,"visibility","hidden");DOM.setStyle(lel,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(id,sGroup,config){if(id){this.initTarget(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.2.2",build:"204"});
+YAHOO.util.Attribute=function(hash,owner){if(owner){this.owner=owner;this.configure(hash,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(value,silent){var beforeRetVal;var owner=this.owner;var name=this.name;var event={type:name,prevValue:this.getValue(),newValue:value};if(this.readOnly||(this.writeOnce&&this._written)){return false;}
+if(this.validator&&!this.validator.call(owner,value)){return false;}
+if(!silent){beforeRetVal=owner.fireBeforeChangeEvent(event);if(beforeRetVal===false){return false;}}
+if(this.method){this.method.call(owner,value);}
+this.value=value;this._written=true;event.type=name;if(!silent){this.owner.fireChangeEvent(event);}
+return true;},configure:function(map,init){map=map||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var key in map){if(key&&YAHOO.lang.hasOwnProperty(map,key)){this[key]=map[key];if(init){this._initialConfig[key]=map[key];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(silent){this.setValue(this.value,silent);}};(function(){var Lang=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(key){var configs=this._configs||{};var config=configs[key];if(!config){return undefined;}
+return config.value;},set:function(key,value,silent){var configs=this._configs||{};var config=configs[key];if(!config){return false;}
+return config.setValue(value,silent);},getAttributeKeys:function(){var configs=this._configs;var keys=[];var config;for(var key in configs){config=configs[key];if(Lang.hasOwnProperty(configs,key)&&!Lang.isUndefined(config)){keys[keys.length]=key;}}
+return keys;},setAttributes:function(map,silent){for(var key in map){if(Lang.hasOwnProperty(map,key)){this.set(key,map[key],silent);}}},resetValue:function(key,silent){var configs=this._configs||{};if(configs[key]){this.set(key,configs[key]._initialConfig.value,silent);return true;}
+return false;},refresh:function(key,silent){var configs=this._configs;key=((Lang.isString(key))?[key]:key)||this.getAttributeKeys();for(var i=0,len=key.length;i<len;++i){if(configs[key[i]]&&!Lang.isUndefined(configs[key[i]].value)&&!Lang.isNull(configs[key[i]].value)){configs[key[i]].refresh(silent);}}},register:function(key,map){this.setAttributeConfig(key,map);},getAttributeConfig:function(key){var configs=this._configs||{};var config=configs[key]||{};var map={};for(key in config){if(Lang.hasOwnProperty(config,key)){map[key]=config[key];}}
+return map;},setAttributeConfig:function(key,map,init){var configs=this._configs||{};map=map||{};if(!configs[key]){map.name=key;configs[key]=new YAHOO.util.Attribute(map,this);}else{configs[key].configure(map,init);}},configureAttribute:function(key,map,init){this.setAttributeConfig(key,map,init);},resetAttributeConfig:function(key){var configs=this._configs||{};configs[key].resetConfig();},fireBeforeChangeEvent:function(e){var type='before';type+=e.type.charAt(0).toUpperCase()+e.type.substr(1)+'Change';e.type=type;return this.fireEvent(e.type,e);},fireChangeEvent:function(e){e.type+='Change';return this.fireEvent(e.type,e);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var Dom=YAHOO.util.Dom,AttributeProvider=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(el,map){if(arguments.length){this.init(el,map);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(child){child=child.get?child.get('element'):child;this.get('element').appendChild(child);},getElementsByTagName:function(tag){return this.get('element').getElementsByTagName(tag);},hasChildNodes:function(){return this.get('element').hasChildNodes();},insertBefore:function(element,before){element=element.get?element.get('element'):element;before=(before&&before.get)?before.get('element'):before;this.get('element').insertBefore(element,before);},removeChild:function(child){child=child.get?child.get('element'):child;this.get('element').removeChild(child);return true;},replaceChild:function(newNode,oldNode){newNode=newNode.get?newNode.get('element'):newNode;oldNode=oldNode.get?oldNode.get('element'):oldNode;return this.get('element').replaceChild(newNode,oldNode);},initAttributes:function(map){},addListener:function(type,fn,obj,scope){var el=this.get('element');scope=scope||this;el=this.get('id')||el;var self=this;if(!this._events[type]){if(this.DOM_EVENTS[type]){YAHOO.util.Event.addListener(el,type,function(e){if(e.srcElement&&!e.target){e.target=e.srcElement;}
+self.fireEvent(type,e);},obj,scope);}
+this.createEvent(type,this);}
+this.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},removeListener:function(type,fn){this.unsubscribe.apply(this,arguments);},addClass:function(className){Dom.addClass(this.get('element'),className);},getElementsByClassName:function(className,tag){return Dom.getElementsByClassName(className,tag,this.get('element'));},hasClass:function(className){return Dom.hasClass(this.get('element'),className);},removeClass:function(className){return Dom.removeClass(this.get('element'),className);},replaceClass:function(oldClassName,newClassName){return Dom.replaceClass(this.get('element'),oldClassName,newClassName);},setStyle:function(property,value){var el=this.get('element');if(!el){return this._queue[this._queue.length]=['setStyle',arguments];}
+return Dom.setStyle(el,property,value);},getStyle:function(property){return Dom.getStyle(this.get('element'),property);},fireQueue:function(){var queue=this._queue;for(var i=0,len=queue.length;i<len;++i){this[queue[i][0]].apply(this,queue[i][1]);}},appendTo:function(parent,before){parent=(parent.get)?parent.get('element'):Dom.get(parent);this.fireEvent('beforeAppendTo',{type:'beforeAppendTo',target:parent});before=(before&&before.get)?before.get('element'):Dom.get(before);var element=this.get('element');if(!element){return false;}
+if(!parent){return false;}
+if(element.parent!=parent){if(before){parent.insertBefore(element,before);}else{parent.appendChild(element);}}
+this.fireEvent('appendTo',{type:'appendTo',target:parent});},get:function(key){var configs=this._configs||{};var el=configs.element;if(el&&!configs[key]&&!YAHOO.lang.isUndefined(el.value[key])){return el.value[key];}
+return AttributeProvider.prototype.get.call(this,key);},set:function(key,value,silent){var el=this.get('element');if(!el){this._queue[this._queue.length]=['set',arguments];if(this._configs[key]){this._configs[key].value=value;}
+return;}
+if(!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key);}
+return AttributeProvider.prototype.set.apply(this,arguments);},setAttributeConfig:function(key,map,init){var el=this.get('element');if(el&&!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key,map);}else{AttributeProvider.prototype.setAttributeConfig.apply(this,arguments);}},getAttributeKeys:function(){var el=this.get('element');var keys=AttributeProvider.prototype.getAttributeKeys.call(this);for(var key in el){if(!this._configs[key]){keys[key]=keys[key]||el[key];}}
+return keys;},createEvent:function(type,scope){this._events[type]=true;AttributeProvider.prototype.createEvent.apply(this,arguments);},init:function(el,attr){_initElement.apply(this,arguments);}};var _initElement=function(el,attr){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};attr=attr||{};attr.element=attr.element||el||null;this.DOM_EVENTS={'click':true,'dblclick':true,'keydown':true,'keypress':true,'keyup':true,'mousedown':true,'mousemove':true,'mouseout':true,'mouseover':true,'mouseup':true,'focus':true,'blur':true,'submit':true};var isReady=false;if(YAHOO.lang.isString(el)){_registerHTMLAttr.call(this,'id',{value:attr.element});}
+if(Dom.get(el)){isReady=true;_initHTMLElement.call(this,attr);_initContent.call(this,attr);}
+YAHOO.util.Event.onAvailable(attr.element,function(){if(!isReady){_initHTMLElement.call(this,attr);}
+this.fireEvent('available',{type:'available',target:attr.element});},this,true);YAHOO.util.Event.onContentReady(attr.element,function(){if(!isReady){_initContent.call(this,attr);}
+this.fireEvent('contentReady',{type:'contentReady',target:attr.element});},this,true);};var _initHTMLElement=function(attr){this.setAttributeConfig('element',{value:Dom.get(attr.element),readOnly:true});};var _initContent=function(attr){this.initAttributes(attr);this.setAttributes(attr,true);this.fireQueue();};var _registerHTMLAttr=function(key,map){var el=this.get('element');map=map||{};map.name=key;map.method=map.method||function(value){el[key]=value;};map.value=map.value||el[key];this._configs[key]=new YAHOO.util.Attribute(map,this);};YAHOO.augment(YAHOO.util.Element,AttributeProvider);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.2.2",build:"204"});
\ No newline at end of file

{'commit': 'diff --git a/Browser.js b/Browser.js\nindex 50729769f..db06445d6 100644\n--- a/Browser.js\n+++ b/Browser.js\n@@ -1,6 +1,6 @@\n var Browser = {};\n-Browser.init = function() {\n-    var viewElem = $("dragWindow");\n+Browser.init = function(elemId) {\n+    var viewElem = $(elemId);\n     //var refSeq = {start: 0, end: 27905053, length: function() {return this.end - this.start}};\n     var refSeq = {start: -224036, end: 27905053, length: function() {return this.end - this.start}};\n     var gv = new GenomeView(viewElem, 250, refSeq.start, refSeq.end, 1/50);\ndiff --git a/FeatureTrack.js b/FeatureTrack.js\nindex 9efaf26fa..4f0cbe4cc 100644\n--- a/FeatureTrack.js\n+++ b/FeatureTrack.js\n@@ -6,7 +6,6 @@ function SimpleFeatureTrack(name, numBlocks, trackDiv, labelDiv,\n     //className: CSS class for the features\n \n     Track.call(this, name, numBlocks, trackDiv, labelDiv, widthPct, widthPx);\n-    labelDiv.innerHTML = name;\n     this.count = featArray.length;\n     this.features = new NCList(featArray, featArray[0].length);\n     //this.features.sort(function(a, b) {return a.start - b.start;});\n@@ -16,6 +15,7 @@ function SimpleFeatureTrack(name, numBlocks, trackDiv, labelDiv,\n     this.refSeq = refSeq;\n     this.histScale = histScale;\n     this.numBins = 25;\n+    this.histLabel = false;\n }\n \n SimpleFeatureTrack.prototype = new Track("", 0, undefined, 0, 0);\n@@ -61,10 +61,10 @@ SimpleFeatureTrack.prototype.fillHist = function(block, leftBase, rightBase,\n SimpleFeatureTrack.prototype.fillBlock = function(block, leftBlock, rightBlock, leftBase, rightBase, scale, padding, stripeWidth) {\n     //console.log("scale: %d, histScale: %d", scale, this.histScale);\n     if (scale < this.histScale) {\n-\tthis.label.innerHTML = this.name + "<br>per " + Math.round((rightBase - leftBase) / this.numBins) + "bp";\n+        this.setLabel(this.name + "<br>per " + Math.round((rightBase - leftBase) / this.numBins) + "bp");\n \treturn this.fillHist(block, leftBase, rightBase, stripeWidth);\n     } else {\n-\tthis.label.innerHTML = this.name;\n+        this.setLabel(this.name);\n \treturn this.fillFeatures(block, leftBlock, rightBlock, \n \t\t\t\t leftBase, rightBase, scale, padding);\n     }\ndiff --git a/GenomeView.js b/GenomeView.js\nindex b7932053a..fc6b5d18d 100644\n--- a/GenomeView.js\n+++ b/GenomeView.js\n@@ -200,35 +200,43 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n \t\t\t   view.container.clientHeight - view.dim.height)) + "px";\n         }\n     } else {\n-        view.getX = function() { return view.elem.scrollLeft; }\n-        view.getY = function() { return view.elem.scrollTop; }\n+\tview.x = view.elem.scrollLeft;\n+\tview.y = view.elem.scrollTop;\n+        view.getX = function() { \n+\t    return view.x; //view.elem.scrollLeft;\n+\t}\n+        view.getY = function() {\n+\t    return view.y; //view.elem.scrollTop;\n+\t}\n         view.getPosition = function() {\n-            return {x: view.elem.scrollLeft,\n-                    y: view.elem.scrollTop};\n+\t    return { x: view.x, y: view.y };\n+            //return {x: view.elem.scrollLeft,\n+            //        y: view.elem.scrollTop};\n         }\n-        view.rawSetX = function(x) { view.elem.scrollLeft = x; }\n+        view.rawSetX = function(x) { view.elem.scrollLeft = x; view.x = x; }\n         view.setX = function(x) {\n-            view.elem.scrollLeft =\n-                Math.max(Math.min(view.maxLeft - view.offset, x), \n-                         view.minLeft - view.offset);\n+\t    view.x = Math.max(Math.min(view.maxLeft - view.offset, x), \n+\t\t\t      view.minLeft - view.offset);\n+            view.elem.scrollLeft = view.x;\n         }\n-        view.rawSetY = function(y) { view.elem.scrollTop = y; }\n+        view.rawSetY = function(y) { view.elem.scrollTop = y; view.y = y; }\n         view.setY = function(y) {\n-\t    view.elem.scrollTop = Math.min((y < 0 ? 0 : y),\n-\t\t\t\t\t   view.container.clientHeight\n-\t\t\t\t\t   - view.dim.height);\n+\t    view.y = Math.min((y < 0 ? 0 : y),\n+\t\t\t      view.container.clientHeight\n+\t\t\t      - view.dim.height);\n+\t    view.elem.scrollTop = view.y\n         }\n         view.rawSetPosition = function(pos) {\n-            view.elem.scrollLeft = pos.x;\n-            view.elem.scrollTop = pos.y;\n+            view.elem.scrollLeft = pos.x; view.x = pos.x;\n+            view.elem.scrollTop = pos.y; view.y = pos.y;\n         }\n         view.setPosition = function(pos) {\n-            view.elem.scrollLeft =\n-                Math.max(Math.min(view.maxLeft - view.offset, pos.x),\n-                         view.minLeft - view.offset);\n-            view.elem.scrollTop =\n-                Math.min((pos.y < 0 ? 0 : pos.y),\n-\t\t         view.container.clientHeight - view.dim.height);\n+\t    view.x = Math.max(Math.min(view.maxLeft - view.offset, pos.x),\n+\t\t\t      view.minLeft - view.offset);\n+            view.elem.scrollLeft = view.x;\n+\t    view.y = Math.min((pos.y < 0 ? 0 : pos.y),\n+\t\t\t      view.container.clientHeight - view.dim.height);\n+            view.elem.scrollTop = view.y;\n         }\n     }\n \n@@ -244,7 +252,7 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n         YAHOO.util.Event.stopEvent(event);\n         view.scrollUpdate();\n         //view.heightUpdate();\n-\tview.showVisibleBlocks();\n+\tview.showVisibleBlocks(true);\n     }\n \n     var htmlNode = document.body.parentNode;\n@@ -271,7 +279,7 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n \tview.updatePosLabels(pos.y);\n         view.rawSetPosition(pos);\n         YAHOO.util.Event.stopEvent(event);\n-        if (cssScroll) view.showVisibleBlocks(pos);\n+        //view.showVisibleBlocks(true, pos);\n     }\n \n     view.mouseDown = function(event) {\n@@ -279,8 +287,8 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n \tif (event.shiftKey) return;\n \tif (Util.isRightButton(event)) return;\n         //don\'t follow clicks on the scrollbar\n-        if ((YAHOO.util.Event.getPageX(event) - YAHOO.util.Dom.getX(view.elem))\n-            > view.dim.width) return;\n+        //if ((YAHOO.util.Event.getPageX(event) - YAHOO.util.Dom.getX(view.elem))\n+        //    > view.dim.width) return;\n \tYAHOO.util.Event.addListener(view.elem, "mouseup", view.dragEnd);\n \tYAHOO.util.Event.addListener(view.elem, "mousemove", view.dragMove);\n \tYAHOO.util.Event.addListener(document.body, "mouseout", view.checkDragOut);\n@@ -318,32 +326,33 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n \n     YAHOO.widget.Logger.enableBrowserConsole();\n     view.scrollHandler = function() {\n-        //view.showVisibleBlocks();\n+        //view.showVisibleBlocks(true);\n         //if (!view.dragging) view.heightUpdate();\n     };\n \n     var afterSlide = function() {\n         view.scrollUpdate();\n         //view.heightUpdate();\n-\tview.showVisibleBlocks();\n+\tview.showVisibleBlocks(true);\n         YAHOO.util.Event.addListener(view.elem, "scroll", view.scrollHandler);\n     };\n \n-    YAHOO.util.Event.addListener("moveLeft", "click", function() {\n+    YAHOO.util.Event.addListener("moveLeft", "click", function(event) {\n             if (view.animation) view.animation.stop();\n             var slideStart = view.getX();\n             var distance = view.dim.width * 0.9;\n             //distance = Math.min(view.minLeft + view.offset, distance);\n \t    var pos = view.getPosition();\n \t    view.trimVertical(pos.y);\n-            //view.showVisibleBlocks(pos,\n+            //view.showVisibleBlocks(true, pos,\n             //                       slideStart - distance,\n             //                       slideStart + view.dim.width);\n             YAHOO.util.Event.removeListener(view.elem, "scroll", view.scrollHandler);\n+            YAHOO.util.Event.stopEvent(event);\n             new Slider(view, afterSlide,\n                        distance * 1.2, distance);\n         });\n-    YAHOO.util.Event.addListener("moveRight", "click", function() {\n+    YAHOO.util.Event.addListener("moveRight", "click", function(event) {\n             if (view.animation) view.animation.stop();\n             var slideStart = view.getX();\n             var distance = -view.dim.width * 0.9;\n@@ -351,16 +360,32 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n             //                    distance);\n \t    var pos = view.getPosition();\n \t    view.trimVertical(pos.y);\n-            //view.showVisibleBlocks(pos,\n+            //view.showVisibleBlocks(true, pos,\n             //                       slideStart,\n             //                       slideStart + view.dim.width - distance);\n             YAHOO.util.Event.removeListener(view.elem, "scroll", view.scrollHandler);\n+            YAHOO.util.Event.stopEvent(event);\n             new Slider(view, afterSlide, \n                        distance * -1.2, distance);\n         });\n \n-    var zoomIn = function() {view.zoomIn()};\n-    var zoomOut = function() {view.zoomOut()};\n+    function killEvent(event) {\n+        YAHOO.util.Event.stopEvent(event);\n+    }\n+\n+    YAHOO.util.Event.addListener("zoomIn", "mouseup", killEvent);\n+    YAHOO.util.Event.addListener("zoomOut", "mouseup", killEvent);\n+    YAHOO.util.Event.addListener("moveLeft", "mouseup", killEvent);\n+    YAHOO.util.Event.addListener("moveRight", "mouseup", killEvent);\n+\n+    var zoomIn = function(event) {\n+        view.zoomIn();\n+        if (event) YAHOO.util.Event.stopEvent(event);\n+    };\n+    var zoomOut = function(event) {\n+        view.zoomOut();\n+        if (event) YAHOO.util.Event.stopEvent(event);\n+    };\n     YAHOO.util.Event.addListener("zoomIn", "click", zoomIn);\n \n     YAHOO.util.Event.addListener("zoomOut", "click", zoomOut);\n@@ -386,7 +411,7 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n \t\t\t    view.container.clientHeight - view.dim.height);\n \tview.updatePosLabels(newY);\n \tview.setY(newY);\n-\t//view.showVisibleBlocks();\n+\t//view.showVisibleBlocks(true);\n \t//view.heightUpdate();\n \t//view.updateTrackLabels();\n \tYAHOO.util.Event.stopEvent(e);\n@@ -437,6 +462,8 @@ function GenomeView(elem, stripeWidth, startbp, endbp, zoomLevel) {\n     this.staticTrack.showRange(0, this.stripeCount - 1, this.stripes[0].startBase, Math.round(this.stripeWidth / this.pxPerBp), this.pxPerBp);\n     this.container.appendChild(trackDiv);\n \n+    this.setX((this.container.offsetWidth / 2) - (this.dim.width / 2));\n+\n     this.container.style.paddingTop = this.topSpace() + "px";\n \n     document.body.style.cursor = "url(\\"closedhand.cur\\")";\n@@ -543,6 +570,7 @@ GenomeView.prototype.sizeInit = function() {\n     newHeight = (newHeight > this.dim.height ? newHeight : this.dim.height);\n \n     this.container.style.height = newHeight + "px";\n+    this.containerHeight = newHeight;\n \n     if (this.stripes) {\n         this.staticTrack.sizeInit(this.stripeCount, this.stripePercent);\n@@ -567,8 +595,8 @@ GenomeView.prototype.sizeInit = function() {\n                 this.container.appendChild(this.stripes[i]);\n             }\n         }\n-        this.showVisibleBlocks();\n-\tthis.heightUpdate();\n+        this.showVisibleBlocks(true);\n+\t//this.heightUpdate();\n     }\n }\n \n@@ -592,6 +620,7 @@ GenomeView.prototype.zoomIn = function(e, zoomLoc) {\n     if (this.curZoom < (this.zoomLevels.length - 1)) {\n \tthis.showWait();\n \tvar pos = this.getPosition();\n+\tthis.showVisibleBlocks(false, pos, pos.x, pos.x + this.dim.width);\n \tthis.trimVertical(pos.y);\n \tfor (var i = 0; i < this.stripeCount; i++) {\n \t    if ((((i + 1) * this.stripeWidth) < pos.x)\n@@ -660,16 +689,18 @@ GenomeView.prototype.zoomUpdate = function() {\n     this.clearStripes();\n     this.makeStripes();\n     this.container.style.paddingTop = this.topSpace() + "px";\n-    this.showVisibleBlocks();\n-    this.heightUpdate();\n+    this.containerHeight = 0;\n+    this.showVisibleBlocks(true);\n+    //this.heightUpdate();\n     YAHOO.util.Event.addListener(this.elem, "scroll", this.scrollHandler);\n     this.showDone();\n }    \n \n GenomeView.prototype.scrollUpdate = function() {\n     var x = this.getX();\n-    var cWidth = this.container.clientWidth;\n-    var eWidth = this.elem.clientWidth;\n+    var numStripes = this.stripeCount;\n+    var cWidth = numStripes * this.stripeWidth;\n+    var eWidth = this.dim.width;\n     //dx: horizontal distance between the centers of\n     //this.container and this.elem\n     var dx = (cWidth / 2) - ((eWidth / 2) + x);\n@@ -679,7 +710,6 @@ GenomeView.prototype.scrollUpdate = function() {\n     //The end goal is to minimize dx while making sure the surviving\n     //stripes end up in the same place.\n \n-    var numStripes = this.stripes.length;\n     var dStripes = (dx / this.stripeWidth) | 0;\n     if (0 == dStripes) return;\n     var changedStripes = Math.abs(dStripes);\n@@ -734,20 +764,21 @@ GenomeView.prototype.scrollUpdate = function() {\n     this.stripes = newStripes;\n     var newX = x + (dStripes * this.stripeWidth);\n     this.updateTrackLabels(newX);\n-    this.setX(newX);\n+    this.rawSetX(newX);\n     var firstVisible = (newX / this.stripeWidth) | 0;\n \n }\n \n-GenomeView.prototype.showVisibleBlocks = function(pos, startX, endX) {\n+GenomeView.prototype.showVisibleBlocks = function(updateHeight, pos, startX, endX) {\n     if (pos === undefined) pos = this.getPosition();\n     if (startX === undefined) startX = pos.x - this.dim.width;\n-    if (endX === undefined) endX = pos.x + this.dim.width + this.dim.width;\n+    if (endX === undefined) endX = pos.x + (2 * this.dim.width);\n     var leftVisible = Math.max(0, (startX / this.stripeWidth) | 0);\n     var rightVisible = Math.min(this.stripeCount - 1,\n                                Math.ceil(endX / this.stripeWidth));\n \n-    var bottom = pos.y + this.dim.height;\n+    var top = pos.y - this.dim.height;\n+    var bottom = pos.y + (2 * this.dim.height);\n \n     var trackTop, trackBottom, trackHeight;\n     var bpPerBlock = Math.round(this.stripeWidth / this.pxPerBp);\n@@ -757,28 +788,39 @@ GenomeView.prototype.showVisibleBlocks = function(pos, startX, endX) {\n \t\t\t       this.stripes[leftVisible].startBase,\n \t\t\t       bpPerBlock,\n \t\t\t       this.pxPerBp);\n-\n     this.trackIterate(function(track, gv) {\n             trackBottom = trackTop + track.height;\n-            //if track is visible,\n-            //if ((trackBottom > pos.y) && (trackTop < bottom)) {\n+            //if track is within the draggable range,\n+            if ((trackBottom > top) && (trackTop < bottom)) {\n \t\t//show blocks for the track\n                 trackHeight =\n                     track.showRange(leftVisible, rightVisible,\n                                     gv.stripes[leftVisible].startBase,\n                                     bpPerBlock,\n                                     gv.pxPerBp);\n-\t\ttrackHeight = Math.max(trackHeight, track.label.offsetHeight);\n+\t\t//trackHeight = Math.max(trackHeight, track.label.offsetHeight);\n+\t\tif (updateHeight && (track.height != trackHeight)) {\n+                    //YAHOO.log("updating height for track " + track.name);\n+\t\t    track.div.style.height = trackHeight + "px";\n+\t\t    track.height = trackHeight;\n+\t\t    trackBottom = trackTop + trackHeight;\n+\t\t}\n                 //if (trackHeight > track.height) {\n \t\t    //YAHOO.log("increasing height for track " + track.name + " from " + track.height + " to " + trackHeight);\n                 //    track.div.style.height = trackHeight + "px";\n                 //    track.height = trackHeight;\n                 //}\n-                //}\n+\t    }\n             trackTop = trackBottom + gv.trackPadding;\n         });\n     //if (trackTop > parseInt(this.container.style.height))\n-    //\tthis.container.style.height = trackTop + "px";\n+    if (updateHeight) {\n+\ttrackTop = Math.max(trackTop - this.topSpace(), this.dim.height);\n+\tif (trackTop != this.containerHeight) {\n+\t    this.container.style.height = trackTop + "px";\n+\t    this.containerHeight = trackTop;\n+\t}\n+    }\n }\n \n GenomeView.prototype.makeStripe = function(startBase, startPercent) {\n@@ -845,9 +887,10 @@ GenomeView.prototype.heightUpdate = function() {\n             lastTop += curHeight + gv.trackPadding;\n         });\n     var newHeight = Math.max(lastTop, this.dim.height) - top;\n-    var oldHeight = parseInt (this.container.style.height);\n+    var oldHeight = this.containerHeight;\n     this.container.style.height = newHeight + "px";\n-    if (newHeight < oldHeight) this.showVisibleBlocks();\n+    this.containerHeight = newHeight;\n+    if (newHeight < oldHeight) this.showVisibleBlocks(true);\n     //YAHOO.log("newHeight: " + newHeight + ", container height: " + this.container.style.height + ", elem scrollheight: " + this.elem.scrollHeight);\n     //for (var stripe = 0 ; stripe < this.stripes.length; stripe++)\n         //this.stripes[stripe].style.height = newHeight + "px";\n@@ -880,7 +923,7 @@ GenomeView.prototype.makeStripes = function() {\n     }\n     this.startBase = Math.round(this.pxToBp(this.offset));\n     //this.scrollUpdate();\n-    //this.showVisibleBlocks();\n+    //this.showVisibleBlocks(true);\n     //this.heightUpdate();\n }\n \n@@ -923,9 +966,9 @@ GenomeView.prototype.addTrack = function(name, featArray,\n                                                      this.colorArray.length];\n     trackDiv.appendChild(labelDiv);\n \n-    var leftVisible = Math.max(0, (pos.x / this.stripeWidth) | 0);\n+    var leftVisible = Math.max(0, ((pos.x - this.dim.width) / this.stripeWidth) | 0);\n     var rightVisible = Math.min(this.stripeCount - 1,\n-\t\t\t\tMath.ceil((pos.x + this.dim.width) \n+\t\t\t\tMath.ceil((pos.x + (2 * this.dim.width)) \n \t\t\t\t\t  / this.stripeWidth));\n \n     var bpPerBlock = Math.round(this.stripeWidth / this.pxPerBp);\n@@ -937,15 +980,17 @@ GenomeView.prototype.addTrack = function(name, featArray,\n     //} else {\n     //track.height = 50;\n     //}\n-    this.trackHeights.push(track.height);\n+    this.container.appendChild(trackDiv);\n+    track.height = Math.max(track.height, labelDiv.offsetHeight);\n+    //this.trackHeights.push(track.height);\n     trackDiv.style.height = track.height + "px";\n     trackDiv.style.marginBottom = this.trackPadding + "px";\n     totalHeight += track.height + this.trackPadding;\n     totalHeight = Math.max(totalHeight, this.dim.height);\n     //for (var i = 0; i < this.stripeCount; i++)\n     //    this.stripes[i].style.height = totalHeight + "px";\n-    this.container.style.height = totalHeight + "px";\n-    this.container.appendChild(trackDiv);\n+    this.containerHeight = totalHeight - this.topSpace()\n+    this.container.style.height = this.containerHeight + "px";\n \n     var trackDD = new YAHOO.util.DDProxy(trackDiv, "tracks", {padding: [this.trackPadding / 2, 0, this.trackPadding / 2, 0], scroll: false});\n     trackDD.trackPadding = this.trackPadding;\n@@ -1030,7 +1075,7 @@ GenomeView.prototype.addTrack = function(name, featArray,\n                 labelDiv.style.visibility = "";\n                 //trackDiv.style.backgroundColor = "";\n             });\n-        a.animate();\n+        setTimeout(function() { a.animate(); }, 0);\n     };\n \n     //var tLabel = document.createElement("div");\ndiff --git a/Track.js b/Track.js\nindex 0493e23ad..15cd57dc3 100644\n--- a/Track.js\n+++ b/Track.js\n@@ -6,6 +6,8 @@ function Track(name, numBlocks, trackDiv, labelDiv,\n     this.widthPct = widthPct;\n     this.widthPx = widthPx;\n     this.sizeInit(numBlocks, widthPct);\n+    this.labelHTML = "";\n+    this.labelHeight = 0;\n     //this.trackPadding = 20;\n }\n \n@@ -29,6 +31,15 @@ Track.prototype.clear = function() {\n     this.initBlocks();\n }\n \n+Track.prototype.setLabel = function(newHTML) {\n+    if ((this.labelHeight == 0) && this.label)\n+        this.labelHeight = this.label.offsetHeight;\n+    if (this.labelHTML == newHTML) return;\n+    this.labelHTML = newHTML;\n+    this.label.innerHTML = newHTML;\n+    this.labelHeight = this.label.offsetHeight;\n+}\n+\n Track.prototype.showRange = function(first, last, startBase, bpPerBlock, scale) {\n     //if (null == this.firstAttached) this.div.style.backgroundColor = "";\n     var firstAttached = (null == this.firstAttached ? last + 1 : this.firstAttached);\n@@ -55,7 +66,7 @@ Track.prototype.showRange = function(first, last, startBase, bpPerBlock, scale)\n \n     this.firstAttached = first;\n     this.lastAttached = last;\n-    return maxHeight;// + this.trackPadding;\n+    return Math.max(maxHeight, this.labelHeight);// + this.trackPadding;\n }\n \n Track.prototype._hideBlock = function(blockIndex) {\ndiff --git a/genome.css b/genome.css\nindex 52dc203a1..7a19dc596 100644\n--- a/genome.css\n+++ b/genome.css\n@@ -2,16 +2,12 @@ html, body {\n     height: 98%;\n }\n \n-button.slide {\n+button.nav {\n     width: 4em;\n }\n \n div.dragWindow {\n     position:absolute;\n-    left: 2%;\n-    top: 3em;\n-    width: 96%;\n-    height: 90%;\n     overflow: hidden;\n /*    overflow: -moz-scrollbars-vertical; */\n /*    overflow-x: hidden;\ndiff --git a/index.html b/index.html\nindex b63ee0852..189564d8c 100644\n--- a/index.html\n+++ b/index.html\n@@ -7,8 +7,8 @@\n   <head>\n     <title>div genome test</title>\n     <link rel="stylesheet" type="text/css" href="genome.css"></link>\n-    <script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/utilities/utilities.js" ></script>\n-    <script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/logger/logger-min.js"></script> \n+    <script type="text/javascript" src="jslib/utilities.js" ></script>\n+    <script type="text/javascript" src="jslib/logger-min.js"></script> \n     <script type="text/javascript" src="Util.js"></script>\n     <script type="text/javascript" src="NCList.js"></script>\n     <script type="text/javascript" src="Track.js"></script>\n@@ -24,12 +24,6 @@\n            {url: "gene.json", label: "gene2", className: "feature", height: 11},\n            {url: "gene.json", label: "gene3", className: "feature", height: 11},\n            {url: "gene.json", label: "gene4", className: "feature", height: 11},\n-           {url: "gene.json", label: "gene5", className: "feature", height: 11},\n-           {url: "gene.json", label: "gene6", className: "feature", height: 11},\n-           {url: "gene.json", label: "gene7", className: "feature", height: 11},\n-           {url: "gene.json", label: "gene8", className: "feature", height: 11},\n-           {url: "gene.json", label: "gene9", className: "feature", height: 11}\n-/*\n            {url: "exon.json", label: "exon1", className: "exon", height: 9},\n            {url: "gene.json", label: "gene5", className: "feature", height: 11},\n            {url: "gene.json", label: "gene6", className: "feature", height: 11},\n@@ -41,26 +35,25 @@\n            {url: "gene.json", label: "gene11", className: "feature", height: 11},\n            {url: "gene.json", label: "gene12", className: "feature", height: 11},\n            {url: "exon.json", label: "exon3", className: "exon", height: 9}\n-*/\n           ];\n     /* ]]> */\n     </script>\n   </head>\n   \n-  <body onload="Browser.init()">\n-    <button id="moveLeft" class="slide">&lt;&lt;</button>\n-    <!--<button id="stepLeft" class="slide">&lt;</button>\n-    <button id="stepRight" class="slide">&gt;</button>-->\n-    <button id="moveRight" class="slide">&gt;&gt;</button>\n-    &nbsp;&nbsp;&nbsp;\n-    <button id="zoomIn" class="slide">+</button>\n-    <button id="zoomOut" class="slide">-</button>\n+  <body onload="Browser.init(\'genomeBrowser\')">\n+    <button id="moveLeft" class="nav">&lt;&lt;</button>\n+    <!--<button id="stepLeft" class="nav">&lt;</button>\n+    <button id="stepRight" class="nav">&gt;</button>-->\n+    <button id="moveRight" class="nav">&gt;&gt;</button>\n     &nbsp;&nbsp;&nbsp;\n-    <button id="profile" class="slide">profile</button>\n+    <button id="zoomIn" class="nav">+</button>\n+    <button id="zoomOut" class="nav">-</button>\n     &nbsp;&nbsp;&nbsp;\n-    <span id="profTime">profile time: </span>\n+    <button id="profile" class="nav">demo</button>\n+    <!--&nbsp;&nbsp;&nbsp;-->\n+    <span id="profTime" style="display:none">profile time: </span>\n \n-    <div id="dragWindow" class="dragWindow">\n+    <div id="genomeBrowser" class="dragWindow" style="left: 2%; top: 3em; width: 96%; bottom: 20px;">\n     </div>\n   </body>\n </html>\ndiff --git a/jslib/builder.js b/jslib/builder.js\ndeleted file mode 100644\nindex 5b4ce87d2..000000000\n--- a/jslib/builder.js\n+++ /dev/null\n@@ -1,136 +0,0 @@\n-// script.aculo.us builder.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-//\n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-var Builder = {\n-  NODEMAP: {\n-    AREA: \'map\',\n-    CAPTION: \'table\',\n-    COL: \'table\',\n-    COLGROUP: \'table\',\n-    LEGEND: \'fieldset\',\n-    OPTGROUP: \'select\',\n-    OPTION: \'select\',\n-    PARAM: \'object\',\n-    TBODY: \'table\',\n-    TD: \'table\',\n-    TFOOT: \'table\',\n-    TH: \'table\',\n-    THEAD: \'table\',\n-    TR: \'table\'\n-  },\n-  // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,\n-  //       due to a Firefox bug\n-  node: function(elementName) {\n-    elementName = elementName.toUpperCase();\n-    \n-    // try innerHTML approach\n-    var parentTag = this.NODEMAP[elementName] || \'div\';\n-    var parentElement = document.createElement(parentTag);\n-    try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707\n-      parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";\n-    } catch(e) {}\n-    var element = parentElement.firstChild || null;\n-      \n-    // see if browser added wrapping tags\n-    if(element && (element.tagName.toUpperCase() != elementName))\n-      element = element.getElementsByTagName(elementName)[0];\n-    \n-    // fallback to createElement approach\n-    if(!element) element = document.createElement(elementName);\n-    \n-    // abort if nothing could be created\n-    if(!element) return;\n-\n-    // attributes (or text)\n-    if(arguments[1])\n-      if(this._isStringOrNumber(arguments[1]) ||\n-        (arguments[1] instanceof Array) ||\n-        arguments[1].tagName) {\n-          this._children(element, arguments[1]);\n-        } else {\n-          var attrs = this._attributes(arguments[1]);\n-          if(attrs.length) {\n-            try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707\n-              parentElement.innerHTML = "<" +elementName + " " +\n-                attrs + "></" + elementName + ">";\n-            } catch(e) {}\n-            element = parentElement.firstChild || null;\n-            // workaround firefox 1.0.X bug\n-            if(!element) {\n-              element = document.createElement(elementName);\n-              for(attr in arguments[1]) \n-                element[attr == \'class\' ? \'className\' : attr] = arguments[1][attr];\n-            }\n-            if(element.tagName.toUpperCase() != elementName)\n-              element = parentElement.getElementsByTagName(elementName)[0];\n-          }\n-        } \n-\n-    // text, or array of children\n-    if(arguments[2])\n-      this._children(element, arguments[2]);\n-\n-     return element;\n-  },\n-  _text: function(text) {\n-     return document.createTextNode(text);\n-  },\n-\n-  ATTR_MAP: {\n-    \'className\': \'class\',\n-    \'htmlFor\': \'for\'\n-  },\n-\n-  _attributes: function(attributes) {\n-    var attrs = [];\n-    for(attribute in attributes)\n-      attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +\n-          \'="\' + attributes[attribute].toString().escapeHTML().gsub(/"/,\'&quot;\') + \'"\');\n-    return attrs.join(" ");\n-  },\n-  _children: function(element, children) {\n-    if(children.tagName) {\n-      element.appendChild(children);\n-      return;\n-    }\n-    if(typeof children==\'object\') { // array can hold nodes and text\n-      children.flatten().each( function(e) {\n-        if(typeof e==\'object\')\n-          element.appendChild(e)\n-        else\n-          if(Builder._isStringOrNumber(e))\n-            element.appendChild(Builder._text(e));\n-      });\n-    } else\n-      if(Builder._isStringOrNumber(children))\n-        element.appendChild(Builder._text(children));\n-  },\n-  _isStringOrNumber: function(param) {\n-    return(typeof param==\'string\' || typeof param==\'number\');\n-  },\n-  build: function(html) {\n-    var element = this.node(\'div\');\n-    $(element).update(html.strip());\n-    return element.down();\n-  },\n-  dump: function(scope) { \n-    if(typeof scope != \'object\' && typeof scope != \'function\') scope = window; //global scope \n-  \n-    var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +\n-      "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +\n-      "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+\n-      "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+\n-      "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+\n-      "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\\s+/);\n-  \n-    tags.each( function(tag){ \n-      scope[tag] = function() { \n-        return Builder.node.apply(Builder, [tag].concat($A(arguments)));  \n-      } \n-    });\n-  }\n-}\ndiff --git a/jslib/controls.js b/jslib/controls.js\ndeleted file mode 100644\nindex 6783bd0a6..000000000\n--- a/jslib/controls.js\n+++ /dev/null\n@@ -1,875 +0,0 @@\n-// script.aculo.us controls.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-//           (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)\n-//           (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)\n-// Contributors:\n-//  Richard Livsey\n-//  Rahul Bhargava\n-//  Rob Wills\n-// \n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-// Autocompleter.Base handles all the autocompletion functionality \n-// that\'s independent of the data source for autocompletion. This\n-// includes drawing the autocompletion menu, observing keyboard\n-// and mouse events, and similar.\n-//\n-// Specific autocompleters need to provide, at the very least, \n-// a getUpdatedChoices function that will be invoked every time\n-// the text inside the monitored textbox changes. This method \n-// should get the text for which to provide autocompletion by\n-// invoking this.getToken(), NOT by directly accessing\n-// this.element.value. This is to allow incremental tokenized\n-// autocompletion. Specific auto-completion logic (AJAX, etc)\n-// belongs in getUpdatedChoices.\n-//\n-// Tokenized incremental autocompletion is enabled automatically\n-// when an autocompleter is instantiated with the \'tokens\' option\n-// in the options parameter, e.g.:\n-// new Ajax.Autocompleter(\'id\',\'upd\', \'/url/\', { tokens: \',\' });\n-// will incrementally autocomplete with a comma as the token.\n-// Additionally, \',\' in the above example can be replaced with\n-// a token array, e.g. { tokens: [\',\', \'\\n\'] } which\n-// enables autocompletion on multiple tokens. This is most \n-// useful when one of the tokens is \\n (a newline), as it \n-// allows smart autocompletion after linebreaks.\n-\n-if(typeof Effect == \'undefined\')\n-  throw("controls.js requires including script.aculo.us\' effects.js library");\n-\n-var Autocompleter = {}\n-Autocompleter.Base = function() {};\n-Autocompleter.Base.prototype = {\n-  baseInitialize: function(element, update, options) {\n-    element          = $(element)\n-    this.element     = element; \n-    this.update      = $(update);  \n-    this.hasFocus    = false; \n-    this.changed     = false; \n-    this.active      = false; \n-    this.index       = 0;     \n-    this.entryCount  = 0;\n-\n-    if(this.setOptions)\n-      this.setOptions(options);\n-    else\n-      this.options = options || {};\n-\n-    this.options.paramName    = this.options.paramName || this.element.name;\n-    this.options.tokens       = this.options.tokens || [];\n-    this.options.frequency    = this.options.frequency || 0.4;\n-    this.options.minChars     = this.options.minChars || 1;\n-    this.options.onShow       = this.options.onShow || \n-      function(element, update){ \n-        if(!update.style.position || update.style.position==\'absolute\') {\n-          update.style.position = \'absolute\';\n-          Position.clone(element, update, {\n-            setHeight: false, \n-            offsetTop: element.offsetHeight\n-          });\n-        }\n-        Effect.Appear(update,{duration:0.15});\n-      };\n-    this.options.onHide = this.options.onHide || \n-      function(element, update){ new Effect.Fade(update,{duration:0.15}) };\n-\n-    if(typeof(this.options.tokens) == \'string\') \n-      this.options.tokens = new Array(this.options.tokens);\n-\n-    this.observer = null;\n-    \n-    this.element.setAttribute(\'autocomplete\',\'off\');\n-\n-    Element.hide(this.update);\n-\n-    Event.observe(this.element, \'blur\', this.onBlur.bindAsEventListener(this));\n-    Event.observe(this.element, \'keypress\', this.onKeyPress.bindAsEventListener(this));\n-\n-    // Turn autocomplete back on when the user leaves the page, so that the\n-    // field\'s value will be remembered on Mozilla-based browsers.\n-    Event.observe(window, \'beforeunload\', function(){ \n-      element.setAttribute(\'autocomplete\', \'on\'); \n-    });\n-  },\n-\n-  show: function() {\n-    if(Element.getStyle(this.update, \'display\')==\'none\') this.options.onShow(this.element, this.update);\n-    if(!this.iefix && \n-      (Prototype.Browser.IE) &&\n-      (Element.getStyle(this.update, \'position\')==\'absolute\')) {\n-      new Insertion.After(this.update, \n-       \'<iframe id="\' + this.update.id + \'_iefix" \'+\n-       \'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" \' +\n-       \'src="javascript:false;" frameborder="0" scrolling="no"></iframe>\');\n-      this.iefix = $(this.update.id+\'_iefix\');\n-    }\n-    if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);\n-  },\n-  \n-  fixIEOverlapping: function() {\n-    Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});\n-    this.iefix.style.zIndex = 1;\n-    this.update.style.zIndex = 2;\n-    Element.show(this.iefix);\n-  },\n-\n-  hide: function() {\n-    this.stopIndicator();\n-    if(Element.getStyle(this.update, \'display\')!=\'none\') this.options.onHide(this.element, this.update);\n-    if(this.iefix) Element.hide(this.iefix);\n-  },\n-\n-  startIndicator: function() {\n-    if(this.options.indicator) Element.show(this.options.indicator);\n-  },\n-\n-  stopIndicator: function() {\n-    if(this.options.indicator) Element.hide(this.options.indicator);\n-  },\n-\n-  onKeyPress: function(event) {\n-    if(this.active)\n-      switch(event.keyCode) {\n-       case Event.KEY_TAB:\n-       case Event.KEY_RETURN:\n-         this.selectEntry();\n-         Event.stop(event);\n-       case Event.KEY_ESC:\n-         this.hide();\n-         this.active = false;\n-         Event.stop(event);\n-         return;\n-       case Event.KEY_LEFT:\n-       case Event.KEY_RIGHT:\n-         return;\n-       case Event.KEY_UP:\n-         this.markPrevious();\n-         this.render();\n-         if(Prototype.Browser.WebKit) Event.stop(event);\n-         return;\n-       case Event.KEY_DOWN:\n-         this.markNext();\n-         this.render();\n-         if(Prototype.Browser.WebKit) Event.stop(event);\n-         return;\n-      }\n-     else \n-       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || \n-         (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;\n-\n-    this.changed = true;\n-    this.hasFocus = true;\n-\n-    if(this.observer) clearTimeout(this.observer);\n-      this.observer = \n-        setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);\n-  },\n-\n-  activate: function() {\n-    this.changed = false;\n-    this.hasFocus = true;\n-    this.getUpdatedChoices();\n-  },\n-\n-  onHover: function(event) {\n-    var element = Event.findElement(event, \'LI\');\n-    if(this.index != element.autocompleteIndex) \n-    {\n-        this.index = element.autocompleteIndex;\n-        this.render();\n-    }\n-    Event.stop(event);\n-  },\n-  \n-  onClick: function(event) {\n-    var element = Event.findElement(event, \'LI\');\n-    this.index = element.autocompleteIndex;\n-    this.selectEntry();\n-    this.hide();\n-  },\n-  \n-  onBlur: function(event) {\n-    // needed to make click events working\n-    setTimeout(this.hide.bind(this), 250);\n-    this.hasFocus = false;\n-    this.active = false;     \n-  }, \n-  \n-  render: function() {\n-    if(this.entryCount > 0) {\n-      for (var i = 0; i < this.entryCount; i++)\n-        this.index==i ? \n-          Element.addClassName(this.getEntry(i),"selected") : \n-          Element.removeClassName(this.getEntry(i),"selected");\n-      if(this.hasFocus) { \n-        this.show();\n-        this.active = true;\n-      }\n-    } else {\n-      this.active = false;\n-      this.hide();\n-    }\n-  },\n-  \n-  markPrevious: function() {\n-    if(this.index > 0) this.index--\n-      else this.index = this.entryCount-1;\n-    this.getEntry(this.index).scrollIntoView(true);\n-  },\n-  \n-  markNext: function() {\n-    if(this.index < this.entryCount-1) this.index++\n-      else this.index = 0;\n-    this.getEntry(this.index).scrollIntoView(false);\n-  },\n-  \n-  getEntry: function(index) {\n-    return this.update.firstChild.childNodes[index];\n-  },\n-  \n-  getCurrentEntry: function() {\n-    return this.getEntry(this.index);\n-  },\n-  \n-  selectEntry: function() {\n-    this.active = false;\n-    this.updateElement(this.getCurrentEntry());\n-  },\n-\n-  updateElement: function(selectedElement) {\n-    if (this.options.updateElement) {\n-      this.options.updateElement(selectedElement);\n-      return;\n-    }\n-    var value = \'\';\n-    if (this.options.select) {\n-      var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];\n-      if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);\n-    } else\n-      value = Element.collectTextNodesIgnoreClass(selectedElement, \'informal\');\n-    \n-    var lastTokenPos = this.findLastToken();\n-    if (lastTokenPos != -1) {\n-      var newValue = this.element.value.substr(0, lastTokenPos + 1);\n-      var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\\s+/);\n-      if (whitespace)\n-        newValue += whitespace[0];\n-      this.element.value = newValue + value;\n-    } else {\n-      this.element.value = value;\n-    }\n-    this.element.focus();\n-    \n-    if (this.options.afterUpdateElement)\n-      this.options.afterUpdateElement(this.element, selectedElement);\n-  },\n-\n-  updateChoices: function(choices) {\n-    if(!this.changed && this.hasFocus) {\n-      this.update.innerHTML = choices;\n-      Element.cleanWhitespace(this.update);\n-      Element.cleanWhitespace(this.update.down());\n-\n-      if(this.update.firstChild && this.update.down().childNodes) {\n-        this.entryCount = \n-          this.update.down().childNodes.length;\n-        for (var i = 0; i < this.entryCount; i++) {\n-          var entry = this.getEntry(i);\n-          entry.autocompleteIndex = i;\n-          this.addObservers(entry);\n-        }\n-      } else { \n-        this.entryCount = 0;\n-      }\n-\n-      this.stopIndicator();\n-      this.index = 0;\n-      \n-      if(this.entryCount==1 && this.options.autoSelect) {\n-        this.selectEntry();\n-        this.hide();\n-      } else {\n-        this.render();\n-      }\n-    }\n-  },\n-\n-  addObservers: function(element) {\n-    Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));\n-    Event.observe(element, "click", this.onClick.bindAsEventListener(this));\n-  },\n-\n-  onObserverEvent: function() {\n-    this.changed = false;   \n-    if(this.getToken().length>=this.options.minChars) {\n-      this.getUpdatedChoices();\n-    } else {\n-      this.active = false;\n-      this.hide();\n-    }\n-  },\n-\n-  getToken: function() {\n-    var tokenPos = this.findLastToken();\n-    if (tokenPos != -1)\n-      var ret = this.element.value.substr(tokenPos + 1).replace(/^\\s+/,\'\').replace(/\\s+$/,\'\');\n-    else\n-      var ret = this.element.value;\n-\n-    return /\\n/.test(ret) ? \'\' : ret;\n-  },\n-\n-  findLastToken: function() {\n-    var lastTokenPos = -1;\n-\n-    for (var i=0; i<this.options.tokens.length; i++) {\n-      var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);\n-      if (thisTokenPos > lastTokenPos)\n-        lastTokenPos = thisTokenPos;\n-    }\n-    return lastTokenPos;\n-  }\n-}\n-\n-Ajax.Autocompleter = Class.create();\n-Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {\n-  initialize: function(element, update, url, options) {\n-    this.baseInitialize(element, update, options);\n-    this.options.asynchronous  = true;\n-    this.options.onComplete    = this.onComplete.bind(this);\n-    this.options.defaultParams = this.options.parameters || null;\n-    this.url                   = url;\n-  },\n-\n-  getUpdatedChoices: function() {\n-    this.startIndicator();\n-    \n-    var entry = encodeURIComponent(this.options.paramName) + \'=\' + \n-      encodeURIComponent(this.getToken());\n-\n-    this.options.parameters = this.options.callback ?\n-      this.options.callback(this.element, entry) : entry;\n-\n-    if(this.options.defaultParams) \n-      this.options.parameters += \'&\' + this.options.defaultParams;\n-    \n-    new Ajax.Request(this.url, this.options);\n-  },\n-\n-  onComplete: function(request) {\n-    this.updateChoices(request.responseText);\n-  }\n-\n-});\n-\n-// The local array autocompleter. Used when you\'d prefer to\n-// inject an array of autocompletion options into the page, rather\n-// than sending out Ajax queries, which can be quite slow sometimes.\n-//\n-// The constructor takes four parameters. The first two are, as usual,\n-// the id of the monitored textbox, and id of the autocompletion menu.\n-// The third is the array you want to autocomplete from, and the fourth\n-// is the options block.\n-//\n-// Extra local autocompletion options:\n-// - choices - How many autocompletion choices to offer\n-//\n-// - partialSearch - If false, the autocompleter will match entered\n-//                    text only at the beginning of strings in the \n-//                    autocomplete array. Defaults to true, which will\n-//                    match text at the beginning of any *word* in the\n-//                    strings in the autocomplete array. If you want to\n-//                    search anywhere in the string, additionally set\n-//                    the option fullSearch to true (default: off).\n-//\n-// - fullSsearch - Search anywhere in autocomplete array strings.\n-//\n-// - partialChars - How many characters to enter before triggering\n-//                   a partial match (unlike minChars, which defines\n-//                   how many characters are required to do any match\n-//                   at all). Defaults to 2.\n-//\n-// - ignoreCase - Whether to ignore case when autocompleting.\n-//                 Defaults to true.\n-//\n-// It\'s possible to pass in a custom function as the \'selector\' \n-// option, if you prefer to write your own autocompletion logic.\n-// In that case, the other options above will not apply unless\n-// you support them.\n-\n-Autocompleter.Local = Class.create();\n-Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {\n-  initialize: function(element, update, array, options) {\n-    this.baseInitialize(element, update, options);\n-    this.options.array = array;\n-  },\n-\n-  getUpdatedChoices: function() {\n-    this.updateChoices(this.options.selector(this));\n-  },\n-\n-  setOptions: function(options) {\n-    this.options = Object.extend({\n-      choices: 10,\n-      partialSearch: true,\n-      partialChars: 2,\n-      ignoreCase: true,\n-      fullSearch: false,\n-      selector: function(instance) {\n-        var ret       = []; // Beginning matches\n-        var partial   = []; // Inside matches\n-        var entry     = instance.getToken();\n-        var count     = 0;\n-\n-        for (var i = 0; i < instance.options.array.length &&  \n-          ret.length < instance.options.choices ; i++) { \n-\n-          var elem = instance.options.array[i];\n-          var foundPos = instance.options.ignoreCase ? \n-            elem.toLowerCase().indexOf(entry.toLowerCase()) : \n-            elem.indexOf(entry);\n-\n-          while (foundPos != -1) {\n-            if (foundPos == 0 && elem.length != entry.length) { \n-              ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + \n-                elem.substr(entry.length) + "</li>");\n-              break;\n-            } else if (entry.length >= instance.options.partialChars && \n-              instance.options.partialSearch && foundPos != -1) {\n-              if (instance.options.fullSearch || /\\s/.test(elem.substr(foundPos-1,1))) {\n-                partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +\n-                  elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(\n-                  foundPos + entry.length) + "</li>");\n-                break;\n-              }\n-            }\n-\n-            foundPos = instance.options.ignoreCase ? \n-              elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : \n-              elem.indexOf(entry, foundPos + 1);\n-\n-          }\n-        }\n-        if (partial.length)\n-          ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))\n-        return "<ul>" + ret.join(\'\') + "</ul>";\n-      }\n-    }, options || {});\n-  }\n-});\n-\n-// AJAX in-place editor\n-//\n-// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor\n-\n-// Use this if you notice weird scrolling problems on some browsers,\n-// the DOM might be a bit confused when this gets called so do this\n-// waits 1 ms (with setTimeout) until it does the activation\n-Field.scrollFreeActivate = function(field) {\n-  setTimeout(function() {\n-    Field.activate(field);\n-  }, 1);\n-}\n-\n-Ajax.InPlaceEditor = Class.create();\n-Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";\n-Ajax.InPlaceEditor.prototype = {\n-  initialize: function(element, url, options) {\n-    this.url = url;\n-    this.element = $(element);\n-\n-    this.options = Object.extend({\n-      paramName: "value",\n-      okButton: true,\n-      okLink: false,\n-      okText: "ok",\n-      cancelButton: false,\n-      cancelLink: true,\n-      cancelText: "cancel",\n-      textBeforeControls: \'\',\n-      textBetweenControls: \'\',\n-      textAfterControls: \'\',\n-      savingText: "Saving...",\n-      clickToEditText: "Click to edit",\n-      okText: "ok",\n-      rows: 1,\n-      onComplete: function(transport, element) {\n-        new Effect.Highlight(element, {startcolor: this.options.highlightcolor});\n-      },\n-      onFailure: function(transport) {\n-        alert("Error communicating with the server: " + transport.responseText.stripTags());\n-      },\n-      callback: function(form) {\n-        return Form.serialize(form);\n-      },\n-      handleLineBreaks: true,\n-      loadingText: \'Loading...\',\n-      savingClassName: \'inplaceeditor-saving\',\n-      loadingClassName: \'inplaceeditor-loading\',\n-      formClassName: \'inplaceeditor-form\',\n-      highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,\n-      highlightendcolor: "#FFFFFF",\n-      externalControl: null,\n-      submitOnBlur: false,\n-      ajaxOptions: {},\n-      evalScripts: false\n-    }, options || {});\n-\n-    if(!this.options.formId && this.element.id) {\n-      this.options.formId = this.element.id + "-inplaceeditor";\n-      if ($(this.options.formId)) {\n-        // there\'s already a form with that name, don\'t specify an id\n-        this.options.formId = null;\n-      }\n-    }\n-    \n-    if (this.options.externalControl) {\n-      this.options.externalControl = $(this.options.externalControl);\n-    }\n-    \n-    this.originalBackground = Element.getStyle(this.element, \'background-color\');\n-    if (!this.originalBackground) {\n-      this.originalBackground = "transparent";\n-    }\n-    \n-    this.element.title = this.options.clickToEditText;\n-    \n-    this.onclickListener = this.enterEditMode.bindAsEventListener(this);\n-    this.mouseoverListener = this.enterHover.bindAsEventListener(this);\n-    this.mouseoutListener = this.leaveHover.bindAsEventListener(this);\n-    Event.observe(this.element, \'click\', this.onclickListener);\n-    Event.observe(this.element, \'mouseover\', this.mouseoverListener);\n-    Event.observe(this.element, \'mouseout\', this.mouseoutListener);\n-    if (this.options.externalControl) {\n-      Event.observe(this.options.externalControl, \'click\', this.onclickListener);\n-      Event.observe(this.options.externalControl, \'mouseover\', this.mouseoverListener);\n-      Event.observe(this.options.externalControl, \'mouseout\', this.mouseoutListener);\n-    }\n-  },\n-  enterEditMode: function(evt) {\n-    if (this.saving) return;\n-    if (this.editing) return;\n-    this.editing = true;\n-    this.onEnterEditMode();\n-    if (this.options.externalControl) {\n-      Element.hide(this.options.externalControl);\n-    }\n-    Element.hide(this.element);\n-    this.createForm();\n-    this.element.parentNode.insertBefore(this.form, this.element);\n-    if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);\n-    // stop the event to avoid a page refresh in Safari\n-    if (evt) {\n-      Event.stop(evt);\n-    }\n-    return false;\n-  },\n-  createForm: function() {\n-    this.form = document.createElement("form");\n-    this.form.id = this.options.formId;\n-    Element.addClassName(this.form, this.options.formClassName)\n-    this.form.onsubmit = this.onSubmit.bind(this);\n-\n-    this.createEditField();\n-\n-    if (this.options.textarea) {\n-      var br = document.createElement("br");\n-      this.form.appendChild(br);\n-    }\n-    \n-    if (this.options.textBeforeControls)\n-      this.form.appendChild(document.createTextNode(this.options.textBeforeControls));\n-\n-    if (this.options.okButton) {\n-      var okButton = document.createElement("input");\n-      okButton.type = "submit";\n-      okButton.value = this.options.okText;\n-      okButton.className = \'editor_ok_button\';\n-      this.form.appendChild(okButton);\n-    }\n-    \n-    if (this.options.okLink) {\n-      var okLink = document.createElement("a");\n-      okLink.href = "#";\n-      okLink.appendChild(document.createTextNode(this.options.okText));\n-      okLink.onclick = this.onSubmit.bind(this);\n-      okLink.className = \'editor_ok_link\';\n-      this.form.appendChild(okLink);\n-    }\n-    \n-    if (this.options.textBetweenControls && \n-      (this.options.okLink || this.options.okButton) && \n-      (this.options.cancelLink || this.options.cancelButton))\n-      this.form.appendChild(document.createTextNode(this.options.textBetweenControls));\n-      \n-    if (this.options.cancelButton) {\n-      var cancelButton = document.createElement("input");\n-      cancelButton.type = "submit";\n-      cancelButton.value = this.options.cancelText;\n-      cancelButton.onclick = this.onclickCancel.bind(this);\n-      cancelButton.className = \'editor_cancel_button\';\n-      this.form.appendChild(cancelButton);\n-    }\n-\n-    if (this.options.cancelLink) {\n-      var cancelLink = document.createElement("a");\n-      cancelLink.href = "#";\n-      cancelLink.appendChild(document.createTextNode(this.options.cancelText));\n-      cancelLink.onclick = this.onclickCancel.bind(this);\n-      cancelLink.className = \'editor_cancel editor_cancel_link\';      \n-      this.form.appendChild(cancelLink);\n-    }\n-    \n-    if (this.options.textAfterControls)\n-      this.form.appendChild(document.createTextNode(this.options.textAfterControls));\n-  },\n-  hasHTMLLineBreaks: function(string) {\n-    if (!this.options.handleLineBreaks) return false;\n-    return string.match(/<br/i) || string.match(/<p>/i);\n-  },\n-  convertHTMLLineBreaks: function(string) {\n-    return string.replace(/<br>/gi, "\\n").replace(/<br\\/>/gi, "\\n").replace(/<\\/p>/gi, "\\n").replace(/<p>/gi, "");\n-  },\n-  createEditField: function() {\n-    var text;\n-    if(this.options.loadTextURL) {\n-      text = this.options.loadingText;\n-    } else {\n-      text = this.getText();\n-    }\n-\n-    var obj = this;\n-    \n-    if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {\n-      this.options.textarea = false;\n-      var textField = document.createElement("input");\n-      textField.obj = this;\n-      textField.type = "text";\n-      textField.name = this.options.paramName;\n-      textField.value = text;\n-      textField.style.backgroundColor = this.options.highlightcolor;\n-      textField.className = \'editor_field\';\n-      var size = this.options.size || this.options.cols || 0;\n-      if (size != 0) textField.size = size;\n-      if (this.options.submitOnBlur)\n-        textField.onblur = this.onSubmit.bind(this);\n-      this.editField = textField;\n-    } else {\n-      this.options.textarea = true;\n-      var textArea = document.createElement("textarea");\n-      textArea.obj = this;\n-      textArea.name = this.options.paramName;\n-      textArea.value = this.convertHTMLLineBreaks(text);\n-      textArea.rows = this.options.rows;\n-      textArea.cols = this.options.cols || 40;\n-      textArea.className = \'editor_field\';      \n-      if (this.options.submitOnBlur)\n-        textArea.onblur = this.onSubmit.bind(this);\n-      this.editField = textArea;\n-    }\n-    \n-    if(this.options.loadTextURL) {\n-      this.loadExternalText();\n-    }\n-    this.form.appendChild(this.editField);\n-  },\n-  getText: function() {\n-    return this.element.innerHTML;\n-  },\n-  loadExternalText: function() {\n-    Element.addClassName(this.form, this.options.loadingClassName);\n-    this.editField.disabled = true;\n-    new Ajax.Request(\n-      this.options.loadTextURL,\n-      Object.extend({\n-        asynchronous: true,\n-        onComplete: this.onLoadedExternalText.bind(this)\n-      }, this.options.ajaxOptions)\n-    );\n-  },\n-  onLoadedExternalText: function(transport) {\n-    Element.removeClassName(this.form, this.options.loadingClassName);\n-    this.editField.disabled = false;\n-    this.editField.value = transport.responseText.stripTags();\n-    Field.scrollFreeActivate(this.editField);\n-  },\n-  onclickCancel: function() {\n-    this.onComplete();\n-    this.leaveEditMode();\n-    return false;\n-  },\n-  onFailure: function(transport) {\n-    this.options.onFailure(transport);\n-    if (this.oldInnerHTML) {\n-      this.element.innerHTML = this.oldInnerHTML;\n-      this.oldInnerHTML = null;\n-    }\n-    return false;\n-  },\n-  onSubmit: function() {\n-    // onLoading resets these so we need to save them away for the Ajax call\n-    var form = this.form;\n-    var value = this.editField.value;\n-    \n-    // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...\n-    // which means this will actually switch on Saving... *after* we\'ve left edit mode causing Saving...\n-    // to be displayed indefinitely\n-    this.onLoading();\n-    \n-    if (this.options.evalScripts) {\n-      new Ajax.Request(\n-        this.url, Object.extend({\n-          parameters: this.options.callback(form, value),\n-          onComplete: this.onComplete.bind(this),\n-          onFailure: this.onFailure.bind(this),\n-          asynchronous:true, \n-          evalScripts:true\n-        }, this.options.ajaxOptions));\n-    } else  {\n-      new Ajax.Updater(\n-        { success: this.element,\n-          // don\'t update on failure (this could be an option)\n-          failure: null }, \n-        this.url, Object.extend({\n-          parameters: this.options.callback(form, value),\n-          onComplete: this.onComplete.bind(this),\n-          onFailure: this.onFailure.bind(this)\n-        }, this.options.ajaxOptions));\n-    }\n-    // stop the event to avoid a page refresh in Safari\n-    if (arguments.length > 1) {\n-      Event.stop(arguments[0]);\n-    }\n-    return false;\n-  },\n-  onLoading: function() {\n-    this.saving = true;\n-    this.removeForm();\n-    this.leaveHover();\n-    this.showSaving();\n-  },\n-  showSaving: function() {\n-    this.oldInnerHTML = this.element.innerHTML;\n-    this.element.innerHTML = this.options.savingText;\n-    Element.addClassName(this.element, this.options.savingClassName);\n-    this.element.style.backgroundColor = this.originalBackground;\n-    Element.show(this.element);\n-  },\n-  removeForm: function() {\n-    if(this.form) {\n-      if (this.form.parentNode) Element.remove(this.form);\n-      this.form = null;\n-    }\n-  },\n-  enterHover: function() {\n-    if (this.saving) return;\n-    this.element.style.backgroundColor = this.options.highlightcolor;\n-    if (this.effect) {\n-      this.effect.cancel();\n-    }\n-    Element.addClassName(this.element, this.options.hoverClassName)\n-  },\n-  leaveHover: function() {\n-    if (this.options.backgroundColor) {\n-      this.element.style.backgroundColor = this.oldBackground;\n-    }\n-    Element.removeClassName(this.element, this.options.hoverClassName)\n-    if (this.saving) return;\n-    this.effect = new Effect.Highlight(this.element, {\n-      startcolor: this.options.highlightcolor,\n-      endcolor: this.options.highlightendcolor,\n-      restorecolor: this.originalBackground\n-    });\n-  },\n-  leaveEditMode: function() {\n-    Element.removeClassName(this.element, this.options.savingClassName);\n-    this.removeForm();\n-    this.leaveHover();\n-    this.element.style.backgroundColor = this.originalBackground;\n-    Element.show(this.element);\n-    if (this.options.externalControl) {\n-      Element.show(this.options.externalControl);\n-    }\n-    this.editing = false;\n-    this.saving = false;\n-    this.oldInnerHTML = null;\n-    this.onLeaveEditMode();\n-  },\n-  onComplete: function(transport) {\n-    this.leaveEditMode();\n-    this.options.onComplete.bind(this)(transport, this.element);\n-  },\n-  onEnterEditMode: function() {},\n-  onLeaveEditMode: function() {},\n-  dispose: function() {\n-    if (this.oldInnerHTML) {\n-      this.element.innerHTML = this.oldInnerHTML;\n-    }\n-    this.leaveEditMode();\n-    Event.stopObserving(this.element, \'click\', this.onclickListener);\n-    Event.stopObserving(this.element, \'mouseover\', this.mouseoverListener);\n-    Event.stopObserving(this.element, \'mouseout\', this.mouseoutListener);\n-    if (this.options.externalControl) {\n-      Event.stopObserving(this.options.externalControl, \'click\', this.onclickListener);\n-      Event.stopObserving(this.options.externalControl, \'mouseover\', this.mouseoverListener);\n-      Event.stopObserving(this.options.externalControl, \'mouseout\', this.mouseoutListener);\n-    }\n-  }\n-};\n-\n-Ajax.InPlaceCollectionEditor = Class.create();\n-Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);\n-Object.extend(Ajax.InPlaceCollectionEditor.prototype, {\n-  createEditField: function() {\n-    if (!this.cached_selectTag) {\n-      var selectTag = document.createElement("select");\n-      var collection = this.options.collection || [];\n-      var optionTag;\n-      collection.each(function(e,i) {\n-        optionTag = document.createElement("option");\n-        optionTag.value = (e instanceof Array) ? e[0] : e;\n-        if((typeof this.options.value == \'undefined\') && \n-          ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;\n-        if(this.options.value==optionTag.value) optionTag.selected = true;\n-        optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));\n-        selectTag.appendChild(optionTag);\n-      }.bind(this));\n-      this.cached_selectTag = selectTag;\n-    }\n-\n-    this.editField = this.cached_selectTag;\n-    if(this.options.loadTextURL) this.loadExternalText();\n-    this.form.appendChild(this.editField);\n-    this.options.callback = function(form, value) {\n-      return "value=" + encodeURIComponent(value);\n-    }\n-  }\n-});\n-\n-// Delayed observer, like Form.Element.Observer, \n-// but waits for delay after last key input\n-// Ideal for live-search fields\n-\n-Form.Element.DelayedObserver = Class.create();\n-Form.Element.DelayedObserver.prototype = {\n-  initialize: function(element, delay, callback) {\n-    this.delay     = delay || 0.5;\n-    this.element   = $(element);\n-    this.callback  = callback;\n-    this.timer     = null;\n-    this.lastValue = $F(this.element); \n-    Event.observe(this.element,\'keyup\',this.delayedListener.bindAsEventListener(this));\n-  },\n-  delayedListener: function(event) {\n-    if(this.lastValue == $F(this.element)) return;\n-    if(this.timer) clearTimeout(this.timer);\n-    this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);\n-    this.lastValue = $F(this.element);\n-  },\n-  onTimerEvent: function() {\n-    this.timer = null;\n-    this.callback(this.element, $F(this.element));\n-  }\n-};\ndiff --git a/jslib/dragdrop.js b/jslib/dragdrop.js\ndeleted file mode 100644\nindex 4b498acd0..000000000\n--- a/jslib/dragdrop.js\n+++ /dev/null\n@@ -1,962 +0,0 @@\n-// script.aculo.us dragdrop.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-//           (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)\n-// \n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-if(typeof Effect == \'undefined\')\n-  throw("dragdrop.js requires including script.aculo.us\' effects.js library");\n-\n-var Droppables = {\n-  drops: [],\n-\n-  remove: function(element) {\n-    this.drops = this.drops.reject(function(d) { return d.element==$(element) });\n-  },\n-\n-  add: function(element) {\n-    element = $(element);\n-    var options = Object.extend({\n-      greedy:     true,\n-      hoverclass: null,\n-      tree:       false\n-    }, arguments[1] || {});\n-\n-    // cache containers\n-    if(options.containment) {\n-      options._containers = [];\n-      var containment = options.containment;\n-      if((typeof containment == \'object\') && \n-        (containment.constructor == Array)) {\n-        containment.each( function(c) { options._containers.push($(c)) });\n-      } else {\n-        options._containers.push($(containment));\n-      }\n-    }\n-    \n-    if(options.accept) options.accept = [options.accept].flatten();\n-\n-    Element.makePositioned(element); // fix IE\n-    options.element = element;\n-\n-    this.drops.push(options);\n-  },\n-  \n-  findDeepestChild: function(drops) {\n-    deepest = drops[0];\n-      \n-    for (i = 1; i < drops.length; ++i)\n-      if (Element.isParent(drops[i].element, deepest.element))\n-        deepest = drops[i];\n-    \n-    return deepest;\n-  },\n-\n-  isContained: function(element, drop) {\n-    var containmentNode;\n-    if(drop.tree) {\n-      containmentNode = element.treeNode; \n-    } else {\n-      containmentNode = element.parentNode;\n-    }\n-    return drop._containers.detect(function(c) { return containmentNode == c });\n-  },\n-  \n-  isAffected: function(point, element, drop) {\n-    return (\n-      (drop.element!=element) &&\n-      ((!drop._containers) ||\n-        this.isContained(element, drop)) &&\n-      ((!drop.accept) ||\n-        (Element.classNames(element).detect( \n-          function(v) { return drop.accept.include(v) } ) )) &&\n-      Position.within(drop.element, point[0], point[1]) );\n-  },\n-\n-  deactivate: function(drop) {\n-    if(drop.hoverclass)\n-      Element.removeClassName(drop.element, drop.hoverclass);\n-    this.last_active = null;\n-  },\n-\n-  activate: function(drop) {\n-    if(drop.hoverclass)\n-      Element.addClassName(drop.element, drop.hoverclass);\n-    this.last_active = drop;\n-  },\n-\n-  show: function(point, element) {\n-    if(!this.drops.length) return;\n-    var affected = [];\n-    \n-    if(this.last_active) this.deactivate(this.last_active);\n-    this.drops.each( function(drop) {\n-      if(Droppables.isAffected(point, element, drop))\n-        affected.push(drop);\n-    });\n-        \n-    if(affected.length>0) {\n-      drop = Droppables.findDeepestChild(affected);\n-      Position.within(drop.element, point[0], point[1]);\n-      if(drop.onHover)\n-        drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));\n-      \n-      Droppables.activate(drop);\n-    }\n-  },\n-\n-  fire: function(event, element) {\n-    if(!this.last_active) return;\n-    Position.prepare();\n-\n-    if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))\n-      if (this.last_active.onDrop) {\n-        this.last_active.onDrop(element, this.last_active.element, event); \n-        return true; \n-      }\n-  },\n-\n-  reset: function() {\n-    if(this.last_active)\n-      this.deactivate(this.last_active);\n-  }\n-}\n-\n-var Draggables = {\n-  drags: [],\n-  observers: [],\n-  \n-  register: function(draggable) {\n-    if(this.drags.length == 0) {\n-      this.eventMouseUp   = this.endDrag.bindAsEventListener(this);\n-      this.eventMouseMove = this.updateDrag.bindAsEventListener(this);\n-      this.eventKeypress  = this.keyPress.bindAsEventListener(this);\n-      \n-      Event.observe(document, "mouseup", this.eventMouseUp);\n-      Event.observe(document, "mousemove", this.eventMouseMove);\n-      Event.observe(document, "keypress", this.eventKeypress);\n-    }\n-    this.drags.push(draggable);\n-  },\n-  \n-  unregister: function(draggable) {\n-    this.drags = this.drags.reject(function(d) { return d==draggable });\n-    if(this.drags.length == 0) {\n-      Event.stopObserving(document, "mouseup", this.eventMouseUp);\n-      Event.stopObserving(document, "mousemove", this.eventMouseMove);\n-      Event.stopObserving(document, "keypress", this.eventKeypress);\n-    }\n-  },\n-  \n-  activate: function(draggable) {\n-    if(draggable.options.delay) { \n-      this._timeout = setTimeout(function() { \n-        Draggables._timeout = null; \n-        window.focus(); \n-        Draggables.activeDraggable = draggable; \n-      }.bind(this), draggable.options.delay); \n-    } else {\n-      window.focus(); // allows keypress events if window isn\'t currently focused, fails for Safari\n-      this.activeDraggable = draggable;\n-    }\n-  },\n-  \n-  deactivate: function() {\n-    this.activeDraggable = null;\n-  },\n-  \n-  updateDrag: function(event) {\n-    if(!this.activeDraggable) return;\n-    var pointer = [Event.pointerX(event), Event.pointerY(event)];\n-    // Mozilla-based browsers fire successive mousemove events with\n-    // the same coordinates, prevent needless redrawing (moz bug?)\n-    if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;\n-    this._lastPointer = pointer;\n-    \n-    this.activeDraggable.updateDrag(event, pointer);\n-  },\n-  \n-  endDrag: function(event) {\n-    if(this._timeout) { \n-      clearTimeout(this._timeout); \n-      this._timeout = null; \n-    }\n-    if(!this.activeDraggable) return;\n-    this._lastPointer = null;\n-    this.activeDraggable.endDrag(event);\n-    this.activeDraggable = null;\n-  },\n-  \n-  keyPress: function(event) {\n-    if(this.activeDraggable)\n-      this.activeDraggable.keyPress(event);\n-  },\n-  \n-  addObserver: function(observer) {\n-    this.observers.push(observer);\n-    this._cacheObserverCallbacks();\n-  },\n-  \n-  removeObserver: function(element) {  // element instead of observer fixes mem leaks\n-    this.observers = this.observers.reject( function(o) { return o.element==element });\n-    this._cacheObserverCallbacks();\n-  },\n-  \n-  notify: function(eventName, draggable, event) {  // \'onStart\', \'onEnd\', \'onDrag\'\n-    if(this[eventName+\'Count\'] > 0)\n-      this.observers.each( function(o) {\n-        if(o[eventName]) o[eventName](eventName, draggable, event);\n-      });\n-    if(draggable.options[eventName]) draggable.options[eventName](draggable, event);\n-  },\n-  \n-  _cacheObserverCallbacks: function() {\n-    [\'onStart\',\'onEnd\',\'onDrag\'].each( function(eventName) {\n-      Draggables[eventName+\'Count\'] = Draggables.observers.select(\n-        function(o) { return o[eventName]; }\n-      ).length;\n-    });\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-var Draggable = Class.create();\n-Draggable._dragging    = {};\n-\n-Draggable.prototype = {\n-  initialize: function(element) {\n-    var defaults = {\n-      handle: false,\n-      reverteffect: function(element, top_offset, left_offset) {\n-        var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;\n-        new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,\n-          queue: {scope:\'_draggable\', position:\'end\'}\n-        });\n-      },\n-      endeffect: function(element) {\n-        Draggable._dragging[element] = false;\n-      },\n-      zindex: 1000,\n-      revert: false,\n-      quiet: false,\n-      scroll: false,\n-      scrollSensitivity: 20,\n-      scrollSpeed: 15,\n-      snap: false,  // false, or xy or [x,y] or function(x,y){ return [x,y] }\n-      delay: 0\n-    };\n-    \n-    if(!arguments[1] || typeof arguments[1].endeffect == \'undefined\')\n-      Object.extend(defaults, {\n-        starteffect: function(element) {\n-          Draggable._dragging[element] = true;\n-        }\n-      });\n-    \n-    var options = Object.extend(defaults, arguments[1] || {});\n-\n-    this.element = $(element);\n-    \n-    if(options.handle && (typeof options.handle == \'string\'))\n-      this.handle = this.element.down(\'.\'+options.handle, 0);\n-    \n-    if(!this.handle) this.handle = $(options.handle);\n-    if(!this.handle) this.handle = this.element;\n-    \n-    if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {\n-      options.scroll = $(options.scroll);\n-      this._isScrollChild = Element.childOf(this.element, options.scroll);\n-    }\n-\n-    Element.makePositioned(this.element); // fix IE    \n-\n-    this.delta    = this.currentDelta();\n-    this.options  = options;\n-    this.dragging = false;   \n-\n-    this.eventMouseDown = this.initDrag.bindAsEventListener(this);\n-    Event.observe(this.handle, "mousedown", this.eventMouseDown);\n-    \n-    Draggables.register(this);\n-  },\n-  \n-  destroy: function() {\n-    Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);\n-    Draggables.unregister(this);\n-  },\n-  \n-  currentDelta: function() {\n-    return([\n-      parseInt(Element.getStyle(this.element,\'left\') || \'0\'),\n-      parseInt(Element.getStyle(this.element,\'top\') || \'0\')]);\n-  },\n-  \n-  initDrag: function(event) {\n-    if(typeof Draggable._dragging[this.element] != \'undefined\' &&\n-      Draggable._dragging[this.element]) return;\n-    if(Event.isLeftClick(event)) {    \n-      // abort on form elements, fixes a Firefox issue\n-      var src = Event.element(event);\n-      if((tag_name = src.tagName.toUpperCase()) && (\n-        tag_name==\'INPUT\' ||\n-        tag_name==\'SELECT\' ||\n-        tag_name==\'OPTION\' ||\n-        tag_name==\'BUTTON\' ||\n-        tag_name==\'TEXTAREA\')) return;\n-        \n-      var pointer = [Event.pointerX(event), Event.pointerY(event)];\n-      var pos     = Position.cumulativeOffset(this.element);\n-      this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });\n-      \n-      Draggables.activate(this);\n-      Event.stop(event);\n-    }\n-  },\n-  \n-  startDrag: function(event) {\n-    this.dragging = true;\n-    \n-    if(this.options.zindex) {\n-      this.originalZ = parseInt(Element.getStyle(this.element,\'z-index\') || 0);\n-      this.element.style.zIndex = this.options.zindex;\n-    }\n-    \n-    if(this.options.ghosting) {\n-      this._clone = this.element.cloneNode(true);\n-      Position.absolutize(this.element);\n-      this.element.parentNode.insertBefore(this._clone, this.element);\n-    }\n-    \n-    if(this.options.scroll) {\n-      if (this.options.scroll == window) {\n-        var where = this._getWindowScroll(this.options.scroll);\n-        this.originalScrollLeft = where.left;\n-        this.originalScrollTop = where.top;\n-      } else {\n-        this.originalScrollLeft = this.options.scroll.scrollLeft;\n-        this.originalScrollTop = this.options.scroll.scrollTop;\n-      }\n-    }\n-    \n-    Draggables.notify(\'onStart\', this, event);\n-        \n-    if(this.options.starteffect) this.options.starteffect(this.element);\n-  },\n-  \n-  updateDrag: function(event, pointer) {\n-    if(!this.dragging) this.startDrag(event);\n-    \n-    if(!this.options.quiet){\n-      Position.prepare();\n-      Droppables.show(pointer, this.element);\n-    }\n-    \n-    Draggables.notify(\'onDrag\', this, event);\n-    \n-    this.draw(pointer);\n-    if(this.options.change) this.options.change(this);\n-    \n-    if(this.options.scroll) {\n-      this.stopScrolling();\n-      \n-      var p;\n-      if (this.options.scroll == window) {\n-        with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }\n-      } else {\n-        p = Position.page(this.options.scroll);\n-        p[0] += this.options.scroll.scrollLeft + Position.deltaX;\n-        p[1] += this.options.scroll.scrollTop + Position.deltaY;\n-        p.push(p[0]+this.options.scroll.offsetWidth);\n-        p.push(p[1]+this.options.scroll.offsetHeight);\n-      }\n-      var speed = [0,0];\n-      if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);\n-      if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);\n-      if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);\n-      if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);\n-      this.startScrolling(speed);\n-    }\n-    \n-    // fix AppleWebKit rendering\n-    if(Prototype.Browser.WebKit) window.scrollBy(0,0);\n-    \n-    Event.stop(event);\n-  },\n-  \n-  finishDrag: function(event, success) {\n-    this.dragging = false;\n-    \n-    if(this.options.quiet){\n-      Position.prepare();\n-      var pointer = [Event.pointerX(event), Event.pointerY(event)];\n-      Droppables.show(pointer, this.element);\n-    }\n-\n-    if(this.options.ghosting) {\n-      Position.relativize(this.element);\n-      Element.remove(this._clone);\n-      this._clone = null;\n-    }\n-\n-    var dropped = false; \n-    if(success) { \n-      dropped = Droppables.fire(event, this.element); \n-      if (!dropped) dropped = false; \n-    }\n-    if(dropped && this.options.onDropped) this.options.onDropped(this.element);\n-    Draggables.notify(\'onEnd\', this, event);\n-\n-    var revert = this.options.revert;\n-    if(revert && typeof revert == \'function\') revert = revert(this.element);\n-    \n-    var d = this.currentDelta();\n-    if(revert && this.options.reverteffect) {\n-      if (dropped == 0 || revert != \'failure\')\n-        this.options.reverteffect(this.element,\n-          d[1]-this.delta[1], d[0]-this.delta[0]);\n-    } else {\n-      this.delta = d;\n-    }\n-\n-    if(this.options.zindex)\n-      this.element.style.zIndex = this.originalZ;\n-\n-    if(this.options.endeffect) \n-      this.options.endeffect(this.element);\n-      \n-    Draggables.deactivate(this);\n-    Droppables.reset();\n-  },\n-  \n-  keyPress: function(event) {\n-    if(event.keyCode!=Event.KEY_ESC) return;\n-    this.finishDrag(event, false);\n-    Event.stop(event);\n-  },\n-  \n-  endDrag: function(event) {\n-    if(!this.dragging) return;\n-    this.stopScrolling();\n-    this.finishDrag(event, true);\n-    Event.stop(event);\n-  },\n-  \n-  draw: function(point) {\n-    var pos = Position.cumulativeOffset(this.element);\n-    if(this.options.ghosting) {\n-      var r   = Position.realOffset(this.element);\n-      pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;\n-    }\n-    \n-    var d = this.currentDelta();\n-    pos[0] -= d[0]; pos[1] -= d[1];\n-    \n-    if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {\n-      pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;\n-      pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;\n-    }\n-    \n-    var p = [0,1].map(function(i){ \n-      return (point[i]-pos[i]-this.offset[i]) \n-    }.bind(this));\n-    \n-    if(this.options.snap) {\n-      if(typeof this.options.snap == \'function\') {\n-        p = this.options.snap(p[0],p[1],this);\n-      } else {\n-      if(this.options.snap instanceof Array) {\n-        p = p.map( function(v, i) {\n-          return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))\n-      } else {\n-        p = p.map( function(v) {\n-          return Math.round(v/this.options.snap)*this.options.snap }.bind(this))\n-      }\n-    }}\n-    \n-    var style = this.element.style;\n-    if((!this.options.constraint) || (this.options.constraint==\'horizontal\'))\n-      style.left = p[0] + "px";\n-    if((!this.options.constraint) || (this.options.constraint==\'vertical\'))\n-      style.top  = p[1] + "px";\n-    \n-    if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering\n-  },\n-  \n-  stopScrolling: function() {\n-    if(this.scrollInterval) {\n-      clearInterval(this.scrollInterval);\n-      this.scrollInterval = null;\n-      Draggables._lastScrollPointer = null;\n-    }\n-  },\n-  \n-  startScrolling: function(speed) {\n-    if(!(speed[0] || speed[1])) return;\n-    this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];\n-    this.lastScrolled = new Date();\n-    this.scrollInterval = setInterval(this.scroll.bind(this), 10);\n-  },\n-  \n-  scroll: function() {\n-    var current = new Date();\n-    var delta = current - this.lastScrolled;\n-    this.lastScrolled = current;\n-    if(this.options.scroll == window) {\n-      with (this._getWindowScroll(this.options.scroll)) {\n-        if (this.scrollSpeed[0] || this.scrollSpeed[1]) {\n-          var d = delta / 1000;\n-          this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );\n-        }\n-      }\n-    } else {\n-      this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;\n-      this.options.scroll.scrollTop  += this.scrollSpeed[1] * delta / 1000;\n-    }\n-    \n-    Position.prepare();\n-    Droppables.show(Draggables._lastPointer, this.element);\n-    Draggables.notify(\'onDrag\', this);\n-    if (this._isScrollChild) {\n-      Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);\n-      Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;\n-      Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;\n-      if (Draggables._lastScrollPointer[0] < 0)\n-        Draggables._lastScrollPointer[0] = 0;\n-      if (Draggables._lastScrollPointer[1] < 0)\n-        Draggables._lastScrollPointer[1] = 0;\n-      this.draw(Draggables._lastScrollPointer);\n-    }\n-    \n-    if(this.options.change) this.options.change(this);\n-  },\n-  \n-  _getWindowScroll: function(w) {\n-    var T, L, W, H;\n-    with (w.document) {\n-      if (w.document.documentElement && documentElement.scrollTop) {\n-        T = documentElement.scrollTop;\n-        L = documentElement.scrollLeft;\n-      } else if (w.document.body) {\n-        T = body.scrollTop;\n-        L = body.scrollLeft;\n-      }\n-      if (w.innerWidth) {\n-        W = w.innerWidth;\n-        H = w.innerHeight;\n-      } else if (w.document.documentElement && documentElement.clientWidth) {\n-        W = documentElement.clientWidth;\n-        H = documentElement.clientHeight;\n-      } else {\n-        W = body.offsetWidth;\n-        H = body.offsetHeight\n-      }\n-    }\n-    return { top: T, left: L, width: W, height: H };\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-var SortableObserver = Class.create();\n-SortableObserver.prototype = {\n-  initialize: function(element, observer) {\n-    this.element   = $(element);\n-    this.observer  = observer;\n-    this.lastValue = Sortable.serialize(this.element);\n-  },\n-  \n-  onStart: function() {\n-    this.lastValue = Sortable.serialize(this.element);\n-  },\n-  \n-  onEnd: function() {\n-    Sortable.unmark();\n-    if(this.lastValue != Sortable.serialize(this.element))\n-      this.observer(this.element)\n-  }\n-}\n-\n-var Sortable = {\n-  SERIALIZE_RULE: /^[^_\\-](?:[A-Za-z0-9\\-\\_]*)[_](.*)$/,\n-  \n-  sortables: {},\n-  \n-  _findRootElement: function(element) {\n-    while (element.tagName.toUpperCase() != "BODY") {  \n-      if(element.id && Sortable.sortables[element.id]) return element;\n-      element = element.parentNode;\n-    }\n-  },\n-\n-  options: function(element) {\n-    element = Sortable._findRootElement($(element));\n-    if(!element) return;\n-    return Sortable.sortables[element.id];\n-  },\n-  \n-  destroy: function(element){\n-    var s = Sortable.options(element);\n-    \n-    if(s) {\n-      Draggables.removeObserver(s.element);\n-      s.droppables.each(function(d){ Droppables.remove(d) });\n-      s.draggables.invoke(\'destroy\');\n-      \n-      delete Sortable.sortables[s.element.id];\n-    }\n-  },\n-\n-  create: function(element) {\n-    element = $(element);\n-    var options = Object.extend({ \n-      element:     element,\n-      tag:         \'li\',       // assumes li children, override with tag: \'tagname\'\n-      dropOnEmpty: false,\n-      tree:        false,\n-      treeTag:     \'ul\',\n-      overlap:     \'vertical\', // one of \'vertical\', \'horizontal\'\n-      constraint:  \'vertical\', // one of \'vertical\', \'horizontal\', false\n-      containment: element,    // also takes array of elements (or id\'s); or false\n-      handle:      false,      // or a CSS class\n-      only:        false,\n-      delay:       0,\n-      hoverclass:  null,\n-      ghosting:    false,\n-      quiet:       false, \n-      scroll:      false,\n-      scrollSensitivity: 20,\n-      scrollSpeed: 15,\n-      format:      this.SERIALIZE_RULE,\n-      \n-      // these take arrays of elements or ids and can be \n-      // used for better initialization performance\n-      elements:    false,\n-      handles:     false,\n-      \n-      onChange:    Prototype.emptyFunction,\n-      onUpdate:    Prototype.emptyFunction\n-    }, arguments[1] || {});\n-\n-    // clear any old sortable with same element\n-    this.destroy(element);\n-\n-    // build options for the draggables\n-    var options_for_draggable = {\n-      revert:      true,\n-      quiet:       options.quiet,\n-      scroll:      options.scroll,\n-      scrollSpeed: options.scrollSpeed,\n-      scrollSensitivity: options.scrollSensitivity,\n-      delay:       options.delay,\n-      ghosting:    options.ghosting,\n-      constraint:  options.constraint,\n-      handle:      options.handle };\n-\n-    if(options.starteffect)\n-      options_for_draggable.starteffect = options.starteffect;\n-\n-    if(options.reverteffect)\n-      options_for_draggable.reverteffect = options.reverteffect;\n-    else\n-      if(options.ghosting) options_for_draggable.reverteffect = function(element) {\n-        element.style.top  = 0;\n-        element.style.left = 0;\n-      };\n-\n-    if(options.endeffect)\n-      options_for_draggable.endeffect = options.endeffect;\n-\n-    if(options.zindex)\n-      options_for_draggable.zindex = options.zindex;\n-\n-    // build options for the droppables  \n-    var options_for_droppable = {\n-      overlap:     options.overlap,\n-      containment: options.containment,\n-      tree:        options.tree,\n-      hoverclass:  options.hoverclass,\n-      onHover:     Sortable.onHover\n-    }\n-    \n-    var options_for_tree = {\n-      onHover:      Sortable.onEmptyHover,\n-      overlap:      options.overlap,\n-      containment:  options.containment,\n-      hoverclass:   options.hoverclass\n-    }\n-\n-    // fix for gecko engine\n-    Element.cleanWhitespace(element); \n-\n-    options.draggables = [];\n-    options.droppables = [];\n-\n-    // drop on empty handling\n-    if(options.dropOnEmpty || options.tree) {\n-      Droppables.add(element, options_for_tree);\n-      options.droppables.push(element);\n-    }\n-\n-    (options.elements || this.findElements(element, options) || []).each( function(e,i) {\n-      var handle = options.handles ? $(options.handles[i]) :\n-        (options.handle ? $(e).getElementsByClassName(options.handle)[0] : e); \n-      options.draggables.push(\n-        new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));\n-      Droppables.add(e, options_for_droppable);\n-      if(options.tree) e.treeNode = element;\n-      options.droppables.push(e);      \n-    });\n-    \n-    if(options.tree) {\n-      (Sortable.findTreeElements(element, options) || []).each( function(e) {\n-        Droppables.add(e, options_for_tree);\n-        e.treeNode = element;\n-        options.droppables.push(e);\n-      });\n-    }\n-\n-    // keep reference\n-    this.sortables[element.id] = options;\n-\n-    // for onupdate\n-    Draggables.addObserver(new SortableObserver(element, options.onUpdate));\n-\n-  },\n-\n-  // return all suitable-for-sortable elements in a guaranteed order\n-  findElements: function(element, options) {\n-    return Element.findChildren(\n-      element, options.only, options.tree ? true : false, options.tag);\n-  },\n-  \n-  findTreeElements: function(element, options) {\n-    return Element.findChildren(\n-      element, options.only, options.tree ? true : false, options.treeTag);\n-  },\n-\n-  onHover: function(element, dropon, overlap) {\n-    if(Element.isParent(dropon, element)) return;\n-\n-    if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {\n-      return;\n-    } else if(overlap>0.5) {\n-      Sortable.mark(dropon, \'before\');\n-      if(dropon.previousSibling != element) {\n-        var oldParentNode = element.parentNode;\n-        element.style.visibility = "hidden"; // fix gecko rendering\n-        dropon.parentNode.insertBefore(element, dropon);\n-        if(dropon.parentNode!=oldParentNode) \n-          Sortable.options(oldParentNode).onChange(element);\n-        Sortable.options(dropon.parentNode).onChange(element);\n-      }\n-    } else {\n-      Sortable.mark(dropon, \'after\');\n-      var nextElement = dropon.nextSibling || null;\n-      if(nextElement != element) {\n-        var oldParentNode = element.parentNode;\n-        element.style.visibility = "hidden"; // fix gecko rendering\n-        dropon.parentNode.insertBefore(element, nextElement);\n-        if(dropon.parentNode!=oldParentNode) \n-          Sortable.options(oldParentNode).onChange(element);\n-        Sortable.options(dropon.parentNode).onChange(element);\n-      }\n-    }\n-  },\n-  \n-  onEmptyHover: function(element, dropon, overlap) {\n-    var oldParentNode = element.parentNode;\n-    var droponOptions = Sortable.options(dropon);\n-        \n-    if(!Element.isParent(dropon, element)) {\n-      var index;\n-      \n-      var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});\n-      var child = null;\n-            \n-      if(children) {\n-        var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);\n-        \n-        for (index = 0; index < children.length; index += 1) {\n-          if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {\n-            offset -= Element.offsetSize (children[index], droponOptions.overlap);\n-          } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {\n-            child = index + 1 < children.length ? children[index + 1] : null;\n-            break;\n-          } else {\n-            child = children[index];\n-            break;\n-          }\n-        }\n-      }\n-      \n-      dropon.insertBefore(element, child);\n-      \n-      Sortable.options(oldParentNode).onChange(element);\n-      droponOptions.onChange(element);\n-    }\n-  },\n-\n-  unmark: function() {\n-    if(Sortable._marker) Sortable._marker.hide();\n-  },\n-\n-  mark: function(dropon, position) {\n-    // mark on ghosting only\n-    var sortable = Sortable.options(dropon.parentNode);\n-    if(sortable && !sortable.ghosting) return; \n-\n-    if(!Sortable._marker) {\n-      Sortable._marker = \n-        ($(\'dropmarker\') || Element.extend(document.createElement(\'DIV\'))).\n-          hide().addClassName(\'dropmarker\').setStyle({position:\'absolute\'});\n-      document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);\n-    }    \n-    var offsets = Position.cumulativeOffset(dropon);\n-    Sortable._marker.setStyle({left: offsets[0]+\'px\', top: offsets[1] + \'px\'});\n-    \n-    if(position==\'after\')\n-      if(sortable.overlap == \'horizontal\') \n-        Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + \'px\'});\n-      else\n-        Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + \'px\'});\n-    \n-    Sortable._marker.show();\n-  },\n-  \n-  _tree: function(element, options, parent) {\n-    var children = Sortable.findElements(element, options) || [];\n-  \n-    for (var i = 0; i < children.length; ++i) {\n-      var match = children[i].id.match(options.format);\n-\n-      if (!match) continue;\n-      \n-      var child = {\n-        id: encodeURIComponent(match ? match[1] : null),\n-        element: element,\n-        parent: parent,\n-        children: [],\n-        position: parent.children.length,\n-        container: $(children[i]).down(options.treeTag)\n-      }\n-      \n-      /* Get the element containing the children and recurse over it */\n-      if (child.container)\n-        this._tree(child.container, options, child)\n-      \n-      parent.children.push (child);\n-    }\n-\n-    return parent; \n-  },\n-\n-  tree: function(element) {\n-    element = $(element);\n-    var sortableOptions = this.options(element);\n-    var options = Object.extend({\n-      tag: sortableOptions.tag,\n-      treeTag: sortableOptions.treeTag,\n-      only: sortableOptions.only,\n-      name: element.id,\n-      format: sortableOptions.format\n-    }, arguments[1] || {});\n-    \n-    var root = {\n-      id: null,\n-      parent: null,\n-      children: [],\n-      container: element,\n-      position: 0\n-    }\n-    \n-    return Sortable._tree(element, options, root);\n-  },\n-\n-  /* Construct a [i] index for a particular node */\n-  _constructIndex: function(node) {\n-    var index = \'\';\n-    do {\n-      if (node.id) index = \'[\' + node.position + \']\' + index;\n-    } while ((node = node.parent) != null);\n-    return index;\n-  },\n-\n-  sequence: function(element) {\n-    element = $(element);\n-    var options = Object.extend(this.options(element), arguments[1] || {});\n-    \n-    return $(this.findElements(element, options) || []).map( function(item) {\n-      return item.id.match(options.format) ? item.id.match(options.format)[1] : \'\';\n-    });\n-  },\n-\n-  setSequence: function(element, new_sequence) {\n-    element = $(element);\n-    var options = Object.extend(this.options(element), arguments[2] || {});\n-    \n-    var nodeMap = {};\n-    this.findElements(element, options).each( function(n) {\n-        if (n.id.match(options.format))\n-            nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];\n-        n.parentNode.removeChild(n);\n-    });\n-   \n-    new_sequence.each(function(ident) {\n-      var n = nodeMap[ident];\n-      if (n) {\n-        n[1].appendChild(n[0]);\n-        delete nodeMap[ident];\n-      }\n-    });\n-  },\n-  \n-  serialize: function(element) {\n-    element = $(element);\n-    var options = Object.extend(Sortable.options(element), arguments[1] || {});\n-    var name = encodeURIComponent(\n-      (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);\n-    \n-    if (options.tree) {\n-      return Sortable.tree(element, arguments[1]).children.map( function (item) {\n-        return [name + Sortable._constructIndex(item) + "[id]=" + \n-                encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));\n-      }).flatten().join(\'&\');\n-    } else {\n-      return Sortable.sequence(element, arguments[1]).map( function(item) {\n-        return name + "[]=" + encodeURIComponent(item);\n-      }).join(\'&\');\n-    }\n-  }\n-}\n-\n-// Returns true if child is contained within element\n-Element.isParent = function(child, element) {\n-  if (!child.parentNode || child == element) return false;\n-  if (child.parentNode == element) return true;\n-  return Element.isParent(child.parentNode, element);\n-}\n-\n-Element.findChildren = function(element, only, recursive, tagName) {   \n-  if(!element.hasChildNodes()) return null;\n-  tagName = tagName.toUpperCase();\n-  if(only) only = [only].flatten();\n-  var elements = [];\n-  $A(element.childNodes).each( function(e) {\n-    if(e.tagName && e.tagName.toUpperCase()==tagName &&\n-      (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))\n-        elements.push(e);\n-    if(recursive) {\n-      var grandchildren = Element.findChildren(e, only, recursive, tagName);\n-      if(grandchildren) elements.push(grandchildren);\n-    }\n-  });\n-\n-  return (elements.length>0 ? elements.flatten() : []);\n-}\n-\n-Element.offsetSize = function (element, type) {\n-  return element[\'offset\' + ((type==\'vertical\' || type==\'height\') ? \'Height\' : \'Width\')];\n-}\ndiff --git a/jslib/effects.js b/jslib/effects.js\ndeleted file mode 100644\nindex 70d07526c..000000000\n--- a/jslib/effects.js\n+++ /dev/null\n@@ -1,1094 +0,0 @@\n-// script.aculo.us effects.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-// Contributors:\n-//  Justin Palmer (http://encytemedia.com/)\n-//  Mark Pilgrim (http://diveintomark.org/)\n-//  Martin Bialasinki\n-// \n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/ \n-\n-// converts rgb() and #xxx to #xxxxxx format,  \n-// returns self (or first argument) if not convertable  \n-String.prototype.parseColor = function() {  \n-  var color = \'#\';\n-  if(this.slice(0,4) == \'rgb(\') {  \n-    var cols = this.slice(4,this.length-1).split(\',\');  \n-    var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);  \n-  } else {  \n-    if(this.slice(0,1) == \'#\') {  \n-      if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();  \n-      if(this.length==7) color = this.toLowerCase();  \n-    }  \n-  }  \n-  return(color.length==7 ? color : (arguments[0] || this));  \n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Element.collectTextNodes = function(element) {  \n-  return $A($(element).childNodes).collect( function(node) {\n-    return (node.nodeType==3 ? node.nodeValue : \n-      (node.hasChildNodes() ? Element.collectTextNodes(node) : \'\'));\n-  }).flatten().join(\'\');\n-}\n-\n-Element.collectTextNodesIgnoreClass = function(element, className) {  \n-  return $A($(element).childNodes).collect( function(node) {\n-    return (node.nodeType==3 ? node.nodeValue : \n-      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? \n-        Element.collectTextNodesIgnoreClass(node, className) : \'\'));\n-  }).flatten().join(\'\');\n-}\n-\n-Element.setContentZoom = function(element, percent) {\n-  element = $(element);  \n-  element.setStyle({fontSize: (percent/100) + \'em\'});   \n-  if(Prototype.Browser.WebKit) window.scrollBy(0,0);\n-  return element;\n-}\n-\n-Element.getInlineOpacity = function(element){\n-  return $(element).style.opacity || \'\';\n-}\n-\n-Element.forceRerendering = function(element) {\n-  try {\n-    element = $(element);\n-    var n = document.createTextNode(\' \');\n-    element.appendChild(n);\n-    element.removeChild(n);\n-  } catch(e) { }\n-};\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Array.prototype.call = function() {\n-  var args = arguments;\n-  this.each(function(f){ f.apply(this, args) });\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-var Effect = {\n-  _elementDoesNotExistError: {\n-    name: \'ElementDoesNotExistError\',\n-    message: \'The specified DOM element does not exist, but is required for this effect to operate\'\n-  },\n-  tagifyText: function(element) {\n-    if(typeof Builder == \'undefined\')\n-      throw("Effect.tagifyText requires including script.aculo.us\' builder.js library");\n-      \n-    var tagifyStyle = \'position:relative\';\n-    if(Prototype.Browser.IE) tagifyStyle += \';zoom:1\';\n-    \n-    element = $(element);\n-    $A(element.childNodes).each( function(child) {\n-      if(child.nodeType==3) {\n-        child.nodeValue.toArray().each( function(character) {\n-          element.insertBefore(\n-            Builder.node(\'span\',{style: tagifyStyle},\n-              character == \' \' ? String.fromCharCode(160) : character), \n-              child);\n-        });\n-        Element.remove(child);\n-      }\n-    });\n-  },\n-  multiple: function(element, effect) {\n-    var elements;\n-    if(((typeof element == \'object\') || \n-        (typeof element == \'function\')) && \n-       (element.length))\n-      elements = element;\n-    else\n-      elements = $(element).childNodes;\n-      \n-    var options = Object.extend({\n-      speed: 0.1,\n-      delay: 0.0\n-    }, arguments[2] || {});\n-    var masterDelay = options.delay;\n-\n-    $A(elements).each( function(element, index) {\n-      new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));\n-    });\n-  },\n-  PAIRS: {\n-    \'slide\':  [\'SlideDown\',\'SlideUp\'],\n-    \'blind\':  [\'BlindDown\',\'BlindUp\'],\n-    \'appear\': [\'Appear\',\'Fade\']\n-  },\n-  toggle: function(element, effect) {\n-    element = $(element);\n-    effect = (effect || \'appear\').toLowerCase();\n-    var options = Object.extend({\n-      queue: { position:\'end\', scope:(element.id || \'global\'), limit: 1 }\n-    }, arguments[2] || {});\n-    Effect[element.visible() ? \n-      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);\n-  }\n-};\n-\n-var Effect2 = Effect; // deprecated\n-\n-/* ------------- transitions ------------- */\n-\n-Effect.Transitions = {\n-  linear: Prototype.K,\n-  sinoidal: function(pos) {\n-    return (-Math.cos(pos*Math.PI)/2) + 0.5;\n-  },\n-  reverse: function(pos) {\n-    return 1-pos;\n-  },\n-  flicker: function(pos) {\n-    var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;\n-    return (pos > 1 ? 1 : pos);\n-  },\n-  wobble: function(pos) {\n-    return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;\n-  },\n-  pulse: function(pos, pulses) { \n-    pulses = pulses || 5; \n-    return (\n-      Math.round((pos % (1/pulses)) * pulses) == 0 ? \n-            ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : \n-        1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2))\n-      );\n-  },\n-  none: function(pos) {\n-    return 0;\n-  },\n-  full: function(pos) {\n-    return 1;\n-  }\n-};\n-\n-/* ------------- core effects ------------- */\n-\n-Effect.ScopedQueue = Class.create();\n-Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {\n-  initialize: function() {\n-    this.effects  = [];\n-    this.interval = null;    \n-  },\n-  _each: function(iterator) {\n-    this.effects._each(iterator);\n-  },\n-  add: function(effect) {\n-    var timestamp = new Date().getTime();\n-    \n-    var position = (typeof effect.options.queue == \'string\') ? \n-      effect.options.queue : effect.options.queue.position;\n-    \n-    switch(position) {\n-      case \'front\':\n-        // move unstarted effects after this effect  \n-        this.effects.findAll(function(e){ return e.state==\'idle\' }).each( function(e) {\n-            e.startOn  += effect.finishOn;\n-            e.finishOn += effect.finishOn;\n-          });\n-        break;\n-      case \'with-last\':\n-        timestamp = this.effects.pluck(\'startOn\').max() || timestamp;\n-        break;\n-      case \'end\':\n-        // start effect after last queued effect has finished\n-        timestamp = this.effects.pluck(\'finishOn\').max() || timestamp;\n-        break;\n-    }\n-    \n-    effect.startOn  += timestamp;\n-    effect.finishOn += timestamp;\n-\n-    if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))\n-      this.effects.push(effect);\n-    \n-    if(!this.interval)\n-      this.interval = setInterval(this.loop.bind(this), 15);\n-  },\n-  remove: function(effect) {\n-    this.effects = this.effects.reject(function(e) { return e==effect });\n-    if(this.effects.length == 0) {\n-      clearInterval(this.interval);\n-      this.interval = null;\n-    }\n-  },\n-  loop: function() {\n-    var timePos = new Date().getTime();\n-    for(var i=0, len=this.effects.length;i<len;i++) \n-      this.effects[i] && this.effects[i].loop(timePos);\n-  }\n-});\n-\n-Effect.Queues = {\n-  instances: $H(),\n-  get: function(queueName) {\n-    if(typeof queueName != \'string\') return queueName;\n-    \n-    if(!this.instances[queueName])\n-      this.instances[queueName] = new Effect.ScopedQueue();\n-      \n-    return this.instances[queueName];\n-  }\n-}\n-Effect.Queue = Effect.Queues.get(\'global\');\n-\n-Effect.DefaultOptions = {\n-  transition: Effect.Transitions.sinoidal,\n-  duration:   1.0,   // seconds\n-  fps:        100,   // 100= assume 66fps max.\n-  sync:       false, // true for combining\n-  from:       0.0,\n-  to:         1.0,\n-  delay:      0.0,\n-  queue:      \'parallel\'\n-}\n-\n-Effect.Base = function() {};\n-Effect.Base.prototype = {\n-  position: null,\n-  start: function(options) {\n-    function codeForEvent(options,eventName){\n-      return (\n-        (options[eventName+\'Internal\'] ? \'this.options.\'+eventName+\'Internal(this);\' : \'\') +\n-        (options[eventName] ? \'this.options.\'+eventName+\'(this);\' : \'\')\n-      );\n-    }\n-    if(options.transition === false) options.transition = Effect.Transitions.linear;\n-    this.options      = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});\n-    this.currentFrame = 0;\n-    this.state        = \'idle\';\n-    this.startOn      = this.options.delay*1000;\n-    this.finishOn     = this.startOn+(this.options.duration*1000);\n-    this.fromToDelta  = this.options.to-this.options.from;\n-    this.totalTime    = this.finishOn-this.startOn;\n-    this.totalFrames  = this.options.fps*this.options.duration;\n-    \n-    eval(\'this.render = function(pos){ \'+\n-      \'if(this.state=="idle"){this.state="running";\'+\n-      codeForEvent(options,\'beforeSetup\')+\n-      (this.setup ? \'this.setup();\':\'\')+ \n-      codeForEvent(options,\'afterSetup\')+\n-      \'};if(this.state=="running"){\'+\n-      \'pos=this.options.transition(pos)*\'+this.fromToDelta+\'+\'+this.options.from+\';\'+\n-      \'this.position=pos;\'+\n-      codeForEvent(options,\'beforeUpdate\')+\n-      (this.update ? \'this.update(pos);\':\'\')+\n-      codeForEvent(options,\'afterUpdate\')+\n-      \'}}\');\n-    \n-    this.event(\'beforeStart\');\n-    if(!this.options.sync)\n-      Effect.Queues.get(typeof this.options.queue == \'string\' ? \n-        \'global\' : this.options.queue.scope).add(this);\n-  },\n-  loop: function(timePos) {\n-    if(timePos >= this.startOn) {\n-      if(timePos >= this.finishOn) {\n-        this.render(1.0);\n-        this.cancel();\n-        this.event(\'beforeFinish\');\n-        if(this.finish) this.finish(); \n-        this.event(\'afterFinish\');\n-        return;  \n-      }\n-      var pos   = (timePos - this.startOn) / this.totalTime,\n-          frame = Math.round(pos * this.totalFrames);\n-      if(frame > this.currentFrame) {\n-        this.render(pos);\n-        this.currentFrame = frame;\n-      }\n-    }\n-  },\n-  cancel: function() {\n-    if(!this.options.sync)\n-      Effect.Queues.get(typeof this.options.queue == \'string\' ? \n-        \'global\' : this.options.queue.scope).remove(this);\n-    this.state = \'finished\';\n-  },\n-  event: function(eventName) {\n-    if(this.options[eventName + \'Internal\']) this.options[eventName + \'Internal\'](this);\n-    if(this.options[eventName]) this.options[eventName](this);\n-  },\n-  inspect: function() {\n-    var data = $H();\n-    for(property in this)\n-      if(typeof this[property] != \'function\') data[property] = this[property];\n-    return \'#<Effect:\' + data.inspect() + \',options:\' + $H(this.options).inspect() + \'>\';\n-  }\n-}\n-\n-Effect.Parallel = Class.create();\n-Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {\n-  initialize: function(effects) {\n-    this.effects = effects || [];\n-    this.start(arguments[1]);\n-  },\n-  update: function(position) {\n-    this.effects.invoke(\'render\', position);\n-  },\n-  finish: function(position) {\n-    this.effects.each( function(effect) {\n-      effect.render(1.0);\n-      effect.cancel();\n-      effect.event(\'beforeFinish\');\n-      if(effect.finish) effect.finish(position);\n-      effect.event(\'afterFinish\');\n-    });\n-  }\n-});\n-\n-Effect.Event = Class.create();\n-Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), {\n-  initialize: function() {\n-    var options = Object.extend({\n-      duration: 0\n-    }, arguments[0] || {});\n-    this.start(options);\n-  },\n-  update: Prototype.emptyFunction\n-});\n-\n-Effect.Opacity = Class.create();\n-Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {\n-  initialize: function(element) {\n-    this.element = $(element);\n-    if(!this.element) throw(Effect._elementDoesNotExistError);\n-    // make this work on IE on elements without \'layout\'\n-    if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))\n-      this.element.setStyle({zoom: 1});\n-    var options = Object.extend({\n-      from: this.element.getOpacity() || 0.0,\n-      to:   1.0\n-    }, arguments[1] || {});\n-    this.start(options);\n-  },\n-  update: function(position) {\n-    this.element.setOpacity(position);\n-  }\n-});\n-\n-Effect.Move = Class.create();\n-Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {\n-  initialize: function(element) {\n-    this.element = $(element);\n-    if(!this.element) throw(Effect._elementDoesNotExistError);\n-    var options = Object.extend({\n-      x:    0,\n-      y:    0,\n-      mode: \'relative\'\n-    }, arguments[1] || {});\n-    this.start(options);\n-  },\n-  setup: function() {\n-    // Bug in Opera: Opera returns the "real" position of a static element or\n-    // relative element that does not have top/left explicitly set.\n-    // ==> Always set top and left for position relative elements in your stylesheets \n-    // (to 0 if you do not need them) \n-    this.element.makePositioned();\n-    this.originalLeft = parseFloat(this.element.getStyle(\'left\') || \'0\');\n-    this.originalTop  = parseFloat(this.element.getStyle(\'top\')  || \'0\');\n-    if(this.options.mode == \'absolute\') {\n-      // absolute movement, so we need to calc deltaX and deltaY\n-      this.options.x = this.options.x - this.originalLeft;\n-      this.options.y = this.options.y - this.originalTop;\n-    }\n-  },\n-  update: function(position) {\n-    this.element.setStyle({\n-      left: Math.round(this.options.x  * position + this.originalLeft) + \'px\',\n-      top:  Math.round(this.options.y  * position + this.originalTop)  + \'px\'\n-    });\n-  }\n-});\n-\n-// for backwards compatibility\n-Effect.MoveBy = function(element, toTop, toLeft) {\n-  return new Effect.Move(element, \n-    Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));\n-};\n-\n-Effect.Scale = Class.create();\n-Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {\n-  initialize: function(element, percent) {\n-    this.element = $(element);\n-    if(!this.element) throw(Effect._elementDoesNotExistError);\n-    var options = Object.extend({\n-      scaleX: true,\n-      scaleY: true,\n-      scaleContent: true,\n-      scaleFromCenter: false,\n-      scaleMode: \'box\',        // \'box\' or \'contents\' or {} with provided values\n-      scaleFrom: 100.0,\n-      scaleTo:   percent\n-    }, arguments[2] || {});\n-    this.start(options);\n-  },\n-  setup: function() {\n-    this.restoreAfterFinish = this.options.restoreAfterFinish || false;\n-    this.elementPositioning = this.element.getStyle(\'position\');\n-    \n-    this.originalStyle = {};\n-    [\'top\',\'left\',\'width\',\'height\',\'fontSize\'].each( function(k) {\n-      this.originalStyle[k] = this.element.style[k];\n-    }.bind(this));\n-      \n-    this.originalTop  = this.element.offsetTop;\n-    this.originalLeft = this.element.offsetLeft;\n-    \n-    var fontSize = this.element.getStyle(\'font-size\') || \'100%\';\n-    [\'em\',\'px\',\'%\',\'pt\'].each( function(fontSizeType) {\n-      if(fontSize.indexOf(fontSizeType)>0) {\n-        this.fontSize     = parseFloat(fontSize);\n-        this.fontSizeType = fontSizeType;\n-      }\n-    }.bind(this));\n-    \n-    this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;\n-    \n-    this.dims = null;\n-    if(this.options.scaleMode==\'box\')\n-      this.dims = [this.element.offsetHeight, this.element.offsetWidth];\n-    if(/^content/.test(this.options.scaleMode))\n-      this.dims = [this.element.scrollHeight, this.element.scrollWidth];\n-    if(!this.dims)\n-      this.dims = [this.options.scaleMode.originalHeight,\n-                   this.options.scaleMode.originalWidth];\n-  },\n-  update: function(position) {\n-    var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);\n-    if(this.options.scaleContent && this.fontSize)\n-      this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });\n-    this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);\n-  },\n-  finish: function(position) {\n-    if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);\n-  },\n-  setDimensions: function(height, width) {\n-    var d = {};\n-    if(this.options.scaleX) d.width = Math.round(width) + \'px\';\n-    if(this.options.scaleY) d.height = Math.round(height) + \'px\';\n-    if(this.options.scaleFromCenter) {\n-      var topd  = (height - this.dims[0])/2;\n-      var leftd = (width  - this.dims[1])/2;\n-      if(this.elementPositioning == \'absolute\') {\n-        if(this.options.scaleY) d.top = this.originalTop-topd + \'px\';\n-        if(this.options.scaleX) d.left = this.originalLeft-leftd + \'px\';\n-      } else {\n-        if(this.options.scaleY) d.top = -topd + \'px\';\n-        if(this.options.scaleX) d.left = -leftd + \'px\';\n-      }\n-    }\n-    this.element.setStyle(d);\n-  }\n-});\n-\n-Effect.Highlight = Class.create();\n-Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {\n-  initialize: function(element) {\n-    this.element = $(element);\n-    if(!this.element) throw(Effect._elementDoesNotExistError);\n-    var options = Object.extend({ startcolor: \'#ffff99\' }, arguments[1] || {});\n-    this.start(options);\n-  },\n-  setup: function() {\n-    // Prevent executing on elements not in the layout flow\n-    if(this.element.getStyle(\'display\')==\'none\') { this.cancel(); return; }\n-    // Disable background image during the effect\n-    this.oldStyle = {};\n-    if (!this.options.keepBackgroundImage) {\n-      this.oldStyle.backgroundImage = this.element.getStyle(\'background-image\');\n-      this.element.setStyle({backgroundImage: \'none\'});\n-    }\n-    if(!this.options.endcolor)\n-      this.options.endcolor = this.element.getStyle(\'background-color\').parseColor(\'#ffffff\');\n-    if(!this.options.restorecolor)\n-      this.options.restorecolor = this.element.getStyle(\'background-color\');\n-    // init color calculations\n-    this._base  = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));\n-    this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));\n-  },\n-  update: function(position) {\n-    this.element.setStyle({backgroundColor: $R(0,2).inject(\'#\',function(m,v,i){\n-      return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });\n-  },\n-  finish: function() {\n-    this.element.setStyle(Object.extend(this.oldStyle, {\n-      backgroundColor: this.options.restorecolor\n-    }));\n-  }\n-});\n-\n-Effect.ScrollTo = Class.create();\n-Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {\n-  initialize: function(element) {\n-    this.element = $(element);\n-    this.start(arguments[1] || {});\n-  },\n-  setup: function() {\n-    Position.prepare();\n-    var offsets = Position.cumulativeOffset(this.element);\n-    if(this.options.offset) offsets[1] += this.options.offset;\n-    var max = window.innerHeight ? \n-      window.height - window.innerHeight :\n-      document.body.scrollHeight - \n-        (document.documentElement.clientHeight ? \n-          document.documentElement.clientHeight : document.body.clientHeight);\n-    this.scrollStart = Position.deltaY;\n-    this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;\n-  },\n-  update: function(position) {\n-    Position.prepare();\n-    window.scrollTo(Position.deltaX, \n-      this.scrollStart + (position*this.delta));\n-  }\n-});\n-\n-/* ------------- combination effects ------------- */\n-\n-Effect.Fade = function(element) {\n-  element = $(element);\n-  var oldOpacity = element.getInlineOpacity();\n-  var options = Object.extend({\n-  from: element.getOpacity() || 1.0,\n-  to:   0.0,\n-  afterFinishInternal: function(effect) { \n-    if(effect.options.to!=0) return;\n-    effect.element.hide().setStyle({opacity: oldOpacity}); \n-  }}, arguments[1] || {});\n-  return new Effect.Opacity(element,options);\n-}\n-\n-Effect.Appear = function(element) {\n-  element = $(element);\n-  var options = Object.extend({\n-  from: (element.getStyle(\'display\') == \'none\' ? 0.0 : element.getOpacity() || 0.0),\n-  to:   1.0,\n-  // force Safari to render floated elements properly\n-  afterFinishInternal: function(effect) {\n-    effect.element.forceRerendering();\n-  },\n-  beforeSetup: function(effect) {\n-    effect.element.setOpacity(effect.options.from).show(); \n-  }}, arguments[1] || {});\n-  return new Effect.Opacity(element,options);\n-}\n-\n-Effect.Puff = function(element) {\n-  element = $(element);\n-  var oldStyle = { \n-    opacity: element.getInlineOpacity(), \n-    position: element.getStyle(\'position\'),\n-    top:  element.style.top,\n-    left: element.style.left,\n-    width: element.style.width,\n-    height: element.style.height\n-  };\n-  return new Effect.Parallel(\n-   [ new Effect.Scale(element, 200, \n-      { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), \n-     new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], \n-     Object.extend({ duration: 1.0, \n-      beforeSetupInternal: function(effect) {\n-        Position.absolutize(effect.effects[0].element)\n-      },\n-      afterFinishInternal: function(effect) {\n-         effect.effects[0].element.hide().setStyle(oldStyle); }\n-     }, arguments[1] || {})\n-   );\n-}\n-\n-Effect.BlindUp = function(element) {\n-  element = $(element);\n-  element.makeClipping();\n-  return new Effect.Scale(element, 0,\n-    Object.extend({ scaleContent: false, \n-      scaleX: false, \n-      restoreAfterFinish: true,\n-      afterFinishInternal: function(effect) {\n-        effect.element.hide().undoClipping();\n-      } \n-    }, arguments[1] || {})\n-  );\n-}\n-\n-Effect.BlindDown = function(element) {\n-  element = $(element);\n-  var elementDimensions = element.getDimensions();\n-  return new Effect.Scale(element, 100, Object.extend({ \n-    scaleContent: false, \n-    scaleX: false,\n-    scaleFrom: 0,\n-    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},\n-    restoreAfterFinish: true,\n-    afterSetup: function(effect) {\n-      effect.element.makeClipping().setStyle({height: \'0px\'}).show(); \n-    },  \n-    afterFinishInternal: function(effect) {\n-      effect.element.undoClipping();\n-    }\n-  }, arguments[1] || {}));\n-}\n-\n-Effect.SwitchOff = function(element) {\n-  element = $(element);\n-  var oldOpacity = element.getInlineOpacity();\n-  return new Effect.Appear(element, Object.extend({\n-    duration: 0.4,\n-    from: 0,\n-    transition: Effect.Transitions.flicker,\n-    afterFinishInternal: function(effect) {\n-      new Effect.Scale(effect.element, 1, { \n-        duration: 0.3, scaleFromCenter: true,\n-        scaleX: false, scaleContent: false, restoreAfterFinish: true,\n-        beforeSetup: function(effect) { \n-          effect.element.makePositioned().makeClipping();\n-        },\n-        afterFinishInternal: function(effect) {\n-          effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});\n-        }\n-      })\n-    }\n-  }, arguments[1] || {}));\n-}\n-\n-Effect.DropOut = function(element) {\n-  element = $(element);\n-  var oldStyle = {\n-    top: element.getStyle(\'top\'),\n-    left: element.getStyle(\'left\'),\n-    opacity: element.getInlineOpacity() };\n-  return new Effect.Parallel(\n-    [ new Effect.Move(element, {x: 0, y: 100, sync: true }), \n-      new Effect.Opacity(element, { sync: true, to: 0.0 }) ],\n-    Object.extend(\n-      { duration: 0.5,\n-        beforeSetup: function(effect) {\n-          effect.effects[0].element.makePositioned(); \n-        },\n-        afterFinishInternal: function(effect) {\n-          effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);\n-        } \n-      }, arguments[1] || {}));\n-}\n-\n-Effect.Shake = function(element) {\n-  element = $(element);\n-  var oldStyle = {\n-    top: element.getStyle(\'top\'),\n-    left: element.getStyle(\'left\') };\n-    return new Effect.Move(element, \n-      { x:  20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {\n-    new Effect.Move(effect.element,\n-      { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {\n-    new Effect.Move(effect.element,\n-      { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {\n-    new Effect.Move(effect.element,\n-      { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {\n-    new Effect.Move(effect.element,\n-      { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {\n-    new Effect.Move(effect.element,\n-      { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {\n-        effect.element.undoPositioned().setStyle(oldStyle);\n-  }}) }}) }}) }}) }}) }});\n-}\n-\n-Effect.SlideDown = function(element) {\n-  element = $(element).cleanWhitespace();\n-  // SlideDown need to have the content of the element wrapped in a container element with fixed height!\n-  var oldInnerBottom = element.down().getStyle(\'bottom\');\n-  var elementDimensions = element.getDimensions();\n-  return new Effect.Scale(element, 100, Object.extend({ \n-    scaleContent: false, \n-    scaleX: false, \n-    scaleFrom: window.opera ? 0 : 1,\n-    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},\n-    restoreAfterFinish: true,\n-    afterSetup: function(effect) {\n-      effect.element.makePositioned();\n-      effect.element.down().makePositioned();\n-      if(window.opera) effect.element.setStyle({top: \'\'});\n-      effect.element.makeClipping().setStyle({height: \'0px\'}).show(); \n-    },\n-    afterUpdateInternal: function(effect) {\n-      effect.element.down().setStyle({bottom:\n-        (effect.dims[0] - effect.element.clientHeight) + \'px\' }); \n-    },\n-    afterFinishInternal: function(effect) {\n-      effect.element.undoClipping().undoPositioned();\n-      effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }\n-    }, arguments[1] || {})\n-  );\n-}\n-\n-Effect.SlideUp = function(element) {\n-  element = $(element).cleanWhitespace();\n-  var oldInnerBottom = element.down().getStyle(\'bottom\');\n-  return new Effect.Scale(element, window.opera ? 0 : 1,\n-   Object.extend({ scaleContent: false, \n-    scaleX: false, \n-    scaleMode: \'box\',\n-    scaleFrom: 100,\n-    restoreAfterFinish: true,\n-    beforeStartInternal: function(effect) {\n-      effect.element.makePositioned();\n-      effect.element.down().makePositioned();\n-      if(window.opera) effect.element.setStyle({top: \'\'});\n-      effect.element.makeClipping().show();\n-    },  \n-    afterUpdateInternal: function(effect) {\n-      effect.element.down().setStyle({bottom:\n-        (effect.dims[0] - effect.element.clientHeight) + \'px\' });\n-    },\n-    afterFinishInternal: function(effect) {\n-      effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});\n-      effect.element.down().undoPositioned();\n-    }\n-   }, arguments[1] || {})\n-  );\n-}\n-\n-// Bug in opera makes the TD containing this element expand for a instance after finish \n-Effect.Squish = function(element) {\n-  return new Effect.Scale(element, window.opera ? 1 : 0, { \n-    restoreAfterFinish: true,\n-    beforeSetup: function(effect) {\n-      effect.element.makeClipping(); \n-    },  \n-    afterFinishInternal: function(effect) {\n-      effect.element.hide().undoClipping(); \n-    }\n-  });\n-}\n-\n-Effect.Grow = function(element) {\n-  element = $(element);\n-  var options = Object.extend({\n-    direction: \'center\',\n-    moveTransition: Effect.Transitions.sinoidal,\n-    scaleTransition: Effect.Transitions.sinoidal,\n-    opacityTransition: Effect.Transitions.full\n-  }, arguments[1] || {});\n-  var oldStyle = {\n-    top: element.style.top,\n-    left: element.style.left,\n-    height: element.style.height,\n-    width: element.style.width,\n-    opacity: element.getInlineOpacity() };\n-\n-  var dims = element.getDimensions();    \n-  var initialMoveX, initialMoveY;\n-  var moveX, moveY;\n-  \n-  switch (options.direction) {\n-    case \'top-left\':\n-      initialMoveX = initialMoveY = moveX = moveY = 0; \n-      break;\n-    case \'top-right\':\n-      initialMoveX = dims.width;\n-      initialMoveY = moveY = 0;\n-      moveX = -dims.width;\n-      break;\n-    case \'bottom-left\':\n-      initialMoveX = moveX = 0;\n-      initialMoveY = dims.height;\n-      moveY = -dims.height;\n-      break;\n-    case \'bottom-right\':\n-      initialMoveX = dims.width;\n-      initialMoveY = dims.height;\n-      moveX = -dims.width;\n-      moveY = -dims.height;\n-      break;\n-    case \'center\':\n-      initialMoveX = dims.width / 2;\n-      initialMoveY = dims.height / 2;\n-      moveX = -dims.width / 2;\n-      moveY = -dims.height / 2;\n-      break;\n-  }\n-  \n-  return new Effect.Move(element, {\n-    x: initialMoveX,\n-    y: initialMoveY,\n-    duration: 0.01, \n-    beforeSetup: function(effect) {\n-      effect.element.hide().makeClipping().makePositioned();\n-    },\n-    afterFinishInternal: function(effect) {\n-      new Effect.Parallel(\n-        [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),\n-          new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),\n-          new Effect.Scale(effect.element, 100, {\n-            scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, \n-            sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})\n-        ], Object.extend({\n-             beforeSetup: function(effect) {\n-               effect.effects[0].element.setStyle({height: \'0px\'}).show(); \n-             },\n-             afterFinishInternal: function(effect) {\n-               effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); \n-             }\n-           }, options)\n-      )\n-    }\n-  });\n-}\n-\n-Effect.Shrink = function(element) {\n-  element = $(element);\n-  var options = Object.extend({\n-    direction: \'center\',\n-    moveTransition: Effect.Transitions.sinoidal,\n-    scaleTransition: Effect.Transitions.sinoidal,\n-    opacityTransition: Effect.Transitions.none\n-  }, arguments[1] || {});\n-  var oldStyle = {\n-    top: element.style.top,\n-    left: element.style.left,\n-    height: element.style.height,\n-    width: element.style.width,\n-    opacity: element.getInlineOpacity() };\n-\n-  var dims = element.getDimensions();\n-  var moveX, moveY;\n-  \n-  switch (options.direction) {\n-    case \'top-left\':\n-      moveX = moveY = 0;\n-      break;\n-    case \'top-right\':\n-      moveX = dims.width;\n-      moveY = 0;\n-      break;\n-    case \'bottom-left\':\n-      moveX = 0;\n-      moveY = dims.height;\n-      break;\n-    case \'bottom-right\':\n-      moveX = dims.width;\n-      moveY = dims.height;\n-      break;\n-    case \'center\':  \n-      moveX = dims.width / 2;\n-      moveY = dims.height / 2;\n-      break;\n-  }\n-  \n-  return new Effect.Parallel(\n-    [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),\n-      new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),\n-      new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })\n-    ], Object.extend({            \n-         beforeStartInternal: function(effect) {\n-           effect.effects[0].element.makePositioned().makeClipping(); \n-         },\n-         afterFinishInternal: function(effect) {\n-           effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }\n-       }, options)\n-  );\n-}\n-\n-Effect.Pulsate = function(element) {\n-  element = $(element);\n-  var options    = arguments[1] || {};\n-  var oldOpacity = element.getInlineOpacity();\n-  var transition = options.transition || Effect.Transitions.sinoidal;\n-  var reverser   = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };\n-  reverser.bind(transition);\n-  return new Effect.Opacity(element, \n-    Object.extend(Object.extend({  duration: 2.0, from: 0,\n-      afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }\n-    }, options), {transition: reverser}));\n-}\n-\n-Effect.Fold = function(element) {\n-  element = $(element);\n-  var oldStyle = {\n-    top: element.style.top,\n-    left: element.style.left,\n-    width: element.style.width,\n-    height: element.style.height };\n-  element.makeClipping();\n-  return new Effect.Scale(element, 5, Object.extend({   \n-    scaleContent: false,\n-    scaleX: false,\n-    afterFinishInternal: function(effect) {\n-    new Effect.Scale(element, 1, { \n-      scaleContent: false, \n-      scaleY: false,\n-      afterFinishInternal: function(effect) {\n-        effect.element.hide().undoClipping().setStyle(oldStyle);\n-      } });\n-  }}, arguments[1] || {}));\n-};\n-\n-Effect.Morph = Class.create();\n-Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), {\n-  initialize: function(element) {\n-    this.element = $(element);\n-    if(!this.element) throw(Effect._elementDoesNotExistError);\n-    var options = Object.extend({\n-      style: {}\n-    }, arguments[1] || {});\n-    if (typeof options.style == \'string\') {\n-      if(options.style.indexOf(\':\') == -1) {\n-        var cssText = \'\', selector = \'.\' + options.style;\n-        $A(document.styleSheets).reverse().each(function(styleSheet) {\n-          if (styleSheet.cssRules) cssRules = styleSheet.cssRules;\n-          else if (styleSheet.rules) cssRules = styleSheet.rules;\n-          $A(cssRules).reverse().each(function(rule) {\n-            if (selector == rule.selectorText) {\n-              cssText = rule.style.cssText;\n-              throw $break;\n-            }\n-          });\n-          if (cssText) throw $break;\n-        });\n-        this.style = cssText.parseStyle();\n-        options.afterFinishInternal = function(effect){\n-          effect.element.addClassName(effect.options.style);\n-          effect.transforms.each(function(transform) {\n-            if(transform.style != \'opacity\')\n-              effect.element.style[transform.style] = \'\';\n-          });\n-        }\n-      } else this.style = options.style.parseStyle();\n-    } else this.style = $H(options.style)\n-    this.start(options);\n-  },\n-  setup: function(){\n-    function parseColor(color){\n-      if(!color || [\'rgba(0, 0, 0, 0)\',\'transparent\'].include(color)) color = \'#ffffff\';\n-      color = color.parseColor();\n-      return $R(0,2).map(function(i){\n-        return parseInt( color.slice(i*2+1,i*2+3), 16 ) \n-      });\n-    }\n-    this.transforms = this.style.map(function(pair){\n-      var property = pair[0], value = pair[1], unit = null;\n-\n-      if(value.parseColor(\'#zzzzzz\') != \'#zzzzzz\') {\n-        value = value.parseColor();\n-        unit  = \'color\';\n-      } else if(property == \'opacity\') {\n-        value = parseFloat(value);\n-        if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))\n-          this.element.setStyle({zoom: 1});\n-      } else if(Element.CSS_LENGTH.test(value)) {\n-          var components = value.match(/^([\\+\\-]?[0-9\\.]+)(.*)$/);\n-          value = parseFloat(components[1]);\n-          unit = (components.length == 3) ? components[2] : null;\n-      }\n-\n-      var originalValue = this.element.getStyle(property);\n-      return { \n-        style: property.camelize(), \n-        originalValue: unit==\'color\' ? parseColor(originalValue) : parseFloat(originalValue || 0), \n-        targetValue: unit==\'color\' ? parseColor(value) : value,\n-        unit: unit\n-      };\n-    }.bind(this)).reject(function(transform){\n-      return (\n-        (transform.originalValue == transform.targetValue) ||\n-        (\n-          transform.unit != \'color\' &&\n-          (isNaN(transform.originalValue) || isNaN(transform.targetValue))\n-        )\n-      )\n-    });\n-  },\n-  update: function(position) {\n-    var style = {}, transform, i = this.transforms.length;\n-    while(i--)\n-      style[(transform = this.transforms[i]).style] = \n-        transform.unit==\'color\' ? \'#\'+\n-          (Math.round(transform.originalValue[0]+\n-            (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +\n-          (Math.round(transform.originalValue[1]+\n-            (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +\n-          (Math.round(transform.originalValue[2]+\n-            (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :\n-        transform.originalValue + Math.round(\n-          ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit;\n-    this.element.setStyle(style, true);\n-  }\n-});\n-\n-Effect.Transform = Class.create();\n-Object.extend(Effect.Transform.prototype, {\n-  initialize: function(tracks){\n-    this.tracks  = [];\n-    this.options = arguments[1] || {};\n-    this.addTracks(tracks);\n-  },\n-  addTracks: function(tracks){\n-    tracks.each(function(track){\n-      var data = $H(track).values().first();\n-      this.tracks.push($H({\n-        ids:     $H(track).keys().first(),\n-        effect:  Effect.Morph,\n-        options: { style: data }\n-      }));\n-    }.bind(this));\n-    return this;\n-  },\n-  play: function(){\n-    return new Effect.Parallel(\n-      this.tracks.map(function(track){\n-        var elements = [$(track.ids) || $$(track.ids)].flatten();\n-        return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) });\n-      }).flatten(),\n-      this.options\n-    );\n-  }\n-});\n-\n-Element.CSS_PROPERTIES = $w(\n-  \'backgroundColor backgroundPosition borderBottomColor borderBottomStyle \' + \n-  \'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth \' +\n-  \'borderRightColor borderRightStyle borderRightWidth borderSpacing \' +\n-  \'borderTopColor borderTopStyle borderTopWidth bottom clip color \' +\n-  \'fontSize fontWeight height left letterSpacing lineHeight \' +\n-  \'marginBottom marginLeft marginRight marginTop markerOffset maxHeight \'+\n-  \'maxWidth minHeight minWidth opacity outlineColor outlineOffset \' +\n-  \'outlineWidth paddingBottom paddingLeft paddingRight paddingTop \' +\n-  \'right textIndent top width wordSpacing zIndex\');\n-  \n-Element.CSS_LENGTH = /^(([\\+\\-]?[0-9\\.]+)(em|ex|px|in|cm|mm|pt|pc|\\%))|0$/;\n-\n-String.prototype.parseStyle = function(){\n-  var element = document.createElement(\'div\');\n-  element.innerHTML = \'<div style="\' + this + \'"></div>\';\n-  var style = element.childNodes[0].style, styleRules = $H();\n-  \n-  Element.CSS_PROPERTIES.each(function(property){\n-    if(style[property]) styleRules[property] = style[property]; \n-  });\n-  if(Prototype.Browser.IE && this.indexOf(\'opacity\') > -1) {\n-    styleRules.opacity = this.match(/opacity:\\s*((?:0|1)?(?:\\.\\d*)?)/)[1];\n-  }\n-  return styleRules;\n-};\n-\n-Element.morph = function(element, style) {\n-  new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));\n-  return element;\n-};\n-\n-[\'getInlineOpacity\',\'forceRerendering\',\'setContentZoom\',\n- \'collectTextNodes\',\'collectTextNodesIgnoreClass\',\'morph\'].each( \n-  function(f) { Element.Methods[f] = Element[f]; }\n-);\n-\n-Element.Methods.visualEffect = function(element, effect, options) {\n-  s = effect.dasherize().camelize();\n-  effect_class = s.charAt(0).toUpperCase() + s.substring(1);\n-  new Effect[effect_class](element, options);\n-  return $(element);\n-};\n-\n-Element.addMethods();\n\\ No newline at end of file\ndiff --git a/jslib/logger-min.js b/jslib/logger-min.js\nnew file mode 100644\nindex 000000000..3cd433ad5\n--- /dev/null\n+++ b/jslib/logger-min.js\n@@ -0,0 +1,66 @@\n+/*\n+Copyright (c) 2007, Yahoo! Inc. All rights reserved.\n+Code licensed under the BSD License:\n+http://developer.yahoo.net/yui/license.txt\n+version: 2.2.2\n+*/\n+\n+YAHOO.widget.LogMsg=function(oConfigs){if(oConfigs&&(oConfigs.constructor==Object)){for(var param in oConfigs){this[param]=oConfigs[param];}}};YAHOO.widget.LogMsg.prototype.msg=null;YAHOO.widget.LogMsg.prototype.time=null;YAHOO.widget.LogMsg.prototype.category=null;YAHOO.widget.LogMsg.prototype.source=null;YAHOO.widget.LogMsg.prototype.sourceDetail=null;YAHOO.widget.LogWriter=function(sSource){if(!sSource){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return;}\n+this._source=sSource;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(sMsg,sCategory){YAHOO.widget.Logger.log(sMsg,sCategory,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._sSource;};YAHOO.widget.LogWriter.prototype.setSource=function(sSource){if(!sSource){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return;}\n+else{this._sSource=sSource;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(elContainer,oConfigs){var oSelf=this;this._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;if(oConfigs&&(oConfigs.constructor==Object)){for(var param in oConfigs){this[param]=oConfigs[param];}}\n+elContainer=YAHOO.util.Dom.get(elContainer);if(elContainer&&elContainer.tagName&&(elContainer.tagName.toLowerCase()=="div")){this._elContainer=elContainer;YAHOO.util.Dom.addClass(this._elContainer,"yui-log");}\n+else{this._elContainer=document.body.appendChild(document.createElement("div"));YAHOO.util.Dom.addClass(this._elContainer,"yui-log");YAHOO.util.Dom.addClass(this._elContainer,"yui-log-container");var containerStyle=this._elContainer.style;if(this.width){containerStyle.width=this.width;}\n+if(this.right){containerStyle.right=this.right;}\n+if(this.top){containerStyle.top=this.top;}\n+if(this.left){containerStyle.left=this.left;containerStyle.right="auto";}\n+if(this.bottom){containerStyle.bottom=this.bottom;containerStyle.top="auto";}\n+if(this.fontSize){containerStyle.fontSize=this.fontSize;}\n+if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1){document.body.style+=\'\';}}\n+if(this._elContainer){if(!this._elHd){this._elHd=this._elContainer.appendChild(document.createElement("div"));this._elHd.id="yui-log-hd"+this._sName;this._elHd.className="yui-log-hd";this._elCollapse=this._elHd.appendChild(document.createElement("div"));this._elCollapse.className="yui-log-btns";this._btnCollapse=document.createElement("input");this._btnCollapse.type="button";this._btnCollapse.style.fontSize=YAHOO.util.Dom.getStyle(this._elContainer,"fontSize");this._btnCollapse.className="yui-log-button";this._btnCollapse.value="Collapse";this._btnCollapse=this._elCollapse.appendChild(this._btnCollapse);YAHOO.util.Event.addListener(oSelf._btnCollapse,\'click\',oSelf._onClickCollapseBtn,oSelf);this._title=this._elHd.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";}\n+if(!this._elConsole){this._elConsole=this._elContainer.appendChild(document.createElement("div"));this._elConsole.className="yui-log-bd";if(this.height){this._elConsole.style.height=this.height;}}\n+if(!this._elFt&&this.footerEnabled){this._elFt=this._elContainer.appendChild(document.createElement("div"));this._elFt.className="yui-log-ft";this._elBtns=this._elFt.appendChild(document.createElement("div"));this._elBtns.className="yui-log-btns";this._btnPause=document.createElement("input");this._btnPause.type="button";this._btnPause.style.fontSize=YAHOO.util.Dom.getStyle(this._elContainer,"fontSize");this._btnPause.className="yui-log-button";this._btnPause.value="Pause";this._btnPause=this._elBtns.appendChild(this._btnPause);YAHOO.util.Event.addListener(oSelf._btnPause,\'click\',oSelf._onClickPauseBtn,oSelf);this._btnClear=document.createElement("input");this._btnClear.type="button";this._btnClear.style.fontSize=YAHOO.util.Dom.getStyle(this._elContainer,"fontSize");this._btnClear.className="yui-log-button";this._btnClear.value="Clear";this._btnClear=this._elBtns.appendChild(this._btnClear);YAHOO.util.Event.addListener(oSelf._btnClear,\'click\',oSelf._onClickClearBtn,oSelf);this._elCategoryFilters=this._elFt.appendChild(document.createElement("div"));this._elCategoryFilters.className="yui-log-categoryfilters";this._elSourceFilters=this._elFt.appendChild(document.createElement("div"));this._elSourceFilters.className="yui-log-sourcefilters";}}\n+if(YAHOO.util.DD&&this.draggable){var ylog_dd=new YAHOO.util.DD(this._elContainer);ylog_dd.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}\n+if(!this._buffer){this._buffer=[];}\n+this._lastTime=YAHOO.widget.Logger.getStartTime();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);this._filterCheckboxes={};this._categoryFilters=[];var catsLen=YAHOO.widget.Logger.categories.length;if(this._elCategoryFilters){for(var i=0;i<catsLen;i++){this._createCategoryCheckbox(YAHOO.widget.Logger.categories[i]);}}\n+this._sourceFilters=[];var sourcesLen=YAHOO.widget.Logger.sources.length;if(this._elSourceFilters){for(var j=0;j<sourcesLen;j++){this._createSourceCheckbox(YAHOO.widget.Logger.sources[j]);}}\n+YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.widget.LogReader.prototype.logReaderEnabled=true;YAHOO.widget.LogReader.prototype.width=null;YAHOO.widget.LogReader.prototype.height=null;YAHOO.widget.LogReader.prototype.top=null;YAHOO.widget.LogReader.prototype.left=null;YAHOO.widget.LogReader.prototype.right=null;YAHOO.widget.LogReader.prototype.bottom=null;YAHOO.widget.LogReader.prototype.fontSize=null;YAHOO.widget.LogReader.prototype.footerEnabled=true;YAHOO.widget.LogReader.prototype.verboseOutput=true;YAHOO.widget.LogReader.prototype.newestOnTop=true;YAHOO.widget.LogReader.prototype.outputBuffer=100;YAHOO.widget.LogReader.prototype.thresholdMax=500;YAHOO.widget.LogReader.prototype.thresholdMin=100;YAHOO.widget.LogReader.prototype.isCollapsed=false;YAHOO.widget.LogReader.prototype.isPaused=false;YAHOO.widget.LogReader.prototype.draggable=true;YAHOO.widget.LogReader.prototype.toString=function(){return"LogReader instance"+this._sName;};YAHOO.widget.LogReader.prototype.pause=function(){this.isPaused=true;this._btnPause.value="Resume";this._timeout=null;this.logReaderEnabled=false;};YAHOO.widget.LogReader.prototype.resume=function(){this.isPaused=false;this._btnPause.value="Pause";this.logReaderEnabled=true;this._printBuffer();};YAHOO.widget.LogReader.prototype.hide=function(){this._elContainer.style.display="none";};YAHOO.widget.LogReader.prototype.show=function(){this._elContainer.style.display="block";};YAHOO.widget.LogReader.prototype.collapse=function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}\n+this._btnCollapse.value="Expand";this.isCollapsed=true;};YAHOO.widget.LogReader.prototype.expand=function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}\n+this._btnCollapse.value="Collapse";this.isCollapsed=false;};YAHOO.widget.LogReader.prototype.getCheckbox=function(filter){return this._filterCheckboxes[filter];};YAHOO.widget.LogReader.prototype.getCategories=function(){return this._categoryFilters;};YAHOO.widget.LogReader.prototype.showCategory=function(sCategory){var filtersArray=this._categoryFilters;if(filtersArray.indexOf){if(filtersArray.indexOf(sCategory)>-1){return;}}\n+else{for(var i=0;i<filtersArray.length;i++){if(filtersArray[i]===sCategory){return;}}}\n+this._categoryFilters.push(sCategory);this._filterLogs();this.getCheckbox(sCategory).checked=true;};YAHOO.widget.LogReader.prototype.hideCategory=function(sCategory){var filtersArray=this._categoryFilters;for(var i=0;i<filtersArray.length;i++){if(sCategory==filtersArray[i]){filtersArray.splice(i,1);break;}}\n+this._filterLogs();this.getCheckbox(sCategory).checked=false;};YAHOO.widget.LogReader.prototype.getSources=function(){return this._sourceFilters;};YAHOO.widget.LogReader.prototype.showSource=function(sSource){var filtersArray=this._sourceFilters;if(filtersArray.indexOf){if(filtersArray.indexOf(sSource)>-1){return;}}\n+else{for(var i=0;i<filtersArray.length;i++){if(sSource==filtersArray[i]){return;}}}\n+filtersArray.push(sSource);this._filterLogs();this.getCheckbox(sSource).checked=true;};YAHOO.widget.LogReader.prototype.hideSource=function(sSource){var filtersArray=this._sourceFilters;for(var i=0;i<filtersArray.length;i++){if(sSource==filtersArray[i]){filtersArray.splice(i,1);break;}}\n+this._filterLogs();this.getCheckbox(sSource).checked=false;};YAHOO.widget.LogReader.prototype.clearConsole=function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var elConsole=this._elConsole;while(elConsole.hasChildNodes()){elConsole.removeChild(elConsole.firstChild);}};YAHOO.widget.LogReader.prototype.setTitle=function(sTitle){this._title.innerHTML=this.html2Text(sTitle);};YAHOO.widget.LogReader.prototype.getLastTime=function(){return this._lastTime;};YAHOO.widget.LogReader.prototype.formatMsg=function(oLogMsg){var category=oLogMsg.category;var label=category.substring(0,4).toUpperCase();var time=oLogMsg.time;if(time.toLocaleTimeString){var localTime=time.toLocaleTimeString();}\n+else{localTime=time.toString();}\n+var msecs=time.getTime();var startTime=YAHOO.widget.Logger.getStartTime();var totalTime=msecs-startTime;var elapsedTime=msecs-this.getLastTime();var source=oLogMsg.source;var sourceDetail=oLogMsg.sourceDetail;var sourceAndDetail=(sourceDetail)?source+" "+sourceDetail:source;var msg=this.html2Text(oLogMsg.msg);var output=(this.verboseOutput)?["<pre class=\\"yui-log-verbose\\"><p><span class=\'",category,"\'>",label,"</span> ",totalTime,"ms (+",elapsedTime,") ",localTime,": ","</p><p>",sourceAndDetail,": </p><p>",msg,"</p></pre>"]:["<pre><p><span class=\'",category,"\'>",label,"</span> ",totalTime,"ms (+",elapsedTime,") ",localTime,": ",sourceAndDetail,": ",msg,"</p></pre>"];return output.join("");};YAHOO.widget.LogReader.prototype.html2Text=function(sHtml){if(sHtml){sHtml+="";return sHtml.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;");}\n+return"";};YAHOO.widget.LogReader._index=0;YAHOO.widget.LogReader.prototype._sName=null;YAHOO.widget.LogReader.prototype._buffer=null;YAHOO.widget.LogReader.prototype._consoleMsgCount=0;YAHOO.widget.LogReader.prototype._lastTime=null;YAHOO.widget.LogReader.prototype._timeout=null;YAHOO.widget.LogReader.prototype._filterCheckboxes=null;YAHOO.widget.LogReader.prototype._categoryFilters=null;YAHOO.widget.LogReader.prototype._sourceFilters=null;YAHOO.widget.LogReader.prototype._elContainer=null;YAHOO.widget.LogReader.prototype._elHd=null;YAHOO.widget.LogReader.prototype._elCollapse=null;YAHOO.widget.LogReader.prototype._btnCollapse=null;YAHOO.widget.LogReader.prototype._title=null;YAHOO.widget.LogReader.prototype._elConsole=null;YAHOO.widget.LogReader.prototype._elFt=null;YAHOO.widget.LogReader.prototype._elBtns=null;YAHOO.widget.LogReader.prototype._elCategoryFilters=null;YAHOO.widget.LogReader.prototype._elSourceFilters=null;YAHOO.widget.LogReader.prototype._btnPause=null;YAHOO.widget.LogReader.prototype._btnClear=null;YAHOO.widget.LogReader.prototype._createCategoryCheckbox=function(sCategory){var oSelf=this;if(this._elFt){var elParent=this._elCategoryFilters;var filters=this._categoryFilters;var elFilter=elParent.appendChild(document.createElement("span"));elFilter.className="yui-log-filtergrp";var chkCategory=document.createElement("input");chkCategory.id="yui-log-filter-"+sCategory+this._sName;chkCategory.className="yui-log-filter-"+sCategory;chkCategory.type="checkbox";chkCategory.category=sCategory;chkCategory=elFilter.appendChild(chkCategory);chkCategory.checked=true;filters.push(sCategory);YAHOO.util.Event.addListener(chkCategory,\'click\',oSelf._onCheckCategory,oSelf);var lblCategory=elFilter.appendChild(document.createElement("label"));lblCategory.htmlFor=chkCategory.id;lblCategory.className=sCategory;lblCategory.innerHTML=sCategory;this._filterCheckboxes[sCategory]=chkCategory;}};YAHOO.widget.LogReader.prototype._createSourceCheckbox=function(sSource){var oSelf=this;if(this._elFt){var elParent=this._elSourceFilters;var filters=this._sourceFilters;var elFilter=elParent.appendChild(document.createElement("span"));elFilter.className="yui-log-filtergrp";var chkSource=document.createElement("input");chkSource.id="yui-log-filter"+sSource+this._sName;chkSource.className="yui-log-filter"+sSource;chkSource.type="checkbox";chkSource.source=sSource;chkSource=elFilter.appendChild(chkSource);chkSource.checked=true;filters.push(sSource);YAHOO.util.Event.addListener(chkSource,\'click\',oSelf._onCheckSource,oSelf);var lblSource=elFilter.appendChild(document.createElement("label"));lblSource.htmlFor=chkSource.id;lblSource.className=sSource;lblSource.innerHTML=sSource;this._filterCheckboxes[sSource]=chkSource;}};YAHOO.widget.LogReader.prototype._filterLogs=function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}};YAHOO.widget.LogReader.prototype._printBuffer=function(){this._timeout=null;if(this._elConsole!==null){var thresholdMax=this.thresholdMax;thresholdMax=(thresholdMax&&!isNaN(thresholdMax))?thresholdMax:500;if(this._consoleMsgCount<thresholdMax){var entries=[];for(var i=0;i<this._buffer.length;i++){entries[i]=this._buffer[i];}\n+this._buffer=[];this._printToConsole(entries);}\n+else{this._filterLogs();}\n+if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}};YAHOO.widget.LogReader.prototype._printToConsole=function(aEntries){var entriesLen=aEntries.length;var thresholdMin=this.thresholdMin;if(isNaN(thresholdMin)||(thresholdMin>this.thresholdMax)){thresholdMin=0;}\n+var entriesStartIndex=(entriesLen>thresholdMin)?(entriesLen-thresholdMin):0;var sourceFiltersLen=this._sourceFilters.length;var categoryFiltersLen=this._categoryFilters.length;for(var i=entriesStartIndex;i<entriesLen;i++){var okToPrint=false;var okToFilterCats=false;var entry=aEntries[i];var source=entry.source;var category=entry.category;for(var j=0;j<sourceFiltersLen;j++){if(source==this._sourceFilters[j]){okToFilterCats=true;break;}}\n+if(okToFilterCats){for(var k=0;k<categoryFiltersLen;k++){if(category==this._categoryFilters[k]){okToPrint=true;break;}}}\n+if(okToPrint){var output=this.formatMsg(entry);if(this.newestOnTop){this._elConsole.innerHTML=output+this._elConsole.innerHTML;}\n+else{this._elConsole.innerHTML+=output;}\n+this._consoleMsgCount++;this._lastTime=entry.time.getTime();}}};YAHOO.widget.LogReader.prototype._onCategoryCreate=function(sType,aArgs,oSelf){var category=aArgs[0];if(oSelf._elFt){oSelf._createCategoryCheckbox(category);}};YAHOO.widget.LogReader.prototype._onSourceCreate=function(sType,aArgs,oSelf){var source=aArgs[0];if(oSelf._elFt){oSelf._createSourceCheckbox(source);}};YAHOO.widget.LogReader.prototype._onCheckCategory=function(v,oSelf){var category=this.category;if(!this.checked){oSelf.hideCategory(category);}\n+else{oSelf.showCategory(category);}};YAHOO.widget.LogReader.prototype._onCheckSource=function(v,oSelf){var source=this.source;if(!this.checked){oSelf.hideSource(source);}\n+else{oSelf.showSource(source);}};YAHOO.widget.LogReader.prototype._onClickCollapseBtn=function(v,oSelf){if(!oSelf.isCollapsed){oSelf.collapse();}\n+else{oSelf.expand();}};YAHOO.widget.LogReader.prototype._onClickPauseBtn=function(v,oSelf){if(!oSelf.isPaused){oSelf.pause();}\n+else{oSelf.resume();}};YAHOO.widget.LogReader.prototype._onClickClearBtn=function(v,oSelf){oSelf.clearConsole();};YAHOO.widget.LogReader.prototype._onNewLog=function(sType,aArgs,oSelf){var logEntry=aArgs[0];oSelf._buffer.push(logEntry);if(oSelf.logReaderEnabled===true&&oSelf._timeout===null){oSelf._timeout=setTimeout(function(){oSelf._printBuffer();},oSelf.outputBuffer);}};YAHOO.widget.LogReader.prototype._onReset=function(sType,aArgs,oSelf){oSelf._filterLogs();};YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null};YAHOO.widget.Logger.log=function(sMsg,sCategory,sSource){if(this.loggerEnabled){if(!sCategory){sCategory="info";}\n+else{sCategory=sCategory.toLocaleLowerCase();if(this._isNewCategory(sCategory)){this._createNewCategory(sCategory);}}\n+var sClass="global";var sDetail=null;if(sSource){var spaceIndex=sSource.indexOf(" ");if(spaceIndex>0){sClass=sSource.substring(0,spaceIndex);sDetail=sSource.substring(spaceIndex,sSource.length);}\n+else{sClass=sSource;}\n+if(this._isNewSource(sClass)){this._createNewSource(sClass);}}\n+var timestamp=new Date();var logEntry=new YAHOO.widget.LogMsg({msg:sMsg,time:timestamp,category:sCategory,source:sClass,sourceDetail:sDetail});var stack=this._stack;var maxStackEntries=this.maxStackEntries;if(maxStackEntries&&!isNaN(maxStackEntries)&&(stack.length>=maxStackEntries)){stack.shift();}\n+stack.push(logEntry);this.newLogEvent.fire(logEntry);if(this._browserConsoleEnabled){this._printToBrowserConsole(logEntry);}\n+return true;}\n+else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(sCategory){this.categories.push(sCategory);this.categoryCreateEvent.fire(sCategory);};YAHOO.widget.Logger._isNewCategory=function(sCategory){for(var i=0;i<this.categories.length;i++){if(sCategory==this.categories[i]){return false;}}\n+return true;};YAHOO.widget.Logger._createNewSource=function(sSource){this.sources.push(sSource);this.sourceCreateEvent.fire(sSource);};YAHOO.widget.Logger._isNewSource=function(sSource){if(sSource){for(var i=0;i<this.sources.length;i++){if(sSource==this.sources[i]){return false;}}\n+return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(oEntry){if(window.console&&console.log){var category=oEntry.category;var label=oEntry.category.substring(0,4).toUpperCase();var time=oEntry.time;if(time.toLocaleTimeString){var localTime=time.toLocaleTimeString();}\n+else{localTime=time.toString();}\n+var msecs=time.getTime();var elapsedTime=(YAHOO.widget.Logger._lastTime)?(msecs-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=msecs;var output=localTime+" ("+\n+elapsedTime+"ms): "+\n+oEntry.source+": "+\n+oEntry.msg;console.log(output);}};YAHOO.widget.Logger._onWindowError=function(sMsg,sUrl,sLine){try{YAHOO.widget.Logger.log(sMsg+\' (\'+sUrl+\', line \'+sLine+\')\',"window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}\n+catch(e){return false;}};if(window.onerror){YAHOO.widget.Logger._origOnWindowError=window.onerror;}\n+window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger.log("Logger initialized");YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.2.2",build:"204"});\n\\ No newline at end of file\ndiff --git a/jslib/prototype.js b/jslib/prototype.js\ndeleted file mode 100644\nindex 5d2100fac..000000000\n--- a/jslib/prototype.js\n+++ /dev/null\n@@ -1,3271 +0,0 @@\n-/*  Prototype JavaScript framework, version 1.5.1\n- *  (c) 2005-2007 Sam Stephenson\n- *\n- *  Prototype is freely distributable under the terms of an MIT-style license.\n- *  For details, see the Prototype web site: http://www.prototypejs.org/\n- *\n-/*--------------------------------------------------------------------------*/\n-\n-var Prototype = {\n-  Version: \'1.5.1\',\n-\n-  Browser: {\n-    IE:     !!(window.attachEvent && !window.opera),\n-    Opera:  !!window.opera,\n-    WebKit: navigator.userAgent.indexOf(\'AppleWebKit/\') > -1,\n-    Gecko:  navigator.userAgent.indexOf(\'Gecko\') > -1 && navigator.userAgent.indexOf(\'KHTML\') == -1\n-  },\n-\n-  BrowserFeatures: {\n-    XPath: !!document.evaluate,\n-    ElementExtensions: !!window.HTMLElement,\n-    SpecificElementExtensions:\n-      (document.createElement(\'div\').__proto__ !==\n-       document.createElement(\'form\').__proto__)\n-  },\n-\n-  ScriptFragment: \'<script[^>]*>([\\u0001-\\uFFFF]*?)</script>\',\n-  JSONFilter: /^\\/\\*-secure-\\s*(.*)\\s*\\*\\/\\s*$/,\n-\n-  emptyFunction: function() { },\n-  K: function(x) { return x }\n-}\n-\n-var Class = {\n-  create: function() {\n-    return function() {\n-      this.initialize.apply(this, arguments);\n-    }\n-  }\n-}\n-\n-var Abstract = new Object();\n-\n-Object.extend = function(destination, source) {\n-  for (var property in source) {\n-    destination[property] = source[property];\n-  }\n-  return destination;\n-}\n-\n-Object.extend(Object, {\n-  inspect: function(object) {\n-    try {\n-      if (object === undefined) return \'undefined\';\n-      if (object === null) return \'null\';\n-      return object.inspect ? object.inspect() : object.toString();\n-    } catch (e) {\n-      if (e instanceof RangeError) return \'...\';\n-      throw e;\n-    }\n-  },\n-\n-  toJSON: function(object) {\n-    var type = typeof object;\n-    switch(type) {\n-      case \'undefined\':\n-      case \'function\':\n-      case \'unknown\': return;\n-      case \'boolean\': return object.toString();\n-    }\n-    if (object === null) return \'null\';\n-    if (object.toJSON) return object.toJSON();\n-    if (object.ownerDocument === document) return;\n-    var results = [];\n-    for (var property in object) {\n-      var value = Object.toJSON(object[property]);\n-      if (value !== undefined)\n-        results.push(property.toJSON() + \': \' + value);\n-    }\n-    return \'{\' + results.join(\', \') + \'}\';\n-  },\n-\n-  keys: function(object) {\n-    var keys = [];\n-    for (var property in object)\n-      keys.push(property);\n-    return keys;\n-  },\n-\n-  values: function(object) {\n-    var values = [];\n-    for (var property in object)\n-      values.push(object[property]);\n-    return values;\n-  },\n-\n-  clone: function(object) {\n-    return Object.extend({}, object);\n-  }\n-});\n-\n-Function.prototype.bind = function() {\n-  var __method = this, args = $A(arguments), object = args.shift();\n-  return function() {\n-    return __method.apply(object, args.concat($A(arguments)));\n-  }\n-}\n-\n-Function.prototype.bindAsEventListener = function(object) {\n-  var __method = this, args = $A(arguments), object = args.shift();\n-  return function(event) {\n-    return __method.apply(object, [event || window.event].concat(args));\n-  }\n-}\n-\n-Object.extend(Number.prototype, {\n-  toColorPart: function() {\n-    return this.toPaddedString(2, 16);\n-  },\n-\n-  succ: function() {\n-    return this + 1;\n-  },\n-\n-  times: function(iterator) {\n-    $R(0, this, true).each(iterator);\n-    return this;\n-  },\n-\n-  toPaddedString: function(length, radix) {\n-    var string = this.toString(radix || 10);\n-    return \'0\'.times(length - string.length) + string;\n-  },\n-\n-  toJSON: function() {\n-    return isFinite(this) ? this.toString() : \'null\';\n-  }\n-});\n-\n-Date.prototype.toJSON = function() {\n-  return \'"\' + this.getFullYear() + \'-\' +\n-    (this.getMonth() + 1).toPaddedString(2) + \'-\' +\n-    this.getDate().toPaddedString(2) + \'T\' +\n-    this.getHours().toPaddedString(2) + \':\' +\n-    this.getMinutes().toPaddedString(2) + \':\' +\n-    this.getSeconds().toPaddedString(2) + \'"\';\n-};\n-\n-var Try = {\n-  these: function() {\n-    var returnValue;\n-\n-    for (var i = 0, length = arguments.length; i < length; i++) {\n-      var lambda = arguments[i];\n-      try {\n-        returnValue = lambda();\n-        break;\n-      } catch (e) {}\n-    }\n-\n-    return returnValue;\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-var PeriodicalExecuter = Class.create();\n-PeriodicalExecuter.prototype = {\n-  initialize: function(callback, frequency) {\n-    this.callback = callback;\n-    this.frequency = frequency;\n-    this.currentlyExecuting = false;\n-\n-    this.registerCallback();\n-  },\n-\n-  registerCallback: function() {\n-    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n-  },\n-\n-  stop: function() {\n-    if (!this.timer) return;\n-    clearInterval(this.timer);\n-    this.timer = null;\n-  },\n-\n-  onTimerEvent: function() {\n-    if (!this.currentlyExecuting) {\n-      try {\n-        this.currentlyExecuting = true;\n-        this.callback(this);\n-      } finally {\n-        this.currentlyExecuting = false;\n-      }\n-    }\n-  }\n-}\n-Object.extend(String, {\n-  interpret: function(value) {\n-    return value == null ? \'\' : String(value);\n-  },\n-  specialChar: {\n-    \'\\b\': \'\\\\b\',\n-    \'\\t\': \'\\\\t\',\n-    \'\\n\': \'\\\\n\',\n-    \'\\f\': \'\\\\f\',\n-    \'\\r\': \'\\\\r\',\n-    \'\\\\\': \'\\\\\\\\\'\n-  }\n-});\n-\n-Object.extend(String.prototype, {\n-  gsub: function(pattern, replacement) {\n-    var result = \'\', source = this, match;\n-    replacement = arguments.callee.prepareReplacement(replacement);\n-\n-    while (source.length > 0) {\n-      if (match = source.match(pattern)) {\n-        result += source.slice(0, match.index);\n-        result += String.interpret(replacement(match));\n-        source  = source.slice(match.index + match[0].length);\n-      } else {\n-        result += source, source = \'\';\n-      }\n-    }\n-    return result;\n-  },\n-\n-  sub: function(pattern, replacement, count) {\n-    replacement = this.gsub.prepareReplacement(replacement);\n-    count = count === undefined ? 1 : count;\n-\n-    return this.gsub(pattern, function(match) {\n-      if (--count < 0) return match[0];\n-      return replacement(match);\n-    });\n-  },\n-\n-  scan: function(pattern, iterator) {\n-    this.gsub(pattern, iterator);\n-    return this;\n-  },\n-\n-  truncate: function(length, truncation) {\n-    length = length || 30;\n-    truncation = truncation === undefined ? \'...\' : truncation;\n-    return this.length > length ?\n-      this.slice(0, length - truncation.length) + truncation : this;\n-  },\n-\n-  strip: function() {\n-    return this.replace(/^\\s+/, \'\').replace(/\\s+$/, \'\');\n-  },\n-\n-  stripTags: function() {\n-    return this.replace(/<\\/?[^>]+>/gi, \'\');\n-  },\n-\n-  stripScripts: function() {\n-    return this.replace(new RegExp(Prototype.ScriptFragment, \'img\'), \'\');\n-  },\n-\n-  extractScripts: function() {\n-    var matchAll = new RegExp(Prototype.ScriptFragment, \'img\');\n-    var matchOne = new RegExp(Prototype.ScriptFragment, \'im\');\n-    return (this.match(matchAll) || []).map(function(scriptTag) {\n-      return (scriptTag.match(matchOne) || [\'\', \'\'])[1];\n-    });\n-  },\n-\n-  evalScripts: function() {\n-    return this.extractScripts().map(function(script) { return eval(script) });\n-  },\n-\n-  escapeHTML: function() {\n-    var self = arguments.callee;\n-    self.text.data = this;\n-    return self.div.innerHTML;\n-  },\n-\n-  unescapeHTML: function() {\n-    var div = document.createElement(\'div\');\n-    div.innerHTML = this.stripTags();\n-    return div.childNodes[0] ? (div.childNodes.length > 1 ?\n-      $A(div.childNodes).inject(\'\', function(memo, node) { return memo+node.nodeValue }) :\n-      div.childNodes[0].nodeValue) : \'\';\n-  },\n-\n-  toQueryParams: function(separator) {\n-    var match = this.strip().match(/([^?#]*)(#.*)?$/);\n-    if (!match) return {};\n-\n-    return match[1].split(separator || \'&\').inject({}, function(hash, pair) {\n-      if ((pair = pair.split(\'=\'))[0]) {\n-        var key = decodeURIComponent(pair.shift());\n-        var value = pair.length > 1 ? pair.join(\'=\') : pair[0];\n-        if (value != undefined) value = decodeURIComponent(value);\n-\n-        if (key in hash) {\n-          if (hash[key].constructor != Array) hash[key] = [hash[key]];\n-          hash[key].push(value);\n-        }\n-        else hash[key] = value;\n-      }\n-      return hash;\n-    });\n-  },\n-\n-  toArray: function() {\n-    return this.split(\'\');\n-  },\n-\n-  succ: function() {\n-    return this.slice(0, this.length - 1) +\n-      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);\n-  },\n-\n-  times: function(count) {\n-    var result = \'\';\n-    for (var i = 0; i < count; i++) result += this;\n-    return result;\n-  },\n-\n-  camelize: function() {\n-    var parts = this.split(\'-\'), len = parts.length;\n-    if (len == 1) return parts[0];\n-\n-    var camelized = this.charAt(0) == \'-\'\n-      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)\n-      : parts[0];\n-\n-    for (var i = 1; i < len; i++)\n-      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);\n-\n-    return camelized;\n-  },\n-\n-  capitalize: function() {\n-    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();\n-  },\n-\n-  underscore: function() {\n-    return this.gsub(/::/, \'/\').gsub(/([A-Z]+)([A-Z][a-z])/,\'#{1}_#{2}\').gsub(/([a-z\\d])([A-Z])/,\'#{1}_#{2}\').gsub(/-/,\'_\').toLowerCase();\n-  },\n-\n-  dasherize: function() {\n-    return this.gsub(/_/,\'-\');\n-  },\n-\n-  inspect: function(useDoubleQuotes) {\n-    var escapedString = this.gsub(/[\\x00-\\x1f\\\\]/, function(match) {\n-      var character = String.specialChar[match[0]];\n-      return character ? character : \'\\\\u00\' + match[0].charCodeAt().toPaddedString(2, 16);\n-    });\n-    if (useDoubleQuotes) return \'"\' + escapedString.replace(/"/g, \'\\\\"\') + \'"\';\n-    return "\'" + escapedString.replace(/\'/g, \'\\\\\\\'\') + "\'";\n-  },\n-\n-  toJSON: function() {\n-    return this.inspect(true);\n-  },\n-\n-  unfilterJSON: function(filter) {\n-    return this.sub(filter || Prototype.JSONFilter, \'#{1}\');\n-  },\n-\n-  evalJSON: function(sanitize) {\n-    var json = this.unfilterJSON();\n-    try {\n-      if (!sanitize || (/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/.test(json)))\n-        return eval(\'(\' + json + \')\');\n-    } catch (e) { }\n-    throw new SyntaxError(\'Badly formed JSON string: \' + this.inspect());\n-  },\n-\n-  include: function(pattern) {\n-    return this.indexOf(pattern) > -1;\n-  },\n-\n-  startsWith: function(pattern) {\n-    return this.indexOf(pattern) === 0;\n-  },\n-\n-  endsWith: function(pattern) {\n-    var d = this.length - pattern.length;\n-    return d >= 0 && this.lastIndexOf(pattern) === d;\n-  },\n-\n-  empty: function() {\n-    return this == \'\';\n-  },\n-\n-  blank: function() {\n-    return /^\\s*$/.test(this);\n-  }\n-});\n-\n-if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {\n-  escapeHTML: function() {\n-    return this.replace(/&/g,\'&amp;\').replace(/</g,\'&lt;\').replace(/>/g,\'&gt;\');\n-  },\n-  unescapeHTML: function() {\n-    return this.replace(/&amp;/g,\'&\').replace(/&lt;/g,\'<\').replace(/&gt;/g,\'>\');\n-  }\n-});\n-\n-String.prototype.gsub.prepareReplacement = function(replacement) {\n-  if (typeof replacement == \'function\') return replacement;\n-  var template = new Template(replacement);\n-  return function(match) { return template.evaluate(match) };\n-}\n-\n-String.prototype.parseQuery = String.prototype.toQueryParams;\n-\n-Object.extend(String.prototype.escapeHTML, {\n-  div:  document.createElement(\'div\'),\n-  text: document.createTextNode(\'\')\n-});\n-\n-with (String.prototype.escapeHTML) div.appendChild(text);\n-\n-var Template = Class.create();\n-Template.Pattern = /(^|.|\\r|\\n)(#\\{(.*?)\\})/;\n-Template.prototype = {\n-  initialize: function(template, pattern) {\n-    this.template = template.toString();\n-    this.pattern  = pattern || Template.Pattern;\n-  },\n-\n-  evaluate: function(object) {\n-    return this.template.gsub(this.pattern, function(match) {\n-      var before = match[1];\n-      if (before == \'\\\\\') return match[2];\n-      return before + String.interpret(object[match[3]]);\n-    });\n-  }\n-}\n-\n-var $break = {}, $continue = new Error(\'"throw $continue" is deprecated, use "return" instead\');\n-\n-var Enumerable = {\n-  each: function(iterator) {\n-    var index = 0;\n-    try {\n-      this._each(function(value) {\n-        iterator(value, index++);\n-      });\n-    } catch (e) {\n-      if (e != $break) throw e;\n-    }\n-    return this;\n-  },\n-\n-  eachSlice: function(number, iterator) {\n-    var index = -number, slices = [], array = this.toArray();\n-    while ((index += number) < array.length)\n-      slices.push(array.slice(index, index+number));\n-    return slices.map(iterator);\n-  },\n-\n-  all: function(iterator) {\n-    var result = true;\n-    this.each(function(value, index) {\n-      result = result && !!(iterator || Prototype.K)(value, index);\n-      if (!result) throw $break;\n-    });\n-    return result;\n-  },\n-\n-  any: function(iterator) {\n-    var result = false;\n-    this.each(function(value, index) {\n-      if (result = !!(iterator || Prototype.K)(value, index))\n-        throw $break;\n-    });\n-    return result;\n-  },\n-\n-  collect: function(iterator) {\n-    var results = [];\n-    this.each(function(value, index) {\n-      results.push((iterator || Prototype.K)(value, index));\n-    });\n-    return results;\n-  },\n-\n-  detect: function(iterator) {\n-    var result;\n-    this.each(function(value, index) {\n-      if (iterator(value, index)) {\n-        result = value;\n-        throw $break;\n-      }\n-    });\n-    return result;\n-  },\n-\n-  findAll: function(iterator) {\n-    var results = [];\n-    this.each(function(value, index) {\n-      if (iterator(value, index))\n-        results.push(value);\n-    });\n-    return results;\n-  },\n-\n-  grep: function(pattern, iterator) {\n-    var results = [];\n-    this.each(function(value, index) {\n-      var stringValue = value.toString();\n-      if (stringValue.match(pattern))\n-        results.push((iterator || Prototype.K)(value, index));\n-    })\n-    return results;\n-  },\n-\n-  include: function(object) {\n-    var found = false;\n-    this.each(function(value) {\n-      if (value == object) {\n-        found = true;\n-        throw $break;\n-      }\n-    });\n-    return found;\n-  },\n-\n-  inGroupsOf: function(number, fillWith) {\n-    fillWith = fillWith === undefined ? null : fillWith;\n-    return this.eachSlice(number, function(slice) {\n-      while(slice.length < number) slice.push(fillWith);\n-      return slice;\n-    });\n-  },\n-\n-  inject: function(memo, iterator) {\n-    this.each(function(value, index) {\n-      memo = iterator(memo, value, index);\n-    });\n-    return memo;\n-  },\n-\n-  invoke: function(method) {\n-    var args = $A(arguments).slice(1);\n-    return this.map(function(value) {\n-      return value[method].apply(value, args);\n-    });\n-  },\n-\n-  max: function(iterator) {\n-    var result;\n-    this.each(function(value, index) {\n-      value = (iterator || Prototype.K)(value, index);\n-      if (result == undefined || value >= result)\n-        result = value;\n-    });\n-    return result;\n-  },\n-\n-  min: function(iterator) {\n-    var result;\n-    this.each(function(value, index) {\n-      value = (iterator || Prototype.K)(value, index);\n-      if (result == undefined || value < result)\n-        result = value;\n-    });\n-    return result;\n-  },\n-\n-  partition: function(iterator) {\n-    var trues = [], falses = [];\n-    this.each(function(value, index) {\n-      ((iterator || Prototype.K)(value, index) ?\n-        trues : falses).push(value);\n-    });\n-    return [trues, falses];\n-  },\n-\n-  pluck: function(property) {\n-    var results = [];\n-    this.each(function(value, index) {\n-      results.push(value[property]);\n-    });\n-    return results;\n-  },\n-\n-  reject: function(iterator) {\n-    var results = [];\n-    this.each(function(value, index) {\n-      if (!iterator(value, index))\n-        results.push(value);\n-    });\n-    return results;\n-  },\n-\n-  sortBy: function(iterator) {\n-    return this.map(function(value, index) {\n-      return {value: value, criteria: iterator(value, index)};\n-    }).sort(function(left, right) {\n-      var a = left.criteria, b = right.criteria;\n-      return a < b ? -1 : a > b ? 1 : 0;\n-    }).pluck(\'value\');\n-  },\n-\n-  toArray: function() {\n-    return this.map();\n-  },\n-\n-  zip: function() {\n-    var iterator = Prototype.K, args = $A(arguments);\n-    if (typeof args.last() == \'function\')\n-      iterator = args.pop();\n-\n-    var collections = [this].concat(args).map($A);\n-    return this.map(function(value, index) {\n-      return iterator(collections.pluck(index));\n-    });\n-  },\n-\n-  size: function() {\n-    return this.toArray().length;\n-  },\n-\n-  inspect: function() {\n-    return \'#<Enumerable:\' + this.toArray().inspect() + \'>\';\n-  }\n-}\n-\n-Object.extend(Enumerable, {\n-  map:     Enumerable.collect,\n-  find:    Enumerable.detect,\n-  select:  Enumerable.findAll,\n-  member:  Enumerable.include,\n-  entries: Enumerable.toArray\n-});\n-var $A = Array.from = function(iterable) {\n-  if (!iterable) return [];\n-  if (iterable.toArray) {\n-    return iterable.toArray();\n-  } else {\n-    var results = [];\n-    for (var i = 0, length = iterable.length; i < length; i++)\n-      results.push(iterable[i]);\n-    return results;\n-  }\n-}\n-\n-if (Prototype.Browser.WebKit) {\n-  $A = Array.from = function(iterable) {\n-    if (!iterable) return [];\n-    if (!(typeof iterable == \'function\' && iterable == \'[object NodeList]\') &&\n-      iterable.toArray) {\n-      return iterable.toArray();\n-    } else {\n-      var results = [];\n-      for (var i = 0, length = iterable.length; i < length; i++)\n-        results.push(iterable[i]);\n-      return results;\n-    }\n-  }\n-}\n-\n-Object.extend(Array.prototype, Enumerable);\n-\n-if (!Array.prototype._reverse)\n-  Array.prototype._reverse = Array.prototype.reverse;\n-\n-Object.extend(Array.prototype, {\n-  _each: function(iterator) {\n-    for (var i = 0, length = this.length; i < length; i++)\n-      iterator(this[i]);\n-  },\n-\n-  clear: function() {\n-    this.length = 0;\n-    return this;\n-  },\n-\n-  first: function() {\n-    return this[0];\n-  },\n-\n-  last: function() {\n-    return this[this.length - 1];\n-  },\n-\n-  compact: function() {\n-    return this.select(function(value) {\n-      return value != null;\n-    });\n-  },\n-\n-  flatten: function() {\n-    return this.inject([], function(array, value) {\n-      return array.concat(value && value.constructor == Array ?\n-        value.flatten() : [value]);\n-    });\n-  },\n-\n-  without: function() {\n-    var values = $A(arguments);\n-    return this.select(function(value) {\n-      return !values.include(value);\n-    });\n-  },\n-\n-  indexOf: function(object) {\n-    for (var i = 0, length = this.length; i < length; i++)\n-      if (this[i] == object) return i;\n-    return -1;\n-  },\n-\n-  reverse: function(inline) {\n-    return (inline !== false ? this : this.toArray())._reverse();\n-  },\n-\n-  reduce: function() {\n-    return this.length > 1 ? this : this[0];\n-  },\n-\n-  uniq: function(sorted) {\n-    return this.inject([], function(array, value, index) {\n-      if (0 == index || (sorted ? array.last() != value : !array.include(value)))\n-        array.push(value);\n-      return array;\n-    });\n-  },\n-\n-  clone: function() {\n-    return [].concat(this);\n-  },\n-\n-  size: function() {\n-    return this.length;\n-  },\n-\n-  inspect: function() {\n-    return \'[\' + this.map(Object.inspect).join(\', \') + \']\';\n-  },\n-\n-  toJSON: function() {\n-    var results = [];\n-    this.each(function(object) {\n-      var value = Object.toJSON(object);\n-      if (value !== undefined) results.push(value);\n-    });\n-    return \'[\' + results.join(\', \') + \']\';\n-  }\n-});\n-\n-Array.prototype.toArray = Array.prototype.clone;\n-\n-function $w(string) {\n-  string = string.strip();\n-  return string ? string.split(/\\s+/) : [];\n-}\n-\n-if (Prototype.Browser.Opera){\n-  Array.prototype.concat = function() {\n-    var array = [];\n-    for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);\n-    for (var i = 0, length = arguments.length; i < length; i++) {\n-      if (arguments[i].constructor == Array) {\n-        for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)\n-          array.push(arguments[i][j]);\n-      } else {\n-        array.push(arguments[i]);\n-      }\n-    }\n-    return array;\n-  }\n-}\n-var Hash = function(object) {\n-  if (object instanceof Hash) this.merge(object);\n-  else Object.extend(this, object || {});\n-};\n-\n-Object.extend(Hash, {\n-  toQueryString: function(obj) {\n-    var parts = [];\n-    parts.add = arguments.callee.addPair;\n-\n-    this.prototype._each.call(obj, function(pair) {\n-      if (!pair.key) return;\n-      var value = pair.value;\n-\n-      if (value && typeof value == \'object\') {\n-        if (value.constructor == Array) value.each(function(value) {\n-          parts.add(pair.key, value);\n-        });\n-        return;\n-      }\n-      parts.add(pair.key, value);\n-    });\n-\n-    return parts.join(\'&\');\n-  },\n-\n-  toJSON: function(object) {\n-    var results = [];\n-    this.prototype._each.call(object, function(pair) {\n-      var value = Object.toJSON(pair.value);\n-      if (value !== undefined) results.push(pair.key.toJSON() + \': \' + value);\n-    });\n-    return \'{\' + results.join(\', \') + \'}\';\n-  }\n-});\n-\n-Hash.toQueryString.addPair = function(key, value, prefix) {\n-  key = encodeURIComponent(key);\n-  if (value === undefined) this.push(key);\n-  else this.push(key + \'=\' + (value == null ? \'\' : encodeURIComponent(value)));\n-}\n-\n-Object.extend(Hash.prototype, Enumerable);\n-Object.extend(Hash.prototype, {\n-  _each: function(iterator) {\n-    for (var key in this) {\n-      var value = this[key];\n-      if (value && value == Hash.prototype[key]) continue;\n-\n-      var pair = [key, value];\n-      pair.key = key;\n-      pair.value = value;\n-      iterator(pair);\n-    }\n-  },\n-\n-  keys: function() {\n-    return this.pluck(\'key\');\n-  },\n-\n-  values: function() {\n-    return this.pluck(\'value\');\n-  },\n-\n-  merge: function(hash) {\n-    return $H(hash).inject(this, function(mergedHash, pair) {\n-      mergedHash[pair.key] = pair.value;\n-      return mergedHash;\n-    });\n-  },\n-\n-  remove: function() {\n-    var result;\n-    for(var i = 0, length = arguments.length; i < length; i++) {\n-      var value = this[arguments[i]];\n-      if (value !== undefined){\n-        if (result === undefined) result = value;\n-        else {\n-          if (result.constructor != Array) result = [result];\n-          result.push(value)\n-        }\n-      }\n-      delete this[arguments[i]];\n-    }\n-    return result;\n-  },\n-\n-  toQueryString: function() {\n-    return Hash.toQueryString(this);\n-  },\n-\n-  inspect: function() {\n-    return \'#<Hash:{\' + this.map(function(pair) {\n-      return pair.map(Object.inspect).join(\': \');\n-    }).join(\', \') + \'}>\';\n-  },\n-\n-  toJSON: function() {\n-    return Hash.toJSON(this);\n-  }\n-});\n-\n-function $H(object) {\n-  if (object instanceof Hash) return object;\n-  return new Hash(object);\n-};\n-\n-// Safari iterates over shadowed properties\n-if (function() {\n-  var i = 0, Test = function(value) { this.key = value };\n-  Test.prototype.key = \'foo\';\n-  for (var property in new Test(\'bar\')) i++;\n-  return i > 1;\n-}()) Hash.prototype._each = function(iterator) {\n-  var cache = [];\n-  for (var key in this) {\n-    var value = this[key];\n-    if ((value && value == Hash.prototype[key]) || cache.include(key)) continue;\n-    cache.push(key);\n-    var pair = [key, value];\n-    pair.key = key;\n-    pair.value = value;\n-    iterator(pair);\n-  }\n-};\n-ObjectRange = Class.create();\n-Object.extend(ObjectRange.prototype, Enumerable);\n-Object.extend(ObjectRange.prototype, {\n-  initialize: function(start, end, exclusive) {\n-    this.start = start;\n-    this.end = end;\n-    this.exclusive = exclusive;\n-  },\n-\n-  _each: function(iterator) {\n-    var value = this.start;\n-    while (this.include(value)) {\n-      iterator(value);\n-      value = value.succ();\n-    }\n-  },\n-\n-  include: function(value) {\n-    if (value < this.start)\n-      return false;\n-    if (this.exclusive)\n-      return value < this.end;\n-    return value <= this.end;\n-  }\n-});\n-\n-var $R = function(start, end, exclusive) {\n-  return new ObjectRange(start, end, exclusive);\n-}\n-\n-var Ajax = {\n-  getTransport: function() {\n-    return Try.these(\n-      function() {return new XMLHttpRequest()},\n-      function() {return new ActiveXObject(\'Msxml2.XMLHTTP\')},\n-      function() {return new ActiveXObject(\'Microsoft.XMLHTTP\')}\n-    ) || false;\n-  },\n-\n-  activeRequestCount: 0\n-}\n-\n-Ajax.Responders = {\n-  responders: [],\n-\n-  _each: function(iterator) {\n-    this.responders._each(iterator);\n-  },\n-\n-  register: function(responder) {\n-    if (!this.include(responder))\n-      this.responders.push(responder);\n-  },\n-\n-  unregister: function(responder) {\n-    this.responders = this.responders.without(responder);\n-  },\n-\n-  dispatch: function(callback, request, transport, json) {\n-    this.each(function(responder) {\n-      if (typeof responder[callback] == \'function\') {\n-        try {\n-          responder[callback].apply(responder, [request, transport, json]);\n-        } catch (e) {}\n-      }\n-    });\n-  }\n-};\n-\n-Object.extend(Ajax.Responders, Enumerable);\n-\n-Ajax.Responders.register({\n-  onCreate: function() {\n-    Ajax.activeRequestCount++;\n-  },\n-  onComplete: function() {\n-    Ajax.activeRequestCount--;\n-  }\n-});\n-\n-Ajax.Base = function() {};\n-Ajax.Base.prototype = {\n-  setOptions: function(options) {\n-    this.options = {\n-      method:       \'post\',\n-      asynchronous: true,\n-      contentType:  \'application/x-www-form-urlencoded\',\n-      encoding:     \'UTF-8\',\n-      parameters:   \'\'\n-    }\n-    Object.extend(this.options, options || {});\n-\n-    this.options.method = this.options.method.toLowerCase();\n-    if (typeof this.options.parameters == \'string\')\n-      this.options.parameters = this.options.parameters.toQueryParams();\n-  }\n-}\n-\n-Ajax.Request = Class.create();\n-Ajax.Request.Events =\n-  [\'Uninitialized\', \'Loading\', \'Loaded\', \'Interactive\', \'Complete\'];\n-\n-Ajax.Request.prototype = Object.extend(new Ajax.Base(), {\n-  _complete: false,\n-\n-  initialize: function(url, options) {\n-    this.transport = Ajax.getTransport();\n-    this.setOptions(options);\n-    this.request(url);\n-  },\n-\n-  request: function(url) {\n-    this.url = url;\n-    this.method = this.options.method;\n-    var params = Object.clone(this.options.parameters);\n-\n-    if (![\'get\', \'post\'].include(this.method)) {\n-      // simulate other verbs over post\n-      params[\'_method\'] = this.method;\n-      this.method = \'post\';\n-    }\n-\n-    this.parameters = params;\n-\n-    if (params = Hash.toQueryString(params)) {\n-      // when GET, append parameters to URL\n-      if (this.method == \'get\')\n-        this.url += (this.url.include(\'?\') ? \'&\' : \'?\') + params;\n-      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))\n-        params += \'&_=\';\n-    }\n-\n-    try {\n-      if (this.options.onCreate) this.options.onCreate(this.transport);\n-      Ajax.Responders.dispatch(\'onCreate\', this, this.transport);\n-\n-      this.transport.open(this.method.toUpperCase(), this.url,\n-        this.options.asynchronous);\n-\n-      if (this.options.asynchronous)\n-        setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);\n-\n-      this.transport.onreadystatechange = this.onStateChange.bind(this);\n-      this.setRequestHeaders();\n-\n-      this.body = this.method == \'post\' ? (this.options.postBody || params) : null;\n-      this.transport.send(this.body);\n-\n-      /* Force Firefox to handle ready state 4 for synchronous requests */\n-      if (!this.options.asynchronous && this.transport.overrideMimeType)\n-        this.onStateChange();\n-\n-    }\n-    catch (e) {\n-      this.dispatchException(e);\n-    }\n-  },\n-\n-  onStateChange: function() {\n-    var readyState = this.transport.readyState;\n-    if (readyState > 1 && !((readyState == 4) && this._complete))\n-      this.respondToReadyState(this.transport.readyState);\n-  },\n-\n-  setRequestHeaders: function() {\n-    var headers = {\n-      \'X-Requested-With\': \'XMLHttpRequest\',\n-      \'X-Prototype-Version\': Prototype.Version,\n-      \'Accept\': \'text/javascript, text/html, application/xml, text/xml, */*\'\n-    };\n-\n-    if (this.method == \'post\') {\n-      headers[\'Content-type\'] = this.options.contentType +\n-        (this.options.encoding ? \'; charset=\' + this.options.encoding : \'\');\n-\n-      /* Force "Connection: close" for older Mozilla browsers to work\n-       * around a bug where XMLHttpRequest sends an incorrect\n-       * Content-length header. See Mozilla Bugzilla #246651.\n-       */\n-      if (this.transport.overrideMimeType &&\n-          (navigator.userAgent.match(/Gecko\\/(\\d{4})/) || [0,2005])[1] < 2005)\n-            headers[\'Connection\'] = \'close\';\n-    }\n-\n-    // user-defined headers\n-    if (typeof this.options.requestHeaders == \'object\') {\n-      var extras = this.options.requestHeaders;\n-\n-      if (typeof extras.push == \'function\')\n-        for (var i = 0, length = extras.length; i < length; i += 2)\n-          headers[extras[i]] = extras[i+1];\n-      else\n-        $H(extras).each(function(pair) { headers[pair.key] = pair.value });\n-    }\n-\n-    for (var name in headers)\n-      this.transport.setRequestHeader(name, headers[name]);\n-  },\n-\n-  success: function() {\n-    return !this.transport.status\n-        || (this.transport.status >= 200 && this.transport.status < 300);\n-  },\n-\n-  respondToReadyState: function(readyState) {\n-    var state = Ajax.Request.Events[readyState];\n-    var transport = this.transport, json = this.evalJSON();\n-\n-    if (state == \'Complete\') {\n-      try {\n-        this._complete = true;\n-        (this.options[\'on\' + this.transport.status]\n-         || this.options[\'on\' + (this.success() ? \'Success\' : \'Failure\')]\n-         || Prototype.emptyFunction)(transport, json);\n-      } catch (e) {\n-        this.dispatchException(e);\n-      }\n-\n-      var contentType = this.getHeader(\'Content-type\');\n-      if (contentType && contentType.strip().\n-        match(/^(text|application)\\/(x-)?(java|ecma)script(;.*)?$/i))\n-          this.evalResponse();\n-    }\n-\n-    try {\n-      (this.options[\'on\' + state] || Prototype.emptyFunction)(transport, json);\n-      Ajax.Responders.dispatch(\'on\' + state, this, transport, json);\n-    } catch (e) {\n-      this.dispatchException(e);\n-    }\n-\n-    if (state == \'Complete\') {\n-      // avoid memory leak in MSIE: clean up\n-      this.transport.onreadystatechange = Prototype.emptyFunction;\n-    }\n-  },\n-\n-  getHeader: function(name) {\n-    try {\n-      return this.transport.getResponseHeader(name);\n-    } catch (e) { return null }\n-  },\n-\n-  evalJSON: function() {\n-    try {\n-      var json = this.getHeader(\'X-JSON\');\n-      return json ? json.evalJSON() : null;\n-    } catch (e) { return null }\n-  },\n-\n-  evalResponse: function() {\n-    try {\n-      return eval((this.transport.responseText || \'\').unfilterJSON());\n-    } catch (e) {\n-      this.dispatchException(e);\n-    }\n-  },\n-\n-  dispatchException: function(exception) {\n-    (this.options.onException || Prototype.emptyFunction)(this, exception);\n-    Ajax.Responders.dispatch(\'onException\', this, exception);\n-  }\n-});\n-\n-Ajax.Updater = Class.create();\n-\n-Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {\n-  initialize: function(container, url, options) {\n-    this.container = {\n-      success: (container.success || container),\n-      failure: (container.failure || (container.success ? null : container))\n-    }\n-\n-    this.transport = Ajax.getTransport();\n-    this.setOptions(options);\n-\n-    var onComplete = this.options.onComplete || Prototype.emptyFunction;\n-    this.options.onComplete = (function(transport, param) {\n-      this.updateContent();\n-      onComplete(transport, param);\n-    }).bind(this);\n-\n-    this.request(url);\n-  },\n-\n-  updateContent: function() {\n-    var receiver = this.container[this.success() ? \'success\' : \'failure\'];\n-    var response = this.transport.responseText;\n-\n-    if (!this.options.evalScripts) response = response.stripScripts();\n-\n-    if (receiver = $(receiver)) {\n-      if (this.options.insertion)\n-        new this.options.insertion(receiver, response);\n-      else\n-        receiver.update(response);\n-    }\n-\n-    if (this.success()) {\n-      if (this.onComplete)\n-        setTimeout(this.onComplete.bind(this), 10);\n-    }\n-  }\n-});\n-\n-Ajax.PeriodicalUpdater = Class.create();\n-Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {\n-  initialize: function(container, url, options) {\n-    this.setOptions(options);\n-    this.onComplete = this.options.onComplete;\n-\n-    this.frequency = (this.options.frequency || 2);\n-    this.decay = (this.options.decay || 1);\n-\n-    this.updater = {};\n-    this.container = container;\n-    this.url = url;\n-\n-    this.start();\n-  },\n-\n-  start: function() {\n-    this.options.onComplete = this.updateComplete.bind(this);\n-    this.onTimerEvent();\n-  },\n-\n-  stop: function() {\n-    this.updater.options.onComplete = undefined;\n-    clearTimeout(this.timer);\n-    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);\n-  },\n-\n-  updateComplete: function(request) {\n-    if (this.options.decay) {\n-      this.decay = (request.responseText == this.lastText ?\n-        this.decay * this.options.decay : 1);\n-\n-      this.lastText = request.responseText;\n-    }\n-    this.timer = setTimeout(this.onTimerEvent.bind(this),\n-      this.decay * this.frequency * 1000);\n-  },\n-\n-  onTimerEvent: function() {\n-    this.updater = new Ajax.Updater(this.container, this.url, this.options);\n-  }\n-});\n-function $(element) {\n-  if (arguments.length > 1) {\n-    for (var i = 0, elements = [], length = arguments.length; i < length; i++)\n-      elements.push($(arguments[i]));\n-    return elements;\n-  }\n-  if (typeof element == \'string\')\n-    element = document.getElementById(element);\n-  return Element.extend(element);\n-}\n-\n-if (Prototype.BrowserFeatures.XPath) {\n-  document._getElementsByXPath = function(expression, parentElement) {\n-    var results = [];\n-    var query = document.evaluate(expression, $(parentElement) || document,\n-      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n-    for (var i = 0, length = query.snapshotLength; i < length; i++)\n-      results.push(query.snapshotItem(i));\n-    return results;\n-  };\n-\n-  document.getElementsByClassName = function(className, parentElement) {\n-    var q = ".//*[contains(concat(\' \', @class, \' \'), \' " + className + " \')]";\n-    return document._getElementsByXPath(q, parentElement);\n-  }\n-\n-} else document.getElementsByClassName = function(className, parentElement) {\n-  var children = ($(parentElement) || document.body).getElementsByTagName(\'*\');\n-  var elements = [], child;\n-  for (var i = 0, length = children.length; i < length; i++) {\n-    child = children[i];\n-    if (Element.hasClassName(child, className))\n-      elements.push(Element.extend(child));\n-  }\n-  return elements;\n-};\n-\n-/*--------------------------------------------------------------------------*/\n-\n-if (!window.Element) var Element = {};\n-\n-Element.extend = function(element) {\n-  var F = Prototype.BrowserFeatures;\n-  if (!element || !element.tagName || element.nodeType == 3 ||\n-   element._extended || F.SpecificElementExtensions || element == window)\n-    return element;\n-\n-  var methods = {}, tagName = element.tagName, cache = Element.extend.cache,\n-   T = Element.Methods.ByTag;\n-\n-  // extend methods for all tags (Safari doesn\'t need this)\n-  if (!F.ElementExtensions) {\n-    Object.extend(methods, Element.Methods),\n-    Object.extend(methods, Element.Methods.Simulated);\n-  }\n-\n-  // extend methods for specific tags\n-  if (T[tagName]) Object.extend(methods, T[tagName]);\n-\n-  for (var property in methods) {\n-    var value = methods[property];\n-    if (typeof value == \'function\' && !(property in element))\n-      element[property] = cache.findOrStore(value);\n-  }\n-\n-  element._extended = Prototype.emptyFunction;\n-  return element;\n-};\n-\n-Element.extend.cache = {\n-  findOrStore: function(value) {\n-    return this[value] = this[value] || function() {\n-      return value.apply(null, [this].concat($A(arguments)));\n-    }\n-  }\n-};\n-\n-Element.Methods = {\n-  visible: function(element) {\n-    return $(element).style.display != \'none\';\n-  },\n-\n-  toggle: function(element) {\n-    element = $(element);\n-    Element[Element.visible(element) ? \'hide\' : \'show\'](element);\n-    return element;\n-  },\n-\n-  hide: function(element) {\n-    $(element).style.display = \'none\';\n-    return element;\n-  },\n-\n-  show: function(element) {\n-    $(element).style.display = \'\';\n-    return element;\n-  },\n-\n-  remove: function(element) {\n-    element = $(element);\n-    element.parentNode.removeChild(element);\n-    return element;\n-  },\n-\n-  update: function(element, html) {\n-    html = typeof html == \'undefined\' ? \'\' : html.toString();\n-    $(element).innerHTML = html.stripScripts();\n-    setTimeout(function() {html.evalScripts()}, 10);\n-    return element;\n-  },\n-\n-  replace: function(element, html) {\n-    element = $(element);\n-    html = typeof html == \'undefined\' ? \'\' : html.toString();\n-    if (element.outerHTML) {\n-      element.outerHTML = html.stripScripts();\n-    } else {\n-      var range = element.ownerDocument.createRange();\n-      range.selectNodeContents(element);\n-      element.parentNode.replaceChild(\n-        range.createContextualFragment(html.stripScripts()), element);\n-    }\n-    setTimeout(function() {html.evalScripts()}, 10);\n-    return element;\n-  },\n-\n-  inspect: function(element) {\n-    element = $(element);\n-    var result = \'<\' + element.tagName.toLowerCase();\n-    $H({\'id\': \'id\', \'className\': \'class\'}).each(function(pair) {\n-      var property = pair.first(), attribute = pair.last();\n-      var value = (element[property] || \'\').toString();\n-      if (value) result += \' \' + attribute + \'=\' + value.inspect(true);\n-    });\n-    return result + \'>\';\n-  },\n-\n-  recursivelyCollect: function(element, property) {\n-    element = $(element);\n-    var elements = [];\n-    while (element = element[property])\n-      if (element.nodeType == 1)\n-        elements.push(Element.extend(element));\n-    return elements;\n-  },\n-\n-  ancestors: function(element) {\n-    return $(element).recursivelyCollect(\'parentNode\');\n-  },\n-\n-  descendants: function(element) {\n-    return $A($(element).getElementsByTagName(\'*\')).each(Element.extend);\n-  },\n-\n-  firstDescendant: function(element) {\n-    element = $(element).firstChild;\n-    while (element && element.nodeType != 1) element = element.nextSibling;\n-    return $(element);\n-  },\n-\n-  immediateDescendants: function(element) {\n-    if (!(element = $(element).firstChild)) return [];\n-    while (element && element.nodeType != 1) element = element.nextSibling;\n-    if (element) return [element].concat($(element).nextSiblings());\n-    return [];\n-  },\n-\n-  previousSiblings: function(element) {\n-    return $(element).recursivelyCollect(\'previousSibling\');\n-  },\n-\n-  nextSiblings: function(element) {\n-    return $(element).recursivelyCollect(\'nextSibling\');\n-  },\n-\n-  siblings: function(element) {\n-    element = $(element);\n-    return element.previousSiblings().reverse().concat(element.nextSiblings());\n-  },\n-\n-  match: function(element, selector) {\n-    if (typeof selector == \'string\')\n-      selector = new Selector(selector);\n-    return selector.match($(element));\n-  },\n-\n-  up: function(element, expression, index) {\n-    element = $(element);\n-    if (arguments.length == 1) return $(element.parentNode);\n-    var ancestors = element.ancestors();\n-    return expression ? Selector.findElement(ancestors, expression, index) :\n-      ancestors[index || 0];\n-  },\n-\n-  down: function(element, expression, index) {\n-    element = $(element);\n-    if (arguments.length == 1) return element.firstDescendant();\n-    var descendants = element.descendants();\n-    return expression ? Selector.findElement(descendants, expression, index) :\n-      descendants[index || 0];\n-  },\n-\n-  previous: function(element, expression, index) {\n-    element = $(element);\n-    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));\n-    var previousSiblings = element.previousSiblings();\n-    return expression ? Selector.findElement(previousSiblings, expression, index) :\n-      previousSiblings[index || 0];\n-  },\n-\n-  next: function(element, expression, index) {\n-    element = $(element);\n-    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));\n-    var nextSiblings = element.nextSiblings();\n-    return expression ? Selector.findElement(nextSiblings, expression, index) :\n-      nextSiblings[index || 0];\n-  },\n-\n-  getElementsBySelector: function() {\n-    var args = $A(arguments), element = $(args.shift());\n-    return Selector.findChildElements(element, args);\n-  },\n-\n-  getElementsByClassName: function(element, className) {\n-    return document.getElementsByClassName(className, element);\n-  },\n-\n-  readAttribute: function(element, name) {\n-    element = $(element);\n-    if (Prototype.Browser.IE) {\n-      if (!element.attributes) return null;\n-      var t = Element._attributeTranslations;\n-      if (t.values[name]) return t.values[name](element, name);\n-      if (t.names[name])  name = t.names[name];\n-      var attribute = element.attributes[name];\n-      return attribute ? attribute.nodeValue : null;\n-    }\n-    return element.getAttribute(name);\n-  },\n-\n-  getHeight: function(element) {\n-    return $(element).getDimensions().height;\n-  },\n-\n-  getWidth: function(element) {\n-    return $(element).getDimensions().width;\n-  },\n-\n-  classNames: function(element) {\n-    return new Element.ClassNames(element);\n-  },\n-\n-  hasClassName: function(element, className) {\n-    if (!(element = $(element))) return;\n-    var elementClassName = element.className;\n-    if (elementClassName.length == 0) return false;\n-    if (elementClassName == className ||\n-        elementClassName.match(new RegExp("(^|\\\\s)" + className + "(\\\\s|$)")))\n-      return true;\n-    return false;\n-  },\n-\n-  addClassName: function(element, className) {\n-    if (!(element = $(element))) return;\n-    Element.classNames(element).add(className);\n-    return element;\n-  },\n-\n-  removeClassName: function(element, className) {\n-    if (!(element = $(element))) return;\n-    Element.classNames(element).remove(className);\n-    return element;\n-  },\n-\n-  toggleClassName: function(element, className) {\n-    if (!(element = $(element))) return;\n-    Element.classNames(element)[element.hasClassName(className) ? \'remove\' : \'add\'](className);\n-    return element;\n-  },\n-\n-  observe: function() {\n-    Event.observe.apply(Event, arguments);\n-    return $A(arguments).first();\n-  },\n-\n-  stopObserving: function() {\n-    Event.stopObserving.apply(Event, arguments);\n-    return $A(arguments).first();\n-  },\n-\n-  // removes whitespace-only text node children\n-  cleanWhitespace: function(element) {\n-    element = $(element);\n-    var node = element.firstChild;\n-    while (node) {\n-      var nextNode = node.nextSibling;\n-      if (node.nodeType == 3 && !/\\S/.test(node.nodeValue))\n-        element.removeChild(node);\n-      node = nextNode;\n-    }\n-    return element;\n-  },\n-\n-  empty: function(element) {\n-    return $(element).innerHTML.blank();\n-  },\n-\n-  descendantOf: function(element, ancestor) {\n-    element = $(element), ancestor = $(ancestor);\n-    while (element = element.parentNode)\n-      if (element == ancestor) return true;\n-    return false;\n-  },\n-\n-  scrollTo: function(element) {\n-    element = $(element);\n-    var pos = Position.cumulativeOffset(element);\n-    window.scrollTo(pos[0], pos[1]);\n-    return element;\n-  },\n-\n-  getStyle: function(element, style) {\n-    element = $(element);\n-    style = style == \'float\' ? \'cssFloat\' : style.camelize();\n-    var value = element.style[style];\n-    if (!value) {\n-      var css = document.defaultView.getComputedStyle(element, null);\n-      value = css ? css[style] : null;\n-    }\n-    if (style == \'opacity\') return value ? parseFloat(value) : 1.0;\n-    return value == \'auto\' ? null : value;\n-  },\n-\n-  getOpacity: function(element) {\n-    return $(element).getStyle(\'opacity\');\n-  },\n-\n-  setStyle: function(element, styles, camelized) {\n-    element = $(element);\n-    var elementStyle = element.style;\n-\n-    for (var property in styles)\n-      if (property == \'opacity\') element.setOpacity(styles[property])\n-      else\n-        elementStyle[(property == \'float\' || property == \'cssFloat\') ?\n-          (elementStyle.styleFloat === undefined ? \'cssFloat\' : \'styleFloat\') :\n-          (camelized ? property : property.camelize())] = styles[property];\n-\n-    return element;\n-  },\n-\n-  setOpacity: function(element, value) {\n-    element = $(element);\n-    element.style.opacity = (value == 1 || value === \'\') ? \'\' :\n-      (value < 0.00001) ? 0 : value;\n-    return element;\n-  },\n-\n-  getDimensions: function(element) {\n-    element = $(element);\n-    var display = $(element).getStyle(\'display\');\n-    if (display != \'none\' && display != null) // Safari bug\n-      return {width: element.offsetWidth, height: element.offsetHeight};\n-\n-    // All *Width and *Height properties give 0 on elements with display none,\n-    // so enable the element temporarily\n-    var els = element.style;\n-    var originalVisibility = els.visibility;\n-    var originalPosition = els.position;\n-    var originalDisplay = els.display;\n-    els.visibility = \'hidden\';\n-    els.position = \'absolute\';\n-    els.display = \'block\';\n-    var originalWidth = element.clientWidth;\n-    var originalHeight = element.clientHeight;\n-    els.display = originalDisplay;\n-    els.position = originalPosition;\n-    els.visibility = originalVisibility;\n-    return {width: originalWidth, height: originalHeight};\n-  },\n-\n-  makePositioned: function(element) {\n-    element = $(element);\n-    var pos = Element.getStyle(element, \'position\');\n-    if (pos == \'static\' || !pos) {\n-      element._madePositioned = true;\n-      element.style.position = \'relative\';\n-      // Opera returns the offset relative to the positioning context, when an\n-      // element is position relative but top and left have not been defined\n-      if (window.opera) {\n-        element.style.top = 0;\n-        element.style.left = 0;\n-      }\n-    }\n-    return element;\n-  },\n-\n-  undoPositioned: function(element) {\n-    element = $(element);\n-    if (element._madePositioned) {\n-      element._madePositioned = undefined;\n-      element.style.position =\n-        element.style.top =\n-        element.style.left =\n-        element.style.bottom =\n-        element.style.right = \'\';\n-    }\n-    return element;\n-  },\n-\n-  makeClipping: function(element) {\n-    element = $(element);\n-    if (element._overflow) return element;\n-    element._overflow = element.style.overflow || \'auto\';\n-    if ((Element.getStyle(element, \'overflow\') || \'visible\') != \'hidden\')\n-      element.style.overflow = \'hidden\';\n-    return element;\n-  },\n-\n-  undoClipping: function(element) {\n-    element = $(element);\n-    if (!element._overflow) return element;\n-    element.style.overflow = element._overflow == \'auto\' ? \'\' : element._overflow;\n-    element._overflow = null;\n-    return element;\n-  }\n-};\n-\n-Object.extend(Element.Methods, {\n-  childOf: Element.Methods.descendantOf,\n-  childElements: Element.Methods.immediateDescendants\n-});\n-\n-if (Prototype.Browser.Opera) {\n-  Element.Methods._getStyle = Element.Methods.getStyle;\n-  Element.Methods.getStyle = function(element, style) {\n-    switch(style) {\n-      case \'left\':\n-      case \'top\':\n-      case \'right\':\n-      case \'bottom\':\n-        if (Element._getStyle(element, \'position\') == \'static\') return null;\n-      default: return Element._getStyle(element, style);\n-    }\n-  };\n-}\n-else if (Prototype.Browser.IE) {\n-  Element.Methods.getStyle = function(element, style) {\n-    element = $(element);\n-    style = (style == \'float\' || style == \'cssFloat\') ? \'styleFloat\' : style.camelize();\n-    var value = element.style[style];\n-    if (!value && element.currentStyle) value = element.currentStyle[style];\n-\n-    if (style == \'opacity\') {\n-      if (value = (element.getStyle(\'filter\') || \'\').match(/alpha\\(opacity=(.*)\\)/))\n-        if (value[1]) return parseFloat(value[1]) / 100;\n-      return 1.0;\n-    }\n-\n-    if (value == \'auto\') {\n-      if ((style == \'width\' || style == \'height\') && (element.getStyle(\'display\') != \'none\'))\n-        return element[\'offset\'+style.capitalize()] + \'px\';\n-      return null;\n-    }\n-    return value;\n-  };\n-\n-  Element.Methods.setOpacity = function(element, value) {\n-    element = $(element);\n-    var filter = element.getStyle(\'filter\'), style = element.style;\n-    if (value == 1 || value === \'\') {\n-      style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi,\'\');\n-      return element;\n-    } else if (value < 0.00001) value = 0;\n-    style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi, \'\') +\n-      \'alpha(opacity=\' + (value * 100) + \')\';\n-    return element;\n-  };\n-\n-  // IE is missing .innerHTML support for TABLE-related elements\n-  Element.Methods.update = function(element, html) {\n-    element = $(element);\n-    html = typeof html == \'undefined\' ? \'\' : html.toString();\n-    var tagName = element.tagName.toUpperCase();\n-    if ([\'THEAD\',\'TBODY\',\'TR\',\'TD\'].include(tagName)) {\n-      var div = document.createElement(\'div\');\n-      switch (tagName) {\n-        case \'THEAD\':\n-        case \'TBODY\':\n-          div.innerHTML = \'<table><tbody>\' +  html.stripScripts() + \'</tbody></table>\';\n-          depth = 2;\n-          break;\n-        case \'TR\':\n-          div.innerHTML = \'<table><tbody><tr>\' +  html.stripScripts() + \'</tr></tbody></table>\';\n-          depth = 3;\n-          break;\n-        case \'TD\':\n-          div.innerHTML = \'<table><tbody><tr><td>\' +  html.stripScripts() + \'</td></tr></tbody></table>\';\n-          depth = 4;\n-      }\n-      $A(element.childNodes).each(function(node) { element.removeChild(node) });\n-      depth.times(function() { div = div.firstChild });\n-      $A(div.childNodes).each(function(node) { element.appendChild(node) });\n-    } else {\n-      element.innerHTML = html.stripScripts();\n-    }\n-    setTimeout(function() { html.evalScripts() }, 10);\n-    return element;\n-  }\n-}\n-else if (Prototype.Browser.Gecko) {\n-  Element.Methods.setOpacity = function(element, value) {\n-    element = $(element);\n-    element.style.opacity = (value == 1) ? 0.999999 :\n-      (value === \'\') ? \'\' : (value < 0.00001) ? 0 : value;\n-    return element;\n-  };\n-}\n-\n-Element._attributeTranslations = {\n-  names: {\n-    colspan:   "colSpan",\n-    rowspan:   "rowSpan",\n-    valign:    "vAlign",\n-    datetime:  "dateTime",\n-    accesskey: "accessKey",\n-    tabindex:  "tabIndex",\n-    enctype:   "encType",\n-    maxlength: "maxLength",\n-    readonly:  "readOnly",\n-    longdesc:  "longDesc"\n-  },\n-  values: {\n-    _getAttr: function(element, attribute) {\n-      return element.getAttribute(attribute, 2);\n-    },\n-    _flag: function(element, attribute) {\n-      return $(element).hasAttribute(attribute) ? attribute : null;\n-    },\n-    style: function(element) {\n-      return element.style.cssText.toLowerCase();\n-    },\n-    title: function(element) {\n-      var node = element.getAttributeNode(\'title\');\n-      return node.specified ? node.nodeValue : null;\n-    }\n-  }\n-};\n-\n-(function() {\n-  Object.extend(this, {\n-    href: this._getAttr,\n-    src:  this._getAttr,\n-    type: this._getAttr,\n-    disabled: this._flag,\n-    checked:  this._flag,\n-    readonly: this._flag,\n-    multiple: this._flag\n-  });\n-}).call(Element._attributeTranslations.values);\n-\n-Element.Methods.Simulated = {\n-  hasAttribute: function(element, attribute) {\n-    var t = Element._attributeTranslations, node;\n-    attribute = t.names[attribute] || attribute;\n-    node = $(element).getAttributeNode(attribute);\n-    return node && node.specified;\n-  }\n-};\n-\n-Element.Methods.ByTag = {};\n-\n-Object.extend(Element, Element.Methods);\n-\n-if (!Prototype.BrowserFeatures.ElementExtensions &&\n- document.createElement(\'div\').__proto__) {\n-  window.HTMLElement = {};\n-  window.HTMLElement.prototype = document.createElement(\'div\').__proto__;\n-  Prototype.BrowserFeatures.ElementExtensions = true;\n-}\n-\n-Element.hasAttribute = function(element, attribute) {\n-  if (element.hasAttribute) return element.hasAttribute(attribute);\n-  return Element.Methods.Simulated.hasAttribute(element, attribute);\n-};\n-\n-Element.addMethods = function(methods) {\n-  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;\n-\n-  if (!methods) {\n-    Object.extend(Form, Form.Methods);\n-    Object.extend(Form.Element, Form.Element.Methods);\n-    Object.extend(Element.Methods.ByTag, {\n-      "FORM":     Object.clone(Form.Methods),\n-      "INPUT":    Object.clone(Form.Element.Methods),\n-      "SELECT":   Object.clone(Form.Element.Methods),\n-      "TEXTAREA": Object.clone(Form.Element.Methods)\n-    });\n-  }\n-\n-  if (arguments.length == 2) {\n-    var tagName = methods;\n-    methods = arguments[1];\n-  }\n-\n-  if (!tagName) Object.extend(Element.Methods, methods || {});\n-  else {\n-    if (tagName.constructor == Array) tagName.each(extend);\n-    else extend(tagName);\n-  }\n-\n-  function extend(tagName) {\n-    tagName = tagName.toUpperCase();\n-    if (!Element.Methods.ByTag[tagName])\n-      Element.Methods.ByTag[tagName] = {};\n-    Object.extend(Element.Methods.ByTag[tagName], methods);\n-  }\n-\n-  function copy(methods, destination, onlyIfAbsent) {\n-    onlyIfAbsent = onlyIfAbsent || false;\n-    var cache = Element.extend.cache;\n-    for (var property in methods) {\n-      var value = methods[property];\n-      if (!onlyIfAbsent || !(property in destination))\n-        destination[property] = cache.findOrStore(value);\n-    }\n-  }\n-\n-  function findDOMClass(tagName) {\n-    var klass;\n-    var trans = {\n-      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",\n-      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",\n-      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",\n-      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",\n-      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":\n-      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":\n-      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":\n-      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":\n-      "FrameSet", "IFRAME": "IFrame"\n-    };\n-    if (trans[tagName]) klass = \'HTML\' + trans[tagName] + \'Element\';\n-    if (window[klass]) return window[klass];\n-    klass = \'HTML\' + tagName + \'Element\';\n-    if (window[klass]) return window[klass];\n-    klass = \'HTML\' + tagName.capitalize() + \'Element\';\n-    if (window[klass]) return window[klass];\n-\n-    window[klass] = {};\n-    window[klass].prototype = document.createElement(tagName).__proto__;\n-    return window[klass];\n-  }\n-\n-  if (F.ElementExtensions) {\n-    copy(Element.Methods, HTMLElement.prototype);\n-    copy(Element.Methods.Simulated, HTMLElement.prototype, true);\n-  }\n-\n-  if (F.SpecificElementExtensions) {\n-    for (var tag in Element.Methods.ByTag) {\n-      var klass = findDOMClass(tag);\n-      if (typeof klass == "undefined") continue;\n-      copy(T[tag], klass.prototype);\n-    }\n-  }\n-\n-  Object.extend(Element, Element.Methods);\n-  delete Element.ByTag;\n-};\n-\n-var Toggle = { display: Element.toggle };\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Abstract.Insertion = function(adjacency) {\n-  this.adjacency = adjacency;\n-}\n-\n-Abstract.Insertion.prototype = {\n-  initialize: function(element, content) {\n-    this.element = $(element);\n-    this.content = content.stripScripts();\n-\n-    if (this.adjacency && this.element.insertAdjacentHTML) {\n-      try {\n-        this.element.insertAdjacentHTML(this.adjacency, this.content);\n-      } catch (e) {\n-        var tagName = this.element.tagName.toUpperCase();\n-        if ([\'TBODY\', \'TR\'].include(tagName)) {\n-          this.insertContent(this.contentFromAnonymousTable());\n-        } else {\n-          throw e;\n-        }\n-      }\n-    } else {\n-      this.range = this.element.ownerDocument.createRange();\n-      if (this.initializeRange) this.initializeRange();\n-      this.insertContent([this.range.createContextualFragment(this.content)]);\n-    }\n-\n-    setTimeout(function() {content.evalScripts()}, 10);\n-  },\n-\n-  contentFromAnonymousTable: function() {\n-    var div = document.createElement(\'div\');\n-    div.innerHTML = \'<table><tbody>\' + this.content + \'</tbody></table>\';\n-    return $A(div.childNodes[0].childNodes[0].childNodes);\n-  }\n-}\n-\n-var Insertion = new Object();\n-\n-Insertion.Before = Class.create();\n-Insertion.Before.prototype = Object.extend(new Abstract.Insertion(\'beforeBegin\'), {\n-  initializeRange: function() {\n-    this.range.setStartBefore(this.element);\n-  },\n-\n-  insertContent: function(fragments) {\n-    fragments.each((function(fragment) {\n-      this.element.parentNode.insertBefore(fragment, this.element);\n-    }).bind(this));\n-  }\n-});\n-\n-Insertion.Top = Class.create();\n-Insertion.Top.prototype = Object.extend(new Abstract.Insertion(\'afterBegin\'), {\n-  initializeRange: function() {\n-    this.range.selectNodeContents(this.element);\n-    this.range.collapse(true);\n-  },\n-\n-  insertContent: function(fragments) {\n-    fragments.reverse(false).each((function(fragment) {\n-      this.element.insertBefore(fragment, this.element.firstChild);\n-    }).bind(this));\n-  }\n-});\n-\n-Insertion.Bottom = Class.create();\n-Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion(\'beforeEnd\'), {\n-  initializeRange: function() {\n-    this.range.selectNodeContents(this.element);\n-    this.range.collapse(this.element);\n-  },\n-\n-  insertContent: function(fragments) {\n-    fragments.each((function(fragment) {\n-      this.element.appendChild(fragment);\n-    }).bind(this));\n-  }\n-});\n-\n-Insertion.After = Class.create();\n-Insertion.After.prototype = Object.extend(new Abstract.Insertion(\'afterEnd\'), {\n-  initializeRange: function() {\n-    this.range.setStartAfter(this.element);\n-  },\n-\n-  insertContent: function(fragments) {\n-    fragments.each((function(fragment) {\n-      this.element.parentNode.insertBefore(fragment,\n-        this.element.nextSibling);\n-    }).bind(this));\n-  }\n-});\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Element.ClassNames = Class.create();\n-Element.ClassNames.prototype = {\n-  initialize: function(element) {\n-    this.element = $(element);\n-  },\n-\n-  _each: function(iterator) {\n-    this.element.className.split(/\\s+/).select(function(name) {\n-      return name.length > 0;\n-    })._each(iterator);\n-  },\n-\n-  set: function(className) {\n-    this.element.className = className;\n-  },\n-\n-  add: function(classNameToAdd) {\n-    if (this.include(classNameToAdd)) return;\n-    this.set($A(this).concat(classNameToAdd).join(\' \'));\n-  },\n-\n-  remove: function(classNameToRemove) {\n-    if (!this.include(classNameToRemove)) return;\n-    this.set($A(this).without(classNameToRemove).join(\' \'));\n-  },\n-\n-  toString: function() {\n-    return $A(this).join(\' \');\n-  }\n-};\n-\n-Object.extend(Element.ClassNames.prototype, Enumerable);\n-/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,\n- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style\n- * license.  Please see http://www.yui-ext.com/ for more information. */\n-\n-var Selector = Class.create();\n-\n-Selector.prototype = {\n-  initialize: function(expression) {\n-    this.expression = expression.strip();\n-    this.compileMatcher();\n-  },\n-\n-  compileMatcher: function() {\n-    // Selectors with namespaced attributes can\'t use the XPath version\n-    if (Prototype.BrowserFeatures.XPath && !(/\\[[\\w-]*?:/).test(this.expression))\n-      return this.compileXPathMatcher();\n-\n-    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,\n-        c = Selector.criteria, le, p, m;\n-\n-    if (Selector._cache[e]) {\n-      this.matcher = Selector._cache[e]; return;\n-    }\n-    this.matcher = ["this.matcher = function(root) {",\n-                    "var r = root, h = Selector.handlers, c = false, n;"];\n-\n-    while (e && le != e && (/\\S/).test(e)) {\n-      le = e;\n-      for (var i in ps) {\n-        p = ps[i];\n-        if (m = e.match(p)) {\n-          this.matcher.push(typeof c[i] == \'function\' ? c[i](m) :\n-    \t      new Template(c[i]).evaluate(m));\n-          e = e.replace(m[0], \'\');\n-          break;\n-        }\n-      }\n-    }\n-\n-    this.matcher.push("return h.unique(n);\\n}");\n-    eval(this.matcher.join(\'\\n\'));\n-    Selector._cache[this.expression] = this.matcher;\n-  },\n-\n-  compileXPathMatcher: function() {\n-    var e = this.expression, ps = Selector.patterns,\n-        x = Selector.xpath, le,  m;\n-\n-    if (Selector._cache[e]) {\n-      this.xpath = Selector._cache[e]; return;\n-    }\n-\n-    this.matcher = [\'.//*\'];\n-    while (e && le != e && (/\\S/).test(e)) {\n-      le = e;\n-      for (var i in ps) {\n-        if (m = e.match(ps[i])) {\n-          this.matcher.push(typeof x[i] == \'function\' ? x[i](m) :\n-            new Template(x[i]).evaluate(m));\n-          e = e.replace(m[0], \'\');\n-          break;\n-        }\n-      }\n-    }\n-\n-    this.xpath = this.matcher.join(\'\');\n-    Selector._cache[this.expression] = this.xpath;\n-  },\n-\n-  findElements: function(root) {\n-    root = root || document;\n-    if (this.xpath) return document._getElementsByXPath(this.xpath, root);\n-    return this.matcher(root);\n-  },\n-\n-  match: function(element) {\n-    return this.findElements(document).include(element);\n-  },\n-\n-  toString: function() {\n-    return this.expression;\n-  },\n-\n-  inspect: function() {\n-    return "#<Selector:" + this.expression.inspect() + ">";\n-  }\n-};\n-\n-Object.extend(Selector, {\n-  _cache: {},\n-\n-  xpath: {\n-    descendant:   "//*",\n-    child:        "/*",\n-    adjacent:     "/following-sibling::*[1]",\n-    laterSibling: \'/following-sibling::*\',\n-    tagName:      function(m) {\n-      if (m[1] == \'*\') return \'\';\n-      return "[local-name()=\'" + m[1].toLowerCase() +\n-             "\' or local-name()=\'" + m[1].toUpperCase() + "\']";\n-    },\n-    className:    "[contains(concat(\' \', @class, \' \'), \' #{1} \')]",\n-    id:           "[@id=\'#{1}\']",\n-    attrPresence: "[@#{1}]",\n-    attr: function(m) {\n-      m[3] = m[5] || m[6];\n-      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);\n-    },\n-    pseudo: function(m) {\n-      var h = Selector.xpath.pseudos[m[1]];\n-      if (!h) return \'\';\n-      if (typeof h === \'function\') return h(m);\n-      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);\n-    },\n-    operators: {\n-      \'=\':  "[@#{1}=\'#{3}\']",\n-      \'!=\': "[@#{1}!=\'#{3}\']",\n-      \'^=\': "[starts-with(@#{1}, \'#{3}\')]",\n-      \'$=\': "[substring(@#{1}, (string-length(@#{1}) - string-length(\'#{3}\') + 1))=\'#{3}\']",\n-      \'*=\': "[contains(@#{1}, \'#{3}\')]",\n-      \'~=\': "[contains(concat(\' \', @#{1}, \' \'), \' #{3} \')]",\n-      \'|=\': "[contains(concat(\'-\', @#{1}, \'-\'), \'-#{3}-\')]"\n-    },\n-    pseudos: {\n-      \'first-child\': \'[not(preceding-sibling::*)]\',\n-      \'last-child\':  \'[not(following-sibling::*)]\',\n-      \'only-child\':  \'[not(preceding-sibling::* or following-sibling::*)]\',\n-      \'empty\':       "[count(*) = 0 and (count(text()) = 0 or translate(text(), \' \\t\\r\\n\', \'\') = \'\')]",\n-      \'checked\':     "[@checked]",\n-      \'disabled\':    "[@disabled]",\n-      \'enabled\':     "[not(@disabled)]",\n-      \'not\': function(m) {\n-        var e = m[6], p = Selector.patterns,\n-            x = Selector.xpath, le, m, v;\n-\n-        var exclusion = [];\n-        while (e && le != e && (/\\S/).test(e)) {\n-          le = e;\n-          for (var i in p) {\n-            if (m = e.match(p[i])) {\n-              v = typeof x[i] == \'function\' ? x[i](m) : new Template(x[i]).evaluate(m);\n-              exclusion.push("(" + v.substring(1, v.length - 1) + ")");\n-              e = e.replace(m[0], \'\');\n-              break;\n-            }\n-          }\n-        }\n-        return "[not(" + exclusion.join(" and ") + ")]";\n-      },\n-      \'nth-child\':      function(m) {\n-        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);\n-      },\n-      \'nth-last-child\': function(m) {\n-        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);\n-      },\n-      \'nth-of-type\':    function(m) {\n-        return Selector.xpath.pseudos.nth("position() ", m);\n-      },\n-      \'nth-last-of-type\': function(m) {\n-        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);\n-      },\n-      \'first-of-type\':  function(m) {\n-        m[6] = "1"; return Selector.xpath.pseudos[\'nth-of-type\'](m);\n-      },\n-      \'last-of-type\':   function(m) {\n-        m[6] = "1"; return Selector.xpath.pseudos[\'nth-last-of-type\'](m);\n-      },\n-      \'only-of-type\':   function(m) {\n-        var p = Selector.xpath.pseudos; return p[\'first-of-type\'](m) + p[\'last-of-type\'](m);\n-      },\n-      nth: function(fragment, m) {\n-        var mm, formula = m[6], predicate;\n-        if (formula == \'even\') formula = \'2n+0\';\n-        if (formula == \'odd\')  formula = \'2n+1\';\n-        if (mm = formula.match(/^(\\d+)$/)) // digit only\n-          return \'[\' + fragment + "= " + mm[1] + \']\';\n-        if (mm = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n-          if (mm[1] == "-") mm[1] = -1;\n-          var a = mm[1] ? Number(mm[1]) : 1;\n-          var b = mm[2] ? Number(mm[2]) : 0;\n-          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +\n-          "((#{fragment} - #{b}) div #{a} >= 0)]";\n-          return new Template(predicate).evaluate({\n-            fragment: fragment, a: a, b: b });\n-        }\n-      }\n-    }\n-  },\n-\n-  criteria: {\n-    tagName:      \'n = h.tagName(n, r, "#{1}", c);   c = false;\',\n-    className:    \'n = h.className(n, r, "#{1}", c); c = false;\',\n-    id:           \'n = h.id(n, r, "#{1}", c);        c = false;\',\n-    attrPresence: \'n = h.attrPresence(n, r, "#{1}"); c = false;\',\n-    attr: function(m) {\n-      m[3] = (m[5] || m[6]);\n-      return new Template(\'n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;\').evaluate(m);\n-    },\n-    pseudo:       function(m) {\n-      if (m[6]) m[6] = m[6].replace(/"/g, \'\\\\"\');\n-      return new Template(\'n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;\').evaluate(m);\n-    },\n-    descendant:   \'c = "descendant";\',\n-    child:        \'c = "child";\',\n-    adjacent:     \'c = "adjacent";\',\n-    laterSibling: \'c = "laterSibling";\'\n-  },\n-\n-  patterns: {\n-    // combinators must be listed first\n-    // (and descendant needs to be last combinator)\n-    laterSibling: /^\\s*~\\s*/,\n-    child:        /^\\s*>\\s*/,\n-    adjacent:     /^\\s*\\+\\s*/,\n-    descendant:   /^\\s/,\n-\n-    // selectors follow\n-    tagName:      /^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,\n-    id:           /^#([\\w\\-\\*]+)(\\b|$)/,\n-    className:    /^\\.([\\w\\-\\*]+)(\\b|$)/,\n-    pseudo:       /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|\\s|(?=:))/,\n-    attrPresence: /^\\[([\\w]+)\\]/,\n-    attr:         /\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\]]*?)\\4|([^\'"][^\\]]*?)))?\\]/\n-  },\n-\n-  handlers: {\n-    // UTILITY FUNCTIONS\n-    // joins two collections\n-    concat: function(a, b) {\n-      for (var i = 0, node; node = b[i]; i++)\n-        a.push(node);\n-      return a;\n-    },\n-\n-    // marks an array of nodes for counting\n-    mark: function(nodes) {\n-      for (var i = 0, node; node = nodes[i]; i++)\n-        node._counted = true;\n-      return nodes;\n-    },\n-\n-    unmark: function(nodes) {\n-      for (var i = 0, node; node = nodes[i]; i++)\n-        node._counted = undefined;\n-      return nodes;\n-    },\n-\n-    // mark each child node with its position (for nth calls)\n-    // "ofType" flag indicates whether we\'re indexing for nth-of-type\n-    // rather than nth-child\n-    index: function(parentNode, reverse, ofType) {\n-      parentNode._counted = true;\n-      if (reverse) {\n-        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {\n-          node = nodes[i];\n-          if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n-        }\n-      } else {\n-        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)\n-          if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n-      }\n-    },\n-\n-    // filters out duplicates and extends all nodes\n-    unique: function(nodes) {\n-      if (nodes.length == 0) return nodes;\n-      var results = [], n;\n-      for (var i = 0, l = nodes.length; i < l; i++)\n-        if (!(n = nodes[i])._counted) {\n-          n._counted = true;\n-          results.push(Element.extend(n));\n-        }\n-      return Selector.handlers.unmark(results);\n-    },\n-\n-    // COMBINATOR FUNCTIONS\n-    descendant: function(nodes) {\n-      var h = Selector.handlers;\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        h.concat(results, node.getElementsByTagName(\'*\'));\n-      return results;\n-    },\n-\n-    child: function(nodes) {\n-      var h = Selector.handlers;\n-      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n-        for (var j = 0, children = [], child; child = node.childNodes[j]; j++)\n-          if (child.nodeType == 1 && child.tagName != \'!\') results.push(child);\n-      }\n-      return results;\n-    },\n-\n-    adjacent: function(nodes) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n-        var next = this.nextElementSibling(node);\n-        if (next) results.push(next);\n-      }\n-      return results;\n-    },\n-\n-    laterSibling: function(nodes) {\n-      var h = Selector.handlers;\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        h.concat(results, Element.nextSiblings(node));\n-      return results;\n-    },\n-\n-    nextElementSibling: function(node) {\n-      while (node = node.nextSibling)\n-\t      if (node.nodeType == 1) return node;\n-      return null;\n-    },\n-\n-    previousElementSibling: function(node) {\n-      while (node = node.previousSibling)\n-        if (node.nodeType == 1) return node;\n-      return null;\n-    },\n-\n-    // TOKEN FUNCTIONS\n-    tagName: function(nodes, root, tagName, combinator) {\n-      tagName = tagName.toUpperCase();\n-      var results = [], h = Selector.handlers;\n-      if (nodes) {\n-        if (combinator) {\n-          // fastlane for ordinary descendant combinators\n-          if (combinator == "descendant") {\n-            for (var i = 0, node; node = nodes[i]; i++)\n-              h.concat(results, node.getElementsByTagName(tagName));\n-            return results;\n-          } else nodes = this[combinator](nodes);\n-          if (tagName == "*") return nodes;\n-        }\n-        for (var i = 0, node; node = nodes[i]; i++)\n-          if (node.tagName.toUpperCase() == tagName) results.push(node);\n-        return results;\n-      } else return root.getElementsByTagName(tagName);\n-    },\n-\n-    id: function(nodes, root, id, combinator) {\n-      var targetNode = $(id), h = Selector.handlers;\n-      if (!nodes && root == document) return targetNode ? [targetNode] : [];\n-      if (nodes) {\n-        if (combinator) {\n-          if (combinator == \'child\') {\n-            for (var i = 0, node; node = nodes[i]; i++)\n-              if (targetNode.parentNode == node) return [targetNode];\n-          } else if (combinator == \'descendant\') {\n-            for (var i = 0, node; node = nodes[i]; i++)\n-              if (Element.descendantOf(targetNode, node)) return [targetNode];\n-          } else if (combinator == \'adjacent\') {\n-            for (var i = 0, node; node = nodes[i]; i++)\n-              if (Selector.handlers.previousElementSibling(targetNode) == node)\n-                return [targetNode];\n-          } else nodes = h[combinator](nodes);\n-        }\n-        for (var i = 0, node; node = nodes[i]; i++)\n-          if (node == targetNode) return [targetNode];\n-        return [];\n-      }\n-      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];\n-    },\n-\n-    className: function(nodes, root, className, combinator) {\n-      if (nodes && combinator) nodes = this[combinator](nodes);\n-      return Selector.handlers.byClassName(nodes, root, className);\n-    },\n-\n-    byClassName: function(nodes, root, className) {\n-      if (!nodes) nodes = Selector.handlers.descendant([root]);\n-      var needle = \' \' + className + \' \';\n-      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {\n-        nodeClassName = node.className;\n-        if (nodeClassName.length == 0) continue;\n-        if (nodeClassName == className || (\' \' + nodeClassName + \' \').include(needle))\n-          results.push(node);\n-      }\n-      return results;\n-    },\n-\n-    attrPresence: function(nodes, root, attr) {\n-      var results = [];\n-      for (var i = 0, node; node = nodes[i]; i++)\n-        if (Element.hasAttribute(node, attr)) results.push(node);\n-      return results;\n-    },\n-\n-    attr: function(nodes, root, attr, value, operator) {\n-      if (!nodes) nodes = root.getElementsByTagName("*");\n-      var handler = Selector.operators[operator], results = [];\n-      for (var i = 0, node; node = nodes[i]; i++) {\n-        var nodeValue = Element.readAttribute(node, attr);\n-        if (nodeValue === null) continue;\n-        if (handler(nodeValue, value)) results.push(node);\n-      }\n-      return results;\n-    },\n-\n-    pseudo: function(nodes, name, value, root, combinator) {\n-      if (nodes && combinator) nodes = this[combinator](nodes);\n-      if (!nodes) nodes = root.getElementsByTagName("*");\n-      return Selector.pseudos[name](nodes, value, root);\n-    }\n-  },\n-\n-  pseudos: {\n-    \'first-child\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n-        if (Selector.handlers.previousElementSibling(node)) continue;\n-          results.push(node);\n-      }\n-      return results;\n-    },\n-    \'last-child\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n-        if (Selector.handlers.nextElementSibling(node)) continue;\n-          results.push(node);\n-      }\n-      return results;\n-    },\n-    \'only-child\': function(nodes, value, root) {\n-      var h = Selector.handlers;\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))\n-          results.push(node);\n-      return results;\n-    },\n-    \'nth-child\':        function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, formula, root);\n-    },\n-    \'nth-last-child\':   function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, formula, root, true);\n-    },\n-    \'nth-of-type\':      function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, formula, root, false, true);\n-    },\n-    \'nth-last-of-type\': function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, formula, root, true, true);\n-    },\n-    \'first-of-type\':    function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, "1", root, false, true);\n-    },\n-    \'last-of-type\':     function(nodes, formula, root) {\n-      return Selector.pseudos.nth(nodes, "1", root, true, true);\n-    },\n-    \'only-of-type\':     function(nodes, formula, root) {\n-      var p = Selector.pseudos;\n-      return p[\'last-of-type\'](p[\'first-of-type\'](nodes, formula, root), formula, root);\n-    },\n-\n-    // handles the an+b logic\n-    getIndices: function(a, b, total) {\n-      if (a == 0) return b > 0 ? [b] : [];\n-      return $R(1, total).inject([], function(memo, i) {\n-        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);\n-        return memo;\n-      });\n-    },\n-\n-    // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type\n-    nth: function(nodes, formula, root, reverse, ofType) {\n-      if (nodes.length == 0) return [];\n-      if (formula == \'even\') formula = \'2n+0\';\n-      if (formula == \'odd\')  formula = \'2n+1\';\n-      var h = Selector.handlers, results = [], indexed = [], m;\n-      h.mark(nodes);\n-      for (var i = 0, node; node = nodes[i]; i++) {\n-        if (!node.parentNode._counted) {\n-          h.index(node.parentNode, reverse, ofType);\n-          indexed.push(node.parentNode);\n-        }\n-      }\n-      if (formula.match(/^\\d+$/)) { // just a number\n-        formula = Number(formula);\n-        for (var i = 0, node; node = nodes[i]; i++)\n-          if (node.nodeIndex == formula) results.push(node);\n-      } else if (m = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n-        if (m[1] == "-") m[1] = -1;\n-        var a = m[1] ? Number(m[1]) : 1;\n-        var b = m[2] ? Number(m[2]) : 0;\n-        var indices = Selector.pseudos.getIndices(a, b, nodes.length);\n-        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {\n-          for (var j = 0; j < l; j++)\n-            if (node.nodeIndex == indices[j]) results.push(node);\n-        }\n-      }\n-      h.unmark(nodes);\n-      h.unmark(indexed);\n-      return results;\n-    },\n-\n-    \'empty\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++) {\n-        // IE treats comments as element nodes\n-        if (node.tagName == \'!\' || (node.firstChild && !node.innerHTML.match(/^\\s*$/))) continue;\n-        results.push(node);\n-      }\n-      return results;\n-    },\n-\n-    \'not\': function(nodes, selector, root) {\n-      var h = Selector.handlers, selectorType, m;\n-      var exclusions = new Selector(selector).findElements(root);\n-      h.mark(exclusions);\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        if (!node._counted) results.push(node);\n-      h.unmark(exclusions);\n-      return results;\n-    },\n-\n-    \'enabled\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        if (!node.disabled) results.push(node);\n-      return results;\n-    },\n-\n-    \'disabled\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        if (node.disabled) results.push(node);\n-      return results;\n-    },\n-\n-    \'checked\': function(nodes, value, root) {\n-      for (var i = 0, results = [], node; node = nodes[i]; i++)\n-        if (node.checked) results.push(node);\n-      return results;\n-    }\n-  },\n-\n-  operators: {\n-    \'=\':  function(nv, v) { return nv == v; },\n-    \'!=\': function(nv, v) { return nv != v; },\n-    \'^=\': function(nv, v) { return nv.startsWith(v); },\n-    \'$=\': function(nv, v) { return nv.endsWith(v); },\n-    \'*=\': function(nv, v) { return nv.include(v); },\n-    \'~=\': function(nv, v) { return (\' \' + nv + \' \').include(\' \' + v + \' \'); },\n-    \'|=\': function(nv, v) { return (\'-\' + nv.toUpperCase() + \'-\').include(\'-\' + v.toUpperCase() + \'-\'); }\n-  },\n-\n-  matchElements: function(elements, expression) {\n-    var matches = new Selector(expression).findElements(), h = Selector.handlers;\n-    h.mark(matches);\n-    for (var i = 0, results = [], element; element = elements[i]; i++)\n-      if (element._counted) results.push(element);\n-    h.unmark(matches);\n-    return results;\n-  },\n-\n-  findElement: function(elements, expression, index) {\n-    if (typeof expression == \'number\') {\n-      index = expression; expression = false;\n-    }\n-    return Selector.matchElements(elements, expression || \'*\')[index || 0];\n-  },\n-\n-  findChildElements: function(element, expressions) {\n-    var exprs = expressions.join(\',\'), expressions = [];\n-    exprs.scan(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/, function(m) {\n-      expressions.push(m[1].strip());\n-    });\n-    var results = [], h = Selector.handlers;\n-    for (var i = 0, l = expressions.length, selector; i < l; i++) {\n-      selector = new Selector(expressions[i].strip());\n-      h.concat(results, selector.findElements(element));\n-    }\n-    return (l > 1) ? h.unique(results) : results;\n-  }\n-});\n-\n-function $$() {\n-  return Selector.findChildElements(document, $A(arguments));\n-}\n-var Form = {\n-  reset: function(form) {\n-    $(form).reset();\n-    return form;\n-  },\n-\n-  serializeElements: function(elements, getHash) {\n-    var data = elements.inject({}, function(result, element) {\n-      if (!element.disabled && element.name) {\n-        var key = element.name, value = $(element).getValue();\n-        if (value != null) {\n-         \tif (key in result) {\n-            if (result[key].constructor != Array) result[key] = [result[key]];\n-            result[key].push(value);\n-          }\n-          else result[key] = value;\n-        }\n-      }\n-      return result;\n-    });\n-\n-    return getHash ? data : Hash.toQueryString(data);\n-  }\n-};\n-\n-Form.Methods = {\n-  serialize: function(form, getHash) {\n-    return Form.serializeElements(Form.getElements(form), getHash);\n-  },\n-\n-  getElements: function(form) {\n-    return $A($(form).getElementsByTagName(\'*\')).inject([],\n-      function(elements, child) {\n-        if (Form.Element.Serializers[child.tagName.toLowerCase()])\n-          elements.push(Element.extend(child));\n-        return elements;\n-      }\n-    );\n-  },\n-\n-  getInputs: function(form, typeName, name) {\n-    form = $(form);\n-    var inputs = form.getElementsByTagName(\'input\');\n-\n-    if (!typeName && !name) return $A(inputs).map(Element.extend);\n-\n-    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {\n-      var input = inputs[i];\n-      if ((typeName && input.type != typeName) || (name && input.name != name))\n-        continue;\n-      matchingInputs.push(Element.extend(input));\n-    }\n-\n-    return matchingInputs;\n-  },\n-\n-  disable: function(form) {\n-    form = $(form);\n-    Form.getElements(form).invoke(\'disable\');\n-    return form;\n-  },\n-\n-  enable: function(form) {\n-    form = $(form);\n-    Form.getElements(form).invoke(\'enable\');\n-    return form;\n-  },\n-\n-  findFirstElement: function(form) {\n-    return $(form).getElements().find(function(element) {\n-      return element.type != \'hidden\' && !element.disabled &&\n-        [\'input\', \'select\', \'textarea\'].include(element.tagName.toLowerCase());\n-    });\n-  },\n-\n-  focusFirstElement: function(form) {\n-    form = $(form);\n-    form.findFirstElement().activate();\n-    return form;\n-  },\n-\n-  request: function(form, options) {\n-    form = $(form), options = Object.clone(options || {});\n-\n-    var params = options.parameters;\n-    options.parameters = form.serialize(true);\n-\n-    if (params) {\n-      if (typeof params == \'string\') params = params.toQueryParams();\n-      Object.extend(options.parameters, params);\n-    }\n-\n-    if (form.hasAttribute(\'method\') && !options.method)\n-      options.method = form.method;\n-\n-    return new Ajax.Request(form.readAttribute(\'action\'), options);\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Form.Element = {\n-  focus: function(element) {\n-    $(element).focus();\n-    return element;\n-  },\n-\n-  select: function(element) {\n-    $(element).select();\n-    return element;\n-  }\n-}\n-\n-Form.Element.Methods = {\n-  serialize: function(element) {\n-    element = $(element);\n-    if (!element.disabled && element.name) {\n-      var value = element.getValue();\n-      if (value != undefined) {\n-        var pair = {};\n-        pair[element.name] = value;\n-        return Hash.toQueryString(pair);\n-      }\n-    }\n-    return \'\';\n-  },\n-\n-  getValue: function(element) {\n-    element = $(element);\n-    var method = element.tagName.toLowerCase();\n-    return Form.Element.Serializers[method](element);\n-  },\n-\n-  clear: function(element) {\n-    $(element).value = \'\';\n-    return element;\n-  },\n-\n-  present: function(element) {\n-    return $(element).value != \'\';\n-  },\n-\n-  activate: function(element) {\n-    element = $(element);\n-    try {\n-      element.focus();\n-      if (element.select && (element.tagName.toLowerCase() != \'input\' ||\n-        ![\'button\', \'reset\', \'submit\'].include(element.type)))\n-        element.select();\n-    } catch (e) {}\n-    return element;\n-  },\n-\n-  disable: function(element) {\n-    element = $(element);\n-    element.blur();\n-    element.disabled = true;\n-    return element;\n-  },\n-\n-  enable: function(element) {\n-    element = $(element);\n-    element.disabled = false;\n-    return element;\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-var Field = Form.Element;\n-var $F = Form.Element.Methods.getValue;\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Form.Element.Serializers = {\n-  input: function(element) {\n-    switch (element.type.toLowerCase()) {\n-      case \'checkbox\':\n-      case \'radio\':\n-        return Form.Element.Serializers.inputSelector(element);\n-      default:\n-        return Form.Element.Serializers.textarea(element);\n-    }\n-  },\n-\n-  inputSelector: function(element) {\n-    return element.checked ? element.value : null;\n-  },\n-\n-  textarea: function(element) {\n-    return element.value;\n-  },\n-\n-  select: function(element) {\n-    return this[element.type == \'select-one\' ?\n-      \'selectOne\' : \'selectMany\'](element);\n-  },\n-\n-  selectOne: function(element) {\n-    var index = element.selectedIndex;\n-    return index >= 0 ? this.optionValue(element.options[index]) : null;\n-  },\n-\n-  selectMany: function(element) {\n-    var values, length = element.length;\n-    if (!length) return null;\n-\n-    for (var i = 0, values = []; i < length; i++) {\n-      var opt = element.options[i];\n-      if (opt.selected) values.push(this.optionValue(opt));\n-    }\n-    return values;\n-  },\n-\n-  optionValue: function(opt) {\n-    // extend element because hasAttribute may not be native\n-    return Element.extend(opt).hasAttribute(\'value\') ? opt.value : opt.text;\n-  }\n-}\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Abstract.TimedObserver = function() {}\n-Abstract.TimedObserver.prototype = {\n-  initialize: function(element, frequency, callback) {\n-    this.frequency = frequency;\n-    this.element   = $(element);\n-    this.callback  = callback;\n-\n-    this.lastValue = this.getValue();\n-    this.registerCallback();\n-  },\n-\n-  registerCallback: function() {\n-    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n-  },\n-\n-  onTimerEvent: function() {\n-    var value = this.getValue();\n-    var changed = (\'string\' == typeof this.lastValue && \'string\' == typeof value\n-      ? this.lastValue != value : String(this.lastValue) != String(value));\n-    if (changed) {\n-      this.callback(this.element, value);\n-      this.lastValue = value;\n-    }\n-  }\n-}\n-\n-Form.Element.Observer = Class.create();\n-Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n-  getValue: function() {\n-    return Form.Element.getValue(this.element);\n-  }\n-});\n-\n-Form.Observer = Class.create();\n-Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n-  getValue: function() {\n-    return Form.serialize(this.element);\n-  }\n-});\n-\n-/*--------------------------------------------------------------------------*/\n-\n-Abstract.EventObserver = function() {}\n-Abstract.EventObserver.prototype = {\n-  initialize: function(element, callback) {\n-    this.element  = $(element);\n-    this.callback = callback;\n-\n-    this.lastValue = this.getValue();\n-    if (this.element.tagName.toLowerCase() == \'form\')\n-      this.registerFormCallbacks();\n-    else\n-      this.registerCallback(this.element);\n-  },\n-\n-  onElementEvent: function() {\n-    var value = this.getValue();\n-    if (this.lastValue != value) {\n-      this.callback(this.element, value);\n-      this.lastValue = value;\n-    }\n-  },\n-\n-  registerFormCallbacks: function() {\n-    Form.getElements(this.element).each(this.registerCallback.bind(this));\n-  },\n-\n-  registerCallback: function(element) {\n-    if (element.type) {\n-      switch (element.type.toLowerCase()) {\n-        case \'checkbox\':\n-        case \'radio\':\n-          Event.observe(element, \'click\', this.onElementEvent.bind(this));\n-          break;\n-        default:\n-          Event.observe(element, \'change\', this.onElementEvent.bind(this));\n-          break;\n-      }\n-    }\n-  }\n-}\n-\n-Form.Element.EventObserver = Class.create();\n-Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n-  getValue: function() {\n-    return Form.Element.getValue(this.element);\n-  }\n-});\n-\n-Form.EventObserver = Class.create();\n-Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n-  getValue: function() {\n-    return Form.serialize(this.element);\n-  }\n-});\n-if (!window.Event) {\n-  var Event = new Object();\n-}\n-\n-Object.extend(Event, {\n-  KEY_BACKSPACE: 8,\n-  KEY_TAB:       9,\n-  KEY_RETURN:   13,\n-  KEY_ESC:      27,\n-  KEY_LEFT:     37,\n-  KEY_UP:       38,\n-  KEY_RIGHT:    39,\n-  KEY_DOWN:     40,\n-  KEY_DELETE:   46,\n-  KEY_HOME:     36,\n-  KEY_END:      35,\n-  KEY_PAGEUP:   33,\n-  KEY_PAGEDOWN: 34,\n-\n-  element: function(event) {\n-    return $(event.target || event.srcElement);\n-  },\n-\n-  isLeftClick: function(event) {\n-    return (((event.which) && (event.which == 1)) ||\n-            ((event.button) && (event.button == 1)));\n-  },\n-\n-  pointerX: function(event) {\n-    return event.pageX || (event.clientX +\n-      (document.documentElement.scrollLeft || document.body.scrollLeft));\n-  },\n-\n-  pointerY: function(event) {\n-    return event.pageY || (event.clientY +\n-      (document.documentElement.scrollTop || document.body.scrollTop));\n-  },\n-\n-  stop: function(event) {\n-    if (event.preventDefault) {\n-      event.preventDefault();\n-      event.stopPropagation();\n-    } else {\n-      event.returnValue = false;\n-      event.cancelBubble = true;\n-    }\n-  },\n-\n-  // find the first node with the given tagName, starting from the\n-  // node the event was triggered on; traverses the DOM upwards\n-  findElement: function(event, tagName) {\n-    var element = Event.element(event);\n-    while (element.parentNode && (!element.tagName ||\n-        (element.tagName.toUpperCase() != tagName.toUpperCase())))\n-      element = element.parentNode;\n-    return element;\n-  },\n-\n-  observers: false,\n-\n-  _observeAndCache: function(element, name, observer, useCapture) {\n-    if (!this.observers) this.observers = [];\n-    if (element.addEventListener) {\n-      this.observers.push([element, name, observer, useCapture]);\n-      element.addEventListener(name, observer, useCapture);\n-    } else if (element.attachEvent) {\n-      this.observers.push([element, name, observer, useCapture]);\n-      element.attachEvent(\'on\' + name, observer);\n-    }\n-  },\n-\n-  unloadCache: function() {\n-    if (!Event.observers) return;\n-    for (var i = 0, length = Event.observers.length; i < length; i++) {\n-      Event.stopObserving.apply(this, Event.observers[i]);\n-      Event.observers[i][0] = null;\n-    }\n-    Event.observers = false;\n-  },\n-\n-  observe: function(element, name, observer, useCapture) {\n-    element = $(element);\n-    useCapture = useCapture || false;\n-\n-    if (name == \'keypress\' &&\n-      (Prototype.Browser.WebKit || element.attachEvent))\n-      name = \'keydown\';\n-\n-    Event._observeAndCache(element, name, observer, useCapture);\n-  },\n-\n-  stopObserving: function(element, name, observer, useCapture) {\n-    element = $(element);\n-    useCapture = useCapture || false;\n-\n-    if (name == \'keypress\' &&\n-        (Prototype.Browser.WebKit || element.attachEvent))\n-      name = \'keydown\';\n-\n-    if (element.removeEventListener) {\n-      element.removeEventListener(name, observer, useCapture);\n-    } else if (element.detachEvent) {\n-      try {\n-        element.detachEvent(\'on\' + name, observer);\n-      } catch (e) {}\n-    }\n-  }\n-});\n-\n-/* prevent memory leaks in IE */\n-if (Prototype.Browser.IE)\n-  Event.observe(window, \'unload\', Event.unloadCache, false);\n-var Position = {\n-  // set to true if needed, warning: firefox performance problems\n-  // NOT neeeded for page scrolling, only if draggable contained in\n-  // scrollable elements\n-  includeScrollOffsets: false,\n-\n-  // must be called before calling withinIncludingScrolloffset, every time the\n-  // page is scrolled\n-  prepare: function() {\n-    this.deltaX =  window.pageXOffset\n-                || document.documentElement.scrollLeft\n-                || document.body.scrollLeft\n-                || 0;\n-    this.deltaY =  window.pageYOffset\n-                || document.documentElement.scrollTop\n-                || document.body.scrollTop\n-                || 0;\n-  },\n-\n-  realOffset: function(element) {\n-    var valueT = 0, valueL = 0;\n-    do {\n-      valueT += element.scrollTop  || 0;\n-      valueL += element.scrollLeft || 0;\n-      element = element.parentNode;\n-    } while (element);\n-    return [valueL, valueT];\n-  },\n-\n-  cumulativeOffset: function(element) {\n-    var valueT = 0, valueL = 0;\n-    do {\n-      valueT += element.offsetTop  || 0;\n-      valueL += element.offsetLeft || 0;\n-      element = element.offsetParent;\n-    } while (element);\n-    return [valueL, valueT];\n-  },\n-\n-  positionedOffset: function(element) {\n-    var valueT = 0, valueL = 0;\n-    do {\n-      valueT += element.offsetTop  || 0;\n-      valueL += element.offsetLeft || 0;\n-      element = element.offsetParent;\n-      if (element) {\n-        if(element.tagName==\'BODY\') break;\n-        var p = Element.getStyle(element, \'position\');\n-        if (p == \'relative\' || p == \'absolute\') break;\n-      }\n-    } while (element);\n-    return [valueL, valueT];\n-  },\n-\n-  offsetParent: function(element) {\n-    if (element.offsetParent) return element.offsetParent;\n-    if (element == document.body) return element;\n-\n-    while ((element = element.parentNode) && element != document.body)\n-      if (Element.getStyle(element, \'position\') != \'static\')\n-        return element;\n-\n-    return document.body;\n-  },\n-\n-  // caches x/y coordinate pair to use with overlap\n-  within: function(element, x, y) {\n-    if (this.includeScrollOffsets)\n-      return this.withinIncludingScrolloffsets(element, x, y);\n-    this.xcomp = x;\n-    this.ycomp = y;\n-    this.offset = this.cumulativeOffset(element);\n-\n-    return (y >= this.offset[1] &&\n-            y <  this.offset[1] + element.offsetHeight &&\n-            x >= this.offset[0] &&\n-            x <  this.offset[0] + element.offsetWidth);\n-  },\n-\n-  withinIncludingScrolloffsets: function(element, x, y) {\n-    var offsetcache = this.realOffset(element);\n-\n-    this.xcomp = x + offsetcache[0] - this.deltaX;\n-    this.ycomp = y + offsetcache[1] - this.deltaY;\n-    this.offset = this.cumulativeOffset(element);\n-\n-    return (this.ycomp >= this.offset[1] &&\n-            this.ycomp <  this.offset[1] + element.offsetHeight &&\n-            this.xcomp >= this.offset[0] &&\n-            this.xcomp <  this.offset[0] + element.offsetWidth);\n-  },\n-\n-  // within must be called directly before\n-  overlap: function(mode, element) {\n-    if (!mode) return 0;\n-    if (mode == \'vertical\')\n-      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /\n-        element.offsetHeight;\n-    if (mode == \'horizontal\')\n-      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /\n-        element.offsetWidth;\n-  },\n-\n-  page: function(forElement) {\n-    var valueT = 0, valueL = 0;\n-\n-    var element = forElement;\n-    do {\n-      valueT += element.offsetTop  || 0;\n-      valueL += element.offsetLeft || 0;\n-\n-      // Safari fix\n-      if (element.offsetParent == document.body)\n-        if (Element.getStyle(element,\'position\')==\'absolute\') break;\n-\n-    } while (element = element.offsetParent);\n-\n-    element = forElement;\n-    do {\n-      if (!window.opera || element.tagName==\'BODY\') {\n-        valueT -= element.scrollTop  || 0;\n-        valueL -= element.scrollLeft || 0;\n-      }\n-    } while (element = element.parentNode);\n-\n-    return [valueL, valueT];\n-  },\n-\n-  clone: function(source, target) {\n-    var options = Object.extend({\n-      setLeft:    true,\n-      setTop:     true,\n-      setWidth:   true,\n-      setHeight:  true,\n-      offsetTop:  0,\n-      offsetLeft: 0\n-    }, arguments[2] || {})\n-\n-    // find page position of source\n-    source = $(source);\n-    var p = Position.page(source);\n-\n-    // find coordinate system to use\n-    target = $(target);\n-    var delta = [0, 0];\n-    var parent = null;\n-    // delta [0,0] will do fine with position: fixed elements,\n-    // position:absolute needs offsetParent deltas\n-    if (Element.getStyle(target,\'position\') == \'absolute\') {\n-      parent = Position.offsetParent(target);\n-      delta = Position.page(parent);\n-    }\n-\n-    // correct by body offsets (fixes Safari)\n-    if (parent == document.body) {\n-      delta[0] -= document.body.offsetLeft;\n-      delta[1] -= document.body.offsetTop;\n-    }\n-\n-    // set position\n-    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + \'px\';\n-    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + \'px\';\n-    if(options.setWidth)  target.style.width = source.offsetWidth + \'px\';\n-    if(options.setHeight) target.style.height = source.offsetHeight + \'px\';\n-  },\n-\n-  absolutize: function(element) {\n-    element = $(element);\n-    if (element.style.position == \'absolute\') return;\n-    Position.prepare();\n-\n-    var offsets = Position.positionedOffset(element);\n-    var top     = offsets[1];\n-    var left    = offsets[0];\n-    var width   = element.clientWidth;\n-    var height  = element.clientHeight;\n-\n-    element._originalLeft   = left - parseFloat(element.style.left  || 0);\n-    element._originalTop    = top  - parseFloat(element.style.top || 0);\n-    element._originalWidth  = element.style.width;\n-    element._originalHeight = element.style.height;\n-\n-    element.style.position = \'absolute\';\n-    element.style.top    = top + \'px\';\n-    element.style.left   = left + \'px\';\n-    element.style.width  = width + \'px\';\n-    element.style.height = height + \'px\';\n-  },\n-\n-  relativize: function(element) {\n-    element = $(element);\n-    if (element.style.position == \'relative\') return;\n-    Position.prepare();\n-\n-    element.style.position = \'relative\';\n-    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);\n-    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);\n-\n-    element.style.top    = top + \'px\';\n-    element.style.left   = left + \'px\';\n-    element.style.height = element._originalHeight;\n-    element.style.width  = element._originalWidth;\n-  }\n-}\n-\n-// Safari returns margins on body which is incorrect if the child is absolutely\n-// positioned.  For performance reasons, redefine Position.cumulativeOffset for\n-// KHTML/WebKit only.\n-if (Prototype.Browser.WebKit) {\n-  Position.cumulativeOffset = function(element) {\n-    var valueT = 0, valueL = 0;\n-    do {\n-      valueT += element.offsetTop  || 0;\n-      valueL += element.offsetLeft || 0;\n-      if (element.offsetParent == document.body)\n-        if (Element.getStyle(element, \'position\') == \'absolute\') break;\n-\n-      element = element.offsetParent;\n-    } while (element);\n-\n-    return [valueL, valueT];\n-  }\n-}\n-\n-Element.addMethods();\n\\ No newline at end of file\ndiff --git a/jslib/scriptaculous.js b/jslib/scriptaculous.js\ndeleted file mode 100644\nindex 7c472a600..000000000\n--- a/jslib/scriptaculous.js\n+++ /dev/null\n@@ -1,58 +0,0 @@\n-// script.aculo.us scriptaculous.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-// \n-// Permission is hereby granted, free of charge, to any person obtaining\n-// a copy of this software and associated documentation files (the\n-// "Software"), to deal in the Software without restriction, including\n-// without limitation the rights to use, copy, modify, merge, publish,\n-// distribute, sublicense, and/or sell copies of the Software, and to\n-// permit persons to whom the Software is furnished to do so, subject to\n-// the following conditions:\n-// \n-// The above copyright notice and this permission notice shall be\n-// included in all copies or substantial portions of the Software.\n-//\n-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\n-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n-//\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-var Scriptaculous = {\n-  Version: \'1.7.1_beta3\',\n-  require: function(libraryName) {\n-    // inserting via DOM fails in Safari 2.0, so brute force approach\n-    document.write(\'<script type="text/javascript" src="\'+libraryName+\'"></script>\');\n-  },\n-  REQUIRED_PROTOTYPE: \'1.5.1\',\n-  load: function() {\n-    function convertVersionString(versionString){\n-      var r = versionString.split(\'.\');\n-      return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);\n-    }\n- \n-    if((typeof Prototype==\'undefined\') || \n-       (typeof Element == \'undefined\') || \n-       (typeof Element.Methods==\'undefined\') ||\n-       (convertVersionString(Prototype.Version) < \n-        convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))\n-       throw("script.aculo.us requires the Prototype JavaScript framework >= " +\n-        Scriptaculous.REQUIRED_PROTOTYPE);\n-    \n-    $A(document.getElementsByTagName("script")).findAll( function(s) {\n-      return (s.src && s.src.match(/scriptaculous\\.js(\\?.*)?$/))\n-    }).each( function(s) {\n-      var path = s.src.replace(/scriptaculous\\.js(\\?.*)?$/,\'\');\n-      var includes = s.src.match(/\\?.*load=([a-z,]*)/);\n-      (includes ? includes[1] : \'builder,effects,dragdrop,controls,slider,sound\').split(\',\').each(\n-       function(include) { Scriptaculous.require(path+include+\'.js\') });\n-    });\n-  }\n-}\n-\n-Scriptaculous.load();\n\\ No newline at end of file\ndiff --git a/jslib/slider.js b/jslib/slider.js\ndeleted file mode 100644\nindex c1a84ebfb..000000000\n--- a/jslib/slider.js\n+++ /dev/null\n@@ -1,277 +0,0 @@\n-// script.aculo.us slider.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Marty Haught, Thomas Fuchs \n-//\n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-if(!Control) var Control = {};\n-Control.Slider = Class.create();\n-\n-// options:\n-//  axis: \'vertical\', or \'horizontal\' (default)\n-//\n-// callbacks:\n-//  onChange(value)\n-//  onSlide(value)\n-Control.Slider.prototype = {\n-  initialize: function(handle, track, options) {\n-    var slider = this;\n-    \n-    if(handle instanceof Array) {\n-      this.handles = handle.collect( function(e) { return $(e) });\n-    } else {\n-      this.handles = [$(handle)];\n-    }\n-    \n-    this.track   = $(track);\n-    this.options = options || {};\n-\n-    this.axis      = this.options.axis || \'horizontal\';\n-    this.increment = this.options.increment || 1;\n-    this.step      = parseInt(this.options.step || \'1\');\n-    this.range     = this.options.range || $R(0,1);\n-    \n-    this.value     = 0; // assure backwards compat\n-    this.values    = this.handles.map( function() { return 0 });\n-    this.spans     = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;\n-    this.options.startSpan = $(this.options.startSpan || null);\n-    this.options.endSpan   = $(this.options.endSpan || null);\n-\n-    this.restricted = this.options.restricted || false;\n-\n-    this.maximum   = this.options.maximum || this.range.end;\n-    this.minimum   = this.options.minimum || this.range.start;\n-\n-    // Will be used to align the handle onto the track, if necessary\n-    this.alignX = parseInt(this.options.alignX || \'0\');\n-    this.alignY = parseInt(this.options.alignY || \'0\');\n-    \n-    this.trackLength = this.maximumOffset() - this.minimumOffset();\n-\n-    this.handleLength = this.isVertical() ? \n-      (this.handles[0].offsetHeight != 0 ? \n-        this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : \n-      (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : \n-        this.handles[0].style.width.replace(/px$/,""));\n-\n-    this.active   = false;\n-    this.dragging = false;\n-    this.disabled = false;\n-\n-    if(this.options.disabled) this.setDisabled();\n-\n-    // Allowed values array\n-    this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;\n-    if(this.allowedValues) {\n-      this.minimum = this.allowedValues.min();\n-      this.maximum = this.allowedValues.max();\n-    }\n-\n-    this.eventMouseDown = this.startDrag.bindAsEventListener(this);\n-    this.eventMouseUp   = this.endDrag.bindAsEventListener(this);\n-    this.eventMouseMove = this.update.bindAsEventListener(this);\n-\n-    // Initialize handles in reverse (make sure first handle is active)\n-    this.handles.each( function(h,i) {\n-      i = slider.handles.length-1-i;\n-      slider.setValue(parseFloat(\n-        (slider.options.sliderValue instanceof Array ? \n-          slider.options.sliderValue[i] : slider.options.sliderValue) || \n-         slider.range.start), i);\n-      Element.makePositioned(h); // fix IE\n-      Event.observe(h, "mousedown", slider.eventMouseDown);\n-    });\n-    \n-    Event.observe(this.track, "mousedown", this.eventMouseDown);\n-    Event.observe(document, "mouseup", this.eventMouseUp);\n-    Event.observe(document, "mousemove", this.eventMouseMove);\n-    \n-    this.initialized = true;\n-  },\n-  dispose: function() {\n-    var slider = this;    \n-    Event.stopObserving(this.track, "mousedown", this.eventMouseDown);\n-    Event.stopObserving(document, "mouseup", this.eventMouseUp);\n-    Event.stopObserving(document, "mousemove", this.eventMouseMove);\n-    this.handles.each( function(h) {\n-      Event.stopObserving(h, "mousedown", slider.eventMouseDown);\n-    });\n-  },\n-  setDisabled: function(){\n-    this.disabled = true;\n-  },\n-  setEnabled: function(){\n-    this.disabled = false;\n-  },  \n-  getNearestValue: function(value){\n-    if(this.allowedValues){\n-      if(value >= this.allowedValues.max()) return(this.allowedValues.max());\n-      if(value <= this.allowedValues.min()) return(this.allowedValues.min());\n-      \n-      var offset = Math.abs(this.allowedValues[0] - value);\n-      var newValue = this.allowedValues[0];\n-      this.allowedValues.each( function(v) {\n-        var currentOffset = Math.abs(v - value);\n-        if(currentOffset <= offset){\n-          newValue = v;\n-          offset = currentOffset;\n-        } \n-      });\n-      return newValue;\n-    }\n-    if(value > this.range.end) return this.range.end;\n-    if(value < this.range.start) return this.range.start;\n-    return value;\n-  },\n-  setValue: function(sliderValue, handleIdx){\n-    if(!this.active) {\n-      this.activeHandleIdx = handleIdx || 0;\n-      this.activeHandle    = this.handles[this.activeHandleIdx];\n-      this.updateStyles();\n-    }\n-    handleIdx = handleIdx || this.activeHandleIdx || 0;\n-    if(this.initialized && this.restricted) {\n-      if((handleIdx>0) && (sliderValue<this.values[handleIdx-1]))\n-        sliderValue = this.values[handleIdx-1];\n-      if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1]))\n-        sliderValue = this.values[handleIdx+1];\n-    }\n-    sliderValue = this.getNearestValue(sliderValue);\n-    this.values[handleIdx] = sliderValue;\n-    this.value = this.values[0]; // assure backwards compat\n-    \n-    this.handles[handleIdx].style[this.isVertical() ? \'top\' : \'left\'] = \n-      this.translateToPx(sliderValue);\n-    \n-    this.drawSpans();\n-    if(!this.dragging || !this.event) this.updateFinished();\n-  },\n-  setValueBy: function(delta, handleIdx) {\n-    this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta, \n-      handleIdx || this.activeHandleIdx || 0);\n-  },\n-  translateToPx: function(value) {\n-    return Math.round(\n-      ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) * \n-      (value - this.range.start)) + "px";\n-  },\n-  translateToValue: function(offset) {\n-    return ((offset/(this.trackLength-this.handleLength) * \n-      (this.range.end-this.range.start)) + this.range.start);\n-  },\n-  getRange: function(range) {\n-    var v = this.values.sortBy(Prototype.K); \n-    range = range || 0;\n-    return $R(v[range],v[range+1]);\n-  },\n-  minimumOffset: function(){\n-    return(this.isVertical() ? this.alignY : this.alignX);\n-  },\n-  maximumOffset: function(){\n-    return(this.isVertical() ? \n-      (this.track.offsetHeight != 0 ? this.track.offsetHeight :\n-        this.track.style.height.replace(/px$/,"")) - this.alignY : \n-      (this.track.offsetWidth != 0 ? this.track.offsetWidth : \n-        this.track.style.width.replace(/px$/,"")) - this.alignY);\n-  },  \n-  isVertical:  function(){\n-    return (this.axis == \'vertical\');\n-  },\n-  drawSpans: function() {\n-    var slider = this;\n-    if(this.spans)\n-      $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });\n-    if(this.options.startSpan)\n-      this.setSpan(this.options.startSpan,\n-        $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));\n-    if(this.options.endSpan)\n-      this.setSpan(this.options.endSpan, \n-        $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));\n-  },\n-  setSpan: function(span, range) {\n-    if(this.isVertical()) {\n-      span.style.top = this.translateToPx(range.start);\n-      span.style.height = this.translateToPx(range.end - range.start + this.range.start);\n-    } else {\n-      span.style.left = this.translateToPx(range.start);\n-      span.style.width = this.translateToPx(range.end - range.start + this.range.start);\n-    }\n-  },\n-  updateStyles: function() {\n-    this.handles.each( function(h){ Element.removeClassName(h, \'selected\') });\n-    Element.addClassName(this.activeHandle, \'selected\');\n-  },\n-  startDrag: function(event) {\n-    if(Event.isLeftClick(event)) {\n-      if(!this.disabled){\n-        this.active = true;\n-        \n-        var handle = Event.element(event);\n-        var pointer  = [Event.pointerX(event), Event.pointerY(event)];\n-        var track = handle;\n-        if(track==this.track) {\n-          var offsets  = Position.cumulativeOffset(this.track); \n-          this.event = event;\n-          this.setValue(this.translateToValue( \n-           (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)\n-          ));\n-          var offsets  = Position.cumulativeOffset(this.activeHandle);\n-          this.offsetX = (pointer[0] - offsets[0]);\n-          this.offsetY = (pointer[1] - offsets[1]);\n-        } else {\n-          // find the handle (prevents issues with Safari)\n-          while((this.handles.indexOf(handle) == -1) && handle.parentNode) \n-            handle = handle.parentNode;\n-            \n-          if(this.handles.indexOf(handle)!=-1) {\n-            this.activeHandle    = handle;\n-            this.activeHandleIdx = this.handles.indexOf(this.activeHandle);\n-            this.updateStyles();\n-            \n-            var offsets  = Position.cumulativeOffset(this.activeHandle);\n-            this.offsetX = (pointer[0] - offsets[0]);\n-            this.offsetY = (pointer[1] - offsets[1]);\n-          }\n-        }\n-      }\n-      Event.stop(event);\n-    }\n-  },\n-  update: function(event) {\n-   if(this.active) {\n-      if(!this.dragging) this.dragging = true;\n-      this.draw(event);\n-      if(Prototype.Browser.WebKit) window.scrollBy(0,0);\n-      Event.stop(event);\n-   }\n-  },\n-  draw: function(event) {\n-    var pointer = [Event.pointerX(event), Event.pointerY(event)];\n-    var offsets = Position.cumulativeOffset(this.track);\n-    pointer[0] -= this.offsetX + offsets[0];\n-    pointer[1] -= this.offsetY + offsets[1];\n-    this.event = event;\n-    this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));\n-    if(this.initialized && this.options.onSlide)\n-      this.options.onSlide(this.values.length>1 ? this.values : this.value, this);\n-  },\n-  endDrag: function(event) {\n-    if(this.active && this.dragging) {\n-      this.finishDrag(event, true);\n-      Event.stop(event);\n-    }\n-    this.active = false;\n-    this.dragging = false;\n-  },  \n-  finishDrag: function(event, success) {\n-    this.active = false;\n-    this.dragging = false;\n-    this.updateFinished();\n-  },\n-  updateFinished: function() {\n-    if(this.initialized && this.options.onChange) \n-      this.options.onChange(this.values.length>1 ? this.values : this.value, this);\n-    this.event = null;\n-  }\n-}\n\\ No newline at end of file\ndiff --git a/jslib/sound.js b/jslib/sound.js\ndeleted file mode 100644\nindex 164c79a08..000000000\n--- a/jslib/sound.js\n+++ /dev/null\n@@ -1,60 +0,0 @@\n-// script.aculo.us sound.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-//\n-// Based on code created by Jules Gravinese (http://www.webveteran.com/)\n-//\n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-Sound = {\n-  tracks: {},\n-  _enabled: true,\n-  template:\n-    new Template(\'<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>\'),\n-  enable: function(){\n-    Sound._enabled = true;\n-  },\n-  disable: function(){\n-    Sound._enabled = false;\n-  },\n-  play: function(url){\n-    if(!Sound._enabled) return;\n-    var options = Object.extend({\n-      track: \'global\', url: url, replace: false\n-    }, arguments[1] || {});\n-    \n-    if(options.replace && this.tracks[options.track]) {\n-      $R(0, this.tracks[options.track].id).each(function(id){\n-        var sound = $(\'sound_\'+options.track+\'_\'+id);\n-        sound.Stop && sound.Stop();\n-        sound.remove();\n-      })\n-      this.tracks[options.track] = null;\n-    }\n-      \n-    if(!this.tracks[options.track])\n-      this.tracks[options.track] = { id: 0 }\n-    else\n-      this.tracks[options.track].id++;\n-      \n-    options.id = this.tracks[options.track].id;\n-    if (Prototype.Browser.IE) {\n-      var sound = document.createElement(\'bgsound\');\n-      sound.setAttribute(\'id\',\'sound_\'+options.track+\'_\'+options.id);\n-      sound.setAttribute(\'src\',options.url);\n-      sound.setAttribute(\'loop\',\'1\');\n-      sound.setAttribute(\'autostart\',\'true\');\n-      $$(\'body\')[0].appendChild(sound);\n-    }  \n-    else\n-      new Insertion.Bottom($$(\'body\')[0], Sound.template.evaluate(options));\n-  }\n-};\n-\n-if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){\n-  if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf(\'QuickTime\') != -1 }))\n-    Sound.template = new Template(\'<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>\')\n-  else\n-    Sound.play = function(){}\n-}\ndiff --git a/jslib/unittest.js b/jslib/unittest.js\ndeleted file mode 100644\nindex d2dff8b2c..000000000\n--- a/jslib/unittest.js\n+++ /dev/null\n@@ -1,564 +0,0 @@\n-// script.aculo.us unittest.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007\n-\n-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n-//           (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)\n-//           (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/)\n-//\n-// script.aculo.us is freely distributable under the terms of an MIT-style license.\n-// For details, see the script.aculo.us web site: http://script.aculo.us/\n-\n-// experimental, Firefox-only\n-Event.simulateMouse = function(element, eventName) {\n-  var options = Object.extend({\n-    pointerX: 0,\n-    pointerY: 0,\n-    buttons:  0,\n-    ctrlKey:  false,\n-    altKey:   false,\n-    shiftKey: false,\n-    metaKey:  false\n-  }, arguments[2] || {});\n-  var oEvent = document.createEvent("MouseEvents");\n-  oEvent.initMouseEvent(eventName, true, true, document.defaultView, \n-    options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY, \n-    options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));\n-  \n-  if(this.mark) Element.remove(this.mark);\n-  this.mark = document.createElement(\'div\');\n-  this.mark.appendChild(document.createTextNode(" "));\n-  document.body.appendChild(this.mark);\n-  this.mark.style.position = \'absolute\';\n-  this.mark.style.top = options.pointerY + "px";\n-  this.mark.style.left = options.pointerX + "px";\n-  this.mark.style.width = "5px";\n-  this.mark.style.height = "5px;";\n-  this.mark.style.borderTop = "1px solid red;"\n-  this.mark.style.borderLeft = "1px solid red;"\n-  \n-  if(this.step)\n-    alert(\'[\'+new Date().getTime().toString()+\'] \'+eventName+\'/\'+Test.Unit.inspect(options));\n-  \n-  $(element).dispatchEvent(oEvent);\n-};\n-\n-// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn\'t work in 1.0.6 or DP2.\n-// You need to downgrade to 1.0.4 for now to get this working\n-// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much\n-Event.simulateKey = function(element, eventName) {\n-  var options = Object.extend({\n-    ctrlKey: false,\n-    altKey: false,\n-    shiftKey: false,\n-    metaKey: false,\n-    keyCode: 0,\n-    charCode: 0\n-  }, arguments[2] || {});\n-\n-  var oEvent = document.createEvent("KeyEvents");\n-  oEvent.initKeyEvent(eventName, true, true, window, \n-    options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,\n-    options.keyCode, options.charCode );\n-  $(element).dispatchEvent(oEvent);\n-};\n-\n-Event.simulateKeys = function(element, command) {\n-  for(var i=0; i<command.length; i++) {\n-    Event.simulateKey(element,\'keypress\',{charCode:command.charCodeAt(i)});\n-  }\n-};\n-\n-var Test = {}\n-Test.Unit = {};\n-\n-// security exception workaround\n-Test.Unit.inspect = Object.inspect;\n-\n-Test.Unit.Logger = Class.create();\n-Test.Unit.Logger.prototype = {\n-  initialize: function(log) {\n-    this.log = $(log);\n-    if (this.log) {\n-      this._createLogTable();\n-    }\n-  },\n-  start: function(testName) {\n-    if (!this.log) return;\n-    this.testName = testName;\n-    this.lastLogLine = document.createElement(\'tr\');\n-    this.statusCell = document.createElement(\'td\');\n-    this.nameCell = document.createElement(\'td\');\n-    this.nameCell.className = "nameCell";\n-    this.nameCell.appendChild(document.createTextNode(testName));\n-    this.messageCell = document.createElement(\'td\');\n-    this.lastLogLine.appendChild(this.statusCell);\n-    this.lastLogLine.appendChild(this.nameCell);\n-    this.lastLogLine.appendChild(this.messageCell);\n-    this.loglines.appendChild(this.lastLogLine);\n-  },\n-  finish: function(status, summary) {\n-    if (!this.log) return;\n-    this.lastLogLine.className = status;\n-    this.statusCell.innerHTML = status;\n-    this.messageCell.innerHTML = this._toHTML(summary);\n-    this.addLinksToResults();\n-  },\n-  message: function(message) {\n-    if (!this.log) return;\n-    this.messageCell.innerHTML = this._toHTML(message);\n-  },\n-  summary: function(summary) {\n-    if (!this.log) return;\n-    this.logsummary.innerHTML = this._toHTML(summary);\n-  },\n-  _createLogTable: function() {\n-    this.log.innerHTML =\n-    \'<div id="logsummary"></div>\' +\n-    \'<table id="logtable">\' +\n-    \'<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>\' +\n-    \'<tbody id="loglines"></tbody>\' +\n-    \'</table>\';\n-    this.logsummary = $(\'logsummary\')\n-    this.loglines = $(\'loglines\');\n-  },\n-  _toHTML: function(txt) {\n-    return txt.escapeHTML().replace(/\\n/g,"<br/>");\n-  },\n-  addLinksToResults: function(){ \n-    $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log\n-      td.title = "Run only this test"\n-      Event.observe(td, \'click\', function(){ window.location.search = "?tests=" + td.innerHTML;});\n-    });\n-    $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log\n-      td.title = "Run all tests"\n-      Event.observe(td, \'click\', function(){ window.location.search = "";});\n-    });\n-  }\n-}\n-\n-Test.Unit.Runner = Class.create();\n-Test.Unit.Runner.prototype = {\n-  initialize: function(testcases) {\n-    this.options = Object.extend({\n-      testLog: \'testlog\'\n-    }, arguments[1] || {});\n-    this.options.resultsURL = this.parseResultsURLQueryParameter();\n-    this.options.tests      = this.parseTestsQueryParameter();\n-    if (this.options.testLog) {\n-      this.options.testLog = $(this.options.testLog) || null;\n-    }\n-    if(this.options.tests) {\n-      this.tests = [];\n-      for(var i = 0; i < this.options.tests.length; i++) {\n-        if(/^test/.test(this.options.tests[i])) {\n-          this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));\n-        }\n-      }\n-    } else {\n-      if (this.options.test) {\n-        this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];\n-      } else {\n-        this.tests = [];\n-        for(var testcase in testcases) {\n-          if(/^test/.test(testcase)) {\n-            this.tests.push(\n-               new Test.Unit.Testcase(\n-                 this.options.context ? \' -> \' + this.options.titles[testcase] : testcase, \n-                 testcases[testcase], testcases["setup"], testcases["teardown"]\n-               ));\n-          }\n-        }\n-      }\n-    }\n-    this.currentTest = 0;\n-    this.logger = new Test.Unit.Logger(this.options.testLog);\n-    setTimeout(this.runTests.bind(this), 1000);\n-  },\n-  parseResultsURLQueryParameter: function() {\n-    return window.location.search.parseQuery()["resultsURL"];\n-  },\n-  parseTestsQueryParameter: function(){\n-    if (window.location.search.parseQuery()["tests"]){\n-        return window.location.search.parseQuery()["tests"].split(\',\');\n-    };\n-  },\n-  // Returns:\n-  //  "ERROR" if there was an error,\n-  //  "FAILURE" if there was a failure, or\n-  //  "SUCCESS" if there was neither\n-  getResult: function() {\n-    var hasFailure = false;\n-    for(var i=0;i<this.tests.length;i++) {\n-      if (this.tests[i].errors > 0) {\n-        return "ERROR";\n-      }\n-      if (this.tests[i].failures > 0) {\n-        hasFailure = true;\n-      }\n-    }\n-    if (hasFailure) {\n-      return "FAILURE";\n-    } else {\n-      return "SUCCESS";\n-    }\n-  },\n-  postResults: function() {\n-    if (this.options.resultsURL) {\n-      new Ajax.Request(this.options.resultsURL, \n-        { method: \'get\', parameters: \'result=\' + this.getResult(), asynchronous: false });\n-    }\n-  },\n-  runTests: function() {\n-    var test = this.tests[this.currentTest];\n-    if (!test) {\n-      // finished!\n-      this.postResults();\n-      this.logger.summary(this.summary());\n-      return;\n-    }\n-    if(!test.isWaiting) {\n-      this.logger.start(test.name);\n-    }\n-    test.run();\n-    if(test.isWaiting) {\n-      this.logger.message("Waiting for " + test.timeToWait + "ms");\n-      setTimeout(this.runTests.bind(this), test.timeToWait || 1000);\n-    } else {\n-      this.logger.finish(test.status(), test.summary());\n-      this.currentTest++;\n-      // tail recursive, hopefully the browser will skip the stackframe\n-      this.runTests();\n-    }\n-  },\n-  summary: function() {\n-    var assertions = 0;\n-    var failures = 0;\n-    var errors = 0;\n-    var messages = [];\n-    for(var i=0;i<this.tests.length;i++) {\n-      assertions +=   this.tests[i].assertions;\n-      failures   +=   this.tests[i].failures;\n-      errors     +=   this.tests[i].errors;\n-    }\n-    return (\n-      (this.options.context ? this.options.context + \': \': \'\') + \n-      this.tests.length + " tests, " + \n-      assertions + " assertions, " + \n-      failures   + " failures, " +\n-      errors     + " errors");\n-  }\n-}\n-\n-Test.Unit.Assertions = Class.create();\n-Test.Unit.Assertions.prototype = {\n-  initialize: function() {\n-    this.assertions = 0;\n-    this.failures   = 0;\n-    this.errors     = 0;\n-    this.messages   = [];\n-  },\n-  summary: function() {\n-    return (\n-      this.assertions + " assertions, " + \n-      this.failures   + " failures, " +\n-      this.errors     + " errors" + "\\n" +\n-      this.messages.join("\\n"));\n-  },\n-  pass: function() {\n-    this.assertions++;\n-  },\n-  fail: function(message) {\n-    this.failures++;\n-    this.messages.push("Failure: " + message);\n-  },\n-  info: function(message) {\n-    this.messages.push("Info: " + message);\n-  },\n-  error: function(error) {\n-    this.errors++;\n-    this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")");\n-  },\n-  status: function() {\n-    if (this.failures > 0) return \'failed\';\n-    if (this.errors > 0) return \'error\';\n-    return \'passed\';\n-  },\n-  assert: function(expression) {\n-    var message = arguments[1] || \'assert: got "\' + Test.Unit.inspect(expression) + \'"\';\n-    try { expression ? this.pass() : \n-      this.fail(message); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertEqual: function(expected, actual) {\n-    var message = arguments[2] || "assertEqual";\n-    try { (expected == actual) ? this.pass() :\n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) + \n-        \'", actual "\' + Test.Unit.inspect(actual) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertInspect: function(expected, actual) {\n-    var message = arguments[2] || "assertInspect";\n-    try { (expected == actual.inspect()) ? this.pass() :\n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) + \n-        \'", actual "\' + Test.Unit.inspect(actual) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertEnumEqual: function(expected, actual) {\n-    var message = arguments[2] || "assertEnumEqual";\n-    try { $A(expected).length == $A(actual).length && \n-      expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?\n-        this.pass() : this.fail(message + \': expected \' + Test.Unit.inspect(expected) + \n-          \', actual \' + Test.Unit.inspect(actual)); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertNotEqual: function(expected, actual) {\n-    var message = arguments[2] || "assertNotEqual";\n-    try { (expected != actual) ? this.pass() : \n-      this.fail(message + \': got "\' + Test.Unit.inspect(actual) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertIdentical: function(expected, actual) { \n-    var message = arguments[2] || "assertIdentical"; \n-    try { (expected === actual) ? this.pass() : \n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) +  \n-        \'", actual "\' + Test.Unit.inspect(actual) + \'"\'); } \n-    catch(e) { this.error(e); } \n-  },\n-  assertNotIdentical: function(expected, actual) { \n-    var message = arguments[2] || "assertNotIdentical"; \n-    try { !(expected === actual) ? this.pass() : \n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) +  \n-        \'", actual "\' + Test.Unit.inspect(actual) + \'"\'); } \n-    catch(e) { this.error(e); } \n-  },\n-  assertNull: function(obj) {\n-    var message = arguments[1] || \'assertNull\'\n-    try { (obj==null) ? this.pass() : \n-      this.fail(message + \': got "\' + Test.Unit.inspect(obj) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertMatch: function(expected, actual) {\n-    var message = arguments[2] || \'assertMatch\';\n-    var regex = new RegExp(expected);\n-    try { (regex.exec(actual)) ? this.pass() :\n-      this.fail(message + \' : regex: "\' +  Test.Unit.inspect(expected) + \' did not match: \' + Test.Unit.inspect(actual) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertHidden: function(element) {\n-    var message = arguments[1] || \'assertHidden\';\n-    this.assertEqual("none", element.style.display, message);\n-  },\n-  assertNotNull: function(object) {\n-    var message = arguments[1] || \'assertNotNull\';\n-    this.assert(object != null, message);\n-  },\n-  assertType: function(expected, actual) {\n-    var message = arguments[2] || \'assertType\';\n-    try { \n-      (actual.constructor == expected) ? this.pass() : \n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) +  \n-        \'", actual "\' + (actual.constructor) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertNotOfType: function(expected, actual) {\n-    var message = arguments[2] || \'assertNotOfType\';\n-    try { \n-      (actual.constructor != expected) ? this.pass() : \n-      this.fail(message + \': expected "\' + Test.Unit.inspect(expected) +  \n-        \'", actual "\' + (actual.constructor) + \'"\'); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertInstanceOf: function(expected, actual) {\n-    var message = arguments[2] || \'assertInstanceOf\';\n-    try { \n-      (actual instanceof expected) ? this.pass() : \n-      this.fail(message + ": object was not an instance of the expected type"); }\n-    catch(e) { this.error(e); } \n-  },\n-  assertNotInstanceOf: function(expected, actual) {\n-    var message = arguments[2] || \'assertNotInstanceOf\';\n-    try { \n-      !(actual instanceof expected) ? this.pass() : \n-      this.fail(message + ": object was an instance of the not expected type"); }\n-    catch(e) { this.error(e); } \n-  },\n-  assertRespondsTo: function(method, obj) {\n-    var message = arguments[2] || \'assertRespondsTo\';\n-    try {\n-      (obj[method] && typeof obj[method] == \'function\') ? this.pass() : \n-      this.fail(message + ": object doesn\'t respond to [" + method + "]"); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertReturnsTrue: function(method, obj) {\n-    var message = arguments[2] || \'assertReturnsTrue\';\n-    try {\n-      var m = obj[method];\n-      if(!m) m = obj[\'is\'+method.charAt(0).toUpperCase()+method.slice(1)];\n-      m() ? this.pass() : \n-      this.fail(message + ": method returned false"); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertReturnsFalse: function(method, obj) {\n-    var message = arguments[2] || \'assertReturnsFalse\';\n-    try {\n-      var m = obj[method];\n-      if(!m) m = obj[\'is\'+method.charAt(0).toUpperCase()+method.slice(1)];\n-      !m() ? this.pass() : \n-      this.fail(message + ": method returned true"); }\n-    catch(e) { this.error(e); }\n-  },\n-  assertRaise: function(exceptionName, method) {\n-    var message = arguments[2] || \'assertRaise\';\n-    try { \n-      method();\n-      this.fail(message + ": exception expected but none was raised"); }\n-    catch(e) {\n-      ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e); \n-    }\n-  },\n-  assertElementsMatch: function() {\n-    var expressions = $A(arguments), elements = $A(expressions.shift());\n-    if (elements.length != expressions.length) {\n-      this.fail(\'assertElementsMatch: size mismatch: \' + elements.length + \' elements, \' + expressions.length + \' expressions\');\n-      return false;\n-    }\n-    elements.zip(expressions).all(function(pair, index) {\n-      var element = $(pair.first()), expression = pair.last();\n-      if (element.match(expression)) return true;\n-      this.fail(\'assertElementsMatch: (in index \' + index + \') expected \' + expression.inspect() + \' but got \' + element.inspect());\n-    }.bind(this)) && this.pass();\n-  },\n-  assertElementMatches: function(element, expression) {\n-    this.assertElementsMatch([element], expression);\n-  },\n-  benchmark: function(operation, iterations) {\n-    var startAt = new Date();\n-    (iterations || 1).times(operation);\n-    var timeTaken = ((new Date())-startAt);\n-    this.info((arguments[2] || \'Operation\') + \' finished \' + \n-       iterations + \' iterations in \' + (timeTaken/1000)+\'s\' );\n-    return timeTaken;\n-  },\n-  _isVisible: function(element) {\n-    element = $(element);\n-    if(!element.parentNode) return true;\n-    this.assertNotNull(element);\n-    if(element.style && Element.getStyle(element, \'display\') == \'none\')\n-      return false;\n-    \n-    return this._isVisible(element.parentNode);\n-  },\n-  assertNotVisible: function(element) {\n-    this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn\'t have a hidden parent either. " + ("" || arguments[1]));\n-  },\n-  assertVisible: function(element) {\n-    this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));\n-  },\n-  benchmark: function(operation, iterations) {\n-    var startAt = new Date();\n-    (iterations || 1).times(operation);\n-    var timeTaken = ((new Date())-startAt);\n-    this.info((arguments[2] || \'Operation\') + \' finished \' + \n-       iterations + \' iterations in \' + (timeTaken/1000)+\'s\' );\n-    return timeTaken;\n-  }\n-}\n-\n-Test.Unit.Testcase = Class.create();\n-Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {\n-  initialize: function(name, test, setup, teardown) {\n-    Test.Unit.Assertions.prototype.initialize.bind(this)();\n-    this.name           = name;\n-    \n-    if(typeof test == \'string\') {\n-      test = test.gsub(/(\\.should[^\\(]+\\()/,\'#{0}this,\');\n-      test = test.gsub(/(\\.should[^\\(]+)\\(this,\\)/,\'#{1}(this)\');\n-      this.test = function() {\n-        eval(\'with(this){\'+test+\'}\');\n-      }\n-    } else {\n-      this.test = test || function() {};\n-    }\n-    \n-    this.setup          = setup || function() {};\n-    this.teardown       = teardown || function() {};\n-    this.isWaiting      = false;\n-    this.timeToWait     = 1000;\n-  },\n-  wait: function(time, nextPart) {\n-    this.isWaiting = true;\n-    this.test = nextPart;\n-    this.timeToWait = time;\n-  },\n-  run: function() {\n-    try {\n-      try {\n-        if (!this.isWaiting) this.setup.bind(this)();\n-        this.isWaiting = false;\n-        this.test.bind(this)();\n-      } finally {\n-        if(!this.isWaiting) {\n-          this.teardown.bind(this)();\n-        }\n-      }\n-    }\n-    catch(e) { this.error(e); }\n-  }\n-});\n-\n-// *EXPERIMENTAL* BDD-style testing to please non-technical folk\n-// This draws many ideas from RSpec http://rspec.rubyforge.org/\n-\n-Test.setupBDDExtensionMethods = function(){\n-  var METHODMAP = {\n-    shouldEqual:     \'assertEqual\',\n-    shouldNotEqual:  \'assertNotEqual\',\n-    shouldEqualEnum: \'assertEnumEqual\',\n-    shouldBeA:       \'assertType\',\n-    shouldNotBeA:    \'assertNotOfType\',\n-    shouldBeAn:      \'assertType\',\n-    shouldNotBeAn:   \'assertNotOfType\',\n-    shouldBeNull:    \'assertNull\',\n-    shouldNotBeNull: \'assertNotNull\',\n-    \n-    shouldBe:        \'assertReturnsTrue\',\n-    shouldNotBe:     \'assertReturnsFalse\',\n-    shouldRespondTo: \'assertRespondsTo\'\n-  };\n-  Test.BDDMethods = {};\n-  for(m in METHODMAP) {\n-    Test.BDDMethods[m] = eval(\n-      \'function(){\'+\n-      \'var args = $A(arguments);\'+\n-      \'var scope = args.shift();\'+\n-      \'scope.\'+METHODMAP[m]+\'.apply(scope,(args || []).concat([this])); }\');\n-  }\n-  [Array.prototype, String.prototype, Number.prototype].each(\n-    function(p){ Object.extend(p, Test.BDDMethods) }\n-  );\n-}\n-\n-Test.context = function(name, spec, log){\n-  Test.setupBDDExtensionMethods();\n-  \n-  var compiledSpec = {};\n-  var titles = {};\n-  for(specName in spec) {\n-    switch(specName){\n-      case "setup":\n-      case "teardown":\n-        compiledSpec[specName] = spec[specName];\n-        break;\n-      default:\n-        var testName = \'test\'+specName.gsub(/\\s+/,\'-\').camelize();\n-        var body = spec[specName].toString().split(\'\\n\').slice(1);\n-        if(/^\\{/.test(body[0])) body = body.slice(1);\n-        body.pop();\n-        body = body.map(function(statement){ \n-          return statement.strip()\n-        });\n-        compiledSpec[testName] = body.join(\'\\n\');\n-        titles[testName] = specName;\n-    }\n-  }\n-  new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || \'testlog\', context: name });\n-};\n\\ No newline at end of file\ndiff --git a/jslib/utilities.js b/jslib/utilities.js\nnew file mode 100644\nindex 000000000..cc83bd5d2\n--- /dev/null\n+++ b/jslib/utilities.js\n@@ -0,0 +1,433 @@\n+/*\n+Copyright (c) 2007, Yahoo! Inc. All rights reserved.\n+Code licensed under the BSD License:\n+http://developer.yahoo.net/yui/license.txt\n+version: 2.2.2\n+*/\n+\n+if(typeof YAHOO=="undefined"){var YAHOO={};}\n+YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}\n+return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}\n+if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}\n+var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}\n+if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf(\'Array\')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj==\'boolean\';},isFunction:function(obj){return typeof obj==\'function\';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj==\'number\'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj==\'object\'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj==\'string\';},isUndefined:function(obj){return typeof obj==\'undefined\';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}\n+return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}\n+var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}\n+if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}\n+var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});\n+(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf(\'opera\')>-1),isSafari=(ua.indexOf(\'safari\')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf(\'gecko\')>-1),isIE=(!isOpera&&ua.indexOf(\'msie\')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}\n+if(propertyCache[property]){return propertyCache[property];}\n+var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}\n+propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property==\'float\'){property=\'cssFloat\';}\n+var computed=document.defaultView.getComputedStyle(el,\'\');if(computed){value=computed[toCamel(property)];}\n+return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case\'opacity\':var val=100;try{val=el.filters[\'DXImageTransform.Microsoft.Alpha\'].opacity;}catch(e){try{val=el.filters(\'alpha\').opacity;}catch(e){}}\n+return val/100;break;case\'float\':property=\'styleFloat\';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}\n+if(isIE){setStyle=function(el,property,val){switch(property){case\'opacity\':if(YAHOO.lang.isString(el.style.filter)){el.style.filter=\'alpha(opacity=\'+val*100+\')\';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}\n+break;case\'float\':property=\'styleFloat\';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property==\'float\'){property=\'cssFloat\';}\n+el.style[property]=val;};}\n+YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}\n+if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}\n+return c;}\n+if(el){return el;}\n+return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,\'display\')==\'none\')&&el!=document.body){return false;}\n+var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}\n+var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}\n+else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,\'position\')==\'absolute\';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,\'position\')==\'absolute\'){hasAbs=true;}\n+parentNode=parentNode.offsetParent;}}\n+if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}\n+parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))\n+{if(Y.Dom.getStyle(parentNode,\'display\')!=\'inline\'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}\n+parentNode=parentNode.parentNode;}\n+return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,\'position\');if(style_pos==\'static\'){this.setStyle(el,\'position\',\'relative\');style_pos=\'relative\';}\n+var pageXY=this.getXY(el);if(pageXY===false){return false;}\n+var delta=[parseInt(this.getStyle(el,\'left\'),10),parseInt(this.getStyle(el,\'top\'),10)];if(isNaN(delta[0])){delta[0]=(style_pos==\'relative\')?0:el.offsetLeft;}\n+if(isNaN(delta[1])){delta[1]=(style_pos==\'relative\')?0:el.offsetTop;}\n+if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+\'px\';}\n+if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+\'px\';}\n+if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp(\'(?:^|\\\\s+)\'+className+\'(?:\\\\s+|$)\');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}\n+el.className=[el.className,className].join(\' \');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp(\'(?:^|\\\\s+)\'+className+\'(?:\\\\s+|$)\',\'g\');var f=function(el){if(!this.hasClass(el,className)){return;}\n+var c=el.className;el.className=c.replace(re,\' \');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}\n+var re=new RegExp(\'(?:^|\\\\s+)\'+oldClassName+\'(?:\\\\s+|$)\',\'g\');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}\n+el.className=el.className.replace(re,\' \'+newClassName+\' \');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||\'yui-gen\';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}\n+if(!el.id){el.id=prefix+id_counter++;}\n+return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}\n+var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}\n+else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}\n+else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}\n+else if(!parent.tagName||parent.tagName.toUpperCase()==\'HTML\'){return false;}\n+parent=parent.parentNode;}\n+return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||\'*\';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}\n+var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag==\'*\'&&root.all)){elements=root.all;}\n+for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}\n+return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}\n+return method.call(scope,el,o);}\n+var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}\n+collection[collection.length]=method.call(scope,el[i],o);}\n+return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!=\'CSS1Compat\')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!=\'CSS1Compat\')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode==\'CSS1Compat\')?document.documentElement.clientHeight:document.body.clientHeight;}\n+return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode==\'CSS1Compat\')?document.documentElement.clientWidth:document.body.clientWidth;}\n+return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}\n+this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});\n+YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}\n+var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to \'"+this.type+"\'");}\n+if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}\n+this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}\n+var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}\n+return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}\n+var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}\n+var argslength=args.length;if(!this.silent){}\n+for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}\n+var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}\n+ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}\n+if(false===ret){if(!this.silent){}\n+return false;}}}\n+return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}\n+return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}\n+this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"\'"+this.type+"\', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}\n+return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\\/([^ ]*)/);if(v&&v[1]){return v[1];}\n+return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}\n+if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}\n+return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}\n+if(!el){return false;}\n+if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}\n+var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}\n+var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}\n+legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}\n+return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}\n+le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}\n+return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}\n+return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}\n+return ok;}\n+if(!fn||!fn.call){return this.purgeElement(el,false,sType);}\n+if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}\n+return false;}\n+var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}\n+if(index>=0){cacheItem=listeners[index];}\n+if(!el||!cacheItem){return false;}\n+if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}\n+delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}\n+return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}\n+return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}\n+return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}\n+return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}\n+c=c.caller;}}\n+return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}\n+return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}\n+return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}\n+if(this.isIE&&!DOMReady){return false;}\n+this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}\n+var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}\n+item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}\n+for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}\n+retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}\n+this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}\n+if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}\n+for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}\n+return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}\n+l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}\n+unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}\n+j=j-1;}\n+l=null;EU.clearCache();}\n+for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}\n+legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){document.write(\'<scr\'+\'ipt id="_yui_eu_dr" defer="true" src="//:"></script>\');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}\n+EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}\n+YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}\n+subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}\n+this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}\n+return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}\n+return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}\n+return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}\n+if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}\n+var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo==\'string\'){attachTo=document.getElementById(attachTo);}\n+if(typeof handler==\'function\'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}\n+function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}\n+if(!keyData.alt){keyData.alt=false;}\n+if(!keyData.ctrl){keyData.ctrl=false;}\n+if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}\n+this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}\n+this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}\n+this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+\n+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});\n+YAHOO.util.Connect={_msxml_progid:[\'MSXML2.XMLHTTP.3.0\',\'MSXML2.XMLHTTP\',\'Microsoft.XMLHTTP\'],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:\'application/x-www-form-urlencoded; charset=UTF-8\',_use_default_xhr_header:true,_default_xhr_header:\'XMLHttpRequest\',_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function()\n+{if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,\'click\',function(e){var obj=YAHOO.util.Event.getTarget(e);if(obj.type==\'submit\'){YAHOO.util.Connect._submitElementValue=encodeURIComponent(obj.name)+"="+encodeURIComponent(obj.value);}})\n+return true;}\n+return false;})(),setProgId:function(id)\n+{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)\n+{this._use_default_post_header=b;},setDefaultXhrHeader:function(b)\n+{this._use_default_xhr_header=b;},setPollingInterval:function(i)\n+{if(typeof i==\'number\'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)\n+{var obj,http;try\n+{http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}\n+catch(e)\n+{for(var i=0;i<this._msxml_progid.length;++i){try\n+{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}\n+catch(e){}}}\n+finally\n+{return obj;}},getConnectionObject:function()\n+{var o;var tId=this._transaction_id;try\n+{o=this.createXhrObject(tId);if(o){this._transaction_id++;}}\n+catch(e){}\n+finally\n+{return o;}},asyncRequest:function(method,uri,callback,postData)\n+{var o=this.getConnectionObject();if(!o){return null;}\n+else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri,postData);this.releaseObject(o);return;}\n+if(method.toUpperCase()==\'GET\'){if(this._sFormData.length!=0){uri+=((uri.indexOf(\'?\')==-1)?\'?\':\'&\')+this._sFormData;}\n+else{uri+="?"+this._sFormData;}}\n+else if(method.toUpperCase()==\'POST\'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}\n+o.conn.open(method,uri,true);if(this._use_default_xhr_header){if(!this._default_headers[\'X-Requested-With\']){this.initHeader(\'X-Requested-With\',this._default_xhr_header,true);}}\n+if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader(\'Content-Type\',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}\n+if(this._has_default_headers||this._has_http_headers){this.setHeader(o);}\n+this.handleReadyState(o,callback);o.conn.send(postData||null);return o;}},handleReadyState:function(o,callback)\n+{var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}\n+this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState===4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}\n+oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)\n+{if(!callback){this.releaseObject(o);return;}\n+var httpStatus,responseObject;try\n+{if(o.conn.status!==undefined&&o.conn.status!==0){httpStatus=o.conn.status;}\n+else{httpStatus=13030;}}\n+catch(e){httpStatus=13030;}\n+if(httpStatus>=200&&httpStatus<300||httpStatus===1223){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}\n+else{callback.success.apply(callback.scope,[responseObject]);}}}\n+else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}\n+else{callback.failure.apply(callback.scope,[responseObject]);}}\n+break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}\n+else{callback.failure.apply(callback.scope,[responseObject]);}}}}\n+this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)\n+{var obj={};var headerObj={};try\n+{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split(\'\\n\');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(\':\');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}\n+catch(e){}\n+obj.tId=o.tId;obj.status=(o.conn.status==1223)?204:o.conn.status;obj.statusText=(o.conn.status==1223)?"No Content":o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}\n+return obj;},createExceptionObject:function(tId,callbackArg,isAbort)\n+{var COMM_CODE=0;var COMM_ERROR=\'communication failure\';var ABORT_CODE=-1;var ABORT_ERROR=\'transaction aborted\';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}\n+else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}\n+if(callbackArg){obj.argument=callbackArg;}\n+return obj;},initHeader:function(label,value,isDefault)\n+{var headerObj=(isDefault)?this._default_headers:this._http_headers;if(headerObj[label]===undefined){headerObj[label]=value;}\n+else{headerObj[label]=value+","+headerObj[label];}\n+if(isDefault){this._has_default_headers=true;}\n+else{this._has_http_headers=true;}},setHeader:function(o)\n+{if(this._has_default_headers){for(var prop in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,prop)){o.conn.setRequestHeader(prop,this._default_headers[prop]);}}}\n+if(this._has_http_headers){for(var prop in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,prop)){o.conn.setRequestHeader(prop,this._http_headers[prop]);}}\n+delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers\n+this._default_headers={};this._has_default_headers=false;},setForm:function(formId,isUpload,secureUri)\n+{this.resetFormState();var oForm;if(typeof formId==\'string\'){oForm=(document.getElementById(formId)||document.forms[formId]);}\n+else if(typeof formId==\'object\'){oForm=formId;}\n+else{return;}\n+if(isUpload){this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}\n+var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];oDisabled=oForm.elements[i].disabled;oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)\n+{switch(oElement.type)\n+{case\'select-one\':case\'select-multiple\':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oElement.options[j].attributes[\'value\'].specified?oElement.options[j].value:oElement.options[j].text)+\'&\';}\n+else{this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oElement.options[j].hasAttribute(\'value\')?oElement.options[j].value:oElement.options[j].text)+\'&\';}}}\n+break;case\'radio\':case\'checkbox\':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';}\n+break;case\'file\':case undefined:case\'reset\':case\'button\':break;case\'submit\':if(hasSubmit===false){if(this._hasSubmitListener){this._sFormData+=this._submitElementValue+\'&\';}\n+else{this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';}\n+hasSubmit=true;}\n+break;default:this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';break;}}}\n+this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId=\'yuiIO\'+this._transaction_id;if(window.ActiveXObject){var io=document.createElement(\'<iframe id="\'+frameId+\'" name="\'+frameId+\'" />\');if(typeof secureUri==\'boolean\'){io.src=\'javascript:false\';}\n+else if(typeof secureURI==\'string\'){io.src=secureUri;}}\n+else{var io=document.createElement(\'iframe\');io.id=frameId;io.name=frameId;}\n+io.style.position=\'absolute\';io.style.top=\'-1000px\';io.style.left=\'-1000px\';document.body.appendChild(io);},appendPostData:function(postData)\n+{var formElements=[];var postMessage=postData.split(\'&\');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf(\'=\');if(delimitPos!=-1){formElements[i]=document.createElement(\'input\');formElements[i].type=\'hidden\';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}\n+return formElements;},uploadFile:function(id,callback,uri,postData){var frameId=\'yuiIO\'+id;var uploadEncoding=\'multipart/form-data\';var io=document.getElementById(frameId);this._formNode.setAttribute(\'action\',uri);this._formNode.setAttribute(\'method\',\'POST\');this._formNode.setAttribute("target",frameId);if(this._formNode.encoding){this._formNode.encoding=uploadEncoding;}\n+else{this._formNode.enctype=uploadEncoding;}\n+if(postData){var oElements=this.appendPostData(postData);}\n+this._formNode.submit();if(oElements&&oElements.length>0){for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}\n+this.resetFormState();var uploadCallback=function()\n+{var obj={};obj.tId=id;obj.argument=callback.argument;try\n+{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}\n+catch(e){}\n+if(callback&&callback.upload){if(!callback.scope){callback.upload(obj);}\n+else{callback.upload.apply(callback.scope,[obj]);}}\n+if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);}\n+else if(window.detachEvent){io.detachEvent(\'onload\',uploadCallback);}\n+else{io.removeEventListener(\'load\',uploadCallback,false);}\n+setTimeout(function(){document.body.removeChild(io);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",uploadCallback);}\n+else if(window.attachEvent){io.attachEvent(\'onload\',uploadCallback);}\n+else{io.addEventListener(\'load\',uploadCallback,false);}},abort:function(o,callback,isTimeout)\n+{if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];}\n+this.handleTransactionResponse(o,callback,true);return true;}\n+else{return false;}},isCallInProgress:function(o)\n+{if(o.conn){return o.conn.readyState!==4&&o.conn.readyState!==0;}\n+else{return false;}},releaseObject:function(o)\n+{o.conn=null;o=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.2.2",build:"204"});\n+YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}\n+YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!==\'auto\'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}\n+var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,\'position\')==\'absolute\'&&pos)){val=el[\'offset\'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}\n+return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return\'px\';}\n+return\'\';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!==\'undefined\');};if(!isset(attributes[attr][\'to\'])&&!isset(attributes[attr][\'by\'])){return false;}\n+start=(isset(attributes[attr][\'from\']))?attributes[attr][\'from\']:this.getAttribute(attr);if(isset(attributes[attr][\'to\'])){end=attributes[attr][\'to\'];}else if(isset(attributes[attr][\'by\'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr][\'by\'][i];}}else{end=start+attributes[attr][\'by\'];}}\n+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;this.runtimeAttributes[attr].unit=(isset(attributes[attr].unit))?attributes[attr][\'unit\']:this.getDefaultUnit(attr);},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}\n+this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);};this.stop=function(finish){if(finish){this.currentFrame=this.totalFrames;this._onTween.fire();}\n+YAHOO.util.AnimMgr.stop(this);};var onStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var attr in this.attributes){this.setRuntimeAttribute(attr);}\n+isAnimated=true;actualFrames=0;startTime=new Date();};var onTween=function(){var data={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};data.toString=function(){return(\'duration: \'+data.duration+\', currentFrame: \'+data.currentFrame);};this.onTween.fire(data);var runtimeAttributes=this.runtimeAttributes;for(var attr in runtimeAttributes){this.setAttribute(attr,this.doMethod(attr,runtimeAttributes[attr].start,runtimeAttributes[attr].end),runtimeAttributes[attr].unit);}\n+actualFrames+=1;};var onComplete=function(){var actual_duration=(new Date()-startTime)/1000;var data={duration:actual_duration,frames:actualFrames,fps:actualFrames/actual_duration};data.toString=function(){return(\'duration: \'+data.duration+\', frames: \'+data.frames+\', fps: \'+data.fps);};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};this._onStart=new YAHOO.util.CustomEvent(\'_start\',this,true);this.onStart=new YAHOO.util.CustomEvent(\'start\',this);this.onTween=new YAHOO.util.CustomEvent(\'tween\',this);this._onTween=new YAHOO.util.CustomEvent(\'_tween\',this,true);this.onComplete=new YAHOO.util.CustomEvent(\'complete\',this);this._onComplete=new YAHOO.util.CustomEvent(\'_complete\',this,true);this._onStart.subscribe(onStart);this._onTween.subscribe(onTween);this._onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=1000;this.delay=1;this.registerElement=function(tween){queue[queue.length]=tween;tweenCount+=1;tween._onStart.fire();this.start();};this.unRegister=function(tween,index){tween._onComplete.fire();index=index||getIndex(tween);if(index!=-1){queue.splice(index,1);}\n+tweenCount-=1;if(tweenCount<=0){this.stop();}};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[0].isAnimated()){this.unRegister(queue[0],0);}}\n+queue=[];thread=null;tweenCount=0;}\n+else{this.unRegister(tween);}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}\n+if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)\n+{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}\n+tween._onTween.fire();}\n+else{YAHOO.util.AnimMgr.stop(tween,i);}}};var getIndex=function(anim){for(var i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return i;}}\n+return-1;};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}\n+if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}\n+tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}\n+for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}\n+return[tmp[0][0],tmp[0][1]];};};(function(){YAHOO.util.ColorAnim=function(el,attributes,duration,method){YAHOO.util.ColorAnim.superclass.constructor.call(this,el,attributes,duration,method);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var superclass=Y.ColorAnim.superclass;var proto=Y.ColorAnim.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("ColorAnim "+id);};proto.patterns.color=/color$/i;proto.patterns.rgb=/^rgb\\(([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\)$/i;proto.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;proto.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;proto.patterns.transparent=/^transparent|rgba\\(0, 0, 0, 0\\)$/;proto.parseColor=function(s){if(s.length==3){return s;}\n+var c=this.patterns.hex.exec(s);if(c&&c.length==4){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];}\n+c=this.patterns.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}\n+c=this.patterns.hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}\n+return null;};proto.getAttribute=function(attr){var el=this.getEl();if(this.patterns.color.test(attr)){var val=YAHOO.util.Dom.getStyle(el,attr);if(this.patterns.transparent.test(val)){var parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(parent&&this.patterns.transparent.test(val)){parent=parent.parentNode;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperCase()==\'HTML\'){val=\'#fff\';}}}}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.doMethod=function(attr,start,end){var val;if(this.patterns.color.test(attr)){val=[];for(var i=0,len=start.length;i<len;++i){val[i]=superclass.doMethod.call(this,attr,start[i],end[i]);}\n+val=\'rgb(\'+Math.floor(val[0])+\',\'+Math.floor(val[1])+\',\'+Math.floor(val[2])+\')\';}\n+else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.setRuntimeAttribute=function(attr){superclass.setRuntimeAttribute.call(this,attr);if(this.patterns.color.test(attr)){var attributes=this.attributes;var start=this.parseColor(this.runtimeAttributes[attr].start);var end=this.parseColor(this.runtimeAttributes[attr].end);if(typeof attributes[attr][\'to\']===\'undefined\'&&typeof attributes[attr][\'by\']!==\'undefined\'){end=this.parseColor(attributes[attr].by);for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}\n+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}\n+return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}\n+return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d)==1){return b+c;}\n+if(!p){p=d*.3;}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d)==1){return b+c;}\n+if(!p){p=d*.3;}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d/2)==2){return b+c;}\n+if(!p){p=d*(.3*1.5);}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}\n+return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}\n+return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}\n+return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}\n+return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(function(){YAHOO.util.Motion=function(el,attributes,duration,method){if(el){YAHOO.util.Motion.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Motion.superclass;var proto=Y.Motion.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Motion "+id);};proto.patterns.points=/^points$/i;proto.setAttribute=function(attr,val,unit){if(this.patterns.points.test(attr)){unit=unit||\'px\';superclass.setAttribute.call(this,\'left\',val[0],unit);superclass.setAttribute.call(this,\'top\',val[1],unit);}else{superclass.setAttribute.call(this,attr,val,unit);}};proto.getAttribute=function(attr){if(this.patterns.points.test(attr)){var val=[superclass.getAttribute.call(this,\'left\'),superclass.getAttribute.call(this,\'top\')];}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.doMethod=function(attr,start,end){var val=null;if(this.patterns.points.test(attr)){var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.setRuntimeAttribute=function(attr){if(this.patterns.points.test(attr)){var el=this.getEl();var attributes=this.attributes;var start;var control=attributes[\'points\'][\'control\']||[];var end;var i,len;if(control.length>0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];}\n+control=tmp;}\n+if(Y.Dom.getStyle(el,\'position\')==\'static\'){Y.Dom.setStyle(el,\'position\',\'relative\');}\n+if(isset(attributes[\'points\'][\'from\'])){Y.Dom.setXY(el,attributes[\'points\'][\'from\']);}\n+else{Y.Dom.setXY(el,Y.Dom.getXY(el));}\n+start=this.getAttribute(\'points\');if(isset(attributes[\'points\'][\'to\'])){end=translateValues.call(this,attributes[\'points\'][\'to\'],start);var pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;i<len;++i){control[i]=translateValues.call(this,control[i],start);}}else if(isset(attributes[\'points\'][\'by\'])){end=[start[0]+attributes[\'points\'][\'by\'][0],start[1]+attributes[\'points\'][\'by\'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}\n+this.runtimeAttributes[attr]=[start];if(control.length>0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}\n+this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}\n+else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!==\'undefined\');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr==\'scroll\'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr==\'scroll\'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr==\'scroll\'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.2",build:"204"});\n+if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var Event=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(sMethod,args){for(var i in this.ids){for(var j in this.ids[i]){var oDD=this.ids[i][j];if(!this.isTypeOfDD(oDD)){continue;}\n+oDD[sMethod].apply(oDD,args);}}},_onLoad:function(){this.init();Event.on(document,"mouseup",this.handleMouseUp,this,true);Event.on(document,"mousemove",this.handleMouseMove,this,true);Event.on(window,"unload",this._onUnload,this,true);Event.on(window,"resize",this._onResize,this,true);},_onResize:function(e){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(oDD,sGroup){if(!this.initialized){this.init();}\n+if(!this.ids[sGroup]){this.ids[sGroup]={};}\n+this.ids[sGroup][oDD.id]=oDD;},removeDDFromGroup:function(oDD,sGroup){if(!this.ids[sGroup]){this.ids[sGroup]={};}\n+var obj=this.ids[sGroup];if(obj&&obj[oDD.id]){delete obj[oDD.id];}},_remove:function(oDD){for(var g in oDD.groups){if(g&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}}\n+delete this.handleIds[oDD.id];},regHandle:function(sDDId,sHandleId){if(!this.handleIds[sDDId]){this.handleIds[sDDId]={};}\n+this.handleIds[sDDId][sHandleId]=sHandleId;},isDragDrop:function(id){return(this.getDDById(id))?true:false;},getRelated:function(p_oDD,bTargetsOnly){var oDDs=[];for(var i in p_oDD.groups){for(j in this.ids[i]){var dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue;}\n+if(!bTargetsOnly||dd.isTarget){oDDs[oDDs.length]=dd;}}}\n+return oDDs;},isLegalTarget:function(oDD,oTargetDD){var targets=this.getRelated(oDD,true);for(var i=0,len=targets.length;i<len;++i){if(targets[i].id==oTargetDD.id){return true;}}\n+return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}}\n+return null;},handleMouseDown:function(e,oDD){this.currentTarget=YAHOO.util.Event.getTarget(e);this.dragCurrent=oDD;var el=oDD.getEl();this.startX=YAHOO.util.Event.getPageX(e);this.startY=YAHOO.util.Event.getPageY(e);this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);}\n+this.dragThreshMet=true;},handleMouseUp:function(e){if(!this.dragCurrent){return;}\n+clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(e,true);}else{}\n+this.stopDrag(e);this.stopEvent(e);},stopEvent:function(e){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(e);}\n+if(this.preventDefault){YAHOO.util.Event.preventDefault(e);}},stopDrag:function(e){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(e);this.dragCurrent.endDrag(e);}\n+this.dragCurrent.onMouseUp(e);}\n+this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(e){if(!this.dragCurrent){return true;}\n+if(YAHOO.util.Event.isIE&&!e.button){this.stopEvent(e);return this.handleMouseUp(e);}\n+if(!this.dragThreshMet){var diffX=Math.abs(this.startX-YAHOO.util.Event.getPageX(e));var diffY=Math.abs(this.startY-YAHOO.util.Event.getPageY(e));if(diffX>this.clickPixelThresh||diffY>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}\n+if(this.dragThreshMet){this.dragCurrent.b4Drag(e);this.dragCurrent.onDrag(e);this.fireEvents(e,false);}\n+this.stopEvent(e);return true;},fireEvents:function(e,isDrop){var dc=this.dragCurrent;if(!dc||dc.isLocked()){return;}\n+var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);var pt=new YAHOO.util.Point(x,y);var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);var oldOvers=[];var outEvts=[];var overEvts=[];var dropEvts=[];var enterEvts=[];for(var i in this.dragOvers){var ddo=this.dragOvers[i];if(!this.isTypeOfDD(ddo)){continue;}\n+if(!this.isOverTarget(pt,ddo,this.mode,curRegion)){outEvts.push(ddo);}\n+oldOvers[i]=true;delete this.dragOvers[i];}\n+for(var sGroup in dc.groups){if("string"!=typeof sGroup){continue;}\n+for(i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(!this.isTypeOfDD(oDD)){continue;}\n+if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){if(this.isOverTarget(pt,oDD,this.mode,curRegion)){if(isDrop){dropEvts.push(oDD);}else{if(!oldOvers[oDD.id]){enterEvts.push(oDD);}else{overEvts.push(oDD);}\n+this.dragOvers[oDD.id]=oDD;}}}}}\n+this.interactionInfo={out:outEvts,enter:enterEvts,over:overEvts,drop:dropEvts,point:pt,draggedRegion:curRegion,sourceRegion:this.locationCache[dc.id],validDrop:isDrop};if(isDrop&&!dropEvts.length){this.interactionInfo.validDrop=false;dc.onInvalidDrop(e);}\n+if(this.mode){if(outEvts.length){dc.b4DragOut(e,outEvts);dc.onDragOut(e,outEvts);}\n+if(enterEvts.length){dc.onDragEnter(e,enterEvts);}\n+if(overEvts.length){dc.b4DragOver(e,overEvts);dc.onDragOver(e,overEvts);}\n+if(dropEvts.length){dc.b4DragDrop(e,dropEvts);dc.onDragDrop(e,dropEvts);}}else{var len=0;for(i=0,len=outEvts.length;i<len;++i){dc.b4DragOut(e,outEvts[i].id);dc.onDragOut(e,outEvts[i].id);}\n+for(i=0,len=enterEvts.length;i<len;++i){dc.onDragEnter(e,enterEvts[i].id);}\n+for(i=0,len=overEvts.length;i<len;++i){dc.b4DragOver(e,overEvts[i].id);dc.onDragOver(e,overEvts[i].id);}\n+for(i=0,len=dropEvts.length;i<len;++i){dc.b4DragDrop(e,dropEvts[i].id);dc.onDragDrop(e,dropEvts[i].id);}}},getBestMatch:function(dds){var winner=null;var len=dds.length;if(len==1){winner=dds[0];}else{for(var i=0;i<len;++i){var dd=dds[i];if(this.mode==this.INTERSECT&&dd.cursorIsOver){winner=dd;break;}else{if(!winner||!winner.overlap||(dd.overlap&&winner.overlap.getArea()<dd.overlap.getArea())){winner=dd;}}}}\n+return winner;},refreshCache:function(groups){var g=groups||this.ids;for(var sGroup in g){if("string"!=typeof sGroup){continue;}\n+for(var i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(this.isTypeOfDD(oDD)){var loc=this.getLocation(oDD);if(loc){this.locationCache[oDD.id]=loc;}else{delete this.locationCache[oDD.id];}}}}},verifyEl:function(el){try{if(el){var parent=el.offsetParent;if(parent){return true;}}}catch(e){}\n+return false;},getLocation:function(oDD){if(!this.isTypeOfDD(oDD)){return null;}\n+var el=oDD.getEl(),pos,x1,x2,y1,y2,t,r,b,l;try{pos=YAHOO.util.Dom.getXY(el);}catch(e){}\n+if(!pos){return null;}\n+x1=pos[0];x2=x1+el.offsetWidth;y1=pos[1];y2=y1+el.offsetHeight;t=y1-oDD.padding[0];r=x2+oDD.padding[1];b=y2+oDD.padding[2];l=x1-oDD.padding[3];return new YAHOO.util.Region(t,r,b,l);},isOverTarget:function(pt,oTarget,intersect,curRegion){var loc=this.locationCache[oTarget.id];if(!loc||!this.useCache){loc=this.getLocation(oTarget);this.locationCache[oTarget.id]=loc;}\n+if(!loc){return false;}\n+oTarget.cursorIsOver=loc.contains(pt);var dc=this.dragCurrent;if(!dc||(!intersect&&!dc.constrainX&&!dc.constrainY)){return oTarget.cursorIsOver;}\n+oTarget.overlap=null;if(!curRegion){var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);}\n+var overlap=curRegion.intersect(loc);if(overlap){oTarget.overlap=overlap;return(intersect)?true:oTarget.cursorIsOver;}else{return false;}},_onUnload:function(e,me){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}\n+this._execOnAll("unreg",[]);for(i in this.elementCache){delete this.elementCache[i];}\n+this.elementCache={};this.ids={};},elementCache:{},getElWrapper:function(id){var oWrapper=this.elementCache[id];if(!oWrapper||!oWrapper.el){oWrapper=this.elementCache[id]=new this.ElementWrapper(YAHOO.util.Dom.get(id));}\n+return oWrapper;},getElement:function(id){return YAHOO.util.Dom.get(id);},getCss:function(id){var el=YAHOO.util.Dom.get(id);return(el)?el.style:null;},ElementWrapper:function(el){this.el=el||null;this.id=this.el&&el.id;this.css=this.el&&el.style;},getPosX:function(el){return YAHOO.util.Dom.getX(el);},getPosY:function(el){return YAHOO.util.Dom.getY(el);},swapNode:function(n1,n2){if(n1.swapNode){n1.swapNode(n2);}else{var p=n2.parentNode;var s=n2.nextSibling;if(s==n1){p.insertBefore(n1,n2);}else if(n2==n1.nextSibling){p.insertBefore(n2,n1);}else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s);}}},getScroll:function(){var t,l,dde=document.documentElement,db=document.body;if(dde&&(dde.scrollTop||dde.scrollLeft)){t=dde.scrollTop;l=dde.scrollLeft;}else if(db){t=db.scrollTop;l=db.scrollLeft;}else{}\n+return{top:t,left:l};},getStyle:function(el,styleProp){return YAHOO.util.Dom.getStyle(el,styleProp);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(moveEl,targetEl){var aCoord=YAHOO.util.Dom.getXY(targetEl);YAHOO.util.Dom.setXY(moveEl,aCoord);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(a,b){return(a-b);},_timeoutCount:0,_addListeners:function(){var DDM=YAHOO.util.DDM;if(YAHOO.util.Event&&document){DDM._onLoad();}else{if(DDM._timeoutCount>2000){}else{setTimeout(DDM._addListeners,10);if(document&&document.body){DDM._timeoutCount+=1;}}}},handleWasClicked:function(node,id){if(this.isHandle(id,node.id)){return true;}else{var p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return true;}else{p=p.parentNode;}}}\n+return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}\n+(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;YAHOO.util.DragDrop=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=Dom.get(this.id);}\n+return this._domRef;},getDragEl:function(){return Dom.get(this.dragElId);},init:function(id,sGroup,config){this.initTarget(id,sGroup,config);Event.on(this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(id,sGroup,config){this.config=config||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.id=id;this.addToGroup((sGroup)?sGroup:"default");this.handleElId=id;Event.onAvailable(id,this.handleOnAvailable,this,true);this.setDragElId(id);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(iTop,iRight,iBot,iLeft){if(!iRight&&0!==iRight){this.padding=[iTop,iTop,iTop,iTop];}else if(!iBot&&0!==iBot){this.padding=[iTop,iRight,iTop,iRight];}else{this.padding=[iTop,iRight,iBot,iLeft];}},setInitPosition:function(diffX,diffY){var el=this.getEl();if(!this.DDM.verifyEl(el)){return;}\n+var dx=diffX||0;var dy=diffY||0;var p=Dom.getXY(el);this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p);},setStartPosition:function(pos){var p=pos||Dom.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1];},addToGroup:function(sGroup){this.groups[sGroup]=true;this.DDM.regDragDrop(this,sGroup);},removeFromGroup:function(sGroup){if(this.groups[sGroup]){delete this.groups[sGroup];}\n+this.DDM.removeDDFromGroup(this,sGroup);},setDragElId:function(id){this.dragElId=id;},setHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.handleElId=id;this.DDM.regHandle(this.id,id);},setOuterHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+Event.on(id,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(id);this.hasOuterHandles=true;},unreg:function(){Event.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(e,oDD){var button=e.which||e.button;if(this.primaryButtonOnly&&button>1){return;}\n+if(this.isLocked()){return;}\n+this.b4MouseDown(e);this.onMouseDown(e);this.DDM.refreshCache(this.groups);var pt=new YAHOO.util.Point(Event.getPageX(e),Event.getPageY(e));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(pt,this)){}else{if(this.clickValidator(e)){this.setStartPosition();this.DDM.handleMouseDown(e,this);this.DDM.stopEvent(e);}else{}}},clickValidator:function(e){var target=Event.getTarget(e);return(this.isValidHandleChild(target)&&(this.id==this.handleElId||this.DDM.handleWasClicked(target,this.id)));},getTargetCoord:function(iPageX,iPageY){var x=iPageX-this.deltaX;var y=iPageY-this.deltaY;if(this.constrainX){if(x<this.minX){x=this.minX;}\n+if(x>this.maxX){x=this.maxX;}}\n+if(this.constrainY){if(y<this.minY){y=this.minY;}\n+if(y>this.maxY){y=this.maxY;}}\n+x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return{x:x,y:y};},addInvalidHandleType:function(tagName){var type=tagName.toUpperCase();this.invalidHandleTypes[type]=type;},addInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.invalidHandleIds[id]=id;},addInvalidHandleClass:function(cssClass){this.invalidHandleClasses.push(cssClass);},removeInvalidHandleType:function(tagName){var type=tagName.toUpperCase();delete this.invalidHandleTypes[type];},removeInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+delete this.invalidHandleIds[id];},removeInvalidHandleClass:function(cssClass){for(var i=0,len=this.invalidHandleClasses.length;i<len;++i){if(this.invalidHandleClasses[i]==cssClass){delete this.invalidHandleClasses[i];}}},isValidHandleChild:function(node){var valid=true;var nodeName;try{nodeName=node.nodeName.toUpperCase();}catch(e){nodeName=node.nodeName;}\n+valid=valid&&!this.invalidHandleTypes[nodeName];valid=valid&&!this.invalidHandleIds[node.id];for(var i=0,len=this.invalidHandleClasses.length;valid&&i<len;++i){valid=!Dom.hasClass(node,this.invalidHandleClasses[i]);}\n+return valid;},setXTicks:function(iStartX,iTickSize){this.xTicks=[];this.xTickSize=iTickSize;var tickMap={};for(var i=this.initPageX;i>=this.minX;i=i-iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}\n+for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}\n+this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(iStartY,iTickSize){this.yTicks=[];this.yTickSize=iTickSize;var tickMap={};for(var i=this.initPageY;i>=this.minY;i=i-iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}\n+for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}\n+this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(iLeft,iRight,iTickSize){this.leftConstraint=parseInt(iLeft,10);this.rightConstraint=parseInt(iRight,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(iTickSize){this.setXTicks(this.initPageX,iTickSize);}\n+this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(iUp,iDown,iTickSize){this.topConstraint=parseInt(iUp,10);this.bottomConstraint=parseInt(iDown,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(iTickSize){this.setYTicks(this.initPageY,iTickSize);}\n+this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy);}else{this.setInitPosition();}\n+if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}\n+if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(val,tickArray){if(!tickArray){return val;}else if(tickArray[0]>=val){return tickArray[0];}else{for(var i=0,len=tickArray.length;i<len;++i){var next=i+1;if(tickArray[next]&&tickArray[next]>=val){var diff1=val-tickArray[i];var diff2=tickArray[next]-val;return(diff2>diff1)?tickArray[i]:tickArray[next];}}\n+return tickArray[tickArray.length-1];}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(iPageX,iPageY){var x=iPageX-this.startPageX;var y=iPageY-this.startPageY;this.setDelta(x,y);},setDelta:function(iDeltaX,iDeltaY){this.deltaX=iDeltaX;this.deltaY=iDeltaY;},setDragElPos:function(iPageX,iPageY){var el=this.getDragEl();this.alignElWithMouse(el,iPageX,iPageY);},alignElWithMouse:function(el,iPageX,iPageY){var oCoord=this.getTargetCoord(iPageX,iPageY);if(!this.deltaSetXY){var aCoord=[oCoord.x,oCoord.y];YAHOO.util.Dom.setXY(el,aCoord);var newLeft=parseInt(YAHOO.util.Dom.getStyle(el,"left"),10);var newTop=parseInt(YAHOO.util.Dom.getStyle(el,"top"),10);this.deltaSetXY=[newLeft-oCoord.x,newTop-oCoord.y];}else{YAHOO.util.Dom.setStyle(el,"left",(oCoord.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(el,"top",(oCoord.y+this.deltaSetXY[1])+"px");}\n+this.cachePosition(oCoord.x,oCoord.y);this.autoScroll(oCoord.x,oCoord.y,el.offsetHeight,el.offsetWidth);},cachePosition:function(iPageX,iPageY){if(iPageX){this.lastPageX=iPageX;this.lastPageY=iPageY;}else{var aCoord=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=aCoord[0];this.lastPageY=aCoord[1];}},autoScroll:function(x,y,h,w){if(this.scroll){var clientH=this.DDM.getClientHeight();var clientW=this.DDM.getClientWidth();var st=this.DDM.getScrollTop();var sl=this.DDM.getScrollLeft();var bot=h+y;var right=w+x;var toBot=(clientH+st-y-this.deltaY);var toRight=(clientW+sl-x-this.deltaX);var thresh=40;var scrAmt=(document.all)?80:30;if(bot>clientH&&toBot<thresh){window.scrollTo(sl,st+scrAmt);}\n+if(y<st&&st>0&&y-st<thresh){window.scrollTo(sl,st-scrAmt);}\n+if(right>clientW&&toRight<thresh){window.scrollTo(sl+scrAmt,st);}\n+if(x<sl&&sl>0&&x-sl<thresh){window.scrollTo(sl-scrAmt,st);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(e){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},b4Drag:function(e){this.setDragElPos(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(id,sGroup,config){if(id){this.init(id,sGroup,config);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var self=this;var body=document.body;if(!body||!body.firstChild){setTimeout(function(){self.createFrame();},50);return;}\n+var div=this.getDragEl();if(!div){div=document.createElement("div");div.id=this.dragElId;var s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;body.insertBefore(div,body.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(iPageX,iPageY){var el=this.getEl();var dragEl=this.getDragEl();var s=dragEl.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2));}\n+this.setDragElPos(iPageX,iPageY);YAHOO.util.Dom.setStyle(dragEl,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var DOM=YAHOO.util.Dom;var el=this.getEl();var dragEl=this.getDragEl();var bt=parseInt(DOM.getStyle(dragEl,"borderTopWidth"),10);var br=parseInt(DOM.getStyle(dragEl,"borderRightWidth"),10);var bb=parseInt(DOM.getStyle(dragEl,"borderBottomWidth"),10);var bl=parseInt(DOM.getStyle(dragEl,"borderLeftWidth"),10);if(isNaN(bt)){bt=0;}\n+if(isNaN(br)){br=0;}\n+if(isNaN(bb)){bb=0;}\n+if(isNaN(bl)){bl=0;}\n+var newWidth=Math.max(0,el.offsetWidth-br-bl);var newHeight=Math.max(0,el.offsetHeight-bt-bb);DOM.setStyle(dragEl,"width",newWidth+"px");DOM.setStyle(dragEl,"height",newHeight+"px");}},b4MouseDown:function(e){this.setStartPosition();var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);this.autoOffset(x,y);this.setDragElPos(x,y);},b4StartDrag:function(x,y){this.showFrame(x,y);},b4EndDrag:function(e){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(e){var DOM=YAHOO.util.Dom;var lel=this.getEl();var del=this.getDragEl();DOM.setStyle(del,"visibility","");DOM.setStyle(lel,"visibility","hidden");YAHOO.util.DDM.moveToEl(lel,del);DOM.setStyle(del,"visibility","hidden");DOM.setStyle(lel,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(id,sGroup,config){if(id){this.initTarget(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.2.2",build:"204"});\n+YAHOO.util.Attribute=function(hash,owner){if(owner){this.owner=owner;this.configure(hash,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(value,silent){var beforeRetVal;var owner=this.owner;var name=this.name;var event={type:name,prevValue:this.getValue(),newValue:value};if(this.readOnly||(this.writeOnce&&this._written)){return false;}\n+if(this.validator&&!this.validator.call(owner,value)){return false;}\n+if(!silent){beforeRetVal=owner.fireBeforeChangeEvent(event);if(beforeRetVal===false){return false;}}\n+if(this.method){this.method.call(owner,value);}\n+this.value=value;this._written=true;event.type=name;if(!silent){this.owner.fireChangeEvent(event);}\n+return true;},configure:function(map,init){map=map||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var key in map){if(key&&YAHOO.lang.hasOwnProperty(map,key)){this[key]=map[key];if(init){this._initialConfig[key]=map[key];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(silent){this.setValue(this.value,silent);}};(function(){var Lang=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(key){var configs=this._configs||{};var config=configs[key];if(!config){return undefined;}\n+return config.value;},set:function(key,value,silent){var configs=this._configs||{};var config=configs[key];if(!config){return false;}\n+return config.setValue(value,silent);},getAttributeKeys:function(){var configs=this._configs;var keys=[];var config;for(var key in configs){config=configs[key];if(Lang.hasOwnProperty(configs,key)&&!Lang.isUndefined(config)){keys[keys.length]=key;}}\n+return keys;},setAttributes:function(map,silent){for(var key in map){if(Lang.hasOwnProperty(map,key)){this.set(key,map[key],silent);}}},resetValue:function(key,silent){var configs=this._configs||{};if(configs[key]){this.set(key,configs[key]._initialConfig.value,silent);return true;}\n+return false;},refresh:function(key,silent){var configs=this._configs;key=((Lang.isString(key))?[key]:key)||this.getAttributeKeys();for(var i=0,len=key.length;i<len;++i){if(configs[key[i]]&&!Lang.isUndefined(configs[key[i]].value)&&!Lang.isNull(configs[key[i]].value)){configs[key[i]].refresh(silent);}}},register:function(key,map){this.setAttributeConfig(key,map);},getAttributeConfig:function(key){var configs=this._configs||{};var config=configs[key]||{};var map={};for(key in config){if(Lang.hasOwnProperty(config,key)){map[key]=config[key];}}\n+return map;},setAttributeConfig:function(key,map,init){var configs=this._configs||{};map=map||{};if(!configs[key]){map.name=key;configs[key]=new YAHOO.util.Attribute(map,this);}else{configs[key].configure(map,init);}},configureAttribute:function(key,map,init){this.setAttributeConfig(key,map,init);},resetAttributeConfig:function(key){var configs=this._configs||{};configs[key].resetConfig();},fireBeforeChangeEvent:function(e){var type=\'before\';type+=e.type.charAt(0).toUpperCase()+e.type.substr(1)+\'Change\';e.type=type;return this.fireEvent(e.type,e);},fireChangeEvent:function(e){e.type+=\'Change\';return this.fireEvent(e.type,e);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var Dom=YAHOO.util.Dom,AttributeProvider=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(el,map){if(arguments.length){this.init(el,map);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(child){child=child.get?child.get(\'element\'):child;this.get(\'element\').appendChild(child);},getElementsByTagName:function(tag){return this.get(\'element\').getElementsByTagName(tag);},hasChildNodes:function(){return this.get(\'element\').hasChildNodes();},insertBefore:function(element,before){element=element.get?element.get(\'element\'):element;before=(before&&before.get)?before.get(\'element\'):before;this.get(\'element\').insertBefore(element,before);},removeChild:function(child){child=child.get?child.get(\'element\'):child;this.get(\'element\').removeChild(child);return true;},replaceChild:function(newNode,oldNode){newNode=newNode.get?newNode.get(\'element\'):newNode;oldNode=oldNode.get?oldNode.get(\'element\'):oldNode;return this.get(\'element\').replaceChild(newNode,oldNode);},initAttributes:function(map){},addListener:function(type,fn,obj,scope){var el=this.get(\'element\');scope=scope||this;el=this.get(\'id\')||el;var self=this;if(!this._events[type]){if(this.DOM_EVENTS[type]){YAHOO.util.Event.addListener(el,type,function(e){if(e.srcElement&&!e.target){e.target=e.srcElement;}\n+self.fireEvent(type,e);},obj,scope);}\n+this.createEvent(type,this);}\n+this.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},removeListener:function(type,fn){this.unsubscribe.apply(this,arguments);},addClass:function(className){Dom.addClass(this.get(\'element\'),className);},getElementsByClassName:function(className,tag){return Dom.getElementsByClassName(className,tag,this.get(\'element\'));},hasClass:function(className){return Dom.hasClass(this.get(\'element\'),className);},removeClass:function(className){return Dom.removeClass(this.get(\'element\'),className);},replaceClass:function(oldClassName,newClassName){return Dom.replaceClass(this.get(\'element\'),oldClassName,newClassName);},setStyle:function(property,value){var el=this.get(\'element\');if(!el){return this._queue[this._queue.length]=[\'setStyle\',arguments];}\n+return Dom.setStyle(el,property,value);},getStyle:function(property){return Dom.getStyle(this.get(\'element\'),property);},fireQueue:function(){var queue=this._queue;for(var i=0,len=queue.length;i<len;++i){this[queue[i][0]].apply(this,queue[i][1]);}},appendTo:function(parent,before){parent=(parent.get)?parent.get(\'element\'):Dom.get(parent);this.fireEvent(\'beforeAppendTo\',{type:\'beforeAppendTo\',target:parent});before=(before&&before.get)?before.get(\'element\'):Dom.get(before);var element=this.get(\'element\');if(!element){return false;}\n+if(!parent){return false;}\n+if(element.parent!=parent){if(before){parent.insertBefore(element,before);}else{parent.appendChild(element);}}\n+this.fireEvent(\'appendTo\',{type:\'appendTo\',target:parent});},get:function(key){var configs=this._configs||{};var el=configs.element;if(el&&!configs[key]&&!YAHOO.lang.isUndefined(el.value[key])){return el.value[key];}\n+return AttributeProvider.prototype.get.call(this,key);},set:function(key,value,silent){var el=this.get(\'element\');if(!el){this._queue[this._queue.length]=[\'set\',arguments];if(this._configs[key]){this._configs[key].value=value;}\n+return;}\n+if(!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key);}\n+return AttributeProvider.prototype.set.apply(this,arguments);},setAttributeConfig:function(key,map,init){var el=this.get(\'element\');if(el&&!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key,map);}else{AttributeProvider.prototype.setAttributeConfig.apply(this,arguments);}},getAttributeKeys:function(){var el=this.get(\'element\');var keys=AttributeProvider.prototype.getAttributeKeys.call(this);for(var key in el){if(!this._configs[key]){keys[key]=keys[key]||el[key];}}\n+return keys;},createEvent:function(type,scope){this._events[type]=true;AttributeProvider.prototype.createEvent.apply(this,arguments);},init:function(el,attr){_initElement.apply(this,arguments);}};var _initElement=function(el,attr){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};attr=attr||{};attr.element=attr.element||el||null;this.DOM_EVENTS={\'click\':true,\'dblclick\':true,\'keydown\':true,\'keypress\':true,\'keyup\':true,\'mousedown\':true,\'mousemove\':true,\'mouseout\':true,\'mouseover\':true,\'mouseup\':true,\'focus\':true,\'blur\':true,\'submit\':true};var isReady=false;if(YAHOO.lang.isString(el)){_registerHTMLAttr.call(this,\'id\',{value:attr.element});}\n+if(Dom.get(el)){isReady=true;_initHTMLElement.call(this,attr);_initContent.call(this,attr);}\n+YAHOO.util.Event.onAvailable(attr.element,function(){if(!isReady){_initHTMLElement.call(this,attr);}\n+this.fireEvent(\'available\',{type:\'available\',target:attr.element});},this,true);YAHOO.util.Event.onContentReady(attr.element,function(){if(!isReady){_initContent.call(this,attr);}\n+this.fireEvent(\'contentReady\',{type:\'contentReady\',target:attr.element});},this,true);};var _initHTMLElement=function(attr){this.setAttributeConfig(\'element\',{value:Dom.get(attr.element),readOnly:true});};var _initContent=function(attr){this.initAttributes(attr);this.setAttributes(attr,true);this.fireQueue();};var _registerHTMLAttr=function(key,map){var el=this.get(\'element\');map=map||{};map.name=key;map.method=map.method||function(value){el[key]=value;};map.value=map.value||el[key];this._configs[key]=new YAHOO.util.Attribute(map,this);};YAHOO.augment(YAHOO.util.Element,AttributeProvider);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.2.2",build:"204"});\n\\ No newline at end of file\n', 'commit_subject': 'BOSC 2007, more or less', 'repo_name': 'GMOD/jbrowse', 'committer': {'name': 'Mitch Skinner', 'email': 'dd35a95f7c08cd1b535dd0bd1d447bae69f97192@berkeley.edu', 'time_sec': '1185099799', 'tz_offset': '120', 'date': {'seconds': '1185099799'}}, 'commit_tree': 'a60e356082199621b3348846691099620dc1f2c4', 'commit_message': 'BOSC 2007, more or less\n', 'language_name': 'Shell', 'license': 'lgpl-2.1', 'hunks': '@@ -0,0 +1,433 @@\n+/*\n+Copyright (c) 2007, Yahoo! Inc. All rights reserved.\n+Code licensed under the BSD License:\n+http://developer.yahoo.net/yui/license.txt\n+version: 2.2.2\n+*/\n+\n+if(typeof YAHOO=="undefined"){var YAHOO={};}\n+YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}\n+return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}\n+if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}\n+var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}\n+if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf(\'Array\')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj==\'boolean\';},isFunction:function(obj){return typeof obj==\'function\';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj==\'number\'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj==\'object\'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj==\'string\';},isUndefined:function(obj){return typeof obj==\'undefined\';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}\n+return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}\n+var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}\n+if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}\n+var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});\n+(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf(\'opera\')>-1),isSafari=(ua.indexOf(\'safari\')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf(\'gecko\')>-1),isIE=(!isOpera&&ua.indexOf(\'msie\')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}\n+if(propertyCache[property]){return propertyCache[property];}\n+var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}\n+propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property==\'float\'){property=\'cssFloat\';}\n+var computed=document.defaultView.getComputedStyle(el,\'\');if(computed){value=computed[toCamel(property)];}\n+return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case\'opacity\':var val=100;try{val=el.filters[\'DXImageTransform.Microsoft.Alpha\'].opacity;}catch(e){try{val=el.filters(\'alpha\').opacity;}catch(e){}}\n+return val/100;break;case\'float\':property=\'styleFloat\';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}\n+if(isIE){setStyle=function(el,property,val){switch(property){case\'opacity\':if(YAHOO.lang.isString(el.style.filter)){el.style.filter=\'alpha(opacity=\'+val*100+\')\';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}\n+break;case\'float\':property=\'styleFloat\';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property==\'float\'){property=\'cssFloat\';}\n+el.style[property]=val;};}\n+YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}\n+if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}\n+return c;}\n+if(el){return el;}\n+return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,\'display\')==\'none\')&&el!=document.body){return false;}\n+var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}\n+var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}\n+else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,\'position\')==\'absolute\';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,\'position\')==\'absolute\'){hasAbs=true;}\n+parentNode=parentNode.offsetParent;}}\n+if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}\n+parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))\n+{if(Y.Dom.getStyle(parentNode,\'display\')!=\'inline\'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}\n+parentNode=parentNode.parentNode;}\n+return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,\'position\');if(style_pos==\'static\'){this.setStyle(el,\'position\',\'relative\');style_pos=\'relative\';}\n+var pageXY=this.getXY(el);if(pageXY===false){return false;}\n+var delta=[parseInt(this.getStyle(el,\'left\'),10),parseInt(this.getStyle(el,\'top\'),10)];if(isNaN(delta[0])){delta[0]=(style_pos==\'relative\')?0:el.offsetLeft;}\n+if(isNaN(delta[1])){delta[1]=(style_pos==\'relative\')?0:el.offsetTop;}\n+if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+\'px\';}\n+if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+\'px\';}\n+if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp(\'(?:^|\\\\s+)\'+className+\'(?:\\\\s+|$)\');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}\n+el.className=[el.className,className].join(\' \');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp(\'(?:^|\\\\s+)\'+className+\'(?:\\\\s+|$)\',\'g\');var f=function(el){if(!this.hasClass(el,className)){return;}\n+var c=el.className;el.className=c.replace(re,\' \');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}\n+var re=new RegExp(\'(?:^|\\\\s+)\'+oldClassName+\'(?:\\\\s+|$)\',\'g\');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}\n+el.className=el.className.replace(re,\' \'+newClassName+\' \');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||\'yui-gen\';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}\n+if(!el.id){el.id=prefix+id_counter++;}\n+return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}\n+var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}\n+else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}\n+else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}\n+else if(!parent.tagName||parent.tagName.toUpperCase()==\'HTML\'){return false;}\n+parent=parent.parentNode;}\n+return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||\'*\';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}\n+var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag==\'*\'&&root.all)){elements=root.all;}\n+for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}\n+return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}\n+return method.call(scope,el,o);}\n+var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}\n+collection[collection.length]=method.call(scope,el[i],o);}\n+return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!=\'CSS1Compat\')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!=\'CSS1Compat\')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode==\'CSS1Compat\')?document.documentElement.clientHeight:document.body.clientHeight;}\n+return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode==\'CSS1Compat\')?document.documentElement.clientWidth:document.body.clientWidth;}\n+return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}\n+this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});\n+YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}\n+var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to \'"+this.type+"\'");}\n+if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}\n+this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}\n+var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}\n+return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}\n+var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}\n+var argslength=args.length;if(!this.silent){}\n+for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}\n+var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}\n+ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}\n+if(false===ret){if(!this.silent){}\n+return false;}}}\n+return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}\n+return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}\n+this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"\'"+this.type+"\', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}\n+return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\\/([^ ]*)/);if(v&&v[1]){return v[1];}\n+return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}\n+if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}\n+return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}\n+if(!el){return false;}\n+if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}\n+var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}\n+var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}\n+legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}\n+return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}\n+le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}\n+return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}\n+return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}\n+return ok;}\n+if(!fn||!fn.call){return this.purgeElement(el,false,sType);}\n+if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}\n+return false;}\n+var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}\n+if(index>=0){cacheItem=listeners[index];}\n+if(!el||!cacheItem){return false;}\n+if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}\n+delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}\n+return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}\n+return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}\n+return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}\n+return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}\n+c=c.caller;}}\n+return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}\n+return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}\n+return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}\n+if(this.isIE&&!DOMReady){return false;}\n+this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}\n+var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}\n+item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}\n+for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}\n+retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}\n+this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}\n+if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}\n+for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}\n+return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}\n+l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}\n+unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}\n+j=j-1;}\n+l=null;EU.clearCache();}\n+for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}\n+legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){document.write(\'<scr\'+\'ipt id="_yui_eu_dr" defer="true" src="//:"></script>\');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}\n+EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}\n+YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}\n+subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}\n+this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}\n+return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}\n+return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}\n+return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}\n+if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}\n+var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo==\'string\'){attachTo=document.getElementById(attachTo);}\n+if(typeof handler==\'function\'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}\n+function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}\n+if(!keyData.alt){keyData.alt=false;}\n+if(!keyData.ctrl){keyData.ctrl=false;}\n+if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}\n+this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}\n+this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}\n+this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+\n+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});\n+YAHOO.util.Connect={_msxml_progid:[\'MSXML2.XMLHTTP.3.0\',\'MSXML2.XMLHTTP\',\'Microsoft.XMLHTTP\'],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:\'application/x-www-form-urlencoded; charset=UTF-8\',_use_default_xhr_header:true,_default_xhr_header:\'XMLHttpRequest\',_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function()\n+{if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,\'click\',function(e){var obj=YAHOO.util.Event.getTarget(e);if(obj.type==\'submit\'){YAHOO.util.Connect._submitElementValue=encodeURIComponent(obj.name)+"="+encodeURIComponent(obj.value);}})\n+return true;}\n+return false;})(),setProgId:function(id)\n+{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)\n+{this._use_default_post_header=b;},setDefaultXhrHeader:function(b)\n+{this._use_default_xhr_header=b;},setPollingInterval:function(i)\n+{if(typeof i==\'number\'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)\n+{var obj,http;try\n+{http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}\n+catch(e)\n+{for(var i=0;i<this._msxml_progid.length;++i){try\n+{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}\n+catch(e){}}}\n+finally\n+{return obj;}},getConnectionObject:function()\n+{var o;var tId=this._transaction_id;try\n+{o=this.createXhrObject(tId);if(o){this._transaction_id++;}}\n+catch(e){}\n+finally\n+{return o;}},asyncRequest:function(method,uri,callback,postData)\n+{var o=this.getConnectionObject();if(!o){return null;}\n+else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri,postData);this.releaseObject(o);return;}\n+if(method.toUpperCase()==\'GET\'){if(this._sFormData.length!=0){uri+=((uri.indexOf(\'?\')==-1)?\'?\':\'&\')+this._sFormData;}\n+else{uri+="?"+this._sFormData;}}\n+else if(method.toUpperCase()==\'POST\'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}\n+o.conn.open(method,uri,true);if(this._use_default_xhr_header){if(!this._default_headers[\'X-Requested-With\']){this.initHeader(\'X-Requested-With\',this._default_xhr_header,true);}}\n+if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader(\'Content-Type\',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}\n+if(this._has_default_headers||this._has_http_headers){this.setHeader(o);}\n+this.handleReadyState(o,callback);o.conn.send(postData||null);return o;}},handleReadyState:function(o,callback)\n+{var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}\n+this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState===4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}\n+oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)\n+{if(!callback){this.releaseObject(o);return;}\n+var httpStatus,responseObject;try\n+{if(o.conn.status!==undefined&&o.conn.status!==0){httpStatus=o.conn.status;}\n+else{httpStatus=13030;}}\n+catch(e){httpStatus=13030;}\n+if(httpStatus>=200&&httpStatus<300||httpStatus===1223){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}\n+else{callback.success.apply(callback.scope,[responseObject]);}}}\n+else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}\n+else{callback.failure.apply(callback.scope,[responseObject]);}}\n+break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}\n+else{callback.failure.apply(callback.scope,[responseObject]);}}}}\n+this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)\n+{var obj={};var headerObj={};try\n+{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split(\'\\n\');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(\':\');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}\n+catch(e){}\n+obj.tId=o.tId;obj.status=(o.conn.status==1223)?204:o.conn.status;obj.statusText=(o.conn.status==1223)?"No Content":o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}\n+return obj;},createExceptionObject:function(tId,callbackArg,isAbort)\n+{var COMM_CODE=0;var COMM_ERROR=\'communication failure\';var ABORT_CODE=-1;var ABORT_ERROR=\'transaction aborted\';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}\n+else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}\n+if(callbackArg){obj.argument=callbackArg;}\n+return obj;},initHeader:function(label,value,isDefault)\n+{var headerObj=(isDefault)?this._default_headers:this._http_headers;if(headerObj[label]===undefined){headerObj[label]=value;}\n+else{headerObj[label]=value+","+headerObj[label];}\n+if(isDefault){this._has_default_headers=true;}\n+else{this._has_http_headers=true;}},setHeader:function(o)\n+{if(this._has_default_headers){for(var prop in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,prop)){o.conn.setRequestHeader(prop,this._default_headers[prop]);}}}\n+if(this._has_http_headers){for(var prop in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,prop)){o.conn.setRequestHeader(prop,this._http_headers[prop]);}}\n+delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers\n+this._default_headers={};this._has_default_headers=false;},setForm:function(formId,isUpload,secureUri)\n+{this.resetFormState();var oForm;if(typeof formId==\'string\'){oForm=(document.getElementById(formId)||document.forms[formId]);}\n+else if(typeof formId==\'object\'){oForm=formId;}\n+else{return;}\n+if(isUpload){this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}\n+var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];oDisabled=oForm.elements[i].disabled;oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)\n+{switch(oElement.type)\n+{case\'select-one\':case\'select-multiple\':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oElement.options[j].attributes[\'value\'].specified?oElement.options[j].value:oElement.options[j].text)+\'&\';}\n+else{this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oElement.options[j].hasAttribute(\'value\')?oElement.options[j].value:oElement.options[j].text)+\'&\';}}}\n+break;case\'radio\':case\'checkbox\':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';}\n+break;case\'file\':case undefined:case\'reset\':case\'button\':break;case\'submit\':if(hasSubmit===false){if(this._hasSubmitListener){this._sFormData+=this._submitElementValue+\'&\';}\n+else{this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';}\n+hasSubmit=true;}\n+break;default:this._sFormData+=encodeURIComponent(oName)+\'=\'+encodeURIComponent(oValue)+\'&\';break;}}}\n+this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId=\'yuiIO\'+this._transaction_id;if(window.ActiveXObject){var io=document.createElement(\'<iframe id="\'+frameId+\'" name="\'+frameId+\'" />\');if(typeof secureUri==\'boolean\'){io.src=\'javascript:false\';}\n+else if(typeof secureURI==\'string\'){io.src=secureUri;}}\n+else{var io=document.createElement(\'iframe\');io.id=frameId;io.name=frameId;}\n+io.style.position=\'absolute\';io.style.top=\'-1000px\';io.style.left=\'-1000px\';document.body.appendChild(io);},appendPostData:function(postData)\n+{var formElements=[];var postMessage=postData.split(\'&\');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf(\'=\');if(delimitPos!=-1){formElements[i]=document.createElement(\'input\');formElements[i].type=\'hidden\';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}\n+return formElements;},uploadFile:function(id,callback,uri,postData){var frameId=\'yuiIO\'+id;var uploadEncoding=\'multipart/form-data\';var io=document.getElementById(frameId);this._formNode.setAttribute(\'action\',uri);this._formNode.setAttribute(\'method\',\'POST\');this._formNode.setAttribute("target",frameId);if(this._formNode.encoding){this._formNode.encoding=uploadEncoding;}\n+else{this._formNode.enctype=uploadEncoding;}\n+if(postData){var oElements=this.appendPostData(postData);}\n+this._formNode.submit();if(oElements&&oElements.length>0){for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}\n+this.resetFormState();var uploadCallback=function()\n+{var obj={};obj.tId=id;obj.argument=callback.argument;try\n+{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}\n+catch(e){}\n+if(callback&&callback.upload){if(!callback.scope){callback.upload(obj);}\n+else{callback.upload.apply(callback.scope,[obj]);}}\n+if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);}\n+else if(window.detachEvent){io.detachEvent(\'onload\',uploadCallback);}\n+else{io.removeEventListener(\'load\',uploadCallback,false);}\n+setTimeout(function(){document.body.removeChild(io);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",uploadCallback);}\n+else if(window.attachEvent){io.attachEvent(\'onload\',uploadCallback);}\n+else{io.addEventListener(\'load\',uploadCallback,false);}},abort:function(o,callback,isTimeout)\n+{if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];}\n+this.handleTransactionResponse(o,callback,true);return true;}\n+else{return false;}},isCallInProgress:function(o)\n+{if(o.conn){return o.conn.readyState!==4&&o.conn.readyState!==0;}\n+else{return false;}},releaseObject:function(o)\n+{o.conn=null;o=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.2.2",build:"204"});\n+YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}\n+YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!==\'auto\'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}\n+var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,\'position\')==\'absolute\'&&pos)){val=el[\'offset\'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}\n+return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return\'px\';}\n+return\'\';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!==\'undefined\');};if(!isset(attributes[attr][\'to\'])&&!isset(attributes[attr][\'by\'])){return false;}\n+start=(isset(attributes[attr][\'from\']))?attributes[attr][\'from\']:this.getAttribute(attr);if(isset(attributes[attr][\'to\'])){end=attributes[attr][\'to\'];}else if(isset(attributes[attr][\'by\'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr][\'by\'][i];}}else{end=start+attributes[attr][\'by\'];}}\n+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;this.runtimeAttributes[attr].unit=(isset(attributes[attr].unit))?attributes[attr][\'unit\']:this.getDefaultUnit(attr);},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}\n+this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);};this.stop=function(finish){if(finish){this.currentFrame=this.totalFrames;this._onTween.fire();}\n+YAHOO.util.AnimMgr.stop(this);};var onStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var attr in this.attributes){this.setRuntimeAttribute(attr);}\n+isAnimated=true;actualFrames=0;startTime=new Date();};var onTween=function(){var data={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};data.toString=function(){return(\'duration: \'+data.duration+\', currentFrame: \'+data.currentFrame);};this.onTween.fire(data);var runtimeAttributes=this.runtimeAttributes;for(var attr in runtimeAttributes){this.setAttribute(attr,this.doMethod(attr,runtimeAttributes[attr].start,runtimeAttributes[attr].end),runtimeAttributes[attr].unit);}\n+actualFrames+=1;};var onComplete=function(){var actual_duration=(new Date()-startTime)/1000;var data={duration:actual_duration,frames:actualFrames,fps:actualFrames/actual_duration};data.toString=function(){return(\'duration: \'+data.duration+\', frames: \'+data.frames+\', fps: \'+data.fps);};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};this._onStart=new YAHOO.util.CustomEvent(\'_start\',this,true);this.onStart=new YAHOO.util.CustomEvent(\'start\',this);this.onTween=new YAHOO.util.CustomEvent(\'tween\',this);this._onTween=new YAHOO.util.CustomEvent(\'_tween\',this,true);this.onComplete=new YAHOO.util.CustomEvent(\'complete\',this);this._onComplete=new YAHOO.util.CustomEvent(\'_complete\',this,true);this._onStart.subscribe(onStart);this._onTween.subscribe(onTween);this._onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=1000;this.delay=1;this.registerElement=function(tween){queue[queue.length]=tween;tweenCount+=1;tween._onStart.fire();this.start();};this.unRegister=function(tween,index){tween._onComplete.fire();index=index||getIndex(tween);if(index!=-1){queue.splice(index,1);}\n+tweenCount-=1;if(tweenCount<=0){this.stop();}};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[0].isAnimated()){this.unRegister(queue[0],0);}}\n+queue=[];thread=null;tweenCount=0;}\n+else{this.unRegister(tween);}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}\n+if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)\n+{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}\n+tween._onTween.fire();}\n+else{YAHOO.util.AnimMgr.stop(tween,i);}}};var getIndex=function(anim){for(var i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return i;}}\n+return-1;};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}\n+if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}\n+tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}\n+for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}\n+return[tmp[0][0],tmp[0][1]];};};(function(){YAHOO.util.ColorAnim=function(el,attributes,duration,method){YAHOO.util.ColorAnim.superclass.constructor.call(this,el,attributes,duration,method);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var superclass=Y.ColorAnim.superclass;var proto=Y.ColorAnim.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("ColorAnim "+id);};proto.patterns.color=/color$/i;proto.patterns.rgb=/^rgb\\(([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\)$/i;proto.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;proto.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;proto.patterns.transparent=/^transparent|rgba\\(0, 0, 0, 0\\)$/;proto.parseColor=function(s){if(s.length==3){return s;}\n+var c=this.patterns.hex.exec(s);if(c&&c.length==4){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];}\n+c=this.patterns.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}\n+c=this.patterns.hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}\n+return null;};proto.getAttribute=function(attr){var el=this.getEl();if(this.patterns.color.test(attr)){var val=YAHOO.util.Dom.getStyle(el,attr);if(this.patterns.transparent.test(val)){var parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(parent&&this.patterns.transparent.test(val)){parent=parent.parentNode;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperCase()==\'HTML\'){val=\'#fff\';}}}}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.doMethod=function(attr,start,end){var val;if(this.patterns.color.test(attr)){val=[];for(var i=0,len=start.length;i<len;++i){val[i]=superclass.doMethod.call(this,attr,start[i],end[i]);}\n+val=\'rgb(\'+Math.floor(val[0])+\',\'+Math.floor(val[1])+\',\'+Math.floor(val[2])+\')\';}\n+else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.setRuntimeAttribute=function(attr){superclass.setRuntimeAttribute.call(this,attr);if(this.patterns.color.test(attr)){var attributes=this.attributes;var start=this.parseColor(this.runtimeAttributes[attr].start);var end=this.parseColor(this.runtimeAttributes[attr].end);if(typeof attributes[attr][\'to\']===\'undefined\'&&typeof attributes[attr][\'by\']!==\'undefined\'){end=this.parseColor(attributes[attr].by);for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}\n+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}\n+return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}\n+return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d)==1){return b+c;}\n+if(!p){p=d*.3;}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d)==1){return b+c;}\n+if(!p){p=d*.3;}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}\n+if((t/=d/2)==2){return b+c;}\n+if(!p){p=d*(.3*1.5);}\n+if(!a||a<Math.abs(c)){a=c;var s=p/4;}\n+else{var s=p/(2*Math.PI)*Math.asin(c/a);}\n+if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}\n+return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s==\'undefined\'){s=1.70158;}\n+if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}\n+return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}\n+return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}\n+return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(function(){YAHOO.util.Motion=function(el,attributes,duration,method){if(el){YAHOO.util.Motion.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Motion.superclass;var proto=Y.Motion.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Motion "+id);};proto.patterns.points=/^points$/i;proto.setAttribute=function(attr,val,unit){if(this.patterns.points.test(attr)){unit=unit||\'px\';superclass.setAttribute.call(this,\'left\',val[0],unit);superclass.setAttribute.call(this,\'top\',val[1],unit);}else{superclass.setAttribute.call(this,attr,val,unit);}};proto.getAttribute=function(attr){if(this.patterns.points.test(attr)){var val=[superclass.getAttribute.call(this,\'left\'),superclass.getAttribute.call(this,\'top\')];}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.doMethod=function(attr,start,end){var val=null;if(this.patterns.points.test(attr)){var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.setRuntimeAttribute=function(attr){if(this.patterns.points.test(attr)){var el=this.getEl();var attributes=this.attributes;var start;var control=attributes[\'points\'][\'control\']||[];var end;var i,len;if(control.length>0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];}\n+control=tmp;}\n+if(Y.Dom.getStyle(el,\'position\')==\'static\'){Y.Dom.setStyle(el,\'position\',\'relative\');}\n+if(isset(attributes[\'points\'][\'from\'])){Y.Dom.setXY(el,attributes[\'points\'][\'from\']);}\n+else{Y.Dom.setXY(el,Y.Dom.getXY(el));}\n+start=this.getAttribute(\'points\');if(isset(attributes[\'points\'][\'to\'])){end=translateValues.call(this,attributes[\'points\'][\'to\'],start);var pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;i<len;++i){control[i]=translateValues.call(this,control[i],start);}}else if(isset(attributes[\'points\'][\'by\'])){end=[start[0]+attributes[\'points\'][\'by\'][0],start[1]+attributes[\'points\'][\'by\'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}\n+this.runtimeAttributes[attr]=[start];if(control.length>0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}\n+this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}\n+else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!==\'undefined\');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr==\'scroll\'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}\n+return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr==\'scroll\'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}\n+return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr==\'scroll\'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.2",build:"204"});\n+if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var Event=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(sMethod,args){for(var i in this.ids){for(var j in this.ids[i]){var oDD=this.ids[i][j];if(!this.isTypeOfDD(oDD)){continue;}\n+oDD[sMethod].apply(oDD,args);}}},_onLoad:function(){this.init();Event.on(document,"mouseup",this.handleMouseUp,this,true);Event.on(document,"mousemove",this.handleMouseMove,this,true);Event.on(window,"unload",this._onUnload,this,true);Event.on(window,"resize",this._onResize,this,true);},_onResize:function(e){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(oDD,sGroup){if(!this.initialized){this.init();}\n+if(!this.ids[sGroup]){this.ids[sGroup]={};}\n+this.ids[sGroup][oDD.id]=oDD;},removeDDFromGroup:function(oDD,sGroup){if(!this.ids[sGroup]){this.ids[sGroup]={};}\n+var obj=this.ids[sGroup];if(obj&&obj[oDD.id]){delete obj[oDD.id];}},_remove:function(oDD){for(var g in oDD.groups){if(g&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}}\n+delete this.handleIds[oDD.id];},regHandle:function(sDDId,sHandleId){if(!this.handleIds[sDDId]){this.handleIds[sDDId]={};}\n+this.handleIds[sDDId][sHandleId]=sHandleId;},isDragDrop:function(id){return(this.getDDById(id))?true:false;},getRelated:function(p_oDD,bTargetsOnly){var oDDs=[];for(var i in p_oDD.groups){for(j in this.ids[i]){var dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue;}\n+if(!bTargetsOnly||dd.isTarget){oDDs[oDDs.length]=dd;}}}\n+return oDDs;},isLegalTarget:function(oDD,oTargetDD){var targets=this.getRelated(oDD,true);for(var i=0,len=targets.length;i<len;++i){if(targets[i].id==oTargetDD.id){return true;}}\n+return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}}\n+return null;},handleMouseDown:function(e,oDD){this.currentTarget=YAHOO.util.Event.getTarget(e);this.dragCurrent=oDD;var el=oDD.getEl();this.startX=YAHOO.util.Event.getPageX(e);this.startY=YAHOO.util.Event.getPageY(e);this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);}\n+this.dragThreshMet=true;},handleMouseUp:function(e){if(!this.dragCurrent){return;}\n+clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(e,true);}else{}\n+this.stopDrag(e);this.stopEvent(e);},stopEvent:function(e){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(e);}\n+if(this.preventDefault){YAHOO.util.Event.preventDefault(e);}},stopDrag:function(e){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(e);this.dragCurrent.endDrag(e);}\n+this.dragCurrent.onMouseUp(e);}\n+this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(e){if(!this.dragCurrent){return true;}\n+if(YAHOO.util.Event.isIE&&!e.button){this.stopEvent(e);return this.handleMouseUp(e);}\n+if(!this.dragThreshMet){var diffX=Math.abs(this.startX-YAHOO.util.Event.getPageX(e));var diffY=Math.abs(this.startY-YAHOO.util.Event.getPageY(e));if(diffX>this.clickPixelThresh||diffY>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}\n+if(this.dragThreshMet){this.dragCurrent.b4Drag(e);this.dragCurrent.onDrag(e);this.fireEvents(e,false);}\n+this.stopEvent(e);return true;},fireEvents:function(e,isDrop){var dc=this.dragCurrent;if(!dc||dc.isLocked()){return;}\n+var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);var pt=new YAHOO.util.Point(x,y);var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);var oldOvers=[];var outEvts=[];var overEvts=[];var dropEvts=[];var enterEvts=[];for(var i in this.dragOvers){var ddo=this.dragOvers[i];if(!this.isTypeOfDD(ddo)){continue;}\n+if(!this.isOverTarget(pt,ddo,this.mode,curRegion)){outEvts.push(ddo);}\n+oldOvers[i]=true;delete this.dragOvers[i];}\n+for(var sGroup in dc.groups){if("string"!=typeof sGroup){continue;}\n+for(i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(!this.isTypeOfDD(oDD)){continue;}\n+if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){if(this.isOverTarget(pt,oDD,this.mode,curRegion)){if(isDrop){dropEvts.push(oDD);}else{if(!oldOvers[oDD.id]){enterEvts.push(oDD);}else{overEvts.push(oDD);}\n+this.dragOvers[oDD.id]=oDD;}}}}}\n+this.interactionInfo={out:outEvts,enter:enterEvts,over:overEvts,drop:dropEvts,point:pt,draggedRegion:curRegion,sourceRegion:this.locationCache[dc.id],validDrop:isDrop};if(isDrop&&!dropEvts.length){this.interactionInfo.validDrop=false;dc.onInvalidDrop(e);}\n+if(this.mode){if(outEvts.length){dc.b4DragOut(e,outEvts);dc.onDragOut(e,outEvts);}\n+if(enterEvts.length){dc.onDragEnter(e,enterEvts);}\n+if(overEvts.length){dc.b4DragOver(e,overEvts);dc.onDragOver(e,overEvts);}\n+if(dropEvts.length){dc.b4DragDrop(e,dropEvts);dc.onDragDrop(e,dropEvts);}}else{var len=0;for(i=0,len=outEvts.length;i<len;++i){dc.b4DragOut(e,outEvts[i].id);dc.onDragOut(e,outEvts[i].id);}\n+for(i=0,len=enterEvts.length;i<len;++i){dc.onDragEnter(e,enterEvts[i].id);}\n+for(i=0,len=overEvts.length;i<len;++i){dc.b4DragOver(e,overEvts[i].id);dc.onDragOver(e,overEvts[i].id);}\n+for(i=0,len=dropEvts.length;i<len;++i){dc.b4DragDrop(e,dropEvts[i].id);dc.onDragDrop(e,dropEvts[i].id);}}},getBestMatch:function(dds){var winner=null;var len=dds.length;if(len==1){winner=dds[0];}else{for(var i=0;i<len;++i){var dd=dds[i];if(this.mode==this.INTERSECT&&dd.cursorIsOver){winner=dd;break;}else{if(!winner||!winner.overlap||(dd.overlap&&winner.overlap.getArea()<dd.overlap.getArea())){winner=dd;}}}}\n+return winner;},refreshCache:function(groups){var g=groups||this.ids;for(var sGroup in g){if("string"!=typeof sGroup){continue;}\n+for(var i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(this.isTypeOfDD(oDD)){var loc=this.getLocation(oDD);if(loc){this.locationCache[oDD.id]=loc;}else{delete this.locationCache[oDD.id];}}}}},verifyEl:function(el){try{if(el){var parent=el.offsetParent;if(parent){return true;}}}catch(e){}\n+return false;},getLocation:function(oDD){if(!this.isTypeOfDD(oDD)){return null;}\n+var el=oDD.getEl(),pos,x1,x2,y1,y2,t,r,b,l;try{pos=YAHOO.util.Dom.getXY(el);}catch(e){}\n+if(!pos){return null;}\n+x1=pos[0];x2=x1+el.offsetWidth;y1=pos[1];y2=y1+el.offsetHeight;t=y1-oDD.padding[0];r=x2+oDD.padding[1];b=y2+oDD.padding[2];l=x1-oDD.padding[3];return new YAHOO.util.Region(t,r,b,l);},isOverTarget:function(pt,oTarget,intersect,curRegion){var loc=this.locationCache[oTarget.id];if(!loc||!this.useCache){loc=this.getLocation(oTarget);this.locationCache[oTarget.id]=loc;}\n+if(!loc){return false;}\n+oTarget.cursorIsOver=loc.contains(pt);var dc=this.dragCurrent;if(!dc||(!intersect&&!dc.constrainX&&!dc.constrainY)){return oTarget.cursorIsOver;}\n+oTarget.overlap=null;if(!curRegion){var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);}\n+var overlap=curRegion.intersect(loc);if(overlap){oTarget.overlap=overlap;return(intersect)?true:oTarget.cursorIsOver;}else{return false;}},_onUnload:function(e,me){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}\n+this._execOnAll("unreg",[]);for(i in this.elementCache){delete this.elementCache[i];}\n+this.elementCache={};this.ids={};},elementCache:{},getElWrapper:function(id){var oWrapper=this.elementCache[id];if(!oWrapper||!oWrapper.el){oWrapper=this.elementCache[id]=new this.ElementWrapper(YAHOO.util.Dom.get(id));}\n+return oWrapper;},getElement:function(id){return YAHOO.util.Dom.get(id);},getCss:function(id){var el=YAHOO.util.Dom.get(id);return(el)?el.style:null;},ElementWrapper:function(el){this.el=el||null;this.id=this.el&&el.id;this.css=this.el&&el.style;},getPosX:function(el){return YAHOO.util.Dom.getX(el);},getPosY:function(el){return YAHOO.util.Dom.getY(el);},swapNode:function(n1,n2){if(n1.swapNode){n1.swapNode(n2);}else{var p=n2.parentNode;var s=n2.nextSibling;if(s==n1){p.insertBefore(n1,n2);}else if(n2==n1.nextSibling){p.insertBefore(n2,n1);}else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s);}}},getScroll:function(){var t,l,dde=document.documentElement,db=document.body;if(dde&&(dde.scrollTop||dde.scrollLeft)){t=dde.scrollTop;l=dde.scrollLeft;}else if(db){t=db.scrollTop;l=db.scrollLeft;}else{}\n+return{top:t,left:l};},getStyle:function(el,styleProp){return YAHOO.util.Dom.getStyle(el,styleProp);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(moveEl,targetEl){var aCoord=YAHOO.util.Dom.getXY(targetEl);YAHOO.util.Dom.setXY(moveEl,aCoord);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(a,b){return(a-b);},_timeoutCount:0,_addListeners:function(){var DDM=YAHOO.util.DDM;if(YAHOO.util.Event&&document){DDM._onLoad();}else{if(DDM._timeoutCount>2000){}else{setTimeout(DDM._addListeners,10);if(document&&document.body){DDM._timeoutCount+=1;}}}},handleWasClicked:function(node,id){if(this.isHandle(id,node.id)){return true;}else{var p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return true;}else{p=p.parentNode;}}}\n+return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}\n+(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;YAHOO.util.DragDrop=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=Dom.get(this.id);}\n+return this._domRef;},getDragEl:function(){return Dom.get(this.dragElId);},init:function(id,sGroup,config){this.initTarget(id,sGroup,config);Event.on(this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(id,sGroup,config){this.config=config||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.id=id;this.addToGroup((sGroup)?sGroup:"default");this.handleElId=id;Event.onAvailable(id,this.handleOnAvailable,this,true);this.setDragElId(id);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(iTop,iRight,iBot,iLeft){if(!iRight&&0!==iRight){this.padding=[iTop,iTop,iTop,iTop];}else if(!iBot&&0!==iBot){this.padding=[iTop,iRight,iTop,iRight];}else{this.padding=[iTop,iRight,iBot,iLeft];}},setInitPosition:function(diffX,diffY){var el=this.getEl();if(!this.DDM.verifyEl(el)){return;}\n+var dx=diffX||0;var dy=diffY||0;var p=Dom.getXY(el);this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p);},setStartPosition:function(pos){var p=pos||Dom.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1];},addToGroup:function(sGroup){this.groups[sGroup]=true;this.DDM.regDragDrop(this,sGroup);},removeFromGroup:function(sGroup){if(this.groups[sGroup]){delete this.groups[sGroup];}\n+this.DDM.removeDDFromGroup(this,sGroup);},setDragElId:function(id){this.dragElId=id;},setHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.handleElId=id;this.DDM.regHandle(this.id,id);},setOuterHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+Event.on(id,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(id);this.hasOuterHandles=true;},unreg:function(){Event.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(e,oDD){var button=e.which||e.button;if(this.primaryButtonOnly&&button>1){return;}\n+if(this.isLocked()){return;}\n+this.b4MouseDown(e);this.onMouseDown(e);this.DDM.refreshCache(this.groups);var pt=new YAHOO.util.Point(Event.getPageX(e),Event.getPageY(e));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(pt,this)){}else{if(this.clickValidator(e)){this.setStartPosition();this.DDM.handleMouseDown(e,this);this.DDM.stopEvent(e);}else{}}},clickValidator:function(e){var target=Event.getTarget(e);return(this.isValidHandleChild(target)&&(this.id==this.handleElId||this.DDM.handleWasClicked(target,this.id)));},getTargetCoord:function(iPageX,iPageY){var x=iPageX-this.deltaX;var y=iPageY-this.deltaY;if(this.constrainX){if(x<this.minX){x=this.minX;}\n+if(x>this.maxX){x=this.maxX;}}\n+if(this.constrainY){if(y<this.minY){y=this.minY;}\n+if(y>this.maxY){y=this.maxY;}}\n+x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return{x:x,y:y};},addInvalidHandleType:function(tagName){var type=tagName.toUpperCase();this.invalidHandleTypes[type]=type;},addInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+this.invalidHandleIds[id]=id;},addInvalidHandleClass:function(cssClass){this.invalidHandleClasses.push(cssClass);},removeInvalidHandleType:function(tagName){var type=tagName.toUpperCase();delete this.invalidHandleTypes[type];},removeInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}\n+delete this.invalidHandleIds[id];},removeInvalidHandleClass:function(cssClass){for(var i=0,len=this.invalidHandleClasses.length;i<len;++i){if(this.invalidHandleClasses[i]==cssClass){delete this.invalidHandleClasses[i];}}},isValidHandleChild:function(node){var valid=true;var nodeName;try{nodeName=node.nodeName.toUpperCase();}catch(e){nodeName=node.nodeName;}\n+valid=valid&&!this.invalidHandleTypes[nodeName];valid=valid&&!this.invalidHandleIds[node.id];for(var i=0,len=this.invalidHandleClasses.length;valid&&i<len;++i){valid=!Dom.hasClass(node,this.invalidHandleClasses[i]);}\n+return valid;},setXTicks:function(iStartX,iTickSize){this.xTicks=[];this.xTickSize=iTickSize;var tickMap={};for(var i=this.initPageX;i>=this.minX;i=i-iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}\n+for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}\n+this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(iStartY,iTickSize){this.yTicks=[];this.yTickSize=iTickSize;var tickMap={};for(var i=this.initPageY;i>=this.minY;i=i-iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}\n+for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}\n+this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(iLeft,iRight,iTickSize){this.leftConstraint=parseInt(iLeft,10);this.rightConstraint=parseInt(iRight,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(iTickSize){this.setXTicks(this.initPageX,iTickSize);}\n+this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(iUp,iDown,iTickSize){this.topConstraint=parseInt(iUp,10);this.bottomConstraint=parseInt(iDown,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(iTickSize){this.setYTicks(this.initPageY,iTickSize);}\n+this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy);}else{this.setInitPosition();}\n+if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}\n+if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(val,tickArray){if(!tickArray){return val;}else if(tickArray[0]>=val){return tickArray[0];}else{for(var i=0,len=tickArray.length;i<len;++i){var next=i+1;if(tickArray[next]&&tickArray[next]>=val){var diff1=val-tickArray[i];var diff2=tickArray[next]-val;return(diff2>diff1)?tickArray[i]:tickArray[next];}}\n+return tickArray[tickArray.length-1];}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(iPageX,iPageY){var x=iPageX-this.startPageX;var y=iPageY-this.startPageY;this.setDelta(x,y);},setDelta:function(iDeltaX,iDeltaY){this.deltaX=iDeltaX;this.deltaY=iDeltaY;},setDragElPos:function(iPageX,iPageY){var el=this.getDragEl();this.alignElWithMouse(el,iPageX,iPageY);},alignElWithMouse:function(el,iPageX,iPageY){var oCoord=this.getTargetCoord(iPageX,iPageY);if(!this.deltaSetXY){var aCoord=[oCoord.x,oCoord.y];YAHOO.util.Dom.setXY(el,aCoord);var newLeft=parseInt(YAHOO.util.Dom.getStyle(el,"left"),10);var newTop=parseInt(YAHOO.util.Dom.getStyle(el,"top"),10);this.deltaSetXY=[newLeft-oCoord.x,newTop-oCoord.y];}else{YAHOO.util.Dom.setStyle(el,"left",(oCoord.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(el,"top",(oCoord.y+this.deltaSetXY[1])+"px");}\n+this.cachePosition(oCoord.x,oCoord.y);this.autoScroll(oCoord.x,oCoord.y,el.offsetHeight,el.offsetWidth);},cachePosition:function(iPageX,iPageY){if(iPageX){this.lastPageX=iPageX;this.lastPageY=iPageY;}else{var aCoord=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=aCoord[0];this.lastPageY=aCoord[1];}},autoScroll:function(x,y,h,w){if(this.scroll){var clientH=this.DDM.getClientHeight();var clientW=this.DDM.getClientWidth();var st=this.DDM.getScrollTop();var sl=this.DDM.getScrollLeft();var bot=h+y;var right=w+x;var toBot=(clientH+st-y-this.deltaY);var toRight=(clientW+sl-x-this.deltaX);var thresh=40;var scrAmt=(document.all)?80:30;if(bot>clientH&&toBot<thresh){window.scrollTo(sl,st+scrAmt);}\n+if(y<st&&st>0&&y-st<thresh){window.scrollTo(sl,st-scrAmt);}\n+if(right>clientW&&toRight<thresh){window.scrollTo(sl+scrAmt,st);}\n+if(x<sl&&sl>0&&x-sl<thresh){window.scrollTo(sl-scrAmt,st);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(e){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},b4Drag:function(e){this.setDragElPos(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(id,sGroup,config){if(id){this.init(id,sGroup,config);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var self=this;var body=document.body;if(!body||!body.firstChild){setTimeout(function(){self.createFrame();},50);return;}\n+var div=this.getDragEl();if(!div){div=document.createElement("div");div.id=this.dragElId;var s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;body.insertBefore(div,body.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(iPageX,iPageY){var el=this.getEl();var dragEl=this.getDragEl();var s=dragEl.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2));}\n+this.setDragElPos(iPageX,iPageY);YAHOO.util.Dom.setStyle(dragEl,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var DOM=YAHOO.util.Dom;var el=this.getEl();var dragEl=this.getDragEl();var bt=parseInt(DOM.getStyle(dragEl,"borderTopWidth"),10);var br=parseInt(DOM.getStyle(dragEl,"borderRightWidth"),10);var bb=parseInt(DOM.getStyle(dragEl,"borderBottomWidth"),10);var bl=parseInt(DOM.getStyle(dragEl,"borderLeftWidth"),10);if(isNaN(bt)){bt=0;}\n+if(isNaN(br)){br=0;}\n+if(isNaN(bb)){bb=0;}\n+if(isNaN(bl)){bl=0;}\n+var newWidth=Math.max(0,el.offsetWidth-br-bl);var newHeight=Math.max(0,el.offsetHeight-bt-bb);DOM.setStyle(dragEl,"width",newWidth+"px");DOM.setStyle(dragEl,"height",newHeight+"px");}},b4MouseDown:function(e){this.setStartPosition();var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);this.autoOffset(x,y);this.setDragElPos(x,y);},b4StartDrag:function(x,y){this.showFrame(x,y);},b4EndDrag:function(e){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(e){var DOM=YAHOO.util.Dom;var lel=this.getEl();var del=this.getDragEl();DOM.setStyle(del,"visibility","");DOM.setStyle(lel,"visibility","hidden");YAHOO.util.DDM.moveToEl(lel,del);DOM.setStyle(del,"visibility","hidden");DOM.setStyle(lel,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(id,sGroup,config){if(id){this.initTarget(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.2.2",build:"204"});\n+YAHOO.util.Attribute=function(hash,owner){if(owner){this.owner=owner;this.configure(hash,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(value,silent){var beforeRetVal;var owner=this.owner;var name=this.name;var event={type:name,prevValue:this.getValue(),newValue:value};if(this.readOnly||(this.writeOnce&&this._written)){return false;}\n+if(this.validator&&!this.validator.call(owner,value)){return false;}\n+if(!silent){beforeRetVal=owner.fireBeforeChangeEvent(event);if(beforeRetVal===false){return false;}}\n+if(this.method){this.method.call(owner,value);}\n+this.value=value;this._written=true;event.type=name;if(!silent){this.owner.fireChangeEvent(event);}\n+return true;},configure:function(map,init){map=map||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var key in map){if(key&&YAHOO.lang.hasOwnProperty(map,key)){this[key]=map[key];if(init){this._initialConfig[key]=map[key];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(silent){this.setValue(this.value,silent);}};(function(){var Lang=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(key){var configs=this._configs||{};var config=configs[key];if(!config){return undefined;}\n+return config.value;},set:function(key,value,silent){var configs=this._configs||{};var config=configs[key];if(!config){return false;}\n+return config.setValue(value,silent);},getAttributeKeys:function(){var configs=this._configs;var keys=[];var config;for(var key in configs){config=configs[key];if(Lang.hasOwnProperty(configs,key)&&!Lang.isUndefined(config)){keys[keys.length]=key;}}\n+return keys;},setAttributes:function(map,silent){for(var key in map){if(Lang.hasOwnProperty(map,key)){this.set(key,map[key],silent);}}},resetValue:function(key,silent){var configs=this._configs||{};if(configs[key]){this.set(key,configs[key]._initialConfig.value,silent);return true;}\n+return false;},refresh:function(key,silent){var configs=this._configs;key=((Lang.isString(key))?[key]:key)||this.getAttributeKeys();for(var i=0,len=key.length;i<len;++i){if(configs[key[i]]&&!Lang.isUndefined(configs[key[i]].value)&&!Lang.isNull(configs[key[i]].value)){configs[key[i]].refresh(silent);}}},register:function(key,map){this.setAttributeConfig(key,map);},getAttributeConfig:function(key){var configs=this._configs||{};var config=configs[key]||{};var map={};for(key in config){if(Lang.hasOwnProperty(config,key)){map[key]=config[key];}}\n+return map;},setAttributeConfig:function(key,map,init){var configs=this._configs||{};map=map||{};if(!configs[key]){map.name=key;configs[key]=new YAHOO.util.Attribute(map,this);}else{configs[key].configure(map,init);}},configureAttribute:function(key,map,init){this.setAttributeConfig(key,map,init);},resetAttributeConfig:function(key){var configs=this._configs||{};configs[key].resetConfig();},fireBeforeChangeEvent:function(e){var type=\'before\';type+=e.type.charAt(0).toUpperCase()+e.type.substr(1)+\'Change\';e.type=type;return this.fireEvent(e.type,e);},fireChangeEvent:function(e){e.type+=\'Change\';return this.fireEvent(e.type,e);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var Dom=YAHOO.util.Dom,AttributeProvider=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(el,map){if(arguments.length){this.init(el,map);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(child){child=child.get?child.get(\'element\'):child;this.get(\'element\').appendChild(child);},getElementsByTagName:function(tag){return this.get(\'element\').getElementsByTagName(tag);},hasChildNodes:function(){return this.get(\'element\').hasChildNodes();},insertBefore:function(element,before){element=element.get?element.get(\'element\'):element;before=(before&&before.get)?before.get(\'element\'):before;this.get(\'element\').insertBefore(element,before);},removeChild:function(child){child=child.get?child.get(\'element\'):child;this.get(\'element\').removeChild(child);return true;},replaceChild:function(newNode,oldNode){newNode=newNode.get?newNode.get(\'element\'):newNode;oldNode=oldNode.get?oldNode.get(\'element\'):oldNode;return this.get(\'element\').replaceChild(newNode,oldNode);},initAttributes:function(map){},addListener:function(type,fn,obj,scope){var el=this.get(\'element\');scope=scope||this;el=this.get(\'id\')||el;var self=this;if(!this._events[type]){if(this.DOM_EVENTS[type]){YAHOO.util.Event.addListener(el,type,function(e){if(e.srcElement&&!e.target){e.target=e.srcElement;}\n+self.fireEvent(type,e);},obj,scope);}\n+this.createEvent(type,this);}\n+this.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},removeListener:function(type,fn){this.unsubscribe.apply(this,arguments);},addClass:function(className){Dom.addClass(this.get(\'element\'),className);},getElementsByClassName:function(className,tag){return Dom.getElementsByClassName(className,tag,this.get(\'element\'));},hasClass:function(className){return Dom.hasClass(this.get(\'element\'),className);},removeClass:function(className){return Dom.removeClass(this.get(\'element\'),className);},replaceClass:function(oldClassName,newClassName){return Dom.replaceClass(this.get(\'element\'),oldClassName,newClassName);},setStyle:function(property,value){var el=this.get(\'element\');if(!el){return this._queue[this._queue.length]=[\'setStyle\',arguments];}\n+return Dom.setStyle(el,property,value);},getStyle:function(property){return Dom.getStyle(this.get(\'element\'),property);},fireQueue:function(){var queue=this._queue;for(var i=0,len=queue.length;i<len;++i){this[queue[i][0]].apply(this,queue[i][1]);}},appendTo:function(parent,before){parent=(parent.get)?parent.get(\'element\'):Dom.get(parent);this.fireEvent(\'beforeAppendTo\',{type:\'beforeAppendTo\',target:parent});before=(before&&before.get)?before.get(\'element\'):Dom.get(before);var element=this.get(\'element\');if(!element){return false;}\n+if(!parent){return false;}\n+if(element.parent!=parent){if(before){parent.insertBefore(element,before);}else{parent.appendChild(element);}}\n+this.fireEvent(\'appendTo\',{type:\'appendTo\',target:parent});},get:function(key){var configs=this._configs||{};var el=configs.element;if(el&&!configs[key]&&!YAHOO.lang.isUndefined(el.value[key])){return el.value[key];}\n+return AttributeProvider.prototype.get.call(this,key);},set:function(key,value,silent){var el=this.get(\'element\');if(!el){this._queue[this._queue.length]=[\'set\',arguments];if(this._configs[key]){this._configs[key].value=value;}\n+return;}\n+if(!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key);}\n+return AttributeProvider.prototype.set.apply(this,arguments);},setAttributeConfig:function(key,map,init){var el=this.get(\'element\');if(el&&!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key,map);}else{AttributeProvider.prototype.setAttributeConfig.apply(this,arguments);}},getAttributeKeys:function(){var el=this.get(\'element\');var keys=AttributeProvider.prototype.getAttributeKeys.call(this);for(var key in el){if(!this._configs[key]){keys[key]=keys[key]||el[key];}}\n+return keys;},createEvent:function(type,scope){this._events[type]=true;AttributeProvider.prototype.createEvent.apply(this,arguments);},init:function(el,attr){_initElement.apply(this,arguments);}};var _initElement=function(el,attr){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};attr=attr||{};attr.element=attr.element||el||null;this.DOM_EVENTS={\'click\':true,\'dblclick\':true,\'keydown\':true,\'keypress\':true,\'keyup\':true,\'mousedown\':true,\'mousemove\':true,\'mouseout\':true,\'mouseover\':true,\'mouseup\':true,\'focus\':true,\'blur\':true,\'submit\':true};var isReady=false;if(YAHOO.lang.isString(el)){_registerHTMLAttr.call(this,\'id\',{value:attr.element});}\n+if(Dom.get(el)){isReady=true;_initHTMLElement.call(this,attr);_initContent.call(this,attr);}\n+YAHOO.util.Event.onAvailable(attr.element,function(){if(!isReady){_initHTMLElement.call(this,attr);}\n+this.fireEvent(\'available\',{type:\'available\',target:attr.element});},this,true);YAHOO.util.Event.onContentReady(attr.element,function(){if(!isReady){_initContent.call(this,attr);}\n+this.fireEvent(\'contentReady\',{type:\'contentReady\',target:attr.element});},this,true);};var _initHTMLElement=function(attr){this.setAttributeConfig(\'element\',{value:Dom.get(attr.element),readOnly:true});};var _initContent=function(attr){this.initAttributes(attr);this.setAttributes(attr,true);this.fireQueue();};var _registerHTMLAttr=function(key,map){var el=this.get(\'element\');map=map||{};map.name=key;map.method=map.method||function(value){el[key]=value;};map.value=map.value||el[key];this._configs[key]=new YAHOO.util.Attribute(map,this);};YAHOO.augment(YAHOO.util.Element,AttributeProvider);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.2.2",build:"204"});\n\\ No newline at end of file\n', 'addition_count': 433, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/jslib/utilities.js', 'file_extension': '.js', 'before_file': 'ADDFILE', 'message': 'BOSC 2007, more or less\n', 'author_name': 'Mitch Skinner', 'lang': 'js'}