function hideFormText() {
	var _inputs = document.getElementsByTagName('input');
	var _txt = document.getElementsByTagName('textarea');
	var _value = [];
	
	if (_inputs) {
		for(var i=0; i<_inputs.length; i++) {
			if (_inputs[i].type == 'text' || _inputs[i].type == 'password') {
				
				_inputs[i].index = i;
				_value[i] = _inputs[i].value;
				
				_inputs[i].onfocus = function(){
					if (this.value == _value[this.index])
						this.value = '';
					this.className = this.className.replace(" focus","")
					this.className += ' focus';
					this.className = this.className.replace(" addfor","")
					this.className += ' addfor';
				}
				_inputs[i].onblur = function(){
					if (this.value == '') {
						this.className = this.className.replace(" focus","")
						this.value = _value[this.index];
					}
					this.className = this.className.replace(" addfor","")
				}
			}
		}
	}
	if (_txt) {
		for(var i=0; i<_txt.length; i++) {
			_txt[i].index = i;
			_value['txt'+i] = _txt[i].value;
			
			_txt[i].onfocus = function(){
				if (this.value == _value['txt'+this.index])
					this.value = '';
				this.className = this.className.replace(" focus","")
				this.className += ' focus';
				this.className = this.className.replace(" addfor","")
				this.className += ' addfor';
			}
			_txt[i].onblur = function(){
				if (this.value == '') {
					this.className = this.className.replace(" focus","")
					this.value = _value['txt' + this.index];
				}
				this.className = this.className.replace(" addfor","")
			}
		}
	}
}
if (window.addEventListener)
	window.addEventListener("load", hideFormText, false);
else if (window.attachEvent)
	window.attachEvent("onload", hideFormText);
