var rS = {
	prepareForms: function() {
		for (var i=0; i<document.forms.length; i++) {
			var thisForm = document.forms[i];
			rS.resetField(thisForm);
		}
	},
	
	resetField: function(whichForm) {
		for (var i=0;i<whichForm.elements.length; i++) {
			var element = whichForm.elements[i];
			if (element.type == "submit") continue;
			if (!element.defaultValue) continue;
			element.onfocus = function() {
				if (this.value == this.defaultValue) {
					this.value = "";
				}
			}
			element.onblur = function() {
				if (this.value == "") {
					this.value = this.defaultValue;
				}
			}
		}
	}
};

addEvent(window,'load',rS.prepareForms,false);
