function hideFormText(){
	var _inputs = document.getElementsByTagName('input');
	var _txt = document.getElementsByTagName('textarea');
	var _value = [];
	var _class = 'password';
	var _tagName = 'label';
	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 = '';
			}
			_txt[i].onblur = function(){
				if (this.value == '') 
					this.value = _value['txt' + this.index];
			}
		}
	}
	if (_inputs) {
		for (var i = 0; i < _inputs.length; i++) {
			if (_inputs[i].type == 'password') {
				if (_inputs[i].className.indexOf(_class) != -1) {
					_inputs[i].onfocus = function(){
						var _k = this.parentNode.getElementsByTagName(_tagName);
						inp_t = this;
						for (var j = 0; j < _k.length; j++) {
							if (_k[j].className.indexOf(_class) != -1) {
								inp_t._k = _k[j];
								inp_t._k.style.display = 'none';
							}
						}
					}
					_inputs[i].onblur = function(){
						if (inp_t.value == '' && inp_t._k) {
							inp_t._k.style.display = 'block';
						}
					}
				} else {
					_inputs[i].flag=true;
				}
			}
			if (_inputs[i].type == 'text' || (_inputs[i].type == 'password' && _inputs[i].flag)) {
				_inputs[i].index = i;
				_value[i] = _inputs[i].value;
				_inputs[i].onfocus = function(){
					if (this.value == _value[this.index]) 
						this.value = '';
				}
				_inputs[i].onblur = function(){
					if (this.value == '') 
						this.value = _value[this.index];
				}
			}
		}
	}
}
if (window.addEventListener)
	window.addEventListener("load", hideFormText, false);
else if (window.attachEvent)
	window.attachEvent("onload", hideFormText);