InputPrompt = new Class({
	el: null,
	promptText: '',
	
	initialize: function(el)
	{
		this.el = el;
		this.promptText = el.value;
		this.showPrompt();
		
		var _this = this;
		
		el.addEvent('focus', function(e) {
			if (this.hasClass('hasPrompt'))
				_this.hidePrompt();
		}).addEvent('blur', function(e) {
			if (this.value == '')
				_this.showPrompt();
		});
	},
	
	showPrompt: function()
	{
		this.el.value = this.promptText;
		this.el.addClass('hasPrompt');
	},
	
	hidePrompt: function()
	{
		this.el.removeClass('hasPrompt');
		this.el.value = '';
	}
	
});
