You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/06/24 22:17:21 UTC

svn commit: r550281 [2/3] - in /incubator/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui: VERSION calendar/VERSION calendar/assets/calendar.css calendar/calendar.js dom.js event.js yahoo.js

Modified: incubator/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js?view=diff&rev=550281&r1=550280&r2=550281
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js Sun Jun 24 13:17:19 2007
@@ -1,8 +1,8 @@
 /*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 0.12.2
+version: 2.2.2
 */
 /**
 * 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.
@@ -17,6 +17,24 @@
 	}
 };
 
+/**
+ * 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 = {
 	
 	/**
@@ -33,63 +51,13 @@
 	*/
 	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 = {};
+	config : null,
 
 	/**
 	* Maintains the local collection of configuration property objects as they were initially applied.
@@ -98,7 +66,7 @@
 	* @private
 	* @type Object
 	*/ 
-	var initialConfig = {};
+	initialConfig : null,
 
 	/**
 	* Maintains the local, normalized CustomEvent queue
@@ -106,7 +74,33 @@
 	* @private
 	* @type Object
 	*/ 
-	var eventQueue = [];
+	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. 
@@ -115,16 +109,13 @@
 	* @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];
+	fireEvent : function( key, value ) {
+		var property = this.config[key];
 
-		if (typeof property != 'undefined' && property.event) {
+		if (property && property.event) {
 			property.event.fire(value);
 		}	
-	};
-	/* End Private Members */
+	},
 
 	/**
 	* Adds a property to the Config Object's private config hash.
@@ -132,16 +123,16 @@
 	* @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 ) {
+	addProperty : function( key, propertyObject ) {
 		key = key.toLowerCase();
 
-		config[key] = propertyObject;
+		this.config[key] = propertyObject;
 
-		propertyObject.event = new YAHOO.util.CustomEvent(key);
+		propertyObject.event = new YAHOO.util.CustomEvent(key, this.owner);
 		propertyObject.key = key;
 
 		if (propertyObject.handler) {
-			propertyObject.event.subscribe(propertyObject.handler, this.owner, true);
+			propertyObject.event.subscribe(propertyObject.handler, this.owner);
 		}
 
 		this.setProperty(key, propertyObject.value, true);
@@ -149,25 +140,26 @@
 		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() {
+	getConfig : function() {
 		var cfg = {};
 			
-		for (var prop in config) {
-			var property = config[prop];
-			if (typeof property != 'undefined' && property.event) {
+		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.
@@ -175,16 +167,14 @@
 	* @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) {
+	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.
@@ -192,19 +182,19 @@
 	* @param {String} key	The name of the property
 	* @return {Boolean} True is the property was reset, false if not
 	*/
-	this.resetProperty = function(key) {
+	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]);
+		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.
@@ -214,21 +204,21 @@
 	* @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) {
+	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) {
+			var property = this.config[key];
+			if (property && property.event) {
 				if (property.validator && ! property.validator(value)) { // validator
 					return false;
 				} else {
 					property.value = value;
 					if (! silent) {
-						fireEvent(key, value);
+						this.fireEvent(key, value);
 						this.configChangedEvent.fire([key, value]);
 					}
 					return true;
@@ -237,7 +227,7 @@
 				return false;
 			}
 		}
-	};
+	},
 
 	/**
 	* Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
@@ -247,60 +237,61 @@
 	* @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) {
+	queueProperty : function(key, value) {
 		key = key.toLowerCase();
 
-		var property = config[key];
+		var property = this.config[key];
 							
-		if (typeof property != 'undefined' && property.event) {
-			if (typeof value != 'undefined' && property.validator && ! property.validator(value)) { // validator
+		if (property && property.event) {
+			if (!YAHOO.lang.isUndefined(value) && property.validator && ! property.validator(value)) { // validator
 				return false;
 			} else {
 
-				if (typeof value != 'undefined') {
+				if (!YAHOO.lang.isUndefined(value)) {
 					property.value = value;
 				} else {
 					value = property.value;
 				}
 
 				var foundDuplicate = false;
-
-				for (var i=0;i<eventQueue.length;i++) {
-					var queueItem = eventQueue[i];
+				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.toLowerCase() == key) {
+						if (queueItemKey == 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)]);
+							this.eventQueue[i] = null;
+							this.eventQueue.push([key, (!YAHOO.lang.isUndefined(value) ? 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 (! foundDuplicate && !YAHOO.lang.isUndefined(value)) { // this is a refire, or a new property in the queue
+					this.eventQueue.push([key, value]);
 				}
 			}
 
 			if (property.supercedes) {
-				for (var s=0;s<property.supercedes.length;s++) {
+				var sLen = property.supercedes.length;
+				for (var s=0; s < sLen; s++) {
 					var supercedesCheck = property.supercedes[s];
-
-					for (var q=0;q<eventQueue.length;q++) {
-						var queueItemCheck = eventQueue[q];
+					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.toLowerCase() == supercedesCheck.toLowerCase() ) {
-								eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
-								eventQueue[q] = null;
+							if ( queueItemCheckKey == supercedesCheck.toLowerCase() ) {
+								this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+								this.eventQueue[q] = null;
 								break;
 							}
 						}
@@ -312,25 +303,25 @@
 		} 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) {
+	refireEvent : function(key) {
 		key = key.toLowerCase();
 
-		var property = config[key];
-		if (typeof property != 'undefined' && property.event && typeof property.value != 'undefined') {
+		var property = this.config[key];
+		if (property && property.event && !YAHOO.lang.isUndefined(property.value)) {
 			if (this.queueInProgress) {
 				this.queueProperty(key);
 			} else {
-				fireEvent(key, property.value);
+				this.fireEvent(key, property.value);
 			}
 		}
-	};
+	},
 
 	/**
 	* Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
@@ -339,47 +330,47 @@
 	* @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) {
+	applyConfig : function(userConfig, init) {
 		if (init) {
-			initialConfig = userConfig;
+			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
 	*/
