function toggleOptionalFields(bit) {
	if (document.getElementsByClassName) {
		var fields = document.getElementsByClassName("optional");
		for (i=0;i<fields.length;i++) {
			if (bit) {
				fields[i].style.display = "none";
			} else {
				fields[i].style.display = "block";
			}
		}
	}
}

function highlightSetUp() {
	if (document.getElementsByTagName) {
		fields = document.getElementsByTagName("input");
		for (i=0;i<fields.length;i++) {
			if (fields[i].className.indexOf("submit") == -1) {
				fields[i].onfocus = highlightBG;
				fields[i].onblur = unHighlightBG;
			}
		}
		fields = document.getElementsByTagName("textarea");
		for (i=0;i<fields.length;i++) {
			fields[i].onfocus = highlightBG;
			fields[i].onblur = unHighlightBG;
		}
		fields = document.getElementsByTagName("select");
		for (i=0;i<fields.length;i++) {
			fields[i].onfocus = highlightBG;
			fields[i].onblur = unHighlightBG;
		}
		fields = document.getElementsByTagName("file");
		for (i=0;i<fields.length;i++) {
			fields[i].onfocus = highlightBG;
			fields[i].onblur = unHighlightBG;
		}
	}
}

function highlightBG() {
	this.style.backgroundColor = '#FFC';
}

function unHighlightBG() {
	this.style.backgroundColor = '';
}

function init() {
	highlightSetUp();
}

window.onload = init;