var aInputs = document.body.getElementsByTagName("INPUT");
for (i = 0, max = aInputs.length; i < max; i++) {
	if (aInputs[i].type == 'text' && aInputs[i].value != '') {
		defvalue = aInputs[i].value;
		(function(defvalue) { 
			aInputs[i].onfocus = function () {
				if (this.value == defvalue) this.value = '';
			}
			aInputs[i].onblur = function () {
				if (this.value == '') this.value = defvalue;
			}
		})(defvalue);
	} 
}
