function createNiceInput(fId, fDefaultValue, fValue, fInactiveClass, fActiveClass) {
	var el = document.getElementById(fId);
	var tagName = el.tagName;
	el.value = (fValue?fValue:fDefaultValue);
	
	if (fDefaultValue==fValue || !fValue)
		el.className = fInactiveClass;
	else
		el.className = fActiveClass;
		
	var myOnClick = function(val) {
		if (tagName=="INPUT") {
			if (this.value==fDefaultValue) {
				this.value="";
				this.className = fActiveClass;
			}
		}
		if (tagName=="TEXTAREA") {
			if (this.value==fDefaultValue) {
				this.value="";
				this.className = fActiveClass;
			}
		}
	}
	var myOnBlur = function(val) {
		if (tagName=="INPUT") {
			if (this.value=="") {
				this.value=fDefaultValue;
				this.className = fInactiveClass;
			}
		}
		if (tagName=="TEXTAREA") {
			if (this.value=="") {
				this.value=fDefaultValue;
				this.className = fInactiveClass;
			}
		}
	}
	el.onclick = myOnClick;
	el.onblur = myOnBlur;
}
