function setColors() {
	var defColor = '#f2f2f2'; // Default background color
	var focColor = '#ffffff'; // onFocus background color
	var eInput = document.getElementsByTagName('input');
	var eText = document.getElementsByTagName('textarea');
	var eOption = document.getElementsByTagName('option');
	for (var i = 0; i < eInput.length; i++) {
		if (eInput[i] && eInput[i].getAttribute('type') != '' && eInput[i].getAttribute('type').toLowerCase() == 'text' || eInput[i].getAttribute('type').toLowerCase() == 'password') {
			eInput[i].style.backgroundColor = defColor;
			thisValue = eInput[i].getAttribute("title");
			if (thisValue)
				eInput[i].value = thisValue;
			eInput[i].onfocus = function() {
				this.style.backgroundColor = focColor;
				if (this.value != this.getAttribute("title") && this.value != '') {
					return;
				} else {
					this.value = '';
				}
			};
			eInput[i].onblur = function() {
				this.style.backgroundColor = defColor;
				if (this.value == '') {
					this.value = this.getAttribute("title");
				}
			};
		}
	}
	for (var i = 0; i < eText.length; i++) {
		if (eText[i]) {
			eText[i].style.backgroundColor = defColor;
			thisValue = eText[i].getAttribute("title");
			if (thisValue) {
				eText[i].value = thisValue;
			}
			eText[i].onfocus = function() {
				this.style.backgroundColor = focColor;
				if (this.value != this.getAttribute("title") && this.value != '') {
					return;
				} else {
					this.value = '';
				}
			};
			eText[i].onblur = function() {
				this.style.backgroundColor = defColor;
				if (this.value == '') {
					this.value =  this.getAttribute("title");
				}
			};
		}
	}
	for (var i = 0; i < eOption.length; i++) {
		if (eOption[i]) {
			eOption[i].style.backgroundColor = defColor;
			thisValue = eOption[i].getAttribute("title");
			if (thisValue) {
				eOption[i].value = thisValue;
			}
			eOption[i].onfocus = function() {
				this.style.backgroundColor = focColor;
				if (this.value != this.getAttribute("title") && this.value != '') {
					return;
				} else {
					this.value = '';
				}
			};
			eOption[i].onblur = function() {
				this.style.backgroundColor = defColor;
				if (this.value == '') {
					this.value =  this.getAttribute("title");
				}
			};
		}
	}
}
