You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2008/09/13 02:31:13 UTC

svn commit: r694856 [5/15] - in /ode/branches/APACHE_ODE_1.X: ./ axis2-war/src/main/webapp/ axis2-war/src/main/webapp/WEB-INF/ axis2-war/src/main/webapp/WEB-INF/classes/ axis2-war/src/main/webapp/axis2-web/ axis2-war/src/main/webapp/css/ axis2-war/src/...

Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/accordion.js
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/accordion.js?rev=694856&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/accordion.js (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/accordion.js Fri Sep 12 17:31:09 2008
@@ -0,0 +1,395 @@
+/*
+Copyright (c) 2007, Caridy Patino. All rights reserved.
+Portions Copyright (c) 2007, Yahoo!, Inc. All rights reserved.
+Code licensed under the BSD License:
+http://www.bubbling-library.com/eng/licence
+version: 1.5.0
+*/
+(function() {
+
+    var $B = YAHOO.Bubbling,
+		$L = YAHOO.lang,
+        $E = YAHOO.util.Event,
+	    $D = YAHOO.util.Dom;
+
+	/**
+	* @singleton Accordion Manager - Creating accordion controls based on the markup.
+	* Apply visual enhanced to an area
+	* @constructor
+	*/
+	YAHOO.widget.AccordionManager = function() {
+		var obj = {},
+		    _selector = 'selected',
+		    _sliding = 'sliding',
+		    _anims = {};
+
+		// on click action behaviors...
+		$B.addDefaultAction('accordionToggleItem', function (layer, args) {
+            if (!args[1].decrepitate) {
+                // switching the slidable area and reclaiming the behavior
+                return obj.toggle(args[1].target);
+            }
+        });
+		$B.addDefaultAction('accordionRemoveItem', function (layer, args) {
+            if (!args[1].decrepitate) {
+                // removing an item from the accordion and reclaiming the behavior
+                return obj.remove(args[1].target);
+            }
+        });
+
+        // on event arrive
+        // behaviors for the second accordion (ADVANCED AJAX APPLICATION)
+        // Tagline: One behavior that will rule them all (based on the slide's rel attribute)
+        $B.on('accordionOpenItem', function (layer, args) {
+          var reLink = /.*#/;
+          // if can be loaded thru AJAX
+          if ($D.hasClass(args[1].slide, 'ajax') && $L.isObject(YAHOO.plugin.Dispatcher)) {
+            var trigger = $D.getElementsByClassName('accordionToggleItem','*',args[1].el);
+            trigger = (trigger.length>0?trigger[0]:null);
+            if (trigger && (trigger = trigger.getAttribute('href',2))) {
+                YAHOO.plugin.Dispatcher.fetch ( args[1].slide, trigger.replace(reLink,''), {
+                    onLoad: function (el) {
+                        $D.removeClass(args[1].slide, 'ajax');
+                    }
+                });
+            }
+          }
+        });
+
+        // on keyboad action behavior...
+        $B.on('key', function (layer, args) {
+    	  var o = args[1], item = null, result = false;
+    	  if (!o.decrepitate && (o.type == 'keyup')) {
+    	      if (((o.keyCode === 39) && obj.open (o.target)) ||
+    	          ((o.keyCode === 37) && obj.close (o.target))) { // Shortcut: cursor -> or cursor <-
+        		  // reclaiming the event & stoping the event propagation
+        	      o.decrepitate = true;
+        	      o.stop = true;
+        	  }
+    	  }
+        });
+
+        // on rollover action behavior...
+		$B.on('rollover', function (layer, args) {
+		  var list, item, onWayOut;
+		  if (item = _getItem(args[1].target)) {
+		    if ((list = _getList(item)) && list.rollover) {
+				if (!list.selected) {
+		            $D.addClass(list.el, _selector);
+					onWayOut = function (e) {
+					    var l = _getList ({el:$E.getTarget(e)});
+					    if (l && !$B.virtualTarget(e, l.el) && !l.persistent) {
+					      _reset(l, {force:true});
+					    }
+					};
+					if (!list.persistent) {
+					    $E.removeListener ( list.el, 'mouseout', onWayOut );
+						$E.addListener ( list.el, 'mouseout', onWayOut, obj, true );
+					}
+				}
+				if (!item.selected) {
+					// is over a new item...
+					_openItem(item, list);
+				}
+			}
+		  }
+	    });
+
+        // creating the most common message (behavior layer)
+        $B.addLayer (['accordionOpenItem', 'accordionCloseItem', 'accordionRemoveItem'], obj);
+
+        function _getEffect ( el ) {
+            var effect = el.getAttribute('rel') || null;
+            if (effect) {
+              effect = YAHOO.util.Easing[effect] || null;
+            }
+            return effect;
+        }
+        function _getTimer ( el ) {
+            var t = ($D.hasClass(el, 'fast')?0.1:null) || ($D.hasClass(el, 'slow')?0.6:null) || 0.4;
+            return t;
+        }
+        function _getItem ( elem ) {
+          if (elem && ($L.isObject(elem) || (elem = $D.get (elem)))) {
+            var item, el = $B.getOwnerByClassName (elem, 'yui-cms-item');
+            if ($L.isObject(el)) {
+                item = {
+                    el: el,
+                    triger: elem,
+                    selected: $D.hasClass(el, _selector),
+                    sliding: $D.hasClass(el, _sliding),
+                    size: {width:0, Height: 0}
+                };
+                // getting the slidable element
+                var slide = $D.getElementsByClassName('bd','*',el);
+                slide = (slide.length>0?slide[0]:null);
+                item.slide = slide;
+                var h = parseInt($D.getStyle(slide, 'height'), 10);
+                var w = parseInt($D.getStyle(slide, 'width'), 10);
+                // forcing to number... to avoid misbehavior on "auto" height/width...
+                if (!$L.isNumber(h)) {
+                    $D.setStyle(slide, 'height', slide.scrollHeight+'px');
+                }
+                if (!$L.isNumber(w)) {
+                    $D.setStyle(slide, 'width', slide.scrollWidth+'px');
+                }
+                item.size.height = slide.scrollHeight;
+                item.size.width = slide.scrollWidth;
+            }
+            return item;
+          }
+        }
+        function _getList ( item ) {
+          var list = null, el = item.el;
+          if (el && ($L.isObject(el) || (el = $D.get (el)))) {
+            if (el = $B.getOwnerByClassName (el, 'yui-cms-accordion')) {
+                // creating the list literal based on the classnames defined for the accordion wrapper
+                list = {
+                    el: el,
+                    effect: _getEffect(el),
+                    orientation: ($D.hasClass(el, 'vertical')?'width':'height'),
+                    selected: $D.hasClass(el, _selector),
+                    fade: $D.hasClass(el, 'fade'),
+                    manually: $D.hasClass(el, 'manually'),
+                    fixIE: ($E.isIE && $D.hasClass(el, 'fixIE')), // hack for IE and quirk mode...
+                    multiple: $D.hasClass(el, 'multiple'),
+                    rollover: $D.hasClass(el, 'rollover'),
+                    persistent: $D.hasClass(el, 'persistent'),
+                    dispatcher: $D.hasClass(el, 'dispatcher'),
+                    wizard: $D.hasClass(el, 'wizard'),
+                    timer: _getTimer(el),
+                    items: []
+                };
+                // searching for items childs...
+                $D.batch ($D.getElementsByClassName('bd','*',el), function(elem){
+                    // adding an item to the list
+                    list.items.push (_getItem(elem));
+                });
+            }
+            return list;
+          }
+        }
+        function _reset ( list, params ) {
+            params = params || {};
+            var conf = [], i,
+                force = params.force || false,
+                item = params.item || null;
+            if (list) {
+              if (!list.multiple || force) {
+	            // closing all the selected items
+		        for (i=0; i<list.items.length; i++) {
+		          // is the element is not equal to item, or if the item is under an animation...
+				  if ((!item || (list.items[i].el !== item.el)) && (list.items[i].selected || list.items[i].sliding || params.expand)) {
+				     if (params.expand) {
+				       _openItem (list.items[i], list, params.grouping);
+				     } else {
+				       _closeItem (list.items[i], list, params.grouping);
+				       if (params.mirror) {
+				          // hack for get the mirror element in persistent and !mutiples accordions
+				          params.mirror.push(list.items[i]);
+				       }
+				     }
+			      }
+	            }
+	          }
+	        }
+        }
+        function _openItem ( item, list ) {
+            var conf = [], anim, i, g = [], m = [], fs, onFinish;
+            if (list || (list = _getList (item))) {
+              // if the item is not already opened
+              if (!item.selected) {
+                  // closing all the selected items if neccesary
+                  if (!list.multiple) {
+                    _reset ( list, {item: item, grouping: g, mirror: m} );
+                  }
+    	          // if the animation is underway: we need to stop it...
+                  anim = _anims[$E.generateId(item.slide)];
+                  if ((anim) && (anim.isAnimated())) {anim.stop();}
+    	          // opening the selected element, based on the list's orientation, timer and effect attribute...
+    	          conf[list.orientation] = {to: item.size[list.orientation]};
+    	          // scrolling effect
+    	          if (!list.manually) {
+    	            conf['scroll'] = {from: (list.orientation=='width'?[item.size[list.orientation],0]:[0,item.size[list.orientation]]), to: [0,0]};
+    	          }
+    	          if (list.fade) { // appliying fadeIn
+    	            conf['opacity'] = {to: 1};
+    	          }
+    	          anim = new YAHOO.util.Scroll(item.slide, conf, list.timer, list.effect);
+            	  $D.addClass(item.el, _sliding);
+            	  onFinish = function() {
+            		  $D.removeClass(item.el, _sliding);
+            		  $D.addClass(item.el, _selector);
+            		  // broadcasting the corresponding event...
+            		  $B.fire ('accordionOpenItem', item);
+            	  };
+            	  anim.onComplete.subscribe(onFinish);
+            	  _anims[$E.generateId(item.slide)] = anim;
+            	  if (list.manually) {
+            	    // manually animation...
+            	    m = m[0] || null;
+            	    // getting the desired dimension from the mirror or from the current item
+            	    fs = (m?m.size[list.orientation]:item.size[list.orientation]);
+            	    for (i=1;i<=fs;i++){
+            	        if (m) {
+            	          $D.setStyle (m.slide, list.orientation, (fs-i)+'px');
+            	        }
+            	        $D.setStyle (item.slide, list.orientation, i+'px');
+            	    }
+            	    onFinish();
+            	  } else {
+            	    // creating an animation thread
+            	    for (i=0; i<g.length; i++) {
+            	      YAHOO.util.AnimMgr.registerElement(g[i]);
+            	    }
+            	    YAHOO.util.AnimMgr.registerElement(anim);
+            	  }
+              }
+        	  return true;
+	        }
+	        return false;
+        }
+        function _closeItem ( item, list, grouping ) {
+            var conf = [], anim, fs;
+            if (item && (list || (list = _getList (item)))) {
+	            // closing the item, based on the list's orientation, timer and effect attribute...
+	            conf[list.orientation] = {to: ((list.orientation=='width'||list.fixIE)?1:0)}; // hack for vertical accordion issue on Safari and Opera
+	            if (list.fade) { // appliying fadeIn
+	              conf['opacity'] = {to: 0};
+	            }
+    	        // scrolling effect
+    	        if (!list.manually) {
+    	          conf['scroll'] = {to: (list.orientation=='width'?[item.size[list.orientation],0]:[0,item.size[list.orientation]])};
+    	        }
+                // if the animation is underway: we need to stop it...
+                anim = _anims[$E.generateId(item.slide)];
+                if ((anim) && (anim.isAnimated())) {anim.stop();}
+        	    anim = new YAHOO.util.Scroll(item.slide, conf, list.timer, list.effect);
+        		$D.addClass(item.el, _sliding);
+            	onFinish = function() {
+                    $D.removeClass(item.el, _sliding);
+        		    $D.removeClass(item.el, _selector);
+            		// broadcasting the corresponding event...
+            		$B.fire ('accordionOpenItem', item);
+            	};
+        		anim.onComplete.subscribe(onFinish);
+        		if ($L.isArray(grouping)) {
+        		    grouping.push(anim);
+        	    } else {
+        		    anim.animate();
+        		}
+        		if (list.manually) {
+        	        // animation manually
+        	        fs = item.size[list.orientation];
+            	    for (i=fs;i>=conf[list.orientation].to;i--){
+            	        $D.setStyle (item.slide, list.orientation, i+'px');
+            	    }
+            	    onFinish();
+        		}
+        		_anims[$E.generateId(item.slide)] = anim;
+        		return true;
+	        }
+	        return false;
+        }
+        function _removeItem ( item, list ) {
+            if (item && (list || (list = _getList (item)))) {
+                // closing element
+                _closeItem (item, list);
+                // removing listeners...
+    			$E.purgeElement ( item.el, true );
+    			// hack, removing the element after close it...
+    			window.setTimeout (function(){
+    			      item.el.parentNode.removeChild(item.el);
+    			      $B.fire ('accordionRemoveItem', item);
+    			   }, list.timer+0.1);
+        		return true;
+	        }
+	        return false;
+        }
+
+		// public vars
+		// public methods
+		/**
+		* * Expanding all the elements in the accordion...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.expand = function ( el ) {
+		    var list;
+		    if (list = _getList ({el:el})) {
+		        return _reset (list, {force:true, expand:true});
+		    }
+		};
+		/**
+		* * Collapsing all the elements in the accordion...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.collapse = function ( el ) {
+		    var list;
+		    if (list = _getList ({el:el})) {
+		        return _reset (list, {force:true});
+		    }
+		};
+		/**
+		* * Open a certain item inside an area...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.open = function ( el ) {
+		    var item;
+		    if (item = _getItem(el)) {
+		        return _openItem (item);
+		    }
+		};
+		/**
+		* * Close a certain item inside an area...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.close = function ( el ) {
+		    var item, list;
+		    if (item = _getItem(el)) {
+		        if (list = _getList (item)) {
+		          // if the item is already opened, and is multiple and not persistent
+		          return ((item.selected && (list.multiple || !list.persistent))?_closeItem (item, list):false);
+		        }
+		    }
+		};
+		/**
+		* * toggle a certain item inside an area...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.toggle = function ( el ) {
+		    var item, list;
+		    if (item = _getItem(el)) {
+		        if (list = _getList (item)) {
+		          // if the item is already opened, and is multiple and not persistent
+		          return ((item.selected && (list.multiple || !list.persistent))?_closeItem (item, list):_openItem (item, list));
+		        }
+		    }
+		};
+		/**
+		* * remove a certain item from the area...
+		* @public
+		* @param {object} el   DOM reference
+		* @return boolean
+		*/
+		obj.remove = function ( el ) {
+		    var item, list;
+		    if (item = _getItem(el)) {
+		        if (list = _getList (item)) {
+		          return _removeItem (item, list);
+		        }
+		    }
+		};
+		return obj;
+	}();
+})();
+YAHOO.register("accordion", YAHOO.widget.AccordionManager, {version: "1.5.0", build: "203"});
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/accordion.css
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/accordion.css?rev=694856&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/accordion.css (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/accordion.css Fri Sep 12 17:31:09 2008
@@ -0,0 +1,79 @@
+/*
+Copyright (c) 2007, Caridy Pati�o. All rights reserved.
+Portions Copyright (c) 2007, Yahoo!, Inc. All rights reserved.
+Code licensed under the BSD License:
+http://www.bubbling-library.com/eng/licence
+version: 1.3.3
+*/
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .bd {
+    height: 0;
+    padding: 0;
+    overflow: hidden;
+}
+.yui-skin-sam .yui-cms-accordion.vertical .yui-cms-item .bd {
+    height: auto;
+    width: 1px;
+}
+    .yui-skin-sam .yui-cms-accordion .yui-cms-item .bd .fixed {
+        padding: 5px;
+    }
+
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .actions {
+    position: absolute;
+    top: 5px;
+    right: 2px;
+    text-align: right;
+}
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .actions a {
+    margin-right: 4px;
+    text-decoration: none;
+    font-size: 50%;
+    float: left;
+}
+
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .actions .accordionToggleItem {
+    width: 14px;
+    height: 14px;
+    background: url(http://yui.yahooapis.com/2.3.1/build/assets/skins/sam/sprite.png) no-repeat 0 -350px;
+    cursor: pointer;
+}
+
+.yui-skin-sam .yui-cms-accordion .yui-cms-item.selected .actions .accordionToggleItem {
+    background: url(http://yui.yahooapis.com/2.3.1/build/assets/skins/sam/sprite.png) no-repeat 0 -400px;
+}
+
+.yui-skin-sam .yui-cms-accordion.persistent .yui-cms-item.selected .actions .accordionToggleItem {
+    display: none;
+}
+
+.yui-skin-sam .yui-cms-accordion.vertical .yui-cms-item .actions .accordionToggleItem {
+    width: 25px;
+    height: 15px;
+    background: url(http://yui.yahooapis.com/2.3.1/build/assets/skins/sam/sprite.png) no-repeat 0 -450px;
+}
+
+.yui-skin-sam .yui-cms-accordion.vertical .yui-cms-item.selected .actions .accordionToggleItem {
+    background: url(http://yui.yahooapis.com/2.3.1/build/assets/skins/sam/sprite.png) no-repeat 0 -500px;
+}
+
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .actions .accordionRemoveItem {
+    width: 25px;
+    height: 15px;
+    background: url(http://yui.yahooapis.com/2.3.1/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;
+}
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .ajax .fixed {
+    background: url(loading.gif) no-repeat 50% 50%;
+}
+
+.yui-skin-sam .yui-cms-accordion .yui-cms-item .bd {
+	height: 0px;
+}
+.yui-skin-sam .yui-cms-accordion.fixIE .yui-cms-item .bd {
+	*height: 1px; /* IE Hack */
+}
+.yui-skin-sam .yui-cms-accordion .yui-cms-item.selected .bd {
+	height: auto;
+    background:
+
+#fff;
+}
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/loading.gif
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/loading.gif?rev=694856&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/assets/loading.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/bubbling.js
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/bubbling.js?rev=694856&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/bubbling.js (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/bubbling/bubbling.js Fri Sep 12 17:31:09 2008
@@ -0,0 +1,387 @@
+/*
+Copyright (c) 2007, Caridy Patiño. All rights reserved.
+Portions Copyright (c) 2007, Yahoo!, Inc. All rights reserved.
+Code licensed under the BSD License:
+http://www.bubbling-library.com/eng/licence
+version: 1.5.0
+*/
+YAHOO.namespace("plugin","behavior");
+(function() {
+  var $Y = YAHOO.util,
+	  $E = YAHOO.util.Event,
+	  $D = YAHOO.util.Dom,
+	  $L = YAHOO.lang,
+	  $  = YAHOO.util.Dom.get;
+
+  /**
+  * @class Bubbling
+  */
+  YAHOO.Bubbling = function () {
+  	var obj = {},
+		ua = navigator.userAgent.toLowerCase(),
+        isOpera = (ua.indexOf('opera') > -1);
+	// private stuff
+	var navRelExternal = function (layer, args) {
+		  var el = args[1].anchor;
+		  if (!(args[1].flagged || args[1].decrepitate) && el) {
+			  var r = el.getAttribute("rel"),
+			  	  t = el.getAttribute("target");
+		  	  if ((!t || (t === '')) && (r == 'external')) {
+				el.setAttribute("target", "blank");
+		      }
+		  }
+	};
+    var defaultActionsControl = function (layer, args) {
+	  obj.processingAction (layer, args, obj.defaultActions);
+    };
+	var _searchYUIButton = function (t) {
+		var el = obj.getOwnerByClassName( t, 'yui-button' ), bt = null, id = null;
+		if ($L.isObject(el) && YAHOO.widget.Button) {
+			bt = YAHOO.widget.Button.getButton(el.id);
+		}
+		return bt;
+	};
+
+	// public vars
+	obj.ready = false;
+	obj.force2alfa = false;
+	obj.bubble = {}; // CustomEvent Handles
+    obj.onReady = new $Y.CustomEvent('bubblingOnReady', obj, true);
+
+	// mapping external methods...
+	obj.getOwnerByClassName = function(node, className) {
+		return ($D.hasClass(node, className)?node:$D.getAncestorByClassName (node, className));
+    };
+    obj.getOwnerByTagName = function(node, tagName) {
+		node = $D.get(node);
+		if (!node) {
+			return null;
+		}
+		return (node.tagName && node.tagName.toUpperCase() == tagName.toUpperCase()?node:$D.getAncestorByTagName (node, tagName));
+	};
+	// Deprecated in favor of getOwnerByClassName and getOwnerByTagName
+	obj.getAncestorByClassName = obj.getOwnerByClassName;
+    obj.getAncestorByTagName = obj.getOwnerByTagName;
+
+	// public methods
+	obj.onKeyPressedTrigger = function(args, e, m){
+	  var b = 'key';
+	  e = e || $E.getEvent();
+	  m = m || {};
+	  m.action = b;
+	  m.target = args.target || (e?$E.getTarget(e):null);
+	  m.flagged = false; m.decrepitate = false;
+	  m.event = e;
+	  m.stop = false;
+	  m.type = args.type;
+	  m.keyCode = args.keyCode;
+	  m.charCode = args.charCode;
+	  m.ctrlKey = args.ctrlKey;
+	  m.shiftKey = args.shiftKey;
+	  m.altKey = args.altKey;
+	  this.bubble.key.fire(e, m);
+	  if (m.stop) {
+	  	$E.stopEvent(e);
+	  }
+	  return m.stop;
+	};
+	obj.onEventTrigger = function(b, e, m){
+	  e = e || $E.getEvent();
+	  m = m || {};
+	  m.action = b;
+	  m.target = (e?$E.getTarget(e):null);
+	  m.flagged = false; m.decrepitate = false;
+	  m.event = e;
+	  m.stop = false;
+	  this.bubble[b].fire(e, m);
+	  if (m.stop) {
+	  	$E.stopEvent(e);
+	  }
+	  return m.stop;
+	};
+	obj.onNavigate = function(e){
+	  var conf = {
+	  	anchor: this.getOwnerByTagName( $E.getTarget(e), 'A' ),
+		button: _searchYUIButton($E.getTarget(e))
+	  };
+	  if (!conf.anchor && !conf.button) {
+	  	conf.input = this.getOwnerByTagName( $E.getTarget(e), 'INPUT' );
+	  }
+	  if (conf.button) {
+            conf.value = conf.button.get('value');
+	  } else if (conf.input) {
+	        conf.value = conf.input.getAttribute('value');
+	  }
+	  if (!this.onEventTrigger ('navigate', e, conf)) {
+	    this.onEventTrigger ('god', e, conf); // if nobody claim the event, god can handle it...
+	  }
+	};
+	obj.onProperty = function(e){
+	  this.onEventTrigger ('property', e, {
+	  	anchor: this.getOwnerByTagName( $E.getTarget(e), 'A' ),
+		button: _searchYUIButton($E.getTarget(e))
+	  });
+	};
+	obj._timeoutId = 0;
+	obj.onRepaint = function(e){
+	  // Downshift Your Code (can’t let something happen multiple times in a second)
+	  // http://yuiblog.com/blog/2007/07/09/downshift-your-code/
+      clearTimeout(obj._timeoutId);
+      obj._timeoutId = setTimeout(function(){
+            var b = 'repaint',
+                e = {target:document.body},
+                m = {
+            	    action: b,
+            	    target: null,
+            	    event: e,
+	  				flagged: false,
+            	    decrepitate: false,
+            	    stop: false
+            	};
+        	obj.bubble[b].fire(e, m);
+        	if (m.stop) {
+        	  	$E.stopEvent(e);
+        	}
+        }, 150
+      );
+	};
+	obj.onRollOver = function(e){
+	  this.onEventTrigger ('rollover', e, {
+	  	anchor: this.getOwnerByTagName( $E.getTarget(e), 'A' )
+	  });
+	};
+	obj.onRollOut = function(e){
+	  this.onEventTrigger ('rollout', e, {
+	  	anchor: this.getOwnerByTagName( $E.getTarget(e), 'A' )
+	  });
+	};
+	obj.onKeyPressed = function(args){
+	  this.onKeyPressedTrigger(args);
+	};
+	/**
+	* * Este método determina la acción por defecto para un elemento
+	* @public
+	* @param {object} el        element reference
+	* @param {object} actions   object with the list of posibles actions
+	* @return void
+	*/
+	obj.getActionName = function (el, depot) {
+	  depot = depot || {};
+	  var b = null, r = null,
+	      f = ($D.inDocument(el)?function(b){return $D.hasClass(el, b)}:function(b){return el.hasClass(b);}); // f: check is certain object has a classname
+	  if (el && ($L.isObject(el) || (el = $( el )))) {
+	  	try{
+			r = el.getAttribute("rel"); // if rel is available...
+		}catch(e){};
+		for (b in depot) { // behaviors in the depot...
+			if ((depot.hasOwnProperty(b)) && (f(b) || (b === r))) {
+				return b;
+			}
+		}
+	  }
+	  return null;
+	};
+	/**
+	* * Este método determina el primer tab hijo basado en el tabName
+	* @public
+	* @param {object} el Child element reference
+	* @param {object} c  ClassName of the Ancestor
+	* @return void
+	*/
+	obj.getFirstChildByTagName = function (el, t) {
+	  if (el && ($L.isObject(el) || (el = $( el ))) && t) {
+	  	var l = el.getElementsByTagName(t);
+		if (l.length > 0) {
+		  return l[0];
+		}
+	  }
+	  return null;
+	};
+	/**
+	* * Este método determina si un evento es interno o no a un contenedor...
+	* @public
+	* @param {object} e  Referencia al evento
+	* @param {object} el Referencia al contendor
+	* @return void
+	*/
+	obj.virtualTarget = function (e, el) {
+	  if (el && ($L.isObject(el) || (el = $( el ))) && $L.isObject(e)) {
+	    var t = $E.getRelatedTarget ( e );  // target element
+	    if ($L.isObject(t)) {
+	      while((t.parentNode) && $L.isObject(t.parentNode) &&  (t.parentNode.tagName !== "BODY")) {
+		    if (t.parentNode === el) {
+		      return true;
+		    }
+		    t = t.parentNode;
+		  }
+		}
+	  }
+	  return false;
+	};
+
+	/**
+	* * Creating a new behaviors layer...
+	* @public
+	* @param {string||array} layers  Behaviors layers GUID
+	* @param {object} scope  Custom  Event default execution scope
+	* @return boolean if not exists...
+	*/
+    obj.addLayer = function (layers, scope) {
+		var result = false;
+		layers = ($L.isArray(layers)?layers:[layers]);
+        scope = scope || window;
+		for (var i = 0; i < layers.length; ++i) {
+          if (layers[i] && !this.bubble.hasOwnProperty(layers[i])) {
+            this.bubble[layers[i]] = new $Y.CustomEvent(layers[i], scope, true);
+            result = true;
+          }
+        }
+		return result;
+    };
+	/**
+	* * Subcribing an bahavior to certain bahaviors layer...
+	* @public
+	* @param {string} layer  Behavior layer GUID
+	* @param {object} bh     The function that represent the behavior
+	* @return boolean if it is the first listener
+	*/
+    obj.subscribe = function (layer, bh, scope) {
+        var first = this.addLayer(layer); // return true if it's the first listener
+        if (layer) {
+			if ($L.isObject(scope)) {
+			  this.bubble[layer].subscribe(bh, scope, true);  // correcting the default scope
+			} else {
+			  this.bubble[layer].subscribe(bh);  // use the default scope
+			}
+        }
+        return first;
+    };
+    obj.on = obj.subscribe; // defining an alias...
+	/**
+	* * Broadcasting the message in the corresponding behavior layer...
+	* @public
+	* @param {string} layer  Behavior layer GUID
+	* @param {object} obj    The function that represent the behavior
+	* @return boolean if someone has claim the event
+	*/
+    obj.fire = function (layer, obj) {
+	    obj = obj || {};
+	    obj.action = layer;
+	    obj.flagged = false; obj.decrepitate = false;
+	    obj.stop = false;
+	    if (this.bubble.hasOwnProperty(layer)) {
+	        this.bubble[layer].fire(null, obj);
+	    }
+	    return obj.stop;
+    };
+	/**
+	* * Processing an action based on the classname of the target element...
+	* @public
+	* @param {string} layer     Behavior layer GUID
+	* @param {object} args      Event object (extended)
+	* @param {object} actions   List of availables behaviors...
+	* @param {boolean} force    Proccess the actions without worry about the flagged value...
+	* @return void
+	*/
+	obj.processingAction = function (layer, args, actions, force) {
+      var behavior = null, t;
+	  if (!(args[1].flagged || args[1].decrepitate) || force) {
+	  	  // checking for anchor, input or button
+		  t = args[1].anchor || args[1].input || args[1].button;
+		  if (t) {
+			behavior = this.getActionName ( t, actions );
+			args[1].el = t;
+		  }
+		  if (behavior && (actions[behavior].apply(args[1], [layer, args]))) {
+			$E.stopEvent(args[0]);
+			args[1].flagged = true;
+		    args[1].decrepitate = true;
+		    args[1].stop = true;
+		  }
+	  }
+	};
+	obj.defaultActions = {};
+    obj.addDefaultAction = function (n, f, force) {
+		if (n && f && (!this.defaultActions.hasOwnProperty(n) || force)) {
+		  	this.defaultActions[n] = f;
+		}
+    };
+
+	// default behaviors
+	$E.addListener(window, "resize", obj.onRepaint, obj, true);
+
+	// default Suscriptions
+	obj.on('navigate', navRelExternal);
+	obj.on('navigate', defaultActionsControl);
+
+	// initialization of the font and scroll monitors
+	obj.initMonitors = function ( config ) {
+	    var fMonitors = function () {
+            var oMonitors = new YAHOO.widget.Module('yui-cms-font-monitor', {
+                monitorresize:true,
+                visible:false
+            });
+            oMonitors.render(document.body);
+            // monitoring font-size...
+            YAHOO.widget.Module.textResizeEvent.subscribe(obj.onRepaint, obj, true);
+            // monitoring scroll actions...
+            YAHOO.widget.Overlay.windowScrollEvent.subscribe(obj.onRepaint, obj, true);
+	    };
+	    if ($L.isFunction(YAHOO.widget.Module)) {
+	      $E.onDOMReady (fMonitors, obj, true);
+	    }
+    };
+	// initialization inside the selfconstructor
+	obj.init = function () {
+	  if (!this.ready) {
+	    var el = document.body;
+	    $E.addListener(el,
+			"click",
+			obj.onNavigate,
+			obj,
+			true
+		);
+	    /*
+	        Listen for the "mousedown" event in Opera b/c it does not
+	        support the "contextmenu" event
+	    */
+	    $E.addListener(
+	        el,
+	        (isOpera ? "mousedown" : "contextmenu"),
+	        obj.onProperty,
+	        obj,
+	        true
+	    );
+	    /*
+	        Assign a "click" event handler to the trigger element(s) for
+	        Opera to prevent default browser behaviors.
+	    */
+	    if(isOpera) {
+	        $E.addListener(
+	            el,
+	            "click",
+	            obj.onProperty,
+	            obj,
+	            true
+	        );
+	    }
+		$E.addListener(el, "mouseover", obj.onRollOver, obj, true);
+	    $E.addListener(el, "mouseout", obj.onRollOut, obj, true);
+
+		// keys...
+        $E.addListener(document, "keyup",  obj.onKeyPressed, obj, true);
+		$E.addListener(document, "keydown",  obj.onKeyPressed, obj, true);
+
+		this.ready = true;
+		obj.onReady.fire();
+	  }
+	};
+	$E.onDOMReady(obj.init, obj, true);
+
+	// creating the default layers...
+	obj.addLayer (['navigate','god','property','key','repaint','rollover', 'rollout']); // god layer - hack: the layer after the common navigate layer...
+
+	return obj;
+  }();
+})();
+YAHOO.register("bubbling", YAHOO.Bubbling, {version: "1.5.0", build: "222"});
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/yui/animation.js
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/yui/animation.js?rev=694856&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/yui/animation.js (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/main/webapp/js/yui/animation.js Fri Sep 12 17:31:09 2008
@@ -0,0 +1,1380 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+(function() {
+
+var Y = YAHOO.util;
+
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+*/
+
+/**
+ * The animation module provides allows effects to be added to HTMLElements.
+ * @module animation
+ * @requires yahoo, event, dom
+ */
+
+/**
+ *
+ * Base animation class that provides the interface for building animated effects.
+ * <p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p>
+ * @class Anim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent
+ * @constructor
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+
+var Anim = function(el, attributes, duration, method) {
+    if (!el) {
+    }
+    this.init(el, attributes, duration, method); 
+};
+
+Anim.NAME = 'Anim';
+
+Anim.prototype = {
+    /**
+     * Provides a readable name for the Anim instance.
+     * @method toString
+     * @return {String}
+     */
+    toString: function() {
+        var el = this.getEl() || {};
+        var id = el.id || el.tagName;
+        return (this.constructor.NAME + ': ' + id);
+    },
+    
+    patterns: { // cached for performance
+        noNegatives:        /width|height|opacity|padding/i, // keep at zero or above
+        offsetAttribute:  /^((width|height)|(top|left))$/, // use offsetValue as default
+        defaultUnit:        /width|height|top$|bottom$|left$|right$/i, // use 'px' by default
+        offsetUnit:         /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset
+    },
+    
+    /**
+     * Returns the value computed by the animation's "method".
+     * @method doMethod
+     * @param {String} attr The name of the attribute.
+     * @param {Number} start The value this attribute should start from for this animation.
+     * @param {Number} end  The value this attribute should end at for this animation.
+     * @return {Number} The Value to be applied to the attribute.
+     */
+    doMethod: function(attr, start, end) {
+        return this.method(this.currentFrame, start, end - start, this.totalFrames);
+    },
+    
+    /**
+     * Applies a value to an attribute.
+     * @method setAttribute
+     * @param {String} attr The name of the attribute.
+     * @param {Number} val The value to be applied to the attribute.
+     * @param {String} unit The unit ('px', '%', etc.) of the value.
+     */
+    setAttribute: function(attr, val, unit) {
+        if ( this.patterns.noNegatives.test(attr) ) {
+            val = (val > 0) ? val : 0;
+        }
+
+        Y.Dom.setStyle(this.getEl(), attr, val + unit);
+    },                        
+    
+    /**
+     * Returns current value of the attribute.
+     * @method getAttribute
+     * @param {String} attr The name of the attribute.
+     * @return {Number} val The current value of the attribute.
+     */
+    getAttribute: function(attr) {
+        var el = this.getEl();
+        var val = Y.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] ); // top or left
+        var box = !!( a[2] ); // width or height
+        
+        // use offsets for width/height and abs pos top/left
+        if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
+            val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
+        } else { // default to zero for other 'auto'
+            val = 0;
+        }
+
+        return val;
+    },
+    
+    /**
+     * Returns the unit to use when none is supplied.
+     * @method getDefaultUnit
+     * @param {attr} attr The name of the attribute.
+     * @return {String} The default unit to be used.
+     */
+    getDefaultUnit: function(attr) {
+         if ( this.patterns.defaultUnit.test(attr) ) {
+            return 'px';
+         }
+         
+         return '';
+    },
+        
+    /**
+     * Sets the actual values to be used during the animation.  Should only be needed for subclass use.
+     * @method setRuntimeAttribute
+     * @param {Object} attr The attribute object
+     * @private 
+     */
+    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; // note return; nothing to animate to
+        }
+        
+        start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr);
+
+        // To beats by, per SMIL 2.1 spec
+        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] * 1; // times 1 to cast "by" 
+                }
+            } else {
+                end = start + attributes[attr]['by'] * 1;
+            }
+        }
+        
+        this.runtimeAttributes[attr].start = start;
+        this.runtimeAttributes[attr].end = end;
+
+        // set units if needed
+        this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ?
+                attributes[attr]['unit'] : this.getDefaultUnit(attr);
+        return true;
+    },
+
+    /**
+     * Constructor for Anim instance.
+     * @method init
+     * @param {String | HTMLElement} el Reference to the element that will be animated
+     * @param {Object} attributes The attribute(s) to be animated.  
+     * Each attribute is an object with at minimum a "to" or "by" member defined.  
+     * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+     * All attribute names use camelCase.
+     * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+     * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+     */ 
+    init: function(el, attributes, duration, method) {
+        /**
+         * Whether or not the animation is running.
+         * @property isAnimated
+         * @private
+         * @type Boolean
+         */
+        var isAnimated = false;
+        
+        /**
+         * A Date object that is created when the animation begins.
+         * @property startTime
+         * @private
+         * @type Date
+         */
+        var startTime = null;
+        
+        /**
+         * The number of frames this animation was able to execute.
+         * @property actualFrames
+         * @private
+         * @type Int
+         */
+        var actualFrames = 0; 
+
+        /**
+         * The element to be animated.
+         * @property el
+         * @private
+         * @type HTMLElement
+         */
+        el = Y.Dom.get(el);
+        
+        /**
+         * The collection of attributes to be animated.  
+         * Each attribute must have at least a "to" or "by" defined in order to animate.  
+         * If "to" is supplied, the animation will end with the attribute at that value.  
+         * If "by" is supplied, the animation will end at that value plus its starting value. 
+         * If both are supplied, "to" is used, and "by" is ignored. 
+         * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values).
+         * @property attributes
+         * @type Object
+         */
+        this.attributes = attributes || {};
+        
+        /**
+         * The length of the animation.  Defaults to "1" (second).
+         * @property duration
+         * @type Number
+         */
+        this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1;
+        
+        /**
+         * The method that will provide values to the attribute(s) during the animation. 
+         * Defaults to "YAHOO.util.Easing.easeNone".
+         * @property method
+         * @type Function
+         */
+        this.method = method || Y.Easing.easeNone;
+
+        /**
+         * Whether or not the duration should be treated as seconds.
+         * Defaults to true.
+         * @property useSeconds
+         * @type Boolean
+         */
+        this.useSeconds = true; // default to seconds
+        
+        /**
+         * The location of the current animation on the timeline.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property currentFrame
+         * @type Int
+         */
+        this.currentFrame = 0;
+        
+        /**
+         * The total number of frames to be executed.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property totalFrames
+         * @type Int
+         */
+        this.totalFrames = Y.AnimMgr.fps;
+        
+        /**
+         * Changes the animated element
+         * @method setEl
+         */
+        this.setEl = function(element) {
+            el = Y.Dom.get(element);
+        };
+        
+        /**
+         * Returns a reference to the animated element.
+         * @method getEl
+         * @return {HTMLElement}
+         */
+        this.getEl = function() { return el; };
+        
+        /**
+         * Checks whether the element is currently animated.
+         * @method isAnimated
+         * @return {Boolean} current value of isAnimated.     
+         */
+        this.isAnimated = function() {
+            return isAnimated;
+        };
+        
+        /**
+         * Returns the animation start time.
+         * @method getStartTime
+         * @return {Date} current value of startTime.      
+         */
+        this.getStartTime = function() {
+            return startTime;
+        };        
+        
+        this.runtimeAttributes = {};
+        
+        
+        
+        /**
+         * Starts the animation by registering it with the animation manager. 
+         * @method animate  
+         */
+        this.animate = function() {
+            if ( this.isAnimated() ) {
+                return false;
+            }
+            
+            this.currentFrame = 0;
+            
+            this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration;
+    
+            if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration 
+                this.totalFrames = 1; 
+            }
+            Y.AnimMgr.registerElement(this);
+            return true;
+        };
+          
+        /**
+         * Stops the animation.  Normally called by AnimMgr when animation completes.
+         * @method stop
+         * @param {Boolean} finish (optional) If true, animation will jump to final frame.
+         */ 
+        this.stop = function(finish) {
+            if (!this.isAnimated()) { // nothing to stop
+                return false;
+            }
+
+            if (finish) {
+                 this.currentFrame = this.totalFrames;
+                 this._onTween.fire();
+            }
+            Y.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(); 
+        };
+        
+        /**
+         * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s).
+         * @private
+         */
+         
+        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);
+        };
+        
+        /**
+         * Custom event that fires after onStart, useful in subclassing
+         * @private
+         */    
+        this._onStart = new Y.CustomEvent('_start', this, true);
+
+        /**
+         * Custom event that fires when animation begins
+         * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction)
+         * @event onStart
+         */    
+        this.onStart = new Y.CustomEvent('start', this);
+        
+        /**
+         * Custom event that fires between each frame
+         * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction)
+         * @event onTween
+         */
+        this.onTween = new Y.CustomEvent('tween', this);
+        
+        /**
+         * Custom event that fires after onTween
+         * @private
+         */
+        this._onTween = new Y.CustomEvent('_tween', this, true);
+        
+        /**
+         * Custom event that fires when animation ends
+         * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction)
+         * @event onComplete
+         */
+        this.onComplete = new Y.CustomEvent('complete', this);
+        /**
+         * Custom event that fires after onComplete
+         * @private
+         */
+        this._onComplete = new Y.CustomEvent('_complete', this, true);
+
+        this._onStart.subscribe(onStart);
+        this._onTween.subscribe(onTween);
+        this._onComplete.subscribe(onComplete);
+    }
+};
+
+    Y.Anim = Anim;
+})();
+/**
+ * Handles animation queueing and threading.
+ * Used by Anim and subclasses.
+ * @class AnimMgr
+ * @namespace YAHOO.util
+ */
+YAHOO.util.AnimMgr = new function() {
+    /** 
+     * Reference to the animation Interval.
+     * @property thread
+     * @private
+     * @type Int
+     */
+    var thread = null;
+    
+    /** 
+     * The current queue of registered animation objects.
+     * @property queue
+     * @private
+     * @type Array
+     */    
+    var queue = [];
+
+    /** 
+     * The number of active animations.
+     * @property tweenCount
+     * @private
+     * @type Int
+     */        
+    var tweenCount = 0;
+
+    /** 
+     * Base frame rate (frames per second). 
+     * Arbitrarily high for better x-browser calibration (slower browsers drop more frames).
+     * @property fps
+     * @type Int
+     * 
+     */
+    this.fps = 1000;
+
+    /** 
+     * Interval delay in milliseconds, defaults to fastest possible.
+     * @property delay
+     * @type Int
+     * 
+     */
+    this.delay = 1;
+
+    /**
+     * Adds an animation instance to the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method registerElement
+     * @param {object} tween The Anim instance to be be registered
+     */
+    this.registerElement = function(tween) {
+        queue[queue.length] = tween;
+        tweenCount += 1;
+        tween._onStart.fire();
+        this.start();
+    };
+    
+    /**
+     * removes an animation instance from the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method unRegister
+     * @param {object} tween The Anim instance to be be registered
+     * @param {Int} index The index of the Anim instance
+     * @private
+     */
+    this.unRegister = function(tween, index) {
+        index = index || getIndex(tween);
+        if (!tween.isAnimated() || index == -1) {
+            return false;
+        }
+        
+        tween._onComplete.fire();
+        queue.splice(index, 1);
+
+        tweenCount -= 1;
+        if (tweenCount <= 0) {
+            this.stop();
+        }
+
+        return true;
+    };
+    
+    /**
+     * Starts the animation thread.
+	* Only one thread can run at a time.
+     * @method start
+     */    
+    this.start = function() {
+        if (thread === null) {
+            thread = setInterval(this.run, this.delay);
+        }
+    };
+
+    /**
+     * Stops the animation thread or a specific animation instance.
+     * @method stop
+     * @param {object} tween A specific Anim instance to stop (optional)
+     * If no instance given, Manager stops thread and all animations.
+     */    
+    this.stop = function(tween) {
+        if (!tween) {
+            clearInterval(thread);
+            
+            for (var i = 0, len = queue.length; i < len; ++i) {
+                this.unRegister(queue[0], 0);  
+            }
+
+            queue = [];
+            thread = null;
+            tweenCount = 0;
+        }
+        else {
+            this.unRegister(tween);
+        }
+    };
+    
+    /**
+     * Called per Interval to handle each animation frame.
+     * @method run
+     */    
+    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; // note return;
+            }
+        }
+        return -1;
+    };
+    
+    /**
+     * On the fly frame correction to keep animation on time.
+     * @method correctFrame
+     * @private
+     * @param {Object} tween The Anim instance being corrected.
+     */
+    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) { // check if falling behind
+            tweak = Math.round((elapsed / expected - 1) * tween.currentFrame);
+        } else { // went over duration, so jump to end
+            tweak = frames - (frame + 1); 
+        }
+        if (tweak > 0 && isFinite(tweak)) { // adjust if needed
+            if (tween.currentFrame + tweak >= frames) {// dont go past last frame
+                tweak = frames - (frame + 1);
+            }
+            
+            tween.currentFrame += tweak;      
+        }
+    };
+};
+/**
+ * Used to calculate Bezier splines for any number of control points.
+ * @class Bezier
+ * @namespace YAHOO.util
+ *
+ */
+YAHOO.util.Bezier = new function() {
+    /**
+     * Get the current position of the animated element based on t.
+     * Each point is an array of "x" and "y" values (0 = x, 1 = y)
+     * At least 2 points are required (start and end).
+     * First point is start. Last point is end.
+     * Additional control points are optional.     
+     * @method getPosition
+     * @param {Array} points An array containing Bezier points
+     * @param {Number} t A number between 0 and 1 which is the basis for determining current position
+     * @return {Array} An array containing int x and y member data
+     */
+    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]]; // save input
+        }
+        
+        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() {
+/**
+ * Anim subclass for color transitions.
+ * <p>Usage: <code>var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color values can be specified with either 112233, #112233, 
+ * [255,255,255], or rgb(255,255,255)</p>
+ * @class ColorAnim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @constructor
+ * @extends YAHOO.util.Anim
+ * @param {HTMLElement | String} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.
+ * Each attribute is an object with at minimum a "to" or "by" member defined.
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var ColorAnim = function(el, attributes, duration,  method) {
+        ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+    };
+    
+    ColorAnim.NAME = 'ColorAnim';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(ColorAnim, Y.Anim);
+
+    var superclass = ColorAnim.superclass;
+    var proto = ColorAnim.prototype;
+    
+    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\)$/; // need rgba for safari
+    
+    /**
+     * Attempts to parse the given string and return a 3-tuple.
+     * @method parseColor
+     * @param {String} s The string to parse.
+     * @return {Array} The 3-tuple of rgb values.
+     */
+    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)) { // bgcolor default
+                var parent = el.parentNode; // try and get from an ancestor
+                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);
+            // fix colors if going "by"
+            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;
+        }
+    };
+
+    Y.ColorAnim = ColorAnim;
+})();
+/*!
+TERMS OF USE - EASING EQUATIONS
+Open source under the BSD License.
+Copyright 2001 Robert Penner All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * Singleton that determines how an animation proceeds from start to end.
+ * @class Easing
+ * @namespace YAHOO.util
+*/
+
+YAHOO.util.Easing = {
+
+    /**
+     * Uniform speed between points.
+     * @method easeNone
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeNone: function (t, b, c, d) {
+    	return c*t/d + b;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end. (quadratic)
+     * @method easeIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeIn: function (t, b, c, d) {
+    	return c*(t/=d)*t + b;
+    },
+
+    /**
+     * Begins quickly and decelerates towards end.  (quadratic)
+     * @method easeOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOut: function (t, b, c, d) {
+    	return -c *(t/=d)*(t-2) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end. (quadratic)
+     * @method easeBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end. (quartic)
+     * @method easeInStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeInStrong: function (t, b, c, d) {
+    	return c*(t/=d)*t*t*t + b;
+    },
+    
+    /**
+     * Begins quickly and decelerates towards end.  (quartic)
+     * @method easeOutStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOutStrong: function (t, b, c, d) {
+    	return -c * ((t=t/d-1)*t*t*t - 1) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end. (quartic)
+     * @method easeBothStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+
+    /**
+     * Snap in elastic effect.
+     * @method elasticIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+
+    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;
+    },
+
+    /**
+     * Snap out elastic effect.
+     * @method elasticOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Snap both elastic effect.
+     * @method elasticBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+
+
+    /**
+     * Backtracks slightly, then reverses direction and moves to end.
+     * @method backIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backIn: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158;
+        }
+    	return c*(t/=d)*t*((s+1)*t - s) + b;
+    },
+
+    /**
+     * Overshoots end, then reverses and comes back to end.
+     * @method backOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Backtracks slightly, then reverses direction, overshoots end, 
+     * then reverses and comes back to end.
+     * @method backBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+
+    /**
+     * Bounce off of start.
+     * @method bounceIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    bounceIn: function (t, b, c, d) {
+    	return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b;
+    },
+    
+    /**
+     * Bounces off end.
+     * @method bounceOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Bounces off start and end.
+     * @method bounceBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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() {
+/**
+ * Anim subclass for moving elements along a path defined by the "points" 
+ * member of "attributes".  All "points" are arrays with x, y coordinates.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Motion
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @constructor
+ * @extends YAHOO.util.ColorAnim
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Motion = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Motion.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+
+    Motion.NAME = 'Motion';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Motion, Y.ColorAnim);
+    
+    var superclass = Motion.superclass;
+    var proto = Motion.prototype;
+
+    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) ) { // could be single point or array of points
+                control = [control];
+            } else { // break reference to attributes.points.control
+                var tmp = []; 
+                for (i = 0, len = control.length; i< len; ++i) {
+                    tmp[i] = control[i];
+                }
+                control = tmp;
+            }
+
+            if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative
+                Y.Dom.setStyle(el, 'position', 'relative');
+            }
+    
+            if ( isset(attributes['points']['from']) ) {
+                Y.Dom.setXY(el, attributes['points']['from']); // set position to from point
+            } 
+            else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position
+            
+            start = this.getAttribute('points'); // get actual top & left
+            
+            // TO beats BY, per SMIL 2.1 spec
+            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');
+    };
+
+    Y.Motion = Motion;
+})();
+(function() {
+/**
+ * Anim subclass for scrolling elements to a position defined by the "scroll"
+ * member of "attributes".  All "scroll" members are arrays with x, y scroll positions.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Scroll
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @extends YAHOO.util.ColorAnim
+ * @constructor
+ * @param {String or HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Scroll = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+    Scroll.NAME = 'Scroll';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Scroll, Y.ColorAnim);
+    
+    var superclass = Scroll.superclass;
+    var proto = Scroll.prototype;
+
+    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);
+        }
+    };
+
+    Y.Scroll = Scroll;
+})();
+YAHOO.register("animation", YAHOO.util.Anim, {version: "2.5.2", build: "1076"});