function hideFormText(){
	var _inputs = document.getElementsByTagName('input');
	var _txt = document.getElementsByTagName('textarea');
	
	if(_inputs.length){
		for(var i=0; i<_inputs.length; i++){
			if (_inputs[i].type == 'text' || _inputs[i].type == 'password'){
				_inputs[i]._val = _inputs[i].value;
				_inputs[i].onfocus = function(){
					if(this.value == this._val) this.value = '';
				}
				_inputs[i].onblur = function(){
					if (this.value == '') this.value = this._val;
				}
				if(_inputs[i].className.indexOf('telephone-field') != -1) telephoneRuller(_inputs[i]);
			}
		}
	}
	if(_txt.length){
		for(var i=0; i<_txt.length; i++){
			_txt[i]._val = _txt[i].value;
			_txt[i].onfocus = function(){
				if (this.value == this._val) this.value = '';
			}
			_txt[i].onblur = function(){
				if (this.value == '') this.value = this._val;
			}
		}
	}
	
	function telephoneRuller(_el){
		var iKeyCode;
		_el.onkeypress = function(e){
			e = e || window.event;
			var charCode = e.which ? e.which : e.keyCode;
			if((charCode>=48 && charCode<=57)|| charCode == 8 || charCode== 46 || charCode == 41 || charCode == 40 || (charCode >=37 && charCode <= 40) || charCode == 32 || charCode == 45) return true;
			return false;
		}
	}
}
if (window.addEventListener)
	window.addEventListener("load", hideFormText, false);
else if (window.attachEvent)
	window.attachEvent("onload", hideFormText);