function validate_form1() {
  validity = true; // assume valid
  if (!check_empty(document.corpMember.corpname.value))
        { validity = false; alert('You must enter your name'); }
	if (!check_empty(document.corpMember.corpaddress.value))
       { validity = false; alert('You must enter your address'); }
	if (!check_empty(document.corpMember.corpcity.value))
       { validity = false; alert('You must enter your city'); }	
	if (!check_empty(document.corpMember.corpstate.value))
       { validity = false; alert('You must enter your state'); } 
	if (!check_empty(document.corpMember.corpzip.value))
       { validity = false; alert('You must enter your zip'); }  
	if (!check_empty(document.corpMember.corpphone.value))
       { validity = false; alert('You must enter your company phone number'); }
	if (!check_empty(document.corpMember.corpcontact.value))
       { validity = false; alert('You must enter your company contact'); }
 ;
  return validity;
}

function validate_form2() {
  validity = true; // assume valid
  if (!check_empty(document.indivMember.indivname.value))
        { validity = false; alert('You must enter your name'); }
	if (!check_empty(document.indivMember.indivaddress.value))
       { validity = false; alert('You must enter your address'); }
	if (!check_empty(document.indivMember.indivcity.value))
       { validity = false; alert('You must enter your city'); }	
	if (!check_empty(document.indivMember.indivstate.value))
       { validity = false; alert('You must enter your state'); } 
	if (!check_empty(document.indivMember.indivzip.value))
       { validity = false; alert('You must enter your zip'); }  
	if (!check_empty(document.indivMember.indivphone.value))
       { validity = false; alert('You must enter your phone number'); }
 ;
  return validity;
}indivindivindiv


function check_empty(text) {
  return (text.length > 0); // returns false if empty
}

function redirect_page() {
document.location='membership_thanks.shtml';
}

function indiv_corporate() {
if (validate_form1()) {

		var output = "";
		output = "\n\nBelow is a membership application for the Star of Hope Foundation\n\n";

		output += "The following information was included on the form...\n\n";
		
		output += "Type of Membership:\n";
		output += "CORPORATE MEMBERSHIP\n\n";
		//for (var z = 0; z < 1; z++) {
		//	var checked = document.indivMember.checkCorpMember[z].checked;
		//		if (checked) {
		//			output += (document.indivMember.checkCorpMember[z].value) + "\n";
		//			check = 1;
		//		}
		//}
		
		output += "Name:         "+document.corpMember.corpname.value+"\n";
		output += "Address:      "+document.corpMember.corpaddress.value+"\n";
		output += "City:         "+document.corpMember.corpcity.value+"\n";
		output += "State:        "+document.corpMember.corpstate.value+"\n";
		output += "Zip:       	 "+document.corpMember.corpzip.value+"\n";
		output += "Work Phone:   "+document.corpMember.corpphone.value+"\n";
		output += "Home Phone:   "+document.corpMember.corphmphone.value+"\n";
		output += "EXT:        	 "+document.corpMember.corpext.value+"\n";
		output += "Fax:        	 "+document.corpMember.corpfax.value+"\n";
		output += "Email:        "+document.corpMember.corpemail.value+"\n";
		output += "Contact:      "+document.corpMember.corpcontact.value+"\n";
				
		document.corpSubmit.StarofHopeMembership.value = output;
		document.corpSubmit.submit();
		
		redirect_page()
	}
}


function indiv_member() {
if (validate_form2()) {

		var output = "";
		output = "\n\nBelow is a membership application for the Star of Hope Foundation\n\n";

		output += "The following information was included on the form...\n\n";
		
		output += "Type of Membership:\n";
		output += "INDIVIDUAL MEMBERSHIP\n\n";
		//for (var z = 0; z < 1; z++) {
		//	var checked = document.indivMember.checkIndivMember[z].checked;
		//		if (checked) {
		//			output += (document.indivMember.checkIndivMember[z].value) + "\n";
		//			check = 1;
		//		}
		//}
		
		output += "Name:         "+document.indivMember.indivname.value+"\n";
		output += "Address:      "+document.indivMember.indivaddress.value+"\n";
		output += "City:         "+document.indivMember.indivcity.value+"\n";
		output += "State:        "+document.indivMember.indivstate.value+"\n";
		output += "Zip:       	 "+document.indivMember.indivzip.value+"\n";
		output += "Home Phone:   "+document.indivMember.indivphone.value+"\n";
		output += "Work Phone:   "+document.indivMember.indivphone2.value+"\n";
		output += "Fax:        	 "+document.indivMember.indivfax.value+"\n";
		output += "Email:        "+document.indivMember.indivemail.value+"\n";
				
		document.indivSubmit.StarofHopeMembership.value = output;
		document.indivSubmit.submit();
		
		redirect_page()
	}
}