function initFieldDefValue(id, value, defValueInvalid) {
	var item = window.document.getElementById(id);
	initFieldDefValueByItem(item, value, defValueInvalid);
}
function initFieldDefValueByItem(item, value, defValueInvalid) {
	var origClass = item.className;
	var form;

	if (defValueInvalid == null) defValueInvalid = true;

	form = getFirstParent(item, "FORM");

	if (item.value == '') {
		item.className = origClass + " " + "empty";
		item.value = value;
		item.empty = 1;
	}
	
	addEvent(item, "focus", function () {
		if (item.empty == 1) {
			item.value = '';
			item.className = origClass + " " + "full";
			item.empty = 0;
		}
	});
	addEvent(item, "blur", function () {
		if (item.value == '') {
			item.className = origClass + " " + "empty";
			item.value = value;
			item.empty = 1;
		}
	});
	if (form!=null && defValueInvalid)
		addEvent(form, "submit", function () {
			if (item.empty == 1)
				item.value = '';
		});
}