function validate_form ()
{
    valid = true;
    if ( document.credits.username.value == "" )
    {
        alert ( "Please enter a username." );
        valid = false;
    }
	if ( document.credits.password1.value == "" )
    {
        alert ( "Please enter a password." );
        valid = false;
    }
	if ( document.credits.email.value == "" )
    {
        alert ( "Please enter an email address." );
        valid = false;
    }
	if (!document.credits.tandc.checked)
	{
	alert ( "Your need to accept the terms and conditions to continue." );
	valid = false;
	}
	
	if ( document.credits.password1.value != document.credits.password1.value )
    {
        alert ( "Your passwords didn't match. Please re-enter them." );
        valid = false;
    }
	
    return valid;
}

function validate_form_signnow ()
{
    valid = true;
    if ( document.credits.sCompany_name.value == "" )
    {
        alert ( "Please enter a company name." );
        valid = false;
    }
	if ( document.credits.sContact_name.value == "" )
    {
        alert ( "Please enter a contact name." );
        valid = false;
    }
	if ( document.credits.sContact_email.value == "" )
    {
        alert ( "Please enter an email address." );
        valid = false;
    }
	
	if (!document.credits.tandc.checked)
	{
	alert ( "Your need to accept the terms and conditions to continue." );
	valid = false;
	}
	
    return valid;
}
