function resetFields(whichform) {
	for (var i=0; i<whichform.elements.length; i++) {
		var element = whichform.elements[i];
		if ((element.type == "submit") || (element.type == "reset")  || (element.type == "hidden")) continue;
		if ((element.type == "password") || (!element.defaultValue)) {
			element.onfocus = function() {
				this.style.borderColor = "#3b5998";
			}
			element.onblur = function() {
				this.style.borderColor = "#95a5c6";
			}
		}
		element.onfocus = function() {
			this.style.borderColor = "#3b5998";
			if (this.value == this.defaultValue) {
				this.value = "";
			}
		}
		element.onblur = function() {
			this.style.borderColor = "#95a5c6";
			if (this.value == "") {
				this.value = this.defaultValue;
			}
		}
	}
}

function prepareForms() { 
	for (var i=0; i<document.forms.length; i++) {
		var thisform = document.forms[i];
		resetFields(thisform);
	}
}

addLoadEvent(prepareForms);
