function hideFormText() {
	var _inputs = document.getElementsByTagName('input');
	var _selects = document.getElementsByTagName('select');
	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') {
				
				if(!$j(_inputs[i]).hasClass('field-edit')){
					
					_inputs[i].index = i;
					_value[i] = _inputs[i].value;
					
					_inputs[i].onfocus = function(){
						if ((this.value == _value[this.index]) || this.name=='captcha'){
							this.value = '';
							$j(this).addClass('field-edit');
							
							// ONLY for SSN
							if (this.id == 'fakessn'){
								$j('#fakessn').hide();
								$j('#realssn').show();
								$j('#realssn').focus();
								//$j('#fakecssn').removeClass('field-edit-white');
							}
							if (this.id == 'fakecssn'){
								$j('#fakecssn').hide();
								$j('#realcssn').show();
								$j('#realcssn').focus();
							}
							if (this.id == 'fakessn2'){
								$j('#fakessn2').hide();
								$j('#realssn2').show();
								$j('#realssn2').focus();
								//$j('#fakecssn').removeClass('field-edit-white');
							}
							if (this.id == 'fakecssn2'){
								$j('#fakecssn2').hide();
								$j('#realcssn2').show();
								$j('#realcssn2').focus();
							}
							if (this.id == 'fakessn3'){
								$j('#fakessn3').hide();
								$j('#realssn3').show();
								$j('#realssn3').focus();
								//$j('#fakecssn').removeClass('field-edit-white');
							}
							if (this.id == 'fakecssn3'){
								$j('#fakecssn3').hide();
								$j('#realcssn3').show();
								$j('#realcssn3').focus();
							}
							
							// ONLY for Card No
							if (this.id == 'fakecno'){
								$j('#fakecno').hide();
								$j('#realcno').show();
								$j('#realcno').focus();
								//$j('#fakeccno').removeClass('field-edit-white');
							}
							if (this.id == 'fakeccno'){
								$j('#fakeccno').hide();
								$j('#realccno').show();
								$j('#realccno').focus();
							}
							
							// ONLY for password
							if (this.id == 'fakepassword'){
								$j('#fakepassword').hide();
								$j('#realpassword').show();
								$j('#realpassword').focus();
							}
							if (this.id == 'fakecpassword'){
								$j('#fakecpassword').hide();
								$j('#realcpassword').show();
								$j('#realcpassword').focus();
							}
							if (this.id == 'fakepassword2'){
								$j('#fakepassword2').hide();
								$j('#realpassword2').show();
								$j('#realpassword2').focus();
							}
							if (this.id == 'fakecpassword2'){
								$j('#fakecpassword2').hide();
								$j('#realcpassword2').show();
								$j('#realcpassword2').focus();
							}
							if (this.id == 'fakepassword3'){
								$j('#fakepassword3').hide();
								$j('#realpassword3').show();
								$j('#realpassword3').focus();
							}
							if (this.id == 'fakecpassword3'){
								$j('#fakecpassword3').hide();
								$j('#realcpassword3').show();
								$j('#realcpassword3').focus();
							}
							
						}
						
					}
					_inputs[i].onblur = function(){
						if (this.value == ''){
							this.value = _value[this.index];
							$j(this).removeClass('field-edit');

							// ONLY for SSN
							if (this.id == 'realssn'){
								if ($j('#realssn').attr('value') == '') {
									$j('#realssn').hide();
									$j('#fakessn').show();
								}
							}
							if (this.id == 'realcssn'){
								if ($j('#realcssn').attr('value') == '') {
									$j('#realcssn').hide();
									$j('#fakecssn').show();
								}
							}

							// ONLY for Card No
							if (this.id == 'realcno'){
								if ($j('#realcno').attr('value') == '') {
									$j('#realcno').hide();
									$j('#fakecno').show();
								}
							}
							if (this.id == 'realccno'){
								if ($j('#realccno').attr('value') == '') {
									$j('#realccno').hide();
									$j('#fakeccno').show();
								}
							}

							// ONLY for password
							if (this.id == 'realpassword'){
								if ($j('#realpassword').attr('value') == '') {
									$j('#realpassword').hide();
									$j('#fakepassword').show();
								}
							}
							
							// ONLY for password
							if (this.id == 'realcpassword'){
								if ($j('#realcpassword').attr('value') == '') {
									$j('#realcpassword').hide();
									$j('#fakecpassword').show();
								}
							}
							
						}
					}
				
				}

			}
		}
	}
	if (_txt) {
		for(var i=0; i<_txt.length; i++) {

			if(!$j(_txt[i]).hasClass('field-edit')){

				_txt[i].index = i;
				_value['txt'+i] = _txt[i].value;
				
				_txt[i].onfocus = function(){
					if (this.value == _value['txt'+this.index]){
						this.value = '';
						$j(this).addClass('field-edit');
					}
				}
				_txt[i].onblur = function(){
					if (this.value == ''){
						this.value = _value['txt'+this.index];
						$j(this).removeClass('field-edit');
					}
				}
				
			}
		}
	}

	if (_selects) {
		for(var i=0; i<_selects.length; i++) {
			if(!$j(_selects[i]).hasClass('field-edit')){
				_selects[i].onchange = function(){
					if (this.value != ''){
						$j(this).addClass('field-edit');
					}

					// ONLY for card Sort By
					if(this.id=='card_so'){
						search_cards(this);
					}

					// ONLY for Print Urbanization Name
					if(this.id=='cstate'){
						display_cuname(this);
					}
					if(this.id=='pstate'){
						display_puname(this);
					}

					// ONLY for card Sort By
					if(this.id=='rstate'){
						search_city(this);
					}

					// ONLY for Freeze State
					if(this.id=='fstate'){
						// ONLY for Texas
						if(this.value=='57'){
							location.href='freeze_thx.php';	
							openPDF('pdf/securityTX.pdf');
						}
					}

				}
			}
		}
	}
	
}
if (window.addEventListener)
	window.addEventListener("load", hideFormText, false);
else if (window.attachEvent)
	window.attachEvent("onload", hideFormText);
