function valid_contact(first_no,second_no)
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = frmContact.txt_email.value.match(emailPat);
	if(document.frmContact.txt_firstname.value == "")
	{
		alert("Please enter the first name.");
		document.frmContact.txt_firstname.focus();
		return false;
	}
	if(document.frmContact.txt_lastname.value == "")
	{
		alert("Please enter the last name.");
		document.frmContact.txt_lastname.focus();
		return false;
	}
	if(document.frmContact.txt_email.value=="")
	{
		alert("Please enter the email address");
		document.frmContact.txt_email.focus();
		return false;
	}
	else
	{
		if (matchArray == null)
		{
			alert ("Please enter your valid email address.");
			document.frmContact.txt_email.focus();
			return false;
		}
	}
	
	if(document.frmContact.txt_comment.value=="")
	{
		alert("Please enter the comment");	
		document.frmContact.txt_comment.focus();
		return false;
	}
	if(document.frmContact.txt_secu_code.value == "")
	{
		alert("Please enter the addition of "+first_no+" + "+second_no);
		document.frmContact.txt_secu_code.focus();
		return false;
	}
}

function valid_promo(first_no,second_no)
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.frmpromo.txt_email.value.match(emailPat);
	if(document.frmpromo.free_voucher.value == "")
	{
		alert("Please select voucher.");
		document.frmpromo.free_voucher.focus();
		return false;
	}
	if(document.frmpromo.txt_firstname.value == "")
	{
		alert("Please enter the name.");
		document.frmpromo.txt_firstname.focus();
		return false;
	}
	if(document.frmpromo.txt_email.value=="")
	{
		alert("Please enter the email address");
		document.frmpromo.txt_email.focus();
		return false;
	}
	else
	{
		if (matchArray == null)
		{
			alert ("Please enter your valid email address.");
			document.frmpromo.txt_email.focus();
			return false;
		}
	}
	
	if(document.frmpromo.txt_secu_code.value == "")
	{
		alert("Please enter the addition of "+first_no+" + "+second_no);
		document.frmpromo.txt_secu_code.focus();
		return false;
	}
}


function valid_client()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = reg.txt_email.value.match(emailPat);
	if(document.reg.txt_name.value == "")
	{
		alert("Please enter the name.");
		document.reg.txt_name.focus();
		return false;
	}
	if(document.reg.txt_add_line1.value == "")
	{
		alert("Please enter the address line1.");
		document.reg.txt_add_line1.focus();
		return false;
	}
	if(document.reg.txt_postal.value == "")
	{
		alert("Please enter the ZIP/Postal code.");
		document.reg.txt_postal.focus();
		return false;
	}
	if(document.reg.txt_email.value=="")
	{
		alert("Please enter the email address");
		document.reg.txt_email.focus();
		return false;
	}
	else
	{
		if (matchArray == null)
		{
			alert ("Please enter your valid email address.");
			document.reg.txt_email.focus();
			return false;
		}
	}
	if(document.reg.txt_password.value == "")
	{
		alert("Please enter the password.");
		document.reg.txt_password.focus();
		return false;
	}
}

