function onRegister()
{
	/* Login information */

	if (isLength(window.document.FPROFILE.UID)==false)
	{
		alert("You must enter a Username");
		window.document.FPROFILE.UID.focus();
		return false;
	}
	if (isLength(window.document.FPROFILE.PWD)==false)
	{
		alert("You must enter a Password");
		window.document.FPROFILE.PWD.focus();
		return false;
	}
	if (isLength(window.document.FPROFILE.PWDC)==false)
	{
		alert("Please retype your password in Confirm Password");
		window.document.FPROFILE.PWDC.focus();
		return false;
	}

	if (window.document.FPROFILE.PWD.value  != window.document.FPROFILE.PWDC.value)
	{
		alert("Password and Confirm password does not match, please re-enter");
		window.document.FPROFILE.PWDC.focus();
		window.document.FPROFILE.PWDC.value = "";
		return false;
	}
	
	/* Contact details */
	if (isLength(window.document.FPROFILE.PERSON)==false)
	{
		alert("You must enter Your Name");
		window.document.FPROFILE.PERSON.focus();
		return false;
	}

	if (isLength(window.document.FPROFILE.EMAIL)==false)
	{
		alert("Please enter your E-mail address");
		window.document.FPROFILE.EMAIL.focus();
		return false;
	}
	if (isEmail(window.document.FPROFILE.EMAIL)==false)
	{
		alert("E-mail should be in the format username@host.com");
		window.document.FPROFILE.EMAIL.focus();
		return false;
	}
	if (isLength(window.document.FPROFILE.PHONE)==false)
	{
		alert("Please enter your Phone number");
		window.document.FPROFILE.PHONE.focus();
		return false;
	}

	if (isValidPhone(window.document.FPROFILE.PHONE)==false)
	{
		alert("Phone number can only contain be numeric, space and -.");
		window.document.FPROFILE.PHONE.focus();
		return false;
	}

	/* Company Profile */	
	if (isLength(window.document.FPROFILE.COMPANY)==false)
	{
		alert("Please enter your Company Name");
		window.document.FPROFILE.COMPANY.focus();
		return false;
	}

	if (isLength(window.document.FPROFILE.ADDRESS)==false)
	{
		alert("Please enter your Company Address");
		window.document.FPROFILE.ADDRESS.focus();
		return false;
	}

	if (isLength(window.document.FPROFILE.PCODE)==false)
	{
		alert("Please enter Zip or Postal code");
		window.document.FPROFILE.PCODE.focus();
		return false;
	}

	if (isNumeric(window.document.FPROFILE.PCODE)==false)
	{
		alert("Zip or Postal code should be numeric");
		window.document.FPROFILE.PCODE.focus();
		return false;
	}
	if (!document.FPROFILE.agree_box.checked)
	{
		alert("Please check the I Agree box");
		return false;
	}
	return true;
}

