function showRegion()
{
		if( document.frmRegistrationForm.drpFireDepartment.selectedIndex!=0)
		{
			 document.getElementById("region3").style.visibility='visible';	
			 document.getElementById("txtLoginName").focus();	
		}
		else
		{
		    document.getElementById("region3").style.visibility='hidden';	
		}

}
function AddOccupantsInfo() {
	var i;
	document.getElementById("hidOccNames").value="";
	document.getElementById("hidOccDescs").value="";
	document.getElementById("hidOccAges").value="";
	for( i=1;i < document.frmRegistrationForm.lstOccNames.length;i++)
		{
			document.getElementById("hidOccNames").value = document.getElementById("hidOccNames").value + document.frmRegistrationForm.lstOccNames.options[i].text + "," ;
		}
	
	for( i=1;i < document.frmRegistrationForm.lstOccDescs.length;i++)
		{
			document.getElementById("hidOccDescs").value = document.getElementById("hidOccDescs").value + document.frmRegistrationForm.lstOccDescs.options[i].text + "," ;
		}
	for( i=1;i < document.frmRegistrationForm.lstOccAges.length;i++)
		{
			document.getElementById("hidOccAges").value = document.getElementById("hidOccAges").value + document.frmRegistrationForm.lstOccAges.options[i].text + "," ;
		}
	
	
	
	
   if( (document.frmRegistrationForm.drpState.disabled)!=true)
   {
	var f1 = document.frmRegistrationForm.txtLoginName.value;
	var f2 = document.frmRegistrationForm.txtPassword.value;
	var f3  = document.frmRegistrationForm.txtConfirmPass.value;
	var f4 = document.frmRegistrationForm.txtFirstName.value;
	var f5 = document.frmRegistrationForm.txtLastName.value;
	var f6 = document.frmRegistrationForm.txtStaddress1.value;
	var f7 = document.frmRegistrationForm.txtCity.value;
	var f8  = document.frmRegistrationForm.txtZip.value;
	var f9 = document.frmRegistrationForm.txtHomePhone.value;
	var f10 = document.frmRegistrationForm.txtOccCount.value;
			if(f1 == '' || f2 == '' ||f3 == '' ||f4 == '' ||f5 == '' ||f6 == ''|| f7 == '' ||f8 == ''|| f9 == ''||f10 == '')
			{
			document.frmRegistrationForm.spnErrorMessage.innerText = "Your information can not be processed until it is complete and in the proper format. Please review your information below - fields with errors have alert message to the right";
			}
	}	
	else
	{
	
	var f4 = document.frmRegistrationForm.txtFirstName.value;
	var f5 = document.frmRegistrationForm.txtLastName.value;
	var f6 = document.frmRegistrationForm.txtStaddress1.value;
	var f7 = document.frmRegistrationForm.txtCity.value;
	var f8  = document.frmRegistrationForm.txtZip.value;
	var f9 = document.frmRegistrationForm.txtHomePhone.value;
	var f10 = document.frmRegistrationForm.txtOccCount.value;
			if(f4 == '' ||f5 == '' ||f6 == ''|| f7 == '' ||f8 == ''|| f9 == ''||f10 == '')
			{
			document.frmRegistrationForm.spnErrorMessage.innerText = "Your information can not be processed until it is complete and in the proper format. Please review your information below - fields with errors have alert message to the right";
			}
	}
}
function setDisableOnLoadChanged()
			{  
				if (document.frmRegistrationForm.txtLoginName != null)
				{   
					if (document.frmRegistrationForm.txtLoginName.readOnly != true)
					{
					var region = false;
					if(((document.frmRegistrationForm.drpState.disabled)!=true) && ((document.frmRegistrationForm.drpFireDepartment.disabled)!=true))
					{
						document.getElementById("region2").style.visibility='hidden';
						document.getElementById("region3").style.visibility='hidden';				
						
						if( document.frmRegistrationForm.drpState.selectedIndex!=0)
						{
						document.getElementById("region2").style.visibility='visible';
						region=true;	
						}
						
						if( region==true && document.frmRegistrationForm.drpFireDepartment.selectedIndex!=0)
						{
						document.getElementById("region3").style.visibility='visible';	
						}
						
					}
					}
				}
				if(document.getElementById('hidPageInfo').value=='1')
				{
					document.getElementById('hidPageInfo').value=0;
				}
				
			}	
			
function resetTextBoxes()
			{
				document.frmRegistrationForm.txtFirstName.value = '';
				document.frmRegistrationForm.txtMiddleInitial.value = '';
				document.frmRegistrationForm.txtLastName.value = '';			
				document.frmRegistrationForm.txtSuffix.value = '';
				document.frmRegistrationForm.txtPrefix.value = '';
				document.frmRegistrationForm.txtBirthDate.value = '';
				document.frmRegistrationForm.txtPhyDesc.value = '';
				
				document.frmRegistrationForm.txtStaddress1.value = '';
				document.frmRegistrationForm.txtStaddress2.value = '';
				document.frmRegistrationForm.txtStaddress3.value = '';
				document.frmRegistrationForm.txtCity.value = '';
				document.frmRegistrationForm.txtZip.value = '';
				document.frmRegistrationForm.txtHomePhone.value = '###-###-####';
				
				document.frmRegistrationForm.txtResSize.value = '';
				document.frmRegistrationForm.txtResDesc.value = '';
				document.frmRegistrationForm.txtUsageInfo.value = '';
				document.frmRegistrationForm.txtStAbove.value = '';
				document.frmRegistrationForm.txtStBelow.value = '';				
			}