
//
//	User JavaScript Validator File
//
//
//	stringTrim(string)
//
function stringTrim(str)
{
	s = str.replace(/^(\s)*/, '');
	s = s.replace(/(\s)*$/, '');

	return s;
}

//
//	validateEMail(string)
//
function validateEMail(str)
{
	if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str))
	{
		return true;
	}
	else
	{
		return false;
	}
}

//
//	formRegisterValidate(form)
//
function formRegisterValidate(form)
{

	//	check field

	var text = new String(form.name.value);

	if(text.length == 0)
	{
		alert('\n\r - Please enter your Name!\n\r');

		return false;
	}



	var text = new String(form.email.value);

	if(text.length == 0)
	{
		alert('\n\r - Please enter your Email!\n\r');

		return false;
	}



	var text = new String(form.comment.value);

	if(text.length == 0)
	{
		alert('\n\r - Please enter your Comment!\n\r');

		return false;
	}

}