/* Main Java File */

/* Validate Forms */
function validate_form ( )
{
    valid = true;

    if ( document.signupform.username.value == "" )
    {
        alert ( "Please choose a username." );
        valid = false;
    }
	if ( document.signupform.email.value == "" )
    {
        alert ( "Please enter a valid email." );
        valid = false;
    }
	if ( document.signupform.password.value == "" )
    {
        alert ( "Please choose a password." );
        valid = false;
    }
	if ( document.contact_form.terms.checked == false )
    {
        alert ( "You MUST agree to our terms of service." );
        valid = false;
    }
	if ( document.signupform.email.value != document.signupform.email2.value )
    {
        alert ( "The two email addresses you entered do not match." );
        valid = false;
    }
	if ( document.signupform.password.value != document.signupform.password2.value )
    {
        alert ( "The two passwords you entered do not match." );
        valid = false;
    }
    return valid;
}

// Onclick Select All
function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}

/* Validate Form Account Area */
function validate_form_account ( )
{
    valid = true;
	
	if ( document.accupform.newpass1.value != document.accupform.newpass2.value )
    {
        alert ( "The two passwords you entered do not match." );
        valid = false;
    }
	
    return valid;
}