/* $Id: nickreg-script.js 2219 2007-02-13 20:34:49Z alambert $ */

function checksubmit()
{
	if (!document.forms['nickreg'].elements['in_1_agecheck'].checked)
	{
		// Does not comply with COPPA. Stop here. Now.
		alert('To comply with the Children\'s Online Privacy Protection Act of 1998, liveHarmony will not accept registrations from users under the age of thirteen (13). To continue the registration process, you must confirm that you are at least thirteen (13) years old.');
		document.forms['nickreg'].elements['in_1_agecheck'].focus();
		return false;
	}

	if (document.forms['nickreg'].elements['in_1_nickname'].value == '')
	{
		alert('Please choose a nickname in step one.');
		document.forms['nickreg'].elements['in_1_nickname'].focus();
		return false;
	}

	if (document.forms['nickreg'].elements['in_2_password'].value == '')
	{
		alert('Please choose a password in step two.');
		document.forms['nickreg'].elements['in_2_password'].focus();
		return false;
	}

	if (document.forms['nickreg'].elements['in_2_password'].value
		!= document.forms['nickreg'].elements['in_2_password2'].value)
	{
		alert('The new passwords that you entered in step two did not match. Please re-check the passwords.');
		document.forms['nickreg'].elements['in_2_password'].focus();
		return false;
	}

	if (document.forms['nickreg'].elements['in_3_email'].value == '')
	{
		alert('Please enter your e-mail address in step three.');
		document.forms['nickreg'].elements['in_3_email'].focus();
		return false;
	}
}
