function showFormsBox(action)
{
	if (action == 'open') {
		document.getElementById('FormsDiv').style.display = '';
	}
	else {
		document.getElementById('FormsDiv').style.display = 'none';
	}
}
function formValidation(frm)
{
	var errors = '';
	if (frm['txtName'].value == '' || frm['txtName'].value == 'NAME') {
		errors += 'Name is required<br/>';
		frm['txtName'].style.backgroundColor = '#FFFFCC';
	}
	else {
		frm['txtName'].style.backgroundColor = '#FFFFFF';
	}
	if (frm['txtPhone'].value == '' || frm['txtPhone'].value == 'PHONE NUMBER') {
		errors += 'Phone is required<br/>';
		frm['txtPhone'].style.backgroundColor = '#FFFFCC';
	}
	else {
		frm['txtPhone'].style.backgroundColor = '#FFFFFF';
	}
	if (frm['txtEmail'].value == '' || frm['txtEmail'].value == 'EMAIL ADDRESS') {
		errors += 'Email Address is required<br/>';
		frm['txtEmail'].style.backgroundColor = '#FFFFCC';
	}
	else {
		if (!EmailValidate(frm['txtEmail'].value)) {
			errors += 'Email Address is not valid<br/>';
			frm['txtEmail'].style.backgroundColor = '#FFFFCC';
		}
		else {
			frm['txtEmail'].style.backgroundColor = '#FFFFFF';
		}
	}
	if (errors != '')
	{
		document.getElementById('ErrorsDisplay').style.display = '';
		document.getElementById('ErrorsDisplay').innerHTML = '<strong>The following errors occured:</strong><br/>' + errors;
		return false;
	}
	else
	{
		document.getElementById('ErrorsDisplay').style.display = 'none';
		return true;
	}
}
function EmailValidate(email)
{
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	if(reg.test(email) == false)
		return false;
	else
		return true;
}
