function popupWindow(page) {
	window.open('popups/lw/' + (page),'popup','width=400,height=400');
	}
	
	
function popupWindowscroll(page) {
	window.open('popups/lw/' + (page),'popup','width=400,height=400,scrollbars=1');
	}



function showIt(what){
	document.all(what).style.display = "block";
	document.all.subs.style.display = "block";
	}
	
function hideIt(what){
	document.all(what).style.display = "none";
	}
function otherSt(comeon){
	if((comeon) == "New Mexico"){
	document.all.decssn.style.display = "block";
	}else{
	document.all.decssn.style.display = "none";
	}
	if((comeon) == "Minnesota" || (comeon) == "Wisconsin"){
	document.all.birthdateo.style.display = "block";
	}else{
	document.all.birthdateo.style.display = "none";
	}
	stateStuff(comeon);
}

function stateStuff(wh){

	if (((wh) == "California") || ((wh) == "Virginia") || ((wh) == "South Carolina") || ((wh) == "Wyoming") || ((wh) == "Pennsylvania") || ((wh) == "Oklahoma") || ((wh) == "New Jersey") || ((wh) == "Montana") || ((wh) == "Minnesota") || ((wh) == "Arkansas") || ((wh) == "Alabama") || ((wh) == "Connecticut") || ((wh) == "Delaware") || ((wh) == "Hawaii") || ((wh) == "Kentucky") || ((wh) == "Maine") || ((wh) == "Massachusetts") || ((wh) == "Mississippi") || ((wh) == "Oregon")){
	showIt('agent');
	}else {
	
	hideIt('agent');
	}
	moreToit(wh);
}


function moreToit(hm){
	if (((hm) == "Hawaii") || ((hm) == "Delaware") || ((hm) == "California") || ((hm) == "Maine") || ((hm) == "Mississippi")){
	showIt('alternate');
	} else {
	hideIt('alternate');
	}
}
		
function subMitting(){
	if ((declarantCheck()) && (ssnCheck()) && (bdCheck()) && (isAgent())){
	return true;
	} else {
	window.open('popups/lw/missing-info-lw.cfm','missing','width=500,height=500,scrollbars=1');
	return false;
	}
	}
	

	
	
	
	
function declarantCheck(){
	with(document.MyForm){
		if ((declarantfullname.value == "") || (streetaddress.value == "") || (city.value == "") || (county.value == "") || (signaturecity.value == "") || (signaturecounty.value == "") || (signaturestate.value == "")){
		return false;
		}else{
		return true;
		}
	}
}
function ssnCheck(){
	if((document.MyForm.state.value !== "New Mexico")){
	return true;
	}else{
		if (document.MyForm.ssn.value == ""){
		return false;
		}else{
		return true;
		}
	}
}

function bdCheck(){
	if((document.MyForm.state.value !== "Minnesota") && (document.MyForm.state.value !== "Wisconsin")){
	return true;
	}else{
		if (document.MyForm.birthdate.value == ""){
		return false;
		}else{
		return true;
		}
	}
}

function isAgent(){
var wh = document.MyForm.state.value;

	if (((wh) !== "California") && ((wh) !== "Virginia") && ((wh) !== "South Carolina") && ((wh) !== "Wyoming") && ((wh) !== "Pennsylvania") && ((wh) !== "Oklahoma") && ((wh) !== "New Jersey") && ((wh) !== "Montana") && ((wh) !== "Minnesota") && ((wh) !== "Arkansas") && ((wh) !== "Alabama") && ((wh) !== "Connecticut") && ((wh) !== "Delaware") && ((wh) !== "Hawaii") && ((wh) !== "Kentucky") && ((wh) !== "Maine") && ((wh) !== "Massachusetts") && ((wh) !== "Mississippi") && ((wh) !== "Oregon")){
	return true;
	}else{
		with(document.MyForm){
			if ((agentfullname.value == "") || (agentstreetaddress.value == "") || (agentrelationship.value == "") || (agentcity.value == "") || (agenstate.value == "") || (agentphone.value == "")){
			return false;
			}else{
			return true;
			}
		}
	}
}