function partone () {

	contact_info_valid = check_firstpart_fields();

	if (contact_info_valid) {

		jQuery("#secondpart").css("display","block");
  	jQuery("#firstpart").css("display", "none");
  }
  else {
  	alert("Please fill out all the fields");
	}
}

function parttwo () {

	info_valid = check_secondpart_fields();

	if (info_valid) {
		jQuery("#form1").attr("action", "http://www.page1forms.com/challenge_handler.php");
	}
	else {
		alert("Please fill out all the fields");
	}
}

function check_firstpart_fields () {

	var valid = true;

	var labels = new Array('#firstname', '#lastname', '#dayphone', '#email');

	for (i in labels) {

	if (jQuery(labels[i]).val() == "") {

			valid = false;
		}
	}

	return valid;
}

function check_secondpart_fields () {

	var valid = false;

	var num_valids  = 11;
	var num_checked = 0;

	jQuery("#form1").find(":radio").each(function(j){

		if (this.checked == true) {
			num_checked++;
		}
	});

	if (num_checked == num_valids) {

		valid = true;
	}

	return valid;
}
