function initInputs()
{
	inputs = document.getElementsByTagName("input");
	if (inputs){
		for (var i = 0, length = inputs.length; i < length; i++){
			if ((inputs[i].type == "text") && (inputs[i].value == "") && (inputs[i].title != "")){
				inputs[i].value = inputs[i].title;
				inputs[i].className += " clear";
				inputs[i].onfocus = function(){
					if (this.className.indexOf("clear") != -1) this.className = this.className.replace("clear", "");
					if (this.value == this.title) this.value = "";
				}
				inputs[i].onblur = function(){
					if (this.value == ""){ 
						this.value = this.title;
						this.className += " clear";
					}
				}
			}
		}
	}
}


if (window.addEventListener){
	window.addEventListener("load", initInputs, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initInputs);
}
