[Jifty-commit] r3118 - in jifty/trunk: share/web/static/css share/web/static/css/yui/calendar share/web/static/css/yui/menu share/web/static/css/yui/tabview share/web/static/js/yui

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Apr 12 03:32:45 EDT 2007


Author: hlb
Date: Thu Apr 12 03:32:44 2007
New Revision: 3118

Added:
   jifty/trunk/share/web/static/css/yui/menu/
   jifty/trunk/share/web/static/css/yui/menu/map.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menu.css
   jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_dim_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_hov_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuarorght8_dim_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuarorght8_hov_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuarorght8_nrm_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuaroup8_dim_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuaroup8_nrm_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuchk8_dim_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuchk8_hov_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/menu/menuchk8_nrm_1.gif   (contents, props changed)
   jifty/trunk/share/web/static/css/yui/tabview/tabview.css
   jifty/trunk/share/web/static/js/yui/element-beta.js
Modified:
   jifty/trunk/lib/Jifty/Web.pm
   jifty/trunk/share/web/static/css/forms.css
   jifty/trunk/share/web/static/css/main.css
   jifty/trunk/share/web/static/css/yui/calendar/calendar.css
   jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css
   jifty/trunk/share/web/static/css/yui/tabview/tabs.css
   jifty/trunk/share/web/static/js/yui/calendar.js
   jifty/trunk/share/web/static/js/yui/container.js
   jifty/trunk/share/web/static/js/yui/dom.js
   jifty/trunk/share/web/static/js/yui/event.js
   jifty/trunk/share/web/static/js/yui/tabview.js
   jifty/trunk/share/web/static/js/yui/yahoo.js

Log:
* Upgraded YUI to 2.2.1
  * NOTICE: if you are using yui tabview, 
    please use tabview.css instead of tabs.css
* Added yui/element-beta.js and yui/menu.js in Web.pm


Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Thu Apr 12 03:32:44 2007
@@ -62,8 +62,10 @@
     yui/dom.js
     yui/event.js
     yui/calendar.js
+    yui/element-beta.js
     yui/tabview.js
     yui/container.js
+    yui/menu.js
     app.js
     app_behaviour.js
     css_browser_selector.js

Modified: jifty/trunk/share/web/static/css/forms.css
==============================================================================
--- jifty/trunk/share/web/static/css/forms.css	(original)
+++ jifty/trunk/share/web/static/css/forms.css	Thu Apr 12 03:32:44 2007
@@ -198,7 +198,7 @@
 }
 
 
-.selected {
+option.selected {
     background: #dddddd;
 }
 

Modified: jifty/trunk/share/web/static/css/main.css
==============================================================================
--- jifty/trunk/share/web/static/css/main.css	(original)
+++ jifty/trunk/share/web/static/css/main.css	Thu Apr 12 03:32:44 2007
@@ -10,4 +10,5 @@
 @import "app.css";
 @import "autocomplete.css";
 @import "yui/calendar/calendar.css";
+ at import "yui/menu/menu.css";
 @import "notices.css";

Modified: jifty/trunk/share/web/static/css/yui/calendar/calendar.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/calendar/calendar.css	(original)
+++ jifty/trunk/share/web/static/css/yui/calendar/calendar.css	Thu Apr 12 03:32:44 2007
@@ -1,191 +1,197 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-Version 0.12
-*/
-
-.yui-calcontainer {
-	position:relative;
-	padding:5px;
-	background-color:#F7F9FB;
-	border:1px solid #7B9EBD;
-	float:left;
-	overflow:hidden;
-}
-
-.yui-calcontainer iframe {
-	position:absolute;
-	border:none;
-	margin:0;padding:0;
-	left:-1px;
-	top:-1px;
-	z-index:0;
-	width:50em;
-	height:50em;
-}
-
-.yui-calcontainer.multi {
-	padding:0;
-}
-
-.yui-calcontainer.multi .groupcal {
-	padding:5px;
-	background-color:transparent;
-	z-index:1;
-	float:left;
-	position:relative;
-	border:none;
-}
-
-.yui-calcontainer .title {
-	font:100% sans-serif;
-	color:#000;
-	font-weight:bold;
-	margin-bottom:5px;
-	height:25px;
-	position:absolute;
-	top:3px;left:5px;
-	z-index:1;
-}
-
-.yui-calcontainer .close-icon {
-	position:absolute;
-	right:3px;
-	top:3px;
-	border:none;
-	z-index:1;
-}
-
-/* Calendar element styles */
-
-.yui-calendar {
-	font:100% sans-serif;
-	text-align:center;
-	border-spacing:0;
-	border-collapse:separate;
-	position:relative;
-}
-
-.yui-calcontainer.withtitle {
-	padding-top:1.5em;
-}
-
-.yui-calendar .calnavleft {
-	position:absolute;
-	background-repeat:no-repeat;
-	cursor:pointer;
-	top:2px;
-	bottom:0;
-	width:9px;
-	height:12px;   
-	left:2px;
-	z-index:1;
-}
-
-.yui-calendar .calnavright {
-	position:absolute;
-	background-repeat:no-repeat;
-	cursor:pointer;
-	top:2px;
-	bottom:0;
-	width:9px;
-	height:12px;  
-	right:2px;
-	z-index:1;
-}
-
-.yui-calendar td.calcell {
-	padding:.1em .2em;
-	border:1px solid #E0E0E0;
-	text-align:center;
-}
-
-.yui-calendar td.calcell a {
-	color:#003DB8;
-	text-decoration:none;
-}
-
-.yui-calendar td.calcell.today {
-	border:1px solid #000;
-}
-
-.yui-calendar td.calcell.oom {
-	cursor:default;
-	color:#999;
-	background-color:#EEE;
-	border:1px solid #E0E0E0;
-}
-
-.yui-calendar td.calcell.selected {
-	color:#003DB8;
-	background-color:#FFF19F;
-	border:1px solid #FF9900;
-}
-
-.yui-calendar td.calcell.calcellhover {
-	cursor:pointer;
-	color:#FFF;
-	background-color:#FF9900;
-	border:1px solid #FF9900;
-}
-
-.yui-calendar td.calcell.calcellhover a {
-	color:#FFF;
-}
-
-.yui-calendar td.calcell.restricted {
-	text-decoration:line-through;
-}
-
-.yui-calendar td.calcell.previous {
-	color:#CCC;
-}
-
-.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
-.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
-.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
-.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
-
-.yui-calendar .calhead {
-	border:1px solid #E0E0E0;
-	vertical-align:middle;
-	background-color:#FFF;
-}
-
-.yui-calendar .calheader {
-	position:relative;
-	width:100%;
-	text-align:center;
-}
-
-.yui-calendar .calheader img {
-	border:none;
-}
-
-.yui-calendar .calweekdaycell {
-	color:#666;
-	font-weight:normal;
-	text-align:center;
-	width:1.5em;
-}
-
-.yui-calendar .calfoot {
-	background-color:#EEE;
-}
-
-.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
-	color:#666;
-	font-size:9px;
-	font-style:italic;
-	font-weight:normal;
-	width:15px;
-}
-
-.yui-calendar .calrowhead {
-	border-right-width:2px;
-}
-
-/*Specific changes for calendar running under fonts/reset */
-.yui-calendar a:hover {background:inherit;}
-p#clear {clear:left; padding-top:10px;}
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+.yui-calcontainer {
+	position:relative;
+	padding:5px;
+	background-color:#F7F9FB;
+	border:1px solid #7B9EBD;
+	float:left;
+	overflow:hidden;
+}
+
+.yui-calcontainer iframe {
+	position:absolute;
+	border:none;
+	margin:0;padding:0;
+	left:-1px;
+	top:-1px;
+	z-index:0;
+	width:50em;
+	height:50em;
+}
+
+.yui-calcontainer.multi {
+	padding:0;
+}
+
+.yui-calcontainer.multi .groupcal {
+	padding:5px;
+	background-color:transparent;
+	z-index:1;
+	float:left;
+	position:relative;
+	border:none;
+}
+
+.yui-calcontainer .title {
+	font:100% sans-serif;
+	color:#000;
+	font-weight:bold;
+	margin-bottom:5px;
+	height:25px;
+	position:absolute;
+	top:3px;left:5px;
+	z-index:1;
+}
+
+.yui-calcontainer .close-icon {
+	position:absolute;
+	right:3px;
+	top:3px;
+	border:none;
+	z-index:1;
+}
+
+.yui-calcontainer .calclose {
+	background: url("calx.gif") no-repeat;
+	width:17px;
+	height:13px;
+	cursor:pointer;	
+}
+
+/* Calendar element styles */
+
+.yui-calendar {
+	font:100% sans-serif;
+	text-align:center;
+	border-spacing:0;
+	border-collapse:separate;
+	position:relative;
+}
+
+.yui-calcontainer.withtitle {
+	padding-top:1.5em;
+}
+
+.yui-calendar .calnavleft {
+	position:absolute;
+	cursor:pointer;
+	top:2px;
+	bottom:0;
+	width:9px;
+	height:12px;   
+	left:2px;
+	z-index:1;
+	background: url("callt.gif") no-repeat;
+}
+
+.yui-calendar .calnavright {
+	position:absolute;
+	cursor:pointer;
+	top:2px;
+	bottom:0;
+	width:9px;
+	height:12px;
+	right:2px;
+	z-index:1;
+	background: url("calrt.gif") no-repeat;
+}
+
+.yui-calendar td.calcell {
+	padding:.1em .2em;
+	border:1px solid #E0E0E0;
+	text-align:center;
+}
+
+.yui-calendar td.calcell a {
+	color:#003DB8;
+	text-decoration:none;
+}
+
+.yui-calendar td.calcell.today {
+	border:1px solid #000;
+}
+
+.yui-calendar td.calcell.oom {
+	cursor:default;
+	color:#999;
+	background-color:#EEE;
+	border:1px solid #E0E0E0;
+}
+
+.yui-calendar td.calcell.selected {
+	color:#003DB8;
+	background-color:#FFF19F;
+	border:1px solid #FF9900;
+}
+
+.yui-calendar td.calcell.calcellhover {
+	cursor:pointer;
+	color:#FFF;
+	background-color:#FF9900;
+	border:1px solid #FF9900;
+}
+
+.yui-calendar td.calcell.calcellhover a {
+	color:#FFF;
+}
+
+.yui-calendar td.calcell.restricted {
+	text-decoration:line-through;
+}
+
+.yui-calendar td.calcell.previous {
+	color:#CCC;
+}
+
+.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
+.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
+.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
+.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
+
+.yui-calendar .calhead {
+	border:1px solid #E0E0E0;
+	vertical-align:middle;
+	background-color:#FFF;
+}
+
+.yui-calendar .calheader {
+	position:relative;
+	width:100%;
+	text-align:center;
+}
+
+.yui-calendar .calheader img {
+	border:none;
+}
+
+.yui-calendar .calweekdaycell {
+	color:#666;
+	font-weight:normal;
+	text-align:center;
+	width:1.5em;
+}
+
+.yui-calendar .calfoot {
+	background-color:#EEE;
+}
+
+.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
+	color:#666;
+	font-size:9px;
+	font-style:italic;
+	font-weight:normal;
+	width:15px;
+}
+
+.yui-calendar .calrowhead {
+	border-right-width:2px;
+}
+
+/* Specific changes for calendar running under fonts/reset */
+.yui-calendar .calbody a:hover {background:inherit;}
+p#clear {clear:left; padding-top:10px;}

Added: jifty/trunk/share/web/static/css/yui/menu/map.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menu.css
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/css/yui/menu/menu.css	Thu Apr 12 03:32:44 2007
@@ -0,0 +1,401 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/* Menu styles */
+
+div.yuimenu {
+
+    background-color:#f6f7ee;
+    border:solid 1px #c4c4be;
+    padding:1px;
+    
+}
+
+/* Submenus are positioned absolute and hidden by default */
+
+div.yuimenu div.yuimenu,
+div.yuimenubar div.yuimenu {
+
+    position:absolute;
+    visibility:hidden;
+
+}
+
+/* MenuBar Styles */
+
+div.yuimenubar {
+
+    background-color:#f6f7ee;
+    
+}
+
+/*
+    Applying a width triggers "haslayout" in IE so that the module's
+    body clears its floated elements
+*/
+div.yuimenubar div.bd {
+
+    width:100%;
+
+}
+
+/*
+    Clear the module body for other browsers
+*/
+div.yuimenubar div.bd:after {
+
+    content:'.';
+    display:block;
+    clear:both;
+    visibility:hidden;
+    height:0;
+
+}
+
+/* Matches the group title (H6) inside a Menu or MenuBar instance */
+
+div.yuimenu h6,
+div.yuimenubar h6 { 
+
+    font-size:100%;
+    font-weight:normal;    
+    margin:0;
+    border:solid 1px #c4c4be;
+    color:#b9b9b9;    
+
+}
+
+div.yuimenubar h6 {
+
+    float:left;
+    display:inline; /* Prevent margin doubling in IE */
+    padding:4px 12px;
+    border-width:0 1px 0 0;
+    
+}
+
+div.yuimenu h6 {
+
+    float:none;
+    display:block;
+    border-width:1px 0 0 0;
+    padding:5px 10px 0 10px;
+
+}
+
+/* Matches the UL inside a Menu or MenuBar instance */
+
+div.yuimenubar ul {
+
+    list-style-type:none;
+    margin:0;
+    padding:0;
+
+}
+
+div.yuimenu ul {
+
+    list-style-type:none;
+    border:solid 1px #c4c4be;
+    border-width:1px 0 0 0;
+    margin:0;
+    padding:10px 0;
+
+}
+
+div.yuimenu ul.first-of-type, 
+div.yuimenu ul.hastitle,
+div.yuimenu h6.first-of-type {
+
+    border-width:0;
+
+}
+
+/*
+    Styles for the menu's header and footer elements that are used as controls 
+    to scroll the menu's body element when the menu's height exceeds the 
+    value of the "maxheight" configuration property.
+*/
+
+div.yuimenu div.topscrollbar,
+div.yuimenu div.bottomscrollbar {
+
+    height:16px;
+    background-image:url(map.gif);
+    background-repeat:no-repeat;
+
+}
+
+
+div.yuimenu div.topscrollbar {
+
+    background-image:url(map.gif);
+    background-position:center -72px;
+
+}
+
+
+div.yuimenu div.topscrollbar_disabled {
+
+    background-image:url(map.gif);
+    background-position:center -88px;
+
+}
+
+
+div.yuimenu div.bottomscrollbar {
+
+    background-image:url(map.gif);
+    background-position:center -104px;
+
+}
+
+
+div.yuimenu div.bottomscrollbar_disabled {
+
+    background-image:url(map.gif);
+    background-position:center -120px;
+
+}
+
+
+/* MenuItem and MenuBarItem styles */
+
+div.yuimenu li,
+div.yuimenubar li {
+
+    font-size:85%;
+    cursor:pointer;
+    cursor:hand;
+    white-space:nowrap;
+    text-align:left;
+
+}
+
+div.yuimenu li.yuimenuitem {
+
+    padding:2px 24px;
+    
+}
+
+div.yuimenu li li,
+div.yuimenubar li li {
+
+    font-size:100%;
+
+}
+
+
+/* Matches the help text for a menu item */
+
+div.yuimenu li.hashelptext em.helptext {
+
+    font-style:normal;
+    margin:0 0 0 40px;
+
+}
+
+div.yuimenu li a,
+div.yuimenubar li a {
+    
+    /*
+        "zoom:1" triggers "haslayout" in IE to ensure that the mouseover and 
+        mouseout events bubble to the parent LI in IE.
+    */
+    zoom:1;
+    color:#000;
+    text-decoration:none;
+    
+}
+
+div.yuimenu li.hassubmenu,
+div.yuimenu li.hashelptext {
+
+    text-align:right;
+
+}
+
+div.yuimenu li.hassubmenu a.hassubmenu,
+div.yuimenu li.hashelptext a.hashelptext {
+
+    /*
+        Need to apply float immediately for IE or help text will jump to the 
+        next line 
+    */
+
+    *float:left;
+    *display:inline; /* Prevent margin doubling in IE */
+    text-align:left;
+
+}
+
+div.yuimenu.visible li.hassubmenu a.hassubmenu, 
+div.yuimenu.visible li.hashelptext a.hashelptext {
+
+    /*
+        Apply the float only when the menu is visible to prevent the help
+        text from wrapping to the next line in Opera.
+    */
+
+    float:left;
+
+}
+
+
+/* Matches selected menu items */
+
+div.yuimenu li.selected,
+div.yuimenubar li.selected {
+
+    background-color:#8c8ad0;
+
+}
+
+div.yuimenu li.selected a.selected,
+div.yuimenubar li.selected a.selected {
+
+    text-decoration:underline;
+
+}
+
+div.yuimenu li.selected a.selected,
+div.yuimenu li.selected em.selected, 
+div.yuimenubar li.selected a.selected {
+
+    color:#fff;
+
+}
+
+
+/* Matches disabled menu items */
+
+div.yuimenu li.disabled, 
+div.yuimenubar li.disabled {
+
+    cursor:default;
+
+}
+
+div.yuimenu li.disabled a.disabled,
+div.yuimenu li.disabled em.disabled,
+div.yuimenubar li.disabled a.disabled {
+
+    color:#b9b9b9;
+    cursor:default;
+    
+}
+
+div.yuimenubar li.yuimenubaritem {
+
+    float:left;
+    display:inline; /* Prevent margin doubling in IE */
+    border-width:0 0 0 1px;
+    border-style:solid;
+    border-color:#c4c4be;
+    padding:4px 24px;
+    margin:0;
+
+}
+
+div.yuimenubar li.yuimenubaritem.first-of-type {
+
+    border-width:0;
+
+}
+
+
+/* Styles for the the submenu indicator for menu items */
+
+div.yuimenu li.hassubmenu em.submenuindicator, 
+div.yuimenubar li.hassubmenu em.submenuindicator {
+
+    display:-moz-inline-box; /* Mozilla */
+    display:inline-block; /* IE, Opera and Safari */
+    vertical-align:middle;
+    height:8px;
+    width:8px;
+    text-indent:9px;
+    font:0/0 arial;
+    overflow:hidden;
+    background-image:url(map.gif);
+    background-repeat:no-repeat;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator {
+
+    background-position:0 -24px;
+    margin:0 0 0 10px;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator.selected {
+
+    background-position:0 -32px;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator.disabled {
+
+    background-position:0 -40px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator {
+
+    background-position:0 0;
+    margin:0 -16px 0 10px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator.selected {
+
+    background-position:0 -8px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator.disabled {
+
+    background-position:0 -16px;
+
+}
+
+
+/* Styles for a menu item's "checked" state */
+
+div.yuimenu li.checked {
+
+    position:relative;
+
+}
+
+div.yuimenu li.checked em.checkedindicator {
+
+    height:8px;
+    width:8px;
+    text-indent:9px;
+    overflow:hidden;
+    background-image:url(map.gif);
+    background-position:0 -48px;
+    background-repeat:no-repeat;
+    position:absolute;
+    left:6px;
+    _left:-16px; /* Underscore hack b/c this is for IE 6 only */
+    top:.5em;
+
+}
+
+div.yuimenu li.checked em.checkedindicator.selected {
+
+    background-position:0 -56px;
+
+}
+
+div.yuimenu li.checked em.checkedindicator.disabled {
+
+    background-position:0 -64px;
+
+}
\ No newline at end of file

Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_dim_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_hov_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_dim_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_hov_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_nrm_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuaroup8_dim_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuaroup8_nrm_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_dim_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_hov_1.gif
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_nrm_1.gif
==============================================================================
Binary file. No diff available.

Modified: jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css	(original)
+++ jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css	Thu Apr 12 03:32:44 2007
@@ -1,44 +1,54 @@
-.yui-navset .yui-nav li a, .yui-navset .yui-content {
-    border:1px solid #000;  /* label and content borders */
-}
-
-.yui-navset .yui-nav .selected a, .yui-navset .yui-nav a:hover, .yui-navset .yui-content {
-    background-color:#f6f7ee; /* active tab, tab hover, and content bgcolor */
-}
-
-.yui-navset-top .yui-nav .selected a {
-    border-bottom:0; /* no bottom border for active tab */
-    padding-bottom:1px; /* to match height of other tabs */
-}
-
-.yui-navset-top .yui-content {
-    margin-top:-1px; /* for active tab overlap */
-}
-
-.yui-navset-bottom .yui-nav .selected a {
-    border-top:0; /* no bottom border for active tab */
-    padding-top:1px; /* to match height of other tabs */
-}
-
-.yui-navset-bottom .yui-content {
-    margin-bottom:-1px; /* for active tab overlap */
-}
-
-.yui-navset-left .yui-nav li.selected a {
-    border-right:0; /* no bottom border for active tab */
-    padding-right:1px; /* to match height of other tabs */
-}
-
-.yui-navset-left .yui-content {
-    margin-left:-1px; /* for active tab overlap */
-}
-
-.yui-navset-right .yui-nav li.selected a {
-    border-left:0; /* no bottom border for active tab */
-    padding-left:1px; /* to match height of other tabs */
-}
-
-.yui-navset-right .yui-content {
-    margin-right:-1px; /* for active tab overlap */
-    *margin-right:0; /* except IE */
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+.yui-navset .yui-nav li a, .yui-navset .yui-content {
+    border:1px solid #000;  /* label and content borders */
+}
+
+.yui-navset .yui-nav .selected a, .yui-navset .yui-nav a:hover, .yui-navset .yui-content {
+    background-color:#f6f7ee; /* active tab, tab hover, and content bgcolor */
+}
+
+.yui-navset .yui-nav li em { padding:.5em; } /* tab padding */
+
+/* defaults to orientation "top" */
+.yui-navset .yui-nav .selected a {
+    border-bottom-width:0; /* no bottom border for active tab */
+    padding-bottom:1px; /* to match height of other tabs */
+}
+
+.yui-navset .yui-content {
+    margin-top:-1px; /* for active tab overlap */
+}
+
+/* overrides for other orientations */
+
+.yui-navset-bottom .yui-nav .selected a {
+    border-width:0 1px 1px; /* no top border for active tab */
+    padding:1px 0 0; /* to match height of other tabs */
+}
+
+.yui-navset-bottom .yui-content {
+    margin:0 0 -1px; /* for active tab overlap */
+}
+
+.yui-navset-left .yui-nav li.selected a {
+    border-width:1px 0 1px 1px; /* no right border for active tab */
+    padding:0 1px 0 0; /* to match width of other tabs */
+}
+
+.yui-navset-left .yui-content {
+    margin:0 0 0 -1px; /* for active tab overlap */
+}
+
+.yui-navset-right .yui-nav li.selected a {
+    border-width:1px 1px 1px 0; /* no left border for active tab */
+    padding:0 0 0 1px; /* to match width of other tabs */
+}
+
+.yui-navset-right .yui-content {
+    margin:0 -1px 0 0; /* for active tab overlap */
 }
\ No newline at end of file

Modified: jifty/trunk/share/web/static/css/yui/tabview/tabs.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/tabview/tabs.css	(original)
+++ jifty/trunk/share/web/static/css/yui/tabview/tabs.css	Thu Apr 12 03:32:44 2007
@@ -1,3 +1,5 @@
+/* XXX: It is a older CSS file, please use tabview.css instead */
+
 /* default space between tabs */
 .yui-navset-top .yui-nav li, .yui-navset-bottom .yui-nav li {
     margin-right:0.5em; /* horizontal tabs */

Added: jifty/trunk/share/web/static/css/yui/tabview/tabview.css
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/css/yui/tabview/tabview.css	Thu Apr 12 03:32:44 2007
@@ -0,0 +1,75 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/* default space between tabs */
+.yui-navset .yui-nav li {
+    margin-right:0.5em; /* horizontal tabs */
+}
+.yui-navset-left .yui-nav li, .yui-navset-right .yui-nav li {
+    margin:0 0 0.5em; /* vertical tabs */
+}
+
+/* default width for side tabs */
+.yui-navset-left .yui-nav, .yui-navset-right .yui-nav { width:6em; }
+.yui-navset-left { padding-left:6em; } /* map to nav width */
+.yui-navset-right { padding-right:6em; } /* ditto */
+
+/* core */
+
+.yui-nav, .yui-nav li {
+    margin:0;
+    padding:0;
+    list-style:none;
+}
+.yui-navset li em { font-style:normal; }
+
+.yui-navset {
+    position:relative; /* contain absolute positioned tabs (left/right) */
+    zoom:1;
+}
+
+.yui-navset .yui-content { zoom:1; }
+
+.yui-navset .yui-nav li {
+    display:inline-block;
+    display:-moz-inline-stack;
+    *display:inline; /* IE */
+    vertical-align:bottom; /* safari: for overlap */
+    cursor:pointer; /* gecko: due to -moz-inline-stack on anchor */
+    zoom:1; /* IE: kill space between horizontal tabs */
+}
+
+.yui-navset-left .yui-nav li, .yui-navset-right .yui-nav li {
+    display:block;
+}
+
+.yui-navset .yui-nav a {
+    outline:0; /* gecko: keep from shifting */
+}
+
+.yui-navset .yui-nav a { position:relative; } /* IE: to allow overlap */
+
+.yui-navset .yui-nav li a {
+    display:block;
+    display:inline-block;
+    vertical-align:bottom; /* safari: for overlap */
+    zoom:1;
+}
+
+.yui-navset-left .yui-nav li a, .yui-navset-right .yui-nav li a {
+    display:block;
+}
+
+.yui-navset-bottom .yui-nav li a {
+    vertical-align:text-top; /* for inline overlap (reverse for Op border bug) */
+}
+
+.yui-navset .yui-nav li a em { display:block; }
+
+/* position left and right oriented tabs */
+.yui-navset-left .yui-nav, .yui-navset-right .yui-nav { position:absolute; z-index:1; }
+.yui-navset-left .yui-nav { left:0; }
+.yui-navset-right .yui-nav { right:0; }

Modified: jifty/trunk/share/web/static/js/yui/calendar.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/calendar.js	(original)
+++ jifty/trunk/share/web/static/js/yui/calendar.js	Thu Apr 12 03:32:44 2007
@@ -1,4255 +1,4547 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version 0.12.0
-*/
-
-/**
-* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
-* @class YAHOO.util.Config
-* @constructor
-* @param {Object}	owner	The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config = function(owner) {
-	if (owner) {
-		this.init(owner);
-	}
-};
-
-YAHOO.util.Config.prototype = {
-
-	/**
-	* Object reference to the owner of this Config Object
-	* @property owner
-	* @type Object
-	*/
-	owner : null,
-
-	/**
-	* Boolean flag that specifies whether a queue is currently being executed
-	* @property queueInProgress
-	* @type Boolean
-	*/
-	queueInProgress : false,
-
-
-	/**
-	* Validates that the value passed in is a Boolean.
-	* @method checkBoolean
-	* @param	{Object}	val	The value to validate
-	* @return	{Boolean}	true, if the value is valid
-	*/
-	checkBoolean: function(val) {
-		if (typeof val == 'boolean') {
-			return true;
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Validates that the value passed in is a number.
-	* @method checkNumber
-	* @param	{Object}	val	The value to validate
-	* @return	{Boolean}	true, if the value is valid
-	*/
-	checkNumber: function(val) {
-		if (isNaN(val)) {
-			return false;
-		} else {
-			return true;
-		}
-	}
-};
-
-
-/**
-* Initializes the configuration Object and all of its local members.
-* @method init
-* @param {Object}	owner	The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config.prototype.init = function(owner) {
-
-	this.owner = owner;
-
-	/**
-	* Object reference to the owner of this Config Object
-	* @event configChangedEvent
-	*/
-	this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
-
-	this.queueInProgress = false;
-
-	/* Private Members */
-
-	/**
-	* Maintains the local collection of configuration property objects and their specified values
-	* @property config
-	* @private
-	* @type Object
-	*/
-	var config = {};
-
-	/**
-	* Maintains the local collection of configuration property objects as they were initially applied.
-	* This object is used when resetting a property.
-	* @property initialConfig
-	* @private
-	* @type Object
-	*/
-	var initialConfig = {};
-
-	/**
-	* Maintains the local, normalized CustomEvent queue
-	* @property eventQueue
-	* @private
-	* @type Object
-	*/
-	var eventQueue = [];
-
-	/**
-	* Fires a configuration property event using the specified value.
-	* @method fireEvent
-	* @private
-	* @param {String}	key			The configuration property's name
-	* @param {value}	Object		The value of the correct type for the property
-	*/
-	var fireEvent = function( key, value ) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-
-		if (typeof property != 'undefined' && property.event) {
-			property.event.fire(value);
-		}
-	};
-	/* End Private Members */
-
-	/**
-	* Adds a property to the Config Object's private config hash.
-	* @method addProperty
-	* @param {String}	key	The configuration property's name
-	* @param {Object}	propertyObject	The Object containing all of this property's arguments
-	*/
-	this.addProperty = function( key, propertyObject ) {
-		key = key.toLowerCase();
-
-		config[key] = propertyObject;
-
-		propertyObject.event = new YAHOO.util.CustomEvent(key);
-		propertyObject.key = key;
-
-		if (propertyObject.handler) {
-			propertyObject.event.subscribe(propertyObject.handler, this.owner, true);
-		}
-
-		this.setProperty(key, propertyObject.value, true);
-
-		if (! propertyObject.suppressEvent) {
-			this.queueProperty(key, propertyObject.value);
-		}
-	};
-
-	/**
-	* Returns a key-value configuration map of the values currently set in the Config Object.
-	* @method getConfig
-	* @return {Object} The current config, represented in a key-value map
-	*/
-	this.getConfig = function() {
-		var cfg = {};
-
-		for (var prop in config) {
-			var property = config[prop];
-			if (typeof property != 'undefined' && property.event) {
-				cfg[prop] = property.value;
-			}
-		}
-
-		return cfg;
-	};
-
-	/**
-	* Returns the value of specified property.
-	* @method getProperty
-	* @param {String} key	The name of the property
-	* @return {Object}		The value of the specified property
-	*/
-	this.getProperty = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			return property.value;
-		} else {
-			return undefined;
-		}
-	};
-
-	/**
-	* Resets the specified property's value to its initial value.
-	* @method resetProperty
-	* @param {String} key	The name of the property
-	* @return {Boolean} True is the property was reset, false if not
-	*/
-	this.resetProperty = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			if (initialConfig[key] && initialConfig[key] != 'undefined')	{
-				this.setProperty(key, initialConfig[key]);
-			}
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
-	* @method setProperty
-	* @param {String} key		The name of the property
-	* @param {String} value		The value to set the property to
-	* @param {Boolean} silent	Whether the value should be set silently, without firing the property event.
-	* @return {Boolean}			True, if the set was successful, false if it failed.
-	*/
-	this.setProperty = function(key, value, silent) {
-		key = key.toLowerCase();
-
-		if (this.queueInProgress && ! silent) {
-			this.queueProperty(key,value); // Currently running through a queue...
-			return true;
-		} else {
-			var property = config[key];
-			if (typeof property != 'undefined' && property.event) {
-				if (property.validator && ! property.validator(value)) { // validator
-					return false;
-				} else {
-					property.value = value;
-					if (! silent) {
-						fireEvent(key, value);
-						this.configChangedEvent.fire([key, value]);
-					}
-					return true;
-				}
-			} else {
-				return false;
-			}
-		}
-	};
-
-	/**
-	* Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
-	* moved from its current position to the end of the queue.
-	* @method queueProperty
-	* @param {String} key	The name of the property
-	* @param {String} value	The value to set the property to
-	* @return {Boolean}		true, if the set was successful, false if it failed.
-	*/
-	this.queueProperty = function(key, value) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-
-		if (typeof property != 'undefined' && property.event) {
-			if (typeof value != 'undefined' && property.validator && ! property.validator(value)) { // validator
-				return false;
-			} else {
-
-				if (typeof value != 'undefined') {
-					property.value = value;
-				} else {
-					value = property.value;
-				}
-
-				var foundDuplicate = false;
-
-				for (var i=0;i<eventQueue.length;i++) {
-					var queueItem = eventQueue[i];
-
-					if (queueItem) {
-						var queueItemKey = queueItem[0];
-						var queueItemValue = queueItem[1];
-
-						if (queueItemKey.toLowerCase() == key) {
-							// found a dupe... push to end of queue, null current item, and break
-							eventQueue[i] = null;
-							eventQueue.push([key, (typeof value != 'undefined' ? value : queueItemValue)]);
-							foundDuplicate = true;
-							break;
-						}
-					}
-				}
-
-				if (! foundDuplicate && typeof value != 'undefined') { // this is a refire, or a new property in the queue
-					eventQueue.push([key, value]);
-				}
-			}
-
-			if (property.supercedes) {
-				for (var s=0;s<property.supercedes.length;s++) {
-					var supercedesCheck = property.supercedes[s];
-
-					for (var q=0;q<eventQueue.length;q++) {
-						var queueItemCheck = eventQueue[q];
-
-						if (queueItemCheck) {
-							var queueItemCheckKey = queueItemCheck[0];
-							var queueItemCheckValue = queueItemCheck[1];
-
-							if ( queueItemCheckKey.toLowerCase() == supercedesCheck.toLowerCase() ) {
-								eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
-								eventQueue[q] = null;
-								break;
-							}
-						}
-					}
-				}
-			}
-
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Fires the event for a property using the property's current value.
-	* @method refireEvent
-	* @param {String} key	The name of the property
-	*/
-	this.refireEvent = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event && typeof property.value != 'undefined') {
-			if (this.queueInProgress) {
-				this.queueProperty(key);
-			} else {
-				fireEvent(key, property.value);
-			}
-		}
-	};
-
-	/**
-	* Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
-	* Although the values will be set, fireQueue() must be called for their associated events to execute.
-	* @method applyConfig
-	* @param {Object}	userConfig	The configuration Object literal
-	* @param {Boolean}	init		When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.
-	*/
-	this.applyConfig = function(userConfig, init) {
-		if (init) {
-			initialConfig = userConfig;
-		}
-		for (var prop in userConfig) {
-			this.queueProperty(prop, userConfig[prop]);
-		}
-	};
-
-	/**
-	* Refires the events for all configuration properties using their current values.
-	* @method refresh
-	*/
-	this.refresh = function() {
-		for (var prop in config) {
-			this.refireEvent(prop);
-		}
-	};
-
-	/**
-	* Fires the normalized list of queued property change events
-	* @method fireQueue
-	*/
-	this.fireQueue = function() {
-		this.queueInProgress = true;
-		for (var i=0;i<eventQueue.length;i++) {
-			var queueItem = eventQueue[i];
-			if (queueItem) {
-				var key = queueItem[0];
-				var value = queueItem[1];
-
-				var property = config[key];
-				property.value = value;
-
-				fireEvent(key,value);
-			}
-		}
-
-		this.queueInProgress = false;
-		eventQueue = [];
-	};
-
-	/**
-	* Subscribes an external handler to the change event for any given property.
-	* @method subscribeToConfigEvent
-	* @param {String}	key			The property name
-	* @param {Function}	handler		The handler function to use subscribe to the property's event
-	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
-	* @param {Boolean}	override	Optional. If true, will override "this" within the handler to map to the scope Object passed into the method.
-	* @return {Boolean}				True, if the subscription was successful, otherwise false.
-	*/
-	this.subscribeToConfigEvent = function(key, handler, obj, override) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			if (! YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
-				property.event.subscribe(handler, obj, override);
-			}
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Unsubscribes an external handler from the change event for any given property.
-	* @method unsubscribeFromConfigEvent
-	* @param {String}	key			The property name
-	* @param {Function}	handler		The handler function to use subscribe to the property's event
-	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
-	* @return {Boolean}				True, if the unsubscription was successful, otherwise false.
-	*/
-	this.unsubscribeFromConfigEvent = function(key, handler, obj) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			return property.event.unsubscribe(handler, obj);
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Returns a string representation of the Config object
-	* @method toString
-	* @return {String}	The Config object in string format.
-	*/
-	this.toString = function() {
-		var output = "Config";
-		if (this.owner) {
-			output += " [" + this.owner.toString() + "]";
-		}
-		return output;
-	};
-
-	/**
-	* Returns a string representation of the Config object's current CustomEvent queue
-	* @method outputEventQueue
-	* @return {String}	The string list of CustomEvents currently queued for execution
-	*/
-	this.outputEventQueue = function() {
-		var output = "";
-		for (var q=0;q<eventQueue.length;q++) {
-			var queueItem = eventQueue[q];
-			if (queueItem) {
-				output += queueItem[0] + "=" + queueItem[1] + ", ";
-			}
-		}
-		return output;
-	};
-};
-
-/**
-* Checks to determine if a particular function/Object pair are already subscribed to the specified CustomEvent
-* @method YAHOO.util.Config.alreadySubscribed
-* @static
-* @param {YAHOO.util.CustomEvent} evt	The CustomEvent for which to check the subscriptions
-* @param {Function}	fn	The function to look for in the subscribers list
-* @param {Object}	obj	The execution scope Object for the subscription
-* @return {Boolean}	true, if the function/Object pair is already subscribed to the CustomEvent passed in
-*/
-YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
-	for (var e=0;e<evt.subscribers.length;e++) {
-		var subsc = evt.subscribers[e];
-		if (subsc && subsc.obj == obj && subsc.fn == fn) {
-			return true;
-		}
-	}
-	return false;
-};
-
-/**
-* YAHOO.widget.DateMath is used for simple date manipulation. The class is a static utility
-* used for adding, subtracting, and comparing dates.
-* @class YAHOO.widget.DateMath
-*/
-YAHOO.widget.DateMath = {
-	/**
-	* Constant field representing Day
-	* @property DAY
-	* @static
-	* @final
-	* @type String
-	*/
-	DAY : "D",
-
-	/**
-	* Constant field representing Week
-	* @property WEEK
-	* @static
-	* @final
-	* @type String
-	*/
-	WEEK : "W",
-
-	/**
-	* Constant field representing Year
-	* @property YEAR
-	* @static
-	* @final
-	* @type String
-	*/
-	YEAR : "Y",
-
-	/**
-	* Constant field representing Month
-	* @property MONTH
-	* @static
-	* @final
-	* @type String
-	*/
-	MONTH : "M",
-
-	/**
-	* Constant field representing one day, in milliseconds
-	* @property ONE_DAY_MS
-	* @static
-	* @final
-	* @type Number
-	*/
-	ONE_DAY_MS : 1000*60*60*24,
-
-	/**
-	* Adds the specified amount of time to the this instance.
-	* @method add
-	* @param {Date} date	The JavaScript Date object to perform addition on
-	* @param {String} field	The field constant to be used for performing addition.
-	* @param {Number} amount	The number of units (measured in the field constant) to add to the date.
-	* @return {Date} The resulting Date object
-	*/
-	add : function(date, field, amount) {
-		var d = new Date(date.getTime());
-		switch (field) {
-			case this.MONTH:
-				var newMonth = date.getMonth() + amount;
-				var years = 0;
-
-
-				if (newMonth < 0) {
-					while (newMonth < 0) {
-						newMonth += 12;
-						years -= 1;
-					}
-				} else if (newMonth > 11) {
-					while (newMonth > 11) {
-						newMonth -= 12;
-						years += 1;
-					}
-				}
-
-				d.setMonth(newMonth);
-				d.setFullYear(date.getFullYear() + years);
-				break;
-			case this.DAY:
-				d.setDate(date.getDate() + amount);
-				break;
-			case this.YEAR:
-				d.setFullYear(date.getFullYear() + amount);
-				break;
-			case this.WEEK:
-				d.setDate(date.getDate() + (amount * 7));
-				break;
-		}
-		return d;
-	},
-
-	/**
-	* Subtracts the specified amount of time from the this instance.
-	* @method subtract
-	* @param {Date} date	The JavaScript Date object to perform subtraction on
-	* @param {Number} field	The this field constant to be used for performing subtraction.
-	* @param {Number} amount	The number of units (measured in the field constant) to subtract from the date.
-	* @return {Date} The resulting Date object
-	*/
-	subtract : function(date, field, amount) {
-		return this.add(date, field, (amount*-1));
-	},
-
-	/**
-	* Determines whether a given date is before another date on the calendar.
-	* @method before
-	* @param {Date} date		The Date object to compare with the compare argument
-	* @param {Date} compareTo	The Date object to use for the comparison
-	* @return {Boolean} true if the date occurs before the compared date; false if not.
-	*/
-	before : function(date, compareTo) {
-		var ms = compareTo.getTime();
-		if (date.getTime() < ms) {
-			return true;
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Determines whether a given date is after another date on the calendar.
-	* @method after
-	* @param {Date} date		The Date object to compare with the compare argument
-	* @param {Date} compareTo	The Date object to use for the comparison
-	* @return {Boolean} true if the date occurs after the compared date; false if not.
-	*/
-	after : function(date, compareTo) {
-		var ms = compareTo.getTime();
-		if (date.getTime() > ms) {
-			return true;
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Determines whether a given date is between two other dates on the calendar.
-	* @method between
-	* @param {Date} date		The date to check for
-	* @param {Date} dateBegin	The start of the range
-	* @param {Date} dateEnd		The end of the range
-	* @return {Boolean} true if the date occurs between the compared dates; false if not.
-	*/
-	between : function(date, dateBegin, dateEnd) {
-		if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
-			return true;
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Retrieves a JavaScript Date object representing January 1 of any given year.
-	* @method getJan1
-	* @param {Number} calendarYear		The calendar year for which to retrieve January 1
-	* @return {Date}	January 1 of the calendar year specified.
-	*/
-	getJan1 : function(calendarYear) {
-		return new Date(calendarYear,0,1);
-	},
-
-	/**
-	* Calculates the number of days the specified date is from January 1 of the specified calendar year.
-	* Passing January 1 to this function would return an offset value of zero.
-	* @method getDayOffset
-	* @param {Date}	date	The JavaScript date for which to find the offset
-	* @param {Number} calendarYear	The calendar year to use for determining the offset
-	* @return {Number}	The number of days since January 1 of the given year
-	*/
-	getDayOffset : function(date, calendarYear) {
-		var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
-
-		// Find the number of days the passed in date is away from the calendar year start
-		var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
-		return dayOffset;
-	},
-
-	/**
-	* Calculates the week number for the given date. This function assumes that week 1 is the
-	* week in which January 1 appears, regardless of whether the week consists of a full 7 days.
-	* The calendar year can be specified to help find what a the week number would be for a given
-	* date if the date overlaps years. For instance, a week may be considered week 1 of 2005, or
-	* week 53 of 2004. Specifying the optional calendarYear allows one to make this distinction
-	* easily.
-	* @method getWeekNumber
-	* @param {Date}	date	The JavaScript date for which to find the week number
-	* @param {Number} calendarYear	OPTIONAL - The calendar year to use for determining the week number. Default is
-	*											the calendar year of parameter "date".
-	* @param {Number} weekStartsOn	OPTIONAL - The integer (0-6) representing which day a week begins on. Default is 0 (for Sunday).
-	* @return {Number}	The week number of the given date.
-	*/
-	getWeekNumber : function(date, calendarYear) {
-		date = this.clearTime(date);
-		var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
-
-		var jan1 = new Date(nearestThurs.getFullYear(),0,1);
-		var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
-
-		var weekNum = Math.ceil((dayOfYear)/ 7);
-		return weekNum;
-	},
-
-	/**
-	* Determines if a given week overlaps two different years.
-	* @method isYearOverlapWeek
-	* @param {Date}	weekBeginDate	The JavaScript Date representing the first day of the week.
-	* @return {Boolean}	true if the date overlaps two different years.
-	*/
-	isYearOverlapWeek : function(weekBeginDate) {
-		var overlaps = false;
-		var nextWeek = this.add(weekBeginDate, this.DAY, 6);
-		if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
-			overlaps = true;
-		}
-		return overlaps;
-	},
-
-	/**
-	* Determines if a given week overlaps two different months.
-	* @method isMonthOverlapWeek
-	* @param {Date}	weekBeginDate	The JavaScript Date representing the first day of the week.
-	* @return {Boolean}	true if the date overlaps two different months.
-	*/
-	isMonthOverlapWeek : function(weekBeginDate) {
-		var overlaps = false;
-		var nextWeek = this.add(weekBeginDate, this.DAY, 6);
-		if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
-			overlaps = true;
-		}
-		return overlaps;
-	},
-
-	/**
-	* Gets the first day of a month containing a given date.
-	* @method findMonthStart
-	* @param {Date}	date	The JavaScript Date used to calculate the month start
-	* @return {Date}		The JavaScript Date representing the first day of the month
-	*/
-	findMonthStart : function(date) {
-		var start = new Date(date.getFullYear(), date.getMonth(), 1);
-		return start;
-	},
-
-	/**
-	* Gets the last day of a month containing a given date.
-	* @method findMonthEnd
-	* @param {Date}	date	The JavaScript Date used to calculate the month end
-	* @return {Date}		The JavaScript Date representing the last day of the month
-	*/
-	findMonthEnd : function(date) {
-		var start = this.findMonthStart(date);
-		var nextMonth = this.add(start, this.MONTH, 1);
-		var end = this.subtract(nextMonth, this.DAY, 1);
-		return end;
-	},
-
-	/**
-	* Clears the time fields from a given date, effectively setting the time to midnight.
-	* @method clearTime
-	* @param {Date}	date	The JavaScript Date for which the time fields will be cleared
-	* @return {Date}		The JavaScript Date cleared of all time fields
-	*/
-	clearTime : function(date) {
-		date.setHours(12,0,0,0);
-		return date;
-	}
-};
-
-/**
-* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month ("one-up") or two-month ("two-up") interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
-* @module    Calendar
-* @title     Calendar Widget
-* @namespace YAHOO.widget
-* @requires  yahoo,dom,event
-*/
-
-/**
-* Calendar is the base class for the Calendar widget. In its most basic
-* implementation, it has the ability to render a calendar widget on the page
-* that can be manipulated to select a single date, move back and forth between
-* months and years.
-* <p>To construct the placeholder for the calendar widget, the code is as
-* follows:
-*	<xmp>
-*		<div id="cal1Container"></div>
-*	</xmp>
-* Note that the table can be replaced with any kind of element.
-* </p>
-* @namespace YAHOO.widget
-* @class Calendar
-* @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar = function(id, containerId, config) {
-	this.init(id, containerId, config);
-};
-
-/**
-* The path to be used for images loaded for the Calendar
-* @property YAHOO.widget.Calendar.IMG_ROOT
-* @static
-* @type String
-*/
-YAHOO.widget.Calendar.IMG_ROOT = (window.location.href.toLowerCase().indexOf("https") === 0 ? "https://a248.e.akamai.net/sec.yimg.com/i/" : "http://us.i1.yimg.com/us.yimg.com/i/");
-
-/**
-* Type constant used for renderers to represent an individual date (M/D/Y)
-* @property YAHOO.widget.Calendar.DATE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.DATE = "D";
-
-/**
-* Type constant used for renderers to represent an individual date across any year (M/D)
-* @property YAHOO.widget.Calendar.MONTH_DAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.MONTH_DAY = "MD";
-
-/**
-* Type constant used for renderers to represent a weekday
-* @property YAHOO.widget.Calendar.WEEKDAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.WEEKDAY = "WD";
-
-/**
-* Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
-* @property YAHOO.widget.Calendar.RANGE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.RANGE = "R";
-
-/**
-* Type constant used for renderers to represent a month across any year
-* @property YAHOO.widget.Calendar.MONTH
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.MONTH = "M";
-
-/**
-* Constant that represents the total number of date cells that are displayed in a given month
-* @property YAHOO.widget.Calendar.DISPLAY_DAYS
-* @static
-* @final
-* @type Number
-*/
-YAHOO.widget.Calendar.DISPLAY_DAYS = 42;
-
-/**
-* Constant used for halting the execution of the remainder of the render stack
-* @property YAHOO.widget.Calendar.STOP_RENDER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.STOP_RENDER = "S";
-
-YAHOO.widget.Calendar.prototype = {
-
-	/**
-	* The configuration object used to set up the calendars various locale and style options.
-	* @property Config
-	* @private
-	* @deprecated Configuration properties should be set by calling Calendar.cfg.setProperty.
-	* @type Object
-	*/
-	Config : null,
-
-	/**
-	* The parent CalendarGroup, only to be set explicitly by the parent group
-	* @property parent
-	* @type CalendarGroup
-	*/
-	parent : null,
-
-	/**
-	* The index of this item in the parent group
-	* @property index
-	* @type Number
-	*/
-	index : -1,
-
-	/**
-	* The collection of calendar table cells
-	* @property cells
-	* @type HTMLTableCellElement[]
-	*/
-	cells : null,
-
-	/**
-	* The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
-	* @property cellDates
-	* @type Array[](Number[])
-	*/
-	cellDates : null,
-
-	/**
-	* The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
-	* @property id
-	* @type String
-	*/
-	id : null,
-
-	/**
-	* The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
-	* @property oDomContainer
-	* @type HTMLElement
-	*/
-	oDomContainer : null,
-
-	/**
-	* A Date object representing today's date.
-	* @property today
-	* @type Date
-	*/
-	today : null,
-
-	/**
-	* The list of render functions, along with required parameters, used to render cells.
-	* @property renderStack
-	* @type Array[]
-	*/
-	renderStack : null,
-
-	/**
-	* A copy of the initial render functions created before rendering.
-	* @property _renderStack
-	* @private
-	* @type Array
-	*/
-	_renderStack : null,
-
-	/**
-	* A Date object representing the month/year that the calendar is initially set to
-	* @property _pageDate
-	* @private
-	* @type Date
-	*/
-	_pageDate : null,
-
-	/**
-	* The private list of initially selected dates.
-	* @property _selectedDates
-	* @private
-	* @type Array
-	*/
-	_selectedDates : null,
-
-	/**
-	* A map of DOM event handlers to attach to cells associated with specific CSS class names
-	* @property domEventMap
-	* @type Object
-	*/
-	domEventMap : null
-};
-
-
-
-/**
-* Initializes the Calendar widget.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
-	this.initEvents();
-	this.today = new Date();
-	YAHOO.widget.DateMath.clearTime(this.today);
-
-	this.id = id;
-	this.oDomContainer = document.getElementById(containerId);
-
-	/**
-	* The Config object used to hold the configuration variables for the Calendar
-	* @property cfg
-	* @type YAHOO.util.Config
-	*/
-	this.cfg = new YAHOO.util.Config(this);
-
-	/**
-	* The local object which contains the Calendar's options
-	* @property Options
-	* @type Object
-	*/
-	this.Options = {};
-
-	/**
-	* The local object which contains the Calendar's locale settings
-	* @property Locale
-	* @type Object
-	*/
-	this.Locale = {};
-
-	this.initStyles();
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
-
-	this.cellDates = [];
-	this.cells = [];
-	this.renderStack = [];
-	this._renderStack = [];
-
-	this.setupConfig();
-
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-
-	this.cfg.fireQueue();
-};
-
-/**
-* Renders the built-in IFRAME shim for the IE6 and below
-* @method configIframe
-*/
-YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
-	var useIframe = args[0];
-
-	if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
-		if (useIframe) {
-			var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
-
-			if (this.browser == "ie" && (pos == "absolute" || pos == "relative")) {
-				if (! YAHOO.util.Dom.inDocument(this.iframe)) {
-					this.iframe = document.createElement("iframe");
-					this.iframe.src = "javascript:false;";
-					YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
-					this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
-				}
-			}
-		} else {
-			if (this.iframe) {
-				if (this.iframe.parentNode) {
-					this.iframe.parentNode.removeChild(this.iframe);
-				}
-				this.iframe = null;
-			}
-		}
-	}
-};
-
-/**
-* Default handler for the "title" property
-* @method configTitle
-*/
-YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
-	var title = args[0];
-	var close = this.cfg.getProperty("close");
-
-	var titleDiv;
-
-	if (title && title !== "") {
-		titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
-		titleDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
-		titleDiv.innerHTML = title;
-		this.oDomContainer.insertBefore(titleDiv, this.oDomContainer.firstChild);
-		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
-	} else {
-		titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
-
-		if (titleDiv) {
-			YAHOO.util.Event.purgeElement(titleDiv);
-			this.oDomContainer.removeChild(titleDiv);
-		}
-		if (! close) {
-			YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
-		}
-	}
-};
-
-/**
-* Default handler for the "close" property
-* @method configClose
-*/
-YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
-	var close = args[0];
-	var title = this.cfg.getProperty("title");
-
-	var linkClose;
-
-	if (close === true) {
-		linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || document.createElement("a");
-		linkClose.href = "javascript:void(null);";
-		linkClose.className = "link-close";
-		YAHOO.util.Event.addListener(linkClose, "click", this.hide, this, true);
-		var imgClose = document.createElement("img");
-		imgClose.src = YAHOO.widget.Calendar.IMG_ROOT + "us/my/bn/x_d.gif";
-		imgClose.className = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE;
-		linkClose.appendChild(imgClose);
-		this.oDomContainer.appendChild(linkClose);
-		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
-	} else {
-		linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
-
-		if (linkClose) {
-			YAHOO.util.Event.purgeElement(linkClose);
-			this.oDomContainer.removeChild(linkClose);
-		}
-		if (! title || title === "") {
-			YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
-		}
-	}
-};
-
-/**
-* Initializes Calendar's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.Calendar.prototype.initEvents = function() {
-
-	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
-	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent("beforeSelect");
-
-	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.selectEvent = new YAHOO.util.CustomEvent("select");
-
-	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
-	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent("beforeDeselect");
-
-	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent("deselect");
-
-	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
-	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent("changePage");
-
-	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
-	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
-
-	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
-	*/
-	this.renderEvent = new YAHOO.util.CustomEvent("render");
-
-	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
-	*/
-	this.resetEvent = new YAHOO.util.CustomEvent("reset");
-
-	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
-	*/
-	this.clearEvent = new YAHOO.util.CustomEvent("clear");
-
-	this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
-	this.selectEvent.subscribe(this.onSelect, this, true);
-	this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
-	this.deselectEvent.subscribe(this.onDeselect, this, true);
-	this.changePageEvent.subscribe(this.onChangePage, this, true);
-	this.renderEvent.subscribe(this.onRender, this, true);
-	this.resetEvent.subscribe(this.onReset, this, true);
-	this.clearEvent.subscribe(this.onClear, this, true);
-};
-
-
-/**
-* The default event function that is attached to a date link within a calendar cell
-* when the calendar is rendered.
-* @method doSelectCell
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
-	var target = YAHOO.util.Event.getTarget(e);
-
-	var cell,index,d,date;
-
-	while (target.tagName.toLowerCase() != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
-		}
-	}
-
-	cell = target;
-
-	if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
-		index = cell.id.split("cell")[1];
-		d = cal.cellDates[index];
-		date = new Date(d[0],d[1]-1,d[2]);
-
-		var link;
-
-		if (cal.Options.MULTI_SELECT) {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
-
-			var cellDate = cal.cellDates[index];
-			var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
-
-			if (cellDateIndex > -1) {
-				cal.deselectCell(index);
-			} else {
-				cal.selectCell(index);
-			}
-
-		} else {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
-			cal.selectCell(index);
-		}
-	}
-};
-
-/**
-* The event that is executed when the user hovers over a cell
-* @method doCellMouseOver
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
-
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
-		}
-	}
-
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
-
-/**
-* The event that is executed when the user moves the mouse out of a cell
-* @method doCellMouseOut
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
-
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
-		}
-	}
-
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
-
-YAHOO.widget.Calendar.prototype.setupConfig = function() {
-
-	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
-	*/
-	this.cfg.addProperty("pagedate", { value:new Date(), handler:this.configPageDate } );
-
-	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
-	*/
-	this.cfg.addProperty("selected", { value:[], handler:this.configSelected } );
-
-	/**
-	* The title to display above the Calendar's month header
-	* @config title
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
-
-	/**
-	* Whether or not a close button should be displayed for this Calendar
-	* @config close
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("close", { value:false, handler:this.configClose } );
-
-	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* @config iframe
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("iframe", { value:true, handler:this.configIframe, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("mindate", { value:null, handler:this.configMinDate } );
-
-	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("maxdate", { value:null, handler:this.configMaxDate } );
-
-
-	// Options properties
-
-	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("MULTI_SELECT",	{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-    /**
-    * True if the Calendar should allow selection of out-of-month dates. False by default.
-    * @config OOM_SELECT
-    * @type Boolean
-    * @default false
-    */
-    this.cfg.addProperty("OOM_SELECT",      { value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/
-	this.cfg.addProperty("START_WEEKDAY",	{ value:0, handler:this.configOptions, validator:this.cfg.checkNumber  } );
-
-	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("SHOW_WEEKDAYS",	{ value:true, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
-
-	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
-	*/
-	this.cfg.addProperty("NAV_ARROW_LEFT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.configOptions } );
-
-	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
-	*/
-	this.cfg.addProperty("NAV_ARROW_RIGHT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.configOptions } );
-
-	// Locale properties
-
-	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
-	*/
-	this.cfg.addProperty("MONTHS_SHORT",	{ value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], handler:this.configLocale } );
-
-	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/
-	this.cfg.addProperty("MONTHS_LONG",		{ value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], handler:this.configLocale } );
-
-	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_1CHAR",	{ value:["S", "M", "T", "W", "T", "F", "S"], handler:this.configLocale } );
-
-	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_SHORT",	{ value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], handler:this.configLocale } );
-
-	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_MEDIUM",	{ value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], handler:this.configLocale } );
-
-	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_LONG",	{ value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], handler:this.configLocale } );
-
-	/**
-	* Refreshes the locale values used to build the Calendar.
-	* @method refreshLocale
-	* @private
-	*/
-	var refreshLocale = function() {
-		this.cfg.refireEvent("LOCALE_MONTHS");
-		this.cfg.refireEvent("LOCALE_WEEKDAYS");
-	};
-
-	this.cfg.subscribeToConfigEvent("START_WEEKDAY", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("MONTHS_SHORT", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("MONTHS_LONG", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("WEEKDAYS_1CHAR", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("WEEKDAYS_SHORT", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("WEEKDAYS_MEDIUM", refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent("WEEKDAYS_LONG", refreshLocale, this, true);
-
-	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
-	*/
-	this.cfg.addProperty("LOCALE_MONTHS",	{ value:"long", handler:this.configLocaleValues } );
-
-	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/
-	this.cfg.addProperty("LOCALE_WEEKDAYS",	{ value:"short", handler:this.configLocaleValues } );
-
-	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
-	*/
-	this.cfg.addProperty("DATE_DELIMITER",		{ value:",", handler:this.configLocale } );
-
-	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/
-	this.cfg.addProperty("DATE_FIELD_DELIMITER",{ value:"/", handler:this.configLocale } );
-
-	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
-	*/
-	this.cfg.addProperty("DATE_RANGE_DELIMITER",{ value:"-", handler:this.configLocale } );
-
-	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MY_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MY_YEAR_POSITION",	{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MD_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MD_DAY_POSITION",		{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MDY_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MDY_DAY_POSITION",	{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/
-	this.cfg.addProperty("MDY_YEAR_POSITION",	{ value:3, handler:this.configLocale, validator:this.cfg.checkNumber } );
-};
-
-/**
-* The default handler for the "pagedate" property
-* @method configPageDate
-*/
-YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
-	var val = args[0];
-	var month, year, aMonthYear;
-
-	if (val) {
-		if (val instanceof Date) {
-			val = YAHOO.widget.DateMath.findMonthStart(val);
-			this.cfg.setProperty("pagedate", val, true);
-			if (! this._pageDate) {
-				this._pageDate = this.cfg.getProperty("pagedate");
-			}
-			return;
-		} else {
-			aMonthYear = val.split(this.cfg.getProperty("DATE_FIELD_DELIMITER"));
-			month = parseInt(aMonthYear[this.cfg.getProperty("MY_MONTH_POSITION")-1], 10)-1;
-			year = parseInt(aMonthYear[this.cfg.getProperty("MY_YEAR_POSITION")-1], 10);
-		}
-	} else {
-		month = this.today.getMonth();
-		year = this.today.getFullYear();
-	}
-
-	this.cfg.setProperty("pagedate", new Date(year, month, 1), true);
-	if (! this._pageDate) {
-		this._pageDate = this.cfg.getProperty("pagedate");
-	}
-};
-
-/**
-* The default handler for the "mindate" property
-* @method configMinDate
-*/
-YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
-	var val = args[0];
-	if (typeof val == 'string') {
-		val = this._parseDate(val);
-		this.cfg.setProperty("mindate", new Date(val[0],(val[1]-1),val[2]));
-	}
-};
-
-/**
-* The default handler for the "maxdate" property
-* @method configMaxDate
-*/
-YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
-	var val = args[0];
-	if (typeof val == 'string') {
-		val = this._parseDate(val);
-		this.cfg.setProperty("maxdate", new Date(val[0],(val[1]-1),val[2]));
-	}
-};
-
-/**
-* The default handler for the "selected" property
-* @method configSelected
-*/
-YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
-	var selected = args[0];
-
-	if (selected) {
-		if (typeof selected == 'string') {
-			this.cfg.setProperty("selected", this._parseDates(selected), true);
-		}
-	}
-	if (! this._selectedDates) {
-		this._selectedDates = this.cfg.getProperty("selected");
-	}
-};
-
-/**
-* The default handler for all configuration options properties
-* @method configOptions
-*/
-YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
-	type = type.toUpperCase();
-	var val = args[0];
-	this.Options[type] = val;
-};
-
-/**
-* The default handler for all configuration locale properties
-* @method configLocale
-*/
-YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
-	type = type.toUpperCase();
-	var val = args[0];
-	this.Locale[type] = val;
-
-	this.cfg.refireEvent("LOCALE_MONTHS");
-	this.cfg.refireEvent("LOCALE_WEEKDAYS");
-
-};
-
-/**
-* The default handler for all configuration locale field length properties
-* @method configLocaleValues
-*/
-YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
-	type = type.toUpperCase();
-	var val = args[0];
-
-	switch (type) {
-		case "LOCALE_MONTHS":
-			switch (val) {
-				case "short":
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_SHORT").concat();
-					break;
-				case "long":
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_LONG").concat();
-					break;
-			}
-			break;
-		case "LOCALE_WEEKDAYS":
-			switch (val) {
-				case "1char":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_1CHAR").concat();
-					break;
-				case "short":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_SHORT").concat();
-					break;
-				case "medium":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_MEDIUM").concat();
-					break;
-				case "long":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_LONG").concat();
-					break;
-			}
-
-			var START_WEEKDAY = this.cfg.getProperty("START_WEEKDAY");
-
-			if (START_WEEKDAY > 0) {
-				for (var w=0;w<START_WEEKDAY;++w) {
-					this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
-				}
-			}
-			break;
-	}
-};
-
-/**
-* Defines the style constants for the Calendar
-* @method initStyles
-*/
-YAHOO.widget.Calendar.prototype.initStyles = function() {
-
-	/**
-	* Collection of Style constants for the Calendar
-	* @property Style
-	*/
-	this.Style = {
-		/**
-		* @property Style.CSS_ROW_HEADER
-		*/
-		CSS_ROW_HEADER: "calrowhead",
-		/**
-		* @property Style.CSS_ROW_FOOTER
-		*/
-		CSS_ROW_FOOTER: "calrowfoot",
-		/**
-		* @property Style.CSS_CELL
-		*/
-		CSS_CELL : "calcell",
-		/**
-		* @property Style.CSS_CELL_SELECTED
-		*/
-		CSS_CELL_SELECTED : "selected",
-		/**
-		* @property Style.CSS_CELL_SELECTABLE
-		*/
-		CSS_CELL_SELECTABLE : "selectable",
-		/**
-		* @property Style.CSS_CELL_RESTRICTED
-		*/
-		CSS_CELL_RESTRICTED : "restricted",
-		/**
-		* @property Style.CSS_CELL_TODAY
-		*/
-		CSS_CELL_TODAY : "today",
-		/**
-		* @property Style.CSS_CELL_OOM
-		*/
-		CSS_CELL_OOM : "oom",
-		/**
-		* @property Style.CSS_CELL_OOB
-		*/
-		CSS_CELL_OOB : "previous",
-		/**
-		* @property Style.CSS_HEADER
-		*/
-		CSS_HEADER : "calheader",
-		/**
-		* @property Style.CSS_HEADER_TEXT
-		*/
-		CSS_HEADER_TEXT : "calhead",
-		/**
-		* @property Style.CSS_WEEKDAY_CELL
-		*/
-		CSS_WEEKDAY_CELL : "calweekdaycell",
-		/**
-		* @property Style.CSS_WEEKDAY_ROW
-		*/
-		CSS_WEEKDAY_ROW : "calweekdayrow",
-		/**
-		* @property Style.CSS_FOOTER
-		*/
-		CSS_FOOTER : "calfoot",
-		/**
-		* @property Style.CSS_CALENDAR
-		*/
-		CSS_CALENDAR : "yui-calendar",
-		/**
-		* @property Style.CSS_SINGLE
-		*/
-		CSS_SINGLE : "single",
-		/**
-		* @property Style.CSS_CONTAINER
-		*/
-		CSS_CONTAINER : "yui-calcontainer",
-		/**
-		* @property Style.CSS_NAV_LEFT
-		*/
-		CSS_NAV_LEFT : "calnavleft",
-		/**
-		* @property Style.CSS_NAV_RIGHT
-		*/
-		CSS_NAV_RIGHT : "calnavright",
-		/**
-		* @property Style.CSS_CELL_TOP
-		*/
-		CSS_CELL_TOP : "calcelltop",
-		/**
-		* @property Style.CSS_CELL_LEFT
-		*/
-		CSS_CELL_LEFT : "calcellleft",
-		/**
-		* @property Style.CSS_CELL_RIGHT
-		*/
-		CSS_CELL_RIGHT : "calcellright",
-		/**
-		* @property Style.CSS_CELL_BOTTOM
-		*/
-		CSS_CELL_BOTTOM : "calcellbottom",
-		/**
-		* @property Style.CSS_CELL_HOVER
-		*/
-		CSS_CELL_HOVER : "calcellhover",
-		/**
-		* @property Style.CSS_CELL_HIGHLIGHT1
-		*/
-		CSS_CELL_HIGHLIGHT1 : "highlight1",
-		/**
-		* @property Style.CSS_CELL_HIGHLIGHT2
-		*/
-		CSS_CELL_HIGHLIGHT2 : "highlight2",
-		/**
-		* @property Style.CSS_CELL_HIGHLIGHT3
-		*/
-		CSS_CELL_HIGHLIGHT3 : "highlight3",
-		/**
-		* @property Style.CSS_CELL_HIGHLIGHT4
-		*/
-		CSS_CELL_HIGHLIGHT4 : "highlight4"
-	};
-};
-
-/**
-* Builds the date label that will be displayed in the calendar header or
-* footer, depending on configuration.
-* @method buildMonthLabel
-* @return	{String}	The formatted calendar month label
-*/
-YAHOO.widget.Calendar.prototype.buildMonthLabel = function() {
-	var text = this.Locale.LOCALE_MONTHS[this.cfg.getProperty("pagedate").getMonth()] + " " + this.cfg.getProperty("pagedate").getFullYear();
-	return text;
-};
-
-/**
-* Builds the date digit that will be displayed in calendar cells
-* @method buildDayLabel
-* @param {Date}	workingDate	The current working date
-* @return	{String}	The formatted day label
-*/
-YAHOO.widget.Calendar.prototype.buildDayLabel = function(workingDate) {
-	var day = workingDate.getDate();
-	return day;
-};
-
-/**
-* Renders the calendar header.
-* @method renderHeader
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderHeader = function(html) {
-	var colSpan = 7;
-
-	if (this.cfg.getProperty("SHOW_WEEK_HEADER")) {
-		colSpan += 1;
-	}
-
-	if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) {
-		colSpan += 1;
-	}
-
-	html[html.length] = "<thead>";
-	html[html.length] =		"<tr>";
-	html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
-	html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
-
-		var renderLeft, renderRight = false;
-
-		if (this.parent) {
-			if (this.index === 0) {
-				renderLeft = true;
-			}
-			if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
-				renderRight = true;
-			}
-		} else {
-			renderLeft = true;
-			renderRight = true;
-		}
-
-		var cal = this.parent || this;
-
-		if (renderLeft) {
-			html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '" style="background-image:url(' + this.cfg.getProperty("NAV_ARROW_LEFT") + ')">&#160;</a>';
-		}
-
-		html[html.length] = this.buildMonthLabel();
-
-		if (renderRight) {
-			html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '" style="background-image:url(' + this.cfg.getProperty("NAV_ARROW_RIGHT") + ')">&#160;</a>';
-		}
-
-
-	html[html.length] =				'</div>';
-	html[html.length] =			'</th>';
-	html[html.length] =		'</tr>';
-
-	if (this.cfg.getProperty("SHOW_WEEKDAYS")) {
-		html = this.buildWeekdays(html);
-	}
-
-	html[html.length] = '</thead>';
-
-	return html;
-};
-
-/**
-* Renders the Calendar's weekday headers.
-* @method buildWeekdays
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
-
-	html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
-
-	if (this.cfg.getProperty("SHOW_WEEK_HEADER")) {
-		html[html.length] = '<th>&#160;</th>';
-	}
-
-	for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
-		html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
-	}
-
-	if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) {
-		html[html.length] = '<th>&#160;</th>';
-	}
-
-	html[html.length] = '</tr>';
-
-	return html;
-};
-
-/**
-* Renders the calendar body.
-* @method renderBody
-* @param {Date}	workingDate	The current working Date being used for the render process
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
-
-	var startDay = this.cfg.getProperty("START_WEEKDAY");
-
-	this.preMonthDays = workingDate.getDay();
-	if (startDay > 0) {
-		this.preMonthDays -= startDay;
-	}
-	if (this.preMonthDays < 0) {
-		this.preMonthDays += 7;
-	}
-
-	this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
-	this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
-
-	workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
-
-	var useDate,weekNum,weekClass;
-	useDate = this.cfg.getProperty("pagedate");
-
-	html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + '">';
-
-	var i = 0;
-
-	var tempDiv = document.createElement("div");
-	var cell = document.createElement("td");
-	tempDiv.appendChild(cell);
-
-	var jan1 = new Date(useDate.getFullYear(),0,1);
-
-	var cal = this.parent || this;
-
-	for (var r=0;r<6;r++) {
-
-		weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
-
-		weekClass = "w" + weekNum;
-
-		if (r !== 0 && (this.isDateOOM(workingDate) && !this.cfg.getProperty("OOM_SELECT")) && this.cfg.getProperty("HIDE_BLANK_WEEKS") === true) {
-			break;
-		} else {
-
-			html[html.length] = '<tr class="' + weekClass + '">';
-
-			if (this.cfg.getProperty("SHOW_WEEK_HEADER")) { html = this.renderRowHeader(weekNum, html); }
-
-			for (var d=0;d<7;d++){ // Render actual days
-
-				var cellRenderers = [];
-
-				this.clearElement(cell);
-
-				YAHOO.util.Dom.addClass(cell, "calcell");
-
-				cell.id = this.id + "_cell" + i;
-
-				cell.innerHTML = i;
-
-				var renderer = null;
-
-				if (workingDate.getFullYear()	== this.today.getFullYear() &&
-					workingDate.getMonth()		== this.today.getMonth() &&
-					workingDate.getDate()		== this.today.getDate()) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
-				}
-
-				this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]; // Add this date to cellDates
-
-				if (this.isDateOOM(workingDate) && !this.cfg.getProperty("OOM_SELECT")) {
-					cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
-				} else {
-
-					YAHOO.util.Dom.addClass(cell, "wd" + workingDate.getDay());
-					YAHOO.util.Dom.addClass(cell, "d" + workingDate.getDate());
-
-					for (var s=0;s<this.renderStack.length;++s) {
-
-						var rArray = this.renderStack[s];
-						var type = rArray[0];
-
-						var month;
-						var day;
-						var year;
-
-						switch (type) {
-							case YAHOO.widget.Calendar.DATE:
-								month = rArray[1][1];
-								day = rArray[1][2];
-								year = rArray[1][0];
-
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH_DAY:
-								month = rArray[1][0];
-								day = rArray[1][1];
-
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.RANGE:
-								var date1 = rArray[1][0];
-								var date2 = rArray[1][1];
-
-								var d1month = date1[1];
-								var d1day = date1[2];
-								var d1year = date1[0];
-
-								var d1 = new Date(d1year, d1month-1, d1day);
-
-								var d2month = date2[1];
-								var d2day = date2[2];
-								var d2year = date2[0];
-
-								var d2 = new Date(d2year, d2month-1, d2day);
-
-								if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
-									renderer = rArray[2];
-
-									if (workingDate.getTime()==d2.getTime()) {
-										this.renderStack.splice(s,1);
-									}
-								}
-								break;
-							case YAHOO.widget.Calendar.WEEKDAY:
-
-								var weekday = rArray[1][0];
-								if (workingDate.getDay()+1 == weekday) {
-									renderer = rArray[2];
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH:
-
-								month = rArray[1][0];
-								if (workingDate.getMonth()+1 == month) {
-									renderer = rArray[2];
-								}
-								break;
-						}
-
-						if (renderer) {
-							cellRenderers[cellRenderers.length]=renderer;
-						}
-					}
-
-				}
-
-				if (this._indexOfSelectedFieldArray([workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]) > -1) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected;
-				}
-
-				var mindate = this.cfg.getProperty("mindate");
-				var maxdate = this.cfg.getProperty("maxdate");
-
-				if (mindate) {
-					mindate = YAHOO.widget.DateMath.clearTime(mindate);
-				}
-				if (maxdate) {
-					maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
-				}
-
-				if (
-					(mindate && (workingDate.getTime() < mindate.getTime())) ||
-					(maxdate && (workingDate.getTime() > maxdate.getTime()))
-				) {
-					cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
-				} else {
-					cellRenderers[cellRenderers.length]=cal.styleCellDefault;
-					cellRenderers[cellRenderers.length]=cal.renderCellDefault;
-				}
-
-
-
-				for (var x=0;x<cellRenderers.length;++x) {
-					var ren = cellRenderers[x];
-					if (ren.call((this.parent || this),workingDate,cell) == YAHOO.widget.Calendar.STOP_RENDER) {
-						break;
-					}
-				}
-
-				workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
-
-				if (i >= 0 && i <= 6) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
-				}
-				if ((i % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
-				}
-				if (((i+1) % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
-				}
-
-				var postDays = this.postMonthDays;
-				if (postDays >= 7 && this.cfg.getProperty("HIDE_BLANK_WEEKS")) {
-					var blankWeeks = Math.floor(postDays/7);
-					for (var p=0;p<blankWeeks;++p) {
-						postDays -= 7;
-					}
-				}
-
-				if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
-				}
-
-				html[html.length] = tempDiv.innerHTML;
-
-				i++;
-			}
-
-			if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) { html = this.renderRowFooter(weekNum, html); }
-
-			html[html.length] = '</tr>';
-		}
-	}
-
-	html[html.length] = '</tbody>';
-
-	return html;
-};
-
-/**
-* Renders the calendar footer. In the default implementation, there is
-* no footer.
-* @method renderFooter
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
-
-/**
-* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
-* when the method is called: renderHeader, renderBody, renderFooter.
-* Refer to the documentation for those methods for information on
-* individual render tasks.
-* @method render
-*/
-YAHOO.widget.Calendar.prototype.render = function() {
-	this.beforeRenderEvent.fire();
-
-	// Find starting day of the current month
-	var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty("pagedate"));
-
-	this.resetRenderers();
-	this.cellDates.length = 0;
-
-	YAHOO.util.Event.purgeElement(this.oDomContainer, true);
-
-	var html = [];
-
-	html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
-	html = this.renderHeader(html);
-	html = this.renderBody(workingDate, html);
-	html = this.renderFooter(html);
-	html[html.length] = '</table>';
-
-	this.oDomContainer.innerHTML = html.join("\n");
-
-	this.applyListeners();
-	this.cells = this.oDomContainer.getElementsByTagName("td");
-
-	this.cfg.refireEvent("title");
-	this.cfg.refireEvent("close");
-	this.cfg.refireEvent("iframe");
-
-	this.renderEvent.fire();
-};
-
-/**
-* Applies the Calendar's DOM listeners to applicable elements.
-* @method applyListeners
-*/
-YAHOO.widget.Calendar.prototype.applyListeners = function() {
-
-	var root = this.oDomContainer;
-	var cal = this.parent || this;
-
-	var linkLeft, linkRight;
-
-	linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, "a", root);
-	linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, "a", root);
-
-	if (linkLeft) {
-		this.linkLeft = linkLeft[0];
-		YAHOO.util.Event.addListener(this.linkLeft, "mousedown", cal.previousMonth, cal, true);
-	}
-
-	if (linkRight) {
-		this.linkRight = linkRight[0];
-		YAHOO.util.Event.addListener(this.linkRight, "mousedown", cal.nextMonth, cal, true);
-	}
-
-	if (this.domEventMap) {
-		var el,elements;
-		for (var cls in this.domEventMap) {
-			if (this.domEventMap.hasOwnProperty(cls)) {
-				var items = this.domEventMap[cls];
-
-				if (! (items instanceof Array)) {
-					items = [items];
-				}
-
-				for (var i=0;i<items.length;i++)	{
-					var item = items[i];
-					elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
-
-					for (var c=0;c<elements.length;c++) {
-						el = elements[c];
-						 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
-					}
-				}
-			}
-		}
-	}
-
-	YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateByCellId
-* @param {String}	id	The id of the cell
-* @return {Date} The Date object for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateByCellId = function(id) {
-	var date = this.getDateFieldsByCellId(id);
-	return new Date(date[0],date[1]-1,date[2]);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateFieldsByCellId
-* @param {String}	id	The id of the cell
-* @return {Array}	The array of Date fields for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateFieldsByCellId = function(id) {
-	id = id.toLowerCase().split("_cell")[1];
-	id = parseInt(id, 10);
-	return this.cellDates[id];
-};
-
-// BEGIN BUILT-IN TABLE CELL RENDERERS
-
-/**
-* Renders a cell that falls before the minimum date or after the maximum date.
-* widget class.
-* @method renderOutOfBoundsDate
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
-	cell.innerHTML = workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the row header for a week.
-* @method renderRowHeader
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowHeader = function(weekNum, html) {
-	html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders the row footer for a week.
-* @method renderRowFooter
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
-	html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders a single standard calendar cell in the calendar widget table.
-* All logic for determining how a standard default cell will be rendered is
-* encapsulated in this method, and must be accounted for when extending the
-* widget class.
-* @method renderCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
-	cell.innerHTML = '<a href="javascript:void(null);" >' + this.buildDayLabel(workingDate) + "</a>";
-};
-
-/**
-* Styles a selectable cell.
-* @method styleCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
-};
-
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight1 style
-* @method renderCellStyleHighlight1
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight2 style
-* @method renderCellStyleHighlight2
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight3 style
-* @method renderCellStyleHighlight3
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight4 style
-* @method renderCellStyleHighlight4
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
-};
-
-/**
-* Applies the default style used for rendering today's date to the current calendar cell
-* @method renderCellStyleToday
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
-};
-
-/**
-* Applies the default style used for rendering selected dates to the current calendar cell
-* @method renderCellStyleSelected
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
-};
-
-/**
-* Applies the default style used for rendering dates that are not a part of the current
-* month (preceding or trailing the cells for the current month)
-* @method renderCellNotThisMonth
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the current calendar cell as a non-selectable "black-out" date using the default
-* restricted style.
-* @method renderBodyCellRestricted
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-// END BUILT-IN TABLE CELL RENDERERS
-
-// BEGIN MONTH NAVIGATION METHODS
-
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addMonths = function(count) {
-	this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.add(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
-	this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.subtract(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addYears = function(count) {
-	this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.add(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
-	this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.subtract(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.Calendar.prototype.nextMonth = function() {
-	this.addMonths(1);
-};
-
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.Calendar.prototype.previousMonth = function() {
-	this.subtractMonths(1);
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.Calendar.prototype.nextYear = function() {
-	this.addYears(1);
-};
-
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.Calendar.prototype.previousYear = function() {
-	this.subtractYears(1);
-};
-
-// END MONTH NAVIGATION METHODS
-
-// BEGIN SELECTION METHODS
-
-/**
-* Resets the calendar widget to the originally selected month and year, and
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.Calendar.prototype.reset = function() {
-	this.cfg.resetProperty("selected");
-	this.cfg.resetProperty("pagedate");
-	this.resetEvent.fire();
-};
-
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.Calendar.prototype.clear = function() {
-	this.cfg.setProperty("selected", []);
-	this.cfg.setProperty("pagedate", new Date(this.today.getTime()));
-	this.clearEvent.fire();
-};
-
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be
-* called for the changes to be reflected visually.
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.select = function(date) {
-	this.beforeSelectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
-	var aToBeSelected = this._toFieldArray(date);
-
-	for (var a=0;a<aToBeSelected.length;++a) {
-		var toSelect = aToBeSelected[a]; // For each date item in the list of dates we're trying to select
-		if (this._indexOfSelectedFieldArray(toSelect) == -1) { // not already selected?
-			selected[selected.length]=toSelect;
-		}
-	}
-
-	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
-	} else {
-		this.cfg.setProperty("selected", selected);
-	}
-
-	this.selectEvent.fire(aToBeSelected);
-
-	return this.getSelectedDates();
-};
-
-/**
-* Selects a date on the current calendar by referencing the index of the cell that should be selected.
-* This method is used to easily select a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is applied to the cell directly.
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to select in the current calendar.
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.selectCell = function(cellIndex) {
-	this.beforeSelectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
-
-	var cell = this.cells[cellIndex];
-	var cellDate = this.cellDates[cellIndex];
-
-	var dCellDate = this._toDate(cellDate);
-
-	var selectDate = cellDate.concat();
-
-	selected[selected.length] = selectDate;
-
-	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
-	} else {
-		this.cfg.setProperty("selected", selected);
-	}
-
-	this.renderCellStyleSelected(dCellDate,cell);
-
-	this.selectEvent.fire([selectDate]);
-
-	this.doCellMouseOut.call(cell, null, this);
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be
-* called for the changes to be reflected visually.
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselect = function(date) {
-	this.beforeDeselectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
-
-	var aToBeSelected = this._toFieldArray(date);
-
-	for (var a=0;a<aToBeSelected.length;++a) {
-		var toSelect = aToBeSelected[a]; // For each date item in the list of dates we're trying to select
-		var index = this._indexOfSelectedFieldArray(toSelect);
-
-		if (index != -1) {
-			selected.splice(index,1);
-		}
-	}
-
-	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
-	} else {
-		this.cfg.setProperty("selected", selected);
-	}
-
-	this.deselectEvent.fire(aToBeSelected);
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
-* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is removed from the cell directly.
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar.
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselectCell = function(i) {
-	this.beforeDeselectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
-
-	var cell = this.cells[i];
-	var cellDate = this.cellDates[i];
-	var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
-
-	var dCellDate = this._toDate(cellDate);
-
-	var selectDate = cellDate.concat();
-
-	if (cellDateIndex > -1) {
-		if (this.cfg.getProperty("pagedate").getMonth() == dCellDate.getMonth() &&
-			this.cfg.getProperty("pagedate").getFullYear() == dCellDate.getFullYear()) {
-			YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
-		}
-
-		selected.splice(cellDateIndex, 1);
-	}
-
-
-	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
-	} else {
-		this.cfg.setProperty("selected", selected);
-	}
-
-	this.deselectEvent.fire(selectDate);
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.Calendar.prototype.deselectAll = function() {
-	this.beforeDeselectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
-	var count = selected.length;
-	var sel = selected.concat();
-
-	if (this.parent) {
-		this.parent.cfg.setProperty("selected", []);
-	} else {
-		this.cfg.setProperty("selected", []);
-	}
-
-	if (count > 0) {
-		this.deselectEvent.fire(sel);
-	}
-
-	return this.getSelectedDates();
-};
-
-// END SELECTION METHODS
-
-// BEGIN TYPE CONVERSION METHODS
-
-/**
-* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
-* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
-* @method _toFieldArray
-* @private
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return {Array[](Number[])}	Array of date field arrays
-*/
-YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
-	var returnDate = [];
-
-	if (date instanceof Date) {
-		returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
-	} else if (typeof date == 'string') {
-		returnDate = this._parseDates(date);
-	} else if (date instanceof Array) {
-		for (var i=0;i<date.length;++i) {
-			var d = date[i];
-			returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
-		}
-	}
-
-	return returnDate;
-};
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _toDate
-* @private
-* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
-* @return	{Date}	JavaScript Date object representing the date field array
-*/
-YAHOO.widget.Calendar.prototype._toDate = function(dateFieldArray) {
-	if (dateFieldArray instanceof Date) {
-		return dateFieldArray;
-	} else {
-		return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
-	}
-};
-
-// END TYPE CONVERSION METHODS
-
-// BEGIN UTILITY METHODS
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _fieldArraysAreEqual
-* @private
-* @param	{Number[]}	array1	The first date field array to compare
-* @param	{Number[]}	array2	The first date field array to compare
-* @return	{Boolean}	The boolean that represents the equality of the two arrays
-*/
-YAHOO.widget.Calendar.prototype._fieldArraysAreEqual = function(array1, array2) {
-	var match = false;
-
-	if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
-		match=true;
-	}
-
-	return match;
-};
-
-/**
-* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
-* @method	_indexOfSelectedFieldArray
-* @private
-* @param	{Number[]}		find	The date field array to search for
-* @return	{Number}			The index of the date field array within the collection of selected dates.
-*								-1 will be returned if the date is not found.
-*/
-YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray = function(find) {
-	var selected = -1;
-	var seldates = this.cfg.getProperty("selected");
-
-	for (var s=0;s<seldates.length;++s) {
-		var sArray = seldates[s];
-		if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
-			selected = s;
-			break;
-		}
-	}
-
-	return selected;
-};
-
-/**
-* Determines whether a given date is OOM (out of month).
-* @method	isDateOOM
-* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
-* @return	{Boolean}	true if the date is OOM
-*/
-YAHOO.widget.Calendar.prototype.isDateOOM = function(date) {
-	var isOOM = false;
-	if (date.getMonth() != this.cfg.getProperty("pagedate").getMonth()) {
-		isOOM = true;
-	}
-	return isOOM;
-};
-
-// END UTILITY METHODS
-
-// BEGIN EVENT HANDLERS
-
-/**
-* Event executed before a date is selected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeSelect = function() {
-	if (this.cfg.getProperty("MULTI_SELECT") === false) {
-		if (this.parent) {
-			this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
-			this.parent.deselectAll();
-		} else {
-			this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
-			this.deselectAll();
-		}
-	}
-};
-
-/**
-* Event executed when a date is selected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to selectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onSelect = function(selected) { };
-
-/**
-* Event executed before a date is deselected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeDeselect = function() { };
-
-/**
-* Event executed when a date is deselected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onDeselect = function(deselected) { };
-
-/**
-* Event executed when the user navigates to a different calendar page.
-* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
-*/
-YAHOO.widget.Calendar.prototype.onChangePage = function() {
-	this.render();
-};
-
-/**
-* Event executed when the calendar widget is rendered.
-* @deprecated Event handlers for this event should be susbcribed to renderEvent.
-*/
-YAHOO.widget.Calendar.prototype.onRender = function() { };
-
-/**
-* Event executed when the calendar widget is reset to its original state.
-* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
-*/
-YAHOO.widget.Calendar.prototype.onReset = function() { this.render(); };
-
-/**
-* Event executed when the calendar widget is completely cleared to the current month with no selections.
-* @deprecated Event handlers for this event should be susbcribed to clearEvent.
-*/
-YAHOO.widget.Calendar.prototype.onClear = function() { this.render(); };
-
-/**
-* Validates the calendar widget. This method has no default implementation
-* and must be extended by subclassing the widget.
-* @return	Should return true if the widget validates, and false if
-* it doesn't.
-* @type Boolean
-*/
-YAHOO.widget.Calendar.prototype.validate = function() { return true; };
-
-// END EVENT HANDLERS
-
-// BEGIN DATE PARSE METHODS
-
-/**
-* Converts a date string to a date field array
-* @private
-* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
-* @return				A date field array representing the string passed to the method
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDate = function(sDate) {
-	var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
-	var rArray;
-
-	if (aDate.length == 2) {
-		rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
-	} else {
-		rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.DATE;
-	}
-
-	for (var i=0;i<rArray.length;i++) {
-		rArray[i] = parseInt(rArray[i], 10);
-	}
-
-	return rArray;
-};
-
-/**
-* Converts a multi or single-date string to an array of date field arrays
-* @private
-* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDates = function(sDates) {
-	var aReturn = [];
-
-	var aDates = sDates.split(this.Locale.DATE_DELIMITER);
-
-	for (var d=0;d<aDates.length;++d) {
-		var sDate = aDates[d];
-
-		if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
-			// This is a range
-			var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
-
-			var dateStart = this._parseDate(aRange[0]);
-			var dateEnd = this._parseDate(aRange[1]);
-
-			var fullRange = this._parseRange(dateStart, dateEnd);
-			aReturn = aReturn.concat(fullRange);
-		} else {
-			// This is not a range
-			var aDate = this._parseDate(sDate);
-			aReturn.push(aDate);
-		}
-	}
-	return aReturn;
-};
-
-/**
-* Converts a date range to the full list of included dates
-* @private
-* @param	{Number[]}	startDate	Date field array representing the first date in the range
-* @param	{Number[]}	endDate		Date field array representing the last date in the range
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseRange = function(startDate, endDate) {
-	var dStart   = new Date(startDate[0],startDate[1]-1,startDate[2]);
-	var dCurrent = YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
-	var dEnd     = new Date(endDate[0],  endDate[1]-1,  endDate[2]);
-
-	var results = [];
-	results.push(startDate);
-	while (dCurrent.getTime() <= dEnd.getTime()) {
-		results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
-		dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
-	}
-	return results;
-};
-
-// END DATE PARSE METHODS
-
-// BEGIN RENDERER METHODS
-
-/**
-* Resets the render stack of the current calendar to its original pre-render value.
-*/
-YAHOO.widget.Calendar.prototype.resetRenderers = function() {
-	this.renderStack = this._renderStack.concat();
-};
-
-/**
-* Clears the inner HTML, CSS class and style information from the specified cell.
-* @method clearElement
-* @param	{HTMLTableCellElement}	The cell to clear
-*/
-YAHOO.widget.Calendar.prototype.clearElement = function(cell) {
-	cell.innerHTML = "&#160;";
-	cell.className="";
-};
-
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addRenderer = function(sDates, fnRender) {
-	var aDates = this._parseDates(sDates);
-	for (var i=0;i<aDates.length;++i) {
-		var aDate = aDates[i];
-
-		if (aDate.length == 2) { // this is either a range or a month/day combo
-			if (aDate[0] instanceof Array) { // this is a range
-				this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
-			} else { // this is a month/day combo
-				this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
-			}
-		} else if (aDate.length == 3) {
-			this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
-		}
-	}
-};
-
-/**
-* The private method used for adding cell renderers to the local render stack.
-* This method is called by other methods that set the renderer type prior to the method call.
-* @method _addRenderer
-* @private
-* @param	{String}	type		The type string that indicates the type of date renderer being added.
-*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
-*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
-* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
-*									on the renderer type
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype._addRenderer = function(type, aDates, fnRender) {
-	var add = [type,aDates,fnRender];
-	this.renderStack.unshift(add);
-	this._renderStack = this.renderStack.concat();
-};
-
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addMonthRenderer = function(month, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
-};
-
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
-};
-
-// END RENDERER METHODS
-
-// BEGIN CSS METHODS
-
-/**
-* Removes all styles from all body cells in the current calendar table.
-* @method clearAllBodyCellStyles
-* @param	{style}		The CSS class name to remove from all calendar body cells
-*/
-YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles = function(style) {
-	for (var c=0;c<this.cells.length;++c) {
-		YAHOO.util.Dom.removeClass(this.cells[c],style);
-	}
-};
-
-// END CSS METHODS
-
-// BEGIN GETTER/SETTER METHODS
-/**
-* Sets the calendar's month explicitly
-* @method setMonth
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.Calendar.prototype.setMonth = function(month) {
-	var current = this.cfg.getProperty("pagedate");
-	current.setMonth(month);
-	this.cfg.setProperty("pagedate", current);
-};
-
-/**
-* Sets the calendar's year explicitly.
-* @method setYear
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.Calendar.prototype.setYear = function(year) {
-	var current = this.cfg.getProperty("pagedate");
-	current.setFullYear(year);
-	this.cfg.setProperty("pagedate", current);
-};
-
-/**
-* Gets the list of currently selected dates from the calendar.
-* @method getSelectedDates
-* @return {Date[]} An array of currently selected JavaScript Date objects.
-*/
-YAHOO.widget.Calendar.prototype.getSelectedDates = function() {
-	var returnDates = [];
-	var selected = this.cfg.getProperty("selected");
-
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
-
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
-
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
-
-/// END GETTER/SETTER METHODS ///
-
-/**
-* Hides the Calendar's outer container from view.
-* @method hide
-*/
-YAHOO.widget.Calendar.prototype.hide = function() {
-	this.oDomContainer.style.display = "none";
-};
-
-/**
-* Shows the Calendar's outer container.
-* @method show
-*/
-YAHOO.widget.Calendar.prototype.show = function() {
-	this.oDomContainer.style.display = "block";
-};
-
-/**
-* Returns a string representing the current browser.
-* @property browser
-* @type String
-*/
-YAHOO.widget.Calendar.prototype.browser = function() {
-			var ua = navigator.userAgent.toLowerCase();
-				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
-					 return 'opera';
-				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
-					 return 'ie7';
-				  } else if (ua.indexOf('msie') !=-1) { // IE
-					 return 'ie';
-				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
-					 return 'safari';
-				  } else if (ua.indexOf('gecko') != -1) { // Gecko
-					 return 'gecko';
-				  } else {
-					 return false;
-				  }
-			}();
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the Calendar object.
-*/
-YAHOO.widget.Calendar.prototype.toString = function() {
-	return "Calendar " + this.id;
-};
-
-/**
-* @namespace YAHOO.widget
-* @class Calendar_Core
-* @extends YAHOO.widget.Calendar
-* @deprecated The old Calendar_Core class is no longer necessary.
-*/
-YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
-
-YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
-
-/**
-* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
-* the ability to have multi-page calendar views that share a single dataset and are
-* dependent on each other.
-*
-* The calendar group instance will refer to each of its elements using a 0-based index.
-* For example, to construct the placeholder for a calendar group widget with id "cal1" and
-* containerId of "cal1Container", the markup would be as follows:
-*	<xmp>
-*		<div id="cal1Container_0"></div>
-*		<div id="cal1Container_1"></div>
-*	</xmp>
-* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
-* @namespace YAHOO.widget
-* @class CalendarGroup
-* @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup = function(id, containerId, config) {
-	if (arguments.length > 0) {
-		this.init(id, containerId, config);
-	}
-};
-
-/**
-* Initializes the calendar group. All subclasses must call this method in order for the
-* group to be initialized properly.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
-	this.initEvents();
-	this.initStyles();
-
-	/**
-	* The collection of Calendar pages contained within the CalendarGroup
-	* @property pages
-	* @type YAHOO.widget.Calendar[]
-	*/
-	this.pages = [];
-
-	/**
-	* The unique id associated with the CalendarGroup
-	* @property id
-	* @type String
-	*/
-	this.id = id;
-
-	/**
-	* The unique id associated with the CalendarGroup container
-	* @property containerId
-	* @type String
-	*/
-	this.containerId = containerId;
-
-	/**
-	* The outer containing element for the CalendarGroup
-	* @property oDomContainer
-	* @type HTMLElement
-	*/
-	this.oDomContainer = document.getElementById(containerId);
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
-
-	/**
-	* The Config object used to hold the configuration variables for the CalendarGroup
-	* @property cfg
-	* @type YAHOO.util.Config
-	*/
-	this.cfg = new YAHOO.util.Config(this);
-
-	/**
-	* The local object which contains the CalendarGroup's options
-	* @property Options
-	* @type Object
-	*/
-	this.Options = {};
-
-	/**
-	* The local object which contains the CalendarGroup's locale settings
-	* @property Locale
-	* @type Object
-	*/
-	this.Locale = {};
-
-	this.setupConfig();
-
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-
-	this.cfg.fireQueue();
-
-	// OPERA HACK FOR MISWRAPPED FLOATS
-	if (this.browser == "opera"){
-		var fixWidth = function() {
-			var startW = this.oDomContainer.offsetWidth;
-			var w = 0;
-			for (var p=0;p<this.pages.length;++p) {
-				var cal = this.pages[p];
-				w += cal.oDomContainer.offsetWidth;
-			}
-			if (w > 0) {
-				this.oDomContainer.style.width = w + "px";
-			}
-		};
-		this.renderEvent.subscribe(fixWidth,this,true);
-	}
-};
-
-
-YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
-	/**
-	* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
-	* @config pages
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("pages", { value:2, validator:this.cfg.checkNumber, handler:this.configPages } );
-
-	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
-	*/
-	this.cfg.addProperty("pagedate", { value:new Date(), handler:this.configPageDate } );
-
-	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
-	*/
-	this.cfg.addProperty("selected", { value:[], handler:this.delegateConfig } );
-
-	/**
-	* The title to display above the CalendarGroup's month header
-	* @config title
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
-
-	/**
-	* Whether or not a close button should be displayed for this CalendarGroup
-	* @config close
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("close", { value:false, handler:this.configClose } );
-
-	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* @config iframe
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("iframe", { value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("mindate", { value:null, handler:this.delegateConfig } );
-
-	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("maxdate", { value:null, handler:this.delegateConfig  } );
-
-	// Options properties
-
-	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("MULTI_SELECT",	{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-    /**
-    * True if the Calendar should allow selection of out-of-month dates. False by default.
-    * @config OOM_SELECT
-    * @type Boolean
-    * @default false
-    */
-    this.cfg.addProperty("OOM_SELECT",      { value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/
-	this.cfg.addProperty("START_WEEKDAY",	{ value:0, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
-
-	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("SHOW_WEEKDAYS",	{ value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
-	*/
-	this.cfg.addProperty("NAV_ARROW_LEFT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.delegateConfig } );
-
-	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
-	*/
-	this.cfg.addProperty("NAV_ARROW_RIGHT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.delegateConfig } );
-
-	// Locale properties
-
-	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
-	*/
-	this.cfg.addProperty("MONTHS_SHORT",	{ value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], handler:this.delegateConfig } );
-
-	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/
-	this.cfg.addProperty("MONTHS_LONG",		{ value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], handler:this.delegateConfig } );
-
-	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_1CHAR",	{ value:["S", "M", "T", "W", "T", "F", "S"], handler:this.delegateConfig } );
-
-	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_SHORT",	{ value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], handler:this.delegateConfig } );
-
-	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_MEDIUM",	{ value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], handler:this.delegateConfig } );
-
-	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/
-	this.cfg.addProperty("WEEKDAYS_LONG",	{ value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], handler:this.delegateConfig } );
-
-	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
-	*/
-	this.cfg.addProperty("LOCALE_MONTHS",	{ value:"long", handler:this.delegateConfig } );
-
-	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/
-	this.cfg.addProperty("LOCALE_WEEKDAYS",	{ value:"short", handler:this.delegateConfig } );
-
-	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
-	*/
-	this.cfg.addProperty("DATE_DELIMITER",		{ value:",", handler:this.delegateConfig } );
-
-	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/
-	this.cfg.addProperty("DATE_FIELD_DELIMITER",{ value:"/", handler:this.delegateConfig } );
-
-	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
-	*/
-	this.cfg.addProperty("DATE_RANGE_DELIMITER",{ value:"-", handler:this.delegateConfig } );
-
-	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MY_MONTH_POSITION",	{ value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MY_YEAR_POSITION",	{ value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MD_MONTH_POSITION",	{ value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MD_DAY_POSITION",		{ value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty("MDY_MONTH_POSITION",	{ value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty("MDY_DAY_POSITION",	{ value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/
-	this.cfg.addProperty("MDY_YEAR_POSITION",	{ value:3, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-};
-
-/**
-* Initializes CalendarGroup's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
-	var me = this;
-
-	/**
-	* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
-	* @method sub
-	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
-	* @param {Boolean}	bOverride	Whether or not to apply scope correction
-	*/
-	var sub = function(fn, obj, bOverride) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + "Event"].subscribe(fn, obj, bOverride);
-		}
-	};
-
-	/**
-	* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
-	* @method unsub
-	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
-	*/
-	var unsub = function(fn, obj) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + "Event"].unsubscribe(fn, obj);
-		}
-	};
-
-	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
-	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent("beforeSelect");
-	this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.selectEvent = new YAHOO.util.CustomEvent("select");
-	this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
-
-	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
-	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent("beforeDeselect");
-	this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent("deselect");
-	this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
-	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent("changePage");
-	this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
-
-	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
-	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
-	this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
-	*/
-	this.renderEvent = new YAHOO.util.CustomEvent("render");
-	this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
-	*/
-	this.resetEvent = new YAHOO.util.CustomEvent("reset");
-	this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
-
-	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
-	*/
-	this.clearEvent = new YAHOO.util.CustomEvent("clear");
-	this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
-
-};
-
-/**
-* The default Config handler for the "pages" property
-* @method configPages
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configPages = function(type, args, obj) {
-	var pageCount = args[0];
-
-	for (var p=0;p<pageCount;++p) {
-		var calId = this.id + "_" + p;
-		var calContainerId = this.containerId + "_" + p;
-
-		var childConfig = this.cfg.getConfig();
-		childConfig.close = false;
-		childConfig.title = false;
-
-		var cal = this.constructChild(calId, calContainerId, childConfig);
-		var caldate = cal.cfg.getProperty("pagedate");
-		caldate.setMonth(caldate.getMonth()+p);
-		cal.cfg.setProperty("pagedate", caldate);
-
-		YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
-		YAHOO.util.Dom.addClass(cal.oDomContainer, "groupcal");
-
-		if (p===0) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, "first");
-		}
-
-		if (p==(pageCount-1)) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, "last");
-		}
-
-		cal.parent = this;
-		cal.index = p;
-
-		this.pages[this.pages.length] = cal;
-	}
-};
-
-/**
-* The default Config handler for the "pagedate" property
-* @method configPageDate
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configPageDate = function(type, args, obj) {
-	var val = args[0];
-
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.cfg.setProperty("pagedate", val);
-		var calDate = cal.cfg.getProperty("pagedate");
-		calDate.setMonth(calDate.getMonth()+p);
-	}
-};
-
-/**
-* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
-* @method delegateConfig
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.delegateConfig = function(type, args, obj) {
-	var val = args[0];
-	var cal;
-
-	for (var p=0;p<this.pages.length;p++) {
-		cal = this.pages[p];
-		cal.cfg.setProperty(type, val);
-	}
-};
-
-
-/**
-* Adds a function to all child Calendars within this CalendarGroup.
-* @method setChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Function}		fn			The function to apply to each Calendar page object
-*/
-YAHOO.widget.CalendarGroup.prototype.setChildFunction = function(fnName, fn) {
-	var pageCount = this.cfg.getProperty("pages");
-
-	for (var p=0;p<pageCount;++p) {
-		this.pages[p][fnName] = fn;
-	}
-};
-
-/**
-* Calls a function within all child Calendars within this CalendarGroup.
-* @method callChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Array}		args		The arguments to pass to the function
-*/
-YAHOO.widget.CalendarGroup.prototype.callChildFunction = function(fnName, args) {
-	var pageCount = this.cfg.getProperty("pages");
-
-	for (var p=0;p<pageCount;++p) {
-		var page = this.pages[p];
-		if (page[fnName]) {
-			var fn = page[fnName];
-			fn.call(page, args);
-		}
-	}
-};
-
-/**
-* Constructs a child calendar. This method can be overridden if a subclassed version of the default
-* calendar is to be used.
-* @method constructChild
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
-*/
-YAHOO.widget.CalendarGroup.prototype.constructChild = function(id,containerId,config) {
-	var container = document.getElementById(containerId);
-	if (! container) {
-		container = document.createElement("div");
-		container.id = containerId;
-		this.oDomContainer.appendChild(container);
-	}
-	return new YAHOO.widget.Calendar(id,containerId,config);
-};
-
-
-/**
-* Sets the calendar group's month explicitly. This month will be set into the first
-* @method setMonth
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.CalendarGroup.prototype.setMonth = function(month) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.setMonth(month+p);
-	}
-};
-
-/**
-* Sets the calendar group's year explicitly. This year will be set into the first
-* @method setYear
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.CalendarGroup.prototype.setYear = function(year) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		var pageDate = cal.cfg.getProperty("pageDate");
-
-		if ((pageDate.getMonth()+1) == 1 && p>0) {
-			year+=1;
-		}
-		cal.setYear(year);
-	}
-};
-/**
-* Calls the render function of all child calendars within the group.
-* @method render
-*/
-YAHOO.widget.CalendarGroup.prototype.render = function() {
-	this.renderHeader();
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.render();
-	}
-	this.renderFooter();
-};
-
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be
-* called for the changes to be reflected visually.
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.select = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.select(date);
-	}
-	return this.getSelectedDates();
-};
-
-/**
-* Selects a date on the current calendar by referencing the index of the cell that should be selected.
-* This method is used to easily select a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is applied to the cell directly.
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to select in the current calendar.
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.selectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.selectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be
-* called for the changes to be reflected visually.
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselect = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselect(date);
-	}
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectAll = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectAll();
-	}
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
-* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is removed from the cell directly.
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar.
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
-
-/**
-* Resets the calendar widget to the originally selected month and year, and
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.CalendarGroup.prototype.reset = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.reset();
-	}
-};
-
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.CalendarGroup.prototype.clear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.clear();
-	}
-};
-
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.nextMonth = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextMonth();
-	}
-};
-
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.previousMonth = function() {
-	for (var p=this.pages.length-1;p>=0;--p) {
-		var cal = this.pages[p];
-		cal.previousMonth();
-	}
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextYear();
-	}
-};
-
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.CalendarGroup.prototype.previousYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.previousYear();
-	}
-};
-
-
-/**
-* Gets the list of currently selected dates from the calendar.
-* @return			An array of currently selected JavaScript Date objects.
-* @type Date[]
-*/
-YAHOO.widget.CalendarGroup.prototype.getSelectedDates = function() {
-	var returnDates = [];
-	var selected = this.cfg.getProperty("selected");
-
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
-
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
-
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
-
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addRenderer = function(sDates, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addRenderer(sDates, fnRender);
-	}
-};
-
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonthRenderer = function(month, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addMonthRenderer(month, fnRender);
-	}
-};
-
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addWeekdayRenderer(weekday, fnRender);
-	}
-};
-
-/**
-* Renders the header for the CalendarGroup.
-* @method renderHeader
-*/
-YAHOO.widget.CalendarGroup.prototype.renderHeader = function() {};
-
-/**
-* Renders a footer for the 2-up calendar container. By default, this method is
-* unimplemented.
-* @method renderFooter
-*/
-YAHOO.widget.CalendarGroup.prototype.renderFooter = function() {};
-
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonths = function(count) {
-	this.callChildFunction("addMonths", count);
-};
-
-
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractMonths = function(count) {
-	this.callChildFunction("subtractMonths", count);
-};
-
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addYears = function(count) {
-	this.callChildFunction("addYears", count);
-};
-
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractYears = function(count) {
-	this.callChildFunction("subtractYears", count);
-};
-
-/**
-* CSS class representing the container for the calendar
-* @property YAHOO.widget.CalendarGroup.CSS_CONTAINER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.CalendarGroup.CSS_CONTAINER = "yui-calcontainer";
-
-/**
-* CSS class representing the container for the calendar
-* @property YAHOO.widget.CalendarGroup.CSS_MULTI_UP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.CalendarGroup.CSS_MULTI_UP = "multi";
-
-/**
-* CSS class representing the title for the 2-up calendar
-* @property YAHOO.widget.CalendarGroup.CSS_2UPTITLE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.CalendarGroup.CSS_2UPTITLE = "title";
-
-/**
-* CSS class representing the close icon for the 2-up calendar
-* @property YAHOO.widget.CalendarGroup.CSS_2UPCLOSE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.CalendarGroup.CSS_2UPCLOSE = "close-icon";
-
-YAHOO.augment(YAHOO.widget.CalendarGroup, YAHOO.widget.Calendar, "buildDayLabel",
-																 "buildMonthLabel",
-																 "renderOutOfBoundsDate",
-																 "renderRowHeader",
-																 "renderRowFooter",
-																 "renderCellDefault",
-																 "styleCellDefault",
-																 "renderCellStyleHighlight1",
-																 "renderCellStyleHighlight2",
-																 "renderCellStyleHighlight3",
-																 "renderCellStyleHighlight4",
-																 "renderCellStyleToday",
-																 "renderCellStyleSelected",
-																 "renderCellNotThisMonth",
-																 "renderBodyCellRestricted",
-																 "initStyles",
-																 "configTitle",
-																 "configClose",
-																 "hide",
-																 "show",
-																 "browser");
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the CalendarGroup object.
-*/
-YAHOO.widget.CalendarGroup.prototype.toString = function() {
-	return "CalendarGroup " + this.id;
-};
-
-YAHOO.widget.CalGrp = YAHOO.widget.CalendarGroup;
-
-/**
-* @class YAHOO.widget.Calendar2up
-* @extends YAHOO.widget.CalendarGroup
-* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
-*/
-YAHOO.widget.Calendar2up = function(id, containerId, config) {
-	this.init(id, containerId, config);
-};
-
-YAHOO.extend(YAHOO.widget.Calendar2up, YAHOO.widget.CalendarGroup);
-
-/**
-* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
-*/
-YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
+* @namespace YAHOO.util
+* @class Config
+* @constructor
+* @param {Object}	owner	The owner Object to which this Config Object belongs
+*/
+YAHOO.util.Config = function(owner) {
+	if (owner) {
+		this.init(owner);
+	}
+};
+
+/**
+ * Constant representing the CustomEvent type for the config changed event.
+ * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.CONFIG_CHANGED_EVENT = "configChanged";
+
+/**
+ * Constant representing the boolean type string
+ * @property YAHOO.util.Config.BOOLEAN_TYPE
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.BOOLEAN_TYPE = "boolean";
+
+YAHOO.util.Config.prototype = {
+	
+	/**
+	* Object reference to the owner of this Config Object
+	* @property owner
+	* @type Object
+	*/
+	owner : null,
+
+	/**
+	* Boolean flag that specifies whether a queue is currently being executed
+	* @property queueInProgress
+	* @type Boolean
+	*/
+	queueInProgress : false,
+
+	/**
+	* Maintains the local collection of configuration property objects and their specified values
+	* @property config
+	* @private
+	* @type Object
+	*/ 
+	config : null,
+
+	/**
+	* Maintains the local collection of configuration property objects as they were initially applied.
+	* This object is used when resetting a property.
+	* @property initialConfig
+	* @private
+	* @type Object
+	*/ 
+	initialConfig : null,
+
+	/**
+	* Maintains the local, normalized CustomEvent queue
+	* @property eventQueue
+	* @private
+	* @type Object
+	*/ 
+	eventQueue : null,
+
+	/**
+	* Custom Event, notifying subscribers when Config properties are set (setProperty is called without the silent flag
+	* @event configChangedEvent
+	*/
+	configChangedEvent : null,
+
+	/**
+	* Validates that the value passed in is a Boolean.
+	* @method checkBoolean
+	* @param	{Object}	val	The value to validate
+	* @return	{Boolean}	true, if the value is valid
+	*/	
+	checkBoolean: function(val) {
+		return (typeof val == YAHOO.util.Config.BOOLEAN_TYPE);
+	},
+
+	/**
+	* Validates that the value passed in is a number.
+	* @method checkNumber
+	* @param	{Object}	val	The value to validate
+	* @return	{Boolean}	true, if the value is valid
+	*/
+	checkNumber: function(val) {
+		return (!isNaN(val));
+	},
+
+	/**
+	* Fires a configuration property event using the specified value. 
+	* @method fireEvent
+	* @private
+	* @param {String}	key			The configuration property's name
+	* @param {value}	Object		The value of the correct type for the property
+	*/ 
+	fireEvent : function( key, value ) {
+		var property = this.config[key];
+
+		if (property && property.event) {
+			property.event.fire(value);
+		}	
+	},
+
+	/**
+	* Adds a property to the Config Object's private config hash.
+	* @method addProperty
+	* @param {String}	key	The configuration property's name
+	* @param {Object}	propertyObject	The Object containing all of this property's arguments
+	*/
+	addProperty : function( key, propertyObject ) {
+		key = key.toLowerCase();
+
+		this.config[key] = propertyObject;
+
+		propertyObject.event = new YAHOO.util.CustomEvent(key, this.owner);
+		propertyObject.key = key;
+
+		if (propertyObject.handler) {
+			propertyObject.event.subscribe(propertyObject.handler, this.owner);
+		}
+
+		this.setProperty(key, propertyObject.value, true);
+		
+		if (! propertyObject.suppressEvent) {
+			this.queueProperty(key, propertyObject.value);
+		}
+		
+	},
+
+	/**
+	* Returns a key-value configuration map of the values currently set in the Config Object.
+	* @method getConfig
+	* @return {Object} The current config, represented in a key-value map
+	*/
+	getConfig : function() {
+		var cfg = {};
+			
+		for (var prop in this.config) {
+			var property = this.config[prop];
+			if (property && property.event) {
+				cfg[prop] = property.value;
+			}
+		}
+		
+		return cfg;
+	},
+
+	/**
+	* Returns the value of specified property.
+	* @method getProperty
+	* @param {String} key	The name of the property
+	* @return {Object}		The value of the specified property
+	*/
+	getProperty : function(key) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			return property.value;
+		} else {
+			return undefined;
+		}
+	},
+
+	/**
+	* Resets the specified property's value to its initial value.
+	* @method resetProperty
+	* @param {String} key	The name of the property
+	* @return {Boolean} True is the property was reset, false if not
+	*/
+	resetProperty : function(key) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+		if (property && property.event) {
+			if (this.initialConfig[key] && !YAHOO.lang.isUndefined(this.initialConfig[key]))	{
+				this.setProperty(key, this.initialConfig[key]);
+			}
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
+	* @method setProperty
+	* @param {String} key		The name of the property
+	* @param {String} value		The value to set the property to
+	* @param {Boolean} silent	Whether the value should be set silently, without firing the property event.
+	* @return {Boolean}			True, if the set was successful, false if it failed.
+	*/
+	setProperty : function(key, value, silent) {
+		key = key.toLowerCase();
+
+		if (this.queueInProgress && ! silent) {
+			this.queueProperty(key,value); // Currently running through a queue... 
+			return true;
+		} else {
+			var property = this.config[key];
+			if (property && property.event) {
+				if (property.validator && ! property.validator(value)) { // validator
+					return false;
+				} else {
+					property.value = value;
+					if (! silent) {
+						this.fireEvent(key, value);
+						this.configChangedEvent.fire([key, value]);
+					}
+					return true;
+				}
+			} else {
+				return false;
+			}
+		}
+	},
+
+	/**
+	* Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
+	* moved from its current position to the end of the queue.
+	* @method queueProperty
+	* @param {String} key	The name of the property
+	* @param {String} value	The value to set the property to
+	* @return {Boolean}		true, if the set was successful, false if it failed.
+	*/	
+	queueProperty : function(key, value) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+							
+		if (property && property.event) {
+			if (!YAHOO.lang.isUndefined(value) && property.validator && ! property.validator(value)) { // validator
+				return false;
+			} else {
+
+				if (!YAHOO.lang.isUndefined(value)) {
+					property.value = value;
+				} else {
+					value = property.value;
+				}
+
+				var foundDuplicate = false;
+				var iLen = this.eventQueue.length;
+				for (var i=0; i < iLen; i++) {
+					var queueItem = this.eventQueue[i];
+
+					if (queueItem) {
+						var queueItemKey = queueItem[0];
+						var queueItemValue = queueItem[1];
+						
+						if (queueItemKey == key) {
+							// found a dupe... push to end of queue, null current item, and break
+							this.eventQueue[i] = null;
+							this.eventQueue.push([key, (!YAHOO.lang.isUndefined(value) ? value : queueItemValue)]);
+							foundDuplicate = true;
+							break;
+						}
+					}
+				}
+				
+				if (! foundDuplicate && !YAHOO.lang.isUndefined(value)) { // this is a refire, or a new property in the queue
+					this.eventQueue.push([key, value]);
+				}
+			}
+
+			if (property.supercedes) {
+				var sLen = property.supercedes.length;
+				for (var s=0; s < sLen; s++) {
+					var supercedesCheck = property.supercedes[s];
+					var qLen = this.eventQueue.length;
+					for (var q=0; q < qLen; q++) {
+						var queueItemCheck = this.eventQueue[q];
+
+						if (queueItemCheck) {
+							var queueItemCheckKey = queueItemCheck[0];
+							var queueItemCheckValue = queueItemCheck[1];
+							
+							if ( queueItemCheckKey == supercedesCheck.toLowerCase() ) {
+								this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+								this.eventQueue[q] = null;
+								break;
+							}
+						}
+					}
+				}
+			}
+
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Fires the event for a property using the property's current value.
+	* @method refireEvent
+	* @param {String} key	The name of the property
+	*/
+	refireEvent : function(key) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+		if (property && property.event && !YAHOO.lang.isUndefined(property.value)) {
+			if (this.queueInProgress) {
+				this.queueProperty(key);
+			} else {
+				this.fireEvent(key, property.value);
+			}
+		}
+	},
+
+	/**
+	* Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
+	* Although the values will be set, fireQueue() must be called for their associated events to execute.
+	* @method applyConfig
+	* @param {Object}	userConfig	The configuration Object literal
+	* @param {Boolean}	init		When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.
+	*/
+	applyConfig : function(userConfig, init) {
+		if (init) {
+			this.initialConfig = userConfig;
+		}
+		for (var prop in userConfig) {
+			this.queueProperty(prop, userConfig[prop]);
+		}
+	},
+
+	/**
+	* Refires the events for all configuration properties using their current values.
+	* @method refresh
+	*/
+	refresh : function() {
+		for (var prop in this.config) {
+			this.refireEvent(prop);
+		}
+	},
+
+	/**
+	* Fires the normalized list of queued property change events
+	* @method fireQueue
+	*/
+	fireQueue : function() {
+		this.queueInProgress = true;
+		for (var i=0;i<this.eventQueue.length;i++) {
+			var queueItem = this.eventQueue[i];
+			if (queueItem) {
+				var key = queueItem[0];
+				var value = queueItem[1];
+				
+				var property = this.config[key];
+				property.value = value;
+
+				this.fireEvent(key,value);
+			}
+		}
+		
+		this.queueInProgress = false;
+		this.eventQueue = [];
+	},
+
+	/**
+	* Subscribes an external handler to the change event for any given property. 
+	* @method subscribeToConfigEvent
+	* @param {String}	key			The property name
+	* @param {Function}	handler		The handler function to use subscribe to the property's event
+	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
+	* @param {Boolean}	override	Optional. If true, will override "this" within the handler to map to the scope Object passed into the method.
+	* @return {Boolean}				True, if the subscription was successful, otherwise false.
+	*/	
+	subscribeToConfigEvent : function(key, handler, obj, override) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			if (! YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
+				property.event.subscribe(handler, obj, override);
+			}
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Unsubscribes an external handler from the change event for any given property. 
+	* @method unsubscribeFromConfigEvent
+	* @param {String}	key			The property name
+	* @param {Function}	handler		The handler function to use subscribe to the property's event
+	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
+	* @return {Boolean}				True, if the unsubscription was successful, otherwise false.
+	*/
+	unsubscribeFromConfigEvent : function(key, handler, obj) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			return property.event.unsubscribe(handler, obj);
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Returns a string representation of the Config object
+	* @method toString
+	* @return {String}	The Config object in string format.
+	*/
+	toString : function() {
+		var output = "Config";
+		if (this.owner) {
+			output += " [" + this.owner.toString() + "]";
+		}
+		return output;
+	},
+
+	/**
+	* Returns a string representation of the Config object's current CustomEvent queue
+	* @method outputEventQueue
+	* @return {String}	The string list of CustomEvents currently queued for execution
+	*/
+	outputEventQueue : function() {
+		var output = "";
+		for (var q=0;q<this.eventQueue.length;q++) {
+			var queueItem = this.eventQueue[q];
+			if (queueItem) {
+				output += queueItem[0] + "=" + queueItem[1] + ", ";
+			}
+		}
+		return output;
+	}
+};
+
+
+/**
+* Initializes the configuration Object and all of its local members.
+* @method init
+* @param {Object}	owner	The owner Object to which this Config Object belongs
+*/
+YAHOO.util.Config.prototype.init = function(owner) {
+	this.owner = owner;
+	this.configChangedEvent = new YAHOO.util.CustomEvent(YAHOO.util.CONFIG_CHANGED_EVENT, this);
+	this.queueInProgress = false;
+	this.config = {};
+	this.initialConfig = {};
+	this.eventQueue = [];
+};
+
+/**
+* Checks to determine if a particular function/Object pair are already subscribed to the specified CustomEvent
+* @method YAHOO.util.Config.alreadySubscribed
+* @static
+* @param {YAHOO.util.CustomEvent} evt	The CustomEvent for which to check the subscriptions
+* @param {Function}	fn	The function to look for in the subscribers list
+* @param {Object}	obj	The execution scope Object for the subscription
+* @return {Boolean}	true, if the function/Object pair is already subscribed to the CustomEvent passed in
+*/
+YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
+	for (var e=0;e<evt.subscribers.length;e++) {
+		var subsc = evt.subscribers[e];
+		if (subsc && subsc.obj == obj && subsc.fn == fn) {
+			return true;
+		}
+	}
+	return false;
+};
+
+/**
+* YAHOO.widget.DateMath is used for simple date manipulation. The class is a static utility
+* used for adding, subtracting, and comparing dates.
+* @namespace YAHOO.widget
+* @class DateMath
+*/
+YAHOO.widget.DateMath = {
+	/**
+	* Constant field representing Day
+	* @property DAY
+	* @static
+	* @final
+	* @type String
+	*/
+	DAY : "D",
+
+	/**
+	* Constant field representing Week
+	* @property WEEK
+	* @static
+	* @final
+	* @type String
+	*/
+	WEEK : "W",
+
+	/**
+	* Constant field representing Year
+	* @property YEAR
+	* @static
+	* @final
+	* @type String
+	*/
+	YEAR : "Y",
+
+	/**
+	* Constant field representing Month
+	* @property MONTH
+	* @static
+	* @final
+	* @type String
+	*/
+	MONTH : "M",
+
+	/**
+	* Constant field representing one day, in milliseconds
+	* @property ONE_DAY_MS
+	* @static
+	* @final
+	* @type Number
+	*/
+	ONE_DAY_MS : 1000*60*60*24,
+
+	/**
+	* Adds the specified amount of time to the this instance.
+	* @method add
+	* @param {Date} date	The JavaScript Date object to perform addition on
+	* @param {String} field	The field constant to be used for performing addition.
+	* @param {Number} amount	The number of units (measured in the field constant) to add to the date.
+	* @return {Date} The resulting Date object
+	*/
+	add : function(date, field, amount) {
+		var d = new Date(date.getTime());
+		switch (field) {
+			case this.MONTH:
+				var newMonth = date.getMonth() + amount;
+				var years = 0;
+
+
+				if (newMonth < 0) {
+					while (newMonth < 0) {
+						newMonth += 12;
+						years -= 1;
+					}
+				} else if (newMonth > 11) {
+					while (newMonth > 11) {
+						newMonth -= 12;
+						years += 1;
+					}
+				}
+				
+				d.setMonth(newMonth);
+				d.setFullYear(date.getFullYear() + years);
+				break;
+			case this.DAY:
+				d.setDate(date.getDate() + amount);
+				break;
+			case this.YEAR:
+				d.setFullYear(date.getFullYear() + amount);
+				break;
+			case this.WEEK:
+				d.setDate(date.getDate() + (amount * 7));
+				break;
+		}
+		return d;
+	},
+
+	/**
+	* Subtracts the specified amount of time from the this instance.
+	* @method subtract
+	* @param {Date} date	The JavaScript Date object to perform subtraction on
+	* @param {Number} field	The this field constant to be used for performing subtraction.
+	* @param {Number} amount	The number of units (measured in the field constant) to subtract from the date.
+	* @return {Date} The resulting Date object
+	*/
+	subtract : function(date, field, amount) {
+		return this.add(date, field, (amount*-1));
+	},
+
+	/**
+	* Determines whether a given date is before another date on the calendar.
+	* @method before
+	* @param {Date} date		The Date object to compare with the compare argument
+	* @param {Date} compareTo	The Date object to use for the comparison
+	* @return {Boolean} true if the date occurs before the compared date; false if not.
+	*/
+	before : function(date, compareTo) {
+		var ms = compareTo.getTime();
+		if (date.getTime() < ms) {
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Determines whether a given date is after another date on the calendar.
+	* @method after
+	* @param {Date} date		The Date object to compare with the compare argument
+	* @param {Date} compareTo	The Date object to use for the comparison
+	* @return {Boolean} true if the date occurs after the compared date; false if not.
+	*/
+	after : function(date, compareTo) {
+		var ms = compareTo.getTime();
+		if (date.getTime() > ms) {
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Determines whether a given date is between two other dates on the calendar.
+	* @method between
+	* @param {Date} date		The date to check for
+	* @param {Date} dateBegin	The start of the range
+	* @param {Date} dateEnd		The end of the range
+	* @return {Boolean} true if the date occurs between the compared dates; false if not.
+	*/
+	between : function(date, dateBegin, dateEnd) {
+		if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
+			return true;
+		} else {
+			return false;
+		}
+	},
+	
+	/**
+	* Retrieves a JavaScript Date object representing January 1 of any given year.
+	* @method getJan1
+	* @param {Number} calendarYear		The calendar year for which to retrieve January 1
+	* @return {Date}	January 1 of the calendar year specified.
+	*/
+	getJan1 : function(calendarYear) {
+		return new Date(calendarYear,0,1); 
+	},
+
+	/**
+	* Calculates the number of days the specified date is from January 1 of the specified calendar year.
+	* Passing January 1 to this function would return an offset value of zero.
+	* @method getDayOffset
+	* @param {Date}	date	The JavaScript date for which to find the offset
+	* @param {Number} calendarYear	The calendar year to use for determining the offset
+	* @return {Number}	The number of days since January 1 of the given year
+	*/
+	getDayOffset : function(date, calendarYear) {
+		var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
+		
+		// Find the number of days the passed in date is away from the calendar year start
+		var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
+		return dayOffset;
+	},
+
+	/**
+	* Calculates the week number for the given date. This function assumes that week 1 is the
+	* week in which January 1 appears, regardless of whether the week consists of a full 7 days.
+	* The calendar year can be specified to help find what a the week number would be for a given
+	* date if the date overlaps years. For instance, a week may be considered week 1 of 2005, or
+	* week 53 of 2004. Specifying the optional calendarYear allows one to make this distinction
+	* easily.
+	* @method getWeekNumber
+	* @param {Date}	date	The JavaScript date for which to find the week number
+	* @param {Number} calendarYear	OPTIONAL - The calendar year to use for determining the week number. Default is
+	*											the calendar year of parameter "date".
+	* @param {Number} weekStartsOn	OPTIONAL - The integer (0-6) representing which day a week begins on. Default is 0 (for Sunday).
+	* @return {Number}	The week number of the given date.
+	*/
+	getWeekNumber : function(date, calendarYear) {
+		date = this.clearTime(date);
+		var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
+
+		var jan1 = new Date(nearestThurs.getFullYear(),0,1);
+		var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
+
+		var weekNum = Math.ceil((dayOfYear)/ 7);
+		return weekNum;
+	},
+
+	/**
+	* Determines if a given week overlaps two different years.
+	* @method isYearOverlapWeek
+	* @param {Date}	weekBeginDate	The JavaScript Date representing the first day of the week.
+	* @return {Boolean}	true if the date overlaps two different years.
+	*/
+	isYearOverlapWeek : function(weekBeginDate) {
+		var overlaps = false;
+		var nextWeek = this.add(weekBeginDate, this.DAY, 6);
+		if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
+			overlaps = true;
+		}
+		return overlaps;
+	},
+
+	/**
+	* Determines if a given week overlaps two different months.
+	* @method isMonthOverlapWeek
+	* @param {Date}	weekBeginDate	The JavaScript Date representing the first day of the week.
+	* @return {Boolean}	true if the date overlaps two different months.
+	*/
+	isMonthOverlapWeek : function(weekBeginDate) {
+		var overlaps = false;
+		var nextWeek = this.add(weekBeginDate, this.DAY, 6);
+		if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
+			overlaps = true;
+		}
+		return overlaps;
+	},
+
+	/**
+	* Gets the first day of a month containing a given date.
+	* @method findMonthStart
+	* @param {Date}	date	The JavaScript Date used to calculate the month start
+	* @return {Date}		The JavaScript Date representing the first day of the month
+	*/
+	findMonthStart : function(date) {
+		var start = new Date(date.getFullYear(), date.getMonth(), 1);
+		return start;
+	},
+
+	/**
+	* Gets the last day of a month containing a given date.
+	* @method findMonthEnd
+	* @param {Date}	date	The JavaScript Date used to calculate the month end
+	* @return {Date}		The JavaScript Date representing the last day of the month
+	*/
+	findMonthEnd : function(date) {
+		var start = this.findMonthStart(date);
+		var nextMonth = this.add(start, this.MONTH, 1);
+		var end = this.subtract(nextMonth, this.DAY, 1);
+		return end;
+	},
+
+	/**
+	* Clears the time fields from a given date, effectively setting the time to 12 noon.
+	* @method clearTime
+	* @param {Date}	date	The JavaScript Date for which the time fields will be cleared
+	* @return {Date}		The JavaScript Date cleared of all time fields
+	*/
+	clearTime : function(date) {
+		date.setHours(12,0,0,0);
+		return date;
+	}
+};
+
+/**
+* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month ("one-up") or two-month ("two-up") interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
+* @module    calendar
+* @title     Calendar
+* @namespace YAHOO.widget
+* @requires  yahoo,dom,event
+*/
+
+/**
+* Calendar is the base class for the Calendar widget. In its most basic
+* implementation, it has the ability to render a calendar widget on the page
+* that can be manipulated to select a single date, move back and forth between
+* months and years.
+* <p>To construct the placeholder for the calendar widget, the code is as
+* follows:
+*	<xmp>
+*		<div id="cal1Container"></div>
+*	</xmp>
+* Note that the table can be replaced with any kind of element.
+* </p>
+* @namespace YAHOO.widget
+* @class Calendar
+* @constructor
+* @param {String}	id			The id of the table element that will represent the calendar widget
+* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+* @param {Object}	config		The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.Calendar = function(id, containerId, config) {
+	this.init(id, containerId, config);
+};
+
+/**
+* The path to be used for images loaded for the Calendar
+* @property YAHOO.widget.Calendar.IMG_ROOT
+* @static
+* @deprecated	You can now customize images by overriding the calclose, calnavleft and calnavright default CSS classes for the close icon, left arrow and right arrow respectively
+* @type String
+*/
+YAHOO.widget.Calendar.IMG_ROOT = null;
+
+/**
+* Type constant used for renderers to represent an individual date (M/D/Y)
+* @property YAHOO.widget.Calendar.DATE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.DATE = "D";
+
+/**
+* Type constant used for renderers to represent an individual date across any year (M/D)
+* @property YAHOO.widget.Calendar.MONTH_DAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MONTH_DAY = "MD";
+
+/**
+* Type constant used for renderers to represent a weekday
+* @property YAHOO.widget.Calendar.WEEKDAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.WEEKDAY = "WD";
+
+/**
+* Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
+* @property YAHOO.widget.Calendar.RANGE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.RANGE = "R";
+
+/**
+* Type constant used for renderers to represent a month across any year
+* @property YAHOO.widget.Calendar.MONTH
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MONTH = "M";
+
+/**
+* Constant that represents the total number of date cells that are displayed in a given month
+* @property YAHOO.widget.Calendar.DISPLAY_DAYS
+* @static
+* @final
+* @type Number
+*/
+YAHOO.widget.Calendar.DISPLAY_DAYS = 42;
+
+/**
+* Constant used for halting the execution of the remainder of the render stack
+* @property YAHOO.widget.Calendar.STOP_RENDER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.STOP_RENDER = "S";
+
+/**
+* Constant used to represent short date field string formats (e.g. Tu or Feb)
+* @property YAHOO.widget.Calendar.SHORT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.SHORT = "short";
+
+/**
+* Constant used to represent long date field string formats (e.g. Monday or February)
+* @property YAHOO.widget.Calendar.LONG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.LONG = "long";
+
+/**
+* Constant used to represent medium date field string formats (e.g. Mon)
+* @property YAHOO.widget.Calendar.MEDIUM
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MEDIUM = "medium";
+
+/**
+* Constant used to represent single character date field string formats (e.g. M, T, W)
+* @property YAHOO.widget.Calendar.ONE_CHAR
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.ONE_CHAR = "1char";
+
+/**
+* The set of default Config property keys and values for the Calendar
+* @property YAHOO.widget.Calendar._DEFAULT_CONFIG
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._DEFAULT_CONFIG = {
+	PAGEDATE : {key:"pagedate", value:new Date()},
+	SELECTED : {key:"selected", value:[]},
+	TITLE : {key:"title", value:""},
+	CLOSE : {key:"close", value:false},
+	IFRAME : {key:"iframe", value:true},
+	MINDATE : {key:"mindate", value:null},
+	MAXDATE : {key:"maxdate", value:null},
+	MULTI_SELECT : {key:"multi_select",	value:false},
+	START_WEEKDAY : {key:"start_weekday", value:0},
+	SHOW_WEEKDAYS : {key:"show_weekdays", value:true},
+	SHOW_WEEK_HEADER : {key:"show_week_header", value:false},
+	SHOW_WEEK_FOOTER : {key:"show_week_footer", value:false},
+	HIDE_BLANK_WEEKS : {key:"hide_blank_weeks", value:false},
+	NAV_ARROW_LEFT: {key:"nav_arrow_left", value:null} ,
+	NAV_ARROW_RIGHT : {key:"nav_arrow_right", value:null} ,
+	MONTHS_SHORT : {key:"months_short",	value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]},
+	MONTHS_LONG: {key:"months_long", value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]},
+	WEEKDAYS_1CHAR: {key:"weekdays_1char", value:["S", "M", "T", "W", "T", "F", "S"]},
+	WEEKDAYS_SHORT: {key:"weekdays_short", value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]},
+	WEEKDAYS_MEDIUM: {key:"weekdays_medium", value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]},
+	WEEKDAYS_LONG: {key:"weekdays_long", value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]},
+	LOCALE_MONTHS:{key:"locale_months", value:"long"},
+	LOCALE_WEEKDAYS:{key:"locale_weekdays", value:"short"},
+	DATE_DELIMITER:{key:"date_delimiter", value:","},
+	DATE_FIELD_DELIMITER:{key:"date_field_delimiter", value:"/"},
+	DATE_RANGE_DELIMITER:{key:"date_range_delimiter", value:"-"},
+	MY_MONTH_POSITION:{key:"my_month_position", value:1},
+	MY_YEAR_POSITION:{key:"my_year_position", value:2},
+	MD_MONTH_POSITION:{key:"md_month_position", value:1},
+	MD_DAY_POSITION:{key:"md_day_position", value:2},
+	MDY_MONTH_POSITION:{key:"mdy_month_position", value:1},
+	MDY_DAY_POSITION:{key:"mdy_day_position", value:2},
+	MDY_YEAR_POSITION:{key:"mdy_year_position", value:3}
+};
+
+/**
+* The set of Custom Event types supported by the Calendar
+* @property YAHOO.widget.Calendar._EVENT_TYPES
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._EVENT_TYPES = {
+	BEFORE_SELECT : "beforeSelect", 
+	SELECT : "select",
+	BEFORE_DESELECT : "beforeDeselect",
+	DESELECT : "deselect",
+	CHANGE_PAGE : "changePage",
+	BEFORE_RENDER : "beforeRender",
+	RENDER : "render",
+	RESET : "reset",
+	CLEAR : "clear"
+};
+
+/**
+* Collection of Default Style constants for the Calendar
+* @property YAHOO.widget.Calendar._STYLES
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._STYLES = {
+	CSS_ROW_HEADER: "calrowhead",
+	CSS_ROW_FOOTER: "calrowfoot",
+	CSS_CELL : "calcell",
+	CSS_CELL_SELECTOR : "selector",
+	CSS_CELL_SELECTED : "selected",
+	CSS_CELL_SELECTABLE : "selectable",
+	CSS_CELL_RESTRICTED : "restricted",
+	CSS_CELL_TODAY : "today",
+	CSS_CELL_OOM : "oom",
+	CSS_CELL_OOB : "previous",
+	CSS_HEADER : "calheader",
+	CSS_HEADER_TEXT : "calhead",
+	CSS_BODY : "calbody",
+	CSS_WEEKDAY_CELL : "calweekdaycell",
+	CSS_WEEKDAY_ROW : "calweekdayrow",
+	CSS_FOOTER : "calfoot",
+	CSS_CALENDAR : "yui-calendar",
+	CSS_SINGLE : "single",
+	CSS_CONTAINER : "yui-calcontainer",
+	CSS_NAV_LEFT : "calnavleft",
+	CSS_NAV_RIGHT : "calnavright",
+	CSS_CLOSE : "calclose",
+	CSS_CELL_TOP : "calcelltop",
+	CSS_CELL_LEFT : "calcellleft",
+	CSS_CELL_RIGHT : "calcellright",
+	CSS_CELL_BOTTOM : "calcellbottom",
+	CSS_CELL_HOVER : "calcellhover",
+	CSS_CELL_HIGHLIGHT1 : "highlight1",
+	CSS_CELL_HIGHLIGHT2 : "highlight2",
+	CSS_CELL_HIGHLIGHT3 : "highlight3",
+	CSS_CELL_HIGHLIGHT4 : "highlight4"
+};
+
+YAHOO.widget.Calendar.prototype = {
+
+	/**
+	* The configuration object used to set up the calendars various locale and style options.
+	* @property Config
+	* @private
+	* @deprecated Configuration properties should be set by calling Calendar.cfg.setProperty.
+	* @type Object
+	*/
+	Config : null,
+
+	/**
+	* The parent CalendarGroup, only to be set explicitly by the parent group
+	* @property parent
+	* @type CalendarGroup
+	*/	
+	parent : null,
+
+	/**
+	* The index of this item in the parent group
+	* @property index
+	* @type Number
+	*/
+	index : -1,
+
+	/**
+	* The collection of calendar table cells
+	* @property cells
+	* @type HTMLTableCellElement[]
+	*/
+	cells : null,
+	
+	/**
+	* The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
+	* @property cellDates
+	* @type Array[](Number[])
+	*/
+	cellDates : null,
+
+	/**
+	* The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
+	* @property id
+	* @type String
+	*/
+	id : null,
+
+	/**
+	* The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
+	* @property oDomContainer
+	* @type HTMLElement
+	*/
+	oDomContainer : null,
+
+	/**
+	* A Date object representing today's date.
+	* @property today
+	* @type Date
+	*/
+	today : null,
+
+	/**
+	* The list of render functions, along with required parameters, used to render cells. 
+	* @property renderStack
+	* @type Array[]
+	*/
+	renderStack : null,
+
+	/**
+	* A copy of the initial render functions created before rendering.
+	* @property _renderStack
+	* @private
+	* @type Array
+	*/
+	_renderStack : null,
+
+	/**
+	* The private list of initially selected dates.
+	* @property _selectedDates
+	* @private
+	* @type Array
+	*/
+	_selectedDates : null,
+
+	/**
+	* A map of DOM event handlers to attach to cells associated with specific CSS class names
+	* @property domEventMap
+	* @type Object
+	*/
+	domEventMap : null
+};
+
+
+
+/**
+* Initializes the Calendar widget.
+* @method init
+* @param {String}	id			The id of the table element that will represent the calendar widget
+* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+* @param {Object}	config		The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
+	this.initEvents();
+	this.today = new Date();
+	YAHOO.widget.DateMath.clearTime(this.today);
+
+	this.id = id;
+	this.oDomContainer = document.getElementById(containerId);
+
+	/**
+	* The Config object used to hold the configuration variables for the Calendar
+	* @property cfg
+	* @type YAHOO.util.Config
+	*/
+	this.cfg = new YAHOO.util.Config(this);
+	
+	/**
+	* The local object which contains the Calendar's options
+	* @property Options
+	* @type Object
+	*/
+	this.Options = {};
+
+	/**
+	* The local object which contains the Calendar's locale settings
+	* @property Locale
+	* @type Object
+	*/
+	this.Locale = {};
+
+	this.initStyles();
+
+	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);	
+	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
+
+	this.cellDates = [];
+	this.cells = [];
+	this.renderStack = [];
+	this._renderStack = [];
+
+	this.setupConfig();
+	
+	if (config) {
+		this.cfg.applyConfig(config, true);
+	}
+	
+	this.cfg.fireQueue();
+};
+
+/**
+* Renders the built-in IFRAME shim for the IE6 and below
+* @method configIframe
+*/
+YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
+	var useIframe = args[0];
+
+	if (!this.parent) {
+		if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
+			if (useIframe) {
+				var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
+
+				if (this.browser == "ie" && (pos == "absolute" || pos == "relative")) {
+					if (! YAHOO.util.Dom.inDocument(this.iframe)) {
+						this.iframe = document.createElement("iframe");
+						this.iframe.src = "javascript:false;";
+						YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
+						this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+					}
+				}
+			} else {
+				if (this.iframe) {
+					if (this.iframe.parentNode) {
+						this.iframe.parentNode.removeChild(this.iframe);
+					}
+					this.iframe = null;
+				}
+			}
+		}
+	}
+};
+
+/**
+* Default handler for the "title" property
+* @method configTitle
+*/
+YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
+	var title = args[0];
+	var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
+	
+	var titleDiv;
+
+	if (title && title !== "") {
+		titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
+		titleDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
+		titleDiv.innerHTML = title;
+		this.oDomContainer.insertBefore(titleDiv, this.oDomContainer.firstChild);
+		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+	} else {
+		titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
+
+		if (titleDiv) {
+			YAHOO.util.Event.purgeElement(titleDiv);
+			this.oDomContainer.removeChild(titleDiv);
+		}
+		if (! close) {
+			YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+		}
+	}
+};
+
+/**
+* Default handler for the "close" property
+* @method configClose
+*/
+YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
+	var close = args[0];
+	var title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
+	
+	var DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
+
+	var linkClose;
+
+	if (close === true) {
+		linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || document.createElement("a");
+		linkClose.href = "#";
+		linkClose.className = "link-close";
+		YAHOO.util.Event.addListener(linkClose, "click", function(e, cal) {cal.hide(); YAHOO.util.Event.preventDefault(e); }, this);
+		
+		if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
+			var imgClose = document.createElement("img");
+			imgClose.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
+			imgClose.className = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE;
+			linkClose.appendChild(imgClose);
+		} else {
+			linkClose.innerHTML = '<span class="' + YAHOO.widget.CalendarGroup.CSS_2UPCLOSE + ' ' + this.Style.CSS_CLOSE + '"></span>';
+		}
+		
+		this.oDomContainer.appendChild(linkClose);
+		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+	} else {
+		linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
+		if (linkClose) {
+			YAHOO.util.Event.purgeElement(linkClose);
+			this.oDomContainer.removeChild(linkClose);
+		}
+		if (! title || title === "") {
+			YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+		}
+	}
+};
+
+/**
+* Initializes Calendar's built-in CustomEvents
+* @method initEvents
+*/
+YAHOO.widget.Calendar.prototype.initEvents = function() {
+
+	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
+
+	/**
+	* Fired before a selection is made
+	* @event beforeSelectEvent
+	*/
+	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); 
+
+	/**
+	* Fired when a selection is made
+	* @event selectEvent
+	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	*/
+	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
+
+	/**
+	* Fired before a selection is made
+	* @event beforeDeselectEvent
+	*/
+	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
+
+	/**
+	* Fired when a selection is made
+	* @event deselectEvent
+	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	*/
+	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
+
+	/**
+	* Fired when the Calendar page is changed
+	* @event changePageEvent
+	*/
+	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
+
+	/**
+	* Fired before the Calendar is rendered
+	* @event beforeRenderEvent
+	*/
+	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+
+	/**
+	* Fired when the Calendar is rendered
+	* @event renderEvent
+	*/
+	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+
+	/**
+	* Fired when the Calendar is reset
+	* @event resetEvent
+	*/
+	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
+
+	/**
+	* Fired when the Calendar is cleared
+	* @event clearEvent
+	*/
+	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+
+	this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
+	this.selectEvent.subscribe(this.onSelect, this, true);
+	this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
+	this.deselectEvent.subscribe(this.onDeselect, this, true);
+	this.changePageEvent.subscribe(this.onChangePage, this, true);
+	this.renderEvent.subscribe(this.onRender, this, true);
+	this.resetEvent.subscribe(this.onReset, this, true);
+	this.clearEvent.subscribe(this.onClear, this, true);
+};
+
+/**
+* The default event function that is attached to a date link within a calendar cell
+* when the calendar is rendered.
+* @method doSelectCell
+* @param {DOMEvent} e	The event
+* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
+	var cell,index,d,date;
+
+	var target = YAHOO.util.Event.getTarget(e);
+	var tagName = target.tagName.toLowerCase();
+	var defSelector = false;
+
+	while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+
+		if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
+			defSelector = true;	
+		}
+
+		target = target.parentNode;
+		tagName = target.tagName.toLowerCase(); 
+		if (tagName == "html") {
+			return;
+		}
+	}
+
+	if (defSelector) {
+		// Stop link href navigation for default renderer
+		YAHOO.util.Event.preventDefault(e);
+	}
+
+	cell = target;
+
+	if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
+		index = cell.id.split("cell")[1];
+		d = cal.cellDates[index];
+		date = new Date(d[0],d[1]-1,d[2]);
+	
+		var link;
+
+		if (cal.Options.MULTI_SELECT) {
+			link = cell.getElementsByTagName("a")[0];
+			if (link) {
+				link.blur();
+			}
+
+			var cellDate = cal.cellDates[index];
+			var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
+
+			if (cellDateIndex > -1) {	
+				cal.deselectCell(index);
+			} else {
+				cal.selectCell(index);
+			}	
+
+		} else {
+			link = cell.getElementsByTagName("a")[0];
+			if (link) {
+				link.blur();
+			}
+			cal.selectCell(index);
+		}
+	}
+};
+
+/**
+* The event that is executed when the user hovers over a cell
+* @method doCellMouseOver
+* @param {DOMEvent} e	The event
+* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
+	var target;
+	if (e) {
+		target = YAHOO.util.Event.getTarget(e);
+	} else {
+		target = this;
+	}
+
+	while (target.tagName.toLowerCase() != "td") {
+		target = target.parentNode;
+		if (target.tagName.toLowerCase() == "html") {
+			return;
+		}
+	}
+
+	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+		YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
+	}
+};
+
+/**
+* The event that is executed when the user moves the mouse out of a cell
+* @method doCellMouseOut
+* @param {DOMEvent} e	The event
+* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
+	var target;
+	if (e) {
+		target = YAHOO.util.Event.getTarget(e);
+	} else {
+		target = this;
+	}
+
+	while (target.tagName.toLowerCase() != "td") {
+		target = target.parentNode;
+		if (target.tagName.toLowerCase() == "html") {
+			return;
+		}
+	}
+
+	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+		YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
+	}
+};
+
+YAHOO.widget.Calendar.prototype.setupConfig = function() {
+
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	/**
+	* The month/year representing the current visible Calendar date (mm/yyyy)
+	* @config pagedate
+	* @type String
+	* @default today's date
+	*/
+	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:defCfg.PAGEDATE.value, handler:this.configPageDate } );
+
+	/**
+	* The date or range of dates representing the current Calendar selection
+	* @config selected
+	* @type String
+	* @default []
+	*/
+	this.cfg.addProperty(defCfg.SELECTED.key, { value:defCfg.SELECTED.value, handler:this.configSelected } );
+
+	/**
+	* The title to display above the Calendar's month header
+	* @config title
+	* @type String
+	* @default ""
+	*/
+	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+	/**
+	* Whether or not a close button should be displayed for this Calendar
+	* @config close
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+	/**
+	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+	* @config iframe
+	* @type Boolean
+	* @default true
+	*/
+	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
+	/**
+	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+	* @config mindate
+	* @type String
+	* @default null
+	*/
+	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+
+	/**
+	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+	* @config maxdate
+	* @type String
+	* @default null
+	*/
+	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
+
+
+	// Options properties
+
+	/**
+	* True if the Calendar should allow multiple selections. False by default.
+	* @config MULTI_SELECT
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+	/**
+	* The weekday the week begins on. Default is 0 (Sunday).
+	* @config START_WEEKDAY
+	* @type number
+	* @default 0
+	*/
+	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber  } );
+
+	/**
+	* True if the Calendar should show weekday labels. True by default.
+	* @config SHOW_WEEKDAYS
+	* @type Boolean
+	* @default true
+	*/
+	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
+
+	/**
+	* True if the Calendar should show week row headers. False by default.
+	* @config SHOW_WEEK_HEADER
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+	/**
+	* True if the Calendar should show week row footers. False by default.
+	* @config SHOW_WEEK_FOOTER
+	* @type Boolean
+	* @default false
+	*/	
+	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+	/**
+	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+	* @config HIDE_BLANK_WEEKS
+	* @type Boolean
+	* @default false
+	*/	
+	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
+	/**
+	* The image that should be used for the left navigation arrow.
+	* @config NAV_ARROW_LEFT
+	* @type String
+	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
+	* @default null
+	*/	
+	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
+
+	/**
+	* The image that should be used for the right navigation arrow.
+	* @config NAV_ARROW_RIGHT
+	* @type String
+	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+	* @default null
+	*/	
+	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
+
+	// Locale properties
+
+	/**
+	* The short month labels for the current locale.
+	* @config MONTHS_SHORT
+	* @type String[]
+	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	*/
+	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+	
+	/**
+	* The long month labels for the current locale.
+	* @config MONTHS_LONG
+	* @type String[]
+	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+	*/	
+	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+	
+	/**
+	* The 1-character weekday labels for the current locale.
+	* @config WEEKDAYS_1CHAR
+	* @type String[]
+	* @default ["S", "M", "T", "W", "T", "F", "S"]
+	*/	
+	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+	
+	/**
+	* The short weekday labels for the current locale.
+	* @config WEEKDAYS_SHORT
+	* @type String[]
+	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+	*/	
+	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+	
+	/**
+	* The medium weekday labels for the current locale.
+	* @config WEEKDAYS_MEDIUM
+	* @type String[]
+	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+	*/	
+	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+	
+	/**
+	* The long weekday labels for the current locale.
+	* @config WEEKDAYS_LONG
+	* @type String[]
+	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+	*/	
+	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+
+	/**
+	* Refreshes the locale values used to build the Calendar.
+	* @method refreshLocale
+	* @private
+	*/
+	var refreshLocale = function() {
+		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+	};
+
+	this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
+	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+	
+	/**
+	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+	* @config LOCALE_MONTHS
+	* @type String
+	* @default "long"
+	*/	
+	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+	
+	/**
+	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+	* @config LOCALE_WEEKDAYS
+	* @type String
+	* @default "short"
+	*/	
+	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+
+	/**
+	* The value used to delimit individual dates in a date string passed to various Calendar functions.
+	* @config DATE_DELIMITER
+	* @type String
+	* @default ","
+	*/	
+	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+
+	/**
+	* The value used to delimit date fields in a date string passed to various Calendar functions.
+	* @config DATE_FIELD_DELIMITER
+	* @type String
+	* @default "/"
+	*/	
+	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+
+	/**
+	* The value used to delimit date ranges in a date string passed to various Calendar functions.
+	* @config DATE_RANGE_DELIMITER
+	* @type String
+	* @default "-"
+	*/
+	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+
+	/**
+	* The position of the month in a month/year date string
+	* @config MY_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/
+	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the year in a month/year date string
+	* @config MY_YEAR_POSITION
+	* @type Number
+	* @default 2
+	*/
+	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the month in a month/day date string
+	* @config MD_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/
+	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the day in a month/year date string
+	* @config MD_DAY_POSITION
+	* @type Number
+	* @default 2
+	*/
+	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the month in a month/day/year date string
+	* @config MDY_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/
+	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the day in a month/day/year date string
+	* @config MDY_DAY_POSITION
+	* @type Number
+	* @default 2
+	*/
+	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+	/**
+	* The position of the year in a month/day/year date string
+	* @config MDY_YEAR_POSITION
+	* @type Number
+	* @default 3
+	*/
+	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+};
+
+/**
+* The default handler for the "pagedate" property
+* @method configPageDate
+*/
+YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
+	this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
+};
+
+/**
+* The default handler for the "mindate" property
+* @method configMinDate
+*/
+YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
+	var val = args[0];
+	if (YAHOO.lang.isString(val)) {
+		val = this._parseDate(val);
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2]));
+	}
+};
+
+/**
+* The default handler for the "maxdate" property
+* @method configMaxDate
+*/
+YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
+	var val = args[0];
+	if (YAHOO.lang.isString(val)) {
+		val = this._parseDate(val);
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2]));
+	}
+};
+
+/**
+* The default handler for the "selected" property
+* @method configSelected
+*/
+YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
+	var selected = args[0];
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	
+	if (selected) {
+		if (YAHOO.lang.isString(selected)) {
+			this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
+		} 
+	}
+	if (! this._selectedDates) {
+		this._selectedDates = this.cfg.getProperty(cfgSelected);
+	}
+};
+
+/**
+* The default handler for all configuration options properties
+* @method configOptions
+*/
+YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
+	this.Options[type.toUpperCase()] = args[0];
+};
+
+/**
+* The default handler for all configuration locale properties
+* @method configLocale
+*/
+YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	this.Locale[type.toUpperCase()] = args[0];
+
+	this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+	this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+};
+
+/**
+* The default handler for all configuration locale field length properties
+* @method configLocaleValues
+*/
+YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
+
+	type = type.toLowerCase();
+	var val = args[0];
+
+	switch (type) {
+		case defCfg.LOCALE_MONTHS.key:
+			switch (val) {
+				case YAHOO.widget.Calendar.SHORT:
+					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
+					break;
+				case YAHOO.widget.Calendar.LONG:
+					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
+					break;
+			}
+			break;
+		case defCfg.LOCALE_WEEKDAYS.key:
+			switch (val) {
+				case YAHOO.widget.Calendar.ONE_CHAR:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
+					break;
+				case YAHOO.widget.Calendar.SHORT:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
+					break;
+				case YAHOO.widget.Calendar.MEDIUM:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
+					break;
+				case YAHOO.widget.Calendar.LONG:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
+					break;
+			}
+			
+			var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+
+			if (START_WEEKDAY > 0) {
+				for (var w=0;w<START_WEEKDAY;++w) {
+					this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
+				}
+			}
+			break;
+	}
+};
+
+/**
+* Defines the style constants for the Calendar
+* @method initStyles
+*/
+YAHOO.widget.Calendar.prototype.initStyles = function() {
+
+	var defStyle = YAHOO.widget.Calendar._STYLES;
+
+	this.Style = {
+		/**
+		* @property Style.CSS_ROW_HEADER
+		*/
+		CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
+		/**
+		* @property Style.CSS_ROW_FOOTER
+		*/
+		CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
+		/**
+		* @property Style.CSS_CELL
+		*/
+		CSS_CELL : defStyle.CSS_CELL,
+		/**
+		* @property Style.CSS_CELL_SELECTOR
+		*/
+		CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
+		/**
+		* @property Style.CSS_CELL_SELECTED
+		*/
+		CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
+		/**
+		* @property Style.CSS_CELL_SELECTABLE
+		*/
+		CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
+		/**
+		* @property Style.CSS_CELL_RESTRICTED
+		*/
+		CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
+		/**
+		* @property Style.CSS_CELL_TODAY
+		*/
+		CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
+		/**
+		* @property Style.CSS_CELL_OOM
+		*/
+		CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
+		/**
+		* @property Style.CSS_CELL_OOB
+		*/
+		CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
+		/**
+		* @property Style.CSS_HEADER
+		*/
+		CSS_HEADER : defStyle.CSS_HEADER,
+		/**
+		* @property Style.CSS_HEADER_TEXT
+		*/
+		CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+		/**
+		* @property Style.CSS_BODY
+		*/
+		CSS_BODY : defStyle.CSS_BODY,
+		/**
+		* @property Style.CSS_WEEKDAY_CELL
+		*/
+		CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
+		/**
+		* @property Style.CSS_WEEKDAY_ROW
+		*/
+		CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
+		/**
+		* @property Style.CSS_FOOTER
+		*/
+		CSS_FOOTER : defStyle.CSS_FOOTER,
+		/**
+		* @property Style.CSS_CALENDAR
+		*/
+		CSS_CALENDAR : defStyle.CSS_CALENDAR,
+		/**
+		* @property Style.CSS_SINGLE
+		*/
+		CSS_SINGLE : defStyle.CSS_SINGLE,
+		/**
+		* @property Style.CSS_CONTAINER
+		*/
+		CSS_CONTAINER : defStyle.CSS_CONTAINER,
+		/**
+		* @property Style.CSS_NAV_LEFT
+		*/
+		CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
+		/**
+		* @property Style.CSS_NAV_RIGHT
+		*/
+		CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+		/**
+		* @property Style.CSS_CLOSE
+		*/
+		CSS_CLOSE : defStyle.CSS_CLOSE,
+		/**
+		* @property Style.CSS_CELL_TOP
+		*/
+		CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
+		/**
+		* @property Style.CSS_CELL_LEFT
+		*/
+		CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
+		/**
+		* @property Style.CSS_CELL_RIGHT
+		*/
+		CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
+		/**
+		* @property Style.CSS_CELL_BOTTOM
+		*/
+		CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
+		/**
+		* @property Style.CSS_CELL_HOVER
+		*/
+		CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
+		/**
+		* @property Style.CSS_CELL_HIGHLIGHT1
+		*/
+		CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
+		/**
+		* @property Style.CSS_CELL_HIGHLIGHT2
+		*/
+		CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
+		/**
+		* @property Style.CSS_CELL_HIGHLIGHT3
+		*/
+		CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
+		/**
+		* @property Style.CSS_CELL_HIGHLIGHT4
+		*/
+		CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
+	};
+};
+
+/**
+* Builds the date label that will be displayed in the calendar header or
+* footer, depending on configuration.
+* @method buildMonthLabel
+* @return	{String}	The formatted calendar month label
+*/
+YAHOO.widget.Calendar.prototype.buildMonthLabel = function() {
+	var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
+	return this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + " " + pageDate.getFullYear();
+};
+
+/**
+* Builds the date digit that will be displayed in calendar cells
+* @method buildDayLabel
+* @param {Date}	workingDate	The current working date
+* @return	{String}	The formatted day label
+*/
+YAHOO.widget.Calendar.prototype.buildDayLabel = function(workingDate) {
+	return workingDate.getDate();
+};
+
+/**
+* Renders the calendar header.
+* @method renderHeader
+* @param {Array}	html	The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderHeader = function(html) {
+	var colSpan = 7;
+	
+	var DEPR_NAV_LEFT = "us/tr/callt.gif";
+	var DEPR_NAV_RIGHT = "us/tr/calrt.gif";	
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+		colSpan += 1;
+	}
+
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+		colSpan += 1;
+	}
+
+	html[html.length] = "<thead>";
+	html[html.length] =		"<tr>";
+	html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
+	html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
+
+	var renderLeft, renderRight = false;
+
+	if (this.parent) {
+		if (this.index === 0) {
+			renderLeft = true;
+		}
+		if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
+			renderRight = true;
+		}
+	} else {
+		renderLeft = true;
+		renderRight = true;
+	}
+
+	var cal = this.parent || this;
+	
+	if (renderLeft) {
+		var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
+		// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
+		if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+			leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
+		}
+		var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
+		html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '"' + leftStyle + ' >&#160;</a>';
+	}
+	
+	html[html.length] = this.buildMonthLabel();
+	
+	if (renderRight) {
+		var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
+		if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+			rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
+		}
+		var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
+		html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '"' + rightStyle + ' >&#160;</a>';
+	}
+
+	html[html.length] =	'</div>\n</th>\n</tr>';
+
+	if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
+		html = this.buildWeekdays(html);
+	}
+	
+	html[html.length] = '</thead>';
+
+	return html;
+};
+
+/**
+* Renders the Calendar's weekday headers.
+* @method buildWeekdays
+* @param {Array}	html	The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
+
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
+
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+		html[html.length] = '<th>&#160;</th>';
+	}
+
+	for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
+		html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
+	}
+
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+		html[html.length] = '<th>&#160;</th>';
+	}
+
+	html[html.length] = '</tr>';
+
+	return html;
+};
+
+/**
+* Renders the calendar body.
+* @method renderBody
+* @param {Date}	workingDate	The current working Date being used for the render process
+* @param {Array}	html	The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+
+	this.preMonthDays = workingDate.getDay();
+	if (startDay > 0) {
+		this.preMonthDays -= startDay;
+	}
+	if (this.preMonthDays < 0) {
+		this.preMonthDays += 7;
+	}
+	
+	this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
+	this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
+	
+	workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
+
+	var weekNum,weekClass;
+	var weekPrefix = "w";
+	var cellPrefix = "_cell";
+	var workingDayPrefix = "wd";
+	var dayPrefix = "d";
+	
+	var cellRenderers;
+	var renderer;
+	
+	var todayYear = this.today.getFullYear();
+	var todayMonth = this.today.getMonth();
+	var todayDate = this.today.getDate();
+	
+	var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
+	var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
+	var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
+	var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
+	var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
+	var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
+
+	if (mindate) {
+		mindate = YAHOO.widget.DateMath.clearTime(mindate);
+	}
+	if (maxdate) {
+		maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
+	}
+	
+	html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + ' ' + this.Style.CSS_BODY + '">';
+	
+	var i = 0;
+
+	var tempDiv = document.createElement("div");
+	var cell = document.createElement("td");
+	tempDiv.appendChild(cell);
+
+	var jan1 = new Date(useDate.getFullYear(),0,1);
+
+	var cal = this.parent || this;
+
+	for (var r=0;r<6;r++) {
+
+		weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
+		weekClass = weekPrefix + weekNum;
+
+		// Local OOM check for performance, since we already have pagedate
+		if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
+			break;
+		} else {
+
+			html[html.length] = '<tr class="' + weekClass + '">';
+			
+			if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
+			
+			for (var d=0;d<7;d++){ // Render actual days
+
+				cellRenderers = [];
+				renderer = null;
+
+				this.clearElement(cell);
+				cell.className = this.Style.CSS_CELL;
+				cell.id = this.id + cellPrefix + i;
+
+				if (workingDate.getDate()		== todayDate && 
+					workingDate.getMonth()		== todayMonth &&
+					workingDate.getFullYear()	== todayYear) {
+					cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+				}
+				
+				var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
+				this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
+				
+				// Local OOM check for performance, since we already have pagedate
+				if (workingDate.getMonth() != useDate.getMonth()) {
+					cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
+				} else {
+					YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
+					YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
+				
+					for (var s=0;s<this.renderStack.length;++s) {
+
+						var rArray = this.renderStack[s];
+						var type = rArray[0];
+						
+						var month;
+						var day;
+						var year;
+						
+						switch (type) {
+							case YAHOO.widget.Calendar.DATE:
+								month = rArray[1][1];
+								day = rArray[1][2];
+								year = rArray[1][0];
+
+								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
+									renderer = rArray[2];
+									this.renderStack.splice(s,1);
+								}
+								break;
+							case YAHOO.widget.Calendar.MONTH_DAY:
+								month = rArray[1][0];
+								day = rArray[1][1];
+								
+								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
+									renderer = rArray[2];
+									this.renderStack.splice(s,1);
+								}
+								break;
+							case YAHOO.widget.Calendar.RANGE:
+								var date1 = rArray[1][0];
+								var date2 = rArray[1][1];
+
+								var d1month = date1[1];
+								var d1day = date1[2];
+								var d1year = date1[0];
+								
+								var d1 = new Date(d1year, d1month-1, d1day);
+
+								var d2month = date2[1];
+								var d2day = date2[2];
+								var d2year = date2[0];
+
+								var d2 = new Date(d2year, d2month-1, d2day);
+
+								if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
+									renderer = rArray[2];
+
+									if (workingDate.getTime()==d2.getTime()) { 
+										this.renderStack.splice(s,1);
+									}
+								}
+								break;
+							case YAHOO.widget.Calendar.WEEKDAY:
+								
+								var weekday = rArray[1][0];
+								if (workingDate.getDay()+1 == weekday) {
+									renderer = rArray[2];
+								}
+								break;
+							case YAHOO.widget.Calendar.MONTH:
+								
+								month = rArray[1][0];
+								if (workingDate.getMonth()+1 == month) {
+									renderer = rArray[2];
+								}
+								break;
+						}
+						
+						if (renderer) {
+							cellRenderers[cellRenderers.length]=renderer;
+						}
+					}
+
+				}
+
+				if (this._indexOfSelectedFieldArray(workingArray) > -1) {
+					cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; 
+				}
+
+				if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
+					(maxdate && (workingDate.getTime() > maxdate.getTime()))
+				) {
+					cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
+				} else {
+					cellRenderers[cellRenderers.length]=cal.styleCellDefault;
+					cellRenderers[cellRenderers.length]=cal.renderCellDefault;	
+				}
+				
+				for (var x=0; x < cellRenderers.length; ++x) {
+					if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
+						break;
+					}
+				}
+
+				workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
+
+				if (i >= 0 && i <= 6) {
+					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
+				}
+				if ((i % 7) === 0) {
+					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
+				}
+				if (((i+1) % 7) === 0) {
+					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
+				}
+				
+				var postDays = this.postMonthDays; 
+				if (hideBlankWeeks && postDays >= 7) {
+					var blankWeeks = Math.floor(postDays/7);
+					for (var p=0;p<blankWeeks;++p) {
+						postDays -= 7;
+					}
+				}
+				
+				if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
+					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
+				}
+
+				html[html.length] = tempDiv.innerHTML;
+				i++;
+			}
+
+			if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
+
+			html[html.length] = '</tr>';
+		}
+	}
+
+	html[html.length] = '</tbody>';
+
+	return html;
+};
+
+/**
+* Renders the calendar footer. In the default implementation, there is
+* no footer.
+* @method renderFooter
+* @param {Array}	html	The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
+
+/**
+* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
+* when the method is called: renderHeader, renderBody, renderFooter.
+* Refer to the documentation for those methods for information on 
+* individual render tasks.
+* @method render
+*/
+YAHOO.widget.Calendar.prototype.render = function() {
+	this.beforeRenderEvent.fire();
+
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	// Find starting day of the current month
+	var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
+
+	this.resetRenderers();
+	this.cellDates.length = 0;
+
+	YAHOO.util.Event.purgeElement(this.oDomContainer, true);
+
+	var html = [];
+
+	html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
+	html = this.renderHeader(html);
+	html = this.renderBody(workingDate, html);
+	html = this.renderFooter(html);
+	html[html.length] = '</table>';
+
+	this.oDomContainer.innerHTML = html.join("\n");
+
+	this.applyListeners();
+	this.cells = this.oDomContainer.getElementsByTagName("td");
+
+	this.cfg.refireEvent(defCfg.TITLE.key);
+	this.cfg.refireEvent(defCfg.CLOSE.key);
+	this.cfg.refireEvent(defCfg.IFRAME.key);
+
+	this.renderEvent.fire();
+};
+
+/**
+* Applies the Calendar's DOM listeners to applicable elements.
+* @method applyListeners
+*/
+YAHOO.widget.Calendar.prototype.applyListeners = function() {
+	
+	var root = this.oDomContainer;
+	var cal = this.parent || this;
+	
+	var anchor = "a";
+	var mousedown = "mousedown";
+
+	var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
+	var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
+
+	if (linkLeft && linkLeft.length > 0) {
+		this.linkLeft = linkLeft[0];
+		YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
+	}
+
+	if (linkRight && linkRight.length > 0) {
+		this.linkRight = linkRight[0];
+		YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
+	}
+
+	if (this.domEventMap) {
+		var el,elements;
+		for (var cls in this.domEventMap) {	
+			if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
+				var items = this.domEventMap[cls];
+
+				if (! (items instanceof Array)) {
+					items = [items];
+				}
+
+				for (var i=0;i<items.length;i++)	{
+					var item = items[i];
+					elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
+
+					for (var c=0;c<elements.length;c++) {
+						el = elements[c];
+						 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
+					}
+				}
+			}
+		}
+	}
+
+	YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
+	YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
+	YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
+};
+
+/**
+* Retrieves the Date object for the specified Calendar cell
+* @method getDateByCellId
+* @param {String}	id	The id of the cell
+* @return {Date} The Date object for the specified Calendar cell
+*/
+YAHOO.widget.Calendar.prototype.getDateByCellId = function(id) {
+	var date = this.getDateFieldsByCellId(id);
+	return new Date(date[0],date[1]-1,date[2]);
+};
+
+/**
+* Retrieves the Date object for the specified Calendar cell
+* @method getDateFieldsByCellId
+* @param {String}	id	The id of the cell
+* @return {Array}	The array of Date fields for the specified Calendar cell
+*/
+YAHOO.widget.Calendar.prototype.getDateFieldsByCellId = function(id) {
+	id = id.toLowerCase().split("_cell")[1];
+	id = parseInt(id, 10);
+	return this.cellDates[id];
+};
+
+// BEGIN BUILT-IN TABLE CELL RENDERERS
+
+/**
+* Renders a cell that falls before the minimum date or after the maximum date.
+* widget class.
+* @method renderOutOfBoundsDate
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+*			should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
+	cell.innerHTML = workingDate.getDate();
+	return YAHOO.widget.Calendar.STOP_RENDER;
+};
+
+/**
+* Renders the row header for a week.
+* @method renderRowHeader
+* @param {Number}	weekNum	The week number of the current row
+* @param {Array}	cell	The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderRowHeader = function(weekNum, html) {
+	html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
+	return html;
+};
+
+/**
+* Renders the row footer for a week.
+* @method renderRowFooter
+* @param {Number}	weekNum	The week number of the current row
+* @param {Array}	cell	The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
+	html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
+	return html;
+};
+
+/**
+* Renders a single standard calendar cell in the calendar widget table.
+* All logic for determining how a standard default cell will be rendered is 
+* encapsulated in this method, and must be accounted for when extending the
+* widget class.
+* @method renderCellDefault
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
+	cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
+};
+
+/**
+* Styles a selectable cell.
+* @method styleCellDefault
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
+};
+
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight1 style
+* @method renderCellStyleHighlight1
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight2 style
+* @method renderCellStyleHighlight2
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight3 style
+* @method renderCellStyleHighlight3
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight4 style
+* @method renderCellStyleHighlight4
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
+};
+
+/**
+* Applies the default style used for rendering today's date to the current calendar cell
+* @method renderCellStyleToday
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
+};
+
+/**
+* Applies the default style used for rendering selected dates to the current calendar cell
+* @method renderCellStyleSelected
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+*			should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
+};
+
+/**
+* Applies the default style used for rendering dates that are not a part of the current
+* month (preceding or trailing the cells for the current month)
+* @method renderCellNotThisMonth
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+*			should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
+	cell.innerHTML=workingDate.getDate();
+	return YAHOO.widget.Calendar.STOP_RENDER;
+};
+
+/**
+* Renders the current calendar cell as a non-selectable "black-out" date using the default
+* restricted style.
+* @method renderBodyCellRestricted
+* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+*			should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
+	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
+	cell.innerHTML=workingDate.getDate();
+	return YAHOO.widget.Calendar.STOP_RENDER;
+};
+
+// END BUILT-IN TABLE CELL RENDERERS
+
+// BEGIN MONTH NAVIGATION METHODS
+
+/**
+* Adds the designated number of months to the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method addMonths
+* @param {Number}	count	The number of months to add to the current calendar
+*/
+YAHOO.widget.Calendar.prototype.addMonths = function(count) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+	this.resetRenderers();
+	this.changePageEvent.fire();
+};
+
+/**
+* Subtracts the designated number of months from the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method subtractMonths
+* @param {Number}	count	The number of months to subtract from the current calendar
+*/
+YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+	this.resetRenderers();
+	this.changePageEvent.fire();
+};
+
+/**
+* Adds the designated number of years to the current calendar, and sets the current
+* calendar page date to the new month.
+* @method addYears
+* @param {Number}	count	The number of years to add to the current calendar
+*/
+YAHOO.widget.Calendar.prototype.addYears = function(count) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+	this.resetRenderers();
+	this.changePageEvent.fire();
+};
+
+/**
+* Subtcats the designated number of years from the current calendar, and sets the current
+* calendar page date to the new month.
+* @method subtractYears
+* @param {Number}	count	The number of years to subtract from the current calendar
+*/
+YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+	this.resetRenderers();
+	this.changePageEvent.fire();
+};
+
+/**
+* Navigates to the next month page in the calendar widget.
+* @method nextMonth
+*/
+YAHOO.widget.Calendar.prototype.nextMonth = function() {
+	this.addMonths(1);
+};
+
+/**
+* Navigates to the previous month page in the calendar widget.
+* @method previousMonth
+*/
+YAHOO.widget.Calendar.prototype.previousMonth = function() {
+	this.subtractMonths(1);
+};
+
+/**
+* Navigates to the next year in the currently selected month in the calendar widget.
+* @method nextYear
+*/
+YAHOO.widget.Calendar.prototype.nextYear = function() {
+	this.addYears(1);
+};
+
+/**
+* Navigates to the previous year in the currently selected month in the calendar widget.
+* @method previousYear
+*/
+YAHOO.widget.Calendar.prototype.previousYear = function() {
+	this.subtractYears(1);
+};
+
+// END MONTH NAVIGATION METHODS
+
+// BEGIN SELECTION METHODS
+
+/**
+* Resets the calendar widget to the originally selected month and year, and 
+* sets the calendar to the initial selection(s).
+* @method reset
+*/
+YAHOO.widget.Calendar.prototype.reset = function() {
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	this.cfg.resetProperty(defCfg.SELECTED.key);
+	this.cfg.resetProperty(defCfg.PAGEDATE.key);
+	this.resetEvent.fire();
+};
+
+/**
+* Clears the selected dates in the current calendar widget and sets the calendar
+* to the current month and year.
+* @method clear
+*/
+YAHOO.widget.Calendar.prototype.clear = function() {
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	this.cfg.setProperty(defCfg.SELECTED.key, []);
+	this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
+	this.clearEvent.fire();
+};
+
+/**
+* Selects a date or a collection of dates on the current calendar. This method, by default,
+* does not call the render method explicitly. Once selection has completed, render must be 
+* called for the changes to be reflected visually.
+* @method select
+* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+*								This method can also take a JavaScript Date object or an array of Date objects.
+* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.Calendar.prototype.select = function(date) {
+	this.beforeSelectEvent.fire();
+	
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+	var selected = this.cfg.getProperty(cfgSelected);
+	var aToBeSelected = this._toFieldArray(date);
+
+	for (var a=0;a<aToBeSelected.length;++a) {
+		var toSelect = aToBeSelected[a]; // For each date item in the list of dates we're trying to select
+		if (this._indexOfSelectedFieldArray(toSelect) == -1) { // not already selected?
+			selected[selected.length]=toSelect;
+		}
+	}
+	
+	if (this.parent) {
+		this.parent.cfg.setProperty(cfgSelected, selected);
+	} else {
+		this.cfg.setProperty(cfgSelected, selected);
+	}
+
+	this.selectEvent.fire(aToBeSelected);
+	
+	return this.getSelectedDates();
+};
+
+/**
+* Selects a date on the current calendar by referencing the index of the cell that should be selected.
+* This method is used to easily select a single cell (usually with a mouse click) without having to do
+* a full render. The selected style is applied to the cell directly.
+* @method selectCell
+* @param	{Number}	cellIndex	The index of the cell to select in the current calendar. 
+* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.Calendar.prototype.selectCell = function(cellIndex) {
+	this.beforeSelectEvent.fire();
+	
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	var selected = this.cfg.getProperty(cfgSelected);
+
+	var cell = this.cells[cellIndex];
+	var cellDate = this.cellDates[cellIndex];
+
+	var dCellDate = this._toDate(cellDate);
+
+	var selectDate = cellDate.concat();
+
+	if (this._indexOfSelectedFieldArray(selectDate) == -1) {
+		selected[selected.length] = selectDate;
+	}
+
+	if (this.parent) {
+		this.parent.cfg.setProperty(cfgSelected, selected);
+	} else {
+		this.cfg.setProperty(cfgSelected, selected);
+	}
+
+	this.renderCellStyleSelected(dCellDate,cell);
+
+	this.selectEvent.fire([selectDate]);
+
+	this.doCellMouseOut.call(cell, null, this);
+
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects a date or a collection of dates on the current calendar. This method, by default,
+* does not call the render method explicitly. Once deselection has completed, render must be 
+* called for the changes to be reflected visually.
+* @method deselect
+* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+*								This method can also take a JavaScript Date object or an array of Date objects.	
+* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.Calendar.prototype.deselect = function(date) {
+	this.beforeDeselectEvent.fire();
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+	var selected = this.cfg.getProperty(cfgSelected);
+
+	var aToBeSelected = this._toFieldArray(date);
+
+	for (var a=0;a<aToBeSelected.length;++a) {
+		var toSelect = aToBeSelected[a]; // For each date item in the list of dates we're trying to select
+		var index = this._indexOfSelectedFieldArray(toSelect);
+	
+		if (index != -1) {	
+			selected.splice(index,1);
+		}
+	}
+
+	if (this.parent) {
+		this.parent.cfg.setProperty(cfgSelected, selected);
+	} else {
+		this.cfg.setProperty(cfgSelected, selected);
+	}
+
+	this.deselectEvent.fire(aToBeSelected);
+	
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
+* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
+* a full render. The selected style is removed from the cell directly.
+* @method deselectCell
+* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar. 
+* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.Calendar.prototype.deselectCell = function(i) {
+	this.beforeDeselectEvent.fire();
+	
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+	var selected = this.cfg.getProperty(defCfg.SELECTED.key);
+
+	var cell = this.cells[i];
+	var cellDate = this.cellDates[i];
+	var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
+
+	var dCellDate = this._toDate(cellDate);
+
+	var selectDate = cellDate.concat();
+
+	if (cellDateIndex > -1) {
+		if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
+			this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
+			YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
+		}
+
+		selected.splice(cellDateIndex, 1);
+	}
+
+	if (this.parent) {
+		this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
+	} else {
+		this.cfg.setProperty(defCfg.SELECTED.key, selected);
+	}
+	
+	this.deselectEvent.fire(selectDate);
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects all dates on the current calendar.
+* @method deselectAll
+* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+*						Assuming that this function executes properly, the return value should be an empty array.
+*						However, the empty array is returned for the sake of being able to check the selection status
+*						of the calendar.
+*/
+YAHOO.widget.Calendar.prototype.deselectAll = function() {
+	this.beforeDeselectEvent.fire();
+	
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+	var selected = this.cfg.getProperty(cfgSelected);
+	var count = selected.length;
+	var sel = selected.concat();
+
+	if (this.parent) {
+		this.parent.cfg.setProperty(cfgSelected, []);
+	} else {
+		this.cfg.setProperty(cfgSelected, []);
+	}
+	
+	if (count > 0) {
+		this.deselectEvent.fire(sel);
+	}
+
+	return this.getSelectedDates();
+};
+
+// END SELECTION METHODS
+
+// BEGIN TYPE CONVERSION METHODS
+
+/**
+* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
+* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
+* @method _toFieldArray
+* @private
+* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+*								This method can also take a JavaScript Date object or an array of Date objects.	
+* @return {Array[](Number[])}	Array of date field arrays
+*/
+YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
+	var returnDate = [];
+
+	if (date instanceof Date) {
+		returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
+	} else if (YAHOO.lang.isString(date)) {
+		returnDate = this._parseDates(date);
+	} else if (YAHOO.lang.isArray(date)) {
+		for (var i=0;i<date.length;++i) {
+			var d = date[i];
+			returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
+		}
+	}
+	
+	return returnDate;
+};
+
+/**
+* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+* @method _toDate
+* @private
+* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
+* @return	{Date}	JavaScript Date object representing the date field array
+*/
+YAHOO.widget.Calendar.prototype._toDate = function(dateFieldArray) {
+	if (dateFieldArray instanceof Date) {
+		return dateFieldArray;
+	} else {
+		return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
+	}
+};
+
+// END TYPE CONVERSION METHODS 
+
+// BEGIN UTILITY METHODS
+
+/**
+* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+* @method _fieldArraysAreEqual
+* @private
+* @param	{Number[]}	array1	The first date field array to compare
+* @param	{Number[]}	array2	The first date field array to compare
+* @return	{Boolean}	The boolean that represents the equality of the two arrays
+*/
+YAHOO.widget.Calendar.prototype._fieldArraysAreEqual = function(array1, array2) {
+	var match = false;
+
+	if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
+		match=true;	
+	}
+
+	return match;
+};
+
+/**
+* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
+* @method	_indexOfSelectedFieldArray
+* @private
+* @param	{Number[]}		find	The date field array to search for
+* @return	{Number}			The index of the date field array within the collection of selected dates.
+*								-1 will be returned if the date is not found.
+*/
+YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray = function(find) {
+	var selected = -1;
+	var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
+
+	for (var s=0;s<seldates.length;++s) {
+		var sArray = seldates[s];
+		if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
+			selected = s;
+			break;
+		}
+	}
+
+	return selected;
+};
+
+/**
+* Determines whether a given date is OOM (out of month).
+* @method	isDateOOM
+* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
+* @return	{Boolean}	true if the date is OOM
+*/
+YAHOO.widget.Calendar.prototype.isDateOOM = function(date) {
+	return (date.getMonth() != this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());
+};
+
+/**
+ * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object 
+ * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object 
+ * @method	_parsePageDate
+ * @private
+ * @param {Date|String}	date	Pagedate value which needs to be parsed
+ * @return {Date}	The Date object representing the pagedate
+ */
+YAHOO.widget.Calendar.prototype._parsePageDate = function(date) {
+	var parsedDate;
+	
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	if (date) {
+		if (date instanceof Date) {
+			parsedDate = YAHOO.widget.DateMath.findMonthStart(date);
+		} else {
+			var month, year, aMonthYear;
+			aMonthYear = date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));
+			month = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1], 10)-1;
+			year = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1], 10);
+			
+			parsedDate = new Date(year, month, 1);
+		}
+	} else {
+		parsedDate = new Date(this.today.getFullYear(), this.today.getMonth(), 1);
+	}
+	return parsedDate;
+};
+
+// END UTILITY METHODS
+
+// BEGIN EVENT HANDLERS
+
+/**
+* Event executed before a date is selected in the calendar widget.
+* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
+*/
+YAHOO.widget.Calendar.prototype.onBeforeSelect = function() {
+	if (this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key) === false) {
+		if (this.parent) {
+			this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
+			this.parent.deselectAll();
+		} else {
+			this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
+			this.deselectAll();
+		}
+	}
+};
+
+/**
+* Event executed when a date is selected in the calendar widget.
+* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+* @deprecated Event handlers for this event should be susbcribed to selectEvent.
+*/
+YAHOO.widget.Calendar.prototype.onSelect = function(selected) { };
+
+/**
+* Event executed before a date is deselected in the calendar widget.
+* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
+*/
+YAHOO.widget.Calendar.prototype.onBeforeDeselect = function() { };
+
+/**
+* Event executed when a date is deselected in the calendar widget.
+* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
+*/
+YAHOO.widget.Calendar.prototype.onDeselect = function(deselected) { };
+
+/**
+* Event executed when the user navigates to a different calendar page.
+* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
+*/
+YAHOO.widget.Calendar.prototype.onChangePage = function() {
+	this.render();
+};
+
+/**
+* Event executed when the calendar widget is rendered.
+* @deprecated Event handlers for this event should be susbcribed to renderEvent.
+*/
+YAHOO.widget.Calendar.prototype.onRender = function() { };
+
+/**
+* Event executed when the calendar widget is reset to its original state.
+* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
+*/
+YAHOO.widget.Calendar.prototype.onReset = function() { this.render(); };
+
+/**
+* Event executed when the calendar widget is completely cleared to the current month with no selections.
+* @deprecated Event handlers for this event should be susbcribed to clearEvent.
+*/
+YAHOO.widget.Calendar.prototype.onClear = function() { this.render(); };
+
+/**
+* Validates the calendar widget. This method has no default implementation
+* and must be extended by subclassing the widget.
+* @return	Should return true if the widget validates, and false if
+* it doesn't.
+* @type Boolean
+*/
+YAHOO.widget.Calendar.prototype.validate = function() { return true; };
+
+// END EVENT HANDLERS
+
+// BEGIN DATE PARSE METHODS
+
+/**
+* Converts a date string to a date field array
+* @private
+* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
+* @return				A date field array representing the string passed to the method
+* @type Array[](Number[])
+*/
+YAHOO.widget.Calendar.prototype._parseDate = function(sDate) {
+	var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
+	var rArray;
+
+	if (aDate.length == 2) {
+		rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
+		rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
+	} else {
+		rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
+		rArray.type = YAHOO.widget.Calendar.DATE;
+	}
+
+	for (var i=0;i<rArray.length;i++) {
+		rArray[i] = parseInt(rArray[i], 10);
+	}
+
+	return rArray;
+};
+
+/**
+* Converts a multi or single-date string to an array of date field arrays
+* @private
+* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
+* @return							An array of date field arrays
+* @type Array[](Number[])
+*/
+YAHOO.widget.Calendar.prototype._parseDates = function(sDates) {
+	var aReturn = [];
+
+	var aDates = sDates.split(this.Locale.DATE_DELIMITER);
+	
+	for (var d=0;d<aDates.length;++d) {
+		var sDate = aDates[d];
+
+		if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
+			// This is a range
+			var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
+
+			var dateStart = this._parseDate(aRange[0]);
+			var dateEnd = this._parseDate(aRange[1]);
+
+			var fullRange = this._parseRange(dateStart, dateEnd);
+			aReturn = aReturn.concat(fullRange);
+		} else {
+			// This is not a range
+			var aDate = this._parseDate(sDate);
+			aReturn.push(aDate);
+		}
+	}
+	return aReturn;
+};
+
+/**
+* Converts a date range to the full list of included dates
+* @private
+* @param	{Number[]}	startDate	Date field array representing the first date in the range
+* @param	{Number[]}	endDate		Date field array representing the last date in the range
+* @return							An array of date field arrays
+* @type Array[](Number[])
+*/
+YAHOO.widget.Calendar.prototype._parseRange = function(startDate, endDate) {
+	var dStart   = new Date(startDate[0],startDate[1]-1,startDate[2]);
+	var dCurrent = YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
+	var dEnd     = new Date(endDate[0],  endDate[1]-1,  endDate[2]);
+
+	var results = [];
+	results.push(startDate);
+	while (dCurrent.getTime() <= dEnd.getTime()) {
+		results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
+		dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
+	}
+	return results;
+};
+
+// END DATE PARSE METHODS
+
+// BEGIN RENDERER METHODS
+
+/**
+* Resets the render stack of the current calendar to its original pre-render value.
+*/
+YAHOO.widget.Calendar.prototype.resetRenderers = function() {
+	this.renderStack = this._renderStack.concat();
+};
+
+/**
+* Clears the inner HTML, CSS class and style information from the specified cell.
+* @method clearElement
+* @param	{HTMLTableCellElement}	The cell to clear
+*/ 
+YAHOO.widget.Calendar.prototype.clearElement = function(cell) {
+	cell.innerHTML = "&#160;";
+	cell.className="";
+};
+
+/**
+* Adds a renderer to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the conditions specified in the date string for this renderer.
+* @method addRenderer
+* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.Calendar.prototype.addRenderer = function(sDates, fnRender) {
+	var aDates = this._parseDates(sDates);
+	for (var i=0;i<aDates.length;++i) {
+		var aDate = aDates[i];
+	
+		if (aDate.length == 2) { // this is either a range or a month/day combo
+			if (aDate[0] instanceof Array) { // this is a range
+				this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
+			} else { // this is a month/day combo
+				this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
+			}
+		} else if (aDate.length == 3) {
+			this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
+		}
+	}
+};
+
+/**
+* The private method used for adding cell renderers to the local render stack.
+* This method is called by other methods that set the renderer type prior to the method call.
+* @method _addRenderer
+* @private
+* @param	{String}	type		The type string that indicates the type of date renderer being added.
+*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
+*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
+* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
+*									on the renderer type
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.Calendar.prototype._addRenderer = function(type, aDates, fnRender) {
+	var add = [type,aDates,fnRender];
+	this.renderStack.unshift(add);	
+	this._renderStack = this.renderStack.concat();
+};
+
+/**
+* Adds a month to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the month passed to this method.
+* @method addMonthRenderer
+* @param	{Number}	month		The month (1-12) to associate with this renderer
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.Calendar.prototype.addMonthRenderer = function(month, fnRender) {
+	this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
+};
+
+/**
+* Adds a weekday to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the weekday passed to this method.
+* @method addWeekdayRenderer
+* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.Calendar.prototype.addWeekdayRenderer = function(weekday, fnRender) {
+	this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
+};
+
+// END RENDERER METHODS
+
+// BEGIN CSS METHODS
+
+/**
+* Removes all styles from all body cells in the current calendar table.
+* @method clearAllBodyCellStyles
+* @param	{style}		The CSS class name to remove from all calendar body cells
+*/
+YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles = function(style) {
+	for (var c=0;c<this.cells.length;++c) {
+		YAHOO.util.Dom.removeClass(this.cells[c],style);
+	}
+};
+
+// END CSS METHODS
+
+// BEGIN GETTER/SETTER METHODS
+/**
+* Sets the calendar's month explicitly
+* @method setMonth
+* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+*/
+YAHOO.widget.Calendar.prototype.setMonth = function(month) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	var current = this.cfg.getProperty(cfgPageDate);
+	current.setMonth(parseInt(month, 10));
+	this.cfg.setProperty(cfgPageDate, current);
+};
+
+/**
+* Sets the calendar's year explicitly.
+* @method setYear
+* @param {Number}	year		The numeric 4-digit year
+*/
+YAHOO.widget.Calendar.prototype.setYear = function(year) {
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	var current = this.cfg.getProperty(cfgPageDate);
+	current.setFullYear(parseInt(year, 10));
+	this.cfg.setProperty(cfgPageDate, current);
+};
+
+/**
+* Gets the list of currently selected dates from the calendar.
+* @method getSelectedDates
+* @return {Date[]} An array of currently selected JavaScript Date objects.
+*/
+YAHOO.widget.Calendar.prototype.getSelectedDates = function() {
+	var returnDates = [];
+	var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
+
+	for (var d=0;d<selected.length;++d) {
+		var dateArray = selected[d];
+
+		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
+		returnDates.push(date);
+	}
+
+	returnDates.sort( function(a,b) { return a-b; } );
+	return returnDates;
+};
+
+/// END GETTER/SETTER METHODS ///
+
+/**
+* Hides the Calendar's outer container from view.
+* @method hide
+*/
+YAHOO.widget.Calendar.prototype.hide = function() {
+	this.oDomContainer.style.display = "none";
+};
+
+/**
+* Shows the Calendar's outer container.
+* @method show
+*/
+YAHOO.widget.Calendar.prototype.show = function() {
+	this.oDomContainer.style.display = "block";
+};
+
+/**
+* Returns a string representing the current browser.
+* @property browser
+* @type String
+*/
+YAHOO.widget.Calendar.prototype.browser = function() {
+			var ua = navigator.userAgent.toLowerCase();
+				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
+					 return 'opera';
+				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
+					 return 'ie7';
+				  } else if (ua.indexOf('msie') !=-1) { // IE
+					 return 'ie';
+				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
+					 return 'safari';
+				  } else if (ua.indexOf('gecko') != -1) { // Gecko
+					 return 'gecko';
+				  } else {
+					 return false;
+				  }
+			}();
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	A string representation of the Calendar object.
+*/
+YAHOO.widget.Calendar.prototype.toString = function() {
+	return "Calendar " + this.id;
+};
+
+/**
+* @namespace YAHOO.widget
+* @class Calendar_Core
+* @extends YAHOO.widget.Calendar
+* @deprecated The old Calendar_Core class is no longer necessary.
+*/
+YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
+
+YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
+
+/**
+* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
+* the ability to have multi-page calendar views that share a single dataset and are
+* dependent on each other.
+* 
+* The calendar group instance will refer to each of its elements using a 0-based index.
+* For example, to construct the placeholder for a calendar group widget with id "cal1" and
+* containerId of "cal1Container", the markup would be as follows:
+*	<xmp>
+*		<div id="cal1Container_0"></div>
+*		<div id="cal1Container_1"></div>
+*	</xmp>
+* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
+* @namespace YAHOO.widget
+* @class CalendarGroup
+* @constructor
+* @param {String}	id			The id of the table element that will represent the calendar widget
+* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+* @param {Object}	config		The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.CalendarGroup = function(id, containerId, config) {
+	if (arguments.length > 0) {
+		this.init(id, containerId, config);
+	}
+};
+
+/**
+* Initializes the calendar group. All subclasses must call this method in order for the
+* group to be initialized properly.
+* @method init
+* @param {String}	id			The id of the table element that will represent the calendar widget
+* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+* @param {Object}	config		The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
+	this.initEvents();
+	this.initStyles();
+
+	/**
+	* The collection of Calendar pages contained within the CalendarGroup
+	* @property pages
+	* @type YAHOO.widget.Calendar[]
+	*/
+	this.pages = [];
+	
+	/**
+	* The unique id associated with the CalendarGroup
+	* @property id
+	* @type String
+	*/
+	this.id = id;
+
+	/**
+	* The unique id associated with the CalendarGroup container
+	* @property containerId
+	* @type String
+	*/
+	this.containerId = containerId;
+
+	/**
+	* The outer containing element for the CalendarGroup
+	* @property oDomContainer
+	* @type HTMLElement
+	*/
+	this.oDomContainer = document.getElementById(containerId);
+
+	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
+	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
+
+	/**
+	* The Config object used to hold the configuration variables for the CalendarGroup
+	* @property cfg
+	* @type YAHOO.util.Config
+	*/
+	this.cfg = new YAHOO.util.Config(this);
+
+	/**
+	* The local object which contains the CalendarGroup's options
+	* @property Options
+	* @type Object
+	*/
+	this.Options = {};
+
+	/**
+	* The local object which contains the CalendarGroup's locale settings
+	* @property Locale
+	* @type Object
+	*/
+	this.Locale = {};
+
+	this.setupConfig();
+
+	if (config) {
+		this.cfg.applyConfig(config, true);
+	}
+
+	this.cfg.fireQueue();
+
+	// OPERA HACK FOR MISWRAPPED FLOATS
+	if (this.browser == "opera"){
+		var fixWidth = function() {
+			var startW = this.oDomContainer.offsetWidth;
+			var w = 0;
+			for (var p=0;p<this.pages.length;++p) {
+				var cal = this.pages[p];
+				w += cal.oDomContainer.offsetWidth;
+			}
+			if (w > 0) {
+				this.oDomContainer.style.width = w + "px";
+			}
+		};
+		this.renderEvent.subscribe(fixWidth,this,true);
+	}
+};
+
+
+YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
+	
+	var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
+	
+	/**
+	* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
+	* @config pages
+	* @type Number
+	* @default 2
+	*/
+	this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
+
+	/**
+	* The month/year representing the current visible Calendar date (mm/yyyy)
+	* @config pagedate
+	* @type String
+	* @default today's date
+	*/
+	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:defCfg.PAGEDATE.value, handler:this.configPageDate } );
+
+	/**
+	* The date or range of dates representing the current Calendar selection
+	* @config selected
+	* @type String
+	* @default []
+	*/
+	this.cfg.addProperty(defCfg.SELECTED.key, { value:defCfg.SELECTED.value, handler:this.configSelected } );
+
+	/**
+	* The title to display above the CalendarGroup's month header
+	* @config title
+	* @type String
+	* @default ""
+	*/
+	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+	/**
+	* Whether or not a close button should be displayed for this CalendarGroup
+	* @config close
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+	/**
+	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+	* @config iframe
+	* @type Boolean
+	* @default true
+	*/
+	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
+	/**
+	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+	* @config mindate
+	* @type String
+	* @default null
+	*/
+	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
+
+	/**
+	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+	* @config maxdate
+	* @type String
+	* @default null
+	*/	
+	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
+
+	// Options properties
+
+	/**
+	* True if the Calendar should allow multiple selections. False by default.
+	* @config MULTI_SELECT
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+	/**
+	* The weekday the week begins on. Default is 0 (Sunday).
+	* @config START_WEEKDAY
+	* @type number
+	* @default 0
+	*/	
+	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+	
+	/**
+	* True if the Calendar should show weekday labels. True by default.
+	* @config SHOW_WEEKDAYS
+	* @type Boolean
+	* @default true
+	*/	
+	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+	/**
+	* True if the Calendar should show week row headers. False by default.
+	* @config SHOW_WEEK_HEADER
+	* @type Boolean
+	* @default false
+	*/	
+	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+	/**
+	* True if the Calendar should show week row footers. False by default.
+	* @config SHOW_WEEK_FOOTER
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+	/**
+	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+	* @config HIDE_BLANK_WEEKS
+	* @type Boolean
+	* @default false
+	*/		
+	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+	/**
+	* The image that should be used for the left navigation arrow.
+	* @config NAV_ARROW_LEFT
+	* @type String
+	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+	* @default null
+	*/		
+	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+	
+	/**
+	* The image that should be used for the right navigation arrow.
+	* @config NAV_ARROW_RIGHT
+	* @type String
+	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+	* @default null
+	*/		
+	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
+
+	// Locale properties
+	
+	/**
+	* The short month labels for the current locale.
+	* @config MONTHS_SHORT
+	* @type String[]
+	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	*/
+	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+	
+	/**
+	* The long month labels for the current locale.
+	* @config MONTHS_LONG
+	* @type String[]
+	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+	*/		
+	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+	
+	/**
+	* The 1-character weekday labels for the current locale.
+	* @config WEEKDAYS_1CHAR
+	* @type String[]
+	* @default ["S", "M", "T", "W", "T", "F", "S"]
+	*/		
+	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+	
+	/**
+	* The short weekday labels for the current locale.
+	* @config WEEKDAYS_SHORT
+	* @type String[]
+	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+	*/		
+	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+	
+	/**
+	* The medium weekday labels for the current locale.
+	* @config WEEKDAYS_MEDIUM
+	* @type String[]
+	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+	*/		
+	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+	
+	/**
+	* The long weekday labels for the current locale.
+	* @config WEEKDAYS_LONG
+	* @type String[]
+	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+	*/		
+	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
+
+	/**
+	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+	* @config LOCALE_MONTHS
+	* @type String
+	* @default "long"
+	*/
+	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
+
+	/**
+	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+	* @config LOCALE_WEEKDAYS
+	* @type String
+	* @default "short"
+	*/	
+	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
+
+	/**
+	* The value used to delimit individual dates in a date string passed to various Calendar functions.
+	* @config DATE_DELIMITER
+	* @type String
+	* @default ","
+	*/
+	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
+
+	/**
+	* The value used to delimit date fields in a date string passed to various Calendar functions.
+	* @config DATE_FIELD_DELIMITER
+	* @type String
+	* @default "/"
+	*/	
+	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
+
+	/**
+	* The value used to delimit date ranges in a date string passed to various Calendar functions.
+	* @config DATE_RANGE_DELIMITER
+	* @type String
+	* @default "-"
+	*/
+	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
+
+	/**
+	* The position of the month in a month/year date string
+	* @config MY_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/
+	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the year in a month/year date string
+	* @config MY_YEAR_POSITION
+	* @type Number
+	* @default 2
+	*/	
+	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the month in a month/day date string
+	* @config MD_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/	
+	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the day in a month/year date string
+	* @config MD_DAY_POSITION
+	* @type Number
+	* @default 2
+	*/	
+	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the month in a month/day/year date string
+	* @config MDY_MONTH_POSITION
+	* @type Number
+	* @default 1
+	*/	
+	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the day in a month/day/year date string
+	* @config MDY_DAY_POSITION
+	* @type Number
+	* @default 2
+	*/	
+	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+	/**
+	* The position of the year in a month/day/year date string
+	* @config MDY_YEAR_POSITION
+	* @type Number
+	* @default 3
+	*/	
+	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+};
+
+/**
+* Initializes CalendarGroup's built-in CustomEvents
+* @method initEvents
+*/
+YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
+	var me = this;
+	var strEvent = "Event";
+
+	/**
+	* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
+	* @method sub
+	* @private
+	* @param {Function} fn	The function to subscribe to this CustomEvent
+	* @param {Object}	obj	The CustomEvent's scope object
+	* @param {Boolean}	bOverride	Whether or not to apply scope correction
+	*/
+	var sub = function(fn, obj, bOverride) {
+		for (var p=0;p<me.pages.length;++p) {
+			var cal = me.pages[p];
+			cal[this.type + strEvent].subscribe(fn, obj, bOverride);
+		}
+	};
+
+	/**
+	* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
+	* @method unsub
+	* @private
+	* @param {Function} fn	The function to subscribe to this CustomEvent
+	* @param {Object}	obj	The CustomEvent's scope object
+	*/
+	var unsub = function(fn, obj) {
+		for (var p=0;p<me.pages.length;++p) {
+			var cal = me.pages[p];
+			cal[this.type + strEvent].unsubscribe(fn, obj);
+		}
+	};
+	
+	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
+
+	/**
+	* Fired before a selection is made
+	* @event beforeSelectEvent
+	*/
+	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
+	this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
+
+	/**
+	* Fired when a selection is made
+	* @event selectEvent
+	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	*/
+	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); 
+	this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
+
+	/**
+	* Fired before a selection is made
+	* @event beforeDeselectEvent
+	*/
+	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); 
+	this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
+
+	/**
+	* Fired when a selection is made
+	* @event deselectEvent
+	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	*/
+	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); 
+	this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
+	
+	/**
+	* Fired when the Calendar page is changed
+	* @event changePageEvent
+	*/
+	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); 
+	this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
+
+	/**
+	* Fired before the Calendar is rendered
+	* @event beforeRenderEvent
+	*/
+	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+	this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
+
+	/**
+	* Fired when the Calendar is rendered
+	* @event renderEvent
+	*/
+	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+	this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
+
+	/**
+	* Fired when the Calendar is reset
+	* @event resetEvent
+	*/
+	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); 
+	this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
+
+	/**
+	* Fired when the Calendar is cleared
+	* @event clearEvent
+	*/
+	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+	this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
+
+};
+
+/**
+* The default Config handler for the "pages" property
+* @method configPages
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.CalendarGroup.prototype.configPages = function(type, args, obj) {
+	var pageCount = args[0];
+
+	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+
+	// Define literals outside loop	
+	var sep = "_";
+	var groupCalClass = "groupcal";
+	var firstClass = "first";
+	var lastClass = "last";
+
+	for (var p=0;p<pageCount;++p) {
+		var calId = this.id + sep + p;
+		var calContainerId = this.containerId + sep + p;
+
+		var childConfig = this.cfg.getConfig();
+		childConfig.close = false;
+		childConfig.title = false;
+
+		var cal = this.constructChild(calId, calContainerId, childConfig);
+		var caldate = cal.cfg.getProperty(cfgPageDate);
+		this._setMonthOnDate(caldate, caldate.getMonth() + p);
+		cal.cfg.setProperty(cfgPageDate, caldate);
+		
+		YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
+		YAHOO.util.Dom.addClass(cal.oDomContainer, groupCalClass);
+		
+		if (p===0) {
+			YAHOO.util.Dom.addClass(cal.oDomContainer, firstClass);
+		}
+
+		if (p==(pageCount-1)) {
+			YAHOO.util.Dom.addClass(cal.oDomContainer, lastClass);
+		}
+		
+		cal.parent = this;
+		cal.index = p; 
+
+		this.pages[this.pages.length] = cal;
+	}
+};
+
+/**
+* The default Config handler for the "pagedate" property
+* @method configPageDate
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.CalendarGroup.prototype.configPageDate = function(type, args, obj) {
+	var val = args[0];
+	var firstPageDate;
+	
+	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		if (p === 0) {
+			firstPageDate = cal._parsePageDate(val);
+			cal.cfg.setProperty(cfgPageDate, firstPageDate);
+		} else {
+			var pageDate = new Date(firstPageDate);
+			this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
+			cal.cfg.setProperty(cfgPageDate, pageDate);
+		}
+	}
+};
+
+/**
+* The default Config handler for the CalendarGroup "selected" property
+* @method configSelected
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.CalendarGroup.prototype.configSelected = function(type, args, obj) {
+	var cfgSelected = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
+	this.delegateConfig(type, args, obj);
+	var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : []; 
+	this.cfg.setProperty(cfgSelected, selected, true);
+};
+
+
+/**
+* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
+* @method delegateConfig
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.CalendarGroup.prototype.delegateConfig = function(type, args, obj) {
+	var val = args[0];
+	var cal;
+
+	for (var p=0;p<this.pages.length;p++) {
+		cal = this.pages[p];
+		cal.cfg.setProperty(type, val);
+	}
+};
+
+
+/**
+* Adds a function to all child Calendars within this CalendarGroup.
+* @method setChildFunction
+* @param {String}		fnName		The name of the function
+* @param {Function}		fn			The function to apply to each Calendar page object
+*/
+YAHOO.widget.CalendarGroup.prototype.setChildFunction = function(fnName, fn) {
+	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+
+	for (var p=0;p<pageCount;++p) {
+		this.pages[p][fnName] = fn;
+	}
+};
+
+/**
+* Calls a function within all child Calendars within this CalendarGroup.
+* @method callChildFunction
+* @param {String}		fnName		The name of the function
+* @param {Array}		args		The arguments to pass to the function
+*/
+YAHOO.widget.CalendarGroup.prototype.callChildFunction = function(fnName, args) {
+	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+
+	for (var p=0;p<pageCount;++p) {
+		var page = this.pages[p];
+		if (page[fnName]) {
+			var fn = page[fnName];
+			fn.call(page, args);
+		}
+	}	
+};
+
+/**
+* Constructs a child calendar. This method can be overridden if a subclassed version of the default
+* calendar is to be used.
+* @method constructChild
+* @param {String}	id			The id of the table element that will represent the calendar widget
+* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+* @param {Object}	config		The configuration object containing the Calendar's arguments
+* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
+*/
+YAHOO.widget.CalendarGroup.prototype.constructChild = function(id,containerId,config) {
+	var container = document.getElementById(containerId);
+	if (! container) {
+		container = document.createElement("div");
+		container.id = containerId;
+		this.oDomContainer.appendChild(container);
+	}
+	return new YAHOO.widget.Calendar(id,containerId,config);
+};
+
+
+/**
+* Sets the calendar group's month explicitly. This month will be set into the first
+* page of the multi-page calendar, and all other months will be iterated appropriately.
+* @method setMonth
+* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+*/
+YAHOO.widget.CalendarGroup.prototype.setMonth = function(month) {
+	month = parseInt(month, 10);
+	var currYear;
+	
+	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+	for (var p=0; p<this.pages.length; ++p) {
+		var cal = this.pages[p];
+		var pageDate = cal.cfg.getProperty(cfgPageDate);
+		if (p === 0) {
+			currYear = pageDate.getFullYear();
+		} else {
+			pageDate.setYear(currYear);
+		}
+		this._setMonthOnDate(pageDate, month+p); 
+		cal.cfg.setProperty(cfgPageDate, pageDate);
+	}
+};
+
+/**
+* Sets the calendar group's year explicitly. This year will be set into the first
+* page of the multi-page calendar, and all other months will be iterated appropriately.
+* @method setYear
+* @param {Number}	year		The numeric 4-digit year
+*/
+YAHOO.widget.CalendarGroup.prototype.setYear = function(year) {
+
+	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+
+	year = parseInt(year, 10);
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		var pageDate = cal.cfg.getProperty(cfgPageDate);
+
+		if ((pageDate.getMonth()+1) == 1 && p>0) {
+			year+=1;
+		}
+		cal.setYear(year);
+	}
+};
+/**
+* Calls the render function of all child calendars within the group.
+* @method render
+*/
+YAHOO.widget.CalendarGroup.prototype.render = function() {
+	this.renderHeader();
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.render();
+	}
+	this.renderFooter();
+};
+
+/**
+* Selects a date or a collection of dates on the current calendar. This method, by default,
+* does not call the render method explicitly. Once selection has completed, render must be 
+* called for the changes to be reflected visually.
+* @method select
+* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+*								This method can also take a JavaScript Date object or an array of Date objects.
+* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.CalendarGroup.prototype.select = function(date) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.select(date);
+	}
+	return this.getSelectedDates();
+};
+
+/**
+* Selects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+* The value of the MULTI_SELECT Configuration attribute will determine the set of dates which get selected. 
+* <ul>
+*    <li>If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.</li>
+*    <li>If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.</li>
+* </ul>
+* @method selectCell
+* @param	{Number}	cellIndex	The index of the cell to be selected. 
+* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.CalendarGroup.prototype.selectCell = function(cellIndex) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.selectCell(cellIndex);
+	}
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects a date or a collection of dates on the current calendar. This method, by default,
+* does not call the render method explicitly. Once deselection has completed, render must be 
+* called for the changes to be reflected visually.
+* @method deselect
+* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+*								This method can also take a JavaScript Date object or an array of Date objects.	
+* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.CalendarGroup.prototype.deselect = function(date) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.deselect(date);
+	}
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects all dates on the current calendar.
+* @method deselectAll
+* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+*						Assuming that this function executes properly, the return value should be an empty array.
+*						However, the empty array is returned for the sake of being able to check the selection status
+*						of the calendar.
+*/
+YAHOO.widget.CalendarGroup.prototype.deselectAll = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.deselectAll();
+	}
+	return this.getSelectedDates();
+};
+
+/**
+* Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+* deselectCell will deselect the cell at the specified index on each displayed Calendar page.
+*
+* @method deselectCell
+* @param	{Number}	cellIndex	The index of the cell to deselect. 
+* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.CalendarGroup.prototype.deselectCell = function(cellIndex) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.deselectCell(cellIndex);
+	}
+	return this.getSelectedDates();
+};
+
+/**
+* Resets the calendar widget to the originally selected month and year, and 
+* sets the calendar to the initial selection(s).
+* @method reset
+*/
+YAHOO.widget.CalendarGroup.prototype.reset = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.reset();
+	}
+};
+
+/**
+* Clears the selected dates in the current calendar widget and sets the calendar
+* to the current month and year.
+* @method clear
+*/
+YAHOO.widget.CalendarGroup.prototype.clear = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.clear();
+	}
+};
+
+/**
+* Navigates to the next month page in the calendar widget.
+* @method nextMonth
+*/
+YAHOO.widget.CalendarGroup.prototype.nextMonth = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.nextMonth();
+	}
+};
+
+/**
+* Navigates to the previous month page in the calendar widget.
+* @method previousMonth
+*/
+YAHOO.widget.CalendarGroup.prototype.previousMonth = function() {
+	for (var p=this.pages.length-1;p>=0;--p) {
+		var cal = this.pages[p];
+		cal.previousMonth();
+	}
+};
+
+/**
+* Navigates to the next year in the currently selected month in the calendar widget.
+* @method nextYear
+*/
+YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.nextYear();
+	}
+};
+
+/**
+* Navigates to the previous year in the currently selected month in the calendar widget.
+* @method previousYear
+*/
+YAHOO.widget.CalendarGroup.prototype.previousYear = function() {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.previousYear();
+	}
+};
+
+
+/**
+* Gets the list of currently selected dates from the calendar.
+* @return			An array of currently selected JavaScript Date objects.
+* @type Date[]
+*/
+YAHOO.widget.CalendarGroup.prototype.getSelectedDates = function() { 
+	var returnDates = [];
+	var selected = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
+	for (var d=0;d<selected.length;++d) {
+		var dateArray = selected[d];
+
+		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
+		returnDates.push(date);
+	}
+
+	returnDates.sort( function(a,b) { return a-b; } );
+	return returnDates;
+};
+
+/**
+* Adds a renderer to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the conditions specified in the date string for this renderer.
+* @method addRenderer
+* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.CalendarGroup.prototype.addRenderer = function(sDates, fnRender) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.addRenderer(sDates, fnRender);
+	}
+};
+
+/**
+* Adds a month to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the month passed to this method.
+* @method addMonthRenderer
+* @param	{Number}	month		The month (1-12) to associate with this renderer
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.CalendarGroup.prototype.addMonthRenderer = function(month, fnRender) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.addMonthRenderer(month, fnRender);
+	}
+};
+
+/**
+* Adds a weekday to the render stack. The function reference passed to this method will be executed
+* when a date cell matches the weekday passed to this method.
+* @method addWeekdayRenderer
+* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
+* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+*/
+YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer = function(weekday, fnRender) {
+	for (var p=0;p<this.pages.length;++p) {
+		var cal = this.pages[p];
+		cal.addWeekdayRenderer(weekday, fnRender);
+	}
+};
+
+/**
+* Renders the header for the CalendarGroup.
+* @method renderHeader
+*/
+YAHOO.widget.CalendarGroup.prototype.renderHeader = function() {};
+
+/**
+* Renders a footer for the 2-up calendar container. By default, this method is
+* unimplemented.
+* @method renderFooter
+*/
+YAHOO.widget.CalendarGroup.prototype.renderFooter = function() {};
+
+/**
+* Adds the designated number of months to the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method addMonths
+* @param {Number}	count	The number of months to add to the current calendar
+*/
+YAHOO.widget.CalendarGroup.prototype.addMonths = function(count) {
+	this.callChildFunction("addMonths", count);
+};
+
+
+/**
+* Subtracts the designated number of months from the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method subtractMonths
+* @param {Number}	count	The number of months to subtract from the current calendar
+*/
+YAHOO.widget.CalendarGroup.prototype.subtractMonths = function(count) {
+	this.callChildFunction("subtractMonths", count);
+};
+
+/**
+* Adds the designated number of years to the current calendar, and sets the current
+* calendar page date to the new month.
+* @method addYears
+* @param {Number}	count	The number of years to add to the current calendar
+*/
+YAHOO.widget.CalendarGroup.prototype.addYears = function(count) {
+	this.callChildFunction("addYears", count);
+};
+
+/**
+* Subtcats the designated number of years from the current calendar, and sets the current
+* calendar page date to the new month.
+* @method subtractYears
+* @param {Number}	count	The number of years to subtract from the current calendar
+*/
+YAHOO.widget.CalendarGroup.prototype.subtractYears = function(count) {
+	this.callChildFunction("subtractYears", count);
+};
+
+/**
+* Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
+* The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
+* @method	_setMonthOnDate
+* @private
+* @param	{Date}	date	The Date object on which to set the month index
+* @param	{Number}	iMonth	The month index to set
+*/
+YAHOO.widget.CalendarGroup.prototype._setMonthOnDate = function(date, iMonth) {
+	// BUG in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
+	if (this.browser == "safari" && (iMonth < 0 || iMonth > 11)) {
+		var DM = YAHOO.widget.DateMath;
+		var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
+		date.setTime(newDate.getTime());
+	} else {
+		date.setMonth(iMonth);
+	}
+};
+
+
+/**
+* CSS class representing the container for the calendar
+* @property YAHOO.widget.CalendarGroup.CSS_CONTAINER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_CONTAINER = "yui-calcontainer";
+
+/**
+* CSS class representing the container for the calendar
+* @property YAHOO.widget.CalendarGroup.CSS_MULTI_UP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_MULTI_UP = "multi";
+
+/**
+* CSS class representing the title for the 2-up calendar
+* @property YAHOO.widget.CalendarGroup.CSS_2UPTITLE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_2UPTITLE = "title";
+
+/**
+* CSS class representing the close icon for the 2-up calendar
+* @property YAHOO.widget.CalendarGroup.CSS_2UPCLOSE
+* @static
+* @final
+* @deprecated	Along with Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT configuration properties.
+*					Calendar's <a href="YAHOO.widget.Calendar.html#Style.CSS_CLOSE">Style.CSS_CLOSE</a> property now represents the CSS class used to render the close icon
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_2UPCLOSE = "close-icon";
+
+YAHOO.augment(YAHOO.widget.CalendarGroup, YAHOO.widget.Calendar, "buildDayLabel",
+																 "buildMonthLabel",
+																 "renderOutOfBoundsDate",
+																 "renderRowHeader",
+																 "renderRowFooter",
+																 "renderCellDefault",
+																 "styleCellDefault",
+																 "renderCellStyleHighlight1",
+																 "renderCellStyleHighlight2",
+																 "renderCellStyleHighlight3",
+																 "renderCellStyleHighlight4",
+																 "renderCellStyleToday",
+																 "renderCellStyleSelected",
+																 "renderCellNotThisMonth",
+																 "renderBodyCellRestricted",
+																 "initStyles",
+																 "configTitle",
+																 "configClose",
+																 "configIframe",
+																 "hide",
+																 "show",
+																 "browser");
+
+/**
+* The set of default Config property keys and values for the CalendarGroup
+* @property YAHOO.widget.CalendarGroup._DEFAULT_CONFIG
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.CalendarGroup._DEFAULT_CONFIG = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES = {key:"pages", value:2};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	A string representation of the CalendarGroup object.
+*/
+YAHOO.widget.CalendarGroup.prototype.toString = function() {
+	return "CalendarGroup " + this.id;
+};
+
+YAHOO.widget.CalGrp = YAHOO.widget.CalendarGroup;
+
+/**
+* @class YAHOO.widget.Calendar2up
+* @extends YAHOO.widget.CalendarGroup
+* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
+*/
+YAHOO.widget.Calendar2up = function(id, containerId, config) {
+	this.init(id, containerId, config);
+};
+
+YAHOO.extend(YAHOO.widget.Calendar2up, YAHOO.widget.CalendarGroup);
+
+/**
+* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
+*/
+YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
+
+YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.2.1", build: "193"});

Modified: jifty/trunk/share/web/static/js/yui/container.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/container.js	(original)
+++ jifty/trunk/share/web/static/js/yui/container.js	Thu Apr 12 03:32:44 2007
@@ -1,4614 +1,5398 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version 0.12.1
-*/
-
-/**
-* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
-* @namespace YAHOO.util
-* @class Config
-* @constructor
-* @param {Object}	owner	The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config = function(owner) {
-	if (owner) {
-		this.init(owner);
-	}
-};
-
-YAHOO.util.Config.prototype = {
-
-	/**
-	* Object reference to the owner of this Config Object
-	* @property owner
-	* @type Object
-	*/
-	owner : null,
-
-	/**
-	* Boolean flag that specifies whether a queue is currently being executed
-	* @property queueInProgress
-	* @type Boolean
-	*/
-	queueInProgress : false,
-
-
-	/**
-	* Validates that the value passed in is a Boolean.
-	* @method checkBoolean
-	* @param	{Object}	val	The value to validate
-	* @return	{Boolean}	true, if the value is valid
-	*/
-	checkBoolean: function(val) {
-		if (typeof val == 'boolean') {
-			return true;
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Validates that the value passed in is a number.
-	* @method checkNumber
-	* @param	{Object}	val	The value to validate
-	* @return	{Boolean}	true, if the value is valid
-	*/
-	checkNumber: function(val) {
-		if (isNaN(val)) {
-			return false;
-		} else {
-			return true;
-		}
-	}
-};
-
-
-/**
-* Initializes the configuration Object and all of its local members.
-* @method init
-* @param {Object}	owner	The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config.prototype.init = function(owner) {
-
-	this.owner = owner;
-
-	/**
-	* Object reference to the owner of this Config Object
-	* @event configChangedEvent
-	*/
-	this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
-
-	this.queueInProgress = false;
-
-	/* Private Members */
-
-	/**
-	* Maintains the local collection of configuration property objects and their specified values
-	* @property config
-	* @private
-	* @type Object
-	*/
-	var config = {};
-
-	/**
-	* Maintains the local collection of configuration property objects as they were initially applied.
-	* This object is used when resetting a property.
-	* @property initialConfig
-	* @private
-	* @type Object
-	*/
-	var initialConfig = {};
-
-	/**
-	* Maintains the local, normalized CustomEvent queue
-	* @property eventQueue
-	* @private
-	* @type Object
-	*/
-	var eventQueue = [];
-
-	/**
-	* Fires a configuration property event using the specified value.
-	* @method fireEvent
-	* @private
-	* @param {String}	key			The configuration property's name
-	* @param {value}	Object		The value of the correct type for the property
-	*/
-	var fireEvent = function( key, value ) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-
-		if (typeof property != 'undefined' && property.event) {
-			property.event.fire(value);
-		}
-	};
-	/* End Private Members */
-
-	/**
-	* Adds a property to the Config Object's private config hash.
-	* @method addProperty
-	* @param {String}	key	The configuration property's name
-	* @param {Object}	propertyObject	The Object containing all of this property's arguments
-	*/
-	this.addProperty = function( key, propertyObject ) {
-		key = key.toLowerCase();
-
-		config[key] = propertyObject;
-
-		propertyObject.event = new YAHOO.util.CustomEvent(key);
-		propertyObject.key = key;
-
-		if (propertyObject.handler) {
-			propertyObject.event.subscribe(propertyObject.handler, this.owner, true);
-		}
-
-		this.setProperty(key, propertyObject.value, true);
-
-		if (! propertyObject.suppressEvent) {
-			this.queueProperty(key, propertyObject.value);
-		}
-	};
-
-	/**
-	* Returns a key-value configuration map of the values currently set in the Config Object.
-	* @method getConfig
-	* @return {Object} The current config, represented in a key-value map
-	*/
-	this.getConfig = function() {
-		var cfg = {};
-
-		for (var prop in config) {
-			var property = config[prop];
-			if (typeof property != 'undefined' && property.event) {
-				cfg[prop] = property.value;
-			}
-		}
-
-		return cfg;
-	};
-
-	/**
-	* Returns the value of specified property.
-	* @method getProperty
-	* @param {String} key	The name of the property
-	* @return {Object}		The value of the specified property
-	*/
-	this.getProperty = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			return property.value;
-		} else {
-			return undefined;
-		}
-	};
-
-	/**
-	* Resets the specified property's value to its initial value.
-	* @method resetProperty
-	* @param {String} key	The name of the property
-	* @return {Boolean} True is the property was reset, false if not
-	*/
-	this.resetProperty = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			if (initialConfig[key] && initialConfig[key] != 'undefined')	{
-				this.setProperty(key, initialConfig[key]);
-			}
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
-	* @method setProperty
-	* @param {String} key		The name of the property
-	* @param {String} value		The value to set the property to
-	* @param {Boolean} silent	Whether the value should be set silently, without firing the property event.
-	* @return {Boolean}			True, if the set was successful, false if it failed.
-	*/
-	this.setProperty = function(key, value, silent) {
-		key = key.toLowerCase();
-
-		if (this.queueInProgress && ! silent) {
-			this.queueProperty(key,value); // Currently running through a queue...
-			return true;
-		} else {
-			var property = config[key];
-			if (typeof property != 'undefined' && property.event) {
-				if (property.validator && ! property.validator(value)) { // validator
-					return false;
-				} else {
-					property.value = value;
-					if (! silent) {
-						fireEvent(key, value);
-						this.configChangedEvent.fire([key, value]);
-					}
-					return true;
-				}
-			} else {
-				return false;
-			}
-		}
-	};
-
-	/**
-	* Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
-	* moved from its current position to the end of the queue.
-	* @method queueProperty
-	* @param {String} key	The name of the property
-	* @param {String} value	The value to set the property to
-	* @return {Boolean}		true, if the set was successful, false if it failed.
-	*/
-	this.queueProperty = function(key, value) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-
-		if (typeof property != 'undefined' && property.event) {
-			if (typeof value != 'undefined' && property.validator && ! property.validator(value)) { // validator
-				return false;
-			} else {
-
-				if (typeof value != 'undefined') {
-					property.value = value;
-				} else {
-					value = property.value;
-				}
-
-				var foundDuplicate = false;
-
-				for (var i=0;i<eventQueue.length;i++) {
-					var queueItem = eventQueue[i];
-
-					if (queueItem) {
-						var queueItemKey = queueItem[0];
-						var queueItemValue = queueItem[1];
-
-						if (queueItemKey.toLowerCase() == key) {
-							// found a dupe... push to end of queue, null current item, and break
-							eventQueue[i] = null;
-							eventQueue.push([key, (typeof value != 'undefined' ? value : queueItemValue)]);
-							foundDuplicate = true;
-							break;
-						}
-					}
-				}
-
-				if (! foundDuplicate && typeof value != 'undefined') { // this is a refire, or a new property in the queue
-					eventQueue.push([key, value]);
-				}
-			}
-
-			if (property.supercedes) {
-				for (var s=0;s<property.supercedes.length;s++) {
-					var supercedesCheck = property.supercedes[s];
-
-					for (var q=0;q<eventQueue.length;q++) {
-						var queueItemCheck = eventQueue[q];
-
-						if (queueItemCheck) {
-							var queueItemCheckKey = queueItemCheck[0];
-							var queueItemCheckValue = queueItemCheck[1];
-
-							if ( queueItemCheckKey.toLowerCase() == supercedesCheck.toLowerCase() ) {
-								eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
-								eventQueue[q] = null;
-								break;
-							}
-						}
-					}
-				}
-			}
-
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Fires the event for a property using the property's current value.
-	* @method refireEvent
-	* @param {String} key	The name of the property
-	*/
-	this.refireEvent = function(key) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event && typeof property.value != 'undefined') {
-			if (this.queueInProgress) {
-				this.queueProperty(key);
-			} else {
-				fireEvent(key, property.value);
-			}
-		}
-	};
-
-	/**
-	* Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
-	* Although the values will be set, fireQueue() must be called for their associated events to execute.
-	* @method applyConfig
-	* @param {Object}	userConfig	The configuration Object literal
-	* @param {Boolean}	init		When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.
-	*/
-	this.applyConfig = function(userConfig, init) {
-		if (init) {
-			initialConfig = userConfig;
-		}
-		for (var prop in userConfig) {
-			this.queueProperty(prop, userConfig[prop]);
-		}
-	};
-
-	/**
-	* Refires the events for all configuration properties using their current values.
-	* @method refresh
-	*/
-	this.refresh = function() {
-		for (var prop in config) {
-			this.refireEvent(prop);
-		}
-	};
-
-	/**
-	* Fires the normalized list of queued property change events
-	* @method fireQueue
-	*/
-	this.fireQueue = function() {
-		this.queueInProgress = true;
-		for (var i=0;i<eventQueue.length;i++) {
-			var queueItem = eventQueue[i];
-			if (queueItem) {
-				var key = queueItem[0];
-				var value = queueItem[1];
-
-				var property = config[key];
-				property.value = value;
-
-				fireEvent(key,value);
-			}
-		}
-
-		this.queueInProgress = false;
-		eventQueue = [];
-	};
-
-	/**
-	* Subscribes an external handler to the change event for any given property.
-	* @method subscribeToConfigEvent
-	* @param {String}	key			The property name
-	* @param {Function}	handler		The handler function to use subscribe to the property's event
-	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
-	* @param {Boolean}	override	Optional. If true, will override "this" within the handler to map to the scope Object passed into the method.
-	* @return {Boolean}				True, if the subscription was successful, otherwise false.
-	*/
-	this.subscribeToConfigEvent = function(key, handler, obj, override) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			if (! YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
-				property.event.subscribe(handler, obj, override);
-			}
-			return true;
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Unsubscribes an external handler from the change event for any given property.
-	* @method unsubscribeFromConfigEvent
-	* @param {String}	key			The property name
-	* @param {Function}	handler		The handler function to use subscribe to the property's event
-	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
-	* @return {Boolean}				True, if the unsubscription was successful, otherwise false.
-	*/
-	this.unsubscribeFromConfigEvent = function(key, handler, obj) {
-		key = key.toLowerCase();
-
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event) {
-			return property.event.unsubscribe(handler, obj);
-		} else {
-			return false;
-		}
-	};
-
-	/**
-	* Returns a string representation of the Config object
-	* @method toString
-	* @return {String}	The Config object in string format.
-	*/
-	this.toString = function() {
-		var output = "Config";
-		if (this.owner) {
-			output += " [" + this.owner.toString() + "]";
-		}
-		return output;
-	};
-
-	/**
-	* Returns a string representation of the Config object's current CustomEvent queue
-	* @method outputEventQueue
-	* @return {String}	The string list of CustomEvents currently queued for execution
-	*/
-	this.outputEventQueue = function() {
-		var output = "";
-		for (var q=0;q<eventQueue.length;q++) {
-			var queueItem = eventQueue[q];
-			if (queueItem) {
-				output += queueItem[0] + "=" + queueItem[1] + ", ";
-			}
-		}
-		return output;
-	};
-};
-
-/**
-* Checks to determine if a particular function/Object pair are already subscribed to the specified CustomEvent
-* @method YAHOO.util.Config.alreadySubscribed
-* @static
-* @param {YAHOO.util.CustomEvent} evt	The CustomEvent for which to check the subscriptions
-* @param {Function}	fn	The function to look for in the subscribers list
-* @param {Object}	obj	The execution scope Object for the subscription
-* @return {Boolean}	true, if the function/Object pair is already subscribed to the CustomEvent passed in
-*/
-YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
-	for (var e=0;e<evt.subscribers.length;e++) {
-		var subsc = evt.subscribers[e];
-		if (subsc && subsc.obj == obj && subsc.fn == fn) {
-			return true;
-		}
-	}
-	return false;
-};
-
-/**
-*  The Container family of components is designed to enable developers to create different kinds of content-containing modules on the web. Module and Overlay are the most basic containers, and they can be used directly or extended to build custom containers. Also part of the Container family are four UI controls that extend Module and Overlay: Tooltip, Panel, Dialog, and SimpleDialog.
-* @module container
-* @title Container
-* @requires yahoo,dom,event,dragdrop,animation
-*/
-
-/**
-* Module is a JavaScript representation of the Standard Module Format. Standard Module Format is a simple standard for markup containers where child nodes representing the header, body, and footer of the content are denoted using the CSS classes "hd", "bd", and "ft" respectively. Module is the base class for all other classes in the YUI Container package.
-* @namespace YAHOO.widget
-* @class Module
-* @constructor
-* @param {String} el			The element ID representing the Module <em>OR</em>
-* @param {HTMLElement} el		The element representing the Module
-* @param {Object} userConfig	The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
-*/
-YAHOO.widget.Module = function(el, userConfig) {
-	if (el) {
-		this.init(el, userConfig);
-	}
-};
-
-/**
-* Constant representing the prefix path to use for non-secure images
-* @property YAHOO.widget.Module.IMG_ROOT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.IMG_ROOT = "http://us.i1.yimg.com/us.yimg.com/i/";
-
-/**
-* Constant representing the prefix path to use for securely served images
-* @property YAHOO.widget.Module.IMG_ROOT_SSL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.IMG_ROOT_SSL = "https://a248.e.akamai.net/sec.yimg.com/i/";
-
-/**
-* Constant for the default CSS class name that represents a Module
-* @property YAHOO.widget.Module.CSS_MODULE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_MODULE = "module";
-
-/**
-* Constant representing the module header
-* @property YAHOO.widget.Module.CSS_HEADER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_HEADER = "hd";
-
-/**
-* Constant representing the module body
-* @property YAHOO.widget.Module.CSS_BODY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_BODY = "bd";
-
-/**
-* Constant representing the module footer
-* @property YAHOO.widget.Module.CSS_FOOTER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_FOOTER = "ft";
-
-/**
-* Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
-* @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = "javascript:false;";
-
-/**
-* Singleton CustomEvent fired when the font size is changed in the browser.
-* Opera's "zoom" functionality currently does not support text size detection.
-* @event YAHOO.widget.Module.textResizeEvent
-*/
-YAHOO.widget.Module.textResizeEvent = new YAHOO.util.CustomEvent("textResize");
-
-YAHOO.widget.Module.prototype = {
-	/**
-	* The class's constructor function
-	* @property contructor
-	* @type Function
-	*/
-	constructor : YAHOO.widget.Module,
-
-	/**
-	* The main module element that contains the header, body, and footer
-	* @property element
-	* @type HTMLElement
-	*/
-	element : null,
-
-	/**
-	* The header element, denoted with CSS class "hd"
-	* @property header
-	* @type HTMLElement
-	*/
-	header : null,
-
-	/**
-	* The body element, denoted with CSS class "bd"
-	* @property body
-	* @type HTMLElement
-	*/
-	body : null,
-
-	/**
-	* The footer element, denoted with CSS class "ft"
-	* @property footer
-	* @type HTMLElement
-	*/
-	footer : null,
-
-	/**
-	* The id of the element
-	* @property id
-	* @type String
-	*/
-	id : null,
-
-	/**
-	* The String representing the image root
-	* @property imageRoot
-	* @type String
-	*/
-	imageRoot : YAHOO.widget.Module.IMG_ROOT,
-
-	/**
-	* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
-	* @method initEvents
-	*/
-	initEvents : function() {
-
-		/**
-		* CustomEvent fired prior to class initalization.
-		* @event beforeInitEvent
-		* @param {class} classRef	class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
-		*/
-		this.beforeInitEvent = new YAHOO.util.CustomEvent("beforeInit");
-
-		/**
-		* CustomEvent fired after class initalization.
-		* @event initEvent
-		* @param {class} classRef	class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
-		*/
-		this.initEvent = new YAHOO.util.CustomEvent("init");
-
-		/**
-		* CustomEvent fired when the Module is appended to the DOM
-		* @event appendEvent
-		*/
-		this.appendEvent = new YAHOO.util.CustomEvent("append");
-
-		/**
-		* CustomEvent fired before the Module is rendered
-		* @event beforeRenderEvent
-		*/
-		this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
-
-		/**
-		* CustomEvent fired after the Module is rendered
-		* @event renderEvent
-		*/
-		this.renderEvent = new YAHOO.util.CustomEvent("render");
-
-		/**
-		* CustomEvent fired when the header content of the Module is modified
-		* @event changeHeaderEvent
-		* @param {String/HTMLElement} content	String/element representing the new header content
-		*/
-		this.changeHeaderEvent = new YAHOO.util.CustomEvent("changeHeader");
-
-		/**
-		* CustomEvent fired when the body content of the Module is modified
-		* @event changeBodyEvent
-		* @param {String/HTMLElement} content	String/element representing the new body content
-		*/
-		this.changeBodyEvent = new YAHOO.util.CustomEvent("changeBody");
-
-		/**
-		* CustomEvent fired when the footer content of the Module is modified
-		* @event changeFooterEvent
-		* @param {String/HTMLElement} content	String/element representing the new footer content
-		*/
-		this.changeFooterEvent = new YAHOO.util.CustomEvent("changeFooter");
-
-		/**
-		* CustomEvent fired when the content of the Module is modified
-		* @event changeContentEvent
-		*/
-		this.changeContentEvent = new YAHOO.util.CustomEvent("changeContent");
-
-		/**
-		* CustomEvent fired when the Module is destroyed
-		* @event destroyEvent
-		*/
-		this.destroyEvent = new YAHOO.util.CustomEvent("destroy");
-
-		/**
-		* CustomEvent fired before the Module is shown
-		* @event beforeShowEvent
-		*/
-		this.beforeShowEvent = new YAHOO.util.CustomEvent("beforeShow");
-
-		/**
-		* CustomEvent fired after the Module is shown
-		* @event showEvent
-		*/
-		this.showEvent = new YAHOO.util.CustomEvent("show");
-
-		/**
-		* CustomEvent fired before the Module is hidden
-		* @event beforeHideEvent
-		*/
-		this.beforeHideEvent = new YAHOO.util.CustomEvent("beforeHide");
-
-		/**
-		* CustomEvent fired after the Module is hidden
-		* @event hideEvent
-		*/
-		this.hideEvent = new YAHOO.util.CustomEvent("hide");
-	},
-
-	/**
-	* String representing the current user-agent platform
-	* @property platform
-	* @type String
-	*/
-	platform : function() {
-					var ua = navigator.userAgent.toLowerCase();
-					if (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1) {
-						return "windows";
-					} else if (ua.indexOf("macintosh") != -1) {
-						return "mac";
-					} else {
-						return false;
-					}
-				}(),
-
-	/**
-	* String representing the current user-agent browser
-	* @property browser
-	* @type String
-	*/
-	browser : function() {
-			var ua = navigator.userAgent.toLowerCase();
-				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
-					 return 'opera';
-				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
-					 return 'ie7';
-				  } else if (ua.indexOf('msie') !=-1) { // IE
-					 return 'ie';
-				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
-					 return 'safari';
-				  } else if (ua.indexOf('gecko') != -1) { // Gecko
-					 return 'gecko';
-				  } else {
-					 return false;
-				  }
-			}(),
-
-	/**
-	* Boolean representing whether or not the current browsing context is secure (https)
-	* @property isSecure
-	* @type Boolean
-	*/
-	isSecure : function() {
-		if (window.location.href.toLowerCase().indexOf("https") === 0) {
-			return true;
-		} else {
-			return false;
-		}
-	}(),
-
-	/**
-	* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
-	*/
-	initDefaultConfig : function() {
-		// Add properties //
-
-		/**
-		* Specifies whether the Module is visible on the page.
-		* @config visible
-		* @type Boolean
-		* @default true
-		*/
-		this.cfg.addProperty("visible", { value:true, handler:this.configVisible, validator:this.cfg.checkBoolean } );
-
-		/**
-		* Object or array of objects representing the ContainerEffect classes that are active for animating the container.
-		* @config effect
-		* @type Object
-		* @default null
-		*/
-		this.cfg.addProperty("effect", { suppressEvent:true, supercedes:["visible"] } );
-
-		/**
-		* Specifies whether to create a special proxy iframe to monitor for user font resizing in the document
-		* @config monitorresize
-		* @type Boolean
-		* @default true
-		*/
-		this.cfg.addProperty("monitorresize", { value:true, handler:this.configMonitorResize } );
-	},
-
-	/**
-	* The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-	* @method init
-	* @param {String}	el	The element ID representing the Module <em>OR</em>
-	* @param {HTMLElement}	el	The element representing the Module
-	* @param {Object}	userConfig	The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
-	*/
-	init : function(el, userConfig) {
-
-		this.initEvents();
-
-		this.beforeInitEvent.fire(YAHOO.widget.Module);
-
-		/**
-		* The Module's Config object used for monitoring configuration properties.
-		* @property cfg
-		* @type YAHOO.util.Config
-		*/
-		this.cfg = new YAHOO.util.Config(this);
-
-		if (this.isSecure) {
-			this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
-		}
-
-		if (typeof el == "string") {
-			var elId = el;
-
-			el = document.getElementById(el);
-			if (! el) {
-				el = document.createElement("DIV");
-				el.id = elId;
-			}
-		}
-
-		this.element = el;
-
-		if (el.id) {
-			this.id = el.id;
-		}
-
-		var childNodes = this.element.childNodes;
-
-		if (childNodes) {
-			for (var i=0;i<childNodes.length;i++) {
-				var child = childNodes[i];
-				switch (child.className) {
-					case YAHOO.widget.Module.CSS_HEADER:
-						this.header = child;
-						break;
-					case YAHOO.widget.Module.CSS_BODY:
-						this.body = child;
-						break;
-					case YAHOO.widget.Module.CSS_FOOTER:
-						this.footer = child;
-						break;
-				}
-			}
-		}
-
-		this.initDefaultConfig();
-
-		YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Module.CSS_MODULE);
-
-		if (userConfig) {
-			this.cfg.applyConfig(userConfig, true);
-		}
-
-		// Subscribe to the fireQueue() method of Config so that any queued configuration changes are
-		// excecuted upon render of the Module
-		if (! YAHOO.util.Config.alreadySubscribed(this.renderEvent, this.cfg.fireQueue, this.cfg)) {
-			this.renderEvent.subscribe(this.cfg.fireQueue, this.cfg, true);
-		}
-
-		this.initEvent.fire(YAHOO.widget.Module);
-	},
-
-	/**
-	* Initialized an empty IFRAME that is placed out of the visible area that can be used to detect text resize.
-	* @method initResizeMonitor
-	*/
-	initResizeMonitor : function() {
-
-        if(this.browser != "opera") {
-
-            var resizeMonitor = document.getElementById("_yuiResizeMonitor");
-
-            if (! resizeMonitor) {
-
-                resizeMonitor = document.createElement("iframe");
-
-                var bIE = (this.browser.indexOf("ie") === 0);
-
-                if(this.isSecure &&
-                   YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL &&
-                   bIE) {
-
-                  resizeMonitor.src =
-                       YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;
-
-                }
-
-                resizeMonitor.id = "_yuiResizeMonitor";
-                resizeMonitor.style.visibility = "hidden";
-
-                document.body.appendChild(resizeMonitor);
-
-                resizeMonitor.style.width = "10em";
-                resizeMonitor.style.height = "10em";
-                resizeMonitor.style.position = "absolute";
-
-                var nLeft = -1 * resizeMonitor.offsetWidth,
-                    nTop = -1 * resizeMonitor.offsetHeight;
-
-                resizeMonitor.style.top = nTop + "px";
-                resizeMonitor.style.left =  nLeft + "px";
-                resizeMonitor.style.borderStyle = "none";
-                resizeMonitor.style.borderWidth = "0";
-                YAHOO.util.Dom.setStyle(resizeMonitor, "opacity", "0");
-
-                resizeMonitor.style.visibility = "visible";
-
-                if(!bIE) {
-
-                    var doc = resizeMonitor.contentWindow.document;
-
-                    doc.open();
-                    doc.close();
-
-                }
-            }
-
-			var fireTextResize = function() {
-				YAHOO.widget.Module.textResizeEvent.fire();
-			};
-
-            if(resizeMonitor && resizeMonitor.contentWindow) {
-                this.resizeMonitor = resizeMonitor;
-
-				YAHOO.widget.Module.textResizeEvent.subscribe(this.onDomResize, this, true);
-
-				if (! YAHOO.widget.Module.textResizeInitialized) {
-					if (! YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow, "resize", fireTextResize)) {
-						// This will fail in IE if document.domain has changed, so we must change the listener to
-						// use the resizeMonitor element instead
-						YAHOO.util.Event.addListener(this.resizeMonitor, "resize", fireTextResize);
-					}
-					YAHOO.widget.Module.textResizeInitialized = true;
-				}
-            }
-
-        }
-
-	},
-
-	/**
-	* Event handler fired when the resize monitor element is resized.
-	* @method onDomResize
-	* @param {DOMEvent} e	The DOM resize event
-	* @param {Object} obj	The scope object passed to the handler
-	*/
-	onDomResize : function(e, obj) {
-
-        var nLeft = -1 * this.resizeMonitor.offsetWidth,
-            nTop = -1 * this.resizeMonitor.offsetHeight;
-
-        this.resizeMonitor.style.top = nTop + "px";
-        this.resizeMonitor.style.left =  nLeft + "px";
-
-	},
-
-	/**
-	* Sets the Module's header content to the HTML specified, or appends the passed element to the header. If no header is present, one will be automatically created.
-	* @method setHeader
-	* @param {String}	headerContent	The HTML used to set the header <em>OR</em>
-	* @param {HTMLElement}	headerContent	The HTMLElement to append to the header
-	*/
-	setHeader : function(headerContent) {
-		if (! this.header) {
-			this.header = document.createElement("DIV");
-			this.header.className = YAHOO.widget.Module.CSS_HEADER;
-		}
-
-		if (typeof headerContent == "string") {
-			this.header.innerHTML = headerContent;
-		} else {
-			this.header.innerHTML = "";
-			this.header.appendChild(headerContent);
-		}
-
-		this.changeHeaderEvent.fire(headerContent);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Appends the passed element to the header. If no header is present, one will be automatically created.
-	* @method appendToHeader
-	* @param {HTMLElement}	element	The element to append to the header
-	*/
-	appendToHeader : function(element) {
-		if (! this.header) {
-			this.header = document.createElement("DIV");
-			this.header.className = YAHOO.widget.Module.CSS_HEADER;
-		}
-
-		this.header.appendChild(element);
-		this.changeHeaderEvent.fire(element);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
-	* @method setBody
-	* @param {String}	bodyContent	The HTML used to set the body <em>OR</em>
-	* @param {HTMLElement}	bodyContent	The HTMLElement to append to the body
-	*/
-	setBody : function(bodyContent) {
-		if (! this.body) {
-			this.body = document.createElement("DIV");
-			this.body.className = YAHOO.widget.Module.CSS_BODY;
-		}
-
-		if (typeof bodyContent == "string")
-		{
-			this.body.innerHTML = bodyContent;
-		} else {
-			this.body.innerHTML = "";
-			this.body.appendChild(bodyContent);
-		}
-
-		this.changeBodyEvent.fire(bodyContent);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Appends the passed element to the body. If no body is present, one will be automatically created.
-	* @method appendToBody
-	* @param {HTMLElement}	element	The element to append to the body
-	*/
-	appendToBody : function(element) {
-		if (! this.body) {
-			this.body = document.createElement("DIV");
-			this.body.className = YAHOO.widget.Module.CSS_BODY;
-		}
-
-		this.body.appendChild(element);
-		this.changeBodyEvent.fire(element);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
-	* @method setFooter
-	* @param {String}	footerContent	The HTML used to set the footer <em>OR</em>
-	* @param {HTMLElement}	footerContent	The HTMLElement to append to the footer
-	*/
-	setFooter : function(footerContent) {
-		if (! this.footer) {
-			this.footer = document.createElement("DIV");
-			this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
-		}
-
-		if (typeof footerContent == "string") {
-			this.footer.innerHTML = footerContent;
-		} else {
-			this.footer.innerHTML = "";
-			this.footer.appendChild(footerContent);
-		}
-
-		this.changeFooterEvent.fire(footerContent);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Appends the passed element to the footer. If no footer is present, one will be automatically created.
-	* @method appendToFooter
-	* @param {HTMLElement}	element	The element to append to the footer
-	*/
-	appendToFooter : function(element) {
-		if (! this.footer) {
-			this.footer = document.createElement("DIV");
-			this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
-		}
-
-		this.footer.appendChild(element);
-		this.changeFooterEvent.fire(element);
-		this.changeContentEvent.fire();
-	},
-
-	/**
-	* Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. NOTE: For Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
-	* @method render
-	* @param {String}	appendToNode	The element id to which the Module should be appended to prior to rendering <em>OR</em>
-	* @param {HTMLElement}	appendToNode	The element to which the Module should be appended to prior to rendering
-	* @param {HTMLElement}	moduleElement	OPTIONAL. The element that represents the actual Standard Module container.
-	* @return {Boolean} Success or failure of the render
-	*/
-	render : function(appendToNode, moduleElement) {
-		this.beforeRenderEvent.fire();
-
-		if (! moduleElement) {
-			moduleElement = this.element;
-		}
-
-		var me = this;
-		var appendTo = function(element) {
-			if (typeof element == "string") {
-				element = document.getElementById(element);
-			}
-
-			if (element) {
-				element.appendChild(me.element);
-				me.appendEvent.fire();
-			}
-		};
-
-		if (appendToNode) {
-			appendTo(appendToNode);
-		} else { // No node was passed in. If the element is not pre-marked up, this fails
-			if (! YAHOO.util.Dom.inDocument(this.element)) {
-				return false;
-			}
-		}
-
-		// Need to get everything into the DOM if it isn't already
-
-		if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
-			// There is a header, but it's not in the DOM yet... need to add it
-			var firstChild = moduleElement.firstChild;
-			if (firstChild) { // Insert before first child if exists
-				moduleElement.insertBefore(this.header, firstChild);
-			} else { // Append to empty body because there are no children
-				moduleElement.appendChild(this.header);
-			}
-		}
-
-		if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
-			// There is a body, but it's not in the DOM yet... need to add it
-			if (this.footer && YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before footer if exists in DOM
-				moduleElement.insertBefore(this.body, this.footer);
-			} else { // Append to element because there is no footer
-				moduleElement.appendChild(this.body);
-			}
-		}
-
-		if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
-			// There is a footer, but it's not in the DOM yet... need to add it
-			moduleElement.appendChild(this.footer);
-		}
-
-		this.renderEvent.fire();
-		return true;
-	},
-
-	/**
-	* Removes the Module element from the DOM and sets all child elements to null.
-	* @method destroy
-	*/
-	destroy : function() {
-		var parent;
-
-		if (this.element) {
-			YAHOO.util.Event.purgeElement(this.element, true);
-			parent = this.element.parentNode;
-		}
-		if (parent) {
-			parent.removeChild(this.element);
-		}
-
-		this.element = null;
-		this.header = null;
-		this.body = null;
-		this.footer = null;
-
-		for (var e in this) {
-			if (e instanceof YAHOO.util.CustomEvent) {
-				e.unsubscribeAll();
-			}
-		}
-
-		YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this);
-
-		this.destroyEvent.fire();
-	},
-
-	/**
-	* Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
-	* @method show
-	*/
-	show : function() {
-		this.cfg.setProperty("visible", true);
-	},
-
-	/**
-	* Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
-	* @method hide
-	*/
-	hide : function() {
-		this.cfg.setProperty("visible", false);
-	},
-
-	// BUILT-IN EVENT HANDLERS FOR MODULE //
-
-	/**
-	* Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
-	* This method is responsible for firing showEvent and hideEvent.
-	* @param {String} type	The CustomEvent type (usually the property name)
-	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-	* @method configVisible
-	*/
-	configVisible : function(type, args, obj) {
-		var visible = args[0];
-		if (visible) {
-			this.beforeShowEvent.fire();
-			YAHOO.util.Dom.setStyle(this.element, "display", "block");
-			this.showEvent.fire();
-		} else {
-			this.beforeHideEvent.fire();
-			YAHOO.util.Dom.setStyle(this.element, "display", "none");
-			this.hideEvent.fire();
-		}
-	},
-
-	/**
-	* Default event handler for the "monitorresize" configuration property
-	* @param {String} type	The CustomEvent type (usually the property name)
-	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-	* @method configMonitorResize
-	*/
-	configMonitorResize : function(type, args, obj) {
-		var monitor = args[0];
-		if (monitor) {
-			this.initResizeMonitor();
-		} else {
-			YAHOO.util.Event.removeListener(this.resizeMonitor, "resize", this.onDomResize);
-			this.resizeMonitor = null;
-		}
-	}
-};
-
-/**
-* Returns a String representation of the Object.
-* @method toString
-* @return {String}	The string representation of the Module
-*/
-YAHOO.widget.Module.prototype.toString = function() {
-	return "Module " + this.id;
-};
-
-/**
-* Overlay is a Module that is absolutely positioned above the page flow. It has convenience methods for positioning and sizing, as well as options for controlling zIndex and constraining the Overlay's position to the current visible viewport. Overlay also contains a dynamicly generated IFRAME which is placed beneath it for Internet Explorer 6 and 5.x so that it will be properly rendered above SELECT elements.
-* @namespace YAHOO.widget
-* @class Overlay
-* @extends YAHOO.widget.Module
-* @param {String}	el	The element ID representing the Overlay <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Overlay
-* @param {Object}	userConfig	The configuration object literal containing 10/23/2006the configuration that should be set for this Overlay. See configuration documentation for more details.
-* @constructor
-*/
-YAHOO.widget.Overlay = function(el, userConfig) {
-	YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
-
-/**
-* The URL that will be placed in the iframe
-* @property YAHOO.widget.Overlay.IFRAME_SRC
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.IFRAME_SRC = "javascript:false;";
-
-/**
-* Constant representing the top left corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.TOP_LEFT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.TOP_LEFT = "tl";
-
-/**
-* Constant representing the top right corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.TOP_RIGHT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.TOP_RIGHT = "tr";
-
-/**
-* Constant representing the top bottom left corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.BOTTOM_LEFT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
-
-/**
-* Constant representing the bottom right corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.BOTTOM_RIGHT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
-
-/**
-* Constant representing the default CSS class used for an Overlay
-* @property YAHOO.widget.Overlay.CSS_OVERLAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.CSS_OVERLAY = "overlay";
-
-/**
-* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String}	el	The element ID representing the Overlay <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Overlay
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
-	YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
-	this.beforeInitEvent.fire(YAHOO.widget.Overlay);
-
-	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
-
-	if (userConfig) {
-		this.cfg.applyConfig(userConfig, true);
-	}
-
-	if (this.platform == "mac" && this.browser == "gecko") {
-		if (! YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)) {
-			this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
-		}
-		if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)) {
-			this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
-		}
-	}
-
-	this.initEvent.fire(YAHOO.widget.Overlay);
-};
-
-/**
-* Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class.
-* @method initEvents
-*/
-YAHOO.widget.Overlay.prototype.initEvents = function() {
-	YAHOO.widget.Overlay.superclass.initEvents.call(this);
-
-	/**
-	* CustomEvent fired before the Overlay is moved.
-	* @event beforeMoveEvent
-	* @param {Number} x	x coordinate
-	* @param {Number} y	y coordinate
-	*/
-	this.beforeMoveEvent = new YAHOO.util.CustomEvent("beforeMove", this);
-
-	/**
-	* CustomEvent fired after the Overlay is moved.
-	* @event moveEvent
-	* @param {Number} x	x coordinate
-	* @param {Number} y	y coordinate
-	*/
-	this.moveEvent = new YAHOO.util.CustomEvent("move", this);
-};
-
-/**
-* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
-	YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
-
-	// Add overlay config properties //
-
-	/**
-	* The absolute x-coordinate position of the Overlay
-	* @config x
-	* @type Number
-	* @default null
-	*/
-	this.cfg.addProperty("x", { handler:this.configX, validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* The absolute y-coordinate position of the Overlay
-	* @config y
-	* @type Number
-	* @default null
-	*/
-	this.cfg.addProperty("y", { handler:this.configY, validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* An array with the absolute x and y positions of the Overlay
-	* @config xy
-	* @type Number[]
-	* @default null
-	*/
-	this.cfg.addProperty("xy",{ handler:this.configXY, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* The array of context arguments for context-sensitive positioning. The format is: [id or element, element corner, context corner]. For example, setting this property to ["img1", "tl", "bl"] would align the Overlay's top left corner to the context element's bottom left corner.
-	* @config context
-	* @type Array
-	* @default null
-	*/
-	this.cfg.addProperty("context",	{ handler:this.configContext, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* True if the Overlay should be anchored to the center of the viewport.
-	* @config fixedcenter
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("fixedcenter", { value:false, handler:this.configFixedCenter, validator:this.cfg.checkBoolean, supercedes:["iframe","visible"] } );
-
-	/**
-	* CSS width of the Overlay.
-	* @config width
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("width", { handler:this.configWidth, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* CSS height of the Overlay.
-	* @config height
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("height", { handler:this.configHeight, suppressEvent:true, supercedes:["iframe"] } );
-
-	/**
-	* CSS z-index of the Overlay.
-	* @config zIndex
-	* @type Number
-	* @default null
-	*/
-	this.cfg.addProperty("zIndex", { value:null, handler:this.configzIndex } );
-
-	/**
-	* True if the Overlay should be prevented from being positioned out of the viewport.
-	* @config constraintoviewport
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("constraintoviewport", { value:false, handler:this.configConstrainToViewport, validator:this.cfg.checkBoolean, supercedes:["iframe","x","y","xy"] } );
-
-	/**
-	* True if the Overlay should have an IFRAME shim (for correcting the select z-index bug in IE6 and below).
-	* @config iframe
-	* @type Boolean
-	* @default true for IE6 and below, false for all others
-	*/
-	this.cfg.addProperty("iframe", { value:(this.browser == "ie" ? true : false), handler:this.configIframe, validator:this.cfg.checkBoolean, supercedes:["zIndex"] } );
-};
-
-/**
-* Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]);
-* @method moveTo
-* @param {Number}	x	The Overlay's new x position
-* @param {Number}	y	The Overlay's new y position
-*/
-YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
-	this.cfg.setProperty("xy",[x,y]);
-};
-
-/**
-* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
-* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
-* @method hideMacGeckoScrollbars
-*/
-YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
-	YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
-	YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
-};
-
-/**
-* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
-* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
-* @method showMacGeckoScrollbars
-*/
-YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
-	YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
-	YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler fired when the "visible" property is changed. This method is responsible for firing showEvent and hideEvent.
-* @method configVisible
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
-	var visible = args[0];
-
-	var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
-
-	if (currentVis == "inherit") {
-		var e = this.element.parentNode;
-		while (e.nodeType != 9 && e.nodeType != 11) {
-			currentVis = YAHOO.util.Dom.getStyle(e, "visibility");
-			if (currentVis != "inherit") { break; }
-			e = e.parentNode;
-		}
-		if (currentVis == "inherit") {
-			currentVis = "visible";
-		}
-	}
-
-	var effect = this.cfg.getProperty("effect");
-
-	var effectInstances = [];
-	if (effect) {
-		if (effect instanceof Array) {
-			for (var i=0;i<effect.length;i++) {
-				var eff = effect[i];
-				effectInstances[effectInstances.length] = eff.effect(this, eff.duration);
-			}
-		} else {
-			effectInstances[effectInstances.length] = effect.effect(this, effect.duration);
-		}
-	}
-
-	var isMacGecko = (this.platform == "mac" && this.browser == "gecko");
-
-	if (visible) { // Show
-		if (isMacGecko) {
-			this.showMacGeckoScrollbars();
-		}
-
-		if (effect) { // Animate in
-			if (visible) { // Animate in if not showing
-				if (currentVis != "visible" || currentVis === "") {
-					this.beforeShowEvent.fire();
-					for (var j=0;j<effectInstances.length;j++) {
-						var ei = effectInstances[j];
-						if (j === 0 && ! YAHOO.util.Config.alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)) {
-							ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true); // Delegate showEvent until end of animateInComplete
-						}
-						ei.animateIn();
-					}
-				}
-			}
-		} else { // Show
-			if (currentVis != "visible" || currentVis === "") {
-				this.beforeShowEvent.fire();
-				YAHOO.util.Dom.setStyle(this.element, "visibility", "visible");
-				this.cfg.refireEvent("iframe");
-				this.showEvent.fire();
-			}
-		}
-
-	} else { // Hide
-		if (isMacGecko) {
-			this.hideMacGeckoScrollbars();
-		}
-
-		if (effect) { // Animate out if showing
-			if (currentVis == "visible") {
-				this.beforeHideEvent.fire();
-				for (var k=0;k<effectInstances.length;k++) {
-					var h = effectInstances[k];
-					if (k === 0 && ! YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)) {
-						h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true); // Delegate hideEvent until end of animateOutComplete
-					}
-					h.animateOut();
-				}
-			} else if (currentVis === "") {
-				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");
-			}
-		} else { // Simple hide
-			if (currentVis == "visible" || currentVis === "") {
-				this.beforeHideEvent.fire();
-				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");
-				this.cfg.refireEvent("iframe");
-				this.hideEvent.fire();
-			}
-		}
-	}
-};
-
-/**
-* Center event handler used for centering on scroll/resize, but only if the Overlay is visible
-* @method doCenterOnDOMEvent
-*/
-YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent = function() {
-	if (this.cfg.getProperty("visible")) {
-		this.center();
-	}
-};
-
-/**
-* The default event handler fired when the "fixedcenter" property is changed.
-* @method configFixedCenter
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configFixedCenter = function(type, args, obj) {
-	var val = args[0];
-
-	if (val) {
-		this.center();
-
-		if (! YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent, this.center, this)) {
-			this.beforeShowEvent.subscribe(this.center, this, true);
-		}
-
-		if (! YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent, this.doCenterOnDOMEvent, this)) {
-			YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
-		}
-
-		if (! YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent, this.doCenterOnDOMEvent, this)) {
-			YAHOO.widget.Overlay.windowScrollEvent.subscribe( this.doCenterOnDOMEvent, this, true);
-		}
-	} else {
-		YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
-		YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
-	}
-};
-
-/**
-* The default event handler fired when the "height" property is changed.
-* @method configHeight
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configHeight = function(type, args, obj) {
-	var height = args[0];
-	var el = this.element;
-	YAHOO.util.Dom.setStyle(el, "height", height);
-	this.cfg.refireEvent("iframe");
-};
-
-/**
-* The default event handler fired when the "width" property is changed.
-* @method configWidth
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configWidth = function(type, args, obj) {
-	var width = args[0];
-	var el = this.element;
-	YAHOO.util.Dom.setStyle(el, "width", width);
-	this.cfg.refireEvent("iframe");
-};
-
-/**
-* The default event handler fired when the "zIndex" property is changed.
-* @method configzIndex
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configzIndex = function(type, args, obj) {
-	var zIndex = args[0];
-
-	var el = this.element;
-
-	if (! zIndex) {
-		zIndex = YAHOO.util.Dom.getStyle(el, "zIndex");
-		if (! zIndex || isNaN(zIndex)) {
-			zIndex = 0;
-		}
-	}
-
-	if (this.iframe) {
-		if (zIndex <= 0) {
-			zIndex = 1;
-		}
-		YAHOO.util.Dom.setStyle(this.iframe, "zIndex", (zIndex-1));
-	}
-
-	YAHOO.util.Dom.setStyle(el, "zIndex", zIndex);
-	this.cfg.setProperty("zIndex", zIndex, true);
-};
-
-/**
-* The default event handler fired when the "xy" property is changed.
-* @method configXY
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configXY = function(type, args, obj) {
-	var pos = args[0];
-	var x = pos[0];
-	var y = pos[1];
-
-	this.cfg.setProperty("x", x);
-	this.cfg.setProperty("y", y);
-
-	this.beforeMoveEvent.fire([x,y]);
-
-	x = this.cfg.getProperty("x");
-	y = this.cfg.getProperty("y");
-
-	this.cfg.refireEvent("iframe");
-	this.moveEvent.fire([x,y]);
-};
-
-/**
-* The default event handler fired when the "x" property is changed.
-* @method configX
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configX = function(type, args, obj) {
-	var x = args[0];
-	var y = this.cfg.getProperty("y");
-
-	this.cfg.setProperty("x", x, true);
-	this.cfg.setProperty("y", y, true);
-
-	this.beforeMoveEvent.fire([x,y]);
-
-	x = this.cfg.getProperty("x");
-	y = this.cfg.getProperty("y");
-
-	YAHOO.util.Dom.setX(this.element, x, true);
-
-	this.cfg.setProperty("xy", [x, y], true);
-
-	this.cfg.refireEvent("iframe");
-	this.moveEvent.fire([x, y]);
-};
-
-/**
-* The default event handler fired when the "y" property is changed.
-* @method configY
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configY = function(type, args, obj) {
-	var x = this.cfg.getProperty("x");
-	var y = args[0];
-
-	this.cfg.setProperty("x", x, true);
-	this.cfg.setProperty("y", y, true);
-
-	this.beforeMoveEvent.fire([x,y]);
-
-	x = this.cfg.getProperty("x");
-	y = this.cfg.getProperty("y");
-
-	YAHOO.util.Dom.setY(this.element, y, true);
-
-	this.cfg.setProperty("xy", [x, y], true);
-
-	this.cfg.refireEvent("iframe");
-	this.moveEvent.fire([x, y]);
-};
-
-/**
-* Shows the iframe shim, if it has been enabled
-* @method showIframe
-*/
-YAHOO.widget.Overlay.prototype.showIframe = function() {
-	if (this.iframe) {
-		this.iframe.style.display = "block";
-	}
-};
-
-/**
-* Hides the iframe shim, if it has been enabled
-* @method hideIframe
-*/
-YAHOO.widget.Overlay.prototype.hideIframe = function() {
-	if (this.iframe) {
-		this.iframe.style.display = "none";
-	}
-};
-
-/**
-* The default event handler fired when the "iframe" property is changed.
-* @method configIframe
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configIframe = function(type, args, obj) {
-
-	var val = args[0];
-
-	if (val) { // IFRAME shim is enabled
-
-		if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, this.showIframe, this)) {
-			this.showEvent.subscribe(this.showIframe, this, true);
-		}
-		if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, this.hideIframe, this)) {
-			this.hideEvent.subscribe(this.hideIframe, this, true);
-		}
-
-		var x = this.cfg.getProperty("x");
-		var y = this.cfg.getProperty("y");
-
-		if (! x || ! y) {
-			this.syncPosition();
-			x = this.cfg.getProperty("x");
-			y = this.cfg.getProperty("y");
-		}
-
-		if (! isNaN(x) && ! isNaN(y)) {
-			if (! this.iframe) {
-				this.iframe = document.createElement("iframe");
-				if (this.isSecure) {
-					this.iframe.src = YAHOO.widget.Overlay.IFRAME_SRC;
-				}
-
-				var parent = this.element.parentNode;
-				if (parent) {
-					parent.appendChild(this.iframe);
-				} else {
-					document.body.appendChild(this.iframe);
-				}
-
-				YAHOO.util.Dom.setStyle(this.iframe, "position", "absolute");
-				YAHOO.util.Dom.setStyle(this.iframe, "border", "none");
-				YAHOO.util.Dom.setStyle(this.iframe, "margin", "0");
-				YAHOO.util.Dom.setStyle(this.iframe, "padding", "0");
-				YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
-				if (this.cfg.getProperty("visible")) {
-					this.showIframe();
-				} else {
-					this.hideIframe();
-				}
-			}
-
-			var iframeDisplay = YAHOO.util.Dom.getStyle(this.iframe, "display");
-
-			if (iframeDisplay == "none") {
-				this.iframe.style.display = "block";
-			}
-
-			YAHOO.util.Dom.setXY(this.iframe, [x,y]);
-
-			var width = this.element.clientWidth;
-			var height = this.element.clientHeight;
-
-			YAHOO.util.Dom.setStyle(this.iframe, "width", (width+2) + "px");
-			YAHOO.util.Dom.setStyle(this.iframe, "height", (height+2) + "px");
-
-			if (iframeDisplay == "none") {
-				this.iframe.style.display = "none";
-			}
-		}
-	} else {
-		if (this.iframe) {
-			this.iframe.style.display = "none";
-		}
-		this.showEvent.unsubscribe(this.showIframe, this);
-		this.hideEvent.unsubscribe(this.hideIframe, this);
-	}
-};
-
-
-/**
-* The default event handler fired when the "constraintoviewport" property is changed.
-* @method configConstrainToViewport
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configConstrainToViewport = function(type, args, obj) {
-	var val = args[0];
-	if (val) {
-		if (! YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
-			this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
-		}
-	} else {
-		this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
-	}
-};
-
-/**
-* The default event handler fired when the "context" property is changed.
-* @method configContext
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configContext = function(type, args, obj) {
-	var contextArgs = args[0];
-
-	if (contextArgs) {
-		var contextEl = contextArgs[0];
-		var elementMagnetCorner = contextArgs[1];
-		var contextMagnetCorner = contextArgs[2];
-
-		if (contextEl) {
-			if (typeof contextEl == "string") {
-				this.cfg.setProperty("context", [document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner], true);
-			}
-
-			if (elementMagnetCorner && contextMagnetCorner) {
-				this.align(elementMagnetCorner, contextMagnetCorner);
-			}
-		}
-	}
-};
-
-
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Aligns the Overlay to its context element using the specified corner points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT.
-* @method align
-* @param {String} elementAlign		The String representing the corner of the Overlay that should be aligned to the context element
-* @param {String} contextAlign		The corner of the context element that the elementAlign corner should stick to.
-*/
-YAHOO.widget.Overlay.prototype.align = function(elementAlign, contextAlign) {
-	var contextArgs = this.cfg.getProperty("context");
-	if (contextArgs) {
-		var context = contextArgs[0];
-
-		var element = this.element;
-		var me = this;
-
-		if (! elementAlign) {
-			elementAlign = contextArgs[1];
-		}
-
-		if (! contextAlign) {
-			contextAlign = contextArgs[2];
-		}
-
-		if (element && context) {
-			var elementRegion = YAHOO.util.Dom.getRegion(element);
-			var contextRegion = YAHOO.util.Dom.getRegion(context);
-
-			var doAlign = function(v,h) {
-				switch (elementAlign) {
-					case YAHOO.widget.Overlay.TOP_LEFT:
-						me.moveTo(h,v);
-						break;
-					case YAHOO.widget.Overlay.TOP_RIGHT:
-						me.moveTo(h-element.offsetWidth,v);
-						break;
-					case YAHOO.widget.Overlay.BOTTOM_LEFT:
-						me.moveTo(h,v-element.offsetHeight);
-						break;
-					case YAHOO.widget.Overlay.BOTTOM_RIGHT:
-						me.moveTo(h-element.offsetWidth,v-element.offsetHeight);
-						break;
-				}
-			};
-
-			switch (contextAlign) {
-				case YAHOO.widget.Overlay.TOP_LEFT:
-					doAlign(contextRegion.top, contextRegion.left);
-					break;
-				case YAHOO.widget.Overlay.TOP_RIGHT:
-					doAlign(contextRegion.top, contextRegion.right);
-					break;
-				case YAHOO.widget.Overlay.BOTTOM_LEFT:
-					doAlign(contextRegion.bottom, contextRegion.left);
-					break;
-				case YAHOO.widget.Overlay.BOTTOM_RIGHT:
-					doAlign(contextRegion.bottom, contextRegion.right);
-					break;
-			}
-		}
-	}
-};
-
-/**
-* The default event handler executed when the moveEvent is fired, if the "constraintoviewport" is set to true.
-* @method enforceConstraints
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.enforceConstraints = function(type, args, obj) {
-	var pos = args[0];
-
-	var x = pos[0];
-	var y = pos[1];
-
-	var offsetHeight = this.element.offsetHeight;
-	var offsetWidth = this.element.offsetWidth;
-
-	var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
-	var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
-
-	var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
-	var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
-
-	var topConstraint = scrollY + 10;
-	var leftConstraint = scrollX + 10;
-	var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
-	var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-
-	if (x < leftConstraint) {
-		x = leftConstraint;
-	} else if (x > rightConstraint) {
-		x = rightConstraint;
-	}
-
-	if (y < topConstraint) {
-		y = topConstraint;
-	} else if (y > bottomConstraint) {
-		y = bottomConstraint;
-	}
-
-	this.cfg.setProperty("x", x, true);
-	this.cfg.setProperty("y", y, true);
-	this.cfg.setProperty("xy", [x,y], true);
-};
-
-/**
-* Centers the container in the viewport.
-* @method center
-*/
-YAHOO.widget.Overlay.prototype.center = function() {
-	var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
-	var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
-
-	var viewPortWidth = YAHOO.util.Dom.getClientWidth();
-	var viewPortHeight = YAHOO.util.Dom.getClientHeight();
-
-	var elementWidth = this.element.offsetWidth;
-	var elementHeight = this.element.offsetHeight;
-
-	var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
-	var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-
-	this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-
-	this.cfg.refireEvent("iframe");
-};
-
-/**
-* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used to update position information during drag & drop.
-* @method syncPosition
-*/
-YAHOO.widget.Overlay.prototype.syncPosition = function() {
-	var pos = YAHOO.util.Dom.getXY(this.element);
-	this.cfg.setProperty("x", pos[0], true);
-	this.cfg.setProperty("y", pos[1], true);
-	this.cfg.setProperty("xy", pos, true);
-};
-
-/**
-* Event handler fired when the resize monitor element is resized.
-* @method onDomResize
-* @param {DOMEvent} e	The resize DOM event
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
-	YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
-	var me = this;
-	setTimeout(function() {
-		me.syncPosition();
-		me.cfg.refireEvent("iframe");
-		me.cfg.refireEvent("context");
-	}, 0);
-};
-
-/**
-* Removes the Overlay element from the DOM and sets all child elements to null.
-* @method destroy
-*/
-YAHOO.widget.Overlay.prototype.destroy = function() {
-	if (this.iframe) {
-		this.iframe.parentNode.removeChild(this.iframe);
-	}
-
-	this.iframe = null;
-
-	YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
-	YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
-
-	YAHOO.widget.Overlay.superclass.destroy.call(this);
-};
-
-/**
-* Returns a String representation of the object.
-* @method toString
-* @return {String} The string representation of the Overlay.
-*/
-YAHOO.widget.Overlay.prototype.toString = function() {
-	return "Overlay " + this.id;
-};
-
-/**
-* A singleton CustomEvent used for reacting to the DOM event for window scroll
-* @event YAHOO.widget.Overlay.windowScrollEvent
-*/
-YAHOO.widget.Overlay.windowScrollEvent = new YAHOO.util.CustomEvent("windowScroll");
-
-/**
-* A singleton CustomEvent used for reacting to the DOM event for window resize
-* @event YAHOO.widget.Overlay.windowResizeEvent
-*/
-YAHOO.widget.Overlay.windowResizeEvent = new YAHOO.util.CustomEvent("windowResize");
-
-/**
-* The DOM event handler used to fire the CustomEvent for window scroll
-* @method YAHOO.widget.Overlay.windowScrollHandler
-* @static
-* @param {DOMEvent} e The DOM scroll event
-*/
-YAHOO.widget.Overlay.windowScrollHandler = function(e) {
-	if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
-		if (! window.scrollEnd) {
-			window.scrollEnd = -1;
-		}
-		clearTimeout(window.scrollEnd);
-		window.scrollEnd = setTimeout(function() { YAHOO.widget.Overlay.windowScrollEvent.fire(); }, 1);
-	} else {
-		YAHOO.widget.Overlay.windowScrollEvent.fire();
-	}
-};
-
-/**
-* The DOM event handler used to fire the CustomEvent for window resize
-* @method YAHOO.widget.Overlay.windowResizeHandler
-* @static
-* @param {DOMEvent} e The DOM resize event
-*/
-YAHOO.widget.Overlay.windowResizeHandler = function(e) {
-	if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
-		if (! window.resizeEnd) {
-			window.resizeEnd = -1;
-		}
-		clearTimeout(window.resizeEnd);
-		window.resizeEnd = setTimeout(function() { YAHOO.widget.Overlay.windowResizeEvent.fire(); }, 100);
-	} else {
-		YAHOO.widget.Overlay.windowResizeEvent.fire();
-	}
-};
-
-/**
-* A boolean that indicated whether the window resize and scroll events have already been subscribed to.
-* @property YAHOO.widget.Overlay._initialized
-* @private
-* @type Boolean
-*/
-YAHOO.widget.Overlay._initialized = null;
-
-if (YAHOO.widget.Overlay._initialized === null) {
-	YAHOO.util.Event.addListener(window, "scroll", YAHOO.widget.Overlay.windowScrollHandler);
-	YAHOO.util.Event.addListener(window, "resize", YAHOO.widget.Overlay.windowResizeHandler);
-
-	YAHOO.widget.Overlay._initialized = true;
-}
-
-/**
-* OverlayManager is used for maintaining the focus status of multiple Overlays.* @namespace YAHOO.widget
-* @namespace YAHOO.widget
-* @class OverlayManager
-* @constructor
-* @param {Array}	overlays	Optional. A collection of Overlays to register with the manager.
-* @param {Object}	userConfig		The object literal representing the user configuration of the OverlayManager
-*/
-YAHOO.widget.OverlayManager = function(userConfig) {
-	this.init(userConfig);
-};
-
-/**
-* The CSS class representing a focused Overlay
-* @property YAHOO.widget.OverlayManager.CSS_FOCUSED
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
-
-YAHOO.widget.OverlayManager.prototype = {
-	/**
-	* The class's constructor function
-	* @property contructor
-	* @type Function
-	*/
-	constructor : YAHOO.widget.OverlayManager,
-
-	/**
-	* The array of Overlays that are currently registered
-	* @property overlays
-	* @type YAHOO.widget.Overlay[]
-	*/
-	overlays : null,
-
-	/**
-	* Initializes the default configuration of the OverlayManager
-	* @method initDefaultConfig
-	*/
-	initDefaultConfig : function() {
-		/**
-		* The collection of registered Overlays in use by the OverlayManager
-		* @config overlays
-		* @type YAHOO.widget.Overlay[]
-		* @default null
-		*/
-		this.cfg.addProperty("overlays", { suppressEvent:true } );
-
-		/**
-		* The default DOM event that should be used to focus an Overlay
-		* @config focusevent
-		* @type String
-		* @default "mousedown"
-		*/
-		this.cfg.addProperty("focusevent", { value:"mousedown" } );
-	},
-
-	/**
-	* Initializes the OverlayManager
-	* @method init
-	* @param {YAHOO.widget.Overlay[]}	overlays	Optional. A collection of Overlays to register with the manager.
-	* @param {Object}	userConfig		The object literal representing the user configuration of the OverlayManager
-	*/
-	init : function(userConfig) {
-		/**
-		* The OverlayManager's Config object used for monitoring configuration properties.
-		* @property cfg
-		* @type YAHOO.util.Config
-		*/
-		this.cfg = new YAHOO.util.Config(this);
-
-		this.initDefaultConfig();
-
-		if (userConfig) {
-			this.cfg.applyConfig(userConfig, true);
-		}
-		this.cfg.fireQueue();
-
-		/**
-		* The currently activated Overlay
-		* @property activeOverlay
-		* @private
-		* @type YAHOO.widget.Overlay
-		*/
-		var activeOverlay = null;
-
-		/**
-		* Returns the currently focused Overlay
-		* @method getActive
-		* @return {YAHOO.widget.Overlay}	The currently focused Overlay
-		*/
-		this.getActive = function() {
-			return activeOverlay;
-		};
-
-		/**
-		* Focuses the specified Overlay
-		* @method focus
-		* @param {YAHOO.widget.Overlay} overlay	The Overlay to focus
-		* @param {String} overlay	The id of the Overlay to focus
-		*/
-		this.focus = function(overlay) {
-			var o = this.find(overlay);
-			if (o) {
-				this.blurAll();
-				activeOverlay = o;
-				YAHOO.util.Dom.addClass(activeOverlay.element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
-				this.overlays.sort(this.compareZIndexDesc);
-				var topZIndex = YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
-				if (! isNaN(topZIndex) && this.overlays[0] != overlay) {
-					activeOverlay.cfg.setProperty("zIndex", (parseInt(topZIndex, 10) + 2));
-				}
-				this.overlays.sort(this.compareZIndexDesc);
-			}
-		};
-
-		/**
-		* Removes the specified Overlay from the manager
-		* @method remove
-		* @param {YAHOO.widget.Overlay}	overlay	The Overlay to remove
-		* @param {String} overlay	The id of the Overlay to remove
-		*/
-		this.remove = function(overlay) {
-			var o = this.find(overlay);
-			if (o) {
-				var originalZ = YAHOO.util.Dom.getStyle(o.element, "zIndex");
-				o.cfg.setProperty("zIndex", -1000, true);
-				this.overlays.sort(this.compareZIndexDesc);
-				this.overlays = this.overlays.slice(0, this.overlays.length-1);
-				o.cfg.setProperty("zIndex", originalZ, true);
-
-				o.cfg.setProperty("manager", null);
-				o.focusEvent = null;
-				o.blurEvent = null;
-				o.focus = null;
-				o.blur = null;
-			}
-		};
-
-		/**
-		* Removes focus from all registered Overlays in the manager
-		* @method blurAll
-		*/
-		this.blurAll = function() {
-			activeOverlay = null;
-			for (var o=0;o<this.overlays.length;o++) {
-				YAHOO.util.Dom.removeClass(this.overlays[o].element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
-			}
-		};
-
-		var overlays = this.cfg.getProperty("overlays");
-
-		if (! this.overlays) {
-			this.overlays = [];
-		}
-
-		if (overlays) {
-			this.register(overlays);
-			this.overlays.sort(this.compareZIndexDesc);
-		}
-	},
-
-	/**
-	* Registers an Overlay or an array of Overlays with the manager. Upon registration, the Overlay receives functions for focus and blur, along with CustomEvents for each.
-	* @method register
-	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to register with the manager.
-	* @param {YAHOO.widget.Overlay[]}	overlay		An array of Overlays to register with the manager.
-	* @return	{Boolean}	True if any Overlays are registered.
-	*/
-	register : function(overlay) {
-		if (overlay instanceof YAHOO.widget.Overlay) {
-			overlay.cfg.addProperty("manager", { value:this } );
-
-			overlay.focusEvent = new YAHOO.util.CustomEvent("focus");
-			overlay.blurEvent = new YAHOO.util.CustomEvent("blur");
-
-			var mgr=this;
-
-			overlay.focus = function() {
-				mgr.focus(this);
-				this.focusEvent.fire();
-			};
-
-			overlay.blur = function() {
-				mgr.blurAll();
-				this.blurEvent.fire();
-			};
-
-			var focusOnDomEvent = function(e,obj) {
-				overlay.focus();
-			};
-
-			var focusevent = this.cfg.getProperty("focusevent");
-			YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);
-
-			var zIndex = YAHOO.util.Dom.getStyle(overlay.element, "zIndex");
-			if (! isNaN(zIndex)) {
-				overlay.cfg.setProperty("zIndex", parseInt(zIndex, 10));
-			} else {
-				overlay.cfg.setProperty("zIndex", 0);
-			}
-
-			this.overlays.push(overlay);
-			return true;
-		} else if (overlay instanceof Array) {
-			var regcount = 0;
-			for (var i=0;i<overlay.length;i++) {
-				if (this.register(overlay[i])) {
-					regcount++;
-				}
-			}
-			if (regcount > 0) {
-				return true;
-			}
-		} else {
-			return false;
-		}
-	},
-
-	/**
-	* Attempts to locate an Overlay by instance or ID.
-	* @method find
-	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to locate within the manager
-	* @param {String}	overlay		An Overlay id to locate within the manager
-	* @return	{YAHOO.widget.Overlay}	The requested Overlay, if found, or null if it cannot be located.
-	*/
-	find : function(overlay) {
-		if (overlay instanceof YAHOO.widget.Overlay) {
-			for (var o=0;o<this.overlays.length;o++) {
-				if (this.overlays[o] == overlay) {
-					return this.overlays[o];
-				}
-			}
-		} else if (typeof overlay == "string") {
-			for (var p=0;p<this.overlays.length;p++) {
-				if (this.overlays[p].id == overlay) {
-					return this.overlays[p];
-				}
-			}
-		}
-		return null;
-	},
-
-	/**
-	* Used for sorting the manager's Overlays by z-index.
-	* @method compareZIndexDesc
-	* @private
-	* @return {Number}	0, 1, or -1, depending on where the Overlay should fall in the stacking order.
-	*/
-	compareZIndexDesc : function(o1, o2) {
-		var zIndex1 = o1.cfg.getProperty("zIndex");
-		var zIndex2 = o2.cfg.getProperty("zIndex");
-
-		if (zIndex1 > zIndex2) {
-			return -1;
-		} else if (zIndex1 < zIndex2) {
-			return 1;
-		} else {
-			return 0;
-		}
-	},
-
-	/**
-	* Shows all Overlays in the manager.
-	* @method showAll
-	*/
-	showAll : function() {
-		for (var o=0;o<this.overlays.length;o++) {
-			this.overlays[o].show();
-		}
-	},
-
-	/**
-	* Hides all Overlays in the manager.
-	* @method hideAll
-	*/
-	hideAll : function() {
-		for (var o=0;o<this.overlays.length;o++) {
-			this.overlays[o].hide();
-		}
-	},
-
-
-	/**
-	* Returns a string representation of the object.
-	* @method toString
-	* @return {String}	The string representation of the OverlayManager
-	*/
-	toString : function() {
-		return "OverlayManager";
-	}
-
-};
-
-/**
-* KeyListener is a utility that provides an easy interface for listening for keydown/keyup events fired against DOM elements.
-* @namespace YAHOO.util
-* @class KeyListener
-* @constructor
-* @param {HTMLElement}	attachTo	The element or element ID to which the key event should be attached
-* @param {String}	attachTo	The element or element ID to which the key event should be attached
-* @param {Object}	keyData		The object literal representing the key(s) to detect. Possible attributes are shift(boolean), alt(boolean), ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
-* @param {Function}	handler		The CustomEvent handler to fire when the key event is detected
-* @param {Object}	handler		An object literal representing the handler.
-* @param {String}	event		Optional. The event (keydown or keyup) to listen for. Defaults automatically to keydown.
-*/
-YAHOO.util.KeyListener = function(attachTo, keyData, handler, event) {
-	if (! event) {
-		event = YAHOO.util.KeyListener.KEYDOWN;
-	}
-
-	/**
-	* The CustomEvent fired internally when a key is pressed
-	* @event keyEvent
-	* @private
-	* @param {Object}	keyData		The object literal representing the key(s) to detect. Possible attributes are shift(boolean), alt(boolean), ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
-	*/
-	var keyEvent = new YAHOO.util.CustomEvent("keyPressed");
-
-	/**
-	* The CustomEvent fired when the KeyListener is enabled via the enable() function
-	* @event enabledEvent
-	* @param {Object}	keyData		The object literal representing the key(s) to detect. Possible attributes are shift(boolean), alt(boolean), ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
-	*/
-	this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
-
-	/**
-	* The CustomEvent fired when the KeyListener is disabled via the disable() function
-	* @event disabledEvent
-	* @param {Object}	keyData		The object literal representing the key(s) to detect. Possible attributes are shift(boolean), alt(boolean), ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
-	*/
-	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);
-	}
-
-	/**
-	* Handles the key event when a key is pressed.
-	* @method handleKeyPress
-	* @param {DOMEvent} e	The keypress DOM event
-	* @param {Object}	obj	The DOM event scope object
-	* @private
-	*/
-	function handleKeyPress(e, obj) {
-		if (! keyData.shift) {
-			keyData.shift = false;
-		}
-		if (! keyData.alt) {
-			keyData.alt = false;
-		}
-		if (! keyData.ctrl) {
-			keyData.ctrl = false;
-		}
-
-		// check held down modifying keys first
-		if (e.shiftKey == keyData.shift &&
-			e.altKey   == keyData.alt &&
-			e.ctrlKey  == keyData.ctrl) { // if we pass this, all modifiers match
-
-			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);
-				}
-			}
-		}
-	}
-
-	/**
-	* Enables the KeyListener by attaching the DOM event listeners to the target DOM element
-	* @method enable
-	*/
-	this.enable = function() {
-		if (! this.enabled) {
-			YAHOO.util.Event.addListener(attachTo, event, handleKeyPress);
-			this.enabledEvent.fire(keyData);
-		}
-		/**
-		* Boolean indicating the enabled/disabled state of the Tooltip
-		* @property enabled
-		* @type Boolean
-		*/
-		this.enabled = true;
-	};
-
-	/**
-	* Disables the KeyListener by removing the DOM event listeners from the target DOM element
-	* @method disable
-	*/
-	this.disable = function() {
-		if (this.enabled) {
-			YAHOO.util.Event.removeListener(attachTo, event, handleKeyPress);
-			this.disabledEvent.fire(keyData);
-		}
-		this.enabled = false;
-	};
-
-	/**
-	* Returns a String representation of the object.
-	* @method toString
-	* @return {String}	The string representation of the KeyListener
-	*/
-	this.toString = function() {
-		return "KeyListener [" + keyData.keys + "] " + attachTo.tagName + (attachTo.id ? "[" + attachTo.id + "]" : "");
-	};
-
-};
-
-/**
-* Constant representing the DOM "keydown" event.
-* @property YAHOO.util.KeyListener.KEYDOWN
-* @static
-* @final
-* @type String
-*/
-YAHOO.util.KeyListener.KEYDOWN = "keydown";
-
-/**
-* Constant representing the DOM "keyup" event.
-* @property YAHOO.util.KeyListener.KEYUP
-* @static
-* @final
-* @type String
-*/
-YAHOO.util.KeyListener.KEYUP = "keyup";
-
-/**
-* Tooltip is an implementation of Overlay that behaves like an OS tooltip, displaying when the user mouses over a particular element, and disappearing on mouse out.
-* @namespace YAHOO.widget
-* @class Tooltip
-* @extends YAHOO.widget.Overlay
-* @constructor
-* @param {String}	el	The element ID representing the Tooltip <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Tooltip
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Tooltip = function(el, userConfig) {
-	YAHOO.widget.Tooltip.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Tooltip, YAHOO.widget.Overlay);
-
-/**
-* Constant representing the Tooltip CSS class
-* @property YAHOO.widget.Tooltip.CSS_TOOLTIP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Tooltip.CSS_TOOLTIP = "tt";
-
-/**
-* The Tooltip initialization method. This method is automatically called by the constructor. A Tooltip is automatically rendered by the init method, and it also is set to be invisible by default, and constrained to viewport by default as well.
-* @method init
-* @param {String}	el	The element ID representing the Tooltip <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Tooltip
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Tooltip. See configuration documentation for more details.
-*/
-YAHOO.widget.Tooltip.prototype.init = function(el, userConfig) {
-	if (document.readyState && document.readyState != "complete") {
-		var deferredInit = function() {
-			this.init(el, userConfig);
-		};
-		YAHOO.util.Event.addListener(window, "load", deferredInit, this, true);
-	} else {
-		YAHOO.widget.Tooltip.superclass.init.call(this, el);
-
-		this.beforeInitEvent.fire(YAHOO.widget.Tooltip);
-
-		YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Tooltip.CSS_TOOLTIP);
-
-		if (userConfig) {
-			this.cfg.applyConfig(userConfig, true);
-		}
-
-		this.cfg.queueProperty("visible",false);
-		this.cfg.queueProperty("constraintoviewport",true);
-
-		this.setBody("");
-		this.render(this.cfg.getProperty("container"));
-
-		this.initEvent.fire(YAHOO.widget.Tooltip);
-	}
-};
-
-/**
-* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Tooltip.prototype.initDefaultConfig = function() {
-	YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);
-
-	/**
-	* Specifies whether the Tooltip should be kept from overlapping its context element.
-	* @config preventoverlap
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("preventoverlap",		{ value:true, validator:this.cfg.checkBoolean, supercedes:["x","y","xy"] } );
-
-	/**
-	* The number of milliseconds to wait before showing a Tooltip on mouseover.
-	* @config showdelay
-	* @type Number
-	* @default 200
-	*/
-	this.cfg.addProperty("showdelay",			{ value:200, handler:this.configShowDelay, validator:this.cfg.checkNumber } );
-
-	/**
-	* The number of milliseconds to wait before automatically dismissing a Tooltip after the mouse has been resting on the context element.
-	* @config autodismissdelay
-	* @type Number
-	* @default 5000
-	*/
-	this.cfg.addProperty("autodismissdelay",	{ value:5000, handler:this.configAutoDismissDelay, validator:this.cfg.checkNumber } );
-
-	/**
-	* The number of milliseconds to wait before hiding a Tooltip on mouseover.
-	* @config hidedelay
-	* @type Number
-	* @default 250
-	*/
-	this.cfg.addProperty("hidedelay",			{ value:250, handler:this.configHideDelay, validator:this.cfg.checkNumber } );
-
-	/**
-	* Specifies the Tooltip's text.
-	* @config text
-	* @type String
-	* @default null
-	*/
-	this.cfg.addProperty("text",				{ handler:this.configText, suppressEvent:true } );
-
-	/**
-	* Specifies the container element that the Tooltip's markup should be rendered into.
-	* @config container
-	* @type HTMLElement/String
-	* @default document.body
-	*/
-	this.cfg.addProperty("container",			{ value:document.body, handler:this.configContainer } );
-
-	/**
-	* Specifies the element or elements that the Tooltip should be anchored to on mouseover.
-	* @config context
-	* @type HTMLElement[]/String[]
-	* @default null
-	*/
-
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler fired when the "text" property is changed.
-* @method configText
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configText = function(type, args, obj) {
-	var text = args[0];
-	if (text) {
-		this.setBody(text);
-	}
-};
-
-/**
-* The default event handler fired when the "container" property is changed.
-* @method configContainer
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configContainer = function(type, args, obj) {
-	var container = args[0];
-	if (typeof container == 'string') {
-		this.cfg.setProperty("container", document.getElementById(container), true);
-	}
-};
-
-/**
-* The default event handler fired when the "context" property is changed.
-* @method configContext
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configContext = function(type, args, obj) {
-	var context = args[0];
-	if (context) {
-
-		// Normalize parameter into an array
-		if (! (context instanceof Array)) {
-			if (typeof context == "string") {
-				this.cfg.setProperty("context", [document.getElementById(context)], true);
-			} else { // Assuming this is an element
-				this.cfg.setProperty("context", [context], true);
-			}
-			context = this.cfg.getProperty("context");
-		}
-
-
-		// Remove any existing mouseover/mouseout listeners
-		if (this._context) {
-			for (var c=0;c<this._context.length;++c) {
-				var el = this._context[c];
-				YAHOO.util.Event.removeListener(el, "mouseover", this.onContextMouseOver);
-				YAHOO.util.Event.removeListener(el, "mousemove", this.onContextMouseMove);
-				YAHOO.util.Event.removeListener(el, "mouseout", this.onContextMouseOut);
-			}
-		}
-
-		// Add mouseover/mouseout listeners to context elements
-		this._context = context;
-		for (var d=0;d<this._context.length;++d) {
-			var el2 = this._context[d];
-			YAHOO.util.Event.addListener(el2, "mouseover", this.onContextMouseOver, this);
-			YAHOO.util.Event.addListener(el2, "mousemove", this.onContextMouseMove, this);
-			YAHOO.util.Event.addListener(el2, "mouseout", this.onContextMouseOut, this);
-		}
-	}
-};
-
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-// BEGIN BUILT-IN DOM EVENT HANDLERS //
-
-/**
-* The default event handler fired when the user moves the mouse while over the context element.
-* @method onContextMouseMove
-* @param {DOMEvent} e	The current DOM event
-* @param {Object}	obj	The object argument
-*/
-YAHOO.widget.Tooltip.prototype.onContextMouseMove = function(e, obj) {
-	obj.pageX = YAHOO.util.Event.getPageX(e);
-	obj.pageY = YAHOO.util.Event.getPageY(e);
-
-};
-
-/**
-* The default event handler fired when the user mouses over the context element.
-* @method onContextMouseOver
-* @param {DOMEvent} e	The current DOM event
-* @param {Object}	obj	The object argument
-*/
-YAHOO.widget.Tooltip.prototype.onContextMouseOver = function(e, obj) {
-
-	if (obj.hideProcId) {
-		clearTimeout(obj.hideProcId);
-		obj.hideProcId = null;
-	}
-
-	var context = this;
-	YAHOO.util.Event.addListener(context, "mousemove", obj.onContextMouseMove, obj);
-
-	if (context.title) {
-		obj._tempTitle = context.title;
-		context.title = "";
-	}
-
-	/**
-	* The unique process ID associated with the thread responsible for showing the Tooltip.
-	* @type int
-	*/
-	obj.showProcId = obj.doShow(e, context);
-};
-
-/**
-* The default event handler fired when the user mouses out of the context element.
-* @method onContextMouseOut
-* @param {DOMEvent} e	The current DOM event
-* @param {Object}	obj	The object argument
-*/
-YAHOO.widget.Tooltip.prototype.onContextMouseOut = function(e, obj) {
-	var el = this;
-
-	if (obj._tempTitle) {
-		el.title = obj._tempTitle;
-		obj._tempTitle = null;
-	}
-
-	if (obj.showProcId) {
-		clearTimeout(obj.showProcId);
-		obj.showProcId = null;
-	}
-
-	if (obj.hideProcId) {
-		clearTimeout(obj.hideProcId);
-		obj.hideProcId = null;
-	}
-
-
-	obj.hideProcId = setTimeout(function() {
-				obj.hide();
-				}, obj.cfg.getProperty("hidedelay"));
-};
-
-// END BUILT-IN DOM EVENT HANDLERS //
-
-/**
-* Processes the showing of the Tooltip by setting the timeout delay and offset of the Tooltip.
-* @method doShow
-* @param {DOMEvent} e	The current DOM event
-* @return {Number}	The process ID of the timeout function associated with doShow
-*/
-YAHOO.widget.Tooltip.prototype.doShow = function(e, context) {
-
-	var yOffset = 25;
-	if (this.browser == "opera" && context.tagName == "A") {
-		yOffset += 12;
-	}
-
-	var me = this;
-	return setTimeout(
-		function() {
-			if (me._tempTitle) {
-				me.setBody(me._tempTitle);
-			} else {
-				me.cfg.refireEvent("text");
-			}
-
-			me.moveTo(me.pageX, me.pageY + yOffset);
-			if (me.cfg.getProperty("preventoverlap")) {
-				me.preventOverlap(me.pageX, me.pageY);
-			}
-
-			YAHOO.util.Event.removeListener(context, "mousemove", me.onContextMouseMove);
-
-			me.show();
-			me.hideProcId = me.doHide();
-		},
-	this.cfg.getProperty("showdelay"));
-};
-
-/**
-* Sets the timeout for the auto-dismiss delay, which by default is 5 seconds, meaning that a tooltip will automatically dismiss itself after 5 seconds of being displayed.
-* @method doHide
-*/
-YAHOO.widget.Tooltip.prototype.doHide = function() {
-	var me = this;
-	return setTimeout(
-		function() {
-			me.hide();
-		},
-		this.cfg.getProperty("autodismissdelay"));
-};
-
-/**
-* Fired when the Tooltip is moved, this event handler is used to prevent the Tooltip from overlapping with its context element.
-* @method preventOverlay
-* @param {Number} pageX	The x coordinate position of the mouse pointer
-* @param {Number} pageY	The y coordinate position of the mouse pointer
-*/
-YAHOO.widget.Tooltip.prototype.preventOverlap = function(pageX, pageY) {
-
-	var height = this.element.offsetHeight;
-
-	var elementRegion = YAHOO.util.Dom.getRegion(this.element);
-
-	elementRegion.top -= 5;
-	elementRegion.left -= 5;
-	elementRegion.right += 5;
-	elementRegion.bottom += 5;
-
-	var mousePoint = new YAHOO.util.Point(pageX, pageY);
-
-	if (elementRegion.contains(mousePoint)) {
-		this.cfg.setProperty("y", (pageY-height-5));
-	}
-};
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	The string representation of the Tooltip
-*/
-YAHOO.widget.Tooltip.prototype.toString = function() {
-	return "Tooltip " + this.id;
-};
-
-/**
-* Panel is an implementation of Overlay that behaves like an OS window, with a draggable header and an optional close icon at the top right.
-* @namespace YAHOO.widget
-* @class Panel
-* @extends YAHOO.widget.Overlay
-* @constructor
-* @param {String}	el	The element ID representing the Panel <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Panel
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Panel. See configuration documentation for more details.
-*/
-YAHOO.widget.Panel = function(el, userConfig) {
-	YAHOO.widget.Panel.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Panel, YAHOO.widget.Overlay);
-
-/**
-* Constant representing the default CSS class used for a Panel
-* @property YAHOO.widget.Panel.CSS_PANEL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Panel.CSS_PANEL = "panel";
-
-/**
-* Constant representing the default CSS class used for a Panel's wrapping container
-* @property YAHOO.widget.Panel.CSS_PANEL_CONTAINER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Panel.CSS_PANEL_CONTAINER = "panel-container";
-
-/**
-* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String}	el	The element ID representing the Overlay <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Overlay
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Panel.prototype.init = function(el, userConfig) {
-	YAHOO.widget.Panel.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
-	this.beforeInitEvent.fire(YAHOO.widget.Panel);
-
-	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Panel.CSS_PANEL);
-
-	this.buildWrapper();
-
-	if (userConfig) {
-		this.cfg.applyConfig(userConfig, true);
-	}
-
-	this.beforeRenderEvent.subscribe(function() {
-		var draggable = this.cfg.getProperty("draggable");
-		if (draggable) {
-			if (! this.header) {
-				this.setHeader("&#160;");
-			}
-		}
-	}, this, true);
-
-	var me = this;
-
-	var doBlur = function() {
-		this.blur();
-	};
-
-	this.showMaskEvent.subscribe(function() {
-		var checkFocusable = function(el) {
-			if ((el.tagName == "A" || el.tagName == "BUTTON" || el.tagName == "SELECT" || el.tagName == "INPUT" || el.tagName == "TEXTAREA" || el.tagName == "FORM") && el.type != "hidden") {
-				if (! YAHOO.util.Dom.isAncestor(me.element, el)) {
-					YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
-					return true;
-				}
-			} else {
-				return false;
-			}
-		};
-
-		this.focusableElements = YAHOO.util.Dom.getElementsBy(checkFocusable);
-	}, this, true);
-
-	this.hideMaskEvent.subscribe(function() {
-		for (var i=0;i<this.focusableElements.length;i++) {
-			var el2 = this.focusableElements[i];
-			YAHOO.util.Event.removeListener(el2, "focus", doBlur);
-		}
-	}, this, true);
-
-	this.beforeShowEvent.subscribe(function() {
-		this.cfg.refireEvent("underlay");
-	}, this, true);
-
-	this.initEvent.fire(YAHOO.widget.Panel);
-};
-
-/**
-* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
-*/
-YAHOO.widget.Panel.prototype.initEvents = function() {
-	YAHOO.widget.Panel.superclass.initEvents.call(this);
-
-	/**
-	* CustomEvent fired after the modality mask is shown
-	* @event showMaskEvent
-	*/
-	this.showMaskEvent = new YAHOO.util.CustomEvent("showMask");
-
-	/**
-	* CustomEvent fired after the modality mask is hidden
-	* @event hideMaskEvent
-	*/
-	this.hideMaskEvent = new YAHOO.util.CustomEvent("hideMask");
-
-	/**
-	* CustomEvent when the Panel is dragged
-	* @event dragEvent
-	*/
-	this.dragEvent = new YAHOO.util.CustomEvent("drag");
-};
-
-/**
-* Initializes the class's configurable properties which can be changed using the Panel's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Panel.prototype.initDefaultConfig = function() {
-	YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);
-
-	// Add panel config properties //
-
-	/**
-	* True if the Panel should display a "close" button
-	* @config close
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("close", { value:true, handler:this.configClose, validator:this.cfg.checkBoolean, supercedes:["visible"] } );
-
-	/**
-	* True if the Panel should be draggable
-	* @config draggable
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty("draggable", { value:true,	handler:this.configDraggable, validator:this.cfg.checkBoolean, supercedes:["visible"] } );
-
-	/**
-	* Sets the type of underlay to display for the Panel. Valid values are "shadow", "matte", and "none".
-	* @config underlay
-	* @type String
-	* @default shadow
-	*/
-	this.cfg.addProperty("underlay", { value:"shadow", handler:this.configUnderlay, supercedes:["visible"] } );
-
-	/**
-	* True if the Panel should be displayed in a modal fashion, automatically creating a transparent mask over the document that will not be removed until the Panel is dismissed.
-	* @config modal
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty("modal",	{ value:false, handler:this.configModal, validator:this.cfg.checkBoolean, supercedes:["visible"] } );
-
-	/**
-	* A KeyListener (or array of KeyListeners) that will be enabled when the Panel is shown, and disabled when the Panel is hidden.
-	* @config keylisteners
-	* @type YAHOO.util.KeyListener[]
-	* @default null
-	*/
-	this.cfg.addProperty("keylisteners", { handler:this.configKeyListeners, suppressEvent:true, supercedes:["visible"] } );
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler fired when the "close" property is changed. The method controls the appending or hiding of the close icon at the top right of the Panel.
-* @method configClose
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configClose = function(type, args, obj) {
-	var val = args[0];
-
-	var doHide = function(e, obj) {
-		obj.hide();
-	};
-
-	if (val) {
-		if (! this.close) {
-			this.close = document.createElement("DIV");
-			YAHOO.util.Dom.addClass(this.close, "close");
-
-			if (this.isSecure) {
-				YAHOO.util.Dom.addClass(this.close, "secure");
-			} else {
-				YAHOO.util.Dom.addClass(this.close, "nonsecure");
-			}
-
-			this.close.innerHTML = "&#160;";
-			this.innerElement.appendChild(this.close);
-			YAHOO.util.Event.addListener(this.close, "click", doHide, this);
-		} else {
-			this.close.style.display = "block";
-		}
-	} else {
-		if (this.close) {
-			this.close.style.display = "none";
-		}
-	}
-};
-
-/**
-* The default event handler fired when the "draggable" property is changed.
-* @method configDraggable
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configDraggable = function(type, args, obj) {
-	var val = args[0];
-	if (val) {
-		if (this.header) {
-			YAHOO.util.Dom.setStyle(this.header,"cursor","move");
-			this.registerDragDrop();
-		}
-	} else {
-		if (this.dd) {
-			this.dd.unreg();
-		}
-		if (this.header) {
-			YAHOO.util.Dom.setStyle(this.header,"cursor","auto");
-		}
-	}
-};
-
-/**
-* The default event handler fired when the "underlay" property is changed.
-* @method configUnderlay
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configUnderlay = function(type, args, obj) {
-	var val = args[0];
-
-	switch (val.toLowerCase()) {
-		case "shadow":
-			YAHOO.util.Dom.removeClass(this.element, "matte");
-			YAHOO.util.Dom.addClass(this.element, "shadow");
-
-			if (! this.underlay) { // create if not already in DOM
-				this.underlay = document.createElement("DIV");
-				this.underlay.className = "underlay";
-				this.underlay.innerHTML = "&#160;";
-				this.element.appendChild(this.underlay);
-			}
-
-			this.sizeUnderlay();
-			break;
-		case "matte":
-			YAHOO.util.Dom.removeClass(this.element, "shadow");
-			YAHOO.util.Dom.addClass(this.element, "matte");
-			break;
-		default:
-			YAHOO.util.Dom.removeClass(this.element, "shadow");
-			YAHOO.util.Dom.removeClass(this.element, "matte");
-			break;
-	}
-};
-
-/**
-* The default event handler fired when the "modal" property is changed. This handler subscribes or unsubscribes to the show and hide events to handle the display or hide of the modality mask.
-* @method configModal
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configModal = function(type, args, obj) {
-	var modal = args[0];
-
-	if (modal) {
-		this.buildMask();
-
-		if (! YAHOO.util.Config.alreadySubscribed( this.beforeShowEvent, this.showMask, this ) ) {
-			this.beforeShowEvent.subscribe(this.showMask, this, true);
-		}
-		if (! YAHOO.util.Config.alreadySubscribed( this.hideEvent, this.hideMask, this) ) {
-			this.hideEvent.subscribe(this.hideMask, this, true);
-		}
-		if (! YAHOO.util.Config.alreadySubscribed( YAHOO.widget.Overlay.windowResizeEvent, this.sizeMask, this ) ) {
-			YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask, this, true);
-		}
-		if (! YAHOO.util.Config.alreadySubscribed( this.destroyEvent, this.removeMask, this) ) {
-			this.destroyEvent.subscribe(this.removeMask, this, true);
-		}
-
-		this.cfg.refireEvent("zIndex");
-	} else {
-		this.beforeShowEvent.unsubscribe(this.showMask, this);
-		this.hideEvent.unsubscribe(this.hideMask, this);
-		YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
-		this.destroyEvent.unsubscribe(this.removeMask, this);
-	}
-};
-
-/**
-* Removes the modality mask.
-* @method removeMask
-*/
-YAHOO.widget.Panel.prototype.removeMask = function() {
-	if (this.mask) {
-		if (this.mask.parentNode) {
-			this.mask.parentNode.removeChild(this.mask);
-		}
-		this.mask = null;
-	}
-};
-
-/**
-* The default event handler fired when the "keylisteners" property is changed.
-* @method configKeyListeners
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configKeyListeners = function(type, args, obj) {
-	var listeners = args[0];
-
-	if (listeners) {
-		if (listeners instanceof Array) {
-			for (var i=0;i<listeners.length;i++) {
-				var listener = listeners[i];
-
-				if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, listener.enable, listener)) {
-					this.showEvent.subscribe(listener.enable, listener, true);
-				}
-				if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, listener.disable, listener)) {
-					this.hideEvent.subscribe(listener.disable, listener, true);
-					this.destroyEvent.subscribe(listener.disable, listener, true);
-				}
-			}
-		} else {
-			if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, listeners.enable, listeners)) {
-				this.showEvent.subscribe(listeners.enable, listeners, true);
-			}
-			if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, listeners.disable, listeners)) {
-				this.hideEvent.subscribe(listeners.disable, listeners, true);
-				this.destroyEvent.subscribe(listeners.disable, listeners, true);
-			}
-		}
-	}
-};
-
-/**
-* The default event handler fired when the "height" property is changed.
-* @method configHeight
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configHeight = function(type, args, obj) {
-	var height = args[0];
-	var el = this.innerElement;
-	YAHOO.util.Dom.setStyle(el, "height", height);
-	this.cfg.refireEvent("underlay");
-	this.cfg.refireEvent("iframe");
-};
-
-/**
-* The default event handler fired when the "width" property is changed.
-* @method configWidth
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configWidth = function(type, args, obj) {
-	var width = args[0];
-	var el = this.innerElement;
-	YAHOO.util.Dom.setStyle(el, "width", width);
-	this.cfg.refireEvent("underlay");
-	this.cfg.refireEvent("iframe");
-};
-
-/**
-* The default event handler fired when the "zIndex" property is changed.
-* @method configzIndex
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Panel.prototype.configzIndex = function(type, args, obj) {
-	YAHOO.widget.Panel.superclass.configzIndex.call(this, type, args, obj);
-
-	var maskZ = 0;
-	var currentZ = YAHOO.util.Dom.getStyle(this.element, "zIndex");
-
-	if (this.mask) {
-		if (! currentZ || isNaN(currentZ)) {
-			currentZ = 0;
-		}
-
-		if (currentZ === 0) {
-			this.cfg.setProperty("zIndex", 1);
-		} else {
-			maskZ = currentZ - 1;
-			YAHOO.util.Dom.setStyle(this.mask, "zIndex", maskZ);
-		}
-
-	}
-};
-
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Builds the wrapping container around the Panel that is used for positioning the shadow and matte underlays. The container element is assigned to a  local instance variable called container, and the element is reinserted inside of it.
-* @method buildWrapper
-*/
-YAHOO.widget.Panel.prototype.buildWrapper = function() {
-	var elementParent = this.element.parentNode;
-	var originalElement = this.element;
-
-	var wrapper = document.createElement("DIV");
-	wrapper.className = YAHOO.widget.Panel.CSS_PANEL_CONTAINER;
-	wrapper.id = originalElement.id + "_c";
-
-	if (elementParent) {
-		elementParent.insertBefore(wrapper, originalElement);
-	}
-
-	wrapper.appendChild(originalElement);
-
-	this.element = wrapper;
-	this.innerElement = originalElement;
-
-	YAHOO.util.Dom.setStyle(this.innerElement, "visibility", "inherit");
-};
-
-/**
-* Adjusts the size of the shadow based on the size of the element.
-* @method sizeUnderlay
-*/
-YAHOO.widget.Panel.prototype.sizeUnderlay = function() {
-	if (this.underlay && this.browser != "gecko" && this.browser != "safari") {
-		this.underlay.style.width = this.innerElement.offsetWidth + "px";
-		this.underlay.style.height = this.innerElement.offsetHeight + "px";
-	}
-};
-
-/**
-* Event handler fired when the resize monitor element is resized.
-* @method onDomResize
-* @param {DOMEvent} e	The resize DOM event
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.Panel.prototype.onDomResize = function(e, obj) {
-	YAHOO.widget.Panel.superclass.onDomResize.call(this, e, obj);
-	var me = this;
-	setTimeout(function() {
-		me.sizeUnderlay();
-	}, 0);
-};
-
-/**
-* Registers the Panel's header for drag & drop capability.
-* @method registerDragDrop
-*/
-YAHOO.widget.Panel.prototype.registerDragDrop = function() {
-	if (this.header) {
-		this.dd = new YAHOO.util.DD(this.element.id, this.id);
-
-		if (! this.header.id) {
-			this.header.id = this.id + "_h";
-		}
-
-		var me = this;
-
-		this.dd.startDrag = function() {
-
-			if (me.browser == "ie") {
-				YAHOO.util.Dom.addClass(me.element,"drag");
-			}
-
-			if (me.cfg.getProperty("constraintoviewport")) {
-				var offsetHeight = me.element.offsetHeight;
-				var offsetWidth = me.element.offsetWidth;
-
-				var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
-				var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
-
-				var scrollX = window.scrollX || document.documentElement.scrollLeft;
-				var scrollY = window.scrollY || document.documentElement.scrollTop;
-
-				var topConstraint = scrollY + 10;
-				var leftConstraint = scrollX + 10;
-				var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
-				var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-
-				this.minX = leftConstraint;
-				this.maxX = rightConstraint;
-				this.constrainX = true;
-
-				this.minY = topConstraint;
-				this.maxY = bottomConstraint;
-				this.constrainY = true;
-			} else {
-				this.constrainX = false;
-				this.constrainY = false;
-			}
-
-			me.dragEvent.fire("startDrag", arguments);
-		};
-
-		this.dd.onDrag = function() {
-			me.syncPosition();
-			me.cfg.refireEvent("iframe");
-			if (this.platform == "mac" && this.browser == "gecko") {
-				this.showMacGeckoScrollbars();
-			}
-
-			me.dragEvent.fire("onDrag", arguments);
-		};
-
-		this.dd.endDrag = function() {
-			if (me.browser == "ie") {
-				YAHOO.util.Dom.removeClass(me.element,"drag");
-			}
-
-			me.dragEvent.fire("endDrag", arguments);
-		};
-
-		this.dd.setHandleElId(this.header.id);
-		this.dd.addInvalidHandleType("INPUT");
-		this.dd.addInvalidHandleType("SELECT");
-		this.dd.addInvalidHandleType("TEXTAREA");
-	}
-};
-
-/**
-* Builds the mask that is laid over the document when the Panel is configured to be modal.
-* @method buildMask
-*/
-YAHOO.widget.Panel.prototype.buildMask = function() {
-	if (! this.mask) {
-		this.mask = document.createElement("DIV");
-		this.mask.id = this.id + "_mask";
-		this.mask.className = "mask";
-		this.mask.innerHTML = "&#160;";
-
-		var maskClick = function(e, obj) {
-			YAHOO.util.Event.stopEvent(e);
-		};
-
-		var firstChild = document.body.firstChild;
-		if (firstChild)	{
-			document.body.insertBefore(this.mask, document.body.firstChild);
-		} else {
-			document.body.appendChild(this.mask);
-		}
-	}
-};
-
-/**
-* Hides the modality mask.
-* @method hideMask
-*/
-YAHOO.widget.Panel.prototype.hideMask = function() {
-	if (this.cfg.getProperty("modal") && this.mask) {
-		this.mask.style.display = "none";
-		this.hideMaskEvent.fire();
-		YAHOO.util.Dom.removeClass(document.body, "masked");
-	}
-};
-
-/**
-* Shows the modality mask.
-* @method showMask
-*/
-YAHOO.widget.Panel.prototype.showMask = function() {
-	if (this.cfg.getProperty("modal") && this.mask) {
-		YAHOO.util.Dom.addClass(document.body, "masked");
-		this.sizeMask();
-		this.mask.style.display = "block";
-		this.showMaskEvent.fire();
-	}
-};
-
-/**
-* Sets the size of the modality mask to cover the entire scrollable area of the document
-* @method sizeMask
-*/
-YAHOO.widget.Panel.prototype.sizeMask = function() {
-	if (this.mask) {
-		this.mask.style.height = YAHOO.util.Dom.getDocumentHeight()+"px";
-		this.mask.style.width = YAHOO.util.Dom.getDocumentWidth()+"px";
-	}
-};
-
-/**
-* Renders the Panel by inserting the elements that are not already in the main Panel into their correct places. Optionally appends the Panel to the specified node prior to the render's execution. NOTE: For Panels without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
-* @method render
-* @param {String}	appendToNode	The element id to which the Module should be appended to prior to rendering <em>OR</em>
-* @param {HTMLElement}	appendToNode	The element to which the Module should be appended to prior to rendering
-* @return {boolean} Success or failure of the render
-*/
-YAHOO.widget.Panel.prototype.render = function(appendToNode) {
-	return YAHOO.widget.Panel.superclass.render.call(this, appendToNode, this.innerElement);
-};
-
-/**
-* Returns a String representation of the object.
-* @method toString
-* @return {String} The string representation of the Panel.
-*/
-YAHOO.widget.Panel.prototype.toString = function() {
-	return "Panel " + this.id;
-};
-
-/**
-* Dialog is an implementation of Panel that can be used to submit form data. Built-in functionality for buttons with event handlers is included, and button sets can be build dynamically, or the preincluded ones for Submit/Cancel and OK/Cancel can be utilized. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
-* @namespace YAHOO.widget
-* @class Dialog
-* @extends YAHOO.widget.Panel
-* @constructor
-* @param {String}	el	The element ID representing the Dialog <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Dialog
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
-*/
-YAHOO.widget.Dialog = function(el, userConfig) {
-	YAHOO.widget.Dialog.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Dialog, YAHOO.widget.Panel);
-
-/**
-* Constant representing the default CSS class used for a Dialog
-* @property YAHOO.widget.Dialog.CSS_DIALOG
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Dialog.CSS_DIALOG = "dialog";
-
-/**
-* Initializes the class's configurable properties which can be changed using the Dialog's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Dialog.prototype.initDefaultConfig = function() {
-	YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);
-
-	/**
-	* The internally maintained callback object for use with the Connection utility
-	* @property callback
-	* @type Object
-	*/
-	this.callback = {
-		/**
-		* The function to execute upon success of the Connection submission
-		* @property callback.success
-		* @type Function
-		*/
-		success : null,
-		/**
-		* The function to execute upon failure of the Connection submission
-		* @property callback.failure
-		* @type Function
-		*/
-		failure : null,
-		/**
-		* The arbitraty argument or arguments to pass to the Connection callback functions
-		* @property callback.argument
-		* @type Object
-		*/
-		argument: null
-	};
-
-	// Add form dialog config properties //
-
-	/**
-	* The method to use for posting the Dialog's form. Possible values are "async", "form", and "manual".
-	* @config postmethod
-	* @type String
-	* @default async
-	*/
-	this.cfg.addProperty("postmethod", { value:"async", handler:this.configPostMethod, validator:function(val) {
-													if (val != "form" && val != "async" && val != "none" && val != "manual") {
-														return false;
-													} else {
-														return true;
-													}
-												} });
-
-	/**
-	* Object literal(s) defining the buttons for the Dialog's footer.
-	* @config buttons
-	* @type Object[]
-	* @default "none"
-	*/
-	this.cfg.addProperty("buttons",		{ value:"none",	handler:this.configButtons } );
-};
-
-/**
-* Initializes the custom events for Dialog which are fired automatically at appropriate times by the Dialog class.
-* @method initEvents
-*/
-YAHOO.widget.Dialog.prototype.initEvents = function() {
-	YAHOO.widget.Dialog.superclass.initEvents.call(this);
-
-	/**
-	* CustomEvent fired prior to submission
-	* @event beforeSumitEvent
-	*/
-	this.beforeSubmitEvent	= new YAHOO.util.CustomEvent("beforeSubmit");
-
-	/**
-	* CustomEvent fired after submission
-	* @event submitEvent
-	*/
-	this.submitEvent		= new YAHOO.util.CustomEvent("submit");
-
-	/**
-	* CustomEvent fired prior to manual submission
-	* @event manualSubmitEvent
-	*/
-	this.manualSubmitEvent	= new YAHOO.util.CustomEvent("manualSubmit");
-
-	/**
-	* CustomEvent fired prior to asynchronous submission
-	* @event asyncSubmitEvent
-	*/
-	this.asyncSubmitEvent	= new YAHOO.util.CustomEvent("asyncSubmit");
-
-	/**
-	* CustomEvent fired prior to form-based submission
-	* @event formSubmitEvent
-	*/
-	this.formSubmitEvent	= new YAHOO.util.CustomEvent("formSubmit");
-
-	/**
-	* CustomEvent fired after cancel
-	* @event cancelEvent
-	*/
-	this.cancelEvent		= new YAHOO.util.CustomEvent("cancel");
-};
-
-/**
-* The Dialog initialization method, which is executed for Dialog and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String}	el	The element ID representing the Dialog <em>OR</em>
-* @param {HTMLElement}	el	The element representing the Dialog
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
-*/
-YAHOO.widget.Dialog.prototype.init = function(el, userConfig) {
-	YAHOO.widget.Dialog.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
-	this.beforeInitEvent.fire(YAHOO.widget.Dialog);
-
-	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Dialog.CSS_DIALOG);
-
-	this.cfg.setProperty("visible", false);
-
-	if (userConfig) {
-		this.cfg.applyConfig(userConfig, true);
-	}
-
-	this.showEvent.subscribe(this.focusFirst, this, true);
-	this.beforeHideEvent.subscribe(this.blurButtons, this, true);
-
-	this.beforeRenderEvent.subscribe(function() {
-		var buttonCfg = this.cfg.getProperty("buttons");
-		if (buttonCfg && buttonCfg != "none") {
-			if (! this.footer) {
-				this.setFooter("");
-			}
-		}
-	}, this, true);
-
-	this.initEvent.fire(YAHOO.widget.Dialog);
-};
-
-/**
-* Performs the submission of the Dialog form depending on the value of "postmethod" property.
-* @method doSubmit
-*/
-YAHOO.widget.Dialog.prototype.doSubmit = function() {
-	var pm = this.cfg.getProperty("postmethod");
-	switch (pm) {
-		case "async":
-			var method = this.form.getAttribute("method") || 'POST';
-			method = method.toUpperCase();
-			YAHOO.util.Connect.setForm(this.form);
-			var cObj = YAHOO.util.Connect.asyncRequest(method, this.form.getAttribute("action"), this.callback);
-			this.asyncSubmitEvent.fire();
-			break;
-		case "form":
-			this.form.submit();
-			this.formSubmitEvent.fire();
-			break;
-		case "none":
-		case "manual":
-			this.manualSubmitEvent.fire();
-			break;
-	}
-};
-
-/**
-* Prepares the Dialog's internal FORM object, creating one if one is not currently present.
-* @method registerForm
-*/
-YAHOO.widget.Dialog.prototype.registerForm = function() {
-	var form = this.element.getElementsByTagName("FORM")[0];
-
-	if (! form) {
-		var formHTML = "<form name=\"frm_" + this.id + "\" action=\"\"></form>";
-		this.body.innerHTML += formHTML;
-		form = this.element.getElementsByTagName("FORM")[0];
-	}
-
-	this.firstFormElement = function() {
-		for (var f=0;f<form.elements.length;f++ ) {
-			var el = form.elements[f];
-			if (el.focus) {
-				if (el.type && el.type != "hidden") {
-					return el;
-				}
-			}
-		}
-		return null;
-	}();
-
-	this.lastFormElement = function() {
-		for (var f=form.elements.length-1;f>=0;f-- ) {
-			var el = form.elements[f];
-			if (el.focus) {
-				if (el.type && el.type != "hidden") {
-					return el;
-				}
-			}
-		}
-		return null;
-	}();
-
-	this.form = form;
-
-	if (this.cfg.getProperty("modal") && this.form) {
-
-		var me = this;
-
-		var firstElement = this.firstFormElement || this.firstButton;
-		if (firstElement) {
-			this.preventBackTab = new YAHOO.util.KeyListener(firstElement, { shift:true, keys:9 }, {fn:me.focusLast, scope:me, correctScope:true} );
-			this.showEvent.subscribe(this.preventBackTab.enable, this.preventBackTab, true);
-			this.hideEvent.subscribe(this.preventBackTab.disable, this.preventBackTab, true);
-		}
-
-		var lastElement = this.lastButton || this.lastFormElement;
-		if (lastElement) {
-			this.preventTabOut = new YAHOO.util.KeyListener(lastElement, { shift:false, keys:9 }, {fn:me.focusFirst, scope:me, correctScope:true} );
-			this.showEvent.subscribe(this.preventTabOut.enable, this.preventTabOut, true);
-			this.hideEvent.subscribe(this.preventTabOut.disable, this.preventTabOut, true);
-		}
-	}
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler for the "buttons" configuration property
-* @method configButtons
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Dialog.prototype.configButtons = function(type, args, obj) {
-	var buttons = args[0];
-	if (buttons != "none") {
-		this.buttonSpan = null;
-		this.buttonSpan = document.createElement("SPAN");
-		this.buttonSpan.className = "button-group";
-
-		for (var b=0;b<buttons.length;b++) {
-			var button = buttons[b];
-
-			var htmlButton = document.createElement("BUTTON");
-			htmlButton.setAttribute("type", "button");
-
-			if (button.isDefault) {
-				htmlButton.className = "default";
-				this.defaultHtmlButton = htmlButton;
-			}
-
-			htmlButton.appendChild(document.createTextNode(button.text));
-			YAHOO.util.Event.addListener(htmlButton, "click", button.handler, this, true);
-
-			this.buttonSpan.appendChild(htmlButton);
-			button.htmlButton = htmlButton;
-
-			if (b === 0) {
-				this.firstButton = button.htmlButton;
-			}
-
-			if (b == (buttons.length-1)) {
-				this.lastButton = button.htmlButton;
-			}
-
-		}
-
-		this.setFooter(this.buttonSpan);
-
-		this.cfg.refireEvent("iframe");
-		this.cfg.refireEvent("underlay");
-	} else { // Do cleanup
-		if (this.buttonSpan) {
-			if (this.buttonSpan.parentNode) {
-				this.buttonSpan.parentNode.removeChild(this.buttonSpan);
-			}
-
-			this.buttonSpan = null;
-			this.firstButton = null;
-			this.lastButton = null;
-			this.defaultHtmlButton = null;
-		}
-	}
-};
-
-
-/**
-* The default event handler used to focus the first field of the form when the Dialog is shown.
-* @method focusFirst
-*/
-YAHOO.widget.Dialog.prototype.focusFirst = function(type,args,obj) {
-	if (args) {
-		var e = args[1];
-		if (e) {
-			YAHOO.util.Event.stopEvent(e);
-		}
-	}
-
-	if (this.firstFormElement) {
-		this.firstFormElement.focus();
-	} else {
-		this.focusDefaultButton();
-	}
-};
-
-/**
-* Sets the focus to the last button in the button or form element in the Dialog
-* @method focusLast
-*/
-YAHOO.widget.Dialog.prototype.focusLast = function(type,args,obj) {
-	if (args) {
-		var e = args[1];
-		if (e) {
-			YAHOO.util.Event.stopEvent(e);
-		}
-	}
-
-	var buttons = this.cfg.getProperty("buttons");
-	if (buttons && buttons instanceof Array) {
-		this.focusLastButton();
-	} else {
-		if (this.lastFormElement) {
-			this.lastFormElement.focus();
-		}
-	}
-};
-
-/**
-* Sets the focus to the button that is designated as the default. By default, his handler is executed when the show event is fired.
-* @method focusDefaultButton
-*/
-YAHOO.widget.Dialog.prototype.focusDefaultButton = function() {
-	if (this.defaultHtmlButton) {
-		this.defaultHtmlButton.focus();
-	}
-};
-
-/**
-* Blurs all the html buttons
-* @method blurButtons
-*/
-YAHOO.widget.Dialog.prototype.blurButtons = function() {
-	var buttons = this.cfg.getProperty("buttons");
-	if (buttons && buttons instanceof Array) {
-		var html = buttons[0].htmlButton;
-		if (html) {
-			html.blur();
-		}
-	}
-};
-
-/**
-* Sets the focus to the first button in the button list
-* @method focusFirstButton
-*/
-YAHOO.widget.Dialog.prototype.focusFirstButton = function() {
-	var buttons = this.cfg.getProperty("buttons");
-	if (buttons && buttons instanceof Array) {
-		var html = buttons[0].htmlButton;
-		if (html) {
-			html.focus();
-		}
-	}
-};
-
-/**
-* Sets the focus to the first button in the button list
-* @method focusLastButton
-*/
-YAHOO.widget.Dialog.prototype.focusLastButton = function() {
-	var buttons = this.cfg.getProperty("buttons");
-	if (buttons && buttons instanceof Array) {
-		var html = buttons[buttons.length-1].htmlButton;
-		if (html) {
-			html.focus();
-		}
-	}
-};
-
-/**
-* The default event handler for the "postmethod" configuration property
-* @method configPostMethod
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Dialog.prototype.configPostMethod = function(type, args, obj) {
-	var postmethod = args[0];
-
-	this.registerForm();
-	YAHOO.util.Event.addListener(this.form, "submit", function(e) {
-														YAHOO.util.Event.stopEvent(e);
-														this.submit();
-														this.form.blur();
-													  }, this, true);
-};
-
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Built-in function hook for writing a validation function that will be checked for a "true" value prior to a submit. This function, as implemented by default, always returns true, so it should be overridden if validation is necessary.
-* @method validate
-*/
-YAHOO.widget.Dialog.prototype.validate = function() {
-	return true;
-};
-
-/**
-* Executes a submit of the Dialog followed by a hide, if validation is successful.
-* @method submit
-*/
-YAHOO.widget.Dialog.prototype.submit = function() {
-	if (this.validate()) {
-		this.beforeSubmitEvent.fire();
-		this.doSubmit();
-		this.submitEvent.fire();
-		this.hide();
-		return true;
-	} else {
-		return false;
-	}
-};
-
-/**
-* Executes the cancel of the Dialog followed by a hide.
-* @method cancel
-*/
-YAHOO.widget.Dialog.prototype.cancel = function() {
-	this.cancelEvent.fire();
-	this.hide();
-};
-
-/**
-* Returns a JSON-compatible data structure representing the data currently contained in the form.
-* @method getData
-* @return {Object} A JSON object reprsenting the data of the current form.
-*/
-YAHOO.widget.Dialog.prototype.getData = function() {
-	var form = this.form;
-	var data = {};
-
-	if (form) {
-		for (var i=0;i<form.elements.length;i++) {
-			var formItem = form.elements[i];
-			if (formItem) {
-				if (formItem.tagName) { // Got a single form item
-					switch (formItem.tagName) {
-						case "INPUT":
-							switch (formItem.type) {
-								case "checkbox":
-									data[formItem.name] = formItem.checked;
-									break;
-								case "textbox":
-								case "text":
-								case "hidden":
-									data[formItem.name] = formItem.value;
-									break;
-							}
-							break;
-						case "TEXTAREA":
-							data[formItem.name] = formItem.value;
-							break;
-						case "SELECT":
-							var val = [];
-							for (var x=0;x<formItem.options.length;x++)	{
-								var option = formItem.options[x];
-								if (option.selected) {
-									var selval = option.value;
-									if (! selval || selval === "") {
-										selval = option.text;
-									}
-									val[val.length] = selval;
-								}
-							}
-							data[formItem.name] = val;
-							break;
-					}
-				} else if (formItem[0] && formItem[0].tagName) { // this is an array of form items
-					if (formItem[0].tagName == "INPUT") {
-						switch (formItem[0].type) {
-							case "radio":
-								for (var r=0; r<formItem.length; r++) {
-									var radio = formItem[r];
-									if (radio.checked) {
-										data[radio.name] = radio.value;
-										break;
-									}
-								}
-								break;
-							case "checkbox":
-								var cbArray = [];
-								for (var c=0; c<formItem.length; c++) {
-									var check = formItem[c];
-									if (check.checked) {
-										cbArray[cbArray.length] = check.value;
-									}
-								}
-								data[formItem[0].name] = cbArray;
-								break;
-						}
-					}
-				}
-			}
-		}
-	}
-	return data;
-};
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	The string representation of the Dialog
-*/
-YAHOO.widget.Dialog.prototype.toString = function() {
-	return "Dialog " + this.id;
-};
-
-/**
-* SimpleDialog is a simple implementation of Dialog that can be used to submit a single value. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
-* @namespace YAHOO.widget
-* @class SimpleDialog
-* @extends YAHOO.widget.Dialog
-* @constructor
-* @param {String}	el	The element ID representing the SimpleDialog <em>OR</em>
-* @param {HTMLElement}	el	The element representing the SimpleDialog
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
-*/
-YAHOO.widget.SimpleDialog = function(el, userConfig) {
-	YAHOO.widget.SimpleDialog.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.SimpleDialog, YAHOO.widget.Dialog);
-
-/**
-* Constant for the standard network icon for a blocking action
-* @property YAHOO.widget.SimpleDialog.ICON_BLOCK
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_BLOCK = "nt/ic/ut/bsc/blck16_1.gif";
-
-/**
-* Constant for the standard network icon for alarm
-* @property YAHOO.widget.SimpleDialog.ICON_ALARM
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_ALARM = "nt/ic/ut/bsc/alrt16_1.gif";
-
-/**
-* Constant for the standard network icon for help
-* @property YAHOO.widget.SimpleDialog.ICON_HELP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_HELP  = "nt/ic/ut/bsc/hlp16_1.gif";
-
-/**
-* Constant for the standard network icon for info
-* @property YAHOO.widget.SimpleDialog.ICON_INFO
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_INFO  = "nt/ic/ut/bsc/info16_1.gif";
-
-/**
-* Constant for the standard network icon for warn
-* @property YAHOO.widget.SimpleDialog.ICON_WARN
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_WARN  = "nt/ic/ut/bsc/warn16_1.gif";
-
-/**
-* Constant for the standard network icon for a tip
-* @property YAHOO.widget.SimpleDialog.ICON_TIP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_TIP   = "nt/ic/ut/bsc/tip16_1.gif";
-
-/**
-* Constant representing the default CSS class used for a SimpleDialog
-* @property YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG = "simple-dialog";
-
-/**
-* Initializes the class's configurable properties which can be changed using the SimpleDialog's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.SimpleDialog.prototype.initDefaultConfig = function() {
-	YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);
-
-	// Add dialog config properties //
-
-	/**
-	* Sets the informational icon for the SimpleDialog
-	* @config icon
-	* @type String
-	* @default "none"
-	*/
-	this.cfg.addProperty("icon",	{ value:"none",	handler:this.configIcon, suppressEvent:true } );
-
-	/**
-	* Sets the text for the SimpleDialog
-	* @config text
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty("text",	{ value:"", handler:this.configText, suppressEvent:true, supercedes:["icon"] } );
-};
-
-
-/**
-* The SimpleDialog initialization method, which is executed for SimpleDialog and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String}	el	The element ID representing the SimpleDialog <em>OR</em>
-* @param {HTMLElement}	el	The element representing the SimpleDialog
-* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
-*/
-YAHOO.widget.SimpleDialog.prototype.init = function(el, userConfig) {
-	YAHOO.widget.SimpleDialog.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
-	this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);
-
-	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);
-
-	this.cfg.queueProperty("postmethod", "manual");
-
-	if (userConfig) {
-		this.cfg.applyConfig(userConfig, true);
-	}
-
-	this.beforeRenderEvent.subscribe(function() {
-		if (! this.body) {
-			this.setBody("");
-		}
-	}, this, true);
-
-	this.initEvent.fire(YAHOO.widget.SimpleDialog);
-
-};
-/**
-* Prepares the SimpleDialog's internal FORM object, creating one if one is not currently present, and adding the value hidden field.
-* @method registerForm
-*/
-YAHOO.widget.SimpleDialog.prototype.registerForm = function() {
-	YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);
-	this.form.innerHTML += "<input type=\"hidden\" name=\"" + this.id + "\" value=\"\"/>";
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Fired when the "icon" property is set.
-* @method configIcon
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.SimpleDialog.prototype.configIcon = function(type,args,obj) {
-	var icon = args[0];
-	if (icon && icon != "none") {
-		var iconHTML = "<img src=\"" + this.imageRoot + icon + "\" class=\"icon\" />";
-		this.body.innerHTML = iconHTML + this.body.innerHTML;
-	}
-};
-
-/**
-* Fired when the "text" property is set.
-* @method configText
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.SimpleDialog.prototype.configText = function(type,args,obj) {
-	var text = args[0];
-	if (text) {
-		this.setBody(text);
-		this.cfg.refireEvent("icon");
-	}
-};
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	The string representation of the SimpleDialog
-*/
-YAHOO.widget.SimpleDialog.prototype.toString = function() {
-	return "SimpleDialog " + this.id;
-};
-
-/**
-* ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.
-* @namespace YAHOO.widget
-* @class ContainerEffect
-* @constructor
-* @param {YAHOO.widget.Overlay}	overlay		The Overlay that the animation should be associated with
-* @param {Object}	attrIn		The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
-* @param {Object}	attrOut		The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
-* @param {HTMLElement}	targetElement	Optional. The target element that should be animated during the transition. Defaults to overlay.element.
-* @param {class}	Optional. The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.
-*/
-YAHOO.widget.ContainerEffect = function(overlay, attrIn, attrOut, targetElement, animClass) {
-	if (! animClass) {
-		animClass = YAHOO.util.Anim;
-	}
-
-	/**
-	* The overlay to animate
-	* @property overlay
-	* @type YAHOO.widget.Overlay
-	*/
-	this.overlay = overlay;
-	/**
-	* The animation attributes to use when transitioning into view
-	* @property attrIn
-	* @type Object
-	*/
-	this.attrIn = attrIn;
-	/**
-	* The animation attributes to use when transitioning out of view
-	* @property attrOut
-	* @type Object
-	*/
-	this.attrOut = attrOut;
-	/**
-	* The target element to be animated
-	* @property targetElement
-	* @type HTMLElement
-	*/
-	this.targetElement = targetElement || overlay.element;
-	/**
-	* The animation class to use for animating the overlay
-	* @property animClass
-	* @type class
-	*/
-	this.animClass = animClass;
-};
-
-/**
-* Initializes the animation classes and events.
-* @method init
-*/
-YAHOO.widget.ContainerEffect.prototype.init = function() {
-	this.beforeAnimateInEvent = new YAHOO.util.CustomEvent("beforeAnimateIn");
-	this.beforeAnimateOutEvent = new YAHOO.util.CustomEvent("beforeAnimateOut");
-
-	this.animateInCompleteEvent = new YAHOO.util.CustomEvent("animateInComplete");
-	this.animateOutCompleteEvent = new YAHOO.util.CustomEvent("animateOutComplete");
-
-	this.animIn = new this.animClass(this.targetElement, this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);
-	this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);
-	this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);
-	this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);
-
-	this.animOut = new this.animClass(this.targetElement, this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);
-	this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);
-	this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);
-	this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);
-};
-
-/**
-* Triggers the in-animation.
-* @method animateIn
-*/
-YAHOO.widget.ContainerEffect.prototype.animateIn = function() {
-	this.beforeAnimateInEvent.fire();
-	this.animIn.animate();
-};
-
-/**
-* Triggers the out-animation.
-* @method animateOut
-*/
-YAHOO.widget.ContainerEffect.prototype.animateOut = function() {
-	this.beforeAnimateOutEvent.fire();
-	this.animOut.animate();
-};
-
-/**
-* The default onStart handler for the in-animation.
-* @method handleStartAnimateIn
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn = function(type, args, obj) { };
-/**
-* The default onTween handler for the in-animation.
-* @method handleTweenAnimateIn
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn = function(type, args, obj) { };
-/**
-* The default onComplete handler for the in-animation.
-* @method handleCompleteAnimateIn
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn = function(type, args, obj) { };
-
-/**
-* The default onStart handler for the out-animation.
-* @method handleStartAnimateOut
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut = function(type, args, obj) { };
-/**
-* The default onTween handler for the out-animation.
-* @method handleTweenAnimateOut
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut = function(type, args, obj) { };
-/**
-* The default onComplete handler for the out-animation.
-* @method handleCompleteAnimateOut
-* @param {String} type	The CustomEvent type
-* @param {Object[]}	args	The CustomEvent arguments
-* @param {Object} obj	The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut = function(type, args, obj) { };
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	The string representation of the ContainerEffect
-*/
-YAHOO.widget.ContainerEffect.prototype.toString = function() {
-	var output = "ContainerEffect";
-	if (this.overlay) {
-		output += " [" + this.overlay.toString() + "]";
-	}
-	return output;
-};
-
-/**
-* A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
-* @method FADE
-* @static
-* @param {Overlay}	overlay	The Overlay object to animate
-* @param {Number}	dur	The duration of the animation
-* @return {ContainerEffect}	The configured ContainerEffect object
-*/
-YAHOO.widget.ContainerEffect.FADE = function(overlay, dur) {
-	var fade = new YAHOO.widget.ContainerEffect(overlay, { attributes:{opacity: {from:0, to:1}}, duration:dur, method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );
-
-	fade.handleStartAnimateIn = function(type,args,obj) {
-		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
-
-		if (! obj.overlay.underlay) {
-			obj.overlay.cfg.refireEvent("underlay");
-		}
-
-		if (obj.overlay.underlay) {
-			obj.initialUnderlayOpacity = YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");
-			obj.overlay.underlay.style.filter = null;
-		}
-
-		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
-		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);
-	};
-
-	fade.handleCompleteAnimateIn = function(type,args,obj) {
-		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
-
-		if (obj.overlay.element.style.filter) {
-			obj.overlay.element.style.filter = null;
-		}
-
-		if (obj.overlay.underlay) {
-			YAHOO.util.Dom.setStyle(obj.overlay.underlay, "opacity", obj.initialUnderlayOpacity);
-		}
-
-		obj.overlay.cfg.refireEvent("iframe");
-		obj.animateInCompleteEvent.fire();
-	};
-
-	fade.handleStartAnimateOut = function(type, args, obj) {
-		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
-
-		if (obj.overlay.underlay) {
-			obj.overlay.underlay.style.filter = null;
-		}
-	};
-
-	fade.handleCompleteAnimateOut =  function(type, args, obj) {
-		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
-		if (obj.overlay.element.style.filter) {
-			obj.overlay.element.style.filter = null;
-		}
-		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
-		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1);
-
-		obj.overlay.cfg.refireEvent("iframe");
-
-		obj.animateOutCompleteEvent.fire();
-	};
-
-	fade.init();
-	return fade;
-};
-
-
-/**
-* A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
-* @method SLIDE
-* @static
-* @param {Overlay}	overlay	The Overlay object to animate
-* @param {Number}	dur	The duration of the animation
-* @return {ContainerEffect}	The configured ContainerEffect object
-*/
-YAHOO.widget.ContainerEffect.SLIDE = function(overlay, dur) {
-	var x = overlay.cfg.getProperty("x") || YAHOO.util.Dom.getX(overlay.element);
-	var y = overlay.cfg.getProperty("y") || YAHOO.util.Dom.getY(overlay.element);
-
-	var clientWidth = YAHOO.util.Dom.getClientWidth();
-	var offsetWidth = overlay.element.offsetWidth;
-
-	var slide = new YAHOO.widget.ContainerEffect(overlay, {
-															attributes:{ points: { to:[x, y] } },
-															duration:dur,
-															method:YAHOO.util.Easing.easeIn
-														},
-														{
-															attributes:{ points: { to:[(clientWidth+25), y] } },
-															duration:dur,
-															method:YAHOO.util.Easing.easeOut
-														},
-														overlay.element,
-														YAHOO.util.Motion);
-
-
-	slide.handleStartAnimateIn = function(type,args,obj) {
-		obj.overlay.element.style.left = (-25-offsetWidth) + "px";
-		obj.overlay.element.style.top  = y + "px";
-	};
-
-	slide.handleTweenAnimateIn = function(type, args, obj) {
-
-
-		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
-		var currentX = pos[0];
-		var currentY = pos[1];
-
-		if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") == "hidden" && currentX < x) {
-			YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
-		}
-
-		obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);
-		obj.overlay.cfg.refireEvent("iframe");
-	};
-
-	slide.handleCompleteAnimateIn = function(type, args, obj) {
-		obj.overlay.cfg.setProperty("xy", [x,y], true);
-		obj.startX = x;
-		obj.startY = y;
-		obj.overlay.cfg.refireEvent("iframe");
-		obj.animateInCompleteEvent.fire();
-	};
-
-	slide.handleStartAnimateOut = function(type, args, obj) {
-		var vw = YAHOO.util.Dom.getViewportWidth();
-
-		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
-		var yso = pos[1];
-
-		var currentTo = obj.animOut.attributes.points.to;
-		obj.animOut.attributes.points.to = [(vw+25), yso];
-	};
-
-	slide.handleTweenAnimateOut = function(type, args, obj) {
-		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
-		var xto = pos[0];
-		var yto = pos[1];
-
-		obj.overlay.cfg.setProperty("xy", [xto,yto], true);
-		obj.overlay.cfg.refireEvent("iframe");
-	};
-
-	slide.handleCompleteAnimateOut = function(type, args, obj) {
-		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
-
-		obj.overlay.cfg.setProperty("xy", [x,y]);
-		obj.animateOutCompleteEvent.fire();
-	};
-
-	slide.init();
-	return slide;
-};
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
+* @namespace YAHOO.util
+* @class Config
+* @constructor
+* @param {Object}	owner	The owner Object to which this Config Object belongs
+*/
+YAHOO.util.Config = function(owner) {
+	if (owner) {
+		this.init(owner);
+	}
+};
+
+/**
+ * Constant representing the CustomEvent type for the config changed event.
+ * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.CONFIG_CHANGED_EVENT = "configChanged";
+
+/**
+ * Constant representing the boolean type string
+ * @property YAHOO.util.Config.BOOLEAN_TYPE
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.BOOLEAN_TYPE = "boolean";
+
+YAHOO.util.Config.prototype = {
+	
+	/**
+	* Object reference to the owner of this Config Object
+	* @property owner
+	* @type Object
+	*/
+	owner : null,
+
+	/**
+	* Boolean flag that specifies whether a queue is currently being executed
+	* @property queueInProgress
+	* @type Boolean
+	*/
+	queueInProgress : false,
+
+	/**
+	* Maintains the local collection of configuration property objects and their specified values
+	* @property config
+	* @private
+	* @type Object
+	*/ 
+	config : null,
+
+	/**
+	* Maintains the local collection of configuration property objects as they were initially applied.
+	* This object is used when resetting a property.
+	* @property initialConfig
+	* @private
+	* @type Object
+	*/ 
+	initialConfig : null,
+
+	/**
+	* Maintains the local, normalized CustomEvent queue
+	* @property eventQueue
+	* @private
+	* @type Object
+	*/ 
+	eventQueue : null,
+
+	/**
+	* Custom Event, notifying subscribers when Config properties are set (setProperty is called without the silent flag
+	* @event configChangedEvent
+	*/
+	configChangedEvent : null,
+
+	/**
+	* Validates that the value passed in is a Boolean.
+	* @method checkBoolean
+	* @param	{Object}	val	The value to validate
+	* @return	{Boolean}	true, if the value is valid
+	*/	
+	checkBoolean: function(val) {
+		return (typeof val == YAHOO.util.Config.BOOLEAN_TYPE);
+	},
+
+	/**
+	* Validates that the value passed in is a number.
+	* @method checkNumber
+	* @param	{Object}	val	The value to validate
+	* @return	{Boolean}	true, if the value is valid
+	*/
+	checkNumber: function(val) {
+		return (!isNaN(val));
+	},
+
+	/**
+	* Fires a configuration property event using the specified value. 
+	* @method fireEvent
+	* @private
+	* @param {String}	key			The configuration property's name
+	* @param {value}	Object		The value of the correct type for the property
+	*/ 
+	fireEvent : function( key, value ) {
+		var property = this.config[key];
+
+		if (property && property.event) {
+			property.event.fire(value);
+		}	
+	},
+
+	/**
+	* Adds a property to the Config Object's private config hash.
+	* @method addProperty
+	* @param {String}	key	The configuration property's name
+	* @param {Object}	propertyObject	The Object containing all of this property's arguments
+	*/
+	addProperty : function( key, propertyObject ) {
+		key = key.toLowerCase();
+
+		this.config[key] = propertyObject;
+
+		propertyObject.event = new YAHOO.util.CustomEvent(key, this.owner);
+		propertyObject.key = key;
+
+		if (propertyObject.handler) {
+			propertyObject.event.subscribe(propertyObject.handler, this.owner);
+		}
+
+		this.setProperty(key, propertyObject.value, true);
+		
+		if (! propertyObject.suppressEvent) {
+			this.queueProperty(key, propertyObject.value);
+		}
+		
+	},
+
+	/**
+	* Returns a key-value configuration map of the values currently set in the Config Object.
+	* @method getConfig
+	* @return {Object} The current config, represented in a key-value map
+	*/
+	getConfig : function() {
+		var cfg = {};
+			
+		for (var prop in this.config) {
+			var property = this.config[prop];
+			if (property && property.event) {
+				cfg[prop] = property.value;
+			}
+		}
+		
+		return cfg;
+	},
+
+	/**
+	* Returns the value of specified property.
+	* @method getProperty
+	* @param {String} key	The name of the property
+	* @return {Object}		The value of the specified property
+	*/
+	getProperty : function(key) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			return property.value;
+		} else {
+			return undefined;
+		}
+	},
+
+	/**
+	* Resets the specified property's value to its initial value.
+	* @method resetProperty
+	* @param {String} key	The name of the property
+	* @return {Boolean} True is the property was reset, false if not
+	*/
+	resetProperty : function(key) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+		if (property && property.event) {
+			if (this.initialConfig[key] && !YAHOO.lang.isUndefined(this.initialConfig[key]))	{
+				this.setProperty(key, this.initialConfig[key]);
+			}
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
+	* @method setProperty
+	* @param {String} key		The name of the property
+	* @param {String} value		The value to set the property to
+	* @param {Boolean} silent	Whether the value should be set silently, without firing the property event.
+	* @return {Boolean}			True, if the set was successful, false if it failed.
+	*/
+	setProperty : function(key, value, silent) {
+		key = key.toLowerCase();
+
+		if (this.queueInProgress && ! silent) {
+			this.queueProperty(key,value); // Currently running through a queue... 
+			return true;
+		} else {
+			var property = this.config[key];
+			if (property && property.event) {
+				if (property.validator && ! property.validator(value)) { // validator
+					return false;
+				} else {
+					property.value = value;
+					if (! silent) {
+						this.fireEvent(key, value);
+						this.configChangedEvent.fire([key, value]);
+					}
+					return true;
+				}
+			} else {
+				return false;
+			}
+		}
+	},
+
+	/**
+	* Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
+	* moved from its current position to the end of the queue.
+	* @method queueProperty
+	* @param {String} key	The name of the property
+	* @param {String} value	The value to set the property to
+	* @return {Boolean}		true, if the set was successful, false if it failed.
+	*/	
+	queueProperty : function(key, value) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+							
+		if (property && property.event) {
+			if (!YAHOO.lang.isUndefined(value) && property.validator && ! property.validator(value)) { // validator
+				return false;
+			} else {
+
+				if (!YAHOO.lang.isUndefined(value)) {
+					property.value = value;
+				} else {
+					value = property.value;
+				}
+
+				var foundDuplicate = false;
+				var iLen = this.eventQueue.length;
+				for (var i=0; i < iLen; i++) {
+					var queueItem = this.eventQueue[i];
+
+					if (queueItem) {
+						var queueItemKey = queueItem[0];
+						var queueItemValue = queueItem[1];
+						
+						if (queueItemKey == key) {
+							// found a dupe... push to end of queue, null current item, and break
+							this.eventQueue[i] = null;
+							this.eventQueue.push([key, (!YAHOO.lang.isUndefined(value) ? value : queueItemValue)]);
+							foundDuplicate = true;
+							break;
+						}
+					}
+				}
+				
+				if (! foundDuplicate && !YAHOO.lang.isUndefined(value)) { // this is a refire, or a new property in the queue
+					this.eventQueue.push([key, value]);
+				}
+			}
+
+			if (property.supercedes) {
+				var sLen = property.supercedes.length;
+				for (var s=0; s < sLen; s++) {
+					var supercedesCheck = property.supercedes[s];
+					var qLen = this.eventQueue.length;
+					for (var q=0; q < qLen; q++) {
+						var queueItemCheck = this.eventQueue[q];
+
+						if (queueItemCheck) {
+							var queueItemCheckKey = queueItemCheck[0];
+							var queueItemCheckValue = queueItemCheck[1];
+							
+							if ( queueItemCheckKey == supercedesCheck.toLowerCase() ) {
+								this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+								this.eventQueue[q] = null;
+								break;
+							}
+						}
+					}
+				}
+			}
+
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Fires the event for a property using the property's current value.
+	* @method refireEvent
+	* @param {String} key	The name of the property
+	*/
+	refireEvent : function(key) {
+		key = key.toLowerCase();
+
+		var property = this.config[key];
+		if (property && property.event && !YAHOO.lang.isUndefined(property.value)) {
+			if (this.queueInProgress) {
+				this.queueProperty(key);
+			} else {
+				this.fireEvent(key, property.value);
+			}
+		}
+	},
+
+	/**
+	* Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
+	* Although the values will be set, fireQueue() must be called for their associated events to execute.
+	* @method applyConfig
+	* @param {Object}	userConfig	The configuration Object literal
+	* @param {Boolean}	init		When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.
+	*/
+	applyConfig : function(userConfig, init) {
+		if (init) {
+			this.initialConfig = userConfig;
+		}
+		for (var prop in userConfig) {
+			this.queueProperty(prop, userConfig[prop]);
+		}
+	},
+
+	/**
+	* Refires the events for all configuration properties using their current values.
+	* @method refresh
+	*/
+	refresh : function() {
+		for (var prop in this.config) {
+			this.refireEvent(prop);
+		}
+	},
+
+	/**
+	* Fires the normalized list of queued property change events
+	* @method fireQueue
+	*/
+	fireQueue : function() {
+		this.queueInProgress = true;
+		for (var i=0;i<this.eventQueue.length;i++) {
+			var queueItem = this.eventQueue[i];
+			if (queueItem) {
+				var key = queueItem[0];
+				var value = queueItem[1];
+				
+				var property = this.config[key];
+				property.value = value;
+
+				this.fireEvent(key,value);
+			}
+		}
+		
+		this.queueInProgress = false;
+		this.eventQueue = [];
+	},
+
+	/**
+	* Subscribes an external handler to the change event for any given property. 
+	* @method subscribeToConfigEvent
+	* @param {String}	key			The property name
+	* @param {Function}	handler		The handler function to use subscribe to the property's event
+	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
+	* @param {Boolean}	override	Optional. If true, will override "this" within the handler to map to the scope Object passed into the method.
+	* @return {Boolean}				True, if the subscription was successful, otherwise false.
+	*/	
+	subscribeToConfigEvent : function(key, handler, obj, override) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			if (! YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
+				property.event.subscribe(handler, obj, override);
+			}
+			return true;
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Unsubscribes an external handler from the change event for any given property. 
+	* @method unsubscribeFromConfigEvent
+	* @param {String}	key			The property name
+	* @param {Function}	handler		The handler function to use subscribe to the property's event
+	* @param {Object}	obj			The Object to use for scoping the event handler (see CustomEvent documentation)
+	* @return {Boolean}				True, if the unsubscription was successful, otherwise false.
+	*/
+	unsubscribeFromConfigEvent : function(key, handler, obj) {
+		var property = this.config[key.toLowerCase()];
+		if (property && property.event) {
+			return property.event.unsubscribe(handler, obj);
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Returns a string representation of the Config object
+	* @method toString
+	* @return {String}	The Config object in string format.
+	*/
+	toString : function() {
+		var output = "Config";
+		if (this.owner) {
+			output += " [" + this.owner.toString() + "]";
+		}
+		return output;
+	},
+
+	/**
+	* Returns a string representation of the Config object's current CustomEvent queue
+	* @method outputEventQueue
+	* @return {String}	The string list of CustomEvents currently queued for execution
+	*/
+	outputEventQueue : function() {
+		var output = "";
+		for (var q=0;q<this.eventQueue.length;q++) {
+			var queueItem = this.eventQueue[q];
+			if (queueItem) {
+				output += queueItem[0] + "=" + queueItem[1] + ", ";
+			}
+		}
+		return output;
+	}
+};
+
+
+/**
+* Initializes the configuration Object and all of its local members.
+* @method init
+* @param {Object}	owner	The owner Object to which this Config Object belongs
+*/
+YAHOO.util.Config.prototype.init = function(owner) {
+	this.owner = owner;
+	this.configChangedEvent = new YAHOO.util.CustomEvent(YAHOO.util.CONFIG_CHANGED_EVENT, this);
+	this.queueInProgress = false;
+	this.config = {};
+	this.initialConfig = {};
+	this.eventQueue = [];
+};
+
+/**
+* Checks to determine if a particular function/Object pair are already subscribed to the specified CustomEvent
+* @method YAHOO.util.Config.alreadySubscribed
+* @static
+* @param {YAHOO.util.CustomEvent} evt	The CustomEvent for which to check the subscriptions
+* @param {Function}	fn	The function to look for in the subscribers list
+* @param {Object}	obj	The execution scope Object for the subscription
+* @return {Boolean}	true, if the function/Object pair is already subscribed to the CustomEvent passed in
+*/
+YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
+	for (var e=0;e<evt.subscribers.length;e++) {
+		var subsc = evt.subscribers[e];
+		if (subsc && subsc.obj == obj && subsc.fn == fn) {
+			return true;
+		}
+	}
+	return false;
+};
+/**
+*  The Container family of components is designed to enable developers to create different kinds of content-containing modules on the web. Module and Overlay are the most basic containers, and they can be used directly or extended to build custom containers. Also part of the Container family are four UI controls that extend Module and Overlay: Tooltip, Panel, Dialog, and SimpleDialog.
+* @module container
+* @title Container
+* @requires yahoo,dom,event,dragdrop,animation
+*/
+
+/**
+* Module is a JavaScript representation of the Standard Module Format. Standard Module Format is a simple standard for markup containers where child nodes representing the header, body, and footer of the content are denoted using the CSS classes "hd", "bd", and "ft" respectively. Module is the base class for all other classes in the YUI Container package.
+* @namespace YAHOO.widget
+* @class Module
+* @constructor
+* @param {String} el			The element ID representing the Module <em>OR</em>
+* @param {HTMLElement} el		The element representing the Module
+* @param {Object} userConfig	The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
+*/
+YAHOO.widget.Module = function(el, userConfig) {
+	if (el) {
+		this.init(el, userConfig);
+	} else {
+	}
+};
+
+/**
+* Constant representing the prefix path to use for non-secure images
+* @property YAHOO.widget.Module.IMG_ROOT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.IMG_ROOT = null;
+
+/**
+* Constant representing the prefix path to use for securely served images
+* @property YAHOO.widget.Module.IMG_ROOT_SSL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.IMG_ROOT_SSL = null;
+
+/**
+* Constant for the default CSS class name that represents a Module
+* @property YAHOO.widget.Module.CSS_MODULE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_MODULE = "yui-module";
+
+/**
+* Constant representing the module header
+* @property YAHOO.widget.Module.CSS_HEADER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_HEADER = "hd";
+
+/**
+* Constant representing the module body
+* @property YAHOO.widget.Module.CSS_BODY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_BODY = "bd";
+
+/**
+* Constant representing the module footer
+* @property YAHOO.widget.Module.CSS_FOOTER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_FOOTER = "ft";
+
+/**
+* Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
+* @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = "javascript:false;";
+
+/**
+* Singleton CustomEvent fired when the font size is changed in the browser.
+* Opera's "zoom" functionality currently does not support text size detection.
+* @event YAHOO.widget.Module.textResizeEvent
+*/
+YAHOO.widget.Module.textResizeEvent = new YAHOO.util.CustomEvent("textResize");
+
+/**
+* Constant representing the name of the Module's events
+* @property YAHOO.widget.Module._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Module._EVENT_TYPES = {
+
+    "BEFORE_INIT": "beforeInit",
+    "INIT": "init",
+    "APPEND": "append",
+    "BEFORE_RENDER": "beforeRender",
+    "RENDER": "render",
+    "CHANGE_HEADER": "changeHeader",
+    "CHANGE_BODY": "changeBody",
+    "CHANGE_FOOTER": "changeFooter",
+    "CHANGE_CONTENT": "changeContent",
+    "DESTORY": "destroy",
+    "BEFORE_SHOW": "beforeShow",
+    "SHOW": "show",
+    "BEFORE_HIDE": "beforeHide",
+    "HIDE": "hide"
+
+};
+    
+/**
+* Constant representing the Module's configuration properties
+* @property YAHOO.widget.Module._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Module._DEFAULT_CONFIG = {
+
+    "VISIBLE": { 
+        key: "visible", 
+        value: true, 
+        validator: YAHOO.lang.isBoolean 
+    },
+
+    "EFFECT": { 
+        key: "effect", 
+        suppressEvent:true, 
+        supercedes:["visible"] 
+    },
+
+    "MONITOR_RESIZE": { 
+        key: "monitorresize", 
+        value:true  
+    }
+
+};
+
+
+YAHOO.widget.Module.prototype = {
+
+	/**
+	* The class's constructor function
+	* @property contructor
+	* @type Function
+	*/
+	constructor : YAHOO.widget.Module,
+
+	/**
+	* The main module element that contains the header, body, and footer
+	* @property element
+	* @type HTMLElement
+	*/
+	element : null,
+
+	/**
+	* The header element, denoted with CSS class "hd"
+	* @property header
+	* @type HTMLElement
+	*/
+	header : null,
+
+	/**
+	* The body element, denoted with CSS class "bd"
+	* @property body
+	* @type HTMLElement
+	*/
+	body : null,
+
+	/**
+	* The footer element, denoted with CSS class "ft"
+	* @property footer
+	* @type HTMLElement
+	*/
+	footer : null,
+
+	/**
+	* The id of the element
+	* @property id
+	* @type String
+	*/
+	id : null,
+
+	/**
+	* The String representing the image root
+	* @property imageRoot
+	* @type String
+	*/
+	imageRoot : YAHOO.widget.Module.IMG_ROOT,
+
+	/**
+	* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
+	* @method initEvents
+	*/
+	initEvents : function() {
+
+        var EVENT_TYPES = YAHOO.widget.Module._EVENT_TYPES;
+
+		/**
+		* CustomEvent fired prior to class initalization.
+		* @event beforeInitEvent
+		* @param {class} classRef	class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
+		*/
+		this.beforeInitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_INIT, this);
+
+		/**
+		* CustomEvent fired after class initalization.
+		* @event initEvent
+		* @param {class} classRef	class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
+		*/		
+		this.initEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.INIT, this);
+
+		/**
+		* CustomEvent fired when the Module is appended to the DOM
+		* @event appendEvent
+		*/
+		this.appendEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.APPEND, this);
+
+		/**
+		* CustomEvent fired before the Module is rendered
+		* @event beforeRenderEvent
+		*/
+		this.beforeRenderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_RENDER, this);
+
+		/**
+		* CustomEvent fired after the Module is rendered
+		* @event renderEvent
+		*/
+		this.renderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.RENDER, this);
+	
+		/**
+		* CustomEvent fired when the header content of the Module is modified
+		* @event changeHeaderEvent
+		* @param {String/HTMLElement} content	String/element representing the new header content
+		*/
+		this.changeHeaderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_HEADER, this);
+		
+		/**
+		* CustomEvent fired when the body content of the Module is modified
+		* @event changeBodyEvent
+		* @param {String/HTMLElement} content	String/element representing the new body content
+		*/		
+		this.changeBodyEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_BODY, this);
+		
+		/**
+		* CustomEvent fired when the footer content of the Module is modified
+		* @event changeFooterEvent
+		* @param {String/HTMLElement} content	String/element representing the new footer content
+		*/
+		this.changeFooterEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_FOOTER, this);
+
+		/**
+		* CustomEvent fired when the content of the Module is modified
+		* @event changeContentEvent
+		*/
+		this.changeContentEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_CONTENT, this);
+
+		/**
+		* CustomEvent fired when the Module is destroyed
+		* @event destroyEvent
+		*/
+		this.destroyEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.DESTORY, this);
+		
+		/**
+		* CustomEvent fired before the Module is shown
+		* @event beforeShowEvent
+		*/
+		this.beforeShowEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SHOW, this);
+
+		/**
+		* CustomEvent fired after the Module is shown
+		* @event showEvent
+		*/
+		this.showEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW, this);
+
+		/**
+		* CustomEvent fired before the Module is hidden
+		* @event beforeHideEvent
+		*/
+		this.beforeHideEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_HIDE, this);
+
+		/**
+		* CustomEvent fired after the Module is hidden
+		* @event hideEvent
+		*/
+		this.hideEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE, this);
+	}, 
+
+	/**
+	* String representing the current user-agent platform
+	* @property platform
+	* @type String
+	*/
+	platform : function() {
+					var ua = navigator.userAgent.toLowerCase();
+					if (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1) {
+						return "windows";
+					} else if (ua.indexOf("macintosh") != -1) {
+						return "mac";
+					} else {
+						return false;
+					}
+				}(),
+
+	/**
+	* String representing the current user-agent browser
+	* @property browser
+	* @type String
+	*/
+	browser : function() {
+			var ua = navigator.userAgent.toLowerCase();
+				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
+					 return 'opera';
+				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
+					 return 'ie7';
+				  } else if (ua.indexOf('msie') !=-1) { // IE
+					 return 'ie';
+				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
+					 return 'safari';
+				  } else if (ua.indexOf('gecko') != -1) { // Gecko
+					 return 'gecko';
+				  } else {
+					 return false;
+				  }
+			}(),
+
+	/**
+	* Boolean representing whether or not the current browsing context is secure (https)
+	* @property isSecure
+	* @type Boolean
+	*/
+	isSecure : function() {
+		if (window.location.href.toLowerCase().indexOf("https") === 0) {
+			return true;
+		} else {
+			return false;
+		}
+	}(),
+
+	/**
+	* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
+	*/
+	initDefaultConfig : function() {
+		// Add properties //
+
+    	var DEFAULT_CONFIG = YAHOO.widget.Module._DEFAULT_CONFIG;
+
+		/**
+		* Specifies whether the Module is visible on the page.
+		* @config visible
+		* @type Boolean
+		* @default true
+		*/
+		this.cfg.addProperty(
+		          DEFAULT_CONFIG.VISIBLE.key, 
+		          {
+		              handler: this.configVisible, 
+		              value: DEFAULT_CONFIG.VISIBLE.value, 
+		              validator: DEFAULT_CONFIG.VISIBLE.validator
+                  }
+              );
+
+		/**
+		* Object or array of objects representing the ContainerEffect classes that are active for animating the container.
+		* @config effect
+		* @type Object
+		* @default null
+		*/
+		this.cfg.addProperty(
+                    DEFAULT_CONFIG.EFFECT.key, 
+                    {
+                        suppressEvent: DEFAULT_CONFIG.EFFECT.suppressEvent, 
+                        supercedes: DEFAULT_CONFIG.EFFECT.supercedes
+                    }
+                );
+
+		/**
+		* Specifies whether to create a special proxy iframe to monitor for user font resizing in the document
+		* @config monitorresize
+		* @type Boolean
+		* @default true
+		*/
+		this.cfg.addProperty(
+		          DEFAULT_CONFIG.MONITOR_RESIZE.key,
+		          {
+		              handler: this.configMonitorResize,
+		              value: DEFAULT_CONFIG.MONITOR_RESIZE.value
+                  }
+              );
+		
+	},
+
+	/**
+	* The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+	* @method init
+	* @param {String}	el	The element ID representing the Module <em>OR</em>
+	* @param {HTMLElement}	el	The element representing the Module
+	* @param {Object}	userConfig	The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
+	*/
+	init : function(el, userConfig) {
+
+		this.initEvents();
+
+		this.beforeInitEvent.fire(YAHOO.widget.Module);
+
+		/**
+		* The Module's Config object used for monitoring configuration properties.
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
+
+		if (this.isSecure) {
+			this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
+		}
+
+		if (typeof el == "string") {
+			var elId = el;
+
+			el = document.getElementById(el);
+			if (! el) {
+				el = document.createElement("div");
+				el.id = elId;
+			}
+		}
+
+		this.element = el;
+
+		if (el.id) {
+			this.id = el.id;
+		}
+
+		var childNodes = this.element.childNodes;
+
+		if (childNodes) {
+			for (var i=0;i<childNodes.length;i++) {
+				var child = childNodes[i];
+				switch (child.className) {
+					case YAHOO.widget.Module.CSS_HEADER:
+						this.header = child;
+						break;
+					case YAHOO.widget.Module.CSS_BODY:
+						this.body = child;
+						break;
+					case YAHOO.widget.Module.CSS_FOOTER:
+						this.footer = child;
+						break;
+				}
+			}
+		}
+
+		this.initDefaultConfig();
+
+		YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Module.CSS_MODULE);
+
+		if (userConfig) {
+			this.cfg.applyConfig(userConfig, true);
+		}
+
+		// Subscribe to the fireQueue() method of Config so that any queued configuration changes are
+		// excecuted upon render of the Module
+		if (! YAHOO.util.Config.alreadySubscribed(this.renderEvent, this.cfg.fireQueue, this.cfg)) {
+			this.renderEvent.subscribe(this.cfg.fireQueue, this.cfg, true);
+		}
+
+		this.initEvent.fire(YAHOO.widget.Module);
+	},
+
+	/**
+	* Initialized an empty IFRAME that is placed out of the visible area that can be used to detect text resize.
+	* @method initResizeMonitor
+	*/
+	initResizeMonitor : function() {
+
+        if(this.browser != "opera") {
+
+            var resizeMonitor = document.getElementById("_yuiResizeMonitor");
+
+            if (! resizeMonitor) {
+
+                resizeMonitor = document.createElement("iframe");
+
+                var bIE = (this.browser.indexOf("ie") === 0);
+
+                if(this.isSecure && YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL && bIE) {
+                   resizeMonitor.src = YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;
+                }
+
+                resizeMonitor.id = "_yuiResizeMonitor";
+                resizeMonitor.style.visibility = "hidden";
+
+                document.body.appendChild(resizeMonitor);
+
+                resizeMonitor.style.width = "10em";
+                resizeMonitor.style.height = "10em";
+                resizeMonitor.style.position = "absolute";
+
+                var nLeft = -1 * resizeMonitor.offsetWidth;
+                var nTop = -1 * resizeMonitor.offsetHeight;
+
+                resizeMonitor.style.top = nTop + "px";
+                resizeMonitor.style.left = nLeft + "px";
+                resizeMonitor.style.borderStyle = "none";
+                resizeMonitor.style.borderWidth = "0";
+                YAHOO.util.Dom.setStyle(resizeMonitor, "opacity", "0");
+
+                resizeMonitor.style.visibility = "visible";
+
+                if(!bIE) {
+
+                    var doc = resizeMonitor.contentWindow.document;
+
+                    doc.open();
+                    doc.close();
+
+                }
+            }
+
+			var fireTextResize = function() {
+				YAHOO.widget.Module.textResizeEvent.fire();
+			};
+
+            if(resizeMonitor && resizeMonitor.contentWindow) {
+                this.resizeMonitor = resizeMonitor;
+
+				YAHOO.widget.Module.textResizeEvent.subscribe(this.onDomResize, this, true);
+
+				if (! YAHOO.widget.Module.textResizeInitialized) {
+					if (! YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow, "resize", fireTextResize)) {
+						// This will fail in IE if document.domain has changed, so we must change the listener to
+						// use the resizeMonitor element instead
+						YAHOO.util.Event.addListener(this.resizeMonitor, "resize", fireTextResize);
+					}
+					YAHOO.widget.Module.textResizeInitialized = true;
+				}
+            }
+
+        }
+
+	},
+
+	/**
+	* Event handler fired when the resize monitor element is resized.
+	* @method onDomResize
+	* @param {DOMEvent} e	The DOM resize event
+	* @param {Object} obj	The scope object passed to the handler
+	*/
+	onDomResize : function(e, obj) {
+
+        var nLeft = -1 * this.resizeMonitor.offsetWidth,
+            nTop = -1 * this.resizeMonitor.offsetHeight;
+
+        this.resizeMonitor.style.top = nTop + "px";
+        this.resizeMonitor.style.left =  nLeft + "px";
+
+	},
+
+	/**
+	* Sets the Module's header content to the HTML specified, or appends the passed element to the header. If no header is present, one will be automatically created.
+	* @method setHeader
+	* @param {String}	headerContent	The HTML used to set the header <em>OR</em>
+	* @param {HTMLElement}	headerContent	The HTMLElement to append to the header
+	*/
+	setHeader : function(headerContent) {
+		if (! this.header) {
+			this.header = document.createElement("div");
+			this.header.className = YAHOO.widget.Module.CSS_HEADER;
+		}
+
+		if (typeof headerContent == "string") {
+			this.header.innerHTML = headerContent;
+		} else {
+			this.header.innerHTML = "";
+			this.header.appendChild(headerContent);
+		}
+
+		this.changeHeaderEvent.fire(headerContent);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Appends the passed element to the header. If no header is present, one will be automatically created.
+	* @method appendToHeader
+	* @param {HTMLElement}	element	The element to append to the header
+	*/
+	appendToHeader : function(element) {
+		if (! this.header) {
+			this.header = document.createElement("div");
+			this.header.className = YAHOO.widget.Module.CSS_HEADER;
+		}
+
+		this.header.appendChild(element);
+		this.changeHeaderEvent.fire(element);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
+	* @method setBody
+	* @param {String}	bodyContent	The HTML used to set the body <em>OR</em>
+	* @param {HTMLElement}	bodyContent	The HTMLElement to append to the body
+	*/
+	setBody : function(bodyContent) {
+		if (! this.body) {
+			this.body = document.createElement("div");
+			this.body.className = YAHOO.widget.Module.CSS_BODY;
+		}
+
+		if (typeof bodyContent == "string")
+		{
+			this.body.innerHTML = bodyContent;
+		} else {
+			this.body.innerHTML = "";
+			this.body.appendChild(bodyContent);
+		}
+
+		this.changeBodyEvent.fire(bodyContent);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Appends the passed element to the body. If no body is present, one will be automatically created.
+	* @method appendToBody
+	* @param {HTMLElement}	element	The element to append to the body
+	*/
+	appendToBody : function(element) {
+		if (! this.body) {
+			this.body = document.createElement("div");
+			this.body.className = YAHOO.widget.Module.CSS_BODY;
+		}
+
+		this.body.appendChild(element);
+		this.changeBodyEvent.fire(element);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
+	* @method setFooter
+	* @param {String}	footerContent	The HTML used to set the footer <em>OR</em>
+	* @param {HTMLElement}	footerContent	The HTMLElement to append to the footer
+	*/
+	setFooter : function(footerContent) {
+		if (! this.footer) {
+			this.footer = document.createElement("div");
+			this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+		}
+
+		if (typeof footerContent == "string") {
+			this.footer.innerHTML = footerContent;
+		} else {
+			this.footer.innerHTML = "";
+			this.footer.appendChild(footerContent);
+		}
+
+		this.changeFooterEvent.fire(footerContent);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Appends the passed element to the footer. If no footer is present, one will be automatically created.
+	* @method appendToFooter
+	* @param {HTMLElement}	element	The element to append to the footer
+	*/
+	appendToFooter : function(element) {
+		if (! this.footer) {
+			this.footer = document.createElement("div");
+			this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+		}
+
+		this.footer.appendChild(element);
+		this.changeFooterEvent.fire(element);
+		this.changeContentEvent.fire();
+	},
+
+	/**
+	* Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. NOTE: For Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
+	* @method render
+	* @param {String}	appendToNode	The element id to which the Module should be appended to prior to rendering <em>OR</em>
+	* @param {HTMLElement}	appendToNode	The element to which the Module should be appended to prior to rendering
+	* @param {HTMLElement}	moduleElement	OPTIONAL. The element that represents the actual Standard Module container.
+	* @return {Boolean} Success or failure of the render
+	*/
+	render : function(appendToNode, moduleElement) {
+		this.beforeRenderEvent.fire();
+
+		if (! moduleElement) {
+			moduleElement = this.element;
+		}
+
+		var me = this;
+		var appendTo = function(element) {
+			if (typeof element == "string") {
+				element = document.getElementById(element);
+			}
+
+			if (element) {
+				element.appendChild(me.element);
+				me.appendEvent.fire();
+			}
+		};
+
+		if (appendToNode) {
+			appendTo(appendToNode);
+		} else { // No node was passed in. If the element is not pre-marked up, this fails
+			if (! YAHOO.util.Dom.inDocument(this.element)) {
+				return false;
+			}
+		}
+
+		// Need to get everything into the DOM if it isn't already
+
+		if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
+			// There is a header, but it's not in the DOM yet... need to add it
+			var firstChild = moduleElement.firstChild;
+			if (firstChild) { // Insert before first child if exists
+				moduleElement.insertBefore(this.header, firstChild);
+			} else { // Append to empty body because there are no children
+				moduleElement.appendChild(this.header);
+			}
+		}
+
+		if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
+			// There is a body, but it's not in the DOM yet... need to add it
+			if (this.footer && YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before footer if exists in DOM
+				moduleElement.insertBefore(this.body, this.footer);
+			} else { // Append to element because there is no footer
+				moduleElement.appendChild(this.body);
+			}
+		}
+
+		if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
+			// There is a footer, but it's not in the DOM yet... need to add it
+			moduleElement.appendChild(this.footer);
+		}
+
+		this.renderEvent.fire();
+		return true;
+	},
+
+	/**
+	* Removes the Module element from the DOM and sets all child elements to null.
+	* @method destroy
+	*/
+	destroy : function() {
+		var parent;
+
+		if (this.element) {
+			YAHOO.util.Event.purgeElement(this.element, true);
+			parent = this.element.parentNode;
+		}
+		if (parent) {
+			parent.removeChild(this.element);
+		}
+
+		this.element = null;
+		this.header = null;
+		this.body = null;
+		this.footer = null;
+
+		for (var e in this) {
+			if (e instanceof YAHOO.util.CustomEvent) {
+				e.unsubscribeAll();
+			}
+		}
+
+		YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this);
+
+		this.destroyEvent.fire();
+	},
+
+	/**
+	* Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
+	* @method show
+	*/
+	show : function() {
+		this.cfg.setProperty("visible", true);
+	},
+
+	/**
+	* Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
+	* @method hide
+	*/
+	hide : function() {
+		this.cfg.setProperty("visible", false);
+	},
+
+	// BUILT-IN EVENT HANDLERS FOR MODULE //
+
+	/**
+	* Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
+	* This method is responsible for firing showEvent and hideEvent.
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	* @method configVisible
+	*/
+	configVisible : function(type, args, obj) {
+		var visible = args[0];
+		if (visible) {
+			this.beforeShowEvent.fire();
+			YAHOO.util.Dom.setStyle(this.element, "display", "block");
+			this.showEvent.fire();
+		} else {
+			this.beforeHideEvent.fire();
+			YAHOO.util.Dom.setStyle(this.element, "display", "none");
+			this.hideEvent.fire();
+		}
+	},
+
+	/**
+	* Default event handler for the "monitorresize" configuration property
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	* @method configMonitorResize
+	*/
+	configMonitorResize : function(type, args, obj) {
+		var monitor = args[0];
+		if (monitor) {
+			this.initResizeMonitor();
+		} else {
+			YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this, true);
+			this.resizeMonitor = null;
+		}
+	}
+};
+
+/**
+* Returns a String representation of the Object.
+* @method toString
+* @return {String}	The string representation of the Module
+*/
+YAHOO.widget.Module.prototype.toString = function() {
+	return "Module " + this.id;
+};
+/**
+* Overlay is a Module that is absolutely positioned above the page flow. It has convenience methods for positioning and sizing, as well as options for controlling zIndex and constraining the Overlay's position to the current visible viewport. Overlay also contains a dynamicly generated IFRAME which is placed beneath it for Internet Explorer 6 and 5.x so that it will be properly rendered above SELECT elements.
+* @namespace YAHOO.widget
+* @class Overlay
+* @extends YAHOO.widget.Module
+* @param {String}	el	The element ID representing the Overlay <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Overlay
+* @param {Object}	userConfig	The configuration object literal containing 10/23/2006the configuration that should be set for this Overlay. See configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Overlay = function(el, userConfig) {
+	YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
+
+/**
+* Constant representing the name of the Overlay's events
+* @property YAHOO.widget.Overlay._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Overlay._EVENT_TYPES = {
+
+    "BEFORE_MOVE": "beforeMove",
+    "MOVE": "move"
+
+};
+
+/**
+* Constant representing the Overlay's configuration properties
+* @property YAHOO.widget.Overlay._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Overlay._DEFAULT_CONFIG = {
+
+    "X": { 
+        key: "x", 
+        validator:YAHOO.lang.isNumber, 
+        suppressEvent:true, supercedes:["iframe"] 
+    },
+
+    "Y": { 
+        key: "y", 
+        validator:YAHOO.lang.isNumber, 
+        suppressEvent:true, supercedes:["iframe"] 
+    },
+
+    "XY": { 
+        key: "xy", 
+        suppressEvent:true, 
+        supercedes:["iframe"] 
+    },
+
+    "CONTEXT": { 
+        key: "context", 
+        suppressEvent:true, 
+        supercedes:["iframe"] 
+    },
+
+    "FIXED_CENTER": { 
+        key: "fixedcenter", 
+        value:false, 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["iframe","visible"] 
+    },
+
+    "WIDTH": { 
+        key: "width", 
+        suppressEvent:true, 
+        supercedes:["iframe"] 
+    }, 
+
+    "HEIGHT": { 
+        key: "height", 
+        suppressEvent:true, 
+        supercedes:["iframe"] 
+    }, 
+
+    "ZINDEX": { 
+        key: "zindex", 
+        value:null 
+    }, 
+
+    "CONSTRAIN_TO_VIEWPORT": { 
+        key: "constraintoviewport", 
+        value:false, 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["iframe","x","y","xy"] 
+    }, 
+
+    "IFRAME": { 
+        key: "iframe", 
+        value:(YAHOO.widget.Module.prototype.browser == "ie" ? true : false), 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["zIndex"] 
+    }
+
+};
+
+/**
+* The URL that will be placed in the iframe
+* @property YAHOO.widget.Overlay.IFRAME_SRC
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.IFRAME_SRC = "javascript:false;";
+
+/**
+* Constant representing the top left corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.TOP_LEFT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.TOP_LEFT = "tl";
+
+/**
+* Constant representing the top right corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.TOP_RIGHT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.TOP_RIGHT = "tr";
+
+/**
+* Constant representing the top bottom left corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.BOTTOM_LEFT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
+
+/**
+* Constant representing the bottom right corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.BOTTOM_RIGHT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
+
+/**
+* Constant representing the default CSS class used for an Overlay
+* @property YAHOO.widget.Overlay.CSS_OVERLAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.CSS_OVERLAY = "yui-overlay";
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String}	el	The element ID representing the Overlay <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Overlay
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
+	YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+	this.beforeInitEvent.fire(YAHOO.widget.Overlay);
+
+	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
+
+	if (userConfig) {
+		this.cfg.applyConfig(userConfig, true);
+	}
+
+	if (this.platform == "mac" && this.browser == "gecko") {
+		if (! YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)) {
+			this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
+		}
+		if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)) {
+			this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
+		}
+	}
+
+	this.initEvent.fire(YAHOO.widget.Overlay);
+
+};
+
+/**
+* Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class.
+* @method initEvents
+*/
+YAHOO.widget.Overlay.prototype.initEvents = function() {
+	YAHOO.widget.Overlay.superclass.initEvents.call(this);
+
+    var EVENT_TYPES = YAHOO.widget.Overlay._EVENT_TYPES;
+
+	/**
+	* CustomEvent fired before the Overlay is moved.
+	* @event beforeMoveEvent
+	* @param {Number} x	x coordinate
+	* @param {Number} y	y coordinate
+	*/
+	this.beforeMoveEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_MOVE, this);
+
+	/**
+	* CustomEvent fired after the Overlay is moved.
+	* @event moveEvent
+	* @param {Number} x	x coordinate
+	* @param {Number} y	y coordinate
+	*/
+	this.moveEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.MOVE, this);
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
+	YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
+
+
+	// Add overlay config properties //
+
+    var DEFAULT_CONFIG = YAHOO.widget.Overlay._DEFAULT_CONFIG;
+
+	/**
+	* The absolute x-coordinate position of the Overlay
+	* @config x
+	* @type Number
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.X.key, 
+	           { 
+	               handler: this.configX, 
+	               validator: DEFAULT_CONFIG.X.validator, 
+	               suppressEvent: DEFAULT_CONFIG.X.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.X.supercedes
+               }
+           );
+
+	/**
+	* The absolute y-coordinate position of the Overlay
+	* @config y
+	* @type Number
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.Y.key,
+	           {
+	               handler: this.configY, 
+	               validator: DEFAULT_CONFIG.Y.validator, 
+	               suppressEvent: DEFAULT_CONFIG.Y.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.Y.supercedes
+               }
+           );
+
+	/**
+	* An array with the absolute x and y positions of the Overlay
+	* @config xy
+	* @type Number[]
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.XY.key,
+	           {
+	               handler: this.configXY, 
+	               suppressEvent: DEFAULT_CONFIG.XY.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.XY.supercedes
+               }
+           );
+
+	/**
+	* The array of context arguments for context-sensitive positioning. The format is: [id or element, element corner, context corner]. For example, setting this property to ["img1", "tl", "bl"] would align the Overlay's top left corner to the context element's bottom left corner.
+	* @config context
+	* @type Array
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.CONTEXT.key,
+	           {
+	               handler: this.configContext, 
+	               suppressEvent: DEFAULT_CONFIG.CONTEXT.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
+               }
+           );
+
+	/**
+	* True if the Overlay should be anchored to the center of the viewport.
+	* @config fixedcenter
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(
+               DEFAULT_CONFIG.FIXED_CENTER.key, 
+               {
+                    handler: this.configFixedCenter,
+                    value: DEFAULT_CONFIG.FIXED_CENTER.value, 
+                    validator: DEFAULT_CONFIG.FIXED_CENTER.validator, 
+                    supercedes: DEFAULT_CONFIG.FIXED_CENTER.supercedes
+                }
+            );
+
+	/**
+	* CSS width of the Overlay.
+	* @config width
+	* @type String
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.WIDTH.key,
+	           {
+	               handler: this.configWidth, 
+	               suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.WIDTH.supercedes
+               }
+           );
+
+	/**
+	* CSS height of the Overlay.
+	* @config height
+	* @type String
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.HEIGHT.key, 
+	           {
+	               handler: this.configHeight, 
+	               suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, 
+	               supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
+               }
+           );
+
+	/**
+	* CSS z-index of the Overlay.
+	* @config zIndex
+	* @type Number
+	* @default null
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.ZINDEX.key, 
+	           {
+	               handler: this.configzIndex,
+	               value: DEFAULT_CONFIG.ZINDEX.value
+               }
+           );
+
+	/**
+	* True if the Overlay should be prevented from being positioned out of the viewport.
+	* @config constraintoviewport
+	* @type Boolean
+	* @default false
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, 
+	           {
+	               handler: this.configConstrainToViewport, 
+	               value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, 
+	               validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, 
+	               supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
+               }
+           );
+
+	/**
+	* True if the Overlay should have an IFRAME shim (for correcting the select z-index bug in IE6 and below).
+	* @config iframe
+	* @type Boolean
+	* @default true for IE6 and below, false for all others
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.IFRAME.key, 
+	           {
+	               handler: this.configIframe, 
+	               value: DEFAULT_CONFIG.IFRAME.value, 
+	               validator: DEFAULT_CONFIG.IFRAME.validator, 
+	               supercedes: DEFAULT_CONFIG.IFRAME.supercedes
+	           }
+           );
+
+};
+
+/**
+* Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]);
+* @method moveTo
+* @param {Number}	x	The Overlay's new x position
+* @param {Number}	y	The Overlay's new y position
+*/
+YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
+	this.cfg.setProperty("xy",[x,y]);
+};
+
+/**
+* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
+* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+* @method hideMacGeckoScrollbars
+*/
+YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
+	YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
+	YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
+};
+
+/**
+* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
+* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+* @method showMacGeckoScrollbars
+*/
+YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
+	YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
+	YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "visible" property is changed. This method is responsible for firing showEvent and hideEvent.
+* @method configVisible
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
+	var visible = args[0];
+	var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
+
+	if (currentVis == "inherit") {
+		var e = this.element.parentNode;
+		while (e.nodeType != 9 && e.nodeType != 11) {
+			currentVis = YAHOO.util.Dom.getStyle(e, "visibility");
+			if (currentVis != "inherit") { break; }
+			e = e.parentNode;
+		}
+		if (currentVis == "inherit") {
+			currentVis = "visible";
+		}
+	}
+
+	var effect = this.cfg.getProperty("effect");
+
+	var effectInstances = [];
+	if (effect) {
+		if (effect instanceof Array) {
+			for (var i=0;i<effect.length;i++) {
+				var eff = effect[i];
+				effectInstances[effectInstances.length] = eff.effect(this, eff.duration);
+			}
+		} else {
+			effectInstances[effectInstances.length] = effect.effect(this, effect.duration);
+		}
+	}
+
+	var isMacGecko = (this.platform == "mac" && this.browser == "gecko");
+
+	if (visible) { // Show
+		if (isMacGecko) {
+			this.showMacGeckoScrollbars();
+		}
+
+		if (effect) { // Animate in
+			if (visible) { // Animate in if not showing
+				if (currentVis != "visible" || currentVis === "") {
+					this.beforeShowEvent.fire();
+					for (var j=0;j<effectInstances.length;j++) {
+						var ei = effectInstances[j];
+						if (j === 0 && ! YAHOO.util.Config.alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)) {
+							ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true); // Delegate showEvent until end of animateInComplete
+						}
+						ei.animateIn();
+					}
+				}
+			}
+		} else { // Show
+			if (currentVis != "visible" || currentVis === "") {
+				this.beforeShowEvent.fire();
+				YAHOO.util.Dom.setStyle(this.element, "visibility", "visible");
+				this.cfg.refireEvent("iframe");
+				this.showEvent.fire();
+			}
+		}
+
+	} else { // Hide
+		if (isMacGecko) {
+			this.hideMacGeckoScrollbars();
+		}
+
+		if (effect) { // Animate out if showing
+			if (currentVis == "visible") {
+				this.beforeHideEvent.fire();
+				for (var k=0;k<effectInstances.length;k++) {
+					var h = effectInstances[k];
+					if (k === 0 && ! YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)) {
+						h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true); // Delegate hideEvent until end of animateOutComplete
+					}
+					h.animateOut();
+				}
+			} else if (currentVis === "") {
+				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");
+			}
+		} else { // Simple hide
+			if (currentVis == "visible" || currentVis === "") {
+				this.beforeHideEvent.fire();
+				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");
+				this.cfg.refireEvent("iframe");
+				this.hideEvent.fire();
+			}
+		}
+	}
+};
+
+/**
+* Center event handler used for centering on scroll/resize, but only if the Overlay is visible
+* @method doCenterOnDOMEvent
+*/
+YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent = function() {
+	if (this.cfg.getProperty("visible")) {
+		this.center();
+	}
+};
+
+/**
+* The default event handler fired when the "fixedcenter" property is changed.
+* @method configFixedCenter
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configFixedCenter = function(type, args, obj) {
+	var val = args[0];
+
+	if (val) {
+		this.center();
+
+		if (! YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent, this.center, this)) {
+			this.beforeShowEvent.subscribe(this.center, this, true);
+		}
+
+		if (! YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent, this.doCenterOnDOMEvent, this)) {
+			YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
+		}
+
+		if (! YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent, this.doCenterOnDOMEvent, this)) {
+			YAHOO.widget.Overlay.windowScrollEvent.subscribe( this.doCenterOnDOMEvent, this, true);
+		}
+	} else {
+		YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+		YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+	}
+};
+
+/**
+* The default event handler fired when the "height" property is changed.
+* @method configHeight
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configHeight = function(type, args, obj) {
+	var height = args[0];
+	var el = this.element;
+	YAHOO.util.Dom.setStyle(el, "height", height);
+	this.cfg.refireEvent("iframe");
+};
+
+/**
+* The default event handler fired when the "width" property is changed.
+* @method configWidth
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configWidth = function(type, args, obj) {
+	var width = args[0];
+	var el = this.element;
+	YAHOO.util.Dom.setStyle(el, "width", width);
+	this.cfg.refireEvent("iframe");
+};
+
+/**
+* The default event handler fired when the "zIndex" property is changed.
+* @method configzIndex
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configzIndex = function(type, args, obj) {
+	var zIndex = args[0];
+
+	var el = this.element;
+
+	if (! zIndex) {
+		zIndex = YAHOO.util.Dom.getStyle(el, "zIndex");
+		if (! zIndex || isNaN(zIndex)) {
+			zIndex = 0;
+		}
+	}
+
+	if (this.iframe) {
+		if (zIndex <= 0) {
+			zIndex = 1;
+		}
+		YAHOO.util.Dom.setStyle(this.iframe, "zIndex", (zIndex-1));
+	}
+
+	YAHOO.util.Dom.setStyle(el, "zIndex", zIndex);
+	this.cfg.setProperty("zIndex", zIndex, true);
+};
+
+/**
+* The default event handler fired when the "xy" property is changed.
+* @method configXY
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configXY = function(type, args, obj) {
+	var pos = args[0];
+	var x = pos[0];
+	var y = pos[1];
+
+	this.cfg.setProperty("x", x);
+	this.cfg.setProperty("y", y);
+
+	this.beforeMoveEvent.fire([x,y]);
+
+	x = this.cfg.getProperty("x");
+	y = this.cfg.getProperty("y");
+
+
+	this.cfg.refireEvent("iframe");
+	this.moveEvent.fire([x,y]);
+};
+
+/**
+* The default event handler fired when the "x" property is changed.
+* @method configX
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configX = function(type, args, obj) {
+	var x = args[0];
+	var y = this.cfg.getProperty("y");
+
+	this.cfg.setProperty("x", x, true);
+	this.cfg.setProperty("y", y, true);
+
+	this.beforeMoveEvent.fire([x,y]);
+
+	x = this.cfg.getProperty("x");
+	y = this.cfg.getProperty("y");
+
+	YAHOO.util.Dom.setX(this.element, x, true);
+
+	this.cfg.setProperty("xy", [x, y], true);
+
+	this.cfg.refireEvent("iframe");
+	this.moveEvent.fire([x, y]);
+};
+
+/**
+* The default event handler fired when the "y" property is changed.
+* @method configY
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configY = function(type, args, obj) {
+	var x = this.cfg.getProperty("x");
+	var y = args[0];
+
+	this.cfg.setProperty("x", x, true);
+	this.cfg.setProperty("y", y, true);
+
+	this.beforeMoveEvent.fire([x,y]);
+
+	x = this.cfg.getProperty("x");
+	y = this.cfg.getProperty("y");
+
+	YAHOO.util.Dom.setY(this.element, y, true);
+
+	this.cfg.setProperty("xy", [x, y], true);
+
+	this.cfg.refireEvent("iframe");
+	this.moveEvent.fire([x, y]);
+};
+
+/**
+* Shows the iframe shim, if it has been enabled
+* @method showIframe
+*/
+YAHOO.widget.Overlay.prototype.showIframe = function() {
+	if (this.iframe) {
+		this.iframe.style.display = "block";
+	}
+};
+
+/**
+* Hides the iframe shim, if it has been enabled
+* @method hideIframe
+*/
+YAHOO.widget.Overlay.prototype.hideIframe = function() {
+	if (this.iframe) {
+		this.iframe.style.display = "none";
+	}
+};
+
+/**
+* The default event handler fired when the "iframe" property is changed.
+* @method configIframe
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configIframe = function(type, args, obj) {
+
+	var val = args[0];
+
+	if (val) { // IFRAME shim is enabled
+
+		if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, this.showIframe, this)) {
+			this.showEvent.subscribe(this.showIframe, this, true);
+		}
+		if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, this.hideIframe, this)) {
+			this.hideEvent.subscribe(this.hideIframe, this, true);
+		}
+
+		var x = this.cfg.getProperty("x");
+		var y = this.cfg.getProperty("y");
+
+		if (! x || ! y) {
+			this.syncPosition();
+			x = this.cfg.getProperty("x");
+			y = this.cfg.getProperty("y");
+		}
+
+
+		if (! isNaN(x) && ! isNaN(y)) {
+			if (! this.iframe) {
+				this.iframe = document.createElement("iframe");
+				if (this.isSecure) {
+					this.iframe.src = YAHOO.widget.Overlay.IFRAME_SRC;
+				}
+
+				var parent = this.element.parentNode;
+				if (parent) {
+					parent.appendChild(this.iframe);
+				} else {
+					document.body.appendChild(this.iframe);
+				}
+
+				YAHOO.util.Dom.setStyle(this.iframe, "position", "absolute");
+				YAHOO.util.Dom.setStyle(this.iframe, "border", "none");
+				YAHOO.util.Dom.setStyle(this.iframe, "margin", "0");
+				YAHOO.util.Dom.setStyle(this.iframe, "padding", "0");
+				YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
+				if (this.cfg.getProperty("visible")) {
+					this.showIframe();
+				} else {
+					this.hideIframe();
+				}
+			}
+
+			var iframeDisplay = YAHOO.util.Dom.getStyle(this.iframe, "display");
+
+			if (iframeDisplay == "none") {
+				this.iframe.style.display = "block";
+			}
+
+			YAHOO.util.Dom.setXY(this.iframe, [x,y]);
+
+			var width = this.element.clientWidth;
+			var height = this.element.clientHeight;
+
+			YAHOO.util.Dom.setStyle(this.iframe, "width", (width+2) + "px");
+			YAHOO.util.Dom.setStyle(this.iframe, "height", (height+2) + "px");
+
+			if (iframeDisplay == "none") {
+				this.iframe.style.display = "none";
+			}
+		}
+	} else {
+		if (this.iframe) {
+			this.iframe.style.display = "none";
+		}
+		this.showEvent.unsubscribe(this.showIframe, this);
+		this.hideEvent.unsubscribe(this.hideIframe, this);
+	}
+};
+
+
+/**
+* The default event handler fired when the "constraintoviewport" property is changed.
+* @method configConstrainToViewport
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configConstrainToViewport = function(type, args, obj) {
+	var val = args[0];
+	if (val) {
+		if (! YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
+			this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
+		}
+	} else {
+		this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
+	}
+};
+
+/**
+* The default event handler fired when the "context" property is changed.
+* @method configContext
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configContext = function(type, args, obj) {
+	var contextArgs = args[0];
+
+	if (contextArgs) {
+		var contextEl = contextArgs[0];
+		var elementMagnetCorner = contextArgs[1];
+		var contextMagnetCorner = contextArgs[2];
+
+		if (contextEl) {
+			if (typeof contextEl == "string") {
+				this.cfg.setProperty("context", [document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner], true);
+			}
+
+			if (elementMagnetCorner && contextMagnetCorner) {
+				this.align(elementMagnetCorner, contextMagnetCorner);
+			}
+		}
+	}
+};
+
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Aligns the Overlay to its context element using the specified corner points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT.
+* @method align
+* @param {String} elementAlign		The String representing the corner of the Overlay that should be aligned to the context element
+* @param {String} contextAlign		The corner of the context element that the elementAlign corner should stick to.
+*/
+YAHOO.widget.Overlay.prototype.align = function(elementAlign, contextAlign) {
+	var contextArgs = this.cfg.getProperty("context");
+	if (contextArgs) {
+		var context = contextArgs[0];
+
+		var element = this.element;
+		var me = this;
+
+		if (! elementAlign) {
+			elementAlign = contextArgs[1];
+		}
+
+		if (! contextAlign) {
+			contextAlign = contextArgs[2];
+		}
+
+		if (element && context) {
+			var contextRegion = YAHOO.util.Dom.getRegion(context);
+
+			var doAlign = function(v,h) {
+				switch (elementAlign) {
+					case YAHOO.widget.Overlay.TOP_LEFT:
+						me.moveTo(h,v);
+						break;
+					case YAHOO.widget.Overlay.TOP_RIGHT:
+						me.moveTo(h-element.offsetWidth,v);
+						break;
+					case YAHOO.widget.Overlay.BOTTOM_LEFT:
+						me.moveTo(h,v-element.offsetHeight);
+						break;
+					case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+						me.moveTo(h-element.offsetWidth,v-element.offsetHeight);
+						break;
+				}
+			};
+
+			switch (contextAlign) {
+				case YAHOO.widget.Overlay.TOP_LEFT:
+					doAlign(contextRegion.top, contextRegion.left);
+					break;
+				case YAHOO.widget.Overlay.TOP_RIGHT:
+					doAlign(contextRegion.top, contextRegion.right);
+					break;
+				case YAHOO.widget.Overlay.BOTTOM_LEFT:
+					doAlign(contextRegion.bottom, contextRegion.left);
+					break;
+				case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+					doAlign(contextRegion.bottom, contextRegion.right);
+					break;
+			}
+		}
+	}
+};
+
+/**
+* The default event handler executed when the moveEvent is fired, if the "constraintoviewport" is set to true.
+* @method enforceConstraints
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.enforceConstraints = function(type, args, obj) {
+	var pos = args[0];
+
+	var x = pos[0];
+	var y = pos[1];
+
+	var offsetHeight = this.element.offsetHeight;
+	var offsetWidth = this.element.offsetWidth;
+
+	var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
+	var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
+
+	var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+	var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+
+	var topConstraint = scrollY + 10;
+	var leftConstraint = scrollX + 10;
+	var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
+	var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
+
+	if (x < leftConstraint) {
+		x = leftConstraint;
+	} else if (x > rightConstraint) {
+		x = rightConstraint;
+	}
+
+	if (y < topConstraint) {
+		y = topConstraint;
+	} else if (y > bottomConstraint) {
+		y = bottomConstraint;
+	}
+
+	this.cfg.setProperty("x", x, true);
+	this.cfg.setProperty("y", y, true);
+	this.cfg.setProperty("xy", [x,y], true);
+};
+
+/**
+* Centers the container in the viewport.
+* @method center
+*/
+YAHOO.widget.Overlay.prototype.center = function() {
+	var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+	var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+
+	var viewPortWidth = YAHOO.util.Dom.getClientWidth();
+	var viewPortHeight = YAHOO.util.Dom.getClientHeight();
+
+	var elementWidth = this.element.offsetWidth;
+	var elementHeight = this.element.offsetHeight;
+
+	var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
+	var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
+
+	this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
+
+	this.cfg.refireEvent("iframe");
+};
+
+/**
+* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used to update position information during drag & drop.
+* @method syncPosition
+*/
+YAHOO.widget.Overlay.prototype.syncPosition = function() {
+	var pos = YAHOO.util.Dom.getXY(this.element);
+	this.cfg.setProperty("x", pos[0], true);
+	this.cfg.setProperty("y", pos[1], true);
+	this.cfg.setProperty("xy", pos, true);
+};
+
+/**
+* Event handler fired when the resize monitor element is resized.
+* @method onDomResize
+* @param {DOMEvent} e	The resize DOM event
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
+	YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
+	var me = this;
+	setTimeout(function() {
+		me.syncPosition();
+		me.cfg.refireEvent("iframe");
+		me.cfg.refireEvent("context");
+	}, 0);
+};
+
+/**
+* Removes the Overlay element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Overlay.prototype.destroy = function() {
+	if (this.iframe) {
+		this.iframe.parentNode.removeChild(this.iframe);
+	}
+
+	this.iframe = null;
+
+	YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+	YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+
+	YAHOO.widget.Overlay.superclass.destroy.call(this);
+};
+
+/**
+* Returns a String representation of the object.
+* @method toString
+* @return {String} The string representation of the Overlay.
+*/
+YAHOO.widget.Overlay.prototype.toString = function() {
+	return "Overlay " + this.id;
+};
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window scroll
+* @event YAHOO.widget.Overlay.windowScrollEvent
+*/
+YAHOO.widget.Overlay.windowScrollEvent = new YAHOO.util.CustomEvent("windowScroll");
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window resize
+* @event YAHOO.widget.Overlay.windowResizeEvent
+*/
+YAHOO.widget.Overlay.windowResizeEvent = new YAHOO.util.CustomEvent("windowResize");
+
+/**
+* The DOM event handler used to fire the CustomEvent for window scroll
+* @method YAHOO.widget.Overlay.windowScrollHandler
+* @static
+* @param {DOMEvent} e The DOM scroll event
+*/
+YAHOO.widget.Overlay.windowScrollHandler = function(e) {
+	if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
+		if (! window.scrollEnd) {
+			window.scrollEnd = -1;
+		}
+		clearTimeout(window.scrollEnd);
+		window.scrollEnd = setTimeout(function() { YAHOO.widget.Overlay.windowScrollEvent.fire(); }, 1);
+	} else {
+		YAHOO.widget.Overlay.windowScrollEvent.fire();
+	}
+};
+
+/**
+* The DOM event handler used to fire the CustomEvent for window resize
+* @method YAHOO.widget.Overlay.windowResizeHandler
+* @static
+* @param {DOMEvent} e The DOM resize event
+*/
+YAHOO.widget.Overlay.windowResizeHandler = function(e) {
+	if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
+		if (! window.resizeEnd) {
+			window.resizeEnd = -1;
+		}
+		clearTimeout(window.resizeEnd);
+		window.resizeEnd = setTimeout(function() { YAHOO.widget.Overlay.windowResizeEvent.fire(); }, 100);
+	} else {
+		YAHOO.widget.Overlay.windowResizeEvent.fire();
+	}
+};
+
+/**
+* A boolean that indicated whether the window resize and scroll events have already been subscribed to.
+* @property YAHOO.widget.Overlay._initialized
+* @private
+* @type Boolean
+*/
+YAHOO.widget.Overlay._initialized = null;
+
+if (YAHOO.widget.Overlay._initialized === null) {
+	YAHOO.util.Event.addListener(window, "scroll", YAHOO.widget.Overlay.windowScrollHandler);
+	YAHOO.util.Event.addListener(window, "resize", YAHOO.widget.Overlay.windowResizeHandler);
+
+	YAHOO.widget.Overlay._initialized = true;
+}
+/**
+* OverlayManager is used for maintaining the focus status of multiple Overlays.* @namespace YAHOO.widget
+* @namespace YAHOO.widget
+* @class OverlayManager
+* @constructor
+* @param {Array}	overlays	Optional. A collection of Overlays to register with the manager.
+* @param {Object}	userConfig		The object literal representing the user configuration of the OverlayManager
+*/
+YAHOO.widget.OverlayManager = function(userConfig) {
+	this.init(userConfig);
+};
+
+/**
+* The CSS class representing a focused Overlay
+* @property YAHOO.widget.OverlayManager.CSS_FOCUSED
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
+
+YAHOO.widget.OverlayManager.prototype = {
+	/**
+	* The class's constructor function
+	* @property contructor
+	* @type Function
+	*/
+	constructor : YAHOO.widget.OverlayManager,
+
+	/**
+	* The array of Overlays that are currently registered
+	* @property overlays
+	* @type YAHOO.widget.Overlay[]
+	*/
+	overlays : null,
+
+	/**
+	* Initializes the default configuration of the OverlayManager
+	* @method initDefaultConfig
+	*/
+	initDefaultConfig : function() {
+		/**
+		* The collection of registered Overlays in use by the OverlayManager
+		* @config overlays
+		* @type YAHOO.widget.Overlay[]
+		* @default null
+		*/
+		this.cfg.addProperty("overlays", { suppressEvent:true } );
+
+		/**
+		* The default DOM event that should be used to focus an Overlay
+		* @config focusevent
+		* @type String
+		* @default "mousedown"
+		*/
+		this.cfg.addProperty("focusevent", { value:"mousedown" } );
+	},
+
+	/**
+	* Initializes the OverlayManager
+	* @method init
+	* @param {YAHOO.widget.Overlay[]}	overlays	Optional. A collection of Overlays to register with the manager.
+	* @param {Object}	userConfig		The object literal representing the user configuration of the OverlayManager
+	*/
+	init : function(userConfig) {
+		/**
+		* The OverlayManager's Config object used for monitoring configuration properties.
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
+
+		this.initDefaultConfig();
+
+		if (userConfig) {
+			this.cfg.applyConfig(userConfig, true);
+		}
+		this.cfg.fireQueue();
+
+		/**
+		* The currently activated Overlay
+		* @property activeOverlay
+		* @private
+		* @type YAHOO.widget.Overlay
+		*/
+		var activeOverlay = null;
+
+		/**
+		* Returns the currently focused Overlay
+		* @method getActive
+		* @return {YAHOO.widget.Overlay}	The currently focused Overlay
+		*/
+		this.getActive = function() {
+			return activeOverlay;
+		};
+
+		/**
+		* Focuses the specified Overlay
+		* @method focus
+		* @param {YAHOO.widget.Overlay} overlay	The Overlay to focus
+		* @param {String} overlay	The id of the Overlay to focus
+		*/
+		this.focus = function(overlay) {
+
+			var o = this.find(overlay);
+
+			if (o) {
+
+                if (activeOverlay != o) {
+
+                    if(activeOverlay) {
+    
+                        activeOverlay.blur();
+    
+                    }
+    
+                    activeOverlay = o;
+    
+                    YAHOO.util.Dom.addClass(activeOverlay.element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
+    
+                    this.overlays.sort(this.compareZIndexDesc);
+    
+                    var topZIndex = YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
+    
+                    if (! isNaN(topZIndex) && this.overlays[0] != overlay) {
+    
+                        activeOverlay.cfg.setProperty("zIndex", (parseInt(topZIndex, 10) + 2));
+    
+                    }
+    
+                    this.overlays.sort(this.compareZIndexDesc);
+    
+                    o.focusEvent.fire();
+                
+                }
+
+			}
+
+		};
+
+		/**
+		* Removes the specified Overlay from the manager
+		* @method remove
+		* @param {YAHOO.widget.Overlay}	overlay	The Overlay to remove
+		* @param {String} overlay	The id of the Overlay to remove
+		*/
+		this.remove = function(overlay) {
+			var o = this.find(overlay);
+			if (o) {
+				var originalZ = YAHOO.util.Dom.getStyle(o.element, "zIndex");
+				o.cfg.setProperty("zIndex", -1000, true);
+				this.overlays.sort(this.compareZIndexDesc);
+				this.overlays = this.overlays.slice(0, this.overlays.length-1);
+				o.cfg.setProperty("zIndex", originalZ, true);
+
+				o.cfg.setProperty("manager", null);
+				o.focusEvent = null;
+				o.blurEvent = null;
+				o.focus = null;
+				o.blur = null;
+			}
+		};
+
+		/**
+		* Removes focus from all registered Overlays in the manager
+		* @method blurAll
+		*/
+		this.blurAll = function() {
+			for (var o=0;o<this.overlays.length;o++) {
+                this.overlays[o].blur();
+			}
+		};
+
+
+        this._onOverlayBlur = function(p_sType, p_aArgs) {
+            activeOverlay = null;
+        };
+
+
+		var overlays = this.cfg.getProperty("overlays");
+
+		if (! this.overlays) {
+			this.overlays = [];
+		}
+
+		if (overlays) {
+			this.register(overlays);
+			this.overlays.sort(this.compareZIndexDesc);
+		}
+	},
+
+	/**
+	* Registers an Overlay or an array of Overlays with the manager. Upon registration, the Overlay receives functions for focus and blur, along with CustomEvents for each.
+	* @method register
+	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to register with the manager.
+	* @param {YAHOO.widget.Overlay[]}	overlay		An array of Overlays to register with the manager.
+	* @return	{Boolean}	True if any Overlays are registered.
+	*/
+	register : function(overlay) {
+		if (overlay instanceof YAHOO.widget.Overlay) {
+			overlay.cfg.addProperty("manager", { value:this } );
+
+			overlay.focusEvent = new YAHOO.util.CustomEvent("focus", overlay);
+			overlay.blurEvent = new YAHOO.util.CustomEvent("blur", overlay);
+
+			var mgr=this;
+
+			overlay.focus = function() {
+				mgr.focus(this);
+			};
+
+			overlay.blur = function() {
+                if(mgr.getActive() == this) {
+                    YAHOO.util.Dom.removeClass(this.element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
+                    this.blurEvent.fire();
+				}
+			};
+
+            overlay.blurEvent.subscribe(mgr._onOverlayBlur);
+
+			var focusOnDomEvent = function(e,obj) {
+				overlay.focus();
+			};
+
+			var focusevent = this.cfg.getProperty("focusevent");
+			YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);
+
+			var zIndex = YAHOO.util.Dom.getStyle(overlay.element, "zIndex");
+			if (! isNaN(zIndex)) {
+				overlay.cfg.setProperty("zIndex", parseInt(zIndex, 10));
+			} else {
+				overlay.cfg.setProperty("zIndex", 0);
+			}
+
+			this.overlays.push(overlay);
+			return true;
+		} else if (overlay instanceof Array) {
+			var regcount = 0;
+			for (var i=0;i<overlay.length;i++) {
+				if (this.register(overlay[i])) {
+					regcount++;
+				}
+			}
+			if (regcount > 0) {
+				return true;
+			}
+		} else {
+			return false;
+		}
+	},
+
+	/**
+	* Attempts to locate an Overlay by instance or ID.
+	* @method find
+	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to locate within the manager
+	* @param {String}	overlay		An Overlay id to locate within the manager
+	* @return	{YAHOO.widget.Overlay}	The requested Overlay, if found, or null if it cannot be located.
+	*/
+	find : function(overlay) {
+		if (overlay instanceof YAHOO.widget.Overlay) {
+			for (var o=0;o<this.overlays.length;o++) {
+				if (this.overlays[o] == overlay) {
+					return this.overlays[o];
+				}
+			}
+		} else if (typeof overlay == "string") {
+			for (var p=0;p<this.overlays.length;p++) {
+				if (this.overlays[p].id == overlay) {
+					return this.overlays[p];
+				}
+			}
+		}
+		return null;
+	},
+
+	/**
+	* Used for sorting the manager's Overlays by z-index.
+	* @method compareZIndexDesc
+	* @private
+	* @return {Number}	0, 1, or -1, depending on where the Overlay should fall in the stacking order.
+	*/
+	compareZIndexDesc : function(o1, o2) {
+		var zIndex1 = o1.cfg.getProperty("zIndex");
+		var zIndex2 = o2.cfg.getProperty("zIndex");
+
+		if (zIndex1 > zIndex2) {
+			return -1;
+		} else if (zIndex1 < zIndex2) {
+			return 1;
+		} else {
+			return 0;
+		}
+	},
+
+	/**
+	* Shows all Overlays in the manager.
+	* @method showAll
+	*/
+	showAll : function() {
+		for (var o=0;o<this.overlays.length;o++) {
+			this.overlays[o].show();
+		}
+	},
+
+	/**
+	* Hides all Overlays in the manager.
+	* @method hideAll
+	*/
+	hideAll : function() {
+		for (var o=0;o<this.overlays.length;o++) {
+			this.overlays[o].hide();
+		}
+	},
+
+	/**
+	* Returns a string representation of the object.
+	* @method toString
+	* @return {String}	The string representation of the OverlayManager
+	*/
+	toString : function() {
+		return "OverlayManager";
+	}
+
+};
+/**
+* Tooltip is an implementation of Overlay that behaves like an OS tooltip, displaying when the user mouses over a particular element, and disappearing on mouse out.
+* @namespace YAHOO.widget
+* @class Tooltip
+* @extends YAHOO.widget.Overlay
+* @constructor
+* @param {String}	el	The element ID representing the Tooltip <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Tooltip
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Tooltip = function(el, userConfig) {
+	YAHOO.widget.Tooltip.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Tooltip, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the Tooltip CSS class
+* @property YAHOO.widget.Tooltip.CSS_TOOLTIP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Tooltip.CSS_TOOLTIP = "yui-tt";
+
+/**
+* Constant representing the Tooltip's configuration properties
+* @property YAHOO.widget.Tooltip._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Tooltip._DEFAULT_CONFIG = {
+
+    "PREVENT_OVERLAP": { 
+        key: "preventoverlap", 
+        value:true, 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["x","y","xy"] 
+    },
+
+    "SHOW_DELAY": { 
+        key: "showdelay", 
+        value:200, 
+        validator:YAHOO.lang.isNumber 
+    }, 
+
+    "AUTO_DISMISS_DELAY": { 
+        key: "autodismissdelay", 
+        value:5000, 
+        validator:YAHOO.lang.isNumber 
+    }, 
+
+    "HIDE_DELAY": { 
+        key: "hidedelay", 
+        value:250, 
+        validator:YAHOO.lang.isNumber 
+    }, 
+
+    "TEXT": { 
+        key: "text", 
+        suppressEvent:true 
+    }, 
+
+    "CONTAINER": { 
+        key: "container"
+    }
+
+};
+
+/**
+* The Tooltip initialization method. This method is automatically called by the constructor. A Tooltip is automatically rendered by the init method, and it also is set to be invisible by default, and constrained to viewport by default as well.
+* @method init
+* @param {String}	el	The element ID representing the Tooltip <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Tooltip
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Tooltip. See configuration documentation for more details.
+*/
+YAHOO.widget.Tooltip.prototype.init = function(el, userConfig) {
+
+	if (document.readyState && document.readyState != "complete") {
+		var deferredInit = function() {
+			this.init(el, userConfig);
+		};
+		YAHOO.util.Event.addListener(window, "load", deferredInit, this, true);
+	} else {
+		YAHOO.widget.Tooltip.superclass.init.call(this, el);
+
+		this.beforeInitEvent.fire(YAHOO.widget.Tooltip);
+
+		YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Tooltip.CSS_TOOLTIP);
+
+		if (userConfig) {
+			this.cfg.applyConfig(userConfig, true);
+		}
+
+		this.cfg.queueProperty("visible",false);
+		this.cfg.queueProperty("constraintoviewport",true);
+
+		this.setBody("");
+		this.render(this.cfg.getProperty("container"));
+
+		this.initEvent.fire(YAHOO.widget.Tooltip);
+	}
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Tooltip.prototype.initDefaultConfig = function() {
+	YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);
+
+    var DEFAULT_CONFIG = YAHOO.widget.Tooltip._DEFAULT_CONFIG;
+
+	/**
+	* Specifies whether the Tooltip should be kept from overlapping its context element.
+	* @config preventoverlap
+	* @type Boolean
+	* @default true
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.PREVENT_OVERLAP.key,
+	           {
+	               value: DEFAULT_CONFIG.PREVENT_OVERLAP.value, 
+	               validator: DEFAULT_CONFIG.PREVENT_OVERLAP.validator, 
+	               supercedes: DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes
+               }
+           );
+
+	/**
+	* The number of milliseconds to wait before showing a Tooltip on mouseover.
+	* @config showdelay
+	* @type Number
+	* @default 200
+	*/
+	this.cfg.addProperty(
+                DEFAULT_CONFIG.SHOW_DELAY.key,
+                {
+                    handler: this.configShowDelay,
+                    value: 200, 
+                    validator: DEFAULT_CONFIG.SHOW_DELAY.validator
+                }
+          );
+
+	/**
+	* The number of milliseconds to wait before automatically dismissing a Tooltip after the mouse has been resting on the context element.
+	* @config autodismissdelay
+	* @type Number
+	* @default 5000
+	*/
+	this.cfg.addProperty(
+                DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,	
+                {
+                    handler: this.configAutoDismissDelay,
+                    value: DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,
+                    validator: DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator
+                }
+            );
+
+	/**
+	* The number of milliseconds to wait before hiding a Tooltip on mouseover.
+	* @config hidedelay
+	* @type Number
+	* @default 250
+	*/
+	this.cfg.addProperty(
+                DEFAULT_CONFIG.HIDE_DELAY.key,
+                {
+                    handler: this.configHideDelay,
+                    value: DEFAULT_CONFIG.HIDE_DELAY.value, 
+                    validator: DEFAULT_CONFIG.HIDE_DELAY.validator
+                }
+            );
+
+	/**
+	* Specifies the Tooltip's text.
+	* @config text
+	* @type String
+	* @default null
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.TEXT.key,
+                {
+                    handler: this.configText,
+                    suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent
+                }
+            );
+
+	/**
+	* Specifies the container element that the Tooltip's markup should be rendered into.
+	* @config container
+	* @type HTMLElement/String
+	* @default document.body
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.CONTAINER.key,
+                {
+                    handler: this.configContainer,
+                    value: document.body
+                }
+            );
+
+	/**
+	* Specifies the element or elements that the Tooltip should be anchored to on mouseover.
+	* @config context
+	* @type HTMLElement[]/String[]
+	* @default null
+	*/	
+
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "text" property is changed.
+* @method configText
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configText = function(type, args, obj) {
+	var text = args[0];
+	if (text) {
+		this.setBody(text);
+	}
+};
+
+/**
+* The default event handler fired when the "container" property is changed.
+* @method configContainer
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configContainer = function(type, args, obj) {
+	var container = args[0];
+	if (typeof container == 'string') {
+		this.cfg.setProperty("container", document.getElementById(container), true);
+	}
+};
+
+/**
+* @method _removeEventListeners
+* @description Removes all of the DOM event handlers from the HTML element(s) 
+* that trigger the display of the tooltip.
+* @protected
+*/
+YAHOO.widget.Tooltip.prototype._removeEventListeners = function() {
+
+    var aElements = this._context;
+    
+    if (aElements) {
+
+        var nElements = aElements.length;
+        
+        if (nElements > 0) {
+        
+            var i = nElements - 1,
+                oElement;
+            
+            do {
+
+                oElement = aElements[i];
+
+                YAHOO.util.Event.removeListener(oElement, "mouseover", this.onContextMouseOver);
+                YAHOO.util.Event.removeListener(oElement, "mousemove", this.onContextMouseMove);
+                YAHOO.util.Event.removeListener(oElement, "mouseout", this.onContextMouseOut);
+            
+            }
+            while(i--);
+        
+        }
+
+    }
+
+};
+
+/**
+* The default event handler fired when the "context" property is changed.
+* @method configContext
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configContext = function(type, args, obj) {
+	var context = args[0];
+	if (context) {
+
+		// Normalize parameter into an array
+		if (! (context instanceof Array)) {
+			if (typeof context == "string") {
+				this.cfg.setProperty("context", [document.getElementById(context)], true);
+			} else { // Assuming this is an element
+				this.cfg.setProperty("context", [context], true);
+			}
+			context = this.cfg.getProperty("context");
+		}
+
+
+		// Remove any existing mouseover/mouseout listeners
+        this._removeEventListeners();
+
+		// Add mouseover/mouseout listeners to context elements
+		this._context = context;
+
+        var aElements = this._context;
+        
+        if (aElements) {
+    
+            var nElements = aElements.length;
+            
+            if (nElements > 0) {
+            
+                var i = nElements - 1,
+                    oElement;
+                
+                do {
+    
+                    oElement = aElements[i];
+    
+                    YAHOO.util.Event.addListener(oElement, "mouseover", this.onContextMouseOver, this);
+                    YAHOO.util.Event.addListener(oElement, "mousemove", this.onContextMouseMove, this);
+                    YAHOO.util.Event.addListener(oElement, "mouseout", this.onContextMouseOut, this);
+                
+                }
+                while(i--);
+            
+            }
+    
+        }
+
+	}
+};
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+// BEGIN BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* The default event handler fired when the user moves the mouse while over the context element.
+* @method onContextMouseMove
+* @param {DOMEvent} e	The current DOM event
+* @param {Object}	obj	The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseMove = function(e, obj) {
+	obj.pageX = YAHOO.util.Event.getPageX(e);
+	obj.pageY = YAHOO.util.Event.getPageY(e);
+
+};
+
+/**
+* The default event handler fired when the user mouses over the context element.
+* @method onContextMouseOver
+* @param {DOMEvent} e	The current DOM event
+* @param {Object}	obj	The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOver = function(e, obj) {
+
+	if (obj.hideProcId) {
+		clearTimeout(obj.hideProcId);
+		obj.hideProcId = null;
+	}
+
+	var context = this;
+	YAHOO.util.Event.addListener(context, "mousemove", obj.onContextMouseMove, obj);
+
+	if (context.title) {
+		obj._tempTitle = context.title;
+		context.title = "";
+	}
+
+	/**
+	* The unique process ID associated with the thread responsible for showing the Tooltip.
+	* @type int
+	*/
+	obj.showProcId = obj.doShow(e, context);
+};
+
+/**
+* The default event handler fired when the user mouses out of the context element.
+* @method onContextMouseOut
+* @param {DOMEvent} e	The current DOM event
+* @param {Object}	obj	The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOut = function(e, obj) {
+	var el = this;
+
+	if (obj._tempTitle) {
+		el.title = obj._tempTitle;
+		obj._tempTitle = null;
+	}
+
+	if (obj.showProcId) {
+		clearTimeout(obj.showProcId);
+		obj.showProcId = null;
+	}
+
+	if (obj.hideProcId) {
+		clearTimeout(obj.hideProcId);
+		obj.hideProcId = null;
+	}
+
+
+	obj.hideProcId = setTimeout(function() {
+				obj.hide();
+				}, obj.cfg.getProperty("hidedelay"));
+};
+
+// END BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* Processes the showing of the Tooltip by setting the timeout delay and offset of the Tooltip.
+* @method doShow
+* @param {DOMEvent} e	The current DOM event
+* @return {Number}	The process ID of the timeout function associated with doShow
+*/
+YAHOO.widget.Tooltip.prototype.doShow = function(e, context) {
+
+	var yOffset = 25;
+	if (this.browser == "opera" && context.tagName && context.tagName.toUpperCase() == "A") {
+		yOffset += 12;
+	}
+
+	var me = this;
+	return setTimeout(
+		function() {
+			if (me._tempTitle) {
+				me.setBody(me._tempTitle);
+			} else {
+				me.cfg.refireEvent("text");
+			}
+
+			me.moveTo(me.pageX, me.pageY + yOffset);
+			if (me.cfg.getProperty("preventoverlap")) {
+				me.preventOverlap(me.pageX, me.pageY);
+			}
+
+			YAHOO.util.Event.removeListener(context, "mousemove", me.onContextMouseMove);
+
+			me.show();
+			me.hideProcId = me.doHide();
+		},
+	this.cfg.getProperty("showdelay"));
+};
+
+/**
+* Sets the timeout for the auto-dismiss delay, which by default is 5 seconds, meaning that a tooltip will automatically dismiss itself after 5 seconds of being displayed.
+* @method doHide
+*/
+YAHOO.widget.Tooltip.prototype.doHide = function() {
+	var me = this;
+	return setTimeout(
+		function() {
+			me.hide();
+		},
+		this.cfg.getProperty("autodismissdelay"));
+};
+
+/**
+* Fired when the Tooltip is moved, this event handler is used to prevent the Tooltip from overlapping with its context element.
+* @method preventOverlay
+* @param {Number} pageX	The x coordinate position of the mouse pointer
+* @param {Number} pageY	The y coordinate position of the mouse pointer
+*/
+YAHOO.widget.Tooltip.prototype.preventOverlap = function(pageX, pageY) {
+
+	var height = this.element.offsetHeight;
+
+	var elementRegion = YAHOO.util.Dom.getRegion(this.element);
+
+	elementRegion.top -= 5;
+	elementRegion.left -= 5;
+	elementRegion.right += 5;
+	elementRegion.bottom += 5;
+
+	var mousePoint = new YAHOO.util.Point(pageX, pageY);
+
+
+	if (elementRegion.contains(mousePoint)) {
+		this.cfg.setProperty("y", (pageY-height-5));
+	}
+};
+
+/**
+* Removes the Tooltip element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Tooltip.prototype.destroy = function() {
+
+    // Remove any existing mouseover/mouseout listeners
+    this._removeEventListeners();
+
+    YAHOO.widget.Tooltip.superclass.destroy.call(this);  
+
+};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	The string representation of the Tooltip
+*/
+YAHOO.widget.Tooltip.prototype.toString = function() {
+	return "Tooltip " + this.id;
+};
+/**
+* Panel is an implementation of Overlay that behaves like an OS window, with a draggable header and an optional close icon at the top right.
+* @namespace YAHOO.widget
+* @class Panel
+* @extends YAHOO.widget.Overlay
+* @constructor
+* @param {String}	el	The element ID representing the Panel <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Panel
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Panel. See configuration documentation for more details.
+*/
+YAHOO.widget.Panel = function(el, userConfig) {
+	YAHOO.widget.Panel.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Panel, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the default CSS class used for a Panel
+* @property YAHOO.widget.Panel.CSS_PANEL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Panel.CSS_PANEL = "yui-panel";
+
+/**
+* Constant representing the default CSS class used for a Panel's wrapping container
+* @property YAHOO.widget.Panel.CSS_PANEL_CONTAINER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Panel.CSS_PANEL_CONTAINER = "yui-panel-container";
+
+/**
+* Constant representing the name of the Panel's events
+* @property YAHOO.widget.Panel._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Panel._EVENT_TYPES = {
+
+	"SHOW_MASK": "showMask",
+	"HIDE_MASK": "hideMask",
+	"DRAG": "drag"
+
+};
+
+/**
+* Constant representing the Panel's configuration properties
+* @property YAHOO.widget.Panel._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Panel._DEFAULT_CONFIG = {
+
+    "CLOSE": { 
+        key: "close", 
+        value:true, 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["visible"] 
+    },
+
+    "DRAGGABLE": { 
+        key: "draggable", 
+        value:(YAHOO.util.DD ? true : false), 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["visible"]  
+    },
+
+    "UNDERLAY": { 
+        key: "underlay", 
+        value:"shadow", 
+        supercedes:["visible"] 
+    },
+
+    "MODAL": { 
+        key: "modal", 
+        value:false, 
+        validator:YAHOO.lang.isBoolean, 
+        supercedes:["visible"] 
+    },
+
+    "KEY_LISTENERS": { 
+        key: "keylisteners", 
+        suppressEvent:true, 
+        supercedes:["visible"] 
+    }
+
+};
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String}	el	The element ID representing the Overlay <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Overlay
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Panel.prototype.init = function(el, userConfig) {
+	YAHOO.widget.Panel.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+	this.beforeInitEvent.fire(YAHOO.widget.Panel);
+
+	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Panel.CSS_PANEL);
+
+	this.buildWrapper();
+
+	if (userConfig) {
+		this.cfg.applyConfig(userConfig, true);
+	}
+
+	this.beforeRenderEvent.subscribe(function() {
+		var draggable = this.cfg.getProperty("draggable");
+		if (draggable) {
+			if (! this.header) {
+				this.setHeader("&#160;");
+			}
+		}
+	}, this, true);
+
+
+    this.renderEvent.subscribe(function() {
+
+        /*
+            If no value for the "width" configuration property was specified, 
+            set it to the offsetWidth. If the "width" is not set, then in IE 
+            you can only drag the panel when you put the cursor on the
+            header's text.
+        */
+
+        var sWidth = this.cfg.getProperty("width");
+        
+        if(!sWidth) {
+
+            this.cfg.setProperty("width", (this.element.offsetWidth + "px"));
+        
+        }
+    
+    });
+
+
+	var me = this;
+
+	var doBlur = function() {
+		this.blur();
+	};
+
+	this.showMaskEvent.subscribe(function() {
+
+		var checkFocusable = function(el) {
+
+            var sTagName = el.tagName.toUpperCase(),
+                bFocusable = false;
+            
+            switch(sTagName) {
+            
+                case "A":
+                case "BUTTON":
+                case "SELECT":
+                case "TEXTAREA":
+
+                    if (! YAHOO.util.Dom.isAncestor(me.element, el)) {
+                        YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
+                        bFocusable = true;
+                    }
+
+                break;
+
+                case "INPUT":
+
+                    if (el.type != "hidden" && ! YAHOO.util.Dom.isAncestor(me.element, el)) {
+
+                        YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
+                        bFocusable = true;
+
+                    }
+
+                break;
+            
+            }
+
+            return bFocusable;
+
+		};
+
+		this.focusableElements = YAHOO.util.Dom.getElementsBy(checkFocusable);
+	}, this, true);
+
+	this.hideMaskEvent.subscribe(function() {
+		for (var i=0;i<this.focusableElements.length;i++) {
+			var el2 = this.focusableElements[i];
+			YAHOO.util.Event.removeListener(el2, "focus", doBlur);
+		}
+	}, this, true);
+
+	this.beforeShowEvent.subscribe(function() {
+		this.cfg.refireEvent("underlay");
+	}, this, true);
+	this.initEvent.fire(YAHOO.widget.Panel);
+};
+
+/**
+* Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
+*/
+YAHOO.widget.Panel.prototype.initEvents = function() {
+	YAHOO.widget.Panel.superclass.initEvents.call(this);
+
+    var EVENT_TYPES = YAHOO.widget.Panel._EVENT_TYPES;
+
+	/**
+	* CustomEvent fired after the modality mask is shown
+	* @event showMaskEvent
+	*/
+	this.showMaskEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW_MASK, this);
+
+	/**
+	* CustomEvent fired after the modality mask is hidden
+	* @event hideMaskEvent
+	*/
+	this.hideMaskEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE_MASK, this);
+
+	/**
+	* CustomEvent when the Panel is dragged
+	* @event dragEvent
+	*/
+	this.dragEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.DRAG, this);
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Panel's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Panel.prototype.initDefaultConfig = function() {
+	YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);
+
+    // Add panel config properties //
+
+    var DEFAULT_CONFIG = YAHOO.widget.Panel._DEFAULT_CONFIG;
+
+	/**
+	* True if the Panel should display a "close" button
+	* @config close
+	* @type Boolean
+	* @default true
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.CLOSE.key,
+                { 
+                    handler: this.configClose, 
+                    value: DEFAULT_CONFIG.CLOSE.value, 
+                    validator: DEFAULT_CONFIG.CLOSE.validator, 
+                    supercedes: DEFAULT_CONFIG.CLOSE.supercedes
+                } 
+            );
+
+	/**
+	* True if the Panel should be draggable.  Default value is "true" if the Drag and Drop utility is included, otherwise it is "false."
+	* @config draggable
+	* @type Boolean
+	* @default true
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.DRAGGABLE.key, 
+                { 
+                    handler: this.configDraggable, 
+                    value: DEFAULT_CONFIG.DRAGGABLE.value, 
+                    validator: DEFAULT_CONFIG.DRAGGABLE.validator, 
+                    supercedes: DEFAULT_CONFIG.DRAGGABLE.supercedes 
+                } 
+            );
+
+	/**
+	* Sets the type of underlay to display for the Panel. Valid values are "shadow", "matte", and "none".
+	* @config underlay
+	* @type String
+	* @default shadow
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.UNDERLAY.key, 
+                { 
+                    handler: this.configUnderlay, 
+                    value: DEFAULT_CONFIG.UNDERLAY.value, 
+                    supercedes: DEFAULT_CONFIG.UNDERLAY.supercedes
+                } 
+            );
+
+	/**
+	* True if the Panel should be displayed in a modal fashion, automatically creating a transparent mask over the document that will not be removed until the Panel is dismissed.
+	* @config modal
+	* @type Boolean
+	* @default false
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.MODAL.key,
+                { 
+                    handler: this.configModal, 
+                    value: DEFAULT_CONFIG.MODAL.value,
+                    validator: DEFAULT_CONFIG.MODAL.validator, 
+                    supercedes: DEFAULT_CONFIG.MODAL.supercedes 
+                } 
+            );
+
+	/**
+	* A KeyListener (or array of KeyListeners) that will be enabled when the Panel is shown, and disabled when the Panel is hidden.
+	* @config keylisteners
+	* @type YAHOO.util.KeyListener[]
+	* @default null
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.KEY_LISTENERS.key, 
+                { 
+                    handler: this.configKeyListeners, 
+                    suppressEvent: DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent, 
+                    supercedes: DEFAULT_CONFIG.KEY_LISTENERS.supercedes
+                } 
+            );
+
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "close" property is changed. The method controls the appending or hiding of the close icon at the top right of the Panel.
+* @method configClose
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configClose = function(type, args, obj) {
+	var val = args[0];
+
+	var doHide = function(e, obj) {
+		obj.hide();
+	};
+
+	if (val) {
+		if (! this.close) {
+			this.close = document.createElement("span");
+			YAHOO.util.Dom.addClass(this.close, "container-close");
+			this.close.innerHTML = "&#160;";
+			this.innerElement.appendChild(this.close);
+			YAHOO.util.Event.addListener(this.close, "click", doHide, this);
+		} else {
+			this.close.style.display = "block";
+		}
+	} else {
+		if (this.close) {
+			this.close.style.display = "none";
+		}
+	}
+};
+
+/**
+* The default event handler fired when the "draggable" property is changed.
+* @method configDraggable
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configDraggable = function(type, args, obj) {
+
+	var val = args[0];
+	if (val) {
+
+        if (!YAHOO.util.DD) {
+    
+
+            this.cfg.setProperty("draggable", false);
+    
+            return;
+        
+        }
+
+		if (this.header) {
+			YAHOO.util.Dom.setStyle(this.header,"cursor","move");
+			this.registerDragDrop();
+		}
+	} else {
+		if (this.dd) {
+			this.dd.unreg();
+		}
+		if (this.header) {
+			YAHOO.util.Dom.setStyle(this.header,"cursor","auto");
+		}
+	}
+};
+
+/**
+* The default event handler fired when the "underlay" property is changed.
+* @method configUnderlay
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configUnderlay = function(type, args, obj) {
+	var val = args[0];
+
+	switch (val.toLowerCase()) {
+		case "shadow":
+			YAHOO.util.Dom.removeClass(this.element, "matte");
+			YAHOO.util.Dom.addClass(this.element, "shadow");
+
+			if (! this.underlay) { // create if not already in DOM
+				this.underlay = document.createElement("div");
+				this.underlay.className = "underlay";
+				this.underlay.innerHTML = "&#160;";
+				this.element.appendChild(this.underlay);
+			}
+
+			this.sizeUnderlay();
+			break;
+		case "matte":
+			YAHOO.util.Dom.removeClass(this.element, "shadow");
+			YAHOO.util.Dom.addClass(this.element, "matte");
+			break;
+		default:
+			YAHOO.util.Dom.removeClass(this.element, "shadow");
+			YAHOO.util.Dom.removeClass(this.element, "matte");
+			break;
+	}
+};
+
+/**
+* The default event handler fired when the "modal" property is changed. This handler subscribes or unsubscribes to the show and hide events to handle the display or hide of the modality mask.
+* @method configModal
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configModal = function(type, args, obj) {
+	var modal = args[0];
+
+	if (modal) {
+		this.buildMask();
+
+		if (! YAHOO.util.Config.alreadySubscribed( this.beforeShowEvent, this.showMask, this ) ) {
+			this.beforeShowEvent.subscribe(this.showMask, this, true);
+		}
+		if (! YAHOO.util.Config.alreadySubscribed( this.hideEvent, this.hideMask, this) ) {
+			this.hideEvent.subscribe(this.hideMask, this, true);
+		}
+		if (! YAHOO.util.Config.alreadySubscribed( YAHOO.widget.Overlay.windowResizeEvent, this.sizeMask, this ) ) {
+			YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask, this, true);
+		}
+		if (! YAHOO.util.Config.alreadySubscribed( this.destroyEvent, this.removeMask, this) ) {
+			this.destroyEvent.subscribe(this.removeMask, this, true);
+		}
+
+		this.cfg.refireEvent("zIndex");
+	} else {
+		this.beforeShowEvent.unsubscribe(this.showMask, this);
+		this.hideEvent.unsubscribe(this.hideMask, this);
+		YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
+		this.destroyEvent.unsubscribe(this.removeMask, this);
+	}
+};
+
+/**
+* Removes the modality mask.
+* @method removeMask
+*/
+YAHOO.widget.Panel.prototype.removeMask = function() {
+
+    var oMask = this.mask;
+
+    if(oMask) {
+    
+        /*
+            Hide the mask before destroying it to ensure that DOM
+            event handlers on focusable elements get removed.
+        */
+
+        this.hideMask();
+    
+        var oParentNode = oMask.parentNode;
+
+        if(oParentNode) {
+
+            oParentNode.removeChild(oMask);
+
+        }
+
+        this.mask = null;
+    }
+    
+};
+
+/**
+* The default event handler fired when the "keylisteners" property is changed.
+* @method configKeyListeners
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configKeyListeners = function(type, args, obj) {
+	var listeners = args[0];
+
+	if (listeners) {
+		if (listeners instanceof Array) {
+			for (var i=0;i<listeners.length;i++) {
+				var listener = listeners[i];
+
+				if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, listener.enable, listener)) {
+					this.showEvent.subscribe(listener.enable, listener, true);
+				}
+				if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, listener.disable, listener)) {
+					this.hideEvent.subscribe(listener.disable, listener, true);
+					this.destroyEvent.subscribe(listener.disable, listener, true);
+				}
+			}
+		} else {
+			if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, listeners.enable, listeners)) {
+				this.showEvent.subscribe(listeners.enable, listeners, true);
+			}
+			if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, listeners.disable, listeners)) {
+				this.hideEvent.subscribe(listeners.disable, listeners, true);
+				this.destroyEvent.subscribe(listeners.disable, listeners, true);
+			}
+		}
+	}
+};
+
+/**
+* The default event handler fired when the "height" property is changed.
+* @method configHeight
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configHeight = function(type, args, obj) {
+	var height = args[0];
+	var el = this.innerElement;
+	YAHOO.util.Dom.setStyle(el, "height", height);
+	this.cfg.refireEvent("underlay");
+	this.cfg.refireEvent("iframe");
+};
+
+/**
+* The default event handler fired when the "width" property is changed.
+* @method configWidth
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configWidth = function(type, args, obj) {
+	var width = args[0];
+	var el = this.innerElement;
+	YAHOO.util.Dom.setStyle(el, "width", width);
+	this.cfg.refireEvent("underlay");
+	this.cfg.refireEvent("iframe");
+};
+
+/**
+* The default event handler fired when the "zIndex" property is changed.
+* @method configzIndex
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Panel.prototype.configzIndex = function(type, args, obj) {
+	YAHOO.widget.Panel.superclass.configzIndex.call(this, type, args, obj);
+
+	var maskZ = 0;
+	var currentZ = YAHOO.util.Dom.getStyle(this.element, "zIndex");
+
+	if (this.mask) {
+		if (! currentZ || isNaN(currentZ)) {
+			currentZ = 0;
+		}
+
+		if (currentZ === 0) {
+			this.cfg.setProperty("zIndex", 1);
+		} else {
+			maskZ = currentZ - 1;
+			YAHOO.util.Dom.setStyle(this.mask, "zIndex", maskZ);
+		}
+
+	}
+};
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+
+/**
+* Builds the wrapping container around the Panel that is used for positioning the shadow and matte underlays. The container element is assigned to a  local instance variable called container, and the element is reinserted inside of it.
+* @method buildWrapper
+*/
+YAHOO.widget.Panel.prototype.buildWrapper = function() {
+	var elementParent = this.element.parentNode;
+	var originalElement = this.element;
+
+	var wrapper = document.createElement("div");
+	wrapper.className = YAHOO.widget.Panel.CSS_PANEL_CONTAINER;
+	wrapper.id = originalElement.id + "_c";
+
+	if (elementParent) {
+		elementParent.insertBefore(wrapper, originalElement);
+	}
+
+	wrapper.appendChild(originalElement);
+
+	this.element = wrapper;
+	this.innerElement = originalElement;
+
+	YAHOO.util.Dom.setStyle(this.innerElement, "visibility", "inherit");
+};
+
+/**
+* Adjusts the size of the shadow based on the size of the element.
+* @method sizeUnderlay
+*/
+YAHOO.widget.Panel.prototype.sizeUnderlay = function() {
+	if (this.underlay && this.browser != "gecko" && this.browser != "safari") {
+		this.underlay.style.width = this.innerElement.offsetWidth + "px";
+		this.underlay.style.height = this.innerElement.offsetHeight + "px";
+	}
+};
+
+/**
+* Event handler fired when the resize monitor element is resized.
+* @method onDomResize
+* @param {DOMEvent} e	The resize DOM event
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.Panel.prototype.onDomResize = function(e, obj) {
+	YAHOO.widget.Panel.superclass.onDomResize.call(this, e, obj);
+	var me = this;
+	setTimeout(function() {
+		me.sizeUnderlay();
+	}, 0);
+};
+
+/**
+* Registers the Panel's header for drag & drop capability.
+* @method registerDragDrop
+*/
+YAHOO.widget.Panel.prototype.registerDragDrop = function() {
+	if (this.header) {
+
+        if(!YAHOO.util.DD) {
+
+
+            return;
+        
+        }
+
+		this.dd = new YAHOO.util.DD(this.element.id, this.id);
+
+		if (! this.header.id) {
+			this.header.id = this.id + "_h";
+		}
+
+		var me = this;
+
+		this.dd.startDrag = function() {
+
+			if (me.browser == "ie") {
+				YAHOO.util.Dom.addClass(me.element,"drag");
+			}
+
+			if (me.cfg.getProperty("constraintoviewport")) {
+				var offsetHeight = me.element.offsetHeight;
+				var offsetWidth = me.element.offsetWidth;
+
+				var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
+				var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
+
+				var scrollX = window.scrollX || document.documentElement.scrollLeft;
+				var scrollY = window.scrollY || document.documentElement.scrollTop;
+
+				var topConstraint = scrollY + 10;
+				var leftConstraint = scrollX + 10;
+				var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
+				var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
+
+				this.minX = leftConstraint;
+				this.maxX = rightConstraint;
+				this.constrainX = true;
+
+				this.minY = topConstraint;
+				this.maxY = bottomConstraint;
+				this.constrainY = true;
+			} else {
+				this.constrainX = false;
+				this.constrainY = false;
+			}
+
+			me.dragEvent.fire("startDrag", arguments);
+		};
+
+		this.dd.onDrag = function() {
+			me.syncPosition();
+			me.cfg.refireEvent("iframe");
+			if (this.platform == "mac" && this.browser == "gecko") {
+				this.showMacGeckoScrollbars();
+			}
+
+			me.dragEvent.fire("onDrag", arguments);
+		};
+
+		this.dd.endDrag = function() {
+			if (me.browser == "ie") {
+				YAHOO.util.Dom.removeClass(me.element,"drag");
+			}
+
+			me.dragEvent.fire("endDrag", arguments);
+		};
+
+		this.dd.setHandleElId(this.header.id);
+		this.dd.addInvalidHandleType("INPUT");
+		this.dd.addInvalidHandleType("SELECT");
+		this.dd.addInvalidHandleType("TEXTAREA");
+	}
+};
+
+/**
+* Builds the mask that is laid over the document when the Panel is configured to be modal.
+* @method buildMask
+*/
+YAHOO.widget.Panel.prototype.buildMask = function() {
+	if (! this.mask) {
+		this.mask = document.createElement("div");
+		this.mask.id = this.id + "_mask";
+		this.mask.className = "mask";
+		this.mask.innerHTML = "&#160;";
+
+		var maskClick = function(e, obj) {
+			YAHOO.util.Event.stopEvent(e);
+		};
+
+		var firstChild = document.body.firstChild;
+		if (firstChild)	{
+			document.body.insertBefore(this.mask, document.body.firstChild);
+		} else {
+			document.body.appendChild(this.mask);
+		}
+	}
+};
+
+/**
+* Hides the modality mask.
+* @method hideMask
+*/
+YAHOO.widget.Panel.prototype.hideMask = function() {
+	if (this.cfg.getProperty("modal") && this.mask) {
+		this.mask.style.display = "none";
+		this.hideMaskEvent.fire();
+		YAHOO.util.Dom.removeClass(document.body, "masked");
+	}
+};
+
+/**
+* Shows the modality mask.
+* @method showMask
+*/
+YAHOO.widget.Panel.prototype.showMask = function() {
+	if (this.cfg.getProperty("modal") && this.mask) {
+		YAHOO.util.Dom.addClass(document.body, "masked");
+		this.sizeMask();
+		this.mask.style.display = "block";
+		this.showMaskEvent.fire();
+	}
+};
+
+/**
+* Sets the size of the modality mask to cover the entire scrollable area of the document
+* @method sizeMask
+*/
+YAHOO.widget.Panel.prototype.sizeMask = function() {
+	if (this.mask) {
+		this.mask.style.height = YAHOO.util.Dom.getDocumentHeight()+"px";
+		this.mask.style.width = YAHOO.util.Dom.getDocumentWidth()+"px";
+	}
+};
+
+/**
+* Renders the Panel by inserting the elements that are not already in the main Panel into their correct places. Optionally appends the Panel to the specified node prior to the render's execution. NOTE: For Panels without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
+* @method render
+* @param {String}	appendToNode	The element id to which the Module should be appended to prior to rendering <em>OR</em>
+* @param {HTMLElement}	appendToNode	The element to which the Module should be appended to prior to rendering
+* @return {boolean} Success or failure of the render
+*/
+YAHOO.widget.Panel.prototype.render = function(appendToNode) {
+	return YAHOO.widget.Panel.superclass.render.call(this, appendToNode, this.innerElement);
+};
+
+/**
+* Removes the Panel element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Panel.prototype.destroy = function() {
+
+    YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
+
+    if(this.close) {
+    
+        YAHOO.util.Event.purgeElement(this.close);
+
+    }
+
+    YAHOO.widget.Panel.superclass.destroy.call(this);  
+
+};
+
+/**
+* Returns a String representation of the object.
+* @method toString
+* @return {String} The string representation of the Panel.
+*/
+YAHOO.widget.Panel.prototype.toString = function() {
+	return "Panel " + this.id;
+};
+/**
+* Dialog is an implementation of Panel that can be used to submit form data. Built-in functionality for buttons with event handlers is included, and button sets can be build dynamically, or the preincluded ones for Submit/Cancel and OK/Cancel can be utilized. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
+* @namespace YAHOO.widget
+* @class Dialog
+* @extends YAHOO.widget.Panel
+* @constructor
+* @param {String}	el	The element ID representing the Dialog <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Dialog
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
+*/
+YAHOO.widget.Dialog = function(el, userConfig) {
+	YAHOO.widget.Dialog.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Dialog, YAHOO.widget.Panel);
+
+/**
+* Constant representing the default CSS class used for a Dialog
+* @property YAHOO.widget.Dialog.CSS_DIALOG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Dialog.CSS_DIALOG = "yui-dialog";
+
+/**
+* Constant representing the name of the Dialog's events
+* @property YAHOO.widget.Dialog._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Dialog._EVENT_TYPES = {
+
+	"BEFORE_SUBMIT": "beforeSubmit",
+	"SUBMIT": "submit",
+	"MANUAL_SUBMIT": "manualSubmit",
+	"ASYNC_SUBMIT": "asyncSubmit",
+	"FORM_SUBMIT": "formSubmit",
+	"CANCEL": "cancel"
+
+};
+
+/**
+* Constant representing the Dialog's configuration properties
+* @property YAHOO.widget.Dialog._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Dialog._DEFAULT_CONFIG = {
+
+	"POST_METHOD": { 
+	   key: "postmethod", 
+	   value: "async" 
+    },
+
+	"BUTTONS": { 
+	   key: "buttons", 
+	   value: "none" 
+    }
+
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Dialog's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Dialog.prototype.initDefaultConfig = function() {
+	YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);
+
+	/**
+	* The internally maintained callback object for use with the Connection utility
+	* @property callback
+	* @type Object
+	*/
+	this.callback = {
+		/**
+		* The function to execute upon success of the Connection submission
+		* @property callback.success
+		* @type Function
+		*/
+		success : null,
+		/**
+		* The function to execute upon failure of the Connection submission
+		* @property callback.failure
+		* @type Function
+		*/
+		failure : null,
+		/**
+		* The arbitraty argument or arguments to pass to the Connection callback functions
+		* @property callback.argument
+		* @type Object
+		*/
+		argument: null
+	};
+
+	// Add form dialog config properties //
+	
+	var DEFAULT_CONFIG = YAHOO.widget.Dialog._DEFAULT_CONFIG;
+	
+	/**
+	* The method to use for posting the Dialog's form. Possible values are "async", "form", and "manual".
+	* @config postmethod
+	* @type String
+	* @default async
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.POST_METHOD.key, 
+                {
+                    handler: this.configPostMethod, 
+                    value: DEFAULT_CONFIG.POST_METHOD.value, 
+                    validator: function(val) {
+                        if (val != "form" && val != "async" && val != "none" && val != "manual") {
+                            return false;
+                        } else {
+                            return true;
+                        }
+                    }
+                }
+            );
+
+	/**
+	* Object literal(s) defining the buttons for the Dialog's footer.
+	* @config buttons
+	* @type Object[]
+	* @default "none"
+	*/
+	this.cfg.addProperty(
+	           DEFAULT_CONFIG.BUTTONS.key,
+	           {
+	               handler: this.configButtons,
+	               value: DEFAULT_CONFIG.BUTTONS.value
+               }
+           );	
+	
+};
+
+/**
+* Initializes the custom events for Dialog which are fired automatically at appropriate times by the Dialog class.
+* @method initEvents
+*/
+YAHOO.widget.Dialog.prototype.initEvents = function() {
+	YAHOO.widget.Dialog.superclass.initEvents.call(this);
+
+    var EVENT_TYPES = YAHOO.widget.Dialog._EVENT_TYPES;
+
+	/**
+	* CustomEvent fired prior to submission
+	* @event beforeSumitEvent
+	*/	
+	this.beforeSubmitEvent	= new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SUBMIT, this);
+	
+	/**
+	* CustomEvent fired after submission
+	* @event submitEvent
+	*/
+	this.submitEvent		= new YAHOO.util.CustomEvent(EVENT_TYPES.SUBMIT, this);
+
+	/**
+	* CustomEvent fired prior to manual submission
+	* @event manualSubmitEvent
+	*/
+	this.manualSubmitEvent	= new YAHOO.util.CustomEvent(EVENT_TYPES.MANUAL_SUBMIT, this);
+
+	/**
+	* CustomEvent fired prior to asynchronous submission
+	* @event asyncSubmitEvent
+	*/	
+	this.asyncSubmitEvent	= new YAHOO.util.CustomEvent(EVENT_TYPES.ASYNC_SUBMIT, this);
+
+	/**
+	* CustomEvent fired prior to form-based submission
+	* @event formSubmitEvent
+	*/
+	this.formSubmitEvent	= new YAHOO.util.CustomEvent(EVENT_TYPES.FORM_SUBMIT, this);
+
+	/**
+	* CustomEvent fired after cancel
+	* @event cancelEvent
+	*/
+	this.cancelEvent		= new YAHOO.util.CustomEvent(EVENT_TYPES.CANCEL, this);
+};
+
+/**
+* The Dialog initialization method, which is executed for Dialog and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String}	el	The element ID representing the Dialog <em>OR</em>
+* @param {HTMLElement}	el	The element representing the Dialog
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
+*/
+YAHOO.widget.Dialog.prototype.init = function(el, userConfig) {
+	YAHOO.widget.Dialog.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+	this.beforeInitEvent.fire(YAHOO.widget.Dialog);
+
+	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Dialog.CSS_DIALOG);
+
+	this.cfg.setProperty("visible", false);
+
+	if (userConfig) {
+		this.cfg.applyConfig(userConfig, true);
+	}
+
+	this.showEvent.subscribe(this.focusFirst, this, true);
+	this.beforeHideEvent.subscribe(this.blurButtons, this, true);
+
+	this.beforeRenderEvent.subscribe(function() {
+		var buttonCfg = this.cfg.getProperty("buttons");
+		if (buttonCfg && buttonCfg != "none") {
+			if (! this.footer) {
+				this.setFooter("");
+			}
+		}
+	}, this, true);
+
+	this.initEvent.fire(YAHOO.widget.Dialog);
+};
+
+/**
+* Performs the submission of the Dialog form depending on the value of "postmethod" property.
+* @method doSubmit
+*/
+YAHOO.widget.Dialog.prototype.doSubmit = function() {
+	var pm = this.cfg.getProperty("postmethod");
+	switch (pm) {
+		case "async":
+			var method = this.form.getAttribute("method") || 'POST';
+			method = method.toUpperCase();
+			YAHOO.util.Connect.setForm(this.form);
+			var cObj = YAHOO.util.Connect.asyncRequest(method, this.form.getAttribute("action"), this.callback);
+			this.asyncSubmitEvent.fire();
+			break;
+		case "form":
+			this.form.submit();
+			this.formSubmitEvent.fire();
+			break;
+		case "none":
+		case "manual":
+			this.manualSubmitEvent.fire();
+			break;
+	}
+};
+
+/**
+* @method _onFormKeyDown
+* @description "keydown" event handler for the dialog's form.
+* @protected
+* @param {Event} p_oEvent Object representing the DOM event object passed 
+* back by the event utility (YAHOO.util.Event).
+*/
+YAHOO.widget.Dialog.prototype._onFormKeyDown = function(p_oEvent) {
+
+    var oTarget = YAHOO.util.Event.getTarget(p_oEvent),
+        nCharCode = YAHOO.util.Event.getCharCode(p_oEvent);
+
+    if (
+        nCharCode == 13 && 
+        oTarget.tagName && 
+        oTarget.tagName.toUpperCase() == "INPUT"
+    ) {
+
+        var sType = oTarget.type;
+
+        if(
+            sType == "text" || sType == "password" || sType == "checkbox" || 
+            sType == "radio" || sType == "file"
+        ) {
+
+            // Fire the "click" event on the dialog's default button
+            this.defaultHtmlButton.click();
+        
+        }
+
+    }
+
+};
+
+/**
+* Prepares the Dialog's internal FORM object, creating one if one is not currently present.
+* @method registerForm
+*/
+YAHOO.widget.Dialog.prototype.registerForm = function() {
+	var form = this.element.getElementsByTagName("form")[0];
+
+	if (! form) {
+		var formHTML = "<form name=\"frm_" + this.id + "\" action=\"\"></form>";
+		this.body.innerHTML += formHTML;
+		form = this.element.getElementsByTagName("form")[0];
+	}
+
+	this.firstFormElement = function() {
+		for (var f=0;f<form.elements.length;f++ ) {
+			var el = form.elements[f];
+			if (el.focus && ! el.disabled) {
+				if (el.type && el.type != "hidden") {
+					return el;
+				}
+			}
+		}
+		return null;
+	}();
+
+	this.lastFormElement = function() {
+		for (var f=form.elements.length-1;f>=0;f-- ) {
+			var el = form.elements[f];
+			if (el.focus && ! el.disabled) {
+				if (el.type && el.type != "hidden") {
+					return el;
+				}
+			}
+		}
+		return null;
+	}();
+
+	this.form = form;
+
+    if(this.form && (this.browser == "ie" || this.browser == "ie7" || this.browser == "gecko")) {
+
+        YAHOO.util.Event.addListener(this.form, "keydown", this._onFormKeyDown, null, this);
+    
+    }
+
+
+	if (this.cfg.getProperty("modal") && this.form) {
+
+		var me = this;
+
+		var firstElement = this.firstFormElement || this.firstButton;
+		if (firstElement) {
+			this.preventBackTab = new YAHOO.util.KeyListener(firstElement, { shift:true, keys:9 }, {fn:me.focusLast, scope:me, correctScope:true} );
+			this.showEvent.subscribe(this.preventBackTab.enable, this.preventBackTab, true);
+			this.hideEvent.subscribe(this.preventBackTab.disable, this.preventBackTab, true);
+		}
+
+		var lastElement = this.lastButton || this.lastFormElement;
+		if (lastElement) {
+			this.preventTabOut = new YAHOO.util.KeyListener(lastElement, { shift:false, keys:9 }, {fn:me.focusFirst, scope:me, correctScope:true} );
+			this.showEvent.subscribe(this.preventTabOut.enable, this.preventTabOut, true);
+			this.hideEvent.subscribe(this.preventTabOut.disable, this.preventTabOut, true);
+		}
+	}
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "close" property is changed. The method controls the appending or hiding of the close icon at the top right of the Dialog.
+* @method configClose
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Dialog.prototype.configClose = function(type, args, obj) {
+	var val = args[0];
+
+	var doCancel = function(e, obj) {
+		obj.cancel();
+	};
+
+	if (val) {
+		if (! this.close) {
+			this.close = document.createElement("div");
+			YAHOO.util.Dom.addClass(this.close, "container-close");
+
+			this.close.innerHTML = "&#160;";
+			this.innerElement.appendChild(this.close);
+			YAHOO.util.Event.addListener(this.close, "click", doCancel, this);
+		} else {
+			this.close.style.display = "block";
+		}
+	} else {
+		if (this.close) {
+			this.close.style.display = "none";
+		}
+	}
+};
+
+/**
+* The default event handler for the "buttons" configuration property
+* @method configButtons
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Dialog.prototype.configButtons = function(type, args, obj) {
+	var buttons = args[0];
+	if (buttons != "none") {
+		this.buttonSpan = null;
+		this.buttonSpan = document.createElement("span");
+		this.buttonSpan.className = "button-group";
+
+		for (var b=0;b<buttons.length;b++) {
+			var button = buttons[b];
+
+			var htmlButton = document.createElement("button");
+			htmlButton.setAttribute("type", "button");
+
+			if (button.isDefault) {
+				htmlButton.className = "default";
+				this.defaultHtmlButton = htmlButton;
+			}
+
+			htmlButton.appendChild(document.createTextNode(button.text));
+			YAHOO.util.Event.addListener(htmlButton, "click", button.handler, this, true);
+
+			this.buttonSpan.appendChild(htmlButton);
+			button.htmlButton = htmlButton;
+
+			if (b === 0) {
+				this.firstButton = button.htmlButton;
+			}
+
+			if (b == (buttons.length-1)) {
+				this.lastButton = button.htmlButton;
+			}
+
+		}
+
+		this.setFooter(this.buttonSpan);
+
+		this.cfg.refireEvent("iframe");
+		this.cfg.refireEvent("underlay");
+	} else { // Do cleanup
+		if (this.buttonSpan) {
+			if (this.buttonSpan.parentNode) {
+				this.buttonSpan.parentNode.removeChild(this.buttonSpan);
+			}
+
+			this.buttonSpan = null;
+			this.firstButton = null;
+			this.lastButton = null;
+			this.defaultHtmlButton = null;
+		}
+	}
+};
+
+
+/**
+* The default event handler used to focus the first field of the form when the Dialog is shown.
+* @method focusFirst
+*/
+YAHOO.widget.Dialog.prototype.focusFirst = function(type,args,obj) {
+	if (args) {
+		var e = args[1];
+		if (e) {
+			YAHOO.util.Event.stopEvent(e);
+		}
+	}
+
+	if (this.firstFormElement) {
+		this.firstFormElement.focus();
+	} else {
+		this.focusDefaultButton();
+	}
+};
+
+/**
+* Sets the focus to the last button in the button or form element in the Dialog
+* @method focusLast
+*/
+YAHOO.widget.Dialog.prototype.focusLast = function(type,args,obj) {
+	if (args) {
+		var e = args[1];
+		if (e) {
+			YAHOO.util.Event.stopEvent(e);
+		}
+	}
+
+	var buttons = this.cfg.getProperty("buttons");
+	if (buttons && buttons instanceof Array) {
+		this.focusLastButton();
+	} else {
+		if (this.lastFormElement) {
+			this.lastFormElement.focus();
+		}
+	}
+};
+
+/**
+* Sets the focus to the button that is designated as the default. By default, his handler is executed when the show event is fired.
+* @method focusDefaultButton
+*/
+YAHOO.widget.Dialog.prototype.focusDefaultButton = function() {
+	if (this.defaultHtmlButton) {
+		this.defaultHtmlButton.focus();
+	}
+};
+
+/**
+* Blurs all the html buttons
+* @method blurButtons
+*/
+YAHOO.widget.Dialog.prototype.blurButtons = function() {
+	var buttons = this.cfg.getProperty("buttons");
+	if (buttons && buttons instanceof Array) {
+		var html = buttons[0].htmlButton;
+		if (html) {
+			html.blur();
+		}
+	}
+};
+
+/**
+* Sets the focus to the first button in the button list
+* @method focusFirstButton
+*/
+YAHOO.widget.Dialog.prototype.focusFirstButton = function() {
+	var buttons = this.cfg.getProperty("buttons");
+	if (buttons && buttons instanceof Array) {
+		var html = buttons[0].htmlButton;
+		if (html) {
+			html.focus();
+		}
+	}
+};
+
+/**
+* Sets the focus to the first button in the button list
+* @method focusLastButton
+*/
+YAHOO.widget.Dialog.prototype.focusLastButton = function() {
+	var buttons = this.cfg.getProperty("buttons");
+	if (buttons && buttons instanceof Array) {
+		var html = buttons[buttons.length-1].htmlButton;
+		if (html) {
+			html.focus();
+		}
+	}
+};
+
+/**
+* The default event handler for the "postmethod" configuration property
+* @method configPostMethod
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Dialog.prototype.configPostMethod = function(type, args, obj) {
+	var postmethod = args[0];
+
+	this.registerForm();
+	YAHOO.util.Event.addListener(this.form, "submit", function(e) {
+														YAHOO.util.Event.stopEvent(e);
+														this.submit();
+														this.form.blur();
+													  }, this, true);
+};
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Built-in function hook for writing a validation function that will be checked for a "true" value prior to a submit. This function, as implemented by default, always returns true, so it should be overridden if validation is necessary.
+* @method validate
+*/
+YAHOO.widget.Dialog.prototype.validate = function() {
+	return true;
+};
+
+/**
+* Executes a submit of the Dialog followed by a hide, if validation is successful.
+* @method submit
+*/
+YAHOO.widget.Dialog.prototype.submit = function() {
+	if (this.validate()) {
+		this.beforeSubmitEvent.fire();
+		this.doSubmit();
+		this.submitEvent.fire();
+		this.hide();
+		return true;
+	} else {
+		return false;
+	}
+};
+
+/**
+* Executes the cancel of the Dialog followed by a hide.
+* @method cancel
+*/
+YAHOO.widget.Dialog.prototype.cancel = function() {
+	this.cancelEvent.fire();
+	this.hide();
+};
+
+/**
+* Returns a JSON-compatible data structure representing the data currently contained in the form.
+* @method getData
+* @return {Object} A JSON object reprsenting the data of the current form.
+*/
+YAHOO.widget.Dialog.prototype.getData = function() {
+
+    var oForm = this.form;
+
+    if(oForm) {
+
+        var aElements = oForm.elements,
+            nTotalElements = aElements.length,
+            oData = {},
+            sName,
+            oElement,
+            nElements;
+
+        for(var i=0; i<nTotalElements; i++) {
+
+            sName = aElements[i].name;
+
+            function isFormElement(p_oElement) {
+            
+                var sTagName = p_oElement.tagName.toUpperCase();
+                
+                return (
+                    (
+                        sTagName == "INPUT" || 
+                        sTagName == "TEXTAREA" || 
+                        sTagName == "SELECT"
+                    ) && 
+                    p_oElement.name == sName
+                );
+
+            }
+
+            /*
+                Using "YAHOO.util.Dom.getElementsBy" to safeguard
+                user from JS errors that result from giving a form field (or 
+                set of fields) the same name as a native method of a form 
+                (like "submit") or a DOM collection (such as the "item" method).
+                Originally tried accessing fields via the "namedItem" method of 
+                the "element" collection, but discovered that it won't return
+                a collection of fields in Gecko.
+            */
+
+            oElement = YAHOO.util.Dom.getElementsBy(isFormElement, "*", oForm);
+            nElements = oElement.length;
+
+            if(nElements > 0) {
+
+                if(nElements == 1) {
+
+                    oElement = oElement[0];
+
+                    var sType = oElement.type,
+                        sTagName = oElement.tagName.toUpperCase();
+
+                    switch(sTagName) {
+
+                        case "INPUT":
+
+                            if(sType == "checkbox") {
+
+                                oData[sName] = oElement.checked;
+
+                            }
+                            else if(sType != "radio") {
+
+                                oData[sName] = oElement.value;
+
+                            }
+
+                        break;
+
+                        case "TEXTAREA":
+
+                            oData[sName] = oElement.value;
+
+                        break;
+
+                        case "SELECT":
+
+                            var aOptions = oElement.options,
+                                nOptions = aOptions.length,
+                                aValues = [],
+                                oOption,
+                                sValue;
+
+
+                            for(var n=0; n<nOptions; n++) {
+
+                                oOption = aOptions[n];
+
+                                if(oOption.selected) {
+
+                                    sValue = oOption.value;
+
+                                    if(!sValue || sValue === "") {
+
+                                        sValue = oOption.text;
+
+                                    }
+
+                                    aValues[aValues.length] = sValue;
+
+                                }
+
+                            }
+
+                            oData[sName] = aValues;
+
+                        break;
+
+                    }
+
+
+                }
+                else {
+
+                    var sType = oElement[0].type;
+
+                    switch(sType) {
+
+                        case "radio":
+
+                            var oRadio;
+
+                            for(var n=0; n<nElements; n++) {
+
+                                oRadio = oElement[n];
+
+                                if(oRadio.checked) {
+
+                                    oData[sName] = oRadio.value;
+                                    break;
+
+                                }
+
+                            }
+
+                        break;
+
+                        case "checkbox":
+
+                            var aValues = [],
+                                oCheckbox;
+
+                            for(var n=0; n<nElements; n++) {
+
+                                oCheckbox = oElement[n];
+
+                                if(oCheckbox.checked) {
+
+                                    aValues[aValues.length] = oCheckbox.value;
+
+                                }
+
+                            }
+
+                            oData[sName] = aValues;
+
+                        break;
+
+                    }
+
+                }
+
+            }
+
+        }
+
+    }
+
+
+    return oData;
+
+};
+
+/**
+* Removes the Panel element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Dialog.prototype.destroy = function() {
+
+    var Event = YAHOO.util.Event,
+        oForm = this.form,
+        oFooter = this.footer;
+
+    if(oFooter) {
+
+        var aButtons = oFooter.getElementsByTagName("button");
+
+        if(aButtons && aButtons.length > 0) {
+
+            var i = aButtons.length - 1;
+            
+            do {
+            
+                Event.purgeElement(aButtons[i], false, "click");
+            
+            }
+            while(i--);
+        
+        }
+
+    }
+    
+
+    if(oForm) {
+       
+        Event.purgeElement(oForm);
+
+        this.body.removeChild(oForm);
+        
+        this.form = null;
+
+    }
+
+    YAHOO.widget.Dialog.superclass.destroy.call(this);  
+
+};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	The string representation of the Dialog
+*/
+YAHOO.widget.Dialog.prototype.toString = function() {
+	return "Dialog " + this.id;
+};
+/**
+* SimpleDialog is a simple implementation of Dialog that can be used to submit a single value. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
+* @namespace YAHOO.widget
+* @class SimpleDialog
+* @extends YAHOO.widget.Dialog
+* @constructor
+* @param {String}	el	The element ID representing the SimpleDialog <em>OR</em>
+* @param {HTMLElement}	el	The element representing the SimpleDialog
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
+*/
+YAHOO.widget.SimpleDialog = function(el, userConfig) {
+	YAHOO.widget.SimpleDialog.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.SimpleDialog, YAHOO.widget.Dialog);
+
+/**
+* Constant for the standard network icon for a blocking action
+* @property YAHOO.widget.SimpleDialog.ICON_BLOCK
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_BLOCK = "blckicon";
+
+/**
+* Constant for the standard network icon for alarm
+* @property YAHOO.widget.SimpleDialog.ICON_ALARM
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_ALARM = "alrticon";
+
+/**
+* Constant for the standard network icon for help
+* @property YAHOO.widget.SimpleDialog.ICON_HELP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_HELP  = "hlpicon";
+
+/**
+* Constant for the standard network icon for info
+* @property YAHOO.widget.SimpleDialog.ICON_INFO
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_INFO  = "infoicon";
+
+/**
+* Constant for the standard network icon for warn
+* @property YAHOO.widget.SimpleDialog.ICON_WARN
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_WARN  = "warnicon";
+
+/**
+* Constant for the standard network icon for a tip
+* @property YAHOO.widget.SimpleDialog.ICON_TIP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_TIP   = "tipicon";
+
+/**
+* Constant representing the default CSS class used for a SimpleDialog
+* @property YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG = "yui-simple-dialog";
+
+/**
+* Constant representing the SimpleDialog's configuration properties
+* @property YAHOO.widget.SimpleDialog._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.SimpleDialog._DEFAULT_CONFIG = {
+
+    "ICON": { 
+        key: "icon", 
+        value:"none", 
+        suppressEvent:true  
+    },
+
+    "TEXT": { 
+        key: "text", 
+        value:"", 
+        suppressEvent:true, 
+        supercedes:["icon"] 
+    }
+
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the SimpleDialog's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.SimpleDialog.prototype.initDefaultConfig = function() {
+	YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);
+
+	// Add dialog config properties //
+
+    var DEFAULT_CONFIG = YAHOO.widget.SimpleDialog._DEFAULT_CONFIG;
+
+	/**
+	* Sets the informational icon for the SimpleDialog
+	* @config icon
+	* @type String
+	* @default "none"
+	*/
+	this.cfg.addProperty(
+                DEFAULT_CONFIG.ICON.key,
+                {
+                    handler: this.configIcon,
+                    value: DEFAULT_CONFIG.ICON.value,
+                    suppressEvent: DEFAULT_CONFIG.ICON.suppressEvent
+                }
+            );
+
+	/**
+	* Sets the text for the SimpleDialog
+	* @config text
+	* @type String
+	* @default ""
+	*/
+    this.cfg.addProperty(
+                DEFAULT_CONFIG.TEXT.key,	
+                { 
+                    handler: this.configText, 
+                    value: DEFAULT_CONFIG.TEXT.value, 
+                    suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent, 
+                    supercedes: DEFAULT_CONFIG.TEXT.supercedes 
+                } 
+            );
+
+};
+
+
+/**
+* The SimpleDialog initialization method, which is executed for SimpleDialog and all of its subclasses. This method is automatically called by the constructor, and  sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String}	el	The element ID representing the SimpleDialog <em>OR</em>
+* @param {HTMLElement}	el	The element representing the SimpleDialog
+* @param {Object}	userConfig	The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
+*/
+YAHOO.widget.SimpleDialog.prototype.init = function(el, userConfig) {
+	YAHOO.widget.SimpleDialog.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+	this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);
+
+	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);
+
+	this.cfg.queueProperty("postmethod", "manual");
+
+	if (userConfig) {
+		this.cfg.applyConfig(userConfig, true);
+	}
+
+	this.beforeRenderEvent.subscribe(function() {
+		if (! this.body) {
+			this.setBody("");
+		}
+	}, this, true);
+
+	this.initEvent.fire(YAHOO.widget.SimpleDialog);
+
+};
+/**
+* Prepares the SimpleDialog's internal FORM object, creating one if one is not currently present, and adding the value hidden field.
+* @method registerForm
+*/
+YAHOO.widget.SimpleDialog.prototype.registerForm = function() {
+	YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);
+	this.form.innerHTML += "<input type=\"hidden\" name=\"" + this.id + "\" value=\"\"/>";
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Fired when the "icon" property is set.
+* @method configIcon
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.SimpleDialog.prototype.configIcon = function(type,args,obj) {
+	var icon = args[0];
+	if (icon && icon != "none") {
+		var iconHTML = "";
+		if (icon.indexOf(".") == -1) {
+			iconHTML = "<span class=\"yui-icon " + icon +"\" >&#160;</span>";
+		} else {
+			iconHTML = "<img src=\"" + this.imageRoot + icon + "\" class=\"yui-icon\" />";
+		}
+		this.body.innerHTML = iconHTML + this.body.innerHTML;
+	}
+};
+
+/**
+* Fired when the "text" property is set.
+* @method configText
+* @param {String} type	The CustomEvent type (usually the property name)
+* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.SimpleDialog.prototype.configText = function(type,args,obj) {
+	var text = args[0];
+	if (text) {
+		this.setBody(text);
+		this.cfg.refireEvent("icon");
+	}
+};
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	The string representation of the SimpleDialog
+*/
+YAHOO.widget.SimpleDialog.prototype.toString = function() {
+	return "SimpleDialog " + this.id;
+};
+/**
+* ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.
+* @namespace YAHOO.widget
+* @class ContainerEffect
+* @constructor
+* @param {YAHOO.widget.Overlay}	overlay		The Overlay that the animation should be associated with
+* @param {Object}	attrIn		The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {Object}	attrOut		The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {HTMLElement}	targetElement	Optional. The target element that should be animated during the transition. Defaults to overlay.element.
+* @param {class}	Optional. The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.
+*/
+YAHOO.widget.ContainerEffect = function(overlay, attrIn, attrOut, targetElement, animClass) {
+	if (! animClass) {
+		animClass = YAHOO.util.Anim;
+	}
+
+	/**
+	* The overlay to animate
+	* @property overlay
+	* @type YAHOO.widget.Overlay
+	*/
+	this.overlay = overlay;
+	/**
+	* The animation attributes to use when transitioning into view
+	* @property attrIn
+	* @type Object
+	*/
+	this.attrIn = attrIn;
+	/**
+	* The animation attributes to use when transitioning out of view
+	* @property attrOut
+	* @type Object
+	*/
+	this.attrOut = attrOut;
+	/**
+	* The target element to be animated
+	* @property targetElement
+	* @type HTMLElement
+	*/
+	this.targetElement = targetElement || overlay.element;
+	/**
+	* The animation class to use for animating the overlay
+	* @property animClass
+	* @type class
+	*/
+	this.animClass = animClass;
+};
+
+/**
+* Initializes the animation classes and events.
+* @method init
+*/
+YAHOO.widget.ContainerEffect.prototype.init = function() {
+	this.beforeAnimateInEvent = new YAHOO.util.CustomEvent("beforeAnimateIn", this);
+	this.beforeAnimateOutEvent = new YAHOO.util.CustomEvent("beforeAnimateOut", this);
+
+	this.animateInCompleteEvent = new YAHOO.util.CustomEvent("animateInComplete", this);
+	this.animateOutCompleteEvent = new YAHOO.util.CustomEvent("animateOutComplete", this);
+
+	this.animIn = new this.animClass(this.targetElement, this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);
+	this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);
+	this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);
+	this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);
+
+	this.animOut = new this.animClass(this.targetElement, this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);
+	this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);
+	this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);
+	this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);
+};
+
+/**
+* Triggers the in-animation.
+* @method animateIn
+*/
+YAHOO.widget.ContainerEffect.prototype.animateIn = function() {
+	this.beforeAnimateInEvent.fire();
+	this.animIn.animate();
+};
+
+/**
+* Triggers the out-animation.
+* @method animateOut
+*/
+YAHOO.widget.ContainerEffect.prototype.animateOut = function() {
+	this.beforeAnimateOutEvent.fire();
+	this.animOut.animate();
+};
+
+/**
+* The default onStart handler for the in-animation.
+* @method handleStartAnimateIn
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn = function(type, args, obj) { };
+/**
+* The default onTween handler for the in-animation.
+* @method handleTweenAnimateIn
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn = function(type, args, obj) { };
+/**
+* The default onComplete handler for the in-animation.
+* @method handleCompleteAnimateIn
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn = function(type, args, obj) { };
+
+/**
+* The default onStart handler for the out-animation.
+* @method handleStartAnimateOut
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut = function(type, args, obj) { };
+/**
+* The default onTween handler for the out-animation.
+* @method handleTweenAnimateOut
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut = function(type, args, obj) { };
+/**
+* The default onComplete handler for the out-animation.
+* @method handleCompleteAnimateOut
+* @param {String} type	The CustomEvent type
+* @param {Object[]}	args	The CustomEvent arguments
+* @param {Object} obj	The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut = function(type, args, obj) { };
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String}	The string representation of the ContainerEffect
+*/
+YAHOO.widget.ContainerEffect.prototype.toString = function() {
+	var output = "ContainerEffect";
+	if (this.overlay) {
+		output += " [" + this.overlay.toString() + "]";
+	}
+	return output;
+};
+
+/**
+* A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
+* @method FADE
+* @static
+* @param {Overlay}	overlay	The Overlay object to animate
+* @param {Number}	dur	The duration of the animation
+* @return {ContainerEffect}	The configured ContainerEffect object
+*/
+YAHOO.widget.ContainerEffect.FADE = function(overlay, dur) {
+	var fade = new YAHOO.widget.ContainerEffect(overlay, { attributes:{opacity: {from:0, to:1}}, duration:dur, method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );
+
+	fade.handleStartAnimateIn = function(type,args,obj) {
+		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+
+		if (! obj.overlay.underlay) {
+			obj.overlay.cfg.refireEvent("underlay");
+		}
+
+		if (obj.overlay.underlay) {
+			obj.initialUnderlayOpacity = YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");
+			obj.overlay.underlay.style.filter = null;
+		}
+
+		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
+		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);
+	};
+
+	fade.handleCompleteAnimateIn = function(type,args,obj) {
+		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+
+		if (obj.overlay.element.style.filter) {
+			obj.overlay.element.style.filter = null;
+		}
+
+		if (obj.overlay.underlay) {
+			YAHOO.util.Dom.setStyle(obj.overlay.underlay, "opacity", obj.initialUnderlayOpacity);
+		}
+
+		obj.overlay.cfg.refireEvent("iframe");
+		obj.animateInCompleteEvent.fire();
+	};
+
+	fade.handleStartAnimateOut = function(type, args, obj) {
+		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+
+		if (obj.overlay.underlay) {
+			obj.overlay.underlay.style.filter = null;
+		}
+	};
+
+	fade.handleCompleteAnimateOut =  function(type, args, obj) {
+		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+		if (obj.overlay.element.style.filter) {
+			obj.overlay.element.style.filter = null;
+		}
+		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
+		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1);
+
+		obj.overlay.cfg.refireEvent("iframe");
+
+		obj.animateOutCompleteEvent.fire();
+	};
+
+	fade.init();
+	return fade;
+};
+
+
+/**
+* A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
+* @method SLIDE
+* @static
+* @param {Overlay}	overlay	The Overlay object to animate
+* @param {Number}	dur	The duration of the animation
+* @return {ContainerEffect}	The configured ContainerEffect object
+*/
+YAHOO.widget.ContainerEffect.SLIDE = function(overlay, dur) {
+	var x = overlay.cfg.getProperty("x") || YAHOO.util.Dom.getX(overlay.element);
+	var y = overlay.cfg.getProperty("y") || YAHOO.util.Dom.getY(overlay.element);
+
+	var clientWidth = YAHOO.util.Dom.getClientWidth();
+	var offsetWidth = overlay.element.offsetWidth;
+
+	var slide = new YAHOO.widget.ContainerEffect(overlay, {
+															attributes:{ points: { to:[x, y] } },
+															duration:dur,
+															method:YAHOO.util.Easing.easeIn
+														},
+														{
+															attributes:{ points: { to:[(clientWidth+25), y] } },
+															duration:dur,
+															method:YAHOO.util.Easing.easeOut
+														},
+														overlay.element,
+														YAHOO.util.Motion);
+
+
+	slide.handleStartAnimateIn = function(type,args,obj) {
+		obj.overlay.element.style.left = (-25-offsetWidth) + "px";
+		obj.overlay.element.style.top  = y + "px";
+	};
+
+	slide.handleTweenAnimateIn = function(type, args, obj) {
+
+
+		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+		var currentX = pos[0];
+		var currentY = pos[1];
+
+		if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") == "hidden" && currentX < x) {
+			YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
+		}
+
+		obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);
+		obj.overlay.cfg.refireEvent("iframe");
+	};
+
+	slide.handleCompleteAnimateIn = function(type, args, obj) {
+		obj.overlay.cfg.setProperty("xy", [x,y], true);
+		obj.startX = x;
+		obj.startY = y;
+		obj.overlay.cfg.refireEvent("iframe");
+		obj.animateInCompleteEvent.fire();
+	};
+
+	slide.handleStartAnimateOut = function(type, args, obj) {
+		var vw = YAHOO.util.Dom.getViewportWidth();
+
+		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+		var yso = pos[1];
+
+		var currentTo = obj.animOut.attributes.points.to;
+		obj.animOut.attributes.points.to = [(vw+25), yso];
+	};
+
+	slide.handleTweenAnimateOut = function(type, args, obj) {
+		var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+		var xto = pos[0];
+		var yto = pos[1];
+
+		obj.overlay.cfg.setProperty("xy", [xto,yto], true);
+		obj.overlay.cfg.refireEvent("iframe");
+	};
+
+	slide.handleCompleteAnimateOut = function(type, args, obj) {
+		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
+
+		obj.overlay.cfg.setProperty("xy", [x,y]);
+		obj.animateOutCompleteEvent.fire();
+	};
+
+	slide.init();
+	return slide;
+};
+YAHOO.register("container", YAHOO.widget.Module, {version: "2.2.1", build: "193"});

Modified: jifty/trunk/share/web/static/js/yui/dom.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/dom.js	(original)
+++ jifty/trunk/share/web/static/js/yui/dom.js	Thu Apr 12 03:32:44 2007
@@ -1,893 +1,923 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/
-
-/**
- * The dom module provides helper methods for manipulating Dom elements.
- * @module dom
- *
- */
-
-(function() {
-    var Y = YAHOO.util,     // internal shorthand
-        getStyle,           // for load time browser branching
-        setStyle,           // ditto
-        id_counter = 0,     // for use with generateId
-        propertyCache = {}; // for faster hyphen converts
-
-    // brower detection
-    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);
-
-    // regex cache
-    var patterns = {
-        HYPHEN: /(-[a-z])/i
-    };
-
-
-    var toCamel = function(property) {
-        if ( !patterns.HYPHEN.test(property) ) {
-            return property; // no hyphens
-        }
-
-        if (propertyCache[property]) { // already converted
-            return propertyCache[property];
-        }
-
-        while( patterns.HYPHEN.exec(property) ) {
-            property = property.replace(RegExp.$1,
-                    RegExp.$1.substr(1).toUpperCase());
-        }
-
-        propertyCache[property] = property;
-        return property;
-        //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
-    };
-
-    // branching at load instead of runtime
-    if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method
-        getStyle = function(el, property) {
-            var value = null;
-
-            var computed = document.defaultView.getComputedStyle(el, '');
-            if (computed) { // test computed before touching for safari
-                value = computed[toCamel(property)];
-            }
-
-            return el.style[property] || value;
-        };
-    } else if (document.documentElement.currentStyle && isIE) { // IE method
-        getStyle = function(el, property) {
-            switch( toCamel(property) ) {
-                case 'opacity' :// IE opacity uses filter
-                    var val = 100;
-                    try { // will error if no DXImageTransform
-                        val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
-
-                    } catch(e) {
-                        try { // make sure its in the document
-                            val = el.filters('alpha').opacity;
-                        } catch(e) {
-                        }
-                    }
-                    return val / 100;
-                    break;
-                default:
-                    // test currentStyle before touching
-                    var value = el.currentStyle ? el.currentStyle[property] : null;
-                    return ( el.style[property] || value );
-            }
-        };
-    } else { // default to inline only
-        getStyle = function(el, property) { return el.style[property]; };
-    }
-
-    if (isIE) {
-        setStyle = function(el, property, val) {
-            switch (property) {
-                case 'opacity':
-                    if ( typeof el.style.filter == 'string' ) { // in case not appended
-                        el.style.filter = 'alpha(opacity=' + val * 100 + ')';
-
-                        if (!el.currentStyle || !el.currentStyle.hasLayout) {
-                            el.style.zoom = 1; // when no layout or cant tell
-                        }
-                    }
-                    break;
-                default:
-                el.style[property] = val;
-            }
-        };
-    } else {
-        setStyle = function(el, property, val) {
-            el.style[property] = val;
-        };
-    }
-
-    /**
-     * Provides helper methods for DOM elements.
-     * @namespace YAHOO.util
-     * @class Dom
-     */
-    YAHOO.util.Dom = {
-        /**
-         * Returns an HTMLElement reference.
-         * @method get
-         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
-         */
-        get: function(el) {
-            if (!el) { return null; } // nothing to work with
-
-            if (typeof el != 'string' && !(el instanceof Array) ) { // assuming HTMLElement or HTMLCollection, so pass back as is
-                return el;
-            }
-
-            if (typeof el == 'string') { // ID
-                return document.getElementById(el);
-            }
-            else { // array of ID's and/or elements
-                var collection = [];
-                for (var i = 0, len = el.length; i < len; ++i) {
-                    collection[collection.length] = Y.Dom.get(el[i]);
-                }
-
-                return collection;
-            }
-
-            return null; // safety, should never happen
-        },
-
-        /**
-         * Normalizes currentStyle and ComputedStyle.
-         * @method getStyle
-         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {String} property The style property whose value is returned.
-         * @return {String | Array} The current value of the style property for the element(s).
-         */
-        getStyle: function(el, property) {
-            property = toCamel(property);
-
-            var f = function(element) {
-                return getStyle(element, property);
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Wrapper for setting style properties of HTMLElements.  Normalizes "opacity" across modern browsers.
-         * @method setStyle
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {String} property The style property to be set.
-         * @param {String} val The value to apply to the given property.
-         */
-        setStyle: function(el, property, val) {
-            property = toCamel(property);
-
-            var f = function(element) {
-                setStyle(element, property, val);
-
-            };
-
-            Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Gets the current position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getXY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @return {Array} The XY position of the element(s)
-         */
-        getXY: function(el) {
-            var f = function(el) {
-
-            // has to be part of document to have pageXY
-                if (el.parentNode === null || el.offsetParent === null ||
-                        this.getStyle(el, 'display') == 'none') {
-                    return false;
-                }
-
-                var parentNode = null;
-                var pos = [];
-                var box;
-
-                if (el.getBoundingClientRect) { // IE
-                    box = el.getBoundingClientRect();
-                    var doc = document;
-                    if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll
-                        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 { // safari, opera, & gecko
-                    pos = [el.offsetLeft, el.offsetTop];
-                    parentNode = el.offsetParent;
-                    if (parentNode != el) {
-                        while (parentNode) {
-                            pos[0] += parentNode.offsetLeft;
-                            pos[1] += parentNode.offsetTop;
-                            parentNode = parentNode.offsetParent;
-                        }
-                    }
-                    if (isSafari && this.getStyle(el, 'position') == 'absolute' ) { // safari doubles in some cases
-                        pos[0] -= document.body.offsetLeft;
-                        pos[1] -= document.body.offsetTop;
-                    }
-                }
-
-                if (el.parentNode) { parentNode = el.parentNode; }
-                else { parentNode = null; }
-
-                while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML')
-                { // account for any scrolled ancestors
-                    if (Y.Dom.getStyle(parentNode, 'display') != 'inline') { // work around opera inline scrollLeft/Top bug
-                        pos[0] -= parentNode.scrollLeft;
-                        pos[1] -= parentNode.scrollTop;
-                    }
-
-                    if (parentNode.parentNode) {
-                        parentNode = parentNode.parentNode;
-                    } else { parentNode = null; }
-                }
-
-
-                return pos;
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Gets the current X position of an element based on page coordinates.  The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getX
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @return {String | Array} The X position of the element(s)
-         */
-        getX: function(el) {
-            var f = function(el) {
-                return Y.Dom.getXY(el)[0];
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Gets the current Y position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @return {String | Array} The Y position of the element(s)
-         */
-        getY: function(el) {
-            var f = function(el) {
-                return Y.Dom.getXY(el)[1];
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Set the position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setXY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
-         * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
-         */
-        setXY: function(el, pos, noRetry) {
-            var f = function(el) {
-                var style_pos = this.getStyle(el, 'position');
-                if (style_pos == 'static') { // default to relative
-                    this.setStyle(el, 'position', 'relative');
-                    style_pos = 'relative';
-                }
-
-                var pageXY = this.getXY(el);
-                if (pageXY === false) { // has to be part of doc to have pageXY
-                    return false;
-                }
-
-                var delta = [ // assuming pixels; if not we will have to retry
-                    parseInt( this.getStyle(el, 'left'), 10 ),
-                    parseInt( this.getStyle(el, 'top'), 10 )
-                ];
-
-                if ( isNaN(delta[0]) ) {// in case of 'auto'
-                    delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
-                }
-                if ( isNaN(delta[1]) ) { // in case of 'auto'
-                    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 retry is true, try one more time if we miss
-                   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);
-        },
-
-        /**
-         * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setX
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {Int} x The value to use as the X coordinate for the element(s).
-         */
-        setX: function(el, x) {
-            Y.Dom.setXY(el, [x, null]);
-        },
-
-        /**
-         * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {Int} x To use as the Y coordinate for the element(s).
-         */
-        setY: function(el, y) {
-            Y.Dom.setXY(el, [null, y]);
-        },
-
-        /**
-         * Returns the region position of the given element.
-         * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
-         * @method getRegion
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
-         */
-        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);
-        },
-
-        /**
-         * Returns the width of the client (viewport).
-         * @method getClientWidth
-         * @deprecated Now using getViewportWidth.  This interface left intact for back compat.
-         * @return {Int} The width of the viewable area of the page.
-         */
-        getClientWidth: function() {
-            return Y.Dom.getViewportWidth();
-        },
-
-        /**
-         * Returns the height of the client (viewport).
-         * @method getClientHeight
-         * @deprecated Now using getViewportHeight.  This interface left intact for back compat.
-         * @return {Int} The height of the viewable area of the page.
-         */
-        getClientHeight: function() {
-            return Y.Dom.getViewportHeight();
-        },
-
-        /**
-         * Returns a array of HTMLElements with the given class.
-         * For optimized performance, include a tag and/or root node when possible.
-         * @method getElementsByClassName
-         * @param {String} className The class name to match against
-         * @param {String} tag (optional) The tag name of the elements being collected
-         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
-         * @return {Array} An array of elements that have the given class name
-         */
-        getElementsByClassName: function(className, tag, root) {
-            var method = function(el) { return Y.Dom.hasClass(el, className); };
-            return Y.Dom.getElementsBy(method, tag, root);
-        },
-
-        /**
-         * Determines whether an HTMLElement has the given className.
-         * @method hasClass
-         * @param {String | HTMLElement | Array} el The element or collection to test
-         * @param {String} className the class name to search for
-         * @return {Boolean | Array} A boolean value or array of boolean values
-         */
-        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);
-        },
-
-        /**
-         * Adds a class name to a given element or collection of elements.
-         * @method addClass
-         * @param {String | HTMLElement | Array} el The element or collection to add the class to
-         * @param {String} className the class name to add to the class attribute
-         */
-        addClass: function(el, className) {
-            var f = function(el) {
-                if (this.hasClass(el, className)) { return; } // already present
-
-
-                el['className'] = [el['className'], className].join(' ');
-            };
-
-            Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Removes a class name from a given element or collection of elements.
-         * @method removeClass
-         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
-         * @param {String} className the class name to remove from the class attribute
-         */
-        removeClass: function(el, className) {
-            var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g');
-
-            var f = function(el) {
-                if (!this.hasClass(el, className)) { return; } // not present
-
-
-                var c = el['className'];
-                el['className'] = c.replace(re, ' ');
-                if ( this.hasClass(el, className) ) { // in case of multiple adjacent
-                    this.removeClass(el, className);
-                }
-
-            };
-
-            Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Replace a class with another class for a given element or collection of elements.
-         * If no oldClassName is present, the newClassName is simply added.
-         * @method replaceClass
-         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
-         * @param {String} oldClassName the class name to be replaced
-         * @param {String} newClassName the class name that will be replacing the old class name
-         */
-        replaceClass: function(el, oldClassName, newClassName) {
-            if (oldClassName === newClassName) { // avoid infinite loop
-                return false;
-            }
-
-            var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g');
-
-            var f = function(el) {
-
-                if ( !this.hasClass(el, oldClassName) ) {
-                    this.addClass(el, newClassName); // just add it if nothing to replace
-                    return; // note return
-                }
-
-                el['className'] = el['className'].replace(re, ' ' + newClassName + ' ');
-
-                if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
-                    this.replaceClass(el, oldClassName, newClassName);
-                }
-            };
-
-            Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Generates a unique ID
-         * @method generateId
-         * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
-         * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
-         * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
-         */
-        generateId: function(el, prefix) {
-            prefix = prefix || 'yui-gen';
-            el = el || {};
-
-            var f = function(el) {
-                if (el) {
-                    el = Y.Dom.get(el);
-                } else {
-                    el = {}; // just generating ID in this case
-                }
-
-                if (!el.id) {
-                    el.id = prefix + id_counter++;
-                } // dont override existing
-
-
-                return el.id;
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
-         * @method isAncestor
-         * @param {String | HTMLElement} haystack The possible ancestor
-         * @param {String | HTMLElement} needle The possible descendent
-         * @return {Boolean} Whether or not the haystack is an ancestor of needle
-         */
-        isAncestor: function(haystack, needle) {
-            haystack = Y.Dom.get(haystack);
-            if (!haystack || !needle) { return false; }
-
-            var f = function(needle) {
-                if (haystack.contains && !isSafari) { // safari "contains" is broken
-                    return haystack.contains(needle);
-                }
-                else if ( haystack.compareDocumentPosition ) {
-                    return !!(haystack.compareDocumentPosition(needle) & 16);
-                }
-                else { // loop up and test each parent
-                    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);
-        },
-
-        /**
-         * Determines whether an HTMLElement is present in the current document.
-         * @method inDocument
-         * @param {String | HTMLElement} el The element to search for
-         * @return {Boolean} Whether or not the element is present in the current document
-         */
-        inDocument: function(el) {
-            var f = function(el) {
-                return this.isAncestor(document.documentElement, el);
-            };
-
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-
-        /**
-         * Returns a array of HTMLElements that pass the test applied by supplied boolean method.
-         * For optimized performance, include a tag and/or root node when possible.
-         * @method getElementsBy
-         * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
-
-         * @param {String} tag (optional) The tag name of the elements being collected
-         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
-         */
-        getElementsBy: function(method, tag, root) {
-            tag = tag || '*';
-
-            var nodes = [];
-
-            if (root) {
-                root = Y.Dom.get(root);
-                if (!root) { // if no root node, then no children
-                    return nodes;
-                }
-            } else {
-                root = document;
-            }
-
-            var elements = root.getElementsByTagName(tag);
-
-            if ( !elements.length && (tag == '*' && root.all) ) {
-                elements = root.all; // IE < 6
-            }
-
-            for (var i = 0, len = elements.length; i < len; ++i) {
-                if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; }
-            }
-
-
-            return nodes;
-        },
-
-        /**
-         * Returns an array of elements that have had the supplied method applied.
-         * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
-         * @method batch
-         * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
-         * @param {Function} method The method to apply to the element(s)
-         * @param {Any} o (optional) An optional arg that is passed to the supplied method
-         * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o"
-         * @return {HTMLElement | Array} The element(s) with the method applied
-         */
-        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) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection)
-                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;
-        },
-
-        /**
-         * Returns the height of the document.
-         * @method getDocumentHeight
-         * @return {Int} The height of the actual document (which includes the body and its margin).
-         */
-        getDocumentHeight: function() {
-            var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight;
-
-            var h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
-            return h;
-        },
-
-        /**
-         * Returns the width of the document.
-         * @method getDocumentWidth
-         * @return {Int} The width of the actual document (which includes the body and its margin).
-         */
-        getDocumentWidth: function() {
-            var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
-            var w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
-            return w;
-        },
-
-        /**
-         * Returns the current height of the viewport.
-         * @method getViewportHeight
-         * @return {Int} The height of the viewable area of the page (excludes scrollbars).
-         */
-        getViewportHeight: function() {
-            var height = self.innerHeight; // Safari, Opera
-            var mode = document.compatMode;
-
-            if ( (mode || isIE) && !isOpera ) { // IE, Gecko
-                height = (mode == 'CSS1Compat') ?
-                        document.documentElement.clientHeight : // Standards
-                        document.body.clientHeight; // Quirks
-            }
-
-            return height;
-        },
-
-        /**
-         * Returns the current width of the viewport.
-         * @method getViewportWidth
-         * @return {Int} The width of the viewable area of the page (excludes scrollbars).
-         */
-
-        getViewportWidth: function() {
-            var width = self.innerWidth;  // Safari
-            var mode = document.compatMode;
-
-            if (mode || isIE) { // IE, Gecko, Opera
-                width = (mode == 'CSS1Compat') ?
-                        document.documentElement.clientWidth : // Standards
-                        document.body.clientWidth; // Quirks
-            }
-            return width;
-        }
-    };
-})();
-/**
- * A region is a representation of an object on a grid.  It is defined
- * by the top, right, bottom, left extents, so is rectangular by default.  If
- * other shapes are required, this class could be extended to support it.
- * @namespace YAHOO.util
- * @class Region
- * @param {Int} t the top extent
- * @param {Int} r the right extent
- * @param {Int} b the bottom extent
- * @param {Int} l the left extent
- * @constructor
- */
-YAHOO.util.Region = function(t, r, b, l) {
-
-    /**
-     * The region's top extent
-     * @property top
-     * @type Int
-     */
-    this.top = t;
-
-    /**
-     * The region's top extent as index, for symmetry with set/getXY
-     * @property 1
-     * @type Int
-     */
-    this[1] = t;
-
-    /**
-     * The region's right extent
-     * @property right
-     * @type int
-     */
-    this.right = r;
-
-    /**
-     * The region's bottom extent
-     * @property bottom
-     * @type Int
-     */
-    this.bottom = b;
-
-    /**
-     * The region's left extent
-     * @property left
-     * @type Int
-     */
-    this.left = l;
-
-    /**
-     * The region's left extent as index, for symmetry with set/getXY
-     * @property 0
-     * @type Int
-     */
-    this[0] = l;
-};
-
-/**
- * Returns true if this region contains the region passed in
- * @method contains
- * @param  {Region}  region The region to evaluate
- * @return {Boolean}        True if the region is contained with this region,
- *                          else false
- */
-YAHOO.util.Region.prototype.contains = function(region) {
-    return ( region.left   >= this.left   &&
-             region.right  <= this.right  &&
-             region.top    >= this.top    &&
-             region.bottom <= this.bottom    );
-
-};
-
-/**
- * Returns the area of the region
- * @method getArea
- * @return {Int} the region's area
- */
-YAHOO.util.Region.prototype.getArea = function() {
-    return ( (this.bottom - this.top) * (this.right - this.left) );
-};
-
-/**
- * Returns the region where the passed in region overlaps with this one
- * @method intersect
- * @param  {Region} region The region that intersects
- * @return {Region}        The overlap region, or null if there is no overlap
- */
-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;
-    }
-};
-
-/**
- * Returns the region representing the smallest region that can contain both
- * the passed in region and this region.
- * @method union
- * @param  {Region} region The region that to create the union with
- * @return {Region}        The union region
- */
-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);
-};
-
-/**
- * toString
- * @method toString
- * @return string the region properties
- */
-YAHOO.util.Region.prototype.toString = function() {
-    return ( "Region {"    +
-             "top: "       + this.top    +
-             ", right: "   + this.right  +
-             ", bottom: "  + this.bottom +
-             ", left: "    + this.left   +
-             "}" );
-};
-
-/**
- * Returns a region that is occupied by the DOM element
- * @method getRegion
- * @param  {HTMLElement} el The element
- * @return {Region}         The region that the element occupies
- * @static
- */
-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);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-/**
- * A point is a region that is special in that it represents a single point on
- * the grid.
- * @namespace YAHOO.util
- * @class Point
- * @param {Int} x The X position of the point
- * @param {Int} y The Y position of the point
- * @constructor
- * @extends YAHOO.util.Region
- */
-YAHOO.util.Point = function(x, y) {
-   if (x instanceof Array) { // accept output from Dom.getXY
-      y = x[1];
-      x = x[0];
-   }
-
-    /**
-     * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
-     * @property x
-     * @type Int
-     */
-
-    this.x = this.right = this.left = this[0] = x;
-
-    /**
-     * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
-     * @property y
-     * @type Int
-     */
-    this.y = this.top = this.bottom = this[1] = y;
-};
-
-YAHOO.util.Point.prototype = new YAHOO.util.Region();
-
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+*/
+
+/**
+ * The dom module provides helper methods for manipulating Dom elements.
+ * @module dom
+ *
+ */
+
+(function() {
+    var Y = YAHOO.util,     // internal shorthand
+        getStyle,           // for load time browser branching
+        setStyle,           // ditto
+        id_counter = 0,     // for use with generateId
+        propertyCache = {}; // for faster hyphen converts
+    
+    // brower detection
+    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); 
+    
+    // regex cache
+    var patterns = {
+        HYPHEN: /(-[a-z])/i, // to normalize get/setStyle
+        ROOT_TAG: /body|html/i // body for quirks mode, html for standards
+    };
+
+    var toCamel = function(property) {
+        if ( !patterns.HYPHEN.test(property) ) {
+            return property; // no hyphens
+        }
+        
+        if (propertyCache[property]) { // already converted
+            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;
+        //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
+    };
+    
+    // branching at load instead of runtime
+    if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method
+        getStyle = function(el, property) {
+            var value = null;
+            
+            if (property == 'float') { // fix reserved word
+                property = 'cssFloat';
+            }
+
+            var computed = document.defaultView.getComputedStyle(el, '');
+            if (computed) { // test computed before touching for safari
+                value = computed[toCamel(property)];
+            }
+            
+            return el.style[property] || value;
+        };
+    } else if (document.documentElement.currentStyle && isIE) { // IE method
+        getStyle = function(el, property) {                         
+            switch( toCamel(property) ) {
+                case 'opacity' :// IE opacity uses filter
+                    var val = 100;
+                    try { // will error if no DXImageTransform
+                        val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
+
+                    } catch(e) {
+                        try { // make sure its in the document
+                            val = el.filters('alpha').opacity;
+                        } catch(e) {
+                        }
+                    }
+                    return val / 100;
+                    break;
+                case 'float': // fix reserved word
+                    property = 'styleFloat'; // fall through
+                default: 
+                    // test currentStyle before touching
+                    var value = el.currentStyle ? el.currentStyle[property] : null;
+                    return ( el.style[property] || value );
+            }
+        };
+    } else { // default to inline only
+        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) ) { // in case not appended
+                        el.style.filter = 'alpha(opacity=' + val * 100 + ')';
+                        
+                        if (!el.currentStyle || !el.currentStyle.hasLayout) {
+                            el.style.zoom = 1; // when no layout or cant tell
+                        }
+                    }
+                    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;
+        };
+    }
+    
+    /**
+     * Provides helper methods for DOM elements.
+     * @namespace YAHOO.util
+     * @class Dom
+     */
+    YAHOO.util.Dom = {
+        /**
+         * Returns an HTMLElement reference.
+         * @method get
+         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
+         */
+        get: function(el) {
+            if ( YAHOO.lang.isString(el) ) { // ID 
+                return document.getElementById(el);
+            }
+            
+            if ( YAHOO.lang.isArray(el) ) { // Array of IDs and/or HTMLElements
+                var c = [];
+                for (var i = 0, len = el.length; i < len; ++i) {
+                    c[c.length] = Y.Dom.get(el[i]);
+                }
+                
+                return c;
+            }
+
+            if (el) { // assuming HTMLElement or HTMLCollection, just pass back 
+                return el;
+            }
+
+            return null; // el is likely null or undefined 
+        },
+    
+        /**
+         * Normalizes currentStyle and ComputedStyle.
+         * @method getStyle
+         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @param {String} property The style property whose value is returned.
+         * @return {String | Array} The current value of the style property for the element(s).
+         */
+        getStyle: function(el, property) {
+            property = toCamel(property);
+            
+            var f = function(element) {
+                return getStyle(element, property);
+            };
+            
+            return Y.Dom.batch(el, f, Y.Dom, true);
+        },
+    
+        /**
+         * Wrapper for setting style properties of HTMLElements.  Normalizes "opacity" across modern browsers.
+         * @method setStyle
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @param {String} property The style property to be set.
+         * @param {String} val The value to apply to the given property.
+         */
+        setStyle: function(el, property, val) {
+            property = toCamel(property);
+            
+            var f = function(element) {
+                setStyle(element, property, val);
+                
+            };
+            
+            Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Gets the current position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method getXY
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+         * @return {Array} The XY position of the element(s)
+         */
+        getXY: function(el) {
+            var f = function(el) {
+    
+            // has to be part of document to have pageXY
+                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) { // IE
+                    box = el.getBoundingClientRect();
+                    var doc = document;
+                    if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll
+                        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 { // safari, opera, & gecko
+                    pos = [el.offsetLeft, el.offsetTop];
+                    parentNode = el.offsetParent;
+
+                    // safari: if el is abs or any parent is abs, subtract body offsets
+                    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; // we need to offset if any parent is absolutely positioned
+                            }
+                            parentNode = parentNode.offsetParent;
+                        }
+                    }
+
+                    if (isSafari && hasAbs) { //safari doubles in this case
+                        pos[0] -= document.body.offsetLeft;
+                        pos[1] -= document.body.offsetTop;
+                    } 
+                }
+                
+                parentNode = el.parentNode;
+
+                // account for any scrolled ancestors
+                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
+                {
+                   // work around opera inline scrollLeft/Top bug
+                   if (isOpera && 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);
+        },
+        
+        /**
+         * Gets the current X position of an element based on page coordinates.  The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method getX
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+         * @return {String | Array} The X position of the element(s)
+         */
+        getX: function(el) {
+            var f = function(el) {
+                return Y.Dom.getXY(el)[0];
+            };
+            
+            return Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Gets the current Y position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method getY
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+         * @return {String | Array} The Y position of the element(s)
+         */
+        getY: function(el) {
+            var f = function(el) {
+                return Y.Dom.getXY(el)[1];
+            };
+            
+            return Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Set the position of an html element in page coordinates, regardless of how the element is positioned.
+         * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method setXY
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+         * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
+         * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
+         */
+        setXY: function(el, pos, noRetry) {
+            var f = function(el) {
+                var style_pos = this.getStyle(el, 'position');
+                if (style_pos == 'static') { // default to relative
+                    this.setStyle(el, 'position', 'relative');
+                    style_pos = 'relative';
+                }
+
+                var pageXY = this.getXY(el);
+                if (pageXY === false) { // has to be part of doc to have pageXY
+                    return false; 
+                }
+                
+                var delta = [ // assuming pixels; if not we will have to retry
+                    parseInt( this.getStyle(el, 'left'), 10 ),
+                    parseInt( this.getStyle(el, 'top'), 10 )
+                ];
+            
+                if ( isNaN(delta[0]) ) {// in case of 'auto'
+                    delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
+                } 
+                if ( isNaN(delta[1]) ) { // in case of 'auto'
+                    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 retry is true, try one more time if we miss 
+                   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);
+        },
+        
+        /**
+         * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
+         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method setX
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @param {Int} x The value to use as the X coordinate for the element(s).
+         */
+        setX: function(el, x) {
+            Y.Dom.setXY(el, [x, null]);
+        },
+        
+        /**
+         * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
+         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+         * @method setY
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @param {Int} x To use as the Y coordinate for the element(s).
+         */
+        setY: function(el, y) {
+            Y.Dom.setXY(el, [null, y]);
+        },
+        
+        /**
+         * Returns the region position of the given element.
+         * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+         * @method getRegion
+         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+         * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
+         */
+        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);
+        },
+        
+        /**
+         * Returns the width of the client (viewport).
+         * @method getClientWidth
+         * @deprecated Now using getViewportWidth.  This interface left intact for back compat.
+         * @return {Int} The width of the viewable area of the page.
+         */
+        getClientWidth: function() {
+            return Y.Dom.getViewportWidth();
+        },
+        
+        /**
+         * Returns the height of the client (viewport).
+         * @method getClientHeight
+         * @deprecated Now using getViewportHeight.  This interface left intact for back compat.
+         * @return {Int} The height of the viewable area of the page.
+         */
+        getClientHeight: function() {
+            return Y.Dom.getViewportHeight();
+        },
+
+        /**
+         * Returns a array of HTMLElements with the given class.
+         * For optimized performance, include a tag and/or root node when possible.
+         * @method getElementsByClassName
+         * @param {String} className The class name to match against
+         * @param {String} tag (optional) The tag name of the elements being collected
+         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point 
+         * @return {Array} An array of elements that have the given class name
+         */
+        getElementsByClassName: function(className, tag, root) {
+            var method = function(el) { return Y.Dom.hasClass(el, className); };
+            return Y.Dom.getElementsBy(method, tag, root);
+        },
+
+        /**
+         * Determines whether an HTMLElement has the given className.
+         * @method hasClass
+         * @param {String | HTMLElement | Array} el The element or collection to test
+         * @param {String} className the class name to search for
+         * @return {Boolean | Array} A boolean value or array of boolean values
+         */
+        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);
+        },
+    
+        /**
+         * Adds a class name to a given element or collection of elements.
+         * @method addClass         
+         * @param {String | HTMLElement | Array} el The element or collection to add the class to
+         * @param {String} className the class name to add to the class attribute
+         */
+        addClass: function(el, className) {
+            var f = function(el) {
+                if (this.hasClass(el, className)) { return; } // already present
+                
+                
+                el.className = [el.className, className].join(' ');
+            };
+            
+            Y.Dom.batch(el, f, Y.Dom, true);
+        },
+    
+        /**
+         * Removes a class name from a given element or collection of elements.
+         * @method removeClass         
+         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
+         * @param {String} className the class name to remove from the class attribute
+         */
+        removeClass: function(el, className) {
+            var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g');
+
+            var f = function(el) {
+                if (!this.hasClass(el, className)) {
+                    return; // not present
+                }                 
+
+                
+                var c = el.className;
+                el.className = c.replace(re, ' ');
+                if ( this.hasClass(el, className) ) { // in case of multiple adjacent
+                    this.removeClass(el, className);
+                }
+                
+            };
+            
+            Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Replace a class with another class for a given element or collection of elements.
+         * If no oldClassName is present, the newClassName is simply added.
+         * @method replaceClass  
+         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
+         * @param {String} oldClassName the class name to be replaced
+         * @param {String} newClassName the class name that will be replacing the old class name
+         */
+        replaceClass: function(el, oldClassName, newClassName) {
+            if (oldClassName === newClassName) { // avoid infinite loop
+                return false;
+            }
+            
+            var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g');
+
+            var f = function(el) {
+            
+                if ( !this.hasClass(el, oldClassName) ) {
+                    this.addClass(el, newClassName); // just add it if nothing to replace
+                    return; // note return
+                }
+            
+                el.className = el.className.replace(re, ' ' + newClassName + ' ');
+
+                if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
+                    this.replaceClass(el, oldClassName, newClassName);
+                }
+            };
+            
+            Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Generates a unique ID
+         * @method generateId  
+         * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
+         * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
+         * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
+         */
+        generateId: function(el, prefix) {
+            prefix = prefix || 'yui-gen';
+            el = el || {};
+            
+            var f = function(el) {
+                if (el) {
+                    el = Y.Dom.get(el);
+                } else {
+                    el = {}; // just generating ID in this case
+                }
+                
+                if (!el.id) {
+                    el.id = prefix + id_counter++; 
+                } // dont override existing
+                
+                
+                return el.id;
+            };
+            
+            return Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
+         * @method isAncestor
+         * @param {String | HTMLElement} haystack The possible ancestor
+         * @param {String | HTMLElement} needle The possible descendent
+         * @return {Boolean} Whether or not the haystack is an ancestor of needle
+         */
+        isAncestor: function(haystack, needle) {
+            haystack = Y.Dom.get(haystack);
+            if (!haystack || !needle) { return false; }
+            
+            var f = function(needle) {
+                if (haystack.contains && !isSafari) { // safari "contains" is broken
+                    return haystack.contains(needle);
+                }
+                else if ( haystack.compareDocumentPosition ) {
+                    return !!(haystack.compareDocumentPosition(needle) & 16);
+                }
+                else { // loop up and test each parent
+                    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);      
+        },
+        
+        /**
+         * Determines whether an HTMLElement is present in the current document.
+         * @method inDocument         
+         * @param {String | HTMLElement} el The element to search for
+         * @return {Boolean} Whether or not the element is present in the current document
+         */
+        inDocument: function(el) {
+            var f = function(el) {
+                return this.isAncestor(document.documentElement, el);
+            };
+            
+            return Y.Dom.batch(el, f, Y.Dom, true);
+        },
+        
+        /**
+         * Returns a array of HTMLElements that pass the test applied by supplied boolean method.
+         * For optimized performance, include a tag and/or root node when possible.
+         * @method getElementsBy
+         * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
+
+         * @param {String} tag (optional) The tag name of the elements being collected
+         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point 
+         * @return {Array} Array of HTMLElements
+         */
+        getElementsBy: function(method, tag, root) {
+            tag = tag || '*';
+            
+            var nodes = [];
+            
+            if (root) {
+                root = Y.Dom.get(root);
+                if (!root) { // if no root node, then no children
+                    return nodes;
+                }
+            } else {
+                root = document;
+            }
+            
+            var elements = root.getElementsByTagName(tag);
+            
+            if ( !elements.length && (tag == '*' && root.all) ) {
+                elements = root.all; // IE < 6
+            }
+            
+            for (var i = 0, len = elements.length; i < len; ++i) {
+                if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; }
+            }
+
+            
+            return nodes;
+        },
+        
+        /**
+         * Returns an array of elements that have had the supplied method applied.
+         * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
+         * @method batch
+         * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
+         * @param {Function} method The method to apply to the element(s)
+         * @param {Any} o (optional) An optional arg that is passed to the supplied method
+         * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o"
+         * @return {HTMLElement | Array} The element(s) with the method applied
+         */
+        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) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection)
+                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;
+        },
+        
+        /**
+         * Returns the height of the document.
+         * @method getDocumentHeight
+         * @return {Int} The height of the actual document (which includes the body and its margin).
+         */
+        getDocumentHeight: function() {
+            var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight;
+
+            var h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
+            return h;
+        },
+        
+        /**
+         * Returns the width of the document.
+         * @method getDocumentWidth
+         * @return {Int} The width of the actual document (which includes the body and its margin).
+         */
+        getDocumentWidth: function() {
+            var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
+            var w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
+            return w;
+        },
+
+        /**
+         * Returns the current height of the viewport.
+         * @method getViewportHeight
+         * @return {Int} The height of the viewable area of the page (excludes scrollbars).
+         */
+        getViewportHeight: function() {
+            var height = self.innerHeight; // Safari, Opera
+            var mode = document.compatMode;
+        
+            if ( (mode || isIE) && !isOpera ) { // IE, Gecko
+                height = (mode == 'CSS1Compat') ?
+                        document.documentElement.clientHeight : // Standards
+                        document.body.clientHeight; // Quirks
+            }
+        
+            return height;
+        },
+        
+        /**
+         * Returns the current width of the viewport.
+         * @method getViewportWidth
+         * @return {Int} The width of the viewable area of the page (excludes scrollbars).
+         */
+        
+        getViewportWidth: function() {
+            var width = self.innerWidth;  // Safari
+            var mode = document.compatMode;
+            
+            if (mode || isIE) { // IE, Gecko, Opera
+                width = (mode == 'CSS1Compat') ?
+                        document.documentElement.clientWidth : // Standards
+                        document.body.clientWidth; // Quirks
+            }
+            return width;
+        }
+    };
+})();
+/**
+ * A region is a representation of an object on a grid.  It is defined
+ * by the top, right, bottom, left extents, so is rectangular by default.  If 
+ * other shapes are required, this class could be extended to support it.
+ * @namespace YAHOO.util
+ * @class Region
+ * @param {Int} t the top extent
+ * @param {Int} r the right extent
+ * @param {Int} b the bottom extent
+ * @param {Int} l the left extent
+ * @constructor
+ */
+YAHOO.util.Region = function(t, r, b, l) {
+
+    /**
+     * The region's top extent
+     * @property top
+     * @type Int
+     */
+    this.top = t;
+    
+    /**
+     * The region's top extent as index, for symmetry with set/getXY
+     * @property 1
+     * @type Int
+     */
+    this[1] = t;
+
+    /**
+     * The region's right extent
+     * @property right
+     * @type int
+     */
+    this.right = r;
+
+    /**
+     * The region's bottom extent
+     * @property bottom
+     * @type Int
+     */
+    this.bottom = b;
+
+    /**
+     * The region's left extent
+     * @property left
+     * @type Int
+     */
+    this.left = l;
+    
+    /**
+     * The region's left extent as index, for symmetry with set/getXY
+     * @property 0
+     * @type Int
+     */
+    this[0] = l;
+};
+
+/**
+ * Returns true if this region contains the region passed in
+ * @method contains
+ * @param  {Region}  region The region to evaluate
+ * @return {Boolean}        True if the region is contained with this region, 
+ *                          else false
+ */
+YAHOO.util.Region.prototype.contains = function(region) {
+    return ( region.left   >= this.left   && 
+             region.right  <= this.right  && 
+             region.top    >= this.top    && 
+             region.bottom <= this.bottom    );
+
+};
+
+/**
+ * Returns the area of the region
+ * @method getArea
+ * @return {Int} the region's area
+ */
+YAHOO.util.Region.prototype.getArea = function() {
+    return ( (this.bottom - this.top) * (this.right - this.left) );
+};
+
+/**
+ * Returns the region where the passed in region overlaps with this one
+ * @method intersect
+ * @param  {Region} region The region that intersects
+ * @return {Region}        The overlap region, or null if there is no overlap
+ */
+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;
+    }
+};
+
+/**
+ * Returns the region representing the smallest region that can contain both
+ * the passed in region and this region.
+ * @method union
+ * @param  {Region} region The region that to create the union with
+ * @return {Region}        The union region
+ */
+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);
+};
+
+/**
+ * toString
+ * @method toString
+ * @return string the region properties
+ */
+YAHOO.util.Region.prototype.toString = function() {
+    return ( "Region {"    +
+             "top: "       + this.top    + 
+             ", right: "   + this.right  + 
+             ", bottom: "  + this.bottom + 
+             ", left: "    + this.left   + 
+             "}" );
+};
+
+/**
+ * Returns a region that is occupied by the DOM element
+ * @method getRegion
+ * @param  {HTMLElement} el The element
+ * @return {Region}         The region that the element occupies
+ * @static
+ */
+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);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+/**
+ * A point is a region that is special in that it represents a single point on 
+ * the grid.
+ * @namespace YAHOO.util
+ * @class Point
+ * @param {Int} x The X position of the point
+ * @param {Int} y The Y position of the point
+ * @constructor
+ * @extends YAHOO.util.Region
+ */
+YAHOO.util.Point = function(x, y) {
+   if (x instanceof Array) { // accept output from Dom.getXY
+      y = x[1];
+      x = x[0];
+   }
+   
+    /**
+     * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
+     * @property x
+     * @type Int
+     */
+
+    this.x = this.right = this.left = this[0] = x;
+     
+    /**
+     * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
+     * @property y
+     * @type Int
+     */
+    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.1", build: "193"});

Added: jifty/trunk/share/web/static/js/yui/element-beta.js
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/js/yui/element-beta.js	Thu Apr 12 03:32:44 2007
@@ -0,0 +1,913 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+ * Provides Attribute configurations.
+ * @namespace YAHOO.util
+ * @class Attribute
+ * @constructor
+ * @param hash {Object} The intial Attribute.
+ * @param {YAHOO.util.AttributeProvider} The owner of the Attribute instance.
+ */
+
+YAHOO.util.Attribute = function(hash, owner) {
+    if (owner) { 
+        this.owner = owner;
+        this.configure(hash, true);
+    }
+};
+
+YAHOO.util.Attribute.prototype = {
+	/**
+     * The name of the attribute.
+	 * @property name
+	 * @type String
+	 */
+    name: undefined,
+    
+	/**
+     * The value of the attribute.
+	 * @property value
+	 * @type String
+	 */
+    value: null,
+    
+	/**
+     * The owner of the attribute.
+	 * @property owner
+	 * @type YAHOO.util.AttributeProvider
+	 */
+    owner: null,
+    
+	/**
+     * Whether or not the attribute is read only.
+	 * @property readOnly
+	 * @type Boolean
+	 */
+    readOnly: false,
+    
+	/**
+     * Whether or not the attribute can only be written once.
+	 * @property writeOnce
+	 * @type Boolean
+	 */
+    writeOnce: false,
+
+	/**
+     * The attribute's initial configuration.
+     * @private
+	 * @property _initialConfig
+	 * @type Object
+	 */
+    _initialConfig: null,
+    
+	/**
+     * Whether or not the attribute's value has been set.
+     * @private
+	 * @property _written
+	 * @type Boolean
+	 */
+    _written: false,
+    
+	/**
+     * The method to use when setting the attribute's value.
+     * The method recieves the new value as the only argument.
+	 * @property method
+	 * @type Function
+	 */
+    method: null,
+    
+	/**
+     * The validator to use when setting the attribute's value.
+	 * @property validator
+	 * @type Function
+     * @return Boolean
+	 */
+    validator: null,
+    
+    /**
+     * Retrieves the current value of the attribute.
+     * @method getValue
+     * @return {any} The current value of the attribute.
+     */
+    getValue: function() {
+        return this.value;
+    },
+    
+    /**
+     * Sets the value of the attribute and fires beforeChange and change events.
+     * @method setValue
+     * @param {Any} value The value to apply to the attribute.
+     * @param {Boolean} silent If true the change events will not be fired.
+     * @return {Boolean} Whether or not the value was set.
+     */
+    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; // write not allowed
+        }
+        
+        if (this.validator && !this.validator.call(owner, value) ) {
+            return false; // invalid value
+        }
+
+        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;
+    },
+    
+    /**
+     * Allows for configuring the Attribute's properties.
+     * @method configure
+     * @param {Object} map A key-value map of Attribute properties.
+     * @param {Boolean} init Whether or not this should become the initial config.
+     */
+    configure: function(map, init) {
+        map = map || {};
+        this._written = false; // reset writeOnce
+        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];
+                }
+            }
+        }
+    },
+    
+    /**
+     * Resets the value to the initial config value.
+     * @method resetValue
+     * @return {Boolean} Whether or not the value was set.
+     */
+    resetValue: function() {
+        return this.setValue(this._initialConfig.value);
+    },
+    
+    /**
+     * Resets the attribute config to the initial config state.
+     * @method resetConfig
+     */
+    resetConfig: function() {
+        this.configure(this._initialConfig);
+    },
+    
+    /**
+     * Resets the value to the current value.
+     * Useful when values may have gotten out of sync with actual properties.
+     * @method refresh
+     * @return {Boolean} Whether or not the value was set.
+     */
+    refresh: function(silent) {
+        this.setValue(this.value, silent);
+    }
+};
+
+(function() {
+    var Lang = YAHOO.util.Lang;
+
+    /*
+    Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+    Code licensed under the BSD License:
+    http://developer.yahoo.net/yui/license.txt
+    */
+    
+    /**
+     * Provides and manages YAHOO.util.Attribute instances
+     * @namespace YAHOO.util
+     * @class AttributeProvider
+     * @uses YAHOO.util.EventProvider
+     */
+    YAHOO.util.AttributeProvider = function() {};
+    
+    YAHOO.util.AttributeProvider.prototype = {
+        
+        /**
+         * A key-value map of Attribute configurations
+         * @property _configs
+         * @protected (may be used by subclasses and augmentors)
+         * @private
+         * @type {Object}
+         */
+        _configs: null,
+        /**
+         * Returns the current value of the attribute.
+         * @method get
+         * @param {String} key The attribute whose value will be returned.
+         */
+        get: function(key){
+            var configs = this._configs || {};
+            var config = configs[key];
+            
+            if (!config) {
+                return undefined;
+            }
+            
+            return config.value;
+        },
+        
+        /**
+         * Sets the value of a config.
+         * @method set
+         * @param {String} key The name of the attribute
+         * @param {Any} value The value to apply to the attribute
+         * @param {Boolean} silent Whether or not to suppress change events
+         * @return {Boolean} Whether or not the value was set.
+         */
+        set: function(key, value, silent){
+            var configs = this._configs || {};
+            var config = configs[key];
+            
+            if (!config) {
+                return false;
+            }
+            
+            return config.setValue(value, silent);
+        },
+    
+        /**
+         * Returns an array of attribute names.
+         * @method getAttributeKeys
+         * @return {Array} An array of attribute names.
+         */
+        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;
+        },
+        
+        /**
+         * Sets multiple attribute values.
+         * @method setAttributes
+         * @param {Object} map  A key-value map of attributes
+         * @param {Boolean} silent Whether or not to suppress change events
+         */
+        setAttributes: function(map, silent){
+            for (var key in map) {
+                if ( Lang.hasOwnProperty(map, key) ) {
+                    this.set(key, map[key], silent);
+                }
+            }
+        },
+    
+        /**
+         * Resets the specified attribute's value to its initial value.
+         * @method resetValue
+         * @param {String} key The name of the attribute
+         * @param {Boolean} silent Whether or not to suppress change events
+         * @return {Boolean} Whether or not the value was set
+         */
+        resetValue: function(key, silent){
+            var configs = this._configs || {};
+            if (configs[key]) {
+                this.set(key, configs[key]._initialConfig.value, silent);
+                return true;
+            }
+            return false;
+        },
+    
+        /**
+         * Sets the attribute's value to its current value.
+         * @method refresh
+         * @param {String | Array} key The attribute(s) to refresh
+         * @param {Boolean} silent Whether or not to suppress change events
+         */
+        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 ( // only set if there is a value and not null
+                    configs[key[i]] && 
+                    ! Lang.isUndefined(configs[key[i]].value) &&
+                    ! Lang.isNull(configs[key[i]].value) ) {
+                    configs[key[i]].refresh(silent);
+                }
+            }
+        },
+    
+        /**
+         * Adds an Attribute to the AttributeProvider instance. 
+         * @method register
+         * @param {String} key The attribute's name
+         * @param {Object} map A key-value map containing the
+         * attribute's properties.
+         * @deprecated Use setAttributeConfig
+         */
+        register: function(key, map) {
+            this.setAttributeConfig(key, map);
+        },
+        
+        
+        /**
+         * Returns the attribute's properties.
+         * @method getAttributeConfig
+         * @param {String} key The attribute's name
+         * @private
+         * @return {object} A key-value map containing all of the
+         * attribute's properties.
+         */
+        getAttributeConfig: function(key) {
+            var configs = this._configs || {};
+            var config = configs[key] || {};
+            var map = {}; // returning a copy to prevent overrides
+            
+            for (key in config) {
+                if ( Lang.hasOwnProperty(config, key) ) {
+                    map[key] = config[key];
+                }
+            }
+    
+            return map;
+        },
+        
+        /**
+         * Sets or updates an Attribute instance's properties. 
+         * @method setAttributeConfig
+         * @param {String} key The attribute's name.
+         * @param {Object} map A key-value map of attribute properties
+         * @param {Boolean} init Whether or not this should become the intial config.
+         */
+        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);
+            }
+        },
+        
+        /**
+         * Sets or updates an Attribute instance's properties. 
+         * @method configureAttribute
+         * @param {String} key The attribute's name.
+         * @param {Object} map A key-value map of attribute properties
+         * @param {Boolean} init Whether or not this should become the intial config.
+         * @deprecated Use setAttributeConfig
+         */
+        configureAttribute: function(key, map, init) {
+            this.setAttributeConfig(key, map, init);
+        },
+        
+        /**
+         * Resets an attribute to its intial configuration. 
+         * @method resetAttributeConfig
+         * @param {String} key The attribute's name.
+         * @private
+         */
+        resetAttributeConfig: function(key){
+            var configs = this._configs || {};
+            configs[key].resetConfig();
+        },
+        
+        /**
+         * Fires the attribute's beforeChange event. 
+         * @method fireBeforeChangeEvent
+         * @param {String} key The attribute's name.
+         * @param {Obj} e The event object to pass to handlers.
+         */
+        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);
+        },
+        
+        /**
+         * Fires the attribute's change event. 
+         * @method fireChangeEvent
+         * @param {String} key The attribute's name.
+         * @param {Obj} e The event object to pass to the handlers.
+         */
+        fireChangeEvent: function(e) {
+            e.type += 'Change';
+            return this.fireEvent(e.type, e);
+        }
+    };
+    
+    YAHOO.augment(YAHOO.util.AttributeProvider, YAHOO.util.EventProvider);
+})();
+
+(function() {
+// internal shorthand
+var Dom = YAHOO.util.Dom,
+    AttributeProvider = YAHOO.util.AttributeProvider;
+
+/**
+ * Element provides an wrapper object to simplify adding
+ * event listeners, using dom methods, and managing attributes. 
+ * @module element
+ * @namespace YAHOO.util
+ * @requires yahoo, dom, event
+ * @beta
+ */
+
+/**
+ * Element provides an wrapper object to simplify adding
+ * event listeners, using dom methods, and managing attributes. 
+ * @class Element
+ * @uses YAHOO.util.AttributeProvider
+ * @constructor
+ * @param el {HTMLElement | String} The html element that 
+ * represents the Element.
+ * @param {Object} map A key-value map of initial config names and values
+ */
+YAHOO.util.Element = function(el, map) {
+    if (arguments.length) {
+        this.init(el, map);
+    }
+};
+
+YAHOO.util.Element.prototype = {
+    /**
+     * Dom events supported by the Element instance.
+     * @property DOM_EVENTS
+     * @type Object
+     */
+    DOM_EVENTS: null,
+
+    /**
+     * Wrapper for HTMLElement method.
+     * @method appendChild
+     * @param {Boolean} deep Whether or not to do a deep clone
+     */
+    appendChild: function(child) {
+        child = child.get ? child.get('element') : child;
+        this.get('element').appendChild(child);
+    },
+    
+    /**
+     * Wrapper for HTMLElement method.
+     * @method getElementsByTagName
+     * @param {String} tag The tagName to collect
+     */
+    getElementsByTagName: function(tag) {
+        return this.get('element').getElementsByTagName(tag);
+    },
+    
+    /**
+     * Wrapper for HTMLElement method.
+     * @method hasChildNodes
+     * @return {Boolean} Whether or not the element has childNodes
+     */
+    hasChildNodes: function() {
+        return this.get('element').hasChildNodes();
+    },
+    
+    /**
+     * Wrapper for HTMLElement method.
+     * @method insertBefore
+     * @param {HTMLElement} element The HTMLElement to insert
+     * @param {HTMLElement} before The HTMLElement to insert
+     * the element before.
+     */
+    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);
+    },
+    
+    /**
+     * Wrapper for HTMLElement method.
+     * @method removeChild
+     * @param {HTMLElement} child The HTMLElement to remove
+     */
+    removeChild: function(child) {
+        child = child.get ? child.get('element') : child;
+        this.get('element').removeChild(child);
+        return true;
+    },
+    
+    /**
+     * Wrapper for HTMLElement method.
+     * @method replaceChild
+     * @param {HTMLElement} newNode The HTMLElement to insert
+     * @param {HTMLElement} oldNode The HTMLElement to replace
+     */
+    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);
+    },
+
+    
+    /**
+     * Registers Element specific attributes.
+     * @method initAttributes
+     * @param {Object} map A key-value map of initial attribute configs
+     */
+    initAttributes: function(map) {
+    },
+
+    /**
+     * Adds a listener for the given event.  These may be DOM or 
+     * customEvent listeners.  Any event that is fired via fireEvent
+     * can be listened for.  All handlers receive an event object. 
+     * @method addListener
+     * @param {String} type The name of the event to listen for
+     * @param {Function} fn The handler to call when the event fires
+     * @param {Any} obj A variable to pass to the handler
+     * @param {Object} scope The object to use for the scope of the handler 
+     */
+    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]) { // create on the fly
+            if ( this.DOM_EVENTS[type] ) {
+                YAHOO.util.Event.addListener(el, type, function(e) {
+                    if (e.srcElement && !e.target) { // supplement IE with target
+                        e.target = e.srcElement;
+                    }
+                    self.fireEvent(type, e);
+                }, obj, scope);
+            }
+            
+            this.createEvent(type, this);
+            this._events[type] = true;
+        }
+        
+        this.subscribe.apply(this, arguments); // notify via customEvent
+    },
+    
+    
+    /**
+     * Alias for addListener
+     * @method on
+     * @param {String} type The name of the event to listen for
+     * @param {Function} fn The function call when the event fires
+     * @param {Any} obj A variable to pass to the handler
+     * @param {Object} scope The object to use for the scope of the handler 
+     */
+    on: function() { this.addListener.apply(this, arguments); },
+    
+    
+    /**
+     * Remove an event listener
+     * @method removeListener
+     * @param {String} type The name of the event to listen for
+     * @param {Function} fn The function call when the event fires
+     */
+    removeListener: function(type, fn) {
+        this.unsubscribe.apply(this, arguments);
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method addClass
+     * @param {String} className The className to add
+     */
+    addClass: function(className) {
+        Dom.addClass(this.get('element'), className);
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method getElementsByClassName
+     * @param {String} className The className to collect
+     * @param {String} tag (optional) The tag to use in
+     * conjunction with class name
+     * @return {Array} Array of HTMLElements
+     */
+    getElementsByClassName: function(className, tag) {
+        return Dom.getElementsByClassName(className, tag,
+                this.get('element') );
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method hasClass
+     * @param {String} className The className to add
+     * @return {Boolean} Whether or not the element has the class name
+     */
+    hasClass: function(className) {
+        return Dom.hasClass(this.get('element'), className); 
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method removeClass
+     * @param {String} className The className to remove
+     */
+    removeClass: function(className) {
+        return Dom.removeClass(this.get('element'), className);
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method replaceClass
+     * @param {String} oldClassName The className to replace
+     * @param {String} newClassName The className to add
+     */
+    replaceClass: function(oldClassName, newClassName) {
+        return Dom.replaceClass(this.get('element'), 
+                oldClassName, newClassName);
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method setStyle
+     * @param {String} property The style property to set
+     * @param {String} value The value to apply to the style property
+     */
+    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); // TODO: always queuing?
+    },
+    
+    /**
+     * Wrapper for Dom method.
+     * @method getStyle
+     * @param {String} property The style property to retrieve
+     * @return {String} The current value of the property
+     */
+    getStyle: function(property) {
+        return Dom.getStyle(this.get('element'),  property);
+    },
+    
+    /**
+     * Apply any queued set calls.
+     * @method fireQueue
+     */
+    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]);
+        }
+    },
+    
+    /**
+     * Appends the HTMLElement into either the supplied parentNode.
+     * @method appendTo
+     * @param {HTMLElement | Element} parentNode The node to append to
+     * @param {HTMLElement | Element} before An optional node to insert before
+     */
+    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; // avoid loop due to '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; // so "get" works while queueing
+            
+            }
+            return;
+        }
+        
+        // set it on the element if not configured and is an HTML attribute
+        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);
+        
+        //add any unconfigured element keys
+        for (var key in el) {
+            if (!this._configs[key]) {
+                keys[key] = keys[key] || el[key];
+            }
+        }
+        
+        return keys;
+    },
+    
+    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
+    };
+
+    if (YAHOO.lang.isString(el) ) { // defer until available/ready
+        _registerHTMLAttr.call(this, 'id', { value: attr.element });
+    }
+
+    if (Dom.get(el)) {
+        _availableHandler.call(this, attr);  
+        _readyHandler.call(this, attr);
+        return; // note return
+    } 
+
+    YAHOO.util.Event.onAvailable(attr.element, function() {
+        _availableHandler.call(this, attr);  
+    }, this, true);
+    
+    YAHOO.util.Event.onContentReady(attr.element, function() {
+        _readyHandler.call(this, attr);
+    }, this, true);
+};
+
+var _availableHandler = function(attr) {
+    attr.element = Dom.get(attr.element);
+
+    /**
+     * The HTMLElement the Element instance refers to.
+     * @config element
+     * @type HTMLElement
+     */
+    this.setAttributeConfig('element', {
+        value: attr.element,
+        readOnly: true
+     });
+
+    this.fireEvent('available', {
+        type: 'available',
+        target: attr.element
+    }); 
+};
+
+var _readyHandler = function(attr) {
+    this.initAttributes(attr);
+    this.setAttributes(attr, true);
+    this.fireQueue();
+
+    this.fireEvent('contentReady', {
+        type: 'contentReady',
+        target: attr.element
+    });
+};
+
+/**
+ * Sets the value of the property and fires beforeChange and change events.
+ * @private
+ * @method _registerHTMLAttr
+ * @param {YAHOO.util.Element} element The Element instance to
+ * register the config to.
+ * @param {String} key The name of the config to register
+ * @param {Object} map A key-value map of the config's params
+ */
+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);
+};
+
+/**
+ * Fires when the Element's HTMLElement can be retrieved by Id.
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> available<br>
+ * <code>&lt;HTMLElement&gt;
+ * target</code> the HTMLElement bound to this Element instance<br>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var target = e.target};<br>
+ * myTabs.addListener('available', handler);</code></p>
+ * @event available
+ */
+ 
+/**
+ * Fires when the Element's HTMLElement subtree is rendered.
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> contentReady<br>
+ * <code>&lt;HTMLElement&gt;
+ * target</code> the HTMLElement bound to this Element instance<br>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var target = e.target};<br>
+ * myTabs.addListener('contentReady', handler);</code></p>
+ * @event contentReady
+ */
+
+
+YAHOO.augment(YAHOO.util.Element, AttributeProvider);
+})();
+
+YAHOO.register("element", YAHOO.util.Element, {version: "2.2.1", build: "193"});

Modified: jifty/trunk/share/web/static/js/yui/event.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/event.js	(original)
+++ jifty/trunk/share/web/static/js/yui/event.js	Thu Apr 12 03:32:44 2007
@@ -1,1771 +1,2183 @@
-/*                                                                                                                                                      
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/ 
-
-/**
- * The CustomEvent class lets you define events for your application
- * that can be subscribed to by one or more independent component.
- *
- * @param {String}  type The type of event, which is passed to the callback
- *                  when the event fires
- * @param {Object}  oScope The context the event will fire from.  "this" will
- *                  refer to this object in the callback.  Default value: 
- *                  the window object.  The listener can override this.
- * @param {boolean} silent pass true to prevent the event from writing to
- *                  the debugsystem
- * @param {int}     signature the signature that the custom event subscriber
- *                  will receive. YAHOO.util.CustomEvent.LIST or 
- *                  YAHOO.util.CustomEvent.FLAT.  The default is
- *                  YAHOO.util.CustomEvent.LIST.
- * @namespace YAHOO.util
- * @class CustomEvent
- * @constructor
- */
-YAHOO.util.CustomEvent = function(type, oScope, silent, signature) {
-
-    /**
-     * The type of event, returned to subscribers when the event fires
-     * @property type
-     * @type string
-     */
-    this.type = type;
-
-    /**
-     * The scope the the event will fire from by default.  Defaults to the window 
-     * obj
-     * @property scope
-     * @type object
-     */
-    this.scope = oScope || window;
-
-    /**
-     * By default all custom events are logged in the debug build, set silent
-     * to true to disable debug outpu for this event.
-     * @property silent
-     * @type boolean
-     */
-    this.silent = silent;
-
-    /**
-     * Custom events support two styles of arguments provided to the event
-     * subscribers.  
-     * <ul>
-     * <li>YAHOO.util.CustomEvent.LIST: 
-     *   <ul>
-     *   <li>param1: event name</li>
-     *   <li>param2: array of arguments sent to fire</li>
-     *   <li>param3: <optional> a custom object supplied by the subscriber</li>
-     *   </ul>
-     * </li>
-     * <li>YAHOO.util.CustomEvent.FLAT
-     *   <ul>
-     *   <li>param1: the first argument passed to fire.  If you need to
-     *           pass multiple parameters, use and array or object literal</li>
-     *   <li>param2: <optional> a custom object supplied by the subscriber</li>
-     *   </ul>
-     * </li>
-     * </ul>
-     *   @property signature
-     *   @type int
-     */
-    this.signature = signature || YAHOO.util.CustomEvent.LIST;
-
-    /**
-     * The subscribers to this event
-     * @property subscribers
-     * @type Subscriber[]
-     */
-    this.subscribers = [];
-
-    if (!this.silent) {
-    }
-
-    var onsubscribeType = "_YUICEOnSubscribe";
-
-    // Only add subscribe events for events that are not generated by 
-    // CustomEvent
-    if (type !== onsubscribeType) {
-
-        /**
-         * Custom events provide a custom event that fires whenever there is
-         * a new subscriber to the event.  This provides an opportunity to
-         * handle the case where there is a non-repeating event that has
-         * already fired has a new subscriber.  
-         *
-         * @event subscribeEvent
-         * @type YAHOO.util.CustomEvent
-         * @param {Function} fn The function to execute
-         * @param {Object}   obj An object to be passed along when the event 
-         *                       fires
-         * @param {boolean|Object}  override If true, the obj passed in becomes 
-         *                                   the execution scope of the listener.
-         *                                   if an object, that object becomes the
-         *                                   the execution scope.
-         */
-        this.subscribeEvent = 
-                new YAHOO.util.CustomEvent(onsubscribeType, this, true);
-
-    } 
-};
-
-/**
- * Subscriber listener sigature constant.  The LIST type returns three
- * parameters: the event type, the array of args passed to fire, and
- * the optional custom object
- * @property YAHOO.util.CustomEvent.LIST
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.LIST = 0;
-
-/**
- * Subscriber listener sigature constant.  The FLAT type returns two
- * parameters: the first argument passed to fire and the optional 
- * custom object
- * @property YAHOO.util.CustomEvent.FLAT
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.FLAT = 1;
-
-YAHOO.util.CustomEvent.prototype = {
-
-    /**
-     * Subscribes the caller to this event
-     * @method subscribe
-     * @param {Function} fn        The function to execute
-     * @param {Object}   obj       An object to be passed along when the event 
-     *                             fires
-     * @param {boolean|Object}  override If true, the obj passed in becomes 
-     *                                   the execution scope of the listener.
-     *                                   if an object, that object becomes the
-     *                                   the execution scope.
-     */
-    subscribe: function(fn, obj, override) {
-        if (this.subscribeEvent) {
-            this.subscribeEvent.fire(fn, obj, override);
-        }
-
-        this.subscribers.push( new YAHOO.util.Subscriber(fn, obj, override) );
-    },
-
-    /**
-     * Unsubscribes the caller from this event
-     * @method unsubscribe
-     * @param {Function} fn  The function to execute
-     * @param {Object}   obj  The custom object passed to subscribe (optional)
-     * @return {boolean} True if the subscriber was found and detached.
-     */
-    unsubscribe: function(fn, obj) {
-        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;
-    },
-
-    /**
-     * Notifies the subscribers.  The callback functions will be executed
-     * from the scope specified when the event was created, and with the 
-     * following parameters:
-     *   <ul>
-     *   <li>The type of event</li>
-     *   <li>All of the arguments fire() was executed with as an array</li>
-     *   <li>The custom object (if any) that was passed into the subscribe() 
-     *       method</li>
-     *   </ul>
-     * @method fire 
-     * @param {Object*} arguments an arbitrary set of parameters to pass to 
-     *                            the handler.
-     * @return {boolean} false if one of the subscribers returned false, 
-     *                   true otherwise
-     */
-    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) {
-                    }
-
-                    //break;
-                    return false;
-                }
-            }
-        }
-
-        return true;
-    },
-
-    /**
-     * Removes all listeners
-     * @method unsubscribeAll
-     */
-    unsubscribeAll: function() {
-        for (var i=0, len=this.subscribers.length; i<len; ++i) {
-            this._delete(len - 1 - i);
-        }
-    },
-
-    /**
-     * @method _delete
-     * @private
-     */
-    _delete: function(index) {
-        var s = this.subscribers[index];
-        if (s) {
-            delete s.fn;
-            delete s.obj;
-        }
-
-        // delete this.subscribers[index];
-        this.subscribers.splice(index, 1);
-    },
-
-    /**
-     * @method toString
-     */
-    toString: function() {
-         return "CustomEvent: " + "'" + this.type  + "', " + 
-             "scope: " + this.scope;
-
-    }
-};
-
-/////////////////////////////////////////////////////////////////////
-
-/**
- * Stores the subscriber information to be used when the event fires.
- * @param {Function} fn       The function to execute
- * @param {Object}   obj      An object to be passed along when the event fires
- * @param {boolean}  override If true, the obj passed in becomes the execution
- *                            scope of the listener
- * @class Subscriber
- * @constructor
- */
-YAHOO.util.Subscriber = function(fn, obj, override) {
-
-    /**
-     * The callback that will be execute when the event fires
-     * @property fn
-     * @type function
-     */
-    this.fn = fn;
-
-    /**
-     * An optional custom object that will passed to the callback when
-     * the event fires
-     * @property obj
-     * @type object
-     */
-    this.obj = obj || null;
-
-    /**
-     * The default execution scope for the event listener is defined when the
-     * event is created (usually the object which contains the event).
-     * By setting override to true, the execution scope becomes the custom
-     * object passed in by the subscriber.  If override is an object, that 
-     * object becomes the scope.
-     * @property override
-     * @type boolean|object
-     */
-    this.override = override;
-
-};
-
-/**
- * Returns the execution scope for this listener.  If override was set to true
- * the custom obj will be the scope.  If override is an object, that is the
- * scope, otherwise the default scope will be used.
- * @method getScope
- * @param {Object} defaultScope the scope to use if this listener does not
- *                              override it.
- */
-YAHOO.util.Subscriber.prototype.getScope = function(defaultScope) {
-    if (this.override) {
-        if (this.override === true) {
-            return this.obj;
-        } else {
-            return this.override;
-        }
-    }
-    return defaultScope;
-};
-
-/**
- * Returns true if the fn and obj match this objects properties.
- * Used by the unsubscribe method to match the right subscriber.
- *
- * @method contains
- * @param {Function} fn the function to execute
- * @param {Object} obj an object to be passed along when the event fires
- * @return {boolean} true if the supplied arguments match this 
- *                   subscriber's signature.
- */
-YAHOO.util.Subscriber.prototype.contains = function(fn, obj) {
-    if (obj) {
-        return (this.fn == fn && this.obj == obj);
-    } else {
-        return (this.fn == fn);
-    }
-};
-
-/**
- * @method toString
- */
-YAHOO.util.Subscriber.prototype.toString = function() {
-    return "Subscriber { obj: " + (this.obj || "")  + 
-           ", override: " +  (this.override || "no") + " }";
-};
-
-/**
- * The Event Utility provides utilities for managing DOM Events and tools
- * for building event systems
- *
- * @module event
- * @title Event Utility
- * @namespace YAHOO.util
- * @requires yahoo
- */
-
-// The first instance of Event will win if it is loaded more than once.
-if (!YAHOO.util.Event) {
-
-/**
- * The event utility provides functions to add and remove event listeners,
- * event cleansing.  It also tries to automatically remove listeners it
- * registers during the unload event.
- *
- * @class Event
- * @static
- */
-    YAHOO.util.Event = function() {
-
-        /**
-         * True after the onload event has fired
-         * @property loadComplete
-         * @type boolean
-         * @static
-         * @private
-         */
-        var loadComplete =  false;
-
-        /**
-         * Cache of wrapped listeners
-         * @property listeners
-         * @type array
-         * @static
-         * @private
-         */
-        var listeners = [];
-
-        /**
-         * User-defined unload function that will be fired before all events
-         * are detached
-         * @property unloadListeners
-         * @type array
-         * @static
-         * @private
-         */
-        var unloadListeners = [];
-
-        /**
-         * Cache of DOM0 event handlers to work around issues with DOM2 events
-         * in Safari
-         * @property legacyEvents
-         * @static
-         * @private
-         */
-        var legacyEvents = [];
-
-        /**
-         * Listener stack for DOM0 events
-         * @property legacyHandlers
-         * @static
-         * @private
-         */
-        var legacyHandlers = [];
-
-        /**
-         * The number of times to poll after window.onload.  This number is
-         * increased if additional late-bound handlers are requested after
-         * the page load.
-         * @property retryCount
-         * @static
-         * @private
-         */
-        var retryCount = 0;
-
-        /**
-         * onAvailable listeners
-         * @property onAvailStack
-         * @static
-         * @private
-         */
-        var onAvailStack = [];
-
-        /**
-         * Lookup table for legacy events
-         * @property legacyMap
-         * @static
-         * @private
-         */
-        var legacyMap = [];
-
-        /**
-         * Counter for auto id generation
-         * @property counter
-         * @static
-         * @private
-         */
-        var counter = 0;
-
-        return { // PREPROCESS
-
-            /**
-             * The number of times we should look for elements that are not
-             * in the DOM at the time the event is requested after the document
-             * has been loaded.  The default is 200 at amp;50 ms, so it will poll
-             * for 10 seconds or until all outstanding handlers are bound
-             * (whichever comes first).
-             * @property POLL_RETRYS
-             * @type int
-             * @static
-             * @final
-             */
-            POLL_RETRYS: 200,
-
-            /**
-             * The poll interval in milliseconds
-             * @property POLL_INTERVAL
-             * @type int
-             * @static
-             * @final
-             */
-            POLL_INTERVAL: 20,
-
-            /**
-             * Element to bind, int constant
-             * @property EL
-             * @type int
-             * @static
-             * @final
-             */
-            EL: 0,
-
-            /**
-             * Type of event, int constant
-             * @property TYPE
-             * @type int
-             * @static
-             * @final
-             */
-            TYPE: 1,
-
-            /**
-             * Function to execute, int constant
-             * @property FN
-             * @type int
-             * @static
-             * @final
-             */
-            FN: 2,
-
-            /**
-             * Function wrapped for scope correction and cleanup, int constant
-             * @property WFN
-             * @type int
-             * @static
-             * @final
-             */
-            WFN: 3,
-
-            /**
-             * Object passed in by the user that will be returned as a 
-             * parameter to the callback, int constant
-             * @property OBJ
-             * @type int
-             * @static
-             * @final
-             */
-            OBJ: 3,
-
-            /**
-             * Adjusted scope, either the element we are registering the event
-             * on or the custom object passed in by the listener, int constant
-             * @property ADJ_SCOPE
-             * @type int
-             * @static
-             * @final
-             */
-            ADJ_SCOPE: 4,
-
-            /**
-             * Safari detection is necessary to work around the preventDefault
-             * bug that makes it so you can't cancel a href click from the 
-             * handler.  There is not a capabilities check we can use here.
-             * @property isSafari
-             * @private
-             * @static
-             */
-            isSafari: (/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),
-
-            /**
-             * IE detection needed to properly calculate pageX and pageY.  
-             * capabilities checking didn't seem to work because another 
-             * browser that does not provide the properties have the values 
-             * calculated in a different manner than IE.
-             * @property isIE
-             * @private
-             * @static
-             */
-            isIE: (!this.isSafari && !navigator.userAgent.match(/opera/gi) && 
-                    navigator.userAgent.match(/msie/gi)),
-
-            /**
-             * poll handle
-             * @property _interval
-             * @private
-             */
-            _interval: null,
-
-            /**
-             * @method startInterval
-             * @static
-             * @private
-             */
-            startInterval: function() {
-                if (!this._interval) {
-                    var self = this;
-                    var callback = function() { self._tryPreloadAttach(); };
-                    this._interval = setInterval(callback, this.POLL_INTERVAL);
-                    // this.timeout = setTimeout(callback, i);
-                }
-            },
-
-            /**
-             * Executes the supplied callback when the item with the supplied
-             * id is found.  This is meant to be used to execute behavior as
-             * soon as possible as the page loads.  If you use this after the
-             * initial page load it will poll for a fixed time for the element.
-             * The number of times it will poll and the frequency are
-             * configurable.  By default it will poll for 10 seconds.
-             *
-             * @method onAvailable
-             *
-             * @param {string}   p_id the id of the element to look for.
-             * @param {function} p_fn what to execute when the element is found.
-             * @param {object}   p_obj an optional object to be passed back as
-             *                   a parameter to p_fn.
-             * @param {boolean}  p_override If set to true, p_fn will execute
-             *                   in the scope of p_obj
-             *
-             * @static
-             */
-            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();
-            },
-
-            /**
-             * Works the same way as onAvailable, but additionally checks the
-             * state of sibling elements to determine if the content of the
-             * available element is safe to modify.
-             *
-             * @method onContentReady
-             *
-             * @param {string}   p_id the id of the element to look for.
-             * @param {function} p_fn what to execute when the element is ready.
-             * @param {object}   p_obj an optional object to be passed back as
-             *                   a parameter to p_fn.
-             * @param {boolean}  p_override If set to true, p_fn will execute
-             *                   in the scope of p_obj
-             *
-             * @static
-             */
-            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();
-            },
-
-            /**
-             * Appends an event handler
-             *
-             * @method addListener
-             *
-             * @param {Object}   el        The html element to assign the 
-             *                             event to
-             * @param {String}   sType     The type of event to append
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   obj    An arbitrary object that will be 
-             *                             passed as a parameter to the handler
-             * @param {boolean}  override  If true, the obj passed in becomes
-             *                             the execution scope of the listener
-             * @return {boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements 
-             *                        could not have the listener attached,
-             *                        or if the operation throws an exception.
-             * @static
-             */
-            addListener: function(el, sType, fn, obj, override) {
-
-                if (!fn || !fn.call) {
-                    return false;
-                }
-
-                // The el argument can be an array of elements or element ids.
-                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 the el argument is a string, we assume it is 
-                    // actually the id of the element.  If the page is loaded
-                    // we convert el to the actual element, otherwise we 
-                    // defer attaching the event until onload event fires
-
-                    // check to see if we need to delay hooking up the event 
-                    // until after the page loads.
-                    if (oEl) {
-                        el = oEl;
-                    } else {
-                        // defer adding the event until the element is available
-                        this.onAvailable(el, function() {
-                           YAHOO.util.Event.on(el, sType, fn, obj, override);
-                        });
-
-                        return true;
-                    }
-                }
-
-                // Element should be an html element or an array if we get 
-                // here.
-                if (!el) {
-                    return false;
-                }
-
-                // we need to make sure we fire registered unload events 
-                // prior to automatically unhooking them.  So we hang on to 
-                // these instead of attaching them to the window and fire the
-                // handles explicitly during our one unload event.
-                if ("unload" == sType && obj !== this) {
-                    unloadListeners[unloadListeners.length] =
-                            [el, sType, fn, obj, override];
-                    return true;
-                }
-
-
-                // if the user chooses to override the scope, we use the custom
-                // object passed in, otherwise the executing scope will be the
-                // HTML element that the event is registered on
-                var scope = el;
-                if (override) {
-                    if (override === true) {
-                        scope = obj;
-                    } else {
-                        scope = override;
-                    }
-                }
-
-                // wrap the function so we can return the obj object when
-                // the event fires;
-                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;
-                // cache the listener so we can try to automatically unload
-                listeners[index] = li;
-
-                if (this.useLegacyEvent(el, sType)) {
-                    var legacyIndex = this.getLegacyIndex(el, sType);
-
-                    // Add a new dom0 wrapper if one is not detected for this
-                    // element
-                    if ( legacyIndex == -1 || 
-                                el != legacyEvents[legacyIndex][0] ) {
-
-                        legacyIndex = legacyEvents.length;
-                        legacyMap[el.id + sType] = legacyIndex;
-
-                        // cache the signature for the DOM0 event, and 
-                        // include the existing handler for the event, if any
-                        legacyEvents[legacyIndex] = 
-                            [el, sType, el["on" + sType]];
-                        legacyHandlers[legacyIndex] = [];
-
-                        el["on" + sType] = 
-                            function(e) {
-                                YAHOO.util.Event.fireLegacyEvent(
-                                    YAHOO.util.Event.getEvent(e), legacyIndex);
-                            };
-                    }
-
-                    // add a reference to the wrapped listener to our custom
-                    // stack of events
-                    //legacyHandlers[legacyIndex].push(index);
-                    legacyHandlers[legacyIndex].push(li);
-
-                } else {
-                    try {
-                        this._simpleAdd(el, sType, wrappedFn, false);
-                    } catch(e) {
-                        // handle an error trying to attach an event.  If it fails
-                        // we need to clean up the cache
-                        this.removeListener(el, sType, fn);
-                        return false;
-                    }
-                }
-
-                return true;
-                
-            },
-
-            /**
-             * When using legacy events, the handler is routed to this object
-             * so we can fire our custom listener stack.
-             * @method fireLegacyEvent
-             * @static
-             * @private
-             */
-            fireLegacyEvent: function(e, legacyIndex) {
-                var ok = true;
-
-                var le = legacyHandlers[legacyIndex];
-                for (var i=0,len=le.length; i<len; ++i) {
-                    var li = le[i];
-                    if ( li && li[this.WFN] ) {
-                        var scope = li[this.ADJ_SCOPE];
-                        var ret = li[this.WFN].call(scope, e);
-                        ok = (ok && ret);
-                    }
-                }
-
-                return ok;
-            },
-
-            /**
-             * Returns the legacy event index that matches the supplied 
-             * signature
-             * @method getLegacyIndex
-             * @static
-             * @private
-             */
-            getLegacyIndex: function(el, sType) {
-                var key = this.generateId(el) + sType;
-                if (typeof legacyMap[key] == "undefined") { 
-                    return -1;
-                } else {
-                    return legacyMap[key];
-                }
-            },
-
-            /**
-             * Logic that determines when we should automatically use legacy
-             * events instead of DOM2 events.
-             * @method useLegacyEvent
-             * @static
-             * @private
-             */
-            useLegacyEvent: function(el, sType) {
-                if (!el.addEventListener && !el.attachEvent) {
-                    return true;
-                } else if (this.isSafari) {
-                    if ("click" == sType || "dblclick" == sType) {
-                        return true;
-                    }
-                }
-                return false;
-            },
-                    
-            /**
-             * Removes an event handler
-             *
-             * @method removeListener
-             *
-             * @param {Object} el the html element or the id of the element to 
-             * assign the event to.
-             * @param {String} sType the type of event to remove.
-             * @param {Function} fn the method the event invokes.  If fn is
-             * undefined, then all event handlers for the type of event are 
-             * removed.
-             * @return {boolean} true if the unbind was successful, false 
-             * otherwise.
-             * @static
-             */
-            removeListener: function(el, sType, fn) {
-                var i, len;
-
-                // The el argument can be a string
-                if (typeof el == "string") {
-                    el = this.getEl(el);
-                // The el argument can be an array of elements or element ids.
-                } 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 false;
-                    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;
-
-                // The index is a hidden parameter; needed to remove it from
-                // the method signature because it was tempting users to
-                // try and take advantage of it, which is not possible.
-                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(e) {
-                        return false;
-                    }
-                }
-
-                // removed the wrapped handler
-                delete listeners[index][this.WFN];
-                delete listeners[index][this.FN];
-                listeners.splice(index, 1);
-
-                return true;
-
-            },
-
-            /**
-             * Returns the event's target element
-             * @method getTarget
-             * @param {Event} ev the event
-             * @param {boolean} resolveTextNode when set to true the target's
-             *                  parent will be returned if the target is a 
-             *                  text node.  @deprecated, the text node is
-             *                  now resolved automatically
-             * @return {HTMLElement} the event's target
-             * @static
-             */
-            getTarget: function(ev, resolveTextNode) {
-                var t = ev.target || ev.srcElement;
-                return this.resolveTextNode(t);
-            },
-
-            /**
-             * In some cases, some browsers will return a text node inside
-             * the actual element that was targeted.  This normalizes the
-             * return value for getTarget and getRelatedTarget.
-             * @method resolveTextNode
-             * @param {HTMLElement} node node to resolve
-             * @return {HTMLElement} the normized node
-             * @static
-             */
-            resolveTextNode: function(node) {
-                // if (node && node.nodeName && 
-                        // "#TEXT" == node.nodeName.toUpperCase()) {
-                if (node && 3 == node.nodeType) {
-                    return node.parentNode;
-                } else {
-                    return node;
-                }
-            },
-
-            /**
-             * Returns the event's pageX
-             * @method getPageX
-             * @param {Event} ev the event
-             * @return {int} the event's pageX
-             * @static
-             */
-            getPageX: function(ev) {
-                var x = ev.pageX;
-                if (!x && 0 !== x) {
-                    x = ev.clientX || 0;
-
-                    if ( this.isIE ) {
-                        x += this._getScrollLeft();
-                    }
-                }
-
-                return x;
-            },
-
-            /**
-             * Returns the event's pageY
-             * @method getPageY
-             * @param {Event} ev the event
-             * @return {int} the event's pageY
-             * @static
-             */
-            getPageY: function(ev) {
-                var y = ev.pageY;
-                if (!y && 0 !== y) {
-                    y = ev.clientY || 0;
-
-                    if ( this.isIE ) {
-                        y += this._getScrollTop();
-                    }
-                }
-
-                return y;
-            },
-
-            /**
-             * Returns the pageX and pageY properties as an indexed array.
-             * @method getXY
-             * @type int[]
-             * @static
-             */
-            getXY: function(ev) {
-                return [this.getPageX(ev), this.getPageY(ev)];
-            },
-
-            /**
-             * Returns the event's related target 
-             * @method getRelatedTarget
-             * @param {Event} ev the event
-             * @return {HTMLElement} the event's relatedTarget
-             * @static
-             */
-            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);
-            },
-
-            /**
-             * Returns the time of the event.  If the time is not included, the
-             * event is modified using the current time.
-             * @method getTime
-             * @param {Event} ev the event
-             * @return {Date} the time of the event
-             * @static
-             */
-            getTime: function(ev) {
-                if (!ev.time) {
-                    var t = new Date().getTime();
-                    try {
-                        ev.time = t;
-                    } catch(e) { 
-                        return t;
-                    }
-                }
-
-                return ev.time;
-            },
-
-            /**
-             * Convenience method for stopPropagation + preventDefault
-             * @method stopEvent
-             * @param {Event} ev the event
-             * @static
-             */
-            stopEvent: function(ev) {
-                this.stopPropagation(ev);
-                this.preventDefault(ev);
-            },
-
-            /**
-             * Stops event propagation
-             * @method stopPropagation
-             * @param {Event} ev the event
-             * @static
-             */
-            stopPropagation: function(ev) {
-                if (ev.stopPropagation) {
-                    ev.stopPropagation();
-                } else {
-                    ev.cancelBubble = true;
-                }
-            },
-
-            /**
-             * Prevents the default behavior of the event
-             * @method preventDefault
-             * @param {Event} ev the event
-             * @static
-             */
-            preventDefault: function(ev) {
-                if (ev.preventDefault) {
-                    ev.preventDefault();
-                } else {
-                    ev.returnValue = false;
-                }
-            },
-             
-            /**
-             * Finds the event in the window object, the caller's arguments, or
-             * in the arguments of another method in the callstack.  This is
-             * executed automatically for events registered through the event
-             * manager, so the implementer should not normally need to execute
-             * this function at all.
-             * @method getEvent
-             * @param {Event} e the event parameter from the handler
-             * @return {Event} the event 
-             * @static
-             */
-            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;
-            },
-
-            /**
-             * Returns the charcode for an event
-             * @method getCharCode
-             * @param {Event} ev the event
-             * @return {int} the event's charCode
-             * @static
-             */
-            getCharCode: function(ev) {
-                return ev.charCode || ev.keyCode || 0;
-            },
-
-            /**
-             * Locating the saved event handler data by function ref
-             *
-             * @method _getCacheIndex
-             * @static
-             * @private
-             */
-            _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;
-            },
-
-            /**
-             * Generates an unique ID for the element if it does not already 
-             * have one.
-             * @method generateId
-             * @param el the element to create the id for
-             * @return {string} the resulting id of the element
-             * @static
-             */
-            generateId: function(el) {
-                var id = el.id;
-
-                if (!id) {
-                    id = "yuievtautoid-" + counter;
-                    ++counter;
-                    el.id = id;
-                }
-
-                return id;
-            },
-
-            /**
-             * We want to be able to use getElementsByTagName as a collection
-             * to attach a group of events to.  Unfortunately, different 
-             * browsers return different types of collections.  This function
-             * tests to determine if the object is array-like.  It will also 
-             * fail if the object is an array, but is empty.
-             * @method _isValidCollection
-             * @param o the object to test
-             * @return {boolean} true if the object is array-like and populated
-             * @static
-             * @private
-             */
-            _isValidCollection: function(o) {
-                // this.logger.debug(o.constructor.toString())
-                // this.logger.debug(typeof o)
-
-                return ( o                    && // o is something
-                         o.length             && // o is indexed
-                         typeof o != "string" && // o is not a string
-                         !o.tagName           && // o is not an HTML element
-                         !o.alert             && // o is not a window
-                         typeof o[0] != "undefined" );
-
-            },
-
-            /**
-             * @private
-             * @property elCache
-             * DOM element cache
-             * @static
-             */
-            elCache: {},
-
-            /**
-             * We cache elements bound by id because when the unload event 
-             * fires, we can no longer use document.getElementById
-             * @method getEl
-             * @static
-             * @private
-             */
-            getEl: function(id) {
-                return document.getElementById(id);
-            },
-
-            /**
-             * Clears the element cache
-             * @deprecated Elements are not cached any longer
-             * @method clearCache
-             * @static
-             * @private
-             */
-            clearCache: function() { },
-
-            /**
-             * hook up any deferred listeners
-             * @method _load
-             * @static
-             * @private
-             */
-            _load: function(e) {
-                loadComplete = true;
-                var EU = YAHOO.util.Event;
-                // Remove the listener to assist with the IE memory issue, but not
-                // for other browsers because FF 1.0x does not like it.
-                if (this.isIE) {
-                    EU._simpleRemove(window, "load", EU._load);
-                }
-            },
-
-            /**
-             * Polling function that runs before the onload event fires, 
-             * attempting to attach to DOM Nodes as soon as they are 
-             * available
-             * @method _tryPreloadAttach
-             * @static
-             * @private
-             */
-            _tryPreloadAttach: function() {
-
-                if (this.locked) {
-                    return false;
-                }
-
-                this.locked = true;
-
-
-                // keep trying until after the page is loaded.  We need to 
-                // check the page load state prior to trying to bind the 
-                // elements so that we can be certain all elements have been 
-                // tested appropriately
-                var tryAgain = !loadComplete;
-                if (!tryAgain) {
-                    tryAgain = (retryCount > 0);
-                }
-
-                // onAvailable
-                var notAvail = [];
-                for (var i=0,len=onAvailStack.length; i<len ; ++i) {
-                    var item = onAvailStack[i];
-                    if (item) {
-                        var el = this.getEl(item.id);
-
-                        if (el) {
-                            // The element is available, but not necessarily ready
-                            // @todo verify IE7 compatibility
-                            // @todo should we test parentNode.nextSibling?
-                            // @todo re-evaluate global content ready
-                            if ( !item.checkReady || 
-                                    loadComplete || 
-                                    el.nextSibling ||
-                                    (document && document.body) ) {
-
-                                var scope = el;
-                                if (item.override) {
-                                    if (item.override === true) {
-                                        scope = item.obj;
-                                    } else {
-                                        scope = item.override;
-                                    }
-                                }
-                                item.fn.call(scope, item.obj);
-                                //delete onAvailStack[i];
-                                // null out instead of delete for Opera
-                                onAvailStack[i] = null;
-                            }
-                        } else {
-                            notAvail.push(item);
-                        }
-                    }
-                }
-
-                retryCount = (notAvail.length === 0) ? 0 : retryCount - 1;
-
-                if (tryAgain) {
-                    onAvailStack = notAvail; // cleanse the array
-                    this.startInterval();
-                } else {
-                    clearInterval(this._interval);
-                    this._interval = null;
-                }
-
-                this.locked = false;
-
-                return true;
-
-            },
-
-            /**
-             * Removes all listeners attached to the given element via addListener.
-             * Optionally, the node's children can also be purged.
-             * Optionally, you can specify a specific type of event to remove.
-             * @method purgeElement
-             * @param {HTMLElement} el the element to purge
-             * @param {boolean} recurse recursively purge this element's children
-             * as well.  Use with caution.
-             * @param {string} sType optional type of listener to purge. If
-             * left out, all listeners will be removed
-             * @static
-             */
-            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];
-                        // can't use the index on the changing collection
-                        //this.removeListener(el, l.type, l.fn, l.index);
-                        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);
-                    }
-                }
-            },
-
-            /**
-             * Returns all listeners attached to the given element via addListener.
-             * Optionally, you can specify a specific type of event to return.
-             * @method getListeners
-             * @param el {HTMLElement} the element to inspect 
-             * @param sType {string} optional type of listener to return. If
-             * left out, all listeners will be returned
-             * @return {Object} the listener. Contains the following fields:
-             * &nbsp;&nbsp;type:   (string)   the type of event
-             * &nbsp;&nbsp;fn:     (function) the callback supplied to addListener
-             * &nbsp;&nbsp;obj:    (object)   the custom object supplied to addListener
-             * &nbsp;&nbsp;adjust: (boolean)  whether or not to adjust the default scope
-             * &nbsp;&nbsp;index:  (int)      its position in the Event util listener cache
-             * @static
-             */           
-            getListeners: function(el, sType) {
-                var elListeners = [];
-                if (listeners && listeners.length > 0) {
-                    for (var i=0,len=listeners.length; i<len ; ++i) {
-                        var l = listeners[i];
-                        if ( l  && l[this.EL] === el && 
-                                (!sType || sType === l[this.TYPE]) ) {
-                            elListeners.push({
-                                type:   l[this.TYPE],
-                                fn:     l[this.FN],
-                                obj:    l[this.OBJ],
-                                adjust: l[this.ADJ_SCOPE],
-                                index:  i
-                            });
-                        }
-                    }
-                }
-
-                return (elListeners.length) ? elListeners : null;
-            },
-
-            /**
-             * Removes all listeners registered by pe.event.  Called 
-             * automatically during the unload event.
-             * @method _unload
-             * @static
-             * @private
-             */
-            _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) {
-                    // dereference the element
-                    //delete legacyEvents[i][0];
-                    legacyEvents[i][0] = null;
-
-                    // delete the array item
-                    //delete legacyEvents[i];
-                    legacyEvents[i] = null;
-                }
-
-                legacyEvents = null;
-
-                EU._simpleRemove(window, "unload", EU._unload);
-
-            },
-
-            /**
-             * Returns scrollLeft
-             * @method _getScrollLeft
-             * @static
-             * @private
-             */
-            _getScrollLeft: function() {
-                return this._getScroll()[1];
-            },
-
-            /**
-             * Returns scrollTop
-             * @method _getScrollTop
-             * @static
-             * @private
-             */
-            _getScrollTop: function() {
-                return this._getScroll()[0];
-            },
-
-            /**
-             * Returns the scrollTop and scrollLeft.  Used to calculate the 
-             * pageX and pageY in Internet Explorer
-             * @method _getScroll
-             * @static
-             * @private
-             */
-            _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];
-                }
-            },
-
-            /**
-             * Adds a DOM event directly without the caching, cleanup, scope adj, etc
-             *
-             * @method _simpleAdd
-             * @param {HTMLElement} el      the element to bind the handler to
-             * @param {string}      sType   the type of event handler
-             * @param {function}    fn      the callback to invoke
-             * @param {boolen}      capture capture or bubble phase
-             * @static
-             * @private
-             */
-            _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(){};
-                }
-            }(),
-
-            /**
-             * Basic remove listener
-             *
-             * @method _simpleRemove
-             * @param {HTMLElement} el      the element to bind the handler to
-             * @param {string}      sType   the type of event handler
-             * @param {function}    fn      the callback to invoke
-             * @param {boolen}      capture capture or bubble phase
-             * @static
-             * @private
-             */
-            _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;
-
-        /**
-         * YAHOO.util.Event.on is an alias for addListener
-         * @method on
-         * @see addListener
-         * @static
-         */
-        EU.on = EU.addListener;
-
-        // YAHOO.mix(EU, YAHOO.util.EventProvider.prototype);
-        // EU.createEvent("DOMContentReady");
-        // EU.subscribe("DOMContentReady", EU._load);
-
-        if (document && document.body) {
-            EU._load();
-        } else {
-            // EU._simpleAdd(document, "DOMContentLoaded", EU._load);
-            EU._simpleAdd(window, "load", EU._load);
-        }
-        EU._simpleAdd(window, "unload", EU._unload);
-        EU._tryPreloadAttach();
-    })();
-}
-
-/**
- * EventProvider is designed to be used with YAHOO.augment to wrap 
- * CustomEvents in an interface that allows events to be subscribed to 
- * and fired by name.  This makes it possible for implementing code to
- * subscribe to an event that either has not been created yet, or will
- * not be created at all.
- *
- * @Class EventProvider
- */
-YAHOO.util.EventProvider = function() { };
-
-YAHOO.util.EventProvider.prototype = {
-
-    /**
-     * Private storage of custom events
-     * @property __yui_events
-     * @type Object[]
-     * @private
-     */
-    __yui_events: null,
-
-    /**
-     * Private storage of custom event subscribers
-     * @property __yui_subscribers
-     * @type Object[]
-     * @private
-     */
-    __yui_subscribers: null,
-    
-    /**
-     * Subscribe to a CustomEvent by event type
-     *
-     * @method subscribe
-     * @param p_type     {string}   the type, or name of the event
-     * @param p_fn       {function} the function to exectute when the event fires
-     * @param p_obj
-     * @param p_obj      {Object}   An object to be passed along when the event 
-     *                              fires
-     * @param p_override {boolean}  If true, the obj passed in becomes the 
-     *                              execution scope of the listener
-     */
-    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 } );
-        }
-    },
-
-    /**
-     * Unsubscribes the from the specified event
-     * @method unsubscribe
-     * @param p_type {string}   The type, or name of the event
-     * @param p_fn   {Function} The function to execute
-     * @param p_obj  {Object}   The custom object passed to subscribe (optional)
-     * @return {boolean} true if the subscriber was found and detached.
-     */
-    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;
-        }
-    },
-
-    /**
-     * Creates a new custom event of the specified type.  If a custom event
-     * by that name already exists, it will not be re-created.  In either
-     * case the custom event is returned. 
-     *
-     * @method createEvent
-     *
-     * @param p_type {string} the type, or name of the event
-     * @param p_config {object} optional config params.  Valid properties are:
-     *
-     *  <ul>
-     *    <li>
-     *      scope: defines the default execution scope.  If not defined
-     *      the default scope will be this instance.
-     *    </li>
-     *    <li>
-     *      silent: if true, the custom event will not generate log messages.
-     *      This is false by default.
-     *    </li>
-     *    <li>
-     *      onSubscribeCallback: specifies a callback to execute when the
-     *      event has a new subscriber.  This will fire immediately for
-     *      each queued subscriber if any exist prior to the creation of
-     *      the event.
-     *    </li>
-     *  </ul>
-     *
-     *  @return {CustomEvent} the custom event
-     *
-     */
-    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];
-    },
-
-   /**
-     * Fire a custom event by name.  The callback functions will be executed
-     * from the scope specified when the event was created, and with the 
-     * following parameters:
-     *   <ul>
-     *   <li>The first argument fire() was executed with</li>
-     *   <li>The custom object (if any) that was passed into the subscribe() 
-     *       method</li>
-     *   </ul>
-     * @method fireEvent
-     * @param p_type    {string}  the type, or name of the event
-     * @param arguments {Object*} an arbitrary set of parameters to pass to 
-     *                            the handler.
-     * @return {boolean} the return value from CustomEvent.fire, or null if 
-     *                   the custom event does not exist.
-     */
-    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;
-        }
-    },
-
-    /**
-     * Returns true if the custom event of the provided type has been created
-     * with createEvent.
-     * @method hasEvent
-     * @param type {string} the type, or name of the event
-     */
-    hasEvent: function(type) {
-        if (this.__yui_events) {
-            if (this.__yui_events[type]) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-};
-
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+
+/**
+ * The CustomEvent class lets you define events for your application
+ * that can be subscribed to by one or more independent component.
+ *
+ * @param {String}  type The type of event, which is passed to the callback
+ *                  when the event fires
+ * @param {Object}  oScope The context the event will fire from.  "this" will
+ *                  refer to this object in the callback.  Default value: 
+ *                  the window object.  The listener can override this.
+ * @param {boolean} silent pass true to prevent the event from writing to
+ *                  the debugsystem
+ * @param {int}     signature the signature that the custom event subscriber
+ *                  will receive. YAHOO.util.CustomEvent.LIST or 
+ *                  YAHOO.util.CustomEvent.FLAT.  The default is
+ *                  YAHOO.util.CustomEvent.LIST.
+ * @namespace YAHOO.util
+ * @class CustomEvent
+ * @constructor
+ */
+YAHOO.util.CustomEvent = function(type, oScope, silent, signature) {
+
+    /**
+     * The type of event, returned to subscribers when the event fires
+     * @property type
+     * @type string
+     */
+    this.type = type;
+
+    /**
+     * The scope the the event will fire from by default.  Defaults to the window 
+     * obj
+     * @property scope
+     * @type object
+     */
+    this.scope = oScope || window;
+
+    /**
+     * By default all custom events are logged in the debug build, set silent
+     * to true to disable debug outpu for this event.
+     * @property silent
+     * @type boolean
+     */
+    this.silent = silent;
+
+    /**
+     * Custom events support two styles of arguments provided to the event
+     * subscribers.  
+     * <ul>
+     * <li>YAHOO.util.CustomEvent.LIST: 
+     *   <ul>
+     *   <li>param1: event name</li>
+     *   <li>param2: array of arguments sent to fire</li>
+     *   <li>param3: <optional> a custom object supplied by the subscriber</li>
+     *   </ul>
+     * </li>
+     * <li>YAHOO.util.CustomEvent.FLAT
+     *   <ul>
+     *   <li>param1: the first argument passed to fire.  If you need to
+     *           pass multiple parameters, use and array or object literal</li>
+     *   <li>param2: <optional> a custom object supplied by the subscriber</li>
+     *   </ul>
+     * </li>
+     * </ul>
+     *   @property signature
+     *   @type int
+     */
+    this.signature = signature || YAHOO.util.CustomEvent.LIST;
+
+    /**
+     * The subscribers to this event
+     * @property subscribers
+     * @type Subscriber[]
+     */
+    this.subscribers = [];
+
+    if (!this.silent) {
+    }
+
+    var onsubscribeType = "_YUICEOnSubscribe";
+
+    // Only add subscribe events for events that are not generated by 
+    // CustomEvent
+    if (type !== onsubscribeType) {
+
+        /**
+         * Custom events provide a custom event that fires whenever there is
+         * a new subscriber to the event.  This provides an opportunity to
+         * handle the case where there is a non-repeating event that has
+         * already fired has a new subscriber.  
+         *
+         * @event subscribeEvent
+         * @type YAHOO.util.CustomEvent
+         * @param {Function} fn The function to execute
+         * @param {Object}   obj An object to be passed along when the event 
+         *                       fires
+         * @param {boolean|Object}  override If true, the obj passed in becomes 
+         *                                   the execution scope of the listener.
+         *                                   if an object, that object becomes the
+         *                                   the execution scope.
+         */
+        this.subscribeEvent = 
+                new YAHOO.util.CustomEvent(onsubscribeType, this, true);
+
+    } 
+};
+
+/**
+ * Subscriber listener sigature constant.  The LIST type returns three
+ * parameters: the event type, the array of args passed to fire, and
+ * the optional custom object
+ * @property YAHOO.util.CustomEvent.LIST
+ * @static
+ * @type int
+ */
+YAHOO.util.CustomEvent.LIST = 0;
+
+/**
+ * Subscriber listener sigature constant.  The FLAT type returns two
+ * parameters: the first argument passed to fire and the optional 
+ * custom object
+ * @property YAHOO.util.CustomEvent.FLAT
+ * @static
+ * @type int
+ */
+YAHOO.util.CustomEvent.FLAT = 1;
+
+YAHOO.util.CustomEvent.prototype = {
+
+    /**
+     * Subscribes the caller to this event
+     * @method subscribe
+     * @param {Function} fn        The function to execute
+     * @param {Object}   obj       An object to be passed along when the event 
+     *                             fires
+     * @param {boolean|Object}  override If true, the obj passed in becomes 
+     *                                   the execution scope of the listener.
+     *                                   if an object, that object becomes the
+     *                                   the execution scope.
+     */
+    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) );
+    },
+
+    /**
+     * Unsubscribes subscribers.
+     * @method unsubscribe
+     * @param {Function} fn  The subscribed function to remove, if not supplied
+     *                       all will be removed
+     * @param {Object}   obj  The custom object passed to subscribe.  This is
+     *                        optional, but if supplied will be used to
+     *                        disambiguate multiple listeners that are the same
+     *                        (e.g., you subscribe many object using a function
+     *                        that lives on the prototype)
+     * @return {boolean} True if the subscriber was found and detached.
+     */
+    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;
+    },
+
+    /**
+     * Notifies the subscribers.  The callback functions will be executed
+     * from the scope specified when the event was created, and with the 
+     * following parameters:
+     *   <ul>
+     *   <li>The type of event</li>
+     *   <li>All of the arguments fire() was executed with as an array</li>
+     *   <li>The custom object (if any) that was passed into the subscribe() 
+     *       method</li>
+     *   </ul>
+     * @method fire 
+     * @param {Object*} arguments an arbitrary set of parameters to pass to 
+     *                            the handler.
+     * @return {boolean} false if one of the subscribers returned false, 
+     *                   true otherwise
+     */
+    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) {
+                    }
+
+                    //break;
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    },
+
+    /**
+     * Removes all listeners
+     * @method unsubscribeAll
+     * @return {int} The number of listeners unsubscribed
+     */
+    unsubscribeAll: function() {
+        for (var i=0, len=this.subscribers.length; i<len; ++i) {
+            this._delete(len - 1 - i);
+        }
+
+        return i;
+    },
+
+    /**
+     * @method _delete
+     * @private
+     */
+    _delete: function(index) {
+        var s = this.subscribers[index];
+        if (s) {
+            delete s.fn;
+            delete s.obj;
+        }
+
+        // delete this.subscribers[index];
+        this.subscribers.splice(index, 1);
+    },
+
+    /**
+     * @method toString
+     */
+    toString: function() {
+         return "CustomEvent: " + "'" + this.type  + "', " + 
+             "scope: " + this.scope;
+
+    }
+};
+
+/////////////////////////////////////////////////////////////////////
+
+/**
+ * Stores the subscriber information to be used when the event fires.
+ * @param {Function} fn       The function to execute
+ * @param {Object}   obj      An object to be passed along when the event fires
+ * @param {boolean}  override If true, the obj passed in becomes the execution
+ *                            scope of the listener
+ * @class Subscriber
+ * @constructor
+ */
+YAHOO.util.Subscriber = function(fn, obj, override) {
+
+    /**
+     * The callback that will be execute when the event fires
+     * @property fn
+     * @type function
+     */
+    this.fn = fn;
+
+    /**
+     * An optional custom object that will passed to the callback when
+     * the event fires
+     * @property obj
+     * @type object
+     */
+    this.obj = obj || null;
+
+    /**
+     * The default execution scope for the event listener is defined when the
+     * event is created (usually the object which contains the event).
+     * By setting override to true, the execution scope becomes the custom
+     * object passed in by the subscriber.  If override is an object, that 
+     * object becomes the scope.
+     * @property override
+     * @type boolean|object
+     */
+    this.override = override;
+
+};
+
+/**
+ * Returns the execution scope for this listener.  If override was set to true
+ * the custom obj will be the scope.  If override is an object, that is the
+ * scope, otherwise the default scope will be used.
+ * @method getScope
+ * @param {Object} defaultScope the scope to use if this listener does not
+ *                              override it.
+ */
+YAHOO.util.Subscriber.prototype.getScope = function(defaultScope) {
+    if (this.override) {
+        if (this.override === true) {
+            return this.obj;
+        } else {
+            return this.override;
+        }
+    }
+    return defaultScope;
+};
+
+/**
+ * Returns true if the fn and obj match this objects properties.
+ * Used by the unsubscribe method to match the right subscriber.
+ *
+ * @method contains
+ * @param {Function} fn the function to execute
+ * @param {Object} obj an object to be passed along when the event fires
+ * @return {boolean} true if the supplied arguments match this 
+ *                   subscriber's signature.
+ */
+YAHOO.util.Subscriber.prototype.contains = function(fn, obj) {
+    if (obj) {
+        return (this.fn == fn && this.obj == obj);
+    } else {
+        return (this.fn == fn);
+    }
+};
+
+/**
+ * @method toString
+ */
+YAHOO.util.Subscriber.prototype.toString = function() {
+    return "Subscriber { obj: " + (this.obj || "")  + 
+           ", override: " +  (this.override || "no") + " }";
+};
+
+/**
+ * The Event Utility provides utilities for managing DOM Events and tools
+ * for building event systems
+ *
+ * @module event
+ * @title Event Utility
+ * @namespace YAHOO.util
+ * @requires yahoo
+ */
+
+// The first instance of Event will win if it is loaded more than once.
+// @TODO this needs to be changed so that only the state data that needs to
+// be preserved is kept, while methods are overwritten/added as needed.
+// This means that the module pattern can't be used.
+if (!YAHOO.util.Event) {
+
+/**
+ * The event utility provides functions to add and remove event listeners,
+ * event cleansing.  It also tries to automatically remove listeners it
+ * registers during the unload event.
+ *
+ * @class Event
+ * @static
+ */
+    YAHOO.util.Event = function() {
+
+        /**
+         * True after the onload event has fired
+         * @property loadComplete
+         * @type boolean
+         * @static
+         * @private
+         */
+        var loadComplete =  false;
+
+        /**
+         * True when the document is initially usable
+         * @property DOMReady
+         * @type boolean
+         * @static
+         * @private
+         */
+        var DOMReady = false;
+
+        /**
+         * Cache of wrapped listeners
+         * @property listeners
+         * @type array
+         * @static
+         * @private
+         */
+        var listeners = [];
+
+        /**
+         * User-defined unload function that will be fired before all events
+         * are detached
+         * @property unloadListeners
+         * @type array
+         * @static
+         * @private
+         */
+        var unloadListeners = [];
+
+        /**
+         * Cache of DOM0 event handlers to work around issues with DOM2 events
+         * in Safari
+         * @property legacyEvents
+         * @static
+         * @private
+         */
+        var legacyEvents = [];
+
+        /**
+         * Listener stack for DOM0 events
+         * @property legacyHandlers
+         * @static
+         * @private
+         */
+        var legacyHandlers = [];
+
+        /**
+         * The number of times to poll after window.onload.  This number is
+         * increased if additional late-bound handlers are requested after
+         * the page load.
+         * @property retryCount
+         * @static
+         * @private
+         */
+        var retryCount = 0;
+
+        /**
+         * onAvailable listeners
+         * @property onAvailStack
+         * @static
+         * @private
+         */
+        var onAvailStack = [];
+
+        /**
+         * Lookup table for legacy events
+         * @property legacyMap
+         * @static
+         * @private
+         */
+        var legacyMap = [];
+
+        /**
+         * Counter for auto id generation
+         * @property counter
+         * @static
+         * @private
+         */
+        var counter = 0;
+        
+        /**
+         * addListener/removeListener can throw errors in unexpected scenarios.
+         * These errors are suppressed, the method returns false, and this property
+         * is set
+         * @property lastError
+         * @type Error
+         */
+        var lastError = null;
+
+        return {
+
+            /**
+             * The number of times we should look for elements that are not
+             * in the DOM at the time the event is requested after the document
+             * has been loaded.  The default is 200 at amp;50 ms, so it will poll
+             * for 10 seconds or until all outstanding handlers are bound
+             * (whichever comes first).
+             * @property POLL_RETRYS
+             * @type int
+             * @static
+             * @final
+             */
+            POLL_RETRYS: 200,
+
+            /**
+             * The poll interval in milliseconds
+             * @property POLL_INTERVAL
+             * @type int
+             * @static
+             * @final
+             */
+            POLL_INTERVAL: 10,
+
+            /**
+             * Element to bind, int constant
+             * @property EL
+             * @type int
+             * @static
+             * @final
+             */
+            EL: 0,
+
+            /**
+             * Type of event, int constant
+             * @property TYPE
+             * @type int
+             * @static
+             * @final
+             */
+            TYPE: 1,
+
+            /**
+             * Function to execute, int constant
+             * @property FN
+             * @type int
+             * @static
+             * @final
+             */
+            FN: 2,
+
+            /**
+             * Function wrapped for scope correction and cleanup, int constant
+             * @property WFN
+             * @type int
+             * @static
+             * @final
+             */
+            WFN: 3,
+
+            /**
+             * Object passed in by the user that will be returned as a 
+             * parameter to the callback, int constant
+             * @property OBJ
+             * @type int
+             * @static
+             * @final
+             */
+            OBJ: 3,
+
+            /**
+             * Adjusted scope, either the element we are registering the event
+             * on or the custom object passed in by the listener, int constant
+             * @property ADJ_SCOPE
+             * @type int
+             * @static
+             * @final
+             */
+            ADJ_SCOPE: 4,
+
+            /**
+             * Safari detection is necessary to work around the preventDefault
+             * bug that makes it so you can't cancel a href click from the 
+             * handler.  Since this function has been used outside of this
+             * utility, it was changed to detect all KHTML browser to be more
+             * friendly towards the non-Safari browsers that share the engine.
+             * Internally, the preventDefault bug detection now uses the
+             * webkit property.
+             * @property isSafari
+             * @private
+             * @static
+             * @deprecated
+             */
+            isSafari: (/KHTML/gi).test(navigator.userAgent),
+            
+            /**
+             * If WebKit is detected, we keep track of the version number of
+             * the engine.  The webkit property will contain a string with
+             * the webkit version number if webkit is detected, null
+             * otherwise.
+             * Safari 1.3.2 (312.6): 312.8.1 <-- currently the latest
+             *                       available on Mac OSX 10.3.
+             * Safari 2.0.2: 416 <-- hasOwnProperty introduced
+             * Safari 2.0.4: 418 <-- preventDefault fixed (I believe)
+             * Safari 2.0.4 (419.3): 418.9.1 <-- current release
+             *
+             * http://developer.apple.com/internet/safari/uamatrix.html
+             * @property webkit
+             * @type string
+             * @static
+             */
+            webkit: function() {
+                var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);
+                if (v&&v[1]) {
+                    return v[1];
+                }
+                return null;
+            }(),
+            
+            /**
+             * IE detection needed to properly calculate pageX and pageY.  
+             * capabilities checking didn't seem to work because another 
+             * browser that does not provide the properties have the values 
+             * calculated in a different manner than IE.
+             * @property isIE
+             * @private
+             * @static
+             */
+            isIE: (!this.webkit && !navigator.userAgent.match(/opera/gi) && 
+                    navigator.userAgent.match(/msie/gi)),
+
+            /**
+             * poll handle
+             * @property _interval
+             * @private
+             */
+            _interval: null,
+
+            /**
+             * @method startInterval
+             * @static
+             * @private
+             */
+            startInterval: function() {
+                if (!this._interval) {
+                    var self = this;
+                    var callback = function() { self._tryPreloadAttach(); };
+                    this._interval = setInterval(callback, this.POLL_INTERVAL);
+                }
+            },
+
+            /**
+             * Executes the supplied callback when the item with the supplied
+             * id is found.  This is meant to be used to execute behavior as
+             * soon as possible as the page loads.  If you use this after the
+             * initial page load it will poll for a fixed time for the element.
+             * The number of times it will poll and the frequency are
+             * configurable.  By default it will poll for 10 seconds.
+             *
+             * @method onAvailable
+             *
+             * @param {string}   p_id the id of the element to look for.
+             * @param {function} p_fn what to execute when the element is found.
+             * @param {object}   p_obj an optional object to be passed back as
+             *                   a parameter to p_fn.
+             * @param {boolean}  p_override If set to true, p_fn will execute
+             *                   in the scope of p_obj
+             *
+             * @static
+             */
+            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();
+            },
+
+            /**
+             * Executes the supplied callback when the DOM is first usable.
+             *
+             * @method onDOMReady
+             *
+             * @param {function} p_fn what to execute when the element is found.
+             * @param {object}   p_obj an optional object to be passed back as
+             *                   a parameter to p_fn.
+             * @param {boolean}  p_scope If set to true, p_fn will execute
+             *                   in the scope of p_obj, if set to an object it
+             *                   will execute in the scope of that object
+             *
+             * @static
+             */
+            onDOMReady: function(p_fn, p_obj, p_override) {
+                this.DOMReadyEvent.subscribe(p_fn, p_obj, p_override);
+            },
+
+            /**
+             * Works the same way as onAvailable, but additionally checks the
+             * state of sibling elements to determine if the content of the
+             * available element is safe to modify.
+             *
+             * @method onContentReady
+             *
+             * @param {string}   p_id the id of the element to look for.
+             * @param {function} p_fn what to execute when the element is ready.
+             * @param {object}   p_obj an optional object to be passed back as
+             *                   a parameter to p_fn.
+             * @param {boolean}  p_override If set to true, p_fn will execute
+             *                   in the scope of p_obj
+             *
+             * @static
+             */
+            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();
+            },
+
+            /**
+             * Appends an event handler
+             *
+             * @method addListener
+             *
+             * @param {Object}   el        The html element to assign the 
+             *                             event to
+             * @param {String}   sType     The type of event to append
+             * @param {Function} fn        The method the event invokes
+             * @param {Object}   obj    An arbitrary object that will be 
+             *                             passed as a parameter to the handler
+             * @param {boolean}  override  If true, the obj passed in becomes
+             *                             the execution scope of the listener
+             * @return {boolean} True if the action was successful or defered,
+             *                        false if one or more of the elements 
+             *                        could not have the listener attached,
+             *                        or if the operation throws an exception.
+             * @static
+             */
+            addListener: function(el, sType, fn, obj, override) {
+
+
+                if (!fn || !fn.call) {
+                    return false;
+                }
+
+                // The el argument can be an array of elements or element ids.
+                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 the el argument is a string, we assume it is 
+                    // actually the id of the element.  If the page is loaded
+                    // we convert el to the actual element, otherwise we 
+                    // defer attaching the event until onload event fires
+
+                    // check to see if we need to delay hooking up the event 
+                    // until after the page loads.
+                    if (oEl) {
+                        el = oEl;
+                    } else {
+                        // defer adding the event until the element is available
+                        this.onAvailable(el, function() {
+                           YAHOO.util.Event.on(el, sType, fn, obj, override);
+                        });
+
+                        return true;
+                    }
+                }
+
+                // Element should be an html element or an array if we get 
+                // here.
+                if (!el) {
+                    return false;
+                }
+
+                // we need to make sure we fire registered unload events 
+                // prior to automatically unhooking them.  So we hang on to 
+                // these instead of attaching them to the window and fire the
+                // handles explicitly during our one unload event.
+                if ("unload" == sType && obj !== this) {
+                    unloadListeners[unloadListeners.length] =
+                            [el, sType, fn, obj, override];
+                    return true;
+                }
+
+
+                // if the user chooses to override the scope, we use the custom
+                // object passed in, otherwise the executing scope will be the
+                // HTML element that the event is registered on
+                var scope = el;
+                if (override) {
+                    if (override === true) {
+                        scope = obj;
+                    } else {
+                        scope = override;
+                    }
+                }
+
+                // wrap the function so we can return the obj object when
+                // the event fires;
+                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;
+                // cache the listener so we can try to automatically unload
+                listeners[index] = li;
+
+                if (this.useLegacyEvent(el, sType)) {
+                    var legacyIndex = this.getLegacyIndex(el, sType);
+
+                    // Add a new dom0 wrapper if one is not detected for this
+                    // element
+                    if ( legacyIndex == -1 || 
+                                el != legacyEvents[legacyIndex][0] ) {
+
+                        legacyIndex = legacyEvents.length;
+                        legacyMap[el.id + sType] = legacyIndex;
+
+                        // cache the signature for the DOM0 event, and 
+                        // include the existing handler for the event, if any
+                        legacyEvents[legacyIndex] = 
+                            [el, sType, el["on" + sType]];
+                        legacyHandlers[legacyIndex] = [];
+
+                        el["on" + sType] = 
+                            function(e) {
+                                YAHOO.util.Event.fireLegacyEvent(
+                                    YAHOO.util.Event.getEvent(e), legacyIndex);
+                            };
+                    }
+
+                    // add a reference to the wrapped listener to our custom
+                    // stack of events
+                    //legacyHandlers[legacyIndex].push(index);
+                    legacyHandlers[legacyIndex].push(li);
+
+                } else {
+                    try {
+                        this._simpleAdd(el, sType, wrappedFn, false);
+                    } catch(ex) {
+                        // handle an error trying to attach an event.  If it fails
+                        // we need to clean up the cache
+                        this.lastError = ex;
+                        this.removeListener(el, sType, fn);
+                        return false;
+                    }
+                }
+
+                return true;
+                
+            },
+
+            /**
+             * When using legacy events, the handler is routed to this object
+             * so we can fire our custom listener stack.
+             * @method fireLegacyEvent
+             * @static
+             * @private
+             */
+            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);
+                    }
+                }
+
+                // Fire the original handler if we replaced one.  We fire this
+                // after the other events to keep stopPropagation/preventDefault
+                // that happened in the DOM0 handler from touching our DOM2
+                // substitute
+                le = legacyEvents[legacyIndex];
+                if (le && le[2]) {
+                    le[2](e);
+                }
+                
+                return ok;
+            },
+
+            /**
+             * Returns the legacy event index that matches the supplied 
+             * signature
+             * @method getLegacyIndex
+             * @static
+             * @private
+             */
+            getLegacyIndex: function(el, sType) {
+                var key = this.generateId(el) + sType;
+                if (typeof legacyMap[key] == "undefined") { 
+                    return -1;
+                } else {
+                    return legacyMap[key];
+                }
+            },
+
+            /**
+             * Logic that determines when we should automatically use legacy
+             * events instead of DOM2 events.  Currently this is limited to old
+             * Safari browsers with a broken preventDefault
+             * @method useLegacyEvent
+             * @static
+             * @private
+             */
+            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;
+            },
+                    
+            /**
+             * Removes an event handler
+             *
+             * @method removeListener
+             *
+             * @param {Object} el the html element or the id of the element to 
+             * assign the event to.
+             * @param {String} sType the type of event to remove.
+             * @param {Function} fn the method the event invokes.  If fn is
+             * undefined, then all event handlers for the type of event are 
+             * removed.
+             * @return {boolean} true if the unbind was successful, false 
+             * otherwise.
+             * @static
+             */
+            removeListener: function(el, sType, fn) {
+                var i, len;
+
+                // The el argument can be a string
+                if (typeof el == "string") {
+                    el = this.getEl(el);
+                // The el argument can be an array of elements or element ids.
+                } 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 false;
+                    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;
+
+                // The index is a hidden parameter; needed to remove it from
+                // the method signature because it was tempting users to
+                // try and take advantage of it, which is not possible.
+                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;
+                    }
+                }
+
+                // removed the wrapped handler
+                delete listeners[index][this.WFN];
+                delete listeners[index][this.FN];
+                listeners.splice(index, 1);
+
+                return true;
+
+            },
+
+            /**
+             * Returns the event's target element
+             * @method getTarget
+             * @param {Event} ev the event
+             * @param {boolean} resolveTextNode when set to true the target's
+             *                  parent will be returned if the target is a 
+             *                  text node.  @deprecated, the text node is
+             *                  now resolved automatically
+             * @return {HTMLElement} the event's target
+             * @static
+             */
+            getTarget: function(ev, resolveTextNode) {
+                var t = ev.target || ev.srcElement;
+                return this.resolveTextNode(t);
+            },
+
+            /**
+             * In some cases, some browsers will return a text node inside
+             * the actual element that was targeted.  This normalizes the
+             * return value for getTarget and getRelatedTarget.
+             * @method resolveTextNode
+             * @param {HTMLElement} node node to resolve
+             * @return {HTMLElement} the normized node
+             * @static
+             */
+            resolveTextNode: function(node) {
+                // if (node && node.nodeName && 
+                        // "#TEXT" == node.nodeName.toUpperCase()) {
+                if (node && 3 == node.nodeType) {
+                    return node.parentNode;
+                } else {
+                    return node;
+                }
+            },
+
+            /**
+             * Returns the event's pageX
+             * @method getPageX
+             * @param {Event} ev the event
+             * @return {int} the event's pageX
+             * @static
+             */
+            getPageX: function(ev) {
+                var x = ev.pageX;
+                if (!x && 0 !== x) {
+                    x = ev.clientX || 0;
+
+                    if ( this.isIE ) {
+                        x += this._getScrollLeft();
+                    }
+                }
+
+                return x;
+            },
+
+            /**
+             * Returns the event's pageY
+             * @method getPageY
+             * @param {Event} ev the event
+             * @return {int} the event's pageY
+             * @static
+             */
+            getPageY: function(ev) {
+                var y = ev.pageY;
+                if (!y && 0 !== y) {
+                    y = ev.clientY || 0;
+
+                    if ( this.isIE ) {
+                        y += this._getScrollTop();
+                    }
+                }
+
+
+                return y;
+            },
+
+            /**
+             * Returns the pageX and pageY properties as an indexed array.
+             * @method getXY
+             * @param {Event} ev the event
+             * @return {[x, y]} the pageX and pageY properties of the event
+             * @static
+             */
+            getXY: function(ev) {
+                return [this.getPageX(ev), this.getPageY(ev)];
+            },
+
+            /**
+             * Returns the event's related target 
+             * @method getRelatedTarget
+             * @param {Event} ev the event
+             * @return {HTMLElement} the event's relatedTarget
+             * @static
+             */
+            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);
+            },
+
+            /**
+             * Returns the time of the event.  If the time is not included, the
+             * event is modified using the current time.
+             * @method getTime
+             * @param {Event} ev the event
+             * @return {Date} the time of the event
+             * @static
+             */
+            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;
+            },
+
+            /**
+             * Convenience method for stopPropagation + preventDefault
+             * @method stopEvent
+             * @param {Event} ev the event
+             * @static
+             */
+            stopEvent: function(ev) {
+                this.stopPropagation(ev);
+                this.preventDefault(ev);
+            },
+
+            /**
+             * Stops event propagation
+             * @method stopPropagation
+             * @param {Event} ev the event
+             * @static
+             */
+            stopPropagation: function(ev) {
+                if (ev.stopPropagation) {
+                    ev.stopPropagation();
+                } else {
+                    ev.cancelBubble = true;
+                }
+            },
+
+            /**
+             * Prevents the default behavior of the event
+             * @method preventDefault
+             * @param {Event} ev the event
+             * @static
+             */
+            preventDefault: function(ev) {
+                if (ev.preventDefault) {
+                    ev.preventDefault();
+                } else {
+                    ev.returnValue = false;
+                }
+            },
+             
+            /**
+             * Finds the event in the window object, the caller's arguments, or
+             * in the arguments of another method in the callstack.  This is
+             * executed automatically for events registered through the event
+             * manager, so the implementer should not normally need to execute
+             * this function at all.
+             * @method getEvent
+             * @param {Event} e the event parameter from the handler
+             * @return {Event} the event 
+             * @static
+             */
+            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;
+            },
+
+            /**
+             * Returns the charcode for an event
+             * @method getCharCode
+             * @param {Event} ev the event
+             * @return {int} the event's charCode
+             * @static
+             */
+            getCharCode: function(ev) {
+                return ev.charCode || ev.keyCode || 0;
+            },
+
+            /**
+             * Locating the saved event handler data by function ref
+             *
+             * @method _getCacheIndex
+             * @static
+             * @private
+             */
+            _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;
+            },
+
+            /**
+             * Generates an unique ID for the element if it does not already 
+             * have one.
+             * @method generateId
+             * @param el the element to create the id for
+             * @return {string} the resulting id of the element
+             * @static
+             */
+            generateId: function(el) {
+                var id = el.id;
+
+                if (!id) {
+                    id = "yuievtautoid-" + counter;
+                    ++counter;
+                    el.id = id;
+                }
+
+                return id;
+            },
+
+
+            /**
+             * We want to be able to use getElementsByTagName as a collection
+             * to attach a group of events to.  Unfortunately, different 
+             * browsers return different types of collections.  This function
+             * tests to determine if the object is array-like.  It will also 
+             * fail if the object is an array, but is empty.
+             * @method _isValidCollection
+             * @param o the object to test
+             * @return {boolean} true if the object is array-like and populated
+             * @static
+             * @private
+             */
+            _isValidCollection: function(o) {
+                return ( o                    && // o is something
+                         o.length             && // o is indexed
+                         typeof o != "string" && // o is not a string
+                         !o.tagName           && // o is not an HTML element
+                         !o.alert             && // o is not a window
+                         typeof o[0] != "undefined" );
+
+            },
+
+            /**
+             * @private
+             * @property elCache
+             * DOM element cache
+             * @static
+             * @deprecated Elements are not cached any longer
+             */
+            elCache: {},
+
+            /**
+             * We cache elements bound by id because when the unload event 
+             * fires, we can no longer use document.getElementById
+             * @method getEl
+             * @static
+             * @private
+             * @deprecated Elements are not cached any longer
+             */
+            getEl: function(id) {
+                return document.getElementById(id);
+            },
+
+            /**
+             * Clears the element cache
+             * @deprecated Elements are not cached any longer
+             * @method clearCache
+             * @static
+             * @private
+             */
+            clearCache: function() { },
+
+            /**
+             * Custom event the fires when the dom is initially usable
+             * @event DOMReadyEvent
+             */
+            DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", this),
+
+            /**
+             * hook up any deferred listeners
+             * @method _load
+             * @static
+             * @private
+             */
+            _load: function(e) {
+                if (!loadComplete) {
+                    loadComplete = true;
+                    var EU = YAHOO.util.Event;
+
+                    // just in case DOMReady did not go off for some reason
+                    EU._ready();
+
+                    // Remove the listener to assist with the IE memory issue, but not
+                    // for other browsers because FF 1.0x does not like it.
+                    if (this.isIE) {
+                        EU._simpleRemove(window, "load", EU._load);
+                    }
+                }
+            },
+
+            /**
+             * Fires the DOMReady event listeners the first time the document is
+             * usable.
+             * @method _ready
+             * @static
+             * @private
+             */
+            _ready: function(e) {
+                if (!DOMReady) {
+                    DOMReady=true;
+                    var EU = YAHOO.util.Event;
+
+                    // Fire the content ready custom event
+                    EU.DOMReadyEvent.fire();
+
+                    // Remove the DOMContentLoaded (FF/Opera)
+                    EU._simpleRemove(document, "DOMContentLoaded", EU._ready);
+                }
+            },
+
+            /**
+             * Polling function that runs before the onload event fires, 
+             * attempting to attach to DOM Nodes as soon as they are 
+             * available
+             * @method _tryPreloadAttach
+             * @static
+             * @private
+             */
+            _tryPreloadAttach: function() {
+
+                if (this.locked) {
+                    return false;
+                }
+
+
+                if (this.isIE && !DOMReady) {
+                    return false;
+                }
+
+                this.locked = true;
+
+
+                // keep trying until after the page is loaded.  We need to 
+                // check the page load state prior to trying to bind the 
+                // elements so that we can be certain all elements have been 
+                // tested appropriately
+                var tryAgain = !loadComplete;
+                if (!tryAgain) {
+                    tryAgain = (retryCount > 0);
+                }
+
+                // onAvailable
+                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;
+
+                // onAvailable
+                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);
+                        }
+                    }
+                }
+
+                // onContentReady
+                for (i=0,len=onAvailStack.length; i<len; ++i) {
+                    item = onAvailStack[i];
+                    if (item && item.checkReady) {
+                        el = this.getEl(item.id);
+
+                        if (el) {
+                            // The element is available, but not necessarily ready
+                            // @todo should we test parentNode.nextSibling?
+                            if (loadComplete || el.nextSibling) {
+                                executeItem(el, item);
+                                onAvailStack[i] = null;
+                            }
+                        } else {
+                            notAvail.push(item);
+                        }
+                    }
+                }
+
+                retryCount = (notAvail.length === 0) ? 0 : retryCount - 1;
+
+                if (tryAgain) {
+                    // we may need to strip the nulled out items here
+                    this.startInterval();
+                } else {
+                    clearInterval(this._interval);
+                    this._interval = null;
+                }
+
+                this.locked = false;
+
+                return true;
+
+            },
+
+            /**
+             * Removes all listeners attached to the given element via addListener.
+             * Optionally, the node's children can also be purged.
+             * Optionally, you can specify a specific type of event to remove.
+             * @method purgeElement
+             * @param {HTMLElement} el the element to purge
+             * @param {boolean} recurse recursively purge this element's children
+             * as well.  Use with caution.
+             * @param {string} sType optional type of listener to purge. If
+             * left out, all listeners will be removed
+             * @static
+             */
+            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];
+                        // can't use the index on the changing collection
+                        //this.removeListener(el, l.type, l.fn, l.index);
+                        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);
+                    }
+                }
+            },
+
+            /**
+             * Returns all listeners attached to the given element via addListener.
+             * Optionally, you can specify a specific type of event to return.
+             * @method getListeners
+             * @param el {HTMLElement} the element to inspect 
+             * @param sType {string} optional type of listener to return. If
+             * left out, all listeners will be returned
+             * @return {Object} the listener. Contains the following fields:
+             * &nbsp;&nbsp;type:   (string)   the type of event
+             * &nbsp;&nbsp;fn:     (function) the callback supplied to addListener
+             * &nbsp;&nbsp;obj:    (object)   the custom object supplied to addListener
+             * &nbsp;&nbsp;adjust: (boolean)  whether or not to adjust the default scope
+             * &nbsp;&nbsp;index:  (int)      its position in the Event util listener cache
+             * @static
+             */           
+            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;
+            },
+
+            /**
+             * Removes all listeners registered by pe.event.  Called 
+             * automatically during the unload event.
+             * @method _unload
+             * @static
+             * @private
+             */
+            _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) {
+                    // dereference the element
+                    //delete legacyEvents[i][0];
+                    legacyEvents[i][0] = null;
+
+                    // delete the array item
+                    //delete legacyEvents[i];
+                    legacyEvents[i] = null;
+                }
+
+                legacyEvents = null;
+
+                EU._simpleRemove(window, "unload", EU._unload);
+
+            },
+
+            /**
+             * Returns scrollLeft
+             * @method _getScrollLeft
+             * @static
+             * @private
+             */
+            _getScrollLeft: function() {
+                return this._getScroll()[1];
+            },
+
+            /**
+             * Returns scrollTop
+             * @method _getScrollTop
+             * @static
+             * @private
+             */
+            _getScrollTop: function() {
+                return this._getScroll()[0];
+            },
+
+            /**
+             * Returns the scrollTop and scrollLeft.  Used to calculate the 
+             * pageX and pageY in Internet Explorer
+             * @method _getScroll
+             * @static
+             * @private
+             */
+            _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];
+                }
+            },
+            
+            /**
+             * Used by old versions of CustomEvent, restored for backwards
+             * compatibility
+             * @method regCE
+             * @private
+             */
+            regCE: function() {
+                // does nothing
+            },
+
+            /**
+             * Adds a DOM event directly without the caching, cleanup, scope adj, etc
+             *
+             * @method _simpleAdd
+             * @param {HTMLElement} el      the element to bind the handler to
+             * @param {string}      sType   the type of event handler
+             * @param {function}    fn      the callback to invoke
+             * @param {boolen}      capture capture or bubble phase
+             * @static
+             * @private
+             */
+            _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(){};
+                }
+            }(),
+
+            /**
+             * Basic remove listener
+             *
+             * @method _simpleRemove
+             * @param {HTMLElement} el      the element to bind the handler to
+             * @param {string}      sType   the type of event handler
+             * @param {function}    fn      the callback to invoke
+             * @param {boolen}      capture capture or bubble phase
+             * @static
+             * @private
+             */
+            _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;
+
+        /**
+         * YAHOO.util.Event.on is an alias for addListener
+         * @method on
+         * @see addListener
+         * @static
+         */
+        EU.on = EU.addListener;
+
+        /////////////////////////////////////////////////////////////
+        // DOMReady
+        // based on work by: Dean Edwards/John Resig/Matthias Miller 
+
+        // Internet Explorer: use the readyState of a defered script.
+        // This isolates what appears to be a safe moment to manipulate
+        // the DOM prior to when the document's readyState suggests
+        // it is safe to do so.
+        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;
+
+            // Process onAvailable/onContentReady items when when the 
+            // DOM is ready.
+            YAHOO.util.Event.onDOMReady(
+                    YAHOO.util.Event._tryPreloadAttach,
+                    YAHOO.util.Event, true);
+        
+        // Safari: The document's readyState in Safari currently will
+        // change to loaded/complete before images are loaded.
+        } 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); 
+
+        // FireFox and Opera: These browsers provide a event for this
+        // moment.
+        } else {
+
+            EU._simpleAdd(document, "DOMContentLoaded", EU._ready);
+
+        }
+        /////////////////////////////////////////////////////////////
+
+        EU._simpleAdd(window, "load", EU._load);
+        EU._simpleAdd(window, "unload", EU._unload);
+        EU._tryPreloadAttach();
+    })();
+}
+/**
+ * EventProvider is designed to be used with YAHOO.augment to wrap 
+ * CustomEvents in an interface that allows events to be subscribed to 
+ * and fired by name.  This makes it possible for implementing code to
+ * subscribe to an event that either has not been created yet, or will
+ * not be created at all.
+ *
+ * @Class EventProvider
+ */
+YAHOO.util.EventProvider = function() { };
+
+YAHOO.util.EventProvider.prototype = {
+
+    /**
+     * Private storage of custom events
+     * @property __yui_events
+     * @type Object[]
+     * @private
+     */
+    __yui_events: null,
+
+    /**
+     * Private storage of custom event subscribers
+     * @property __yui_subscribers
+     * @type Object[]
+     * @private
+     */
+    __yui_subscribers: null,
+    
+    /**
+     * Subscribe to a CustomEvent by event type
+     *
+     * @method subscribe
+     * @param p_type     {string}   the type, or name of the event
+     * @param p_fn       {function} the function to exectute when the event fires
+     * @param p_obj
+     * @param p_obj      {Object}   An object to be passed along when the event 
+     *                              fires
+     * @param p_override {boolean}  If true, the obj passed in becomes the 
+     *                              execution scope of the listener
+     */
+    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 } );
+        }
+    },
+
+    /**
+     * Unsubscribes one or more listeners the from the specified event
+     * @method unsubscribe
+     * @param p_type {string}   The type, or name of the event
+     * @param p_fn   {Function} The subscribed function to unsubscribe, if not
+     *                          supplied, all subscribers will be removed.
+     * @param p_obj  {Object}   The custom object passed to subscribe.  This is
+     *                        optional, but if supplied will be used to
+     *                        disambiguate multiple listeners that are the same
+     *                        (e.g., you subscribe many object using a function
+     *                        that lives on the prototype)
+     * @return {boolean} true if the subscriber was found and detached.
+     */
+    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;
+        }
+    },
+    
+    /**
+     * Removes all listeners from the specified event
+     * @method unsubscribeAll
+     * @param p_type {string}   The type, or name of the event
+     */
+    unsubscribeAll: function(p_type) {
+        return this.unsubscribe(p_type);
+    },
+
+    /**
+     * Creates a new custom event of the specified type.  If a custom event
+     * by that name already exists, it will not be re-created.  In either
+     * case the custom event is returned. 
+     *
+     * @method createEvent
+     *
+     * @param p_type {string} the type, or name of the event
+     * @param p_config {object} optional config params.  Valid properties are:
+     *
+     *  <ul>
+     *    <li>
+     *      scope: defines the default execution scope.  If not defined
+     *      the default scope will be this instance.
+     *    </li>
+     *    <li>
+     *      silent: if true, the custom event will not generate log messages.
+     *      This is false by default.
+     *    </li>
+     *    <li>
+     *      onSubscribeCallback: specifies a callback to execute when the
+     *      event has a new subscriber.  This will fire immediately for
+     *      each queued subscriber if any exist prior to the creation of
+     *      the event.
+     *    </li>
+     *  </ul>
+     *
+     *  @return {CustomEvent} the custom event
+     *
+     */
+    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];
+    },
+
+
+   /**
+     * Fire a custom event by name.  The callback functions will be executed
+     * from the scope specified when the event was created, and with the 
+     * following parameters:
+     *   <ul>
+     *   <li>The first argument fire() was executed with</li>
+     *   <li>The custom object (if any) that was passed into the subscribe() 
+     *       method</li>
+     *   </ul>
+     * @method fireEvent
+     * @param p_type    {string}  the type, or name of the event
+     * @param arguments {Object*} an arbitrary set of parameters to pass to 
+     *                            the handler.
+     * @return {boolean} the return value from CustomEvent.fire, or null if 
+     *                   the custom event does not exist.
+     */
+    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;
+        }
+    },
+
+    /**
+     * Returns true if the custom event of the provided type has been created
+     * with createEvent.
+     * @method hasEvent
+     * @param type {string} the type, or name of the event
+     */
+    hasEvent: function(type) {
+        if (this.__yui_events) {
+            if (this.__yui_events[type]) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+};
+
+/**
+* KeyListener is a utility that provides an easy interface for listening for
+* keydown/keyup events fired against DOM elements.
+* @namespace YAHOO.util
+* @class KeyListener
+* @constructor
+* @param {HTMLElement} attachTo The element or element ID to which the key 
+*                               event should be attached
+* @param {String}      attachTo The element or element ID to which the key
+*                               event should be attached
+* @param {Object}      keyData  The object literal representing the key(s) 
+*                               to detect. Possible attributes are 
+*                               shift(boolean), alt(boolean), ctrl(boolean) 
+*                               and keys(either an int or an array of ints 
+*                               representing keycodes).
+* @param {Function}    handler  The CustomEvent handler to fire when the 
+*                               key event is detected
+* @param {Object}      handler  An object literal representing the handler. 
+* @param {String}      event    Optional. The event (keydown or keyup) to 
+*                               listen for. Defaults automatically to keydown.
+*/
+YAHOO.util.KeyListener = function(attachTo, keyData, handler, event) {
+    if (!attachTo) {
+    } else if (!keyData) {
+    } else if (!handler) {
+    } 
+    
+    if (!event) {
+        event = YAHOO.util.KeyListener.KEYDOWN;
+    }
+
+    /**
+    * The CustomEvent fired internally when a key is pressed
+    * @event keyEvent
+    * @private
+    * @param {Object} keyData The object literal representing the key(s) to 
+    *                         detect. Possible attributes are shift(boolean), 
+    *                         alt(boolean), ctrl(boolean) and keys(either an 
+    *                         int or an array of ints representing keycodes).
+    */
+    var keyEvent = new YAHOO.util.CustomEvent("keyPressed");
+    
+    /**
+    * The CustomEvent fired when the KeyListener is enabled via the enable() 
+    * function
+    * @event enabledEvent
+    * @param {Object} keyData The object literal representing the key(s) to 
+    *                         detect. Possible attributes are shift(boolean), 
+    *                         alt(boolean), ctrl(boolean) and keys(either an 
+    *                         int or an array of ints representing keycodes).
+    */
+    this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
+
+    /**
+    * The CustomEvent fired when the KeyListener is disabled via the 
+    * disable() function
+    * @event disabledEvent
+    * @param {Object} keyData The object literal representing the key(s) to 
+    *                         detect. Possible attributes are shift(boolean), 
+    *                         alt(boolean), ctrl(boolean) and keys(either an 
+    *                         int or an array of ints representing keycodes).
+    */
+    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);
+    }
+
+    /**
+    * Handles the key event when a key is pressed.
+    * @method handleKeyPress
+    * @param {DOMEvent} e   The keypress DOM event
+    * @param {Object}   obj The DOM event scope object
+    * @private
+    */
+    function handleKeyPress(e, obj) {
+        if (! keyData.shift) {  
+            keyData.shift = false; 
+        }
+        if (! keyData.alt) {    
+            keyData.alt = false;
+        }
+        if (! keyData.ctrl) {
+            keyData.ctrl = false;
+        }
+
+        // check held down modifying keys first
+        if (e.shiftKey == keyData.shift && 
+            e.altKey   == keyData.alt &&
+            e.ctrlKey  == keyData.ctrl) { // if we pass this, all modifiers match
+            
+            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);
+                }
+            }
+        }
+    }
+
+    /**
+    * Enables the KeyListener by attaching the DOM event listeners to the 
+    * target DOM element
+    * @method enable
+    */
+    this.enable = function() {
+        if (! this.enabled) {
+            YAHOO.util.Event.addListener(attachTo, event, handleKeyPress);
+            this.enabledEvent.fire(keyData);
+        }
+        /**
+        * Boolean indicating the enabled/disabled state of the Tooltip
+        * @property enabled
+        * @type Boolean
+        */
+        this.enabled = true;
+    };
+
+    /**
+    * Disables the KeyListener by removing the DOM event listeners from the 
+    * target DOM element
+    * @method disable
+    */
+    this.disable = function() {
+        if (this.enabled) {
+            YAHOO.util.Event.removeListener(attachTo, event, handleKeyPress);
+            this.disabledEvent.fire(keyData);
+        }
+        this.enabled = false;
+    };
+
+    /**
+    * Returns a String representation of the object.
+    * @method toString
+    * @return {String}  The string representation of the KeyListener
+    */ 
+    this.toString = function() {
+        return "KeyListener [" + keyData.keys + "] " + attachTo.tagName + 
+                (attachTo.id ? "[" + attachTo.id + "]" : "");
+    };
+
+};
+
+/**
+* Constant representing the DOM "keydown" event.
+* @property YAHOO.util.KeyListener.KEYDOWN
+* @static
+* @final
+* @type String
+*/
+YAHOO.util.KeyListener.KEYDOWN = "keydown";
+
+/**
+* Constant representing the DOM "keyup" event.
+* @property YAHOO.util.KeyListener.KEYUP
+* @static
+* @final
+* @type String
+*/
+YAHOO.util.KeyListener.KEYUP = "keyup";
+YAHOO.register("event", YAHOO.util.Event, {version: "2.2.1", build: "193"});

Modified: jifty/trunk/share/web/static/js/yui/tabview.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/tabview.js	(original)
+++ jifty/trunk/share/web/static/js/yui/tabview.js	Thu Apr 12 03:32:44 2007
@@ -1,1950 +1,1021 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.0
-*/
-(function() {
-
-    YAHOO.util.Lang = {
-        isArray: function(val) { // frames lose type, so test constructor string
-            if (val.constructor && val.constructor.toString().indexOf('Array') > -1) {
-                return true;
-            } else {
-                return YAHOO.util.Lang.isObject(val) && val.constructor == Array;
-            }
-        },
-
-        isBoolean: function(val) {
-            return typeof val == 'boolean';
-        },
-
-        isFunction: function(val) {
-            return typeof val == 'function';
-        },
-
-        isNull: function(val) {
-            return val === null;
-        },
-
-        isNumber: function(val) {
-            return !isNaN(val);
-        },
-
-        isObject: function(val) {
-            return typeof val == 'object' || YAHOO.util.Lang.isFunction(val);
-        },
-
-        isString: function(val) {
-            return typeof val == 'string';
-        },
-
-        isUndefined: function(val) {
-            return typeof val == 'undefined';
-        }
-    };
-})();/**
- * Provides Attribute configurations.
- * @namespace YAHOO.util
- * @class Attribute
- * @constructor
- * @param hash {Object} The intial Attribute.
- * @param {YAHOO.util.AttributeProvider} The owner of the Attribute instance.
- */
-
-YAHOO.util.Attribute = function(hash, owner) {
-    if (owner) {
-        this.owner = owner;
-        this.configure(hash, true);
-    }
-};
-
-YAHOO.util.Attribute.prototype = {
-	/**
-     * The name of the attribute.
-	 * @property name
-	 * @type String
-	 */
-    name: undefined,
-
-	/**
-     * The value of the attribute.
-	 * @property value
-	 * @type String
-	 */
-    value: null,
-
-	/**
-     * The owner of the attribute.
-	 * @property owner
-	 * @type YAHOO.util.AttributeProvider
-	 */
-    owner: null,
-
-	/**
-     * Whether or not the attribute is read only.
-	 * @property readOnly
-	 * @type Boolean
-	 */
-    readOnly: false,
-
-	/**
-     * Whether or not the attribute can only be written once.
-	 * @property writeOnce
-	 * @type Boolean
-	 */
-    writeOnce: false,
-
-	/**
-     * The attribute's initial configuration.
-     * @private
-	 * @property _initialConfig
-	 * @type Object
-	 */
-    _initialConfig: null,
-
-	/**
-     * Whether or not the attribute's value has been set.
-     * @private
-	 * @property _written
-	 * @type Boolean
-	 */
-    _written: false,
-
-	/**
-     * The method to use when setting the attribute's value.
-     * The method recieves the new value as the only argument.
-	 * @property method
-	 * @type Function
-	 */
-    method: null,
-
-	/**
-     * The validator to use when setting the attribute's value.
-	 * @property validator
-	 * @type Function
-     * @return Boolean
-	 */
-    validator: null,
-
-    /**
-     * Retrieves the current value of the attribute.
-     * @method getValue
-     * @return {any} The current value of the attribute.
-     */
-    getValue: function() {
-        return this.value;
-    },
-
-    /**
-     * Sets the value of the attribute and fires beforeChange and change events.
-     * @method setValue
-     * @param {Any} value The value to apply to the attribute.
-     * @param {Boolean} silent If true the change events will not be fired.
-     * @return {Boolean} Whether or not the value was set.
-     */
-    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; // write not allowed
-        }
-
-        if (this.validator && !this.validator.call(owner, value) ) {
-            return false; // invalid value
-        }
-
-        if (!silent) {
-            beforeRetVal = owner.fireBeforeChangeEvent(event);
-            if (beforeRetVal === false) {
-                YAHOO.log('setValue ' + name +
-                        'cancelled by beforeChange event', 'info', 'Attribute');
-                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;
-    },
-
-    /**
-     * Allows for configuring the Attribute's properties.
-     * @method configure
-     * @param {Object} map A key-value map of Attribute properties.
-     * @param {Boolean} init Whether or not this should become the initial config.
-     */
-    configure: function(map, init) {
-        map = map || {};
-        this._written = false; // reset writeOnce
-        this._initialConfig = this._initialConfig || {};
-
-        for (var key in map) {
-            if ( key && map.hasOwnProperty(key) ) {
-                this[key] = map[key];
-                if (init) {
-                    this._initialConfig[key] = map[key];
-                }
-            }
-        }
-    },
-
-    /**
-     * Resets the value to the initial config value.
-     * @method resetValue
-     * @return {Boolean} Whether or not the value was set.
-     */
-    resetValue: function() {
-        return this.setValue(this._initialConfig.value);
-    },
-
-    /**
-     * Resets the attribute config to the initial config state.
-     * @method resetConfig
-     */
-    resetConfig: function() {
-        this.configure(this._initialConfig);
-    },
-
-    /**
-     * Resets the value to the current value.
-     * Useful when values may have gotten out of sync with actual properties.
-     * @method refresh
-     * @return {Boolean} Whether or not the value was set.
-     */
-    refresh: function(silent) {
-        this.setValue(this.value, silent);
-    }
-};(function() {
-    var Lang = YAHOO.util.Lang;
-
-    /*
-    Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-    Code licensed under the BSD License:
-    http://developer.yahoo.net/yui/license.txt
-    */
-
-    /**
-     * Provides and manages YAHOO.util.Attribute instances
-     * @namespace YAHOO.util
-     * @class AttributeProvider
-     * @uses YAHOO.util.EventProvider
-     */
-    YAHOO.util.AttributeProvider = function() {};
-
-    YAHOO.util.AttributeProvider.prototype = {
-
-        /**
-         * A key-value map of Attribute configurations
-         * @property _configs
-         * @protected (may be used by subclasses and augmentors)
-         * @private
-         * @type {Object}
-         */
-        _configs: null,
-        /**
-         * Returns the current value of the attribute.
-         * @method get
-         * @param {String} key The attribute whose value will be returned.
-         */
-        get: function(key){
-            var configs = this._configs || {};
-            var config = configs[key];
-
-            if (!config) {
-                YAHOO.log(key + ' not found', 'error', 'AttributeProvider');
-                return undefined;
-            }
-
-            return config.value;
-        },
-
-        /**
-         * Sets the value of a config.
-         * @method set
-         * @param {String} key The name of the attribute
-         * @param {Any} value The value to apply to the attribute
-         * @param {Boolean} silent Whether or not to suppress change events
-         * @return {Boolean} Whether or not the value was set.
-         */
-        set: function(key, value, silent){
-            var configs = this._configs || {};
-            var config = configs[key];
-
-            if (!config) {
-                YAHOO.log('set failed: ' + key + ' not found',
-                        'error', 'AttributeProvider');
-                return false;
-            }
-
-            return config.setValue(value, silent);
-        },
-
-        /**
-         * Returns an array of attribute names.
-         * @method getAttributeKeys
-         * @return {Array} An array of attribute names.
-         */
-        getAttributeKeys: function(){
-            var configs = this._configs;
-            var keys = [];
-            var config;
-            for (var key in configs) {
-                config = configs[key];
-                if ( configs.hasOwnProperty(key) &&
-                        !Lang.isUndefined(config) ) {
-                    keys[keys.length] = key;
-                }
-            }
-
-            return keys;
-        },
-
-        /**
-         * Sets multiple attribute values.
-         * @method setAttributes
-         * @param {Object} map  A key-value map of attributes
-         * @param {Boolean} silent Whether or not to suppress change events
-         */
-        setAttributes: function(map, silent){
-            for (var key in map) {
-                if ( map.hasOwnProperty(key) ) {
-                    this.set(key, map[key], silent);
-                }
-            }
-        },
-
-        /**
-         * Resets the specified attribute's value to its initial value.
-         * @method resetValue
-         * @param {String} key The name of the attribute
-         * @param {Boolean} silent Whether or not to suppress change events
-         * @return {Boolean} Whether or not the value was set
-         */
-        resetValue: function(key, silent){
-            var configs = this._configs || {};
-            if (configs[key]) {
-                this.set(key, configs[key]._initialConfig.value, silent);
-                return true;
-            }
-            return false;
-        },
-
-        /**
-         * Sets the attribute's value to its current value.
-         * @method refresh
-         * @param {String | Array} key The attribute(s) to refresh
-         * @param {Boolean} silent Whether or not to suppress change events
-         */
-        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 ( // only set if there is a value and not null
-                    configs[key[i]] &&
-                    ! Lang.isUndefined(configs[key[i]].value) &&
-                    ! Lang.isNull(configs[key[i]].value) ) {
-                    configs[key[i]].refresh(silent);
-                }
-            }
-        },
-
-        /**
-         * Adds an Attribute to the AttributeProvider instance.
-         * @method register
-         * @param {String} key The attribute's name
-         * @param {Object} map A key-value map containing the
-         * attribute's properties.
-         */
-        register: function(key, map) {
-            this._configs = this._configs || {};
-
-            if (this._configs[key]) { // dont override
-                return false;
-            }
-
-            map.name = key;
-            this._configs[key] = new YAHOO.util.Attribute(map, this);
-            return true;
-        },
-
-        /**
-         * Returns the attribute's properties.
-         * @method getAttributeConfig
-         * @param {String} key The attribute's name
-         * @private
-         * @return {object} A key-value map containing all of the
-         * attribute's properties.
-         */
-        getAttributeConfig: function(key) {
-            var configs = this._configs || {};
-            var config = configs[key] || {};
-            var map = {}; // returning a copy to prevent overrides
-
-            for (key in config) {
-                if ( config.hasOwnProperty(key) ) {
-                    map[key] = config[key];
-                }
-            }
-
-            return map;
-        },
-
-        /**
-         * Sets or updates an Attribute instance's properties.
-         * @method configureAttribute
-         * @param {String} key The attribute's name.
-         * @param {Object} map A key-value map of attribute properties
-         * @param {Boolean} init Whether or not this should become the intial config.
-         */
-        configureAttribute: function(key, map, init) {
-            var configs = this._configs || {};
-
-            if (!configs[key]) {
-                YAHOO.log('unable to configure, ' + key + ' not found',
-                        'error', 'AttributeProvider');
-                return false;
-            }
-
-            configs[key].configure(map, init);
-        },
-
-        /**
-         * Resets an attribute to its intial configuration.
-         * @method resetAttributeConfig
-         * @param {String} key The attribute's name.
-         * @private
-         */
-        resetAttributeConfig: function(key){
-            var configs = this._configs || {};
-            configs[key].resetConfig();
-        },
-
-        /**
-         * Fires the attribute's beforeChange event.
-         * @method fireBeforeChangeEvent
-         * @param {String} key The attribute's name.
-         * @param {Obj} e The event object to pass to handlers.
-         */
-        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);
-        },
-
-        /**
-         * Fires the attribute's change event.
-         * @method fireChangeEvent
-         * @param {String} key The attribute's name.
-         * @param {Obj} e The event object to pass to the handlers.
-         */
-        fireChangeEvent: function(e) {
-            e.type += 'Change';
-            return this.fireEvent(e.type, e);
-        }
-    };
-
-    YAHOO.augment(YAHOO.util.AttributeProvider, YAHOO.util.EventProvider);
-})();(function() {
-// internal shorthand
-var Dom = YAHOO.util.Dom,
-    Lang = YAHOO.util.Lang,
-    EventPublisher = YAHOO.util.EventPublisher,
-    AttributeProvider = YAHOO.util.AttributeProvider;
-
-/**
- * Element provides an interface to an HTMLElement's attributes and common
- * methods.  Other commonly used attributes are added as well.
- * @namespace YAHOO.util
- * @class Element
- * @uses YAHOO.util.AttributeProvider
- * @constructor
- * @param el {HTMLElement | String} The html element that
- * represents the Element.
- * @param {Object} map A key-value map of initial config names and values
- */
-YAHOO.util.Element = function(el, map) {
-    if (arguments.length) {
-        this.init(el, map);
-    }
-};
-
-YAHOO.util.Element.prototype = {
-	/**
-     * Dom events supported by the Element instance.
-	 * @property DOM_EVENTS
-	 * @type Object
-	 */
-    DOM_EVENTS: null,
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method appendChild
-	 * @param {Boolean} deep Whether or not to do a deep clone
-	 */
-    appendChild: function(child) {
-        child = child.get ? child.get('element') : child;
-        this.get('element').appendChild(child);
-    },
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method getElementsByTagName
-	 * @param {String} tag The tagName to collect
-	 */
-    getElementsByTagName: function(tag) {
-        return this.get('element').getElementsByTagName(tag);
-    },
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method hasChildNodes
-	 * @return {Boolean} Whether or not the element has childNodes
-	 */
-    hasChildNodes: function() {
-        return this.get('element').hasChildNodes();
-    },
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method insertBefore
-	 * @param {HTMLElement} element The HTMLElement to insert
-	 * @param {HTMLElement} before The HTMLElement to insert
-     * the element before.
-	 */
-    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);
-    },
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method removeChild
-	 * @param {HTMLElement} child The HTMLElement to remove
-	 */
-    removeChild: function(child) {
-        child = child.get ? child.get('element') : child;
-        this.get('element').removeChild(child);
-        return true;
-    },
-
-	/**
-     * Wrapper for HTMLElement method.
-	 * @method replaceChild
-	 * @param {HTMLElement} newNode The HTMLElement to insert
-	 * @param {HTMLElement} oldNode The HTMLElement to replace
-	 */
-    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);
-    },
-
-
-    /**
-     * Registers Element specific attributes.
-     * @method initAttributes
-     * @param {Object} map A key-value map of initial attribute configs
-     */
-    initAttributes: function(map) {
-        map = map || {};
-        var element = Dom.get(map.element) || null;
-
-        /**
-         * The HTMLElement the Element instance refers to.
-         * @config element
-         * @type HTMLElement
-         */
-        this.register('element', {
-            value: element,
-            readOnly: true
-         });
-    },
-
-    /**
-     * Adds a listener for the given event.  These may be DOM or
-     * customEvent listeners.  Any event that is fired via fireEvent
-     * can be listened for.  All handlers receive an event object.
-     * @method addListener
-     * @param {String} type The name of the event to listen for
-     * @param {Function} fn The handler to call when the event fires
-     * @param {Any} obj A variable to pass to the handler
-     * @param {Object} scope The object to use for the scope of the handler
-     */
-    addListener: function(type, fn, obj, scope) {
-        var el = this.get('element');
-        var scope = scope || this;
-
-        el = this.get('id') || el;
-
-        if (!this._events[type]) { // create on the fly
-            if ( this.DOM_EVENTS[type] ) {
-                YAHOO.util.Event.addListener(el, type, function(e) {
-                    if (e.srcElement && !e.target) { // supplement IE with target
-                        e.target = e.srcElement;
-                    }
-                    this.fireEvent(type, e);
-                }, obj, scope);
-            }
-
-            this.createEvent(type, this);
-            this._events[type] = true;
-        }
-
-        this.subscribe.apply(this, arguments); // notify via customEvent
-    },
-
-
-    /**
-     * Alias for addListener
-     * @method on
-     * @param {String} type The name of the event to listen for
-     * @param {Function} fn The function call when the event fires
-     * @param {Any} obj A variable to pass to the handler
-     * @param {Object} scope The object to use for the scope of the handler
-     */
-    on: function() { this.addListener.apply(this, arguments); },
-
-
-    /**
-     * Remove an event listener
-     * @method removeListener
-     * @param {String} type The name of the event to listen for
-     * @param {Function} fn The function call when the event fires
-     */
-    removeListener: function(type, fn) {
-        this.unsubscribe.apply(this, arguments);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method addClass
-	 * @param {String} className The className to add
-	 */
-    addClass: function(className) {
-        Dom.addClass(this.get('element'), className);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method getElementsByClassName
-	 * @param {String} className The className to collect
-	 * @param {String} tag (optional) The tag to use in
-     * conjunction with class name
-     * @return {Array} Array of HTMLElements
-	 */
-    getElementsByClassName: function(className, tag) {
-        return Dom.getElementsByClassName(className, tag,
-                this.get('element') );
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method hasClass
-	 * @param {String} className The className to add
-     * @return {Boolean} Whether or not the element has the class name
-	 */
-    hasClass: function(className) {
-        return Dom.hasClass(this.get('element'), className);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method removeClass
-	 * @param {String} className The className to remove
-	 */
-    removeClass: function(className) {
-        return Dom.removeClass(this.get('element'), className);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method replaceClass
-	 * @param {String} oldClassName The className to replace
-	 * @param {String} newClassName The className to add
-	 */
-    replaceClass: function(oldClassName, newClassName) {
-        return Dom.replaceClass(this.get('element'),
-                oldClassName, newClassName);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method setStyle
-	 * @param {String} property The style property to set
-	 * @param {String} value The value to apply to the style property
-	 */
-    setStyle: function(property, value) {
-        return Dom.setStyle(this.get('element'),  property, value);
-    },
-
-	/**
-     * Wrapper for Dom method.
-	 * @method getStyle
-	 * @param {String} property The style property to retrieve
-	 * @return {String} The current value of the property
-	 */
-    getStyle: function(property) {
-        return Dom.getStyle(this.get('element'),  property);
-    },
-
-	/**
-     * Apply any queued set calls.
-	 * @method fireQueue
-	 */
-    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]);
-        }
-    },
-
-	/**
-     * Appends the HTMLElement into either the supplied parentNode.
-	 * @method appendTo
-	 * @param {HTMLElement | Element} parentNode The node to append to
-	 * @param {HTMLElement | Element} before An optional node to insert before
-	 */
-    appendTo: function(parent, before) {
-        parent = (parent.get) ?  parent.get('element') : Dom.get(parent);
-
-        before = (before && before.get) ?
-                before.get('element') : Dom.get(before);
-        var element = this.get('element');
-
-        var newAddition =  !Dom.inDocument(element);
-
-        if (!element) {
-            YAHOO.log('appendTo failed: element not available',
-                    'error', 'Element');
-            return false;
-        }
-
-        if (!parent) {
-            YAHOO.log('appendTo failed: parent not available',
-                    'error', 'Element');
-            return false;
-        }
-
-        if (element.parent != parent) {
-            if (before) {
-                parent.insertBefore(element, before);
-            } else {
-                parent.appendChild(element);
-            }
-        }
-
-        YAHOO.log(element + 'appended to ' + parent);
-
-        if (!newAddition) {
-            return false; // note return; no refresh if in document
-        }
-
-        // if a new addition, refresh HTMLElement any applied attributes
-        var keys = this.getAttributeKeys();
-
-        for (var key in keys) { // only refresh HTMLElement attributes
-            if ( !Lang.isUndefined(element[key]) ) {
-                this.refresh(key);
-            }
-        }
-    },
-
-    get: function(key) {
-        var configs = this._configs || {};
-        var el = configs.element; // avoid loop due to 'element'
-        if (el && !configs[key] && !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[key] = ['set', arguments];
-            return false;
-        }
-
-        // set it on the element if not a property
-        if ( !this._configs[key] && !Lang.isUndefined(el[key]) ) {
-            _registerHTMLAttr(this, key);
-        }
-
-        return AttributeProvider.prototype.set.apply(this, arguments);
-    },
-
-    register: function(key) { // protect html attributes
-        var configs = this._configs || {};
-        var element = this.get('element') || null;
-
-        if ( element && !Lang.isUndefined(element[key]) ) {
-            YAHOO.log(key + ' is reserved for ' + element,
-                    'error', 'Element');
-            return false;
-        }
-
-        return AttributeProvider.prototype.register.apply(this, arguments);
-    },
-
-    configureAttribute: function(property, map, init) { // protect html attributes
-        if (!this._configs[property] && this._configs.element &&
-                !Lang.isUndefined(this._configs.element[property]) ) {
-            _registerHTMLAttr(this, property, map);
-            return false;
-        }
-
-        return AttributeProvider.prototype.configure.apply(this, arguments);
-    },
-
-    getAttributeKeys: function() {
-        var el = this.get('element');
-        var keys = AttributeProvider.prototype.getAttributeKeys.call(this);
-
-        //add any unconfigured element keys
-        for (var key in el) {
-            if (!this._configs[key]) {
-                keys[key] = keys[key] || el[key];
-            }
-        }
-
-        return keys;
-    },
-
-    init: 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,
-            'keydown': true,
-            'keypress': true,
-            'keyup': true,
-            'mousedown': true,
-            'mousemove': true,
-            'mouseout': true,
-            'mouseover': true,
-            'mouseup': true
-        };
-
-        var readyHandler = function() {
-            this.initAttributes(attr);
-
-            this.setAttributes(attr, true);
-            this.fireQueue();
-            this.fireEvent('contentReady', {
-                type: 'contentReady',
-                target: attr.element
-            });
-        };
-
-        if ( Lang.isString(el) ) {
-            _registerHTMLAttr(this, 'id', { value: el });
-            YAHOO.util.Event.onAvailable(el, function() {
-                attr.element = Dom.get(el);
-                this.fireEvent('available', {
-                    type: 'available',
-                    target: attr.element
-                });
-            }, this, true);
-
-            YAHOO.util.Event.onContentReady(el, function() {
-                readyHandler.call(this);
-            }, this, true);
-        } else {
-            readyHandler.call(this);
-        }
-    }
-};
-
-/**
- * Sets the value of the property and fires beforeChange and change events.
- * @private
- * @method _registerHTMLAttr
- * @param {YAHOO.util.Element} element The Element instance to
- * register the config to.
- * @param {String} key The name of the config to register
- * @param {Object} map A key-value map of the config's params
- */
-var _registerHTMLAttr = function(self, key, map) {
-    var el = self.get('element');
-    map = map || {};
-    map.name = key;
-    map.method = map.method || function(value) {
-        el[key] = value;
-    };
-    map.value = map.value || el[key];
-    self._configs[key] = new YAHOO.util.Attribute(map, self);
-};
-
-/**
- * Fires when the Element's HTMLElement can be retrieved by Id.
- * <p>See: <a href="#addListener">Element.addListener</a></p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> available<br>
- * <code>&lt;HTMLElement&gt;
- * target</code> the HTMLElement bound to this Element instance<br>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var target = e.target};<br>
- * myTabs.addListener('available', handler);</code></p>
- * @event available
- */
-
-/**
- * Fires when the Element's HTMLElement subtree is rendered.
- * <p>See: <a href="#addListener">Element.addListener</a></p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> contentReady<br>
- * <code>&lt;HTMLElement&gt;
- * target</code> the HTMLElement bound to this Element instance<br>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var target = e.target};<br>
- * myTabs.addListener('contentReady', handler);</code></p>
- * @event contentReady
- */
-
-YAHOO.augment(YAHOO.util.Element, AttributeProvider);
-})();(function() {
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.util.Lang;
-
-    /**
-     * A representation of a Tab's label and content.
-     * @namespace YAHOO.widget
-     * @class Tab
-     * @extends YAHOO.util.Element
-     * @constructor
-     * @param element {HTMLElement | String} (optional) The html element that
-     * represents the TabView. An element will be created if none provided.
-     * @param {Object} properties A key map of initial properties
-     */
-    Tab = function(el, attr) {
-        attr = attr || {};
-        if (arguments.length == 1 && !Lang.isString(el) && !el.nodeName) {
-            attr = el;
-            el = attr.element;
-        }
-
-        if (!el && !attr.element) {
-            el = _createTabElement.call(this, attr);
-        }
-
-        this.loadHandler =  {
-            success: function(o) {
-                this.set('content', o.responseText);
-            },
-            failure: function(o) {
-                YAHOO.log('loading failed: ' + o.statusText,
-                        'error', 'Tab');
-            }
-        };
-
-        Tab.superclass.constructor.call(this, el, attr);
-
-        this.DOM_EVENTS = {}; // delegating to tabView
-    };
-
-    YAHOO.extend(Tab, YAHOO.util.Element);
-    var proto = Tab.prototype;
-
-    /**
-     * The default tag name for a Tab's inner element.
-     * @property LABEL_INNER_TAGNAME
-     * @type String
-     * @default "em"
-     */
-    proto.LABEL_TAGNAME = 'em';
-
-    /**
-     * The class name applied to active tabs.
-     * @property ACTIVE_CLASSNAME
-     * @type String
-     * @default "on"
-     */
-    proto.ACTIVE_CLASSNAME = 'selected';
-
-    /**
-     * The class name applied to disabled tabs.
-     * @property DISABLED_CLASSNAME
-     * @type String
-     * @default "disabled"
-     */
-    proto.DISABLED_CLASSNAME = 'disabled';
-
-    /**
-     * The class name applied to dynamic tabs while loading.
-     * @property LOADING_CLASSNAME
-     * @type String
-     * @default "disabled"
-     */
-    proto.LOADING_CLASSNAME = 'loading';
-
-    /**
-     * Provides a reference to the connection request object when data is
-     * loaded dynamically.
-     * @property dataConnection
-     * @type Object
-     */
-    proto.dataConnection = null;
-
-    /**
-     * Object containing success and failure callbacks for loading data.
-     * @property loadHandler
-     * @type object
-     */
-    proto.loadHandler = null;
-
-    /**
-     * Provides a readable name for the tab.
-     * @method toString
-     * @return String
-     */
-    proto.toString = function() {
-        var el = this.get('element');
-        var id = el.id || el.tagName;
-        return "Tab " + id;
-    };
-
-    /**
-     * Registers TabView specific properties.
-     * @method initAttributes
-     * @param {Object} attr Hash of initial attributes
-     */
-    proto.initAttributes = function(attr) {
-        attr = attr || {};
-        Tab.superclass.initAttributes.call(this, attr);
-
-        var el = this.get('element');
-
-        /**
-         * The event that triggers the tab's activation.
-         * @config activationEvent
-         * @type String
-         */
-        this.register('activationEvent', {
-            value: attr.activationEvent || 'click'
-        });
-
-        /**
-         * The element that contains the tab's label.
-         * @config labelEl
-         * @type HTMLElement
-         */
-        this.register('labelEl', {
-            value: attr.labelEl || _getlabelEl.call(this),
-            method: function(value) {
-                var current = this.get('labelEl');
-
-                if (current) {
-                    if (current == value) {
-                        return false; // already set
-                    }
-
-                    this.replaceChild(value, current);
-                } else if (el.firstChild) { // ensure label is firstChild by default
-                    this.insertBefore(value, el.firstChild);
-                } else {
-                    this.appendChild(value);
-                }
-            }
-        });
-
-        /**
-         * The tab's label text (or innerHTML).
-         * @config label
-         * @type String
-         */
-        this.register('label', {
-            value: attr.label || _getLabel.call(this),
-            method: function(value) {
-                var labelEl = this.get('labelEl');
-                if (!labelEl) { // create if needed
-                    this.set('labelEl', _createlabelEl.call(this));
-                }
-
-                _setLabel.call(this, value);
-            }
-        });
-
-        /**
-         * The HTMLElement that contains the tab's content.
-         * @config contentEl
-         * @type HTMLElement
-         */
-        this.register('contentEl', { // TODO: apply className?
-            value: attr.contentEl || document.createElement('div'),
-            method: function(value) {
-                var current = this.get('contentEl');
-
-                if (current) {
-                    if (current == value) {
-                        return false; // already set
-                    }
-                    this.replaceChild(value, current);
-                }
-            }
-        });
-
-        /**
-         * The tab's content.
-         * @config content
-         * @type String
-         */
-        this.register('content', {
-            value: attr.content, // TODO: what about existing?
-            method: function(value) {
-                this.get('contentEl').innerHTML = value;
-            }
-        });
-
-        var _dataLoaded = false;
-
-        /**
-         * The tab's data source, used for loading content dynamically.
-         * @config dataSrc
-         * @type String
-         */
-        this.register('dataSrc', {
-            value: attr.dataSrc
-        });
-
-        /**
-         * Whether or not content should be reloaded for every view.
-         * @config cacheData
-         * @type Boolean
-         * @default false
-         */
-        this.register('cacheData', {
-            value: attr.cacheData || false,
-            validator: Lang.isBoolean
-        });
-
-        /**
-         * The method to use for the data request.
-         * @config loadMethod
-         * @type String
-         * @default "GET"
-         */
-        this.register('loadMethod', {
-            value: attr.loadMethod || 'GET',
-            validator: Lang.isString
-        });
-
-        /**
-         * Whether or not any data has been loaded from the server.
-         * @config dataLoaded
-         * @type Boolean
-         */
-        this.register('dataLoaded', {
-            value: false,
-            validator: Lang.isBoolean,
-            writeOnce: true
-        });
-
-        /**
-         * Number if milliseconds before aborting and calling failure handler.
-         * @config dataTimeout
-         * @type Number
-         * @default null
-         */
-        this.register('dataTimeout', {
-            value: attr.dataTimeout || null,
-            validator: Lang.isNumber
-        });
-
-        /**
-         * Whether or not the tab is currently active.
-         * If a dataSrc is set for the tab, the content will be loaded from
-         * the given source.
-         * @config active
-         * @type Boolean
-         */
-        this.register('active', {
-            value: attr.active || this.hasClass(this.ACTIVE_CLASSNAME),
-            method: function(value) {
-                if (value === true) {
-                    this.addClass(this.ACTIVE_CLASSNAME);
-                    this.set('title', 'active');
-                } else {
-                    this.removeClass(this.ACTIVE_CLASSNAME);
-                    this.set('title', '');
-                }
-            },
-            validator: function(value) {
-                return Lang.isBoolean(value) && !this.get('disabled') ;
-            }
-        });
-
-        /**
-         * Whether or not the tab is disabled.
-         * @config disabled
-         * @type Boolean
-         */
-        this.register('disabled', {
-            value: attr.disabled || this.hasClass(this.DISABLED_CLASSNAME),
-            method: function(value) {
-                if (value === true) {
-                    Dom.addClass(this.get('element'), this.DISABLED_CLASSNAME);
-                } else {
-                    Dom.removeClass(this.get('element'), this.DISABLED_CLASSNAME);
-                }
-            },
-            validator: Lang.isBoolean
-        });
-
-        /**
-         * The href of the tab's anchor element.
-         * @config href
-         * @type String
-         * @default '#'
-         */
-        this.register('href', {
-            value: attr.href || '#',
-            method: function(value) {
-                this.getElementsByTagName('a')[0].href = value;
-            },
-            validator: Lang.isString
-        });
-
-        /**
-         * The Whether or not the tab's content is visible.
-         * @config contentVisible
-         * @type Boolean
-         * @default false
-         */
-        this.register('contentVisible', {
-            value: attr.contentVisible,
-            method: function(value) {
-                if (value == true) {
-                    this.get('contentEl').style.display = 'block';
-
-                    if ( this.get('dataSrc') ) {
-                     // load dynamic content unless already loaded and caching
-                        if ( !this.get('dataLoaded') || !this.get('cacheData') ) {
-                            _dataConnect.call(this);
-                        }
-                    }
-                } else {
-                    this.get('contentEl').style.display = 'none';
-                }
-            },
-            validator: Lang.isBoolean
-        });
-    };
-
-    var _createTabElement = function(attr) {
-        var el = document.createElement('li');
-        var a = document.createElement('a');
-
-        a.href = attr.href || '#';
-
-        el.appendChild(a);
-
-        var label = attr.label || null;
-        var labelEl = attr.labelEl || null;
-
-        if (labelEl) { // user supplied labelEl
-            if (!label) { // user supplied label
-                label = _getLabel.call(this, labelEl);
-            }
-        } else {
-            labelEl = _createlabelEl.call(this);
-        }
-
-        a.appendChild(labelEl);
-
-        return el;
-    };
-
-    var _getlabelEl = function() {
-        return this.getElementsByTagName(this.LABEL_TAGNAME)[0];
-    };
-
-    var _createlabelEl = function() {
-        var el = document.createElement(this.LABEL_TAGNAME);
-        return el;
-    };
-
-    var _setLabel = function(label) {
-        var el = this.get('labelEl');
-        el.innerHTML = label;
-    };
-
-    var _getLabel = function() {
-        var label,
-            el = this.get('labelEl');
-
-            if (!el) {
-                return undefined;
-            }
-
-        return el.innerHTML;
-    };
-
-    var _dataConnect = function() {
-        if (!YAHOO.util.Connect) {
-            YAHOO.log('YAHOO.util.Connect dependency not met',
-                    'error', 'Tab');
-            return false;
-        }
-
-        Dom.addClass(this.get('contentEl').parentNode, this.LOADING_CLASSNAME);
-
-        this.dataConnection = YAHOO.util.Connect.asyncRequest(
-            this.get('loadMethod'),
-            this.get('dataSrc'),
-            {
-                success: function(o) {
-                    this.loadHandler.success.call(this, o);
-                    this.set('dataLoaded', true);
-                    this.dataConnection = null;
-                    Dom.removeClass(this.get('contentEl').parentNode,
-                            this.LOADING_CLASSNAME);
-                },
-                failure: function(o) {
-                    this.loadHandler.failure.call(this, o);
-                    this.dataConnection = null;
-                    Dom.removeClass(this.get('contentEl').parentNode,
-                            this.LOADING_CLASSNAME);
-                },
-                scope: this,
-                timeout: this.get('dataTimeout')
-            }
-        );
-    };
-
-    YAHOO.widget.Tab = Tab;
-
-    /**
-     * Fires before the active state is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p>If handler returns false, the change will be cancelled, and the value will not
-     * be set.</p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> beforeActiveChange<br>
-     * <code>&lt;Boolean&gt;
-     * prevValue</code> the current value<br>
-     * <code>&lt;Boolean&gt;
-     * newValue</code> the new value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('beforeActiveChange', handler);</code></p>
-     * @event beforeActiveChange
-     */
-
-    /**
-     * Fires after the active state is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> activeChange<br>
-     * <code>&lt;Boolean&gt;
-     * prevValue</code> the previous value<br>
-     * <code>&lt;Boolean&gt;
-     * newValue</code> the updated value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('activeChange', handler);</code></p>
-     * @event activeChange
-     */
-
-    /**
-     * Fires before the tab label is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p>If handler returns false, the change will be cancelled, and the value will not
-     * be set.</p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> beforeLabelChange<br>
-     * <code>&lt;String&gt;
-     * prevValue</code> the current value<br>
-     * <code>&lt;String&gt;
-     * newValue</code> the new value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('beforeLabelChange', handler);</code></p>
-     * @event beforeLabelChange
-     */
-
-    /**
-     * Fires after the tab label is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> labelChange<br>
-     * <code>&lt;String&gt;
-     * prevValue</code> the previous value<br>
-     * <code>&lt;String&gt;
-     * newValue</code> the updated value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('labelChange', handler);</code></p>
-     * @event labelChange
-     */
-
-    /**
-     * Fires before the tab content is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p>If handler returns false, the change will be cancelled, and the value will not
-     * be set.</p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> beforeContentChange<br>
-     * <code>&lt;String&gt;
-     * prevValue</code> the current value<br>
-     * <code>&lt;String&gt;
-     * newValue</code> the new value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('beforeContentChange', handler);</code></p>
-     * @event beforeContentChange
-     */
-
-    /**
-     * Fires after the tab content is changed.
-     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
-     * <p><strong>Event fields:</strong><br>
-     * <code>&lt;String&gt; type</code> contentChange<br>
-     * <code>&lt;String&gt;
-     * prevValue</code> the previous value<br>
-     * <code>&lt;Boolean&gt;
-     * newValue</code> the updated value</p>
-     * <p><strong>Usage:</strong><br>
-     * <code>var handler = function(e) {var previous = e.prevValue};<br>
-     * myTabs.addListener('contentChange', handler);</code></p>
-     * @event contentChange
-     */
-})();(function() {
-
-    /**
-     * The tabview module provides a widget for managing content bound to tabs.
-     * @module tabview
-     *
-     */
-    /**
-     * A widget to control tabbed views.
-     * @namespace YAHOO.widget
-     * @class TabView
-     * @extends YAHOO.util.Element
-     * @constructor
-     * @param {HTMLElement | String | Object} el(optional) The html
-     * element that represents the TabView, or the attribute object to use.
-     * An element will be created if none provided.
-     * @param {Object} attr (optional) A key map of the tabView's
-     * initial attributes.  Ignored if first arg is attributes object.
-     */
-    YAHOO.widget.TabView = function(el, attr) {
-        attr = attr || {};
-        if (arguments.length == 1 && !Lang.isString(el) && !el.nodeName) {
-            attr = el; // treat first arg as attr object
-            el = attr.element || null;
-        }
-
-        if (!el && !attr.element) { // create if we dont have one
-            el = _createTabViewElement.call(this, attr);
-        }
-    	YAHOO.widget.TabView.superclass.constructor.call(this, el, attr);
-    };
-
-    YAHOO.extend(YAHOO.widget.TabView, YAHOO.util.Element);
-
-    var proto = YAHOO.widget.TabView.prototype;
-    var Dom = YAHOO.util.Dom;
-    var Lang = YAHOO.util.Lang;
-    var Event = YAHOO.util.Event;
-    var Tab = YAHOO.widget.Tab;
-
-
-    /**
-     * The className to add when building from scratch.
-     * @property CLASSNAME
-     * @default "navset"
-     */
-    proto.CLASSNAME = 'yui-navset';
-
-    /**
-     * The className of the HTMLElement containing the TabView's tab elements
-     * to look for when building from existing markup, or to add when building
-     * from scratch.
-     * All childNodes of the tab container are treated as Tabs when building
-     * from existing markup.
-     * @property TAB_PARENT_CLASSNAME
-     * @default "nav"
-     */
-    proto.TAB_PARENT_CLASSNAME = 'yui-nav';
-
-    /**
-     * The className of the HTMLElement containing the TabView's label elements
-     * to look for when building from existing markup, or to add when building
-     * from scratch.
-     * All childNodes of the content container are treated as content elements when
-     * building from existing markup.
-     * @property CONTENT_PARENT_CLASSNAME
-     * @default "nav-content"
-     */
-    proto.CONTENT_PARENT_CLASSNAME = 'yui-content';
-
-    proto._tabParent = null;
-    proto._contentParent = null;
-
-    /**
-     * Adds a Tab to the TabView instance.
-     * If no index is specified, the tab is added to the end of the tab list.
-     * @method addTab
-     * @param {YAHOO.widget.Tab} tab A Tab instance to add.
-     * @param {Integer} index The position to add the tab.
-     * @return void
-     */
-    proto.addTab = function(tab, index) {
-        var tabs = this.get('tabs');
-        if (!tabs) { // not ready yet
-            this._queue[this._queue.length] = ['addTab', arguments];
-            return false;
-        }
-
-        index = (index === undefined) ? tabs.length : index;
-
-        var before = this.getTab(index);
-
-        var self = this;
-        var el = this.get('element');
-        var tabParent = this._tabParent;
-        var contentParent = this._contentParent;
-
-        var tabElement = tab.get('element');
-        var contentEl = tab.get('contentEl');
-
-        if ( before ) {
-            tabParent.insertBefore(tabElement, before.get('element'));
-        } else {
-            tabParent.appendChild(tabElement);
-        }
-
-        if ( contentEl && !Dom.isAncestor(contentParent, contentEl) ) {
-            contentParent.appendChild(contentEl);
-        }
-
-        if ( !tab.get('active') ) {
-            tab.set('contentVisible', false, true); /* hide if not active */
-        } else {
-            this.set('activeTab', tab, true);
-
-        }
-
-        var activate = function(e) {
-            YAHOO.util.Event.preventDefault(e);
-            self.set('activeTab', this);
-        };
-
-        tab.addListener( tab.get('activationEvent'), activate);
-
-        tab.addListener('activationEventChange', function(e) {
-            if (e.prevValue != e.newValue) {
-                tab.removeListener(e.prevValue, activate);
-                tab.addListener(e.newValue, activate);
-            }
-        });
-
-        tabs.splice(index, 0, tab);
-    };
-
-    /**
-     * Routes childNode events.
-     * @method DOMEventHandler
-     * @param {event} e The Dom event that is being handled.
-     * @return void
-     */
-    proto.DOMEventHandler = function(e) {
-        var el = this.get('element');
-        var target = YAHOO.util.Event.getTarget(e);
-        var tabParent = this._tabParent;
-
-        if (Dom.isAncestor(tabParent, target) ) {
-            var tabEl;
-            var tab = null;
-            var contentEl;
-            var tabs = this.get('tabs');
-
-            for (var i = 0, len = tabs.length; i < len; i++) {
-                tabEl = tabs[i].get('element');
-                contentEl = tabs[i].get('contentEl');
-
-                if ( target == tabEl || Dom.isAncestor(tabEl, target) ) {
-                    tab = tabs[i];
-                    break; // note break
-                }
-            }
-
-            if (tab) {
-                tab.fireEvent(e.type, e);
-            }
-        }
-    };
-
-    /**
-     * Returns the Tab instance at the specified index.
-     * @method getTab
-     * @param {Integer} index The position of the Tab.
-     * @return YAHOO.widget.Tab
-     */
-    proto.getTab = function(index) {
-    	return this.get('tabs')[index];
-    };
-
-    /**
-     * Returns the index of given tab.
-     * @method getTabIndex
-     * @param {YAHOO.widget.Tab} tab The tab whose index will be returned.
-     * @return int
-     */
-    proto.getTabIndex = function(tab) {
-        var index = null;
-        var tabs = this.get('tabs');
-    	for (var i = 0, len = tabs.length; i < len; ++i) {
-            if (tab == tabs[i]) {
-                index = i;
-                break;
-            }
-        }
-
-        return index;
-    };
-
-    /**
-     * Removes the specified Tab from the TabView.
-     * @method removeTab
-     * @param {YAHOO.widget.Tab} item The Tab instance to be removed.
-     * @return void
-     */
-    proto.removeTab = function(tab) {
-        var tabCount = this.get('tabs').length;
-
-        var index = this.getTabIndex(tab);
-        var nextIndex = index + 1;
-        if ( tab == this.get('activeTab') ) { // select next tab
-            if (tabCount > 1) {
-                if (index + 1 == tabCount) {
-                    this.set('activeIndex', index - 1);
-                } else {
-                    this.set('activeIndex', index + 1);
-                }
-            }
-        }
-
-        this._tabParent.removeChild( tab.get('element') );
-        this._contentParent.removeChild( tab.get('contentEl') );
-        this._configs.tabs.value.splice(index, 1);
-
-    };
-
-    /**
-     * Provides a readable name for the TabView instance.
-     * @method toString
-     * @return String
-     */
-    proto.toString = function() {
-        var name = this.get('id') || this.get('tagName');
-        return "TabView " + name;
-    };
-
-    /**
-     * The transiton to use when switching between tabs.
-     * @method contentTransition
-     */
-    proto.contentTransition = function(newTab, oldTab) {
-        newTab.set('contentVisible', true);
-        oldTab.set('contentVisible', false);
-    };
-
-    /**
-     * Registers TabView specific properties.
-     * @method initAttributes
-     * @param {Object} attr Hash of initial attributes
-     */
-    proto.initAttributes = function(attr) {
-        YAHOO.widget.TabView.superclass.initAttributes.call(this, attr);
-
-        if (!attr.orientation) {
-            attr.orientation = 'top';
-        }
-
-        var el = this.get('element');
-
-        /**
-         * The Tabs belonging to the TabView instance.
-         * @config tabs
-         * @type Array
-         */
-        this.register('tabs', {
-            value: [],
-            readOnly: true
-        });
-
-        /**
-         * The container of the tabView's label elements.
-         * @property _tabParent
-         * @private
-         * @type HTMLElement
-         */
-        this._tabParent =
-                this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
-                        'ul' )[0] || _createTabParent.call(this);
-
-        /**
-         * The container of the tabView's content elements.
-         * @property _contentParent
-         * @type HTMLElement
-         * @private
-         */
-        this._contentParent =
-                this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
-                        'div')[0] ||  _createContentParent.call(this);
-
-        /**
-         * How the Tabs should be oriented relative to the TabView.
-         * @config orientation
-         * @type String
-         * @default "top"
-         */
-        this.register('orientation', {
-            value: attr.orientation,
-            method: function(value) {
-                var current = this.get('orientation');
-                this.addClass('yui-navset-' + value);
-
-                if (current != value) {
-                    this.removeClass('yui-navset-' + current);
-                }
-
-                switch(value) {
-                    case 'bottom':
-                    this.appendChild(this._tabParent);
-                    break;
-                }
-            }
-        });
-
-        /**
-         * The index of the tab currently active.
-         * @config activeIndex
-         * @type Int
-         */
-        this.register('activeIndex', {
-            value: attr.activeIndex,
-            method: function(value) {
-                this.set('activeTab', this.getTab(value));
-            },
-            validator: function(value) {
-                return !this.getTab(value).get('disabled'); // cannot activate if disabled
-            }
-        });
-
-        /**
-         * The tab currently active.
-         * @config activeTab
-         * @type YAHOO.widget.Tab
-         */
-        this.register('activeTab', {
-            value: attr.activeTab,
-            method: function(tab) {
-                var activeTab = this.get('activeTab');
-
-                if (tab) {
-                    tab.set('active', true);
-                }
-
-                if (activeTab && activeTab != tab) {
-                    activeTab.set('active', false);
-                }
-
-                if (activeTab && tab != activeTab) { // no transition if only 1
-                    this.contentTransition(tab, activeTab);
-                } else if (tab) {
-                    tab.set('contentVisible', true);
-                }
-            },
-            validator: function(value) {
-                return !value.get('disabled'); // cannot activate if disabled
-            }
-        });
-
-        if ( this._tabParent ) {
-            _initTabs.call(this);
-        }
-
-        for (var type in this.DOM_EVENTS) {
-            if ( this.DOM_EVENTS.hasOwnProperty(type) ) {
-                this.addListener.call(this, type, this.DOMEventHandler);
-            }
-        }
-    };
-
-    /**
-     * Creates Tab instances from a collection of HTMLElements.
-     * @method createTabs
-     * @private
-     * @param {Array|HTMLCollection} elements The elements to use for Tabs.
-     * @return void
-     */
-    var _initTabs = function() {
-        var tab,
-            attr,
-            contentEl;
-
-        var el = this.get('element');
-        var tabs = _getChildNodes(this._tabParent);
-        var contentElements = _getChildNodes(this._contentParent);
-
-        for (var i = 0, len = tabs.length; i < len; ++i) {
-            attr = {};
-
-            if (contentElements[i]) {
-                attr.contentEl = contentElements[i];
-            }
-
-            tab = new YAHOO.widget.Tab(tabs[i], attr);
-            this.addTab(tab);
-
-            if (tab.hasClass(tab.ACTIVE_CLASSNAME) ) {
-                this._configs.activeTab.value = tab; // dont invoke method
-            }
-        }
-    };
-
-    var _createTabViewElement = function(attr) {
-        var el = document.createElement('div');
-
-        if ( this.CLASSNAME ) {
-            el.className = this.CLASSNAME;
-        }
-
-        return el;
-    };
-
-    var _createTabParent = function(attr) {
-        var el = document.createElement('ul');
-
-        if ( this.TAB_PARENT_CLASSNAME ) {
-            el.className = this.TAB_PARENT_CLASSNAME;
-        }
-
-        this.get('element').appendChild(el);
-
-        return el;
-    };
-
-    var _createContentParent = function(attr) {
-        var el = document.createElement('div');
-
-        if ( this.CONTENT_PARENT_CLASSNAME ) {
-            el.className = this.CONTENT_PARENT_CLASSNAME;
-        }
-
-        this.get('element').appendChild(el);
-
-        return el;
-    };
-
-    var _getChildNodes = function(el) {
-        var nodes = [];
-        var childNodes = el.childNodes;
-
-        for (var i = 0, len = childNodes.length; i < len; ++i) {
-            if (childNodes[i].nodeType == 1) {
-                nodes[nodes.length] = childNodes[i];
-            }
-        }
-
-        return nodes;
-    };
-
-/**
- * Fires before the activeTab is changed.
- * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
- * <p>If handler returns false, the change will be cancelled, and the value will not
- * be set.</p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> beforeActiveTabChange<br>
- * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
- * prevValue</code> the currently active tab<br>
- * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
- * newValue</code> the tab to be made active</p>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var previous = e.prevValue};<br>
- * myTabs.addListener('beforeActiveTabChange', handler);</code></p>
- * @event beforeActiveTabChange
- */
-
-/**
- * Fires after the activeTab is changed.
- * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> activeTabChange<br>
- * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
- * prevValue</code> the formerly active tab<br>
- * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
- * newValue</code> the new active tab</p>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var previous = e.prevValue};<br>
- * myTabs.addListener('activeTabChange', handler);</code></p>
- * @event activeTabChange
- */
-
-/**
- * Fires before the orientation is changed.
- * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
- * <p>If handler returns false, the change will be cancelled, and the value will not
- * be set.</p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> beforeOrientationChange<br>
- * <code>&lt;String&gt;
- * prevValue</code> the current orientation<br>
- * <code>&lt;String&gt;
- * newValue</code> the new orientation to be applied</p>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var previous = e.prevValue};<br>
- * myTabs.addListener('beforeOrientationChange', handler);</code></p>
- * @event beforeOrientationChange
- */
-
-/**
- * Fires after the orientation is changed.
- * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
- * <p><strong>Event fields:</strong><br>
- * <code>&lt;String&gt; type</code> orientationChange<br>
- * <code>&lt;String&gt;
- * prevValue</code> the former orientation<br>
- * <code>&lt;String&gt;
- * newValue</code> the new orientation</p>
- * <p><strong>Usage:</strong><br>
- * <code>var handler = function(e) {var previous = e.prevValue};<br>
- * myTabs.addListener('orientationChange', handler);</code></p>
- * @event orientationChange
- */
-})();
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+(function() {
+
+    /**
+     * The tabview module provides a widget for managing content bound to tabs.
+     * @module tabview
+     * @requires yahoo, dom, event, element
+     *
+     */
+    /**
+     * A widget to control tabbed views.
+     * @namespace YAHOO.widget
+     * @class TabView
+     * @extends YAHOO.util.Element
+     * @constructor
+     * @param {HTMLElement | String | Object} el(optional) The html 
+     * element that represents the TabView, or the attribute object to use. 
+     * An element will be created if none provided.
+     * @param {Object} attr (optional) A key map of the tabView's 
+     * initial attributes.  Ignored if first arg is attributes object.
+     */
+    YAHOO.widget.TabView = function(el, attr) {
+        attr = attr || {};
+        if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
+            attr = el; // treat first arg as attr object
+            el = attr.element || null;
+        }
+        
+        if (!el && !attr.element) { // create if we dont have one
+            el = _createTabViewElement.call(this, attr);
+        }
+    	YAHOO.widget.TabView.superclass.constructor.call(this, el, attr); 
+    };
+
+    YAHOO.extend(YAHOO.widget.TabView, YAHOO.util.Element);
+    
+    var proto = YAHOO.widget.TabView.prototype;
+    var Dom = YAHOO.util.Dom;
+    var Event = YAHOO.util.Event;
+    var Tab = YAHOO.widget.Tab;
+    
+    
+    /**
+     * The className to add when building from scratch. 
+     * @property CLASSNAME
+     * @default "navset"
+     */
+    proto.CLASSNAME = 'yui-navset';
+    
+    /**
+     * The className of the HTMLElement containing the TabView's tab elements
+     * to look for when building from existing markup, or to add when building
+     * from scratch. 
+     * All childNodes of the tab container are treated as Tabs when building
+     * from existing markup.
+     * @property TAB_PARENT_CLASSNAME
+     * @default "nav"
+     */
+    proto.TAB_PARENT_CLASSNAME = 'yui-nav';
+    
+    /**
+     * The className of the HTMLElement containing the TabView's label elements
+     * to look for when building from existing markup, or to add when building
+     * from scratch. 
+     * All childNodes of the content container are treated as content elements when
+     * building from existing markup.
+     * @property CONTENT_PARENT_CLASSNAME
+     * @default "nav-content"
+     */
+    proto.CONTENT_PARENT_CLASSNAME = 'yui-content';
+    
+    proto._tabParent = null;
+    proto._contentParent = null; 
+    
+    /**
+     * Adds a Tab to the TabView instance.  
+     * If no index is specified, the tab is added to the end of the tab list.
+     * @method addTab
+     * @param {YAHOO.widget.Tab} tab A Tab instance to add.
+     * @param {Integer} index The position to add the tab. 
+     * @return void
+     */
+    proto.addTab = function(tab, index) {
+        var tabs = this.get('tabs');
+        if (!tabs) { // not ready yet
+            this._queue[this._queue.length] = ['addTab', arguments];
+            return false;
+        }
+        
+        index = (index === undefined) ? tabs.length : index;
+        
+        var before = this.getTab(index);
+        
+        var self = this;
+        var el = this.get('element');
+        var tabParent = this._tabParent;
+        var contentParent = this._contentParent;
+
+        var tabElement = tab.get('element');
+        var contentEl = tab.get('contentEl');
+
+        if ( before ) {
+            tabParent.insertBefore(tabElement, before.get('element'));
+        } else {
+            tabParent.appendChild(tabElement);
+        }
+
+        if ( contentEl && !Dom.isAncestor(contentParent, contentEl) ) {
+            contentParent.appendChild(contentEl);
+        }
+        
+        if ( !tab.get('active') ) {
+            tab.set('contentVisible', false, true); /* hide if not active */
+        } else {
+            this.set('activeTab', tab, true);
+            
+        }
+
+        var activate = function(e) {
+            YAHOO.util.Event.preventDefault(e);
+            self.set('activeTab', this);
+        };
+        
+        tab.addListener( tab.get('activationEvent'), activate);
+        
+        tab.addListener('activationEventChange', function(e) {
+            if (e.prevValue != e.newValue) {
+                tab.removeListener(e.prevValue, activate);
+                tab.addListener(e.newValue, activate);
+            }
+        });
+        
+        tabs.splice(index, 0, tab);
+    };
+
+    /**
+     * Routes childNode events.
+     * @method DOMEventHandler
+     * @param {event} e The Dom event that is being handled.
+     * @return void
+     */
+    proto.DOMEventHandler = function(e) {
+        var el = this.get('element');
+        var target = YAHOO.util.Event.getTarget(e);
+        var tabParent = this._tabParent;
+        
+        if (Dom.isAncestor(tabParent, target) ) {
+            var tabEl;
+            var tab = null;
+            var contentEl;
+            var tabs = this.get('tabs');
+
+            for (var i = 0, len = tabs.length; i < len; i++) {
+                tabEl = tabs[i].get('element');
+                contentEl = tabs[i].get('contentEl');
+
+                if ( target == tabEl || Dom.isAncestor(tabEl, target) ) {
+                    tab = tabs[i];
+                    break; // note break
+                }
+            } 
+            
+            if (tab) {
+                tab.fireEvent(e.type, e);
+            }
+        }
+    };
+    
+    /**
+     * Returns the Tab instance at the specified index.
+     * @method getTab
+     * @param {Integer} index The position of the Tab.
+     * @return YAHOO.widget.Tab
+     */
+    proto.getTab = function(index) {
+    	return this.get('tabs')[index];
+    };
+    
+    /**
+     * Returns the index of given tab.
+     * @method getTabIndex
+     * @param {YAHOO.widget.Tab} tab The tab whose index will be returned.
+     * @return int
+     */
+    proto.getTabIndex = function(tab) {
+        var index = null;
+        var tabs = this.get('tabs');
+    	for (var i = 0, len = tabs.length; i < len; ++i) {
+            if (tab == tabs[i]) {
+                index = i;
+                break;
+            }
+        }
+        
+        return index;
+    };
+    
+    /**
+     * Removes the specified Tab from the TabView.
+     * @method removeTab
+     * @param {YAHOO.widget.Tab} item The Tab instance to be removed.
+     * @return void
+     */
+    proto.removeTab = function(tab) {
+        var tabCount = this.get('tabs').length;
+
+        var index = this.getTabIndex(tab);
+        var nextIndex = index + 1;
+        if ( tab == this.get('activeTab') ) { // select next tab
+            if (tabCount > 1) {
+                if (index + 1 == tabCount) {
+                    this.set('activeIndex', index - 1);
+                } else {
+                    this.set('activeIndex', index + 1);
+                }
+            }
+        }
+        
+        this._tabParent.removeChild( tab.get('element') );
+        this._contentParent.removeChild( tab.get('contentEl') );
+        this._configs.tabs.value.splice(index, 1);
+    	
+    };
+    
+    /**
+     * Provides a readable name for the TabView instance.
+     * @method toString
+     * @return String
+     */
+    proto.toString = function() {
+        var name = this.get('id') || this.get('tagName');
+        return "TabView " + name; 
+    };
+    
+    /**
+     * The transiton to use when switching between tabs.
+     * @method contentTransition
+     */
+    proto.contentTransition = function(newTab, oldTab) {
+        newTab.set('contentVisible', true);
+        oldTab.set('contentVisible', false);
+    };
+    
+    /**
+     * setAttributeConfigs TabView specific properties.
+     * @method initAttributes
+     * @param {Object} attr Hash of initial attributes
+     */
+    proto.initAttributes = function(attr) {
+        YAHOO.widget.TabView.superclass.initAttributes.call(this, attr);
+        
+        if (!attr.orientation) {
+            attr.orientation = 'top';
+        }
+        
+        var el = this.get('element');
+        
+        /**
+         * The Tabs belonging to the TabView instance.
+         * @config tabs
+         * @type Array
+         */
+        this.setAttributeConfig('tabs', {
+            value: [],
+            readOnly: true
+        });
+
+        /**
+         * The container of the tabView's label elements.
+         * @property _tabParent
+         * @private
+         * @type HTMLElement
+         */
+        this._tabParent = 
+                this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
+                        'ul' )[0] || _createTabParent.call(this);
+            
+        /**
+         * The container of the tabView's content elements.
+         * @property _contentParent
+         * @type HTMLElement
+         * @private
+         */
+        this._contentParent = 
+                this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
+                        'div')[0] ||  _createContentParent.call(this);
+        
+        /**
+         * How the Tabs should be oriented relative to the TabView.
+         * @config orientation
+         * @type String
+         * @default "top"
+         */
+        this.setAttributeConfig('orientation', {
+            value: attr.orientation,
+            method: function(value) {
+                var current = this.get('orientation');
+                this.addClass('yui-navset-' + value);
+                
+                if (current != value) {
+                    this.removeClass('yui-navset-' + current);
+                }
+                
+                switch(value) {
+                    case 'bottom':
+                    this.appendChild(this._tabParent);
+                    break;
+                }
+            }
+        });
+        
+        /**
+         * The index of the tab currently active.
+         * @config activeIndex
+         * @type Int
+         */
+        this.setAttributeConfig('activeIndex', {
+            value: attr.activeIndex,
+            method: function(value) {
+                this.set('activeTab', this.getTab(value));
+            },
+            validator: function(value) {
+                return !this.getTab(value).get('disabled'); // cannot activate if disabled
+            }
+        });
+        
+        /**
+         * The tab currently active.
+         * @config activeTab
+         * @type YAHOO.widget.Tab
+         */
+        this.setAttributeConfig('activeTab', {
+            value: attr.activeTab,
+            method: function(tab) {
+                var activeTab = this.get('activeTab');
+                
+                if (tab) {  
+                    tab.set('active', true);
+                    this._configs['activeIndex'].value = this.getTabIndex(tab); // keep in sync
+                }
+                
+                if (activeTab && activeTab != tab) {
+                    activeTab.set('active', false);
+                }
+                
+                if (activeTab && tab != activeTab) { // no transition if only 1
+                    this.contentTransition(tab, activeTab);
+                } else if (tab) {
+                    tab.set('contentVisible', true);
+                }
+            },
+            validator: function(value) {
+                return !value.get('disabled'); // cannot activate if disabled
+            }
+        });
+
+        if ( this._tabParent ) {
+            _initTabs.call(this);
+        }
+        
+        for (var type in this.DOM_EVENTS) {
+            if ( YAHOO.lang.hasOwnProperty(this.DOM_EVENTS, type) ) {
+                this.addListener.call(this, type, this.DOMEventHandler);
+            }
+        }
+    };
+    
+    /**
+     * Creates Tab instances from a collection of HTMLElements.
+     * @method createTabs
+     * @private
+     * @param {Array|HTMLCollection} elements The elements to use for Tabs.
+     * @return void
+     */
+    var _initTabs = function() {
+        var tab,
+            attr,
+            contentEl;
+            
+        var el = this.get('element');   
+        var tabs = _getChildNodes(this._tabParent);
+        var contentElements = _getChildNodes(this._contentParent);
+
+        for (var i = 0, len = tabs.length; i < len; ++i) {
+            attr = {};
+            
+            if (contentElements[i]) {
+                attr.contentEl = contentElements[i];
+            }
+
+            tab = new YAHOO.widget.Tab(tabs[i], attr);
+            this.addTab(tab);
+            
+            if (tab.hasClass(tab.ACTIVE_CLASSNAME) ) {
+                this._configs.activeTab.value = tab; // dont invoke method
+            }
+        }
+    };
+    
+    var _createTabViewElement = function(attr) {
+        var el = document.createElement('div');
+
+        if ( this.CLASSNAME ) {
+            el.className = this.CLASSNAME;
+        }
+        
+        return el;
+    };
+    
+    var _createTabParent = function(attr) {
+        var el = document.createElement('ul');
+
+        if ( this.TAB_PARENT_CLASSNAME ) {
+            el.className = this.TAB_PARENT_CLASSNAME;
+        }
+        
+        this.get('element').appendChild(el);
+        
+        return el;
+    };
+    
+    var _createContentParent = function(attr) {
+        var el = document.createElement('div');
+
+        if ( this.CONTENT_PARENT_CLASSNAME ) {
+            el.className = this.CONTENT_PARENT_CLASSNAME;
+        }
+        
+        this.get('element').appendChild(el);
+        
+        return el;
+    };
+    
+    var _getChildNodes = function(el) {
+        var nodes = [];
+        var childNodes = el.childNodes;
+        
+        for (var i = 0, len = childNodes.length; i < len; ++i) {
+            if (childNodes[i].nodeType == 1) {
+                nodes[nodes.length] = childNodes[i];
+            }
+        }
+        
+        return nodes;
+    };
+
+/**
+ * Fires before the activeTab is changed.
+ * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+ * <p>If handler returns false, the change will be cancelled, and the value will not
+ * be set.</p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> beforeActiveTabChange<br>
+ * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
+ * prevValue</code> the currently active tab<br>
+ * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
+ * newValue</code> the tab to be made active</p>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var previous = e.prevValue};<br>
+ * myTabs.addListener('beforeActiveTabChange', handler);</code></p>
+ * @event beforeActiveTabChange
+ */
+    
+/**
+ * Fires after the activeTab is changed.
+ * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> activeTabChange<br>
+ * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
+ * prevValue</code> the formerly active tab<br>
+ * <code>&lt;<a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a>&gt;
+ * newValue</code> the new active tab</p>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var previous = e.prevValue};<br>
+ * myTabs.addListener('activeTabChange', handler);</code></p>
+ * @event activeTabChange
+ */
+ 
+/**
+ * Fires before the orientation is changed.
+ * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+ * <p>If handler returns false, the change will be cancelled, and the value will not
+ * be set.</p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> beforeOrientationChange<br>
+ * <code>&lt;String&gt;
+ * prevValue</code> the current orientation<br>
+ * <code>&lt;String&gt;
+ * newValue</code> the new orientation to be applied</p>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var previous = e.prevValue};<br>
+ * myTabs.addListener('beforeOrientationChange', handler);</code></p>
+ * @event beforeOrientationChange
+ */
+    
+/**
+ * Fires after the orientation is changed.
+ * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+ * <p><strong>Event fields:</strong><br>
+ * <code>&lt;String&gt; type</code> orientationChange<br>
+ * <code>&lt;String&gt;
+ * prevValue</code> the former orientation<br>
+ * <code>&lt;String&gt;
+ * newValue</code> the new orientation</p>
+ * <p><strong>Usage:</strong><br>
+ * <code>var handler = function(e) {var previous = e.prevValue};<br>
+ * myTabs.addListener('orientationChange', handler);</code></p>
+ * @event orientationChange
+ */
+})();
+
+(function() {
+    var Dom = YAHOO.util.Dom,
+        Event = YAHOO.util.Event;
+    
+    /**
+     * A representation of a Tab's label and content.
+     * @namespace YAHOO.widget
+     * @class Tab
+     * @extends YAHOO.util.Element
+     * @constructor
+     * @param element {HTMLElement | String} (optional) The html element that 
+     * represents the TabView. An element will be created if none provided.
+     * @param {Object} properties A key map of initial properties
+     */
+    var Tab = function(el, attr) {
+        attr = attr || {};
+        if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
+            attr = el;
+            el = attr.element;
+        }
+
+        if (!el && !attr.element) {
+            el = _createTabElement.call(this, attr);
+        }
+
+        this.loadHandler =  {
+            success: function(o) {
+                this.set('content', o.responseText);
+            },
+            failure: function(o) {
+            }
+        };
+        
+        Tab.superclass.constructor.call(this, el, attr);
+        
+        this.DOM_EVENTS = {}; // delegating to tabView
+    };
+
+    YAHOO.extend(Tab, YAHOO.util.Element);
+    var proto = Tab.prototype;
+    
+    /**
+     * The default tag name for a Tab's inner element.
+     * @property LABEL_INNER_TAGNAME
+     * @type String
+     * @default "em"
+     */
+    proto.LABEL_TAGNAME = 'em';
+    
+    /**
+     * The class name applied to active tabs.
+     * @property ACTIVE_CLASSNAME
+     * @type String
+     * @default "on"
+     */
+    proto.ACTIVE_CLASSNAME = 'selected';
+    
+    /**
+     * The class name applied to disabled tabs.
+     * @property DISABLED_CLASSNAME
+     * @type String
+     * @default "disabled"
+     */
+    proto.DISABLED_CLASSNAME = 'disabled';
+    
+    /**
+     * The class name applied to dynamic tabs while loading.
+     * @property LOADING_CLASSNAME
+     * @type String
+     * @default "disabled"
+     */
+    proto.LOADING_CLASSNAME = 'loading';
+
+    /**
+     * Provides a reference to the connection request object when data is
+     * loaded dynamically.
+     * @property dataConnection
+     * @type Object
+     */
+    proto.dataConnection = null;
+    
+    /**
+     * Object containing success and failure callbacks for loading data.
+     * @property loadHandler
+     * @type object
+     */
+    proto.loadHandler = null;
+    
+    /**
+     * Provides a readable name for the tab.
+     * @method toString
+     * @return String
+     */
+    proto.toString = function() {
+        var el = this.get('element');
+        var id = el.id || el.tagName;
+        return "Tab " + id; 
+    };
+    
+    /**
+     * setAttributeConfigs TabView specific properties.
+     * @method initAttributes
+     * @param {Object} attr Hash of initial attributes
+     */
+    proto.initAttributes = function(attr) {
+        attr = attr || {};
+        Tab.superclass.initAttributes.call(this, attr);
+        
+        var el = this.get('element');
+        
+        /**
+         * The event that triggers the tab's activation.
+         * @config activationEvent
+         * @type String
+         */
+        this.setAttributeConfig('activationEvent', {
+            value: attr.activationEvent || 'click'
+        });        
+
+        /**
+         * The element that contains the tab's label.
+         * @config labelEl
+         * @type HTMLElement
+         */
+        this.setAttributeConfig('labelEl', {
+            value: attr.labelEl || _getlabelEl.call(this),
+            method: function(value) {
+                var current = this.get('labelEl');
+
+                if (current) {
+                    if (current == value) {
+                        return false; // already set
+                    }
+                    
+                    this.replaceChild(value, current);
+                } else if (el.firstChild) { // ensure label is firstChild by default
+                    this.insertBefore(value, el.firstChild);
+                } else {
+                    this.appendChild(value);
+                }  
+            } 
+        });
+
+        /**
+         * The tab's label text (or innerHTML).
+         * @config label
+         * @type String
+         */
+        this.setAttributeConfig('label', {
+            value: attr.label || _getLabel.call(this),
+            method: function(value) {
+                var labelEl = this.get('labelEl');
+                if (!labelEl) { // create if needed
+                    this.set('labelEl', _createlabelEl.call(this));
+                }
+                
+                _setLabel.call(this, value);
+            }
+        });
+        
+        /**
+         * The HTMLElement that contains the tab's content.
+         * @config contentEl
+         * @type HTMLElement
+         */
+        this.setAttributeConfig('contentEl', {
+            value: attr.contentEl || document.createElement('div'),
+            method: function(value) {
+                var current = this.get('contentEl');
+
+                if (current) {
+                    if (current == value) {
+                        return false; // already set
+                    }
+                    this.replaceChild(value, current);
+                }
+            }
+        });
+        
+        /**
+         * The tab's content.
+         * @config content
+         * @type String
+         */
+        this.setAttributeConfig('content', {
+            value: attr.content,
+            method: function(value) {
+                this.get('contentEl').innerHTML = value;
+            }
+        });
+
+        var _dataLoaded = false;
+        
+        /**
+         * The tab's data source, used for loading content dynamically.
+         * @config dataSrc
+         * @type String
+         */
+        this.setAttributeConfig('dataSrc', {
+            value: attr.dataSrc
+        });
+        
+        /**
+         * Whether or not content should be reloaded for every view.
+         * @config cacheData
+         * @type Boolean
+         * @default false
+         */
+        this.setAttributeConfig('cacheData', {
+            value: attr.cacheData || false,
+            validator: YAHOO.lang.isBoolean
+        });
+        
+        /**
+         * The method to use for the data request.
+         * @config loadMethod
+         * @type String
+         * @default "GET"
+         */
+        this.setAttributeConfig('loadMethod', {
+            value: attr.loadMethod || 'GET',
+            validator: YAHOO.lang.isString
+        });
+
+        /**
+         * Whether or not any data has been loaded from the server.
+         * @config dataLoaded
+         * @type Boolean
+         */        
+        this.setAttributeConfig('dataLoaded', {
+            value: false,
+            validator: YAHOO.lang.isBoolean,
+            writeOnce: true
+        });
+        
+        /**
+         * Number if milliseconds before aborting and calling failure handler.
+         * @config dataTimeout
+         * @type Number
+         * @default null
+         */
+        this.setAttributeConfig('dataTimeout', {
+            value: attr.dataTimeout || null,
+            validator: YAHOO.lang.isNumber
+        });
+        
+        /**
+         * Whether or not the tab is currently active.
+         * If a dataSrc is set for the tab, the content will be loaded from
+         * the given source.
+         * @config active
+         * @type Boolean
+         */
+        this.setAttributeConfig('active', {
+            value: attr.active || this.hasClass(this.ACTIVE_CLASSNAME),
+            method: function(value) {
+                if (value === true) {
+                    this.addClass(this.ACTIVE_CLASSNAME);
+                    this.set('title', 'active');
+                } else {
+                    this.removeClass(this.ACTIVE_CLASSNAME);
+                    this.set('title', '');
+                }
+            },
+            validator: function(value) {
+                return YAHOO.lang.isBoolean(value) && !this.get('disabled') ;
+            }
+        });
+        
+        /**
+         * Whether or not the tab is disabled.
+         * @config disabled
+         * @type Boolean
+         */
+        this.setAttributeConfig('disabled', {
+            value: attr.disabled || this.hasClass(this.DISABLED_CLASSNAME),
+            method: function(value) {
+                if (value === true) {
+                    Dom.addClass(this.get('element'), this.DISABLED_CLASSNAME);
+                } else {
+                    Dom.removeClass(this.get('element'), this.DISABLED_CLASSNAME);
+                }
+            },
+            validator: YAHOO.lang.isBoolean
+        });
+        
+        /**
+         * The href of the tab's anchor element.
+         * @config href
+         * @type String
+         * @default '#'
+         */
+        this.setAttributeConfig('href', {
+            value: attr.href || '#',
+            method: function(value) {
+                this.getElementsByTagName('a')[0].href = value;
+            },
+            validator: YAHOO.lang.isString
+        });
+        
+        /**
+         * The Whether or not the tab's content is visible.
+         * @config contentVisible
+         * @type Boolean
+         * @default false
+         */
+        this.setAttributeConfig('contentVisible', {
+            value: attr.contentVisible,
+            method: function(value) {
+                if (value) {
+                    this.get('contentEl').style.display = 'block';
+                    
+                    if ( this.get('dataSrc') ) {
+                     // load dynamic content unless already loaded and caching
+                        if ( !this.get('dataLoaded') || !this.get('cacheData') ) {
+                            _dataConnect.call(this);
+                        }
+                    }
+                } else {
+                    this.get('contentEl').style.display = 'none';
+                }
+            },
+            validator: YAHOO.lang.isBoolean
+        });
+    };
+    
+    var _createTabElement = function(attr) {
+        var el = document.createElement('li');
+        var a = document.createElement('a');
+        
+        a.href = attr.href || '#';
+        
+        el.appendChild(a);
+        
+        var label = attr.label || null;
+        var labelEl = attr.labelEl || null;
+        
+        if (labelEl) { // user supplied labelEl
+            if (!label) { // user supplied label
+                label = _getLabel.call(this, labelEl);
+            }
+        } else {
+            labelEl = _createlabelEl.call(this);
+        }
+        
+        a.appendChild(labelEl);
+        
+        return el;
+    };
+    
+    var _getlabelEl = function() {
+        return this.getElementsByTagName(this.LABEL_TAGNAME)[0];
+    };
+    
+    var _createlabelEl = function() {
+        var el = document.createElement(this.LABEL_TAGNAME);
+        return el;
+    };
+    
+    var _setLabel = function(label) {
+        var el = this.get('labelEl');
+        el.innerHTML = label;
+    };
+    
+    var _getLabel = function() {
+        var label,
+            el = this.get('labelEl');
+            
+            if (!el) {
+                return undefined;
+            }
+        
+        return el.innerHTML;
+    };
+    
+    var _dataConnect = function() {
+        if (!YAHOO.util.Connect) {
+            return false;
+        }
+
+        Dom.addClass(this.get('contentEl').parentNode, this.LOADING_CLASSNAME);
+        
+        this.dataConnection = YAHOO.util.Connect.asyncRequest(
+            this.get('loadMethod'),
+            this.get('dataSrc'), 
+            {
+                success: function(o) {
+                    this.loadHandler.success.call(this, o);
+                    this.set('dataLoaded', true);
+                    this.dataConnection = null;
+                    Dom.removeClass(this.get('contentEl').parentNode,
+                            this.LOADING_CLASSNAME);
+                },
+                failure: function(o) {
+                    this.loadHandler.failure.call(this, o);
+                    this.dataConnection = null;
+                    Dom.removeClass(this.get('contentEl').parentNode,
+                            this.LOADING_CLASSNAME);
+                },
+                scope: this,
+                timeout: this.get('dataTimeout')
+            }
+        );
+    };
+    
+    YAHOO.widget.Tab = Tab;
+    
+    /**
+     * Fires before the active state is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p>If handler returns false, the change will be cancelled, and the value will not
+     * be set.</p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> beforeActiveChange<br>
+     * <code>&lt;Boolean&gt;
+     * prevValue</code> the current value<br>
+     * <code>&lt;Boolean&gt;
+     * newValue</code> the new value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('beforeActiveChange', handler);</code></p>
+     * @event beforeActiveChange
+     */
+        
+    /**
+     * Fires after the active state is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> activeChange<br>
+     * <code>&lt;Boolean&gt;
+     * prevValue</code> the previous value<br>
+     * <code>&lt;Boolean&gt;
+     * newValue</code> the updated value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('activeChange', handler);</code></p>
+     * @event activeChange
+     */
+     
+    /**
+     * Fires before the tab label is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p>If handler returns false, the change will be cancelled, and the value will not
+     * be set.</p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> beforeLabelChange<br>
+     * <code>&lt;String&gt;
+     * prevValue</code> the current value<br>
+     * <code>&lt;String&gt;
+     * newValue</code> the new value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('beforeLabelChange', handler);</code></p>
+     * @event beforeLabelChange
+     */
+        
+    /**
+     * Fires after the tab label is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> labelChange<br>
+     * <code>&lt;String&gt;
+     * prevValue</code> the previous value<br>
+     * <code>&lt;String&gt;
+     * newValue</code> the updated value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('labelChange', handler);</code></p>
+     * @event labelChange
+     */
+     
+    /**
+     * Fires before the tab content is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p>If handler returns false, the change will be cancelled, and the value will not
+     * be set.</p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> beforeContentChange<br>
+     * <code>&lt;String&gt;
+     * prevValue</code> the current value<br>
+     * <code>&lt;String&gt;
+     * newValue</code> the new value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('beforeContentChange', handler);</code></p>
+     * @event beforeContentChange
+     */
+        
+    /**
+     * Fires after the tab content is changed.
+     * <p>See: <a href="YAHOO.util.Element.html#addListener">Element.addListener</a></p>
+     * <p><strong>Event fields:</strong><br>
+     * <code>&lt;String&gt; type</code> contentChange<br>
+     * <code>&lt;String&gt;
+     * prevValue</code> the previous value<br>
+     * <code>&lt;Boolean&gt;
+     * newValue</code> the updated value</p>
+     * <p><strong>Usage:</strong><br>
+     * <code>var handler = function(e) {var previous = e.prevValue};<br>
+     * myTabs.addListener('contentChange', handler);</code></p>
+     * @event contentChange
+     */
+})();
+
+YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.2.1", build: "193"});

Modified: jifty/trunk/share/web/static/js/yui/yahoo.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/yahoo.js	(original)
+++ jifty/trunk/share/web/static/js/yui/yahoo.js	Thu Apr 12 03:32:44 2007
@@ -1,144 +1,442 @@
-/*                                                                                                                                                      
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/ 
-/**
- * The YAHOO object is the single global object used by YUI Library.  It
- * contains utility function for setting up namespaces, inheritance, and
- * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
- * created automatically for and used by the library.
- * @module yahoo
- * @title  YAHOO Global
- */
-
-if (typeof YAHOO == "undefined") {
-    /**
-     * The YAHOO global namespace object
-     * @class YAHOO
-     * @static
-     */
-    var YAHOO = {};
-}
-
-/**
- * Returns the namespace specified and creates it if it doesn't exist
- * <pre>
- * YAHOO.namespace("property.package");
- * YAHOO.namespace("YAHOO.property.package");
- * </pre>
- * Either of the above would create YAHOO.property, then
- * YAHOO.property.package
- *
- * Be careful when naming packages. Reserved words may work in some browsers
- * and not others. For instance, the following will fail in Safari:
- * <pre>
- * YAHOO.namespace("really.long.nested.namespace");
- * </pre>
- * This fails because "long" is a future reserved word in ECMAScript
- *
- * @method namespace
- * @static
- * @param  {String*} arguments 1-n namespaces to create 
- * @return {Object}  A reference to the last namespace object created
- */
-YAHOO.namespace = function() {
-    var a=arguments, o=null, i, j, d;
-    for (i=0; i<a.length; ++i) {
-        d=a[i].split(".");
-        o=YAHOO;
-
-        // YAHOO is implied, so it is ignored if it is included
-        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; ++j) {
-            o[d[j]]=o[d[j]] || {};
-            o=o[d[j]];
-        }
-    }
-
-    return o;
-};
-
-/**
- * Uses YAHOO.widget.Logger to output a log message, if the widget is available.
- *
- * @method log
- * @static
- * @param  {String}  msg  The message to log.
- * @param  {String}  cat  The log category for the message.  Default
- *                        categories are "info", "warn", "error", time".
- *                        Custom categories can be used as well. (opt)
- * @param  {String}  src  The source of the the message (opt)
- * @return {Boolean}      True if the log operation was successful.
- */
-YAHOO.log = function(msg, cat, src) {
-    var l=YAHOO.widget.Logger;
-    if(l && l.log) {
-        return l.log(msg, cat, src);
-    } else {
-        return false;
-    }
-};
-
-/**
- * Utility to set up the prototype, constructor and superclass properties to
- * support an inheritance strategy that can chain constructors and methods.
- *
- * @method extend
- * @static
- * @param {Function} subc   the object to modify
- * @param {Function} superc the object to inherit
- * @param {Object} overrides  additional properties/methods to add to the
- *                              subclass prototype.  These will override the
- *                              matching items obtained from the superclass 
- *                              if present.
- */
-YAHOO.extend = function(subc, superc, overrides) {
-    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];
-        }
-    }
-};
-
-/**
- * Applies all prototype properties in the supplier to the receiver if the
- * receiver does not have these properties yet.  Optionally, one or more
- * methods/properties can be specified (as additional parameters).  This
- * option will overwrite the property if receiver has it already.
- *
- * @method augment
- * @static
- * @param {Function} r  the object to receive the augmentation
- * @param {Function} s  the object that supplies the properties to augment
- * @param {String*}  arguments zero or more properties methods to augment the
- *                             receiver with.  If none specified, everything
- *                             in the supplier will be used unless it would
- *                             overwrite an existing property in the receiver
- */
-YAHOO.augment = function(r, s) {
-    var rp=r.prototype, sp=s.prototype, a=arguments, i, p;
-    if (a[2]) {
-        for (i=2; i<a.length; ++i) {
-            rp[a[i]] = sp[a[i]];
-        }
-    } else {
-        for (p in sp) { 
-            if (!rp[p]) {
-                rp[p] = sp[p];
-            }
-        }
-    }
-};
-
-YAHOO.namespace("util", "widget", "example");
-
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+ * The YAHOO object is the single global object used by YUI Library.  It
+ * contains utility function for setting up namespaces, inheritance, and
+ * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
+ * created automatically for and used by the library.
+ * @module yahoo
+ * @title  YAHOO Global
+ */
+
+/**
+ * YAHOO_config is not included part of the library.  Instead it is an object
+ * that can be defined by the implementer immediately before including the
+ * YUI library.  The properties included in this object will be used to
+ * configure global properties needed as soon as the library begins to load.
+ * @class YAHOO_config
+ * @static
+ */
+
+/**
+ * A reference to a function that will be executed every time a YAHOO module
+ * is loaded.  As parameter, this function will receive the version
+ * information for the module. See <a href="YAHOO.env.html#getVersion">
+ * YAHOO.env.getVersion</a> for the description of the version data structure.
+ * @property listener
+ * @static
+ */
+if (typeof YAHOO == "undefined") {
+    /**
+     * The YAHOO global namespace object.  If YAHOO is already defined, the
+     * existing YAHOO object will not be overwritten so that defined
+     * namespaces are preserved.
+     * @class YAHOO
+     * @static
+     */
+    var YAHOO = {};
+}
+
+/**
+ * Returns the namespace specified and creates it if it doesn't exist
+ * <pre>
+ * YAHOO.namespace("property.package");
+ * YAHOO.namespace("YAHOO.property.package");
+ * </pre>
+ * Either of the above would create YAHOO.property, then
+ * YAHOO.property.package
+ *
+ * Be careful when naming packages. Reserved words may work in some browsers
+ * and not others. For instance, the following will fail in Safari:
+ * <pre>
+ * YAHOO.namespace("really.long.nested.namespace");
+ * </pre>
+ * This fails because "long" is a future reserved word in ECMAScript
+ *
+ * @method namespace
+ * @static
+ * @param  {String*} arguments 1-n namespaces to create 
+ * @return {Object}  A reference to the last namespace object created
+ */
+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;
+
+        // YAHOO is implied, so it is ignored if it is included
+        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;
+};
+
+/**
+ * Uses YAHOO.widget.Logger to output a log message, if the widget is
+ * available.
+ *
+ * @method log
+ * @static
+ * @param  {String}  msg  The message to log.
+ * @param  {String}  cat  The log category for the message.  Default
+ *                        categories are "info", "warn", "error", time".
+ *                        Custom categories can be used as well. (opt)
+ * @param  {String}  src  The source of the the message (opt)
+ * @return {Boolean}      True if the log operation was successful.
+ */
+YAHOO.log = function(msg, cat, src) {
+    var l=YAHOO.widget.Logger;
+    if(l && l.log) {
+        return l.log(msg, cat, src);
+    } else {
+        return false;
+    }
+};
+
+
+/**
+ * Initializes the global by creating the default namespaces and applying
+ * any new configuration information that is detected.
+ * @method init
+ * @static
+ */
+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) {
+            // if YAHOO is loaded multiple times we need to check to see if
+            // this is a new config object.  If it is, add the new component
+            // load listener to the stack
+            for (i=0;i<ls.length;i=i+1) {
+                if (ls[i]==l) {
+                    unique=false;
+                    break;
+                }
+            }
+            if (unique) {
+                ls.push(l);
+            }
+        }
+    }
+};
+
+/**
+ * Registers a module with the YAHOO object
+ * @method register
+ * @static
+ * @param {String}   name    the name of the module (event, slider, etc)
+ * @param {Function} mainClass a reference to class in the module.  This
+ *                             class will be tagged with the version info
+ *                             so that it will be possible to identify the
+ *                             version that is in use when multiple versions
+ *                             have loaded
+ * @param {Object}   data      metadata object for the module.  Currently it
+ *                             is expected to contain a "version" property
+ *                             and a "build" property at minimum.
+ */
+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;
+    // fire the module load listeners
+    for (var i=0;i<ls.length;i=i+1) {
+        ls[i](m);
+    }
+    // label the main class
+    if (mainClass) {
+        mainClass.VERSION = v;
+        mainClass.BUILD = b;
+    } else {
+        YAHOO.log("mainClass is undefined for module " + name, "warn");
+    }
+};
+
+/**
+ * YAHOO.env is used to keep track of what is known about the YUI library and
+ * the browsing environment
+ * @class YAHOO.env
+ * @type Object
+ * @static
+ */
+YAHOO.env = YAHOO.env || {
+    /**
+     * Keeps the version info for all YUI modules that have reported themselves
+     * @property modules
+     * @type Object[]
+     */
+    modules: [],
+    
+    /**
+     * List of functions that should be executed every time a YUI module
+     * reports itself.
+     * @property listeners
+     * @type Function[]
+     */
+    listeners: [],
+    
+    /**
+     * Returns the version data for the specified module:
+     *      <dl>
+     *      <dt>name:</dt>      <dd>The name of the module</dd>
+     *      <dt>version:</dt>   <dd>The version in use</dd>
+     *      <dt>build:</dt>     <dd>The build number in use</dd>
+     *      <dt>versions:</dt>  <dd>All versions that were registered</dd>
+     *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>
+     *      <dt>mainClass:</dt> <dd>An object that was was stamped with the
+     *                 current version and build. If 
+     *                 mainClass.VERSION != version or mainClass.BUILD != build,
+     *                 multiple versions of pieces of the library have been
+     *                 loaded, potentially causing issues.</dd>
+     *       </dl>
+     *
+     * @method getVersion
+     * @static
+     * @param {String}  name the name of the module (event, slider, etc)
+     * @return {Object} The version info
+     */
+    getVersion: function(name) {
+        return YAHOO.env.modules[name] || null;
+    }
+};
+
+/**
+ * Provides the language utilites and extensions used by the library
+ * @class YAHOO.lang
+ */
+YAHOO.lang = {
+    /**
+     * Determines whether or not the provided object is an array
+     * @method isArray
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isArray: function(obj) { // frames lose type, so test constructor string
+        if (obj && obj.constructor && 
+                   obj.constructor.toString().indexOf('Array') > -1) {
+            return true;
+        } else {
+            return YAHOO.lang.isObject(obj) && obj.constructor == Array;
+        }
+    },
+
+    /**
+     * Determines whether or not the provided object is a boolean
+     * @method isBoolean
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isBoolean: function(obj) {
+        return typeof obj == 'boolean';
+    },
+    
+    /**
+     * Determines whether or not the provided object is a function
+     * @method isFunction
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isFunction: function(obj) {
+        return typeof obj == 'function';
+    },
+        
+    /**
+     * Determines whether or not the provided object is null
+     * @method isNull
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isNull: function(obj) {
+        return obj === null;
+    },
+        
+    /**
+     * Determines whether or not the provided object is a legal number
+     * @method isNumber
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isNumber: function(obj) {
+        return typeof obj == 'number' && isFinite(obj);
+    },
+      
+    /**
+     * Determines whether or not the provided object is of type object
+     * or function
+     * @method isObject
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */  
+    isObject: function(obj) {
+        return obj && (typeof obj == 'object' || YAHOO.lang.isFunction(obj));
+    },
+        
+    /**
+     * Determines whether or not the provided object is a string
+     * @method isString
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isString: function(obj) {
+        return typeof obj == 'string';
+    },
+        
+    /**
+     * Determines whether or not the provided object is undefined
+     * @method isUndefined
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    isUndefined: function(obj) {
+        return typeof obj == 'undefined';
+    },
+    
+    /**
+     * Determines whether or not the property was added
+     * to the object instance.  Returns false if the property is not present
+     * in the object, or was inherited from the prototype.
+     * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
+     * There is a discrepancy between YAHOO.lang.hasOwnProperty and
+     * Object.prototype.hasOwnProperty when the property is a primitive added to
+     * both the instance AND prototype with the same value:
+     * <pre>
+     * var A = function() {};
+     * A.prototype.foo = 'foo';
+     * var a = new A();
+     * a.foo = 'foo';
+     * alert(a.hasOwnProperty('foo')); // true
+     * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
+     * </pre>
+     * @method hasOwnProperty
+     * @param {any} obj The object being testing
+     * @return Boolean
+     */
+    hasOwnProperty: function(obj, prop) {
+        if (Object.prototype.hasOwnProperty) {
+            return obj.hasOwnProperty(prop);
+        }
+        
+        return !YAHOO.lang.isUndefined(obj[prop]) && 
+                obj.constructor.prototype[prop] !== obj[prop];
+    },
+        
+    /**
+     * Utility to set up the prototype, constructor and superclass properties to
+     * support an inheritance strategy that can chain constructors and methods.
+     *
+     * @method extend
+     * @static
+     * @param {Function} subc   the object to modify
+     * @param {Function} superc the object to inherit
+     * @param {Object} overrides  additional properties/methods to add to the
+     *                              subclass prototype.  These will override the
+     *                              matching items obtained from the superclass 
+     *                              if present.
+     */
+    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];
+            }
+        }
+    },
+    
+    /**
+     * Applies all prototype properties in the supplier to the receiver if the
+     * receiver does not have these properties yet.  Optionally, one or more
+     * methods/properties can be specified (as additional parameters).  This
+     * option will overwrite the property if receiver has it already.
+     *
+     * @method augment
+     * @static
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @param {String*}  arguments zero or more properties methods to augment the
+     *                             receiver with.  If none specified, everything
+     *                             in the supplier will be used unless it would
+     *                             overwrite an existing property in the receiver
+     */
+    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();
+
+/*
+ * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
+ * @class YAHOO.util.Lang
+ */
+YAHOO.util.Lang = YAHOO.lang;
+
+/**
+ * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
+ * @for YAHOO
+ * @method augment
+ * @static
+ * @param {Function} r  the object to receive the augmentation
+ * @param {Function} s  the object that supplies the properties to augment
+ * @param {String*}  arguments zero or more properties methods to augment the
+ *                             receiver with.  If none specified, everything
+ *                             in the supplier will be used unless it would
+ *                             overwrite an existing property in the receiver
+ */
+YAHOO.augment = YAHOO.lang.augment;
+       
+/**
+ * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
+ * @method extend
+ * @static
+ * @param {Function} subc   the object to modify
+ * @param {Function} superc the object to inherit
+ * @param {Object} overrides  additional properties/methods to add to the
+ *                              subclass prototype.  These will override the
+ *                              matching items obtained from the superclass 
+ *                              if present.
+ */
+YAHOO.extend = YAHOO.lang.extend;
+
+YAHOO.register("yahoo", YAHOO, {version: "2.2.1", build: "193"});


More information about the Jifty-commit mailing list