
	function clearDefaultValue(e) {
		if (this.value == this.defaultValue) {
			YAHOO.util.Dom.removeClass(this, 'default');
			this.value = '';

			if (YAHOO.util.Dom.hasClass(this, 'passwordchange'))
			{
				this.type = 'password';
				if (!YAHOO.env.ua.gecko) this.focus(); // firefox appears to have an issue with the cursor dissapearing
			}
		}
	}

	function restoreDefaultValue(e) {
		if (this.value == '') {
			YAHOO.util.Dom.addClass(this, 'default');
			this.value = this.defaultValue;
		}

		if (YAHOO.util.Dom.hasClass(this, 'passwordchange') && (this.value == '' || this.value == this.defaultValue))
		{
			this.type = 'text';
		}
	}

	YAHOO.util.Event.onDOMReady(function () {
		defaultboxes = YAHOO.util.Selector.query('.default');
		for (var i in defaultboxes)
		{
			YAHOO.util.Event.addBlurListener(defaultboxes[i], restoreDefaultValue, null, defaultboxes[i]);
			YAHOO.util.Event.addFocusListener(defaultboxes[i], clearDefaultValue, null, defaultboxes[i]);

			restoreDefaultValue.call(defaultboxes[i], {}, null);
		}
	});
