
Form.Element.process = function(element) {
	element.observe('focus', function(event) {
		if (this.value != this.defaultValue || this.cleared) return;
		this.clear();
		this.cleared = true;
	}.bind(element));
}

document.observe('dom:loaded', function() {
	$(document.body).select('.clearonfocus').each(function(item) {
		Form.Element.process(item);
	})
});
