var Utils = {
	
	isEmpty: function (value, allowBlank) {
	  return value === null || value === undefined || (!allowBlank ? value === '' : false);
	},
	
	TextFieldWithDefaultValue: Class.create({
		initialize: function (textfield) {
			this.element = $(textfield);
			this.defaultText = $F(this.element);
			Event.observe(this.element, 'focus', this.onfocus.bind(this));
			Event.observe(this.element, 'blur', this.onblur.bind(this));
		},
		onfocus: function () {
			var currentValue = $F(this.element);
			if (currentValue == this.defaultText) {
				Form.Element.setValue(this.element, '');
			}
		},
		onblur: function () {
			var currentValue = $F(this.element);
			if (Utils.isEmpty(currentValue)) {
				Form.Element.setValue(this.element, this.defaultText);							
			}
		}
	})
	
};