// JavaScript Document
function checker() {
	closer();
	displayer();
}

function closer(){
	document.getElementById('personal_checking_yes').style.display = 'none';
	document.getElementById('personal_checking_no').style.display = 'none';
	document.getElementById('personal_savings').style.display = 'none';
	document.getElementById('business_savings').style.display = 'none';
	document.getElementById('business_checking').style.display = 'none';
	document.getElementById('other').style.display = 'none';
}

function displayer(){
	
	var business_personal = document.which_account_form.business_personal_value.value;
	var checking_savings = document.which_account_form.checking_savings_value.value;
	var age = document.which_account_form.age_value.value;
	
	if(business_personal == 'personal' && checking_savings == 'checking' && age == 'yes'){
		document.getElementById('personal_checking_yes').style.display = 'block';
	}
	if(business_personal == 'personal' && checking_savings == 'checking' && age == 'no'){
		document.getElementById('personal_checking_no').style.display = 'block';
	}
	if(business_personal == 'personal' && checking_savings == 'savings'){
		document.getElementById('personal_savings').style.display = 'block';
	}
	if(business_personal == 'business' && checking_savings == 'savings'){
		document.getElementById('business_savings').style.display = 'block';
	}
	if(business_personal == 'business' && checking_savings == 'checking'){
		document.getElementById('business_checking').style.display = 'block';
	}
	if(business_personal == 'other'){
		document.getElementById('other').style.display = 'block';
	}
	location.href = "#infoarea";
}

function check_other(){
	var booler = true;
	if(booler == true && document.other_form.full_name.value == ''){
		var booler = false;
		alert('Please enter your name');
	}
	if(booler == true && document.other_form.address.value == ''){
		var booler = false;
		alert('Please enter your address');
	}
	if(booler == true && document.other_form.phone.value == ''){
		var booler = false;
		alert('Please enter your phone number');
	}
	if(booler == true && document.other_form.full_request.value == ''){
		var booler = false;
		alert('Please enter a request');
	}
	return booler;
}