function CheckTermsCheckbox()
{
	form = document.summerentrepreneurshipapplicationform;

	//	Team 2 email required
	control_1 = form["fields[Team 2 Name]"];
	control_2 = form["fields[Team 2 Email]"];
	
	if( str_trim( control_1.value ) && !str_trim( control_2.value ) )
	{
		alert("Pleaes enter an email address for the second team member.");
		control_2.focus();
		return false;
	}
	
	//	Team 3 email required
	control_1 = form["fields[Team 3 Name]"];
	control_2 = form["fields[Team 3 Email]"];
	
	if( str_trim( control_1.value ) && !str_trim( control_2.value ) )
	{
		alert("Pleaes enter an email address for the third team member.");
		control_2.focus();
		return false;
	}
	
	//	Team 4 email required
	control_1 = form["fields[Team 4 Name]"];
	control_2 = form["fields[Team 4 Email]"];
	
	if( str_trim( control_1.value ) && !str_trim( control_2.value ) )
	{
		alert("Pleaes enter an email address for the fourth team member.");
		control_2.focus();
		return false;
	}
	
	control = form["fields[Terms & Conditions]"];
	if ( !control.checked )
	{
		alert("Agreement to the Terms & Conditions is required.");
		control.focus();
		return false;
	}

	return true;
}

//	Textarea maxlength
function DS( field,maxLength )
{
	clipped		= false;

	if (field.value.length > maxLength)
	{
		field.value = field.value.substring(0,maxLength);
		charleft = 0;
		clipped = true;
	}
	else
	{
		charleft = maxLength - field.value.length;
	}
//	document.myForm.msgCL.value = charleft;

/*
	counter_id	= field.getAttribute( "id" ) + "-c";

	document.getElementById( counter_id ).innerHTML	= charleft;

	if( charleft )
	{
		document.getElementById( counter_id ).className	= "";
	}
	else
	{
		document.getElementById( counter_id ).className	= "zero";
	}
*/
	return clipped;
}