-	this.refresh = function() {
-		for (var prop in config) {
+	refresh : function() {
+		for (var prop in this.config) {
 			this.refireEvent(prop);
 		}
-	};
+	},
 
 	/**
 	* Fires the normalized list of queued property change events
 	* @method fireQueue
 	*/
-	this.fireQueue = function() {
+	fireQueue : function() {
 		this.queueInProgress = true;
-		for (var i=0;i<eventQueue.length;i++) {
-			var queueItem = eventQueue[i];
+		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 = config[key];
+				var property = this.config[key];
 				property.value = value;
 
-				fireEvent(key,value);
+				this.fireEvent(key,value);
 			}
 		}
 		
 		this.queueInProgress = false;
-		eventQueue = [];
-	};
+		this.eventQueue = [];
+	},
 
 	/**
 	* Subscribes an external handler to the change event for any given property. 
@@ -390,11 +381,9 @@
 	* @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) {
+	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);
 			}
@@ -402,7 +391,7 @@
 		} else {
 			return false;
 		}
-	};
+	},
 
 	/**
 	* Unsubscribes an external handler from the change event for any given property. 
@@ -412,45 +401,58 @@
 	* @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) {
+	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.
 	*/
-	this.toString = function() {
+	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() {
+	outputEventQueue : function() {
 		var output = "";
-		for (var q=0;q<eventQueue.length;q++) {
-			var queueItem = eventQueue[q];
+		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 = [];
 };
 
 /**
@@ -780,9 +782,10 @@
 * 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 = (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/");
+YAHOO.widget.Calendar.IMG_ROOT = null;
 
 /**
 * Type constant used for renderers to represent an individual date (M/D/Y)
@@ -847,6 +850,149 @@
 */
 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 = {
+	// Default values for pagedate and selected are not class level constants - they are set during instance creation 
+	PAGEDATE : {key:"pagedate", value:null},
+	SELECTED : {key:"selected", value:null},
+	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"
+};
+
+/**
+* The set 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 = {
 
 	/**
@@ -923,14 +1069,6 @@
 	_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
@@ -1010,24 +1148,26 @@
 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);
+	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);
+			} else {
+				if (this.iframe) {
+					if (this.iframe.parentNode) {
+						this.iframe.parentNode.removeChild(this.iframe);
+					}
+					this.iframe = null;
 				}
-				this.iframe = null;
 			}
 		}
 	}
@@ -1039,7 +1179,7 @@
 */
 YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
 	var title = args[0];
-	var close = this.cfg.getProperty("close");
+	var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
 	
 	var titleDiv;
 
@@ -1068,24 +1208,31 @@
 */
 YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
 	var close = args[0];
-	var title = this.cfg.getProperty("title");
+	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 = "javascript:void(null);";
+		linkClose.href = "#";
 		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);
+		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);
@@ -1102,61 +1249,63 @@
 */
 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("beforeSelect"); 
+	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("select");
+	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
 
 	/**
 	* Fired before a selection is made
 	* @event beforeDeselectEvent
 	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent("beforeDeselect");
+	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("deselect");
+	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
 
 	/**
 	* Fired when the Calendar page is changed
 	* @event changePageEvent
 	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent("changePage");
+	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
 
 	/**
 	* Fired before the Calendar is rendered
 	* @event beforeRenderEvent
 	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
+	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
 
 	/**
 	* Fired when the Calendar is rendered
 	* @event renderEvent
 	*/
-	this.renderEvent = new YAHOO.util.CustomEvent("render");
+	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
 
 	/**
 	* Fired when the Calendar is reset
 	* @event resetEvent
 	*/
-	this.resetEvent = new YAHOO.util.CustomEvent("reset");
+	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
 
 	/**
 	* Fired when the Calendar is cleared
 	* @event clearEvent
 	*/
-	this.clearEvent = new YAHOO.util.CustomEvent("clear");
+	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
 
 	this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
 	this.selectEvent.subscribe(this.onSelect, this, true);
@@ -1168,7 +1317,6 @@
 	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.
@@ -1177,17 +1325,30 @@
 * @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;
 
-	var cell,index,d,date;
+	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;	
+		}
 
-	while (target.tagName.toLowerCase() != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
 		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
+		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)) {
@@ -1202,16 +1363,16 @@
 			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) {
@@ -1276,13 +1437,15 @@
 
 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("pagedate", { value:new Date(), handler:this.configPageDate } );
+	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
 
 	/**
 	* The date or range of dates representing the current Calendar selection
@@ -1290,7 +1453,7 @@
 	* @type String
 	* @default []
 	*/
-	this.cfg.addProperty("selected", { value:[], handler:this.configSelected } );
+	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
 
 	/**
 	* The title to display above the Calendar's month header
@@ -1298,7 +1461,7 @@
 	* @type String
 	* @default ""
 	*/
-	this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
+	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
@@ -1306,7 +1469,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("close", { value:false, handler:this.configClose } );
+	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.
@@ -1314,7 +1477,7 @@
 	* @type Boolean
 	* @default true
 	*/
-	this.cfg.addProperty("iframe", { value:true, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+	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)
@@ -1322,7 +1485,7 @@
 	* @type String
 	* @default null
 	*/
-	this.cfg.addProperty("mindate", { value:null, handler:this.configMinDate } );
+	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
 
 	/**
 	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
@@ -1330,7 +1493,7 @@
 	* @type String
 	* @default null
 	*/
-	this.cfg.addProperty("maxdate", { value:null, handler:this.configMaxDate } );
+	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
 
 
 	// Options properties
@@ -1341,7 +1504,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("MULTI_SELECT",	{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	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).
@@ -1349,7 +1512,7 @@
 	* @type number
 	* @default 0
 	*/
-	this.cfg.addProperty("START_WEEKDAY",	{ value:0, handler:this.configOptions, validator:this.cfg.checkNumber  } );
+	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.
@@ -1357,7 +1520,7 @@
 	* @type Boolean
 	* @default true
 	*/
-	this.cfg.addProperty("SHOW_WEEKDAYS",	{ value:true, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
+	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.
@@ -1365,7 +1528,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	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.
@@ -1373,7 +1536,7 @@
 	* @type Boolean
 	* @default false
 	*/	
-	this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	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.
@@ -1381,23 +1544,25 @@
 	* @type Boolean
 	* @default false
 	*/	
-	this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
+	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
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
+	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
+	* @default null
 	*/	
-	this.cfg.addProperty("NAV_ARROW_LEFT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.configOptions } );
+	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 left navigation arrow.
+	* The image that should be used for the right navigation arrow.
 	* @config NAV_ARROW_RIGHT
 	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
+	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+	* @default null
 	*/	
-	this.cfg.addProperty("NAV_ARROW_RIGHT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.configOptions } );
+	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
 
 	// Locale properties
 
@@ -1407,7 +1572,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
 	
 	/**
 	* The long month labels for the current locale.
@@ -1415,7 +1580,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
 	
 	/**
 	* The 1-character weekday labels for the current locale.
@@ -1423,7 +1588,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
 	
 	/**
 	* The short weekday labels for the current locale.
@@ -1431,7 +1596,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
 	
 	/**
 	* The medium weekday labels for the current locale.
@@ -1439,7 +1604,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
 	
 	/**
 	* The long weekday labels for the current locale.
@@ -1447,7 +1612,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
 
 	/**
 	* Refreshes the locale values used to build the Calendar.
@@ -1455,17 +1620,17 @@
 	* @private
 	*/
 	var refreshLocale = function() {
-		this.cfg.refireEvent("LOCALE_MONTHS");
-		this.cfg.refireEvent("LOCALE_WEEKDAYS");
+		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
 	};
 
-	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);
+	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".
@@ -1473,7 +1638,7 @@
 	* @type String
 	* @default "long"
 	*/	
-	this.cfg.addProperty("LOCALE_MONTHS",	{ value:"long", handler:this.configLocaleValues } );
+	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".
@@ -1481,7 +1646,7 @@
 	* @type String
 	* @default "short"
 	*/	
-	this.cfg.addProperty("LOCALE_WEEKDAYS",	{ value:"short", handler:this.configLocaleValues } );
+	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.
@@ -1489,7 +1654,7 @@
 	* @type String
 	* @default ","
 	*/	
-	this.cfg.addProperty("DATE_DELIMITER",		{ value:",", handler:this.configLocale } );
+	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.
@@ -1497,7 +1662,7 @@
 	* @type String
 	* @default "/"
 	*/	
-	this.cfg.addProperty("DATE_FIELD_DELIMITER",{ value:"/", handler:this.configLocale } );
+	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.
@@ -1505,7 +1670,7 @@
 	* @type String
 	* @default "-"
 	*/
-	this.cfg.addProperty("DATE_RANGE_DELIMITER",{ value:"-", handler:this.configLocale } );
+	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
@@ -1513,7 +1678,7 @@
 	* @type Number
 	* @default 1
 	*/
-	this.cfg.addProperty("MY_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1521,7 +1686,7 @@
 	* @type Number
 	* @default 2
 	*/
-	this.cfg.addProperty("MY_YEAR_POSITION",	{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1529,7 +1694,7 @@
 	* @type Number
 	* @default 1
 	*/
-	this.cfg.addProperty("MD_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1537,7 +1702,7 @@
 	* @type Number
 	* @default 2
 	*/
-	this.cfg.addProperty("MD_DAY_POSITION",		{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1545,7 +1710,7 @@
 	* @type Number
 	* @default 1
 	*/
-	this.cfg.addProperty("MDY_MONTH_POSITION",	{ value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1553,7 +1718,7 @@
 	* @type Number
 	* @default 2
 	*/
-	this.cfg.addProperty("MDY_DAY_POSITION",	{ value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	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
@@ -1561,7 +1726,7 @@
 	* @type Number
 	* @default 3
 	*/
-	this.cfg.addProperty("MDY_YEAR_POSITION",	{ value:3, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
 };
 
 /**
@@ -1569,31 +1734,7 @@
 * @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");
-	}
+	this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
 };
 
 /**
@@ -1602,9 +1743,9 @@
 */
 YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
 	var val = args[0];
-	if (typeof val == 'string') {
+	if (YAHOO.lang.isString(val)) {
 		val = this._parseDate(val);
-		this.cfg.setProperty("mindate", new Date(val[0],(val[1]-1),val[2]));
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2]));
 	}
 };
 
@@ -1614,9 +1755,9 @@
 */
 YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
 	var val = args[0];
-	if (typeof val == 'string') {
+	if (YAHOO.lang.isString(val)) {
 		val = this._parseDate(val);
-		this.cfg.setProperty("maxdate", new Date(val[0],(val[1]-1),val[2]));
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2]));
 	}
 };
 
@@ -1626,14 +1767,15 @@
 */
 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 (typeof selected == 'string') {
-			this.cfg.setProperty("selected", this._parseDates(selected), true);
+		if (YAHOO.lang.isString(selected)) {
+			this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
 		} 
 	}
 	if (! this._selectedDates) {
-		this._selectedDates = this.cfg.getProperty("selected");
+		this._selectedDates = this.cfg.getProperty(cfgSelected);
 	}
 };
 
@@ -1642,9 +1784,7 @@
 * @method configOptions
 */
 YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
-	type = type.toUpperCase();
-	var val = args[0];
-	this.Options[type] = val;
+	this.Options[type.toUpperCase()] = args[0];
 };
 
 /**
@@ -1652,13 +1792,11 @@
 * @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");
+	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);
 };
 
 /**
@@ -1666,37 +1804,39 @@
 * @method configLocaleValues
 */
 YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
-	type = type.toUpperCase();
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
+
+	type = type.toLowerCase();
 	var val = args[0];
 
 	switch (type) {
-		case "LOCALE_MONTHS":
+		case defCfg.LOCALE_MONTHS.key:
 			switch (val) {
-				case "short":
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_SHORT").concat();
+				case YAHOO.widget.Calendar.SHORT:
+					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
 					break;
-				case "long":
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_LONG").concat();
+				case YAHOO.widget.Calendar.LONG:
+					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
 					break;
 			}
 			break;
-		case "LOCALE_WEEKDAYS":
+		case defCfg.LOCALE_WEEKDAYS.key:
 			switch (val) {
-				case "1char":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_1CHAR").concat();
+				case YAHOO.widget.Calendar.ONE_CHAR:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
 					break;
-				case "short":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_SHORT").concat();
+				case YAHOO.widget.Calendar.SHORT:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
 					break;
-				case "medium":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_MEDIUM").concat();
+				case YAHOO.widget.Calendar.MEDIUM:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
 					break;
-				case "long":
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_LONG").concat();
+				case YAHOO.widget.Calendar.LONG:
+					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
 					break;
 			}
 			
-			var START_WEEKDAY = this.cfg.getProperty("START_WEEKDAY");
+			var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
 
 			if (START_WEEKDAY > 0) {
 				for (var w=0;w<START_WEEKDAY;++w) {
@@ -1713,123 +1853,133 @@
 */
 YAHOO.widget.Calendar.prototype.initStyles = function() {
 
-	/**
-	* Collection of Style constants for the Calendar
-	* @property Style
-	*/
+	var defStyle = YAHOO.widget.Calendar._STYLES;
+
 	this.Style = {
 		/**
 		* @property Style.CSS_ROW_HEADER
 		*/
-		CSS_ROW_HEADER: "calrowhead",
+		CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
 		/**
 		* @property Style.CSS_ROW_FOOTER
 		*/
-		CSS_ROW_FOOTER: "calrowfoot",
+		CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
 		/**
 		* @property Style.CSS_CELL
 		*/
-		CSS_CELL : "calcell",
+		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 : "selected",
+		CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
 		/**
 		* @property Style.CSS_CELL_SELECTABLE
 		*/
-		CSS_CELL_SELECTABLE : "selectable",
+		CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
 		/**
 		* @property Style.CSS_CELL_RESTRICTED
 		*/
-		CSS_CELL_RESTRICTED : "restricted",
+		CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
 		/**
 		* @property Style.CSS_CELL_TODAY
 		*/
-		CSS_CELL_TODAY : "today",
+		CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
 		/**
 		* @property Style.CSS_CELL_OOM
 		*/
-		CSS_CELL_OOM : "oom",
+		CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
 		/**
 		* @property Style.CSS_CELL_OOB
 		*/
-		CSS_CELL_OOB : "previous",
+		CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
 		/**
 		* @property Style.CSS_HEADER
 		*/
-		CSS_HEADER : "calheader",
+		CSS_HEADER : defStyle.CSS_HEADER,
 		/**
 		* @property Style.CSS_HEADER_TEXT
 		*/
-		CSS_HEADER_TEXT : "calhead",
+		CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+		/**
+		* @property Style.CSS_BODY
+		*/
+		CSS_BODY : defStyle.CSS_BODY,
 		/**
 		* @property Style.CSS_WEEKDAY_CELL
 		*/
-		CSS_WEEKDAY_CELL : "calweekdaycell",
+		CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
 		/**
 		* @property Style.CSS_WEEKDAY_ROW
 		*/
-		CSS_WEEKDAY_ROW : "calweekdayrow",
+		CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
 		/**
 		* @property Style.CSS_FOOTER
 		*/
-		CSS_FOOTER : "calfoot",
+		CSS_FOOTER : defStyle.CSS_FOOTER,
 		/**
 		* @property Style.CSS_CALENDAR
 		*/
-		CSS_CALENDAR : "yui-calendar",
+		CSS_CALENDAR : defStyle.CSS_CALENDAR,
 		/**
 		* @property Style.CSS_SINGLE
 		*/
-		CSS_SINGLE : "single",
+		CSS_SINGLE : defStyle.CSS_SINGLE,
 		/**
 		* @property Style.CSS_CONTAINER
 		*/
-		CSS_CONTAINER : "yui-calcontainer",
+		CSS_CONTAINER : defStyle.CSS_CONTAINER,
 		/**
 		* @property Style.CSS_NAV_LEFT
 		*/
-		CSS_NAV_LEFT : "calnavleft",
+		CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
 		/**
 		* @property Style.CSS_NAV_RIGHT
 		*/
-		CSS_NAV_RIGHT : "calnavright",
+		CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+		/**
+		* @property Style.CSS_CLOSE
+		*/
+		CSS_CLOSE : defStyle.CSS_CLOSE,
 		/**
 		* @property Style.CSS_CELL_TOP
 		*/
-		CSS_CELL_TOP : "calcelltop",
+		CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
 		/**
 		* @property Style.CSS_CELL_LEFT
 		*/
-		CSS_CELL_LEFT : "calcellleft",
+		CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
 		/**
 		* @property Style.CSS_CELL_RIGHT
 		*/
-		CSS_CELL_RIGHT : "calcellright",
+		CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
 		/**
 		* @property Style.CSS_CELL_BOTTOM
 		*/
-		CSS_CELL_BOTTOM : "calcellbottom",
+		CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
 		/**
 		* @property Style.CSS_CELL_HOVER
 		*/
-		CSS_CELL_HOVER : "calcellhover",
+		CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
 		/**
 		* @property Style.CSS_CELL_HIGHLIGHT1
 		*/
-		CSS_CELL_HIGHLIGHT1 : "highlight1",
+		CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
 		/**
 		* @property Style.CSS_CELL_HIGHLIGHT2
 		*/
-		CSS_CELL_HIGHLIGHT2 : "highlight2",
+		CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
 		/**
 		* @property Style.CSS_CELL_HIGHLIGHT3
 		*/
-		CSS_CELL_HIGHLIGHT3 : "highlight3",
+		CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
 		/**
 		* @property Style.CSS_CELL_HIGHLIGHT4
 		*/
-		CSS_CELL_HIGHLIGHT4 : "highlight4"
+		CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
 	};
 };
 
@@ -1840,8 +1990,8 @@
 * @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;
+	var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
+	return this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + " " + pageDate.getFullYear();
 };
 
 /**
@@ -1851,8 +2001,7 @@
 * @return	{String}	The formatted day label
 */
 YAHOO.widget.Calendar.prototype.buildDayLabel = function(workingDate) {
-	var day = workingDate.getDate();
-	return day;
+	return workingDate.getDate();
 };
 
 /**
@@ -1864,11 +2013,15 @@
 YAHOO.widget.Calendar.prototype.renderHeader = function(html) {
 	var colSpan = 7;
 	
-	if (this.cfg.getProperty("SHOW_WEEK_HEADER")) {
+	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("SHOW_WEEK_FOOTER")) {
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
 		colSpan += 1;
 	}
 
@@ -1877,38 +2030,46 @@
 	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;
+	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 {
+	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>';
+	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;
 		}
-		
-		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>';
+		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>';
 
-	html[html.length] =				'</div>';
-	html[html.length] =			'</th>';
-	html[html.length] =		'</tr>';
-
-	if (this.cfg.getProperty("SHOW_WEEKDAYS")) {
+	if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
 		html = this.buildWeekdays(html);
 	}
 	
@@ -1925,9 +2086,11 @@
 */
 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("SHOW_WEEK_HEADER")) {
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
 		html[html.length] = '<th>&#160;</th>';
 	}
 
@@ -1935,7 +2098,7 @@
 		html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
 	}
 
-	if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) {
+	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
 		html[html.length] = '<th>&#160;</th>';
 	}
 
@@ -1952,8 +2115,9 @@
 * @return {Array} The current working HTML array
 */
 YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
-	
-	var startDay = this.cfg.getProperty("START_WEEKDAY");
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+	var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
 
 	this.preMonthDays = workingDate.getDay();
 	if (startDay > 0) {
@@ -1968,10 +2132,34 @@
 	
 	workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
 
-	var useDate,weekNum,weekClass;
-	useDate = this.cfg.getProperty("pagedate");
+	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);
 
-	html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + '">';
+	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;
 
@@ -1986,45 +2174,41 @@
 	for (var r=0;r<6;r++) {
 
 		weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
+		weekClass = weekPrefix + weekNum;
 
-		weekClass = "w" + weekNum;
-
-		if (r !== 0 && this.isDateOOM(workingDate) && this.cfg.getProperty("HIDE_BLANK_WEEKS") === true) {
+		// 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 (this.cfg.getProperty("SHOW_WEEK_HEADER")) { html = this.renderRowHeader(weekNum, html); }
+			if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
 			
 			for (var d=0;d<7;d++){ // Render actual days
 
-				var cellRenderers = [];
+				cellRenderers = [];
+				renderer = null;
 
 				this.clearElement(cell);
-				
-				YAHOO.util.Dom.addClass(cell, "calcell");
+				cell.className = this.Style.CSS_CELL;
+				cell.id = this.id + cellPrefix + i;
 
-				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()) {
+				if (workingDate.getDate()		== todayDate && 
+					workingDate.getMonth()		== todayMonth &&
+					workingDate.getFullYear()	== todayYear) {
 					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)) {
+				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, "wd" + workingDate.getDay());
-					YAHOO.util.Dom.addClass(cell, "d" + workingDate.getDate());
+					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) {
 
@@ -2102,22 +2286,11 @@
 
 				}
 
-				if (this._indexOfSelectedFieldArray([workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]) > -1) {
+				if (this._indexOfSelectedFieldArray(workingArray) > -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())) ||
+				if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
 					(maxdate && (workingDate.getTime() > maxdate.getTime()))
 				) {
 					cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
@@ -2125,12 +2298,9 @@
 					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) {
+				for (var x=0; x < cellRenderers.length; ++x) {
+					if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
 						break;
 					}
 				}
@@ -2148,7 +2318,7 @@
 				}
 				
 				var postDays = this.postMonthDays; 
-				if (postDays >= 7 && this.cfg.getProperty("HIDE_BLANK_WEEKS")) {
+				if (hideBlankWeeks && postDays >= 7) {
 					var blankWeeks = Math.floor(postDays/7);
 					for (var p=0;p<blankWeeks;++p) {
 						postDays -= 7;
@@ -2160,11 +2330,10 @@
 				}
 
 				html[html.length] = tempDiv.innerHTML;
-				
 				i++;
 			}
 
-			if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) { html = this.renderRowFooter(weekNum, html); }
+			if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
 
 			html[html.length] = '</tr>';
 		}
@@ -2194,14 +2363,16 @@
 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("pagedate"));
+	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 + '">';
@@ -2211,13 +2382,13 @@
 	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.cfg.refireEvent(defCfg.TITLE.key);
+	this.cfg.refireEvent(defCfg.CLOSE.key);
+	this.cfg.refireEvent(defCfg.IFRAME.key);
 
 	this.renderEvent.fire();
 };
@@ -2230,28 +2401,29 @@
 	
 	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);
+	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) {
+	if (linkLeft && linkLeft.length > 0) {
 		this.linkLeft = linkLeft[0];
-		YAHOO.util.Event.addListener(this.linkLeft, "mousedown", cal.previousMonth, cal, true);
+		YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
 	}
 
-	if (linkRight) {
+	if (linkRight && linkRight.length > 0) {
 		this.linkRight = linkRight[0];
-		YAHOO.util.Event.addListener(this.linkRight, "mousedown", cal.nextMonth, cal, true);
+		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)) {
+			if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
 				var items = this.domEventMap[cls];
-				
+
 				if (! (items instanceof Array)) {
 					items = [items];
 				}
@@ -2296,7 +2468,7 @@
 	id = parseInt(id, 10);
 	return this.cellDates[id];
 };
-												  
+
 // BEGIN BUILT-IN TABLE CELL RENDERERS
 
 /**
@@ -2346,7 +2518,7 @@
 * @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>";
+	cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
 };
 
 /**
@@ -2464,7 +2636,8 @@
 * @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));
+	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();
 };
@@ -2476,7 +2649,8 @@
 * @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));
+	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();
 };
@@ -2488,7 +2662,8 @@
 * @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));
+	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();
 };
@@ -2500,7 +2675,8 @@
 * @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));
+	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();
 };
@@ -2547,8 +2723,9 @@
 * @method reset
 */
 YAHOO.widget.Calendar.prototype.reset = function() {
-	this.cfg.resetProperty("selected");
-	this.cfg.resetProperty("pagedate");
+	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	this.cfg.resetProperty(defCfg.SELECTED.key);
+	this.cfg.resetProperty(defCfg.PAGEDATE.key);
 	this.resetEvent.fire();
 };
 
@@ -2558,8 +2735,9 @@
 * @method clear
 */
 YAHOO.widget.Calendar.prototype.clear = function() {
-	this.cfg.setProperty("selected", []);
-	this.cfg.setProperty("pagedate", new Date(this.today.getTime()));
+	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();
 };
 
@@ -2576,8 +2754,10 @@
 */
 YAHOO.widget.Calendar.prototype.select = function(date) {
 	this.beforeSelectEvent.fire();
+	
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
 
-	var selected = this.cfg.getProperty("selected");
+	var selected = this.cfg.getProperty(cfgSelected);
 	var aToBeSelected = this._toFieldArray(date);
 
 	for (var a=0;a<aToBeSelected.length;++a) {
@@ -2588,9 +2768,9 @@
 	}
 	
 	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
+		this.parent.cfg.setProperty(cfgSelected, selected);
 	} else {
-		this.cfg.setProperty("selected", selected);
+		this.cfg.setProperty(cfgSelected, selected);
 	}
 
 	this.selectEvent.fire(aToBeSelected);
@@ -2608,8 +2788,9 @@
 */
 YAHOO.widget.Calendar.prototype.selectCell = function(cellIndex) {
 	this.beforeSelectEvent.fire();
-
-	var selected = this.cfg.getProperty("selected");
+	
+	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];
@@ -2618,12 +2799,14 @@
 
 	var selectDate = cellDate.concat();
 
-	selected[selected.length] = selectDate;
+	if (this._indexOfSelectedFieldArray(selectDate) == -1) {
+		selected[selected.length] = selectDate;
+	}
 
 	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
+		this.parent.cfg.setProperty(cfgSelected, selected);
 	} else {
-		this.cfg.setProperty("selected", selected);
+		this.cfg.setProperty(cfgSelected, selected);
 	}
 
 	this.renderCellStyleSelected(dCellDate,cell);
@@ -2648,8 +2831,9 @@
 */
 YAHOO.widget.Calendar.prototype.deselect = function(date) {
 	this.beforeDeselectEvent.fire();
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
 
-	var selected = this.cfg.getProperty("selected");
+	var selected = this.cfg.getProperty(cfgSelected);
 
 	var aToBeSelected = this._toFieldArray(date);
 
@@ -2663,9 +2847,9 @@
 	}
 
 	if (this.parent) {
-		this.parent.cfg.setProperty("selected", selected);
+		this.parent.cfg.setProperty(cfgSelected, selected);
 	} else {
-		this.cfg.setProperty("selected", selected);
+		this.cfg.setProperty(cfgSelected, selected);
 	}
 
 	this.deselectEvent.fire(aToBeSelected);
@@ -2684,7 +2868,9 @@
 YAHOO.widget.Calendar.prototype.deselectCell = function(i) {
 	this.beforeDeselectEvent.fire();
 	
-	var selected = this.cfg.getProperty("selected");
+	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];
@@ -2695,19 +2881,18 @@
 	var selectDate = cellDate.concat();
 
 	if (cellDateIndex > -1) {
-		if (this.cfg.getProperty("pagedate").getMonth() == dCellDate.getMonth() &&
-			this.cfg.getProperty("pagedate").getFullYear() == dCellDate.getFullYear()) {
+		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("selected", selected);
+		this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
 	} else {
-		this.cfg.setProperty("selected", selected);
+		this.cfg.setProperty(defCfg.SELECTED.key, selected);
 	}
 	
 	this.deselectEvent.fire(selectDate);
@@ -2724,15 +2909,17 @@
 */
 YAHOO.widget.Calendar.prototype.deselectAll = function() {
 	this.beforeDeselectEvent.fire();
+	
+	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
 
-	var selected = this.cfg.getProperty("selected");
+	var selected = this.cfg.getProperty(cfgSelected);
 	var count = selected.length;
 	var sel = selected.concat();
 
 	if (this.parent) {
-		this.parent.cfg.setProperty("selected", []);
+		this.parent.cfg.setProperty(cfgSelected, []);
 	} else {
-		this.cfg.setProperty("selected", []);
+		this.cfg.setProperty(cfgSelected, []);
 	}
 	
 	if (count > 0) {
@@ -2762,9 +2949,9 @@
 
 	if (date instanceof Date) {
 		returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
-	} else if (typeof date == 'string') {
+	} else if (YAHOO.lang.isString(date)) {
 		returnDate = this._parseDates(date);
-	} else if (date instanceof Array) {
+	} 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()];
@@ -2821,7 +3008,7 @@
 */
 YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray = function(find) {
 	var selected = -1;
-	var seldates = this.cfg.getProperty("selected");
+	var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 
 	for (var s=0;s<seldates.length;++s) {
 		var sArray = seldates[s];
@@ -2841,11 +3028,37 @@
 * @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 (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 isOOM;
+	return parsedDate;
 };
 
 // END UTILITY METHODS
@@ -2857,7 +3070,7 @@
 * @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.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();
@@ -3118,9 +3331,10 @@
 * @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");
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	var current = this.cfg.getProperty(cfgPageDate);
 	current.setMonth(parseInt(month, 10));
-	this.cfg.setProperty("pagedate", current);
+	this.cfg.setProperty(cfgPageDate, current);
 };
 
 /**
@@ -3129,9 +3343,10 @@
 * @param {Number}	year		The numeric 4-digit year
 */
 YAHOO.widget.Calendar.prototype.setYear = function(year) {
-	var current = this.cfg.getProperty("pagedate");
+	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+	var current = this.cfg.getProperty(cfgPageDate);
 	current.setFullYear(parseInt(year, 10));
-	this.cfg.setProperty("pagedate", current);
+	this.cfg.setProperty(cfgPageDate, current);
 };
 
 /**
@@ -3141,7 +3356,7 @@
 */
 YAHOO.widget.Calendar.prototype.getSelectedDates = function() {
 	var returnDates = [];
-	var selected = this.cfg.getProperty("selected");
+	var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 
 	for (var d=0;d<selected.length;++d) {
 		var dateArray = selected[d];
@@ -3329,13 +3544,16 @@
 
 
 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("pages", { value:2, validator:this.cfg.checkNumber, handler:this.configPages } );
+	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)
@@ -3343,7 +3561,7 @@
 	* @type String
 	* @default today's date
 	*/
-	this.cfg.addProperty("pagedate", { value:new Date(), handler:this.configPageDate } );
+	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
 
 	/**
 	* The date or range of dates representing the current Calendar selection
@@ -3351,7 +3569,7 @@
 	* @type String
 	* @default []
 	*/
-	this.cfg.addProperty("selected", { value:[], handler:this.delegateConfig } );
+	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
 
 	/**
 	* The title to display above the CalendarGroup's month header
@@ -3359,7 +3577,7 @@
 	* @type String
 	* @default ""
 	*/
-	this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
+	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
@@ -3367,7 +3585,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("close", { value:false, handler:this.configClose } );
+	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.
@@ -3375,7 +3593,7 @@
 	* @type Boolean
 	* @default true
 	*/
-	this.cfg.addProperty("iframe", { value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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)
@@ -3383,7 +3601,7 @@
 	* @type String
 	* @default null
 	*/
-	this.cfg.addProperty("mindate", { value:null, handler:this.delegateConfig } );
+	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
 
 	/**
 	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
@@ -3391,7 +3609,7 @@
 	* @type String
 	* @default null
 	*/	
-	this.cfg.addProperty("maxdate", { value:null, handler:this.delegateConfig  } );
+	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
 
 	// Options properties
 
@@ -3401,7 +3619,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("MULTI_SELECT",	{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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).
@@ -3409,7 +3627,7 @@
 	* @type number
 	* @default 0
 	*/	
-	this.cfg.addProperty("START_WEEKDAY",	{ value:0, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+	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.
@@ -3417,7 +3635,7 @@
 	* @type Boolean
 	* @default true
 	*/	
-	this.cfg.addProperty("SHOW_WEEKDAYS",	{ value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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.
@@ -3425,7 +3643,7 @@
 	* @type Boolean
 	* @default false
 	*/	
-	this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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.
@@ -3433,7 +3651,7 @@
 	* @type Boolean
 	* @default false
 	*/
-	this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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.
@@ -3441,23 +3659,25 @@
 	* @type Boolean
 	* @default false
 	*/		
-	this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	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
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
+	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+	* @default null
 	*/		
-	this.cfg.addProperty("NAV_ARROW_LEFT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.delegateConfig } );
+	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 left navigation arrow.
+	* The image that should be used for the right navigation arrow.
 	* @config NAV_ARROW_RIGHT
 	* @type String
-	* @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
+	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+	* @default null
 	*/		
-	this.cfg.addProperty("NAV_ARROW_RIGHT",	{ value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.delegateConfig } );
+	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
 
 	// Locale properties
 	
@@ -3467,7 +3687,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
 	
 	/**
 	* The long month labels for the current locale.
@@ -3475,7 +3695,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
 	
 	/**
 	* The 1-character weekday labels for the current locale.
@@ -3483,7 +3703,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
 	
 	/**
 	* The short weekday labels for the current locale.
@@ -3491,7 +3711,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
 	
 	/**
 	* The medium weekday labels for the current locale.
@@ -3499,7 +3719,7 @@
 	* @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 } );
+	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
 	
 	/**
 	* The long weekday labels for the current locale.
@@ -3507,7 +3727,7 @@
 	* @type String[]

[... 480 lines stripped ...]