function emailCheck(email){
	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
	var returnval=emailfilter.test(email);
	return returnval;
}

function control_sponsor(){
	d = document.frm_sponsor;
	check = true;
	if (d.sponsor1.checked == false && d.sponsor2.checked == false){
		if (d.sponsor3.checked == false){
			alert("Please check the third box and enter to the field a one time gift of !!!");
			d.sponsor3.checked = true;
			d.time_gift.focus();
			check = false;
		}else if (d.time_gift.value == ""){
			alert("The field a one time gift can not null !!!");
			d.time_gift.focus();
			check = false;
		}
	}else{
		if (d.sponsor3.checked == true){
			alert("If you check the first box or second box you can not check the third box.\n\rIf you check the third box you can not check the first box or second box.\n\rPlease verify your check box !!!");
			check = false;
		}else if (d.time_gift.value != ""){
			alert("The field a one time gift of must be blank !!!");
			d.time_gift.focus();
			check = false;
		}
	}
	if (check == true){
		if (d.name.value == ""){
			alert("The field Name can not null !!!");
			d.name.focus();
		}else if (d.email.value == ""){
			alert("The field Email can not null !!!");
			d.email.focus();
		}else if (d.email.value != ""){ 
			if (emailCheck(d.email.value) == false){
				alert("Please verify your email address !!!");
				d.email.focus();
			}else{
				d.submit();
			}
		}
	}
}