document.addEvent('domready', function(){
	Element.implement({
	    resetFormValue : function(){
	    	if(this.get('tag')=='form'){
	    		this.getElements('input[type="text"],textarea').resetFormValue();
	    		return this;
	    	}
	        var def_value = this.get('value');
	        this.addEvents({
	            'focus':function(){
	                var cur_value = this.get('value');
	                if(cur_value == def_value) {
	                    this.set('value', '');
	                }
	            },
	            'blur':function(){
	                var cur_value = this.getProperty('value');
	                if(cur_value == '') {
	                    this.set('value', def_value);
	                }
	            }
	        });
	        return this;
	    }
	});	
});