<!--

function checkRateInfo(theForm){
var obj; 
obj = theForm.txtName;
	if (obj.value=="")
	{
			alert("Please fill in your name.");
			obj.focus();
			return false;
	}

obj = theForm.txtEmail;
	if (obj.value=="")
	{
			alert("Please fill in your e-mail address.");
			obj.focus();
			return false;
	}

	// Validate Sender's email
	if (emailCheck(obj.value)=="false")
	{
			alert("Please insert a valid e-mail address.");	
			obj.focus();
			return false;
	}


obj = theForm.txtContact;
	if (obj.value=="")
	{
			alert("Please fill in your contact number.");
			obj.focus();
			return false;
	}


return true
}

function checkEmailToFriendForm(theForm){
var obj; 

obj = theForm.emailto;
	if (obj.value=="")
	{
			alert("Please fill in the recipient's e-mail address.");
			obj.focus();
			return false;
	}

	// Validate Sender's email
	if (emailCheck(obj.value)=="false")
	{
			alert("Please insert a valid recipient's e-mail address.");	
			obj.focus();
			return false;
	}

obj = theForm.emailfrom;
	if (obj.value=="")
	{
			alert("Please fill in your e-mail address.");
			obj.focus();
			return false;
	}

	// Validate Sender's email
	if (emailCheck(obj.value)=="false")
	{
			alert("Please insert your valid e-mail address.");	
			obj.focus();
			return false;
	}

return true
}


function chkContactForm(theForm)
{
	// Required fields checking
var obj;
obj = theForm.txtName;
	if (obj.value=="")
	{
			alert("Please fill in your name.");
			obj.focus();
			return false;
	}

obj = theForm.txtEmail;

	if (obj.value=="")
	{
			alert("Please fill in your e-mail address.");
			obj.focus();
			return false;
	}

	// Validate Sender's email
	if (emailCheck(obj.value)=="false")
	{
			alert("Please insert your valid e-mail address.");	
			obj.focus();
			return false;
	}

obj = theForm.txtRemarks;
	if (obj.value=="")
	{
			alert("Please enter your remarks.");
			obj.focus();
			return false;
	}

 return true

} // end function


function emailCheck (emailStr) 
{
	var emailPat = "^(.+)@(.+)\\.(.+)$";
	var matchArray = emailStr.match(emailPat);
	if (matchArray == null)
	{ 
		return "false";
	}
	else
		return "true";
}
//-->