 <!-- //

window.onload= function () {
	var dbgColor= '#fff'; // Background color, Default
	var fbgColor= '#f9f9f9'; // Background color, onFocus
	var tagInput= document.getElementsByTagName('input');
	var tagText= document.getElementsByTagName('textarea');
	var tagForm= document.getElementsByTagName('form');

	for (var i= 0; i < tagInput.length; i++) {
		if (tagInput[i] &&  tagInput[i].value=='' && tagInput[i].getAttribute('type') != '' && tagInput[i].getAttribute('type').toLowerCase() == 'text' || tagInput[i].getAttribute('type').toLowerCase() == 'password') {
			tagInput[i].style.backgroundColor= dbgColor;
			thisValue= tagInput[i].getAttribute("title");
			if (tagInput[i].value=='' &&thisValue) {
				tagInput[i].value= thisValue;
			}
			tagInput[i].onfocus= function () {
				this.style.backgroundColor= fbgColor;
				if (this.value != this.getAttribute("title") && this.value != '') {
					return;
				} else {
					this.value= '';
				}
			};
			tagInput[i].onblur= function () {
				this.style.backgroundColor= dbgColor;
				if (this.value == '') {
					this.value= this.getAttribute("title");
				}
			};
		}
	}
	for (var i= 0; i < tagText.length; i++) {
		if (tagText[i]) {
			tagText[i].style.backgroundColor= dbgColor;
			thisValue= tagText[i].getAttribute("title");
			if (tagText[i].value=='' && thisValue) {
				tagText[i].value= thisValue;
			}
			tagText[i].onfocus= function () {
				this.style.backgroundColor= fbgColor;
				if (this.value != this.getAttribute("title") && this.value != '') {
					return;
				} else {
					this.value= '';
				}
			};
			tagText[i].onblur= function () {
				this.style.backgroundColor= dbgColor;
				if (this.value == '') {
					this.value= this.getAttribute("title");
				}
			};
		}
	}
	for (var i= 0; i < tagForm.length; i++) {
		if (tagForm[i]) {
			tagForm[i].onsubmit= function () {
				for (var j= 0; j < tagText.length; j++) {
					if (tagText[j].value!='' && tagText[j].value == tagText[j].getAttribute("title")) {
						tagText[j].value ='';
					}
				}
				for (var j= 0; j < tagInput.length; j++) {
					if (tagInput[j].value!='' && tagInput[j].value == tagInput[j].getAttribute("title")) {
						tagInput[j].value ='';
					}
				}
			}
		}
	}
};

//-->