// regular expressions
function isEmail(strValue)
	{
		return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(strValue);
	}
	
// contact us form validation
function frmContactValidate(objForm)
	{
	var blnValid = true;
	var validString = 'The following fields are required to be completed:';
	if(document.getElementById('name').value.length < 1)
		{
		blnValid = false;
		validString += '\n - Name';
		}
	if(document.getElementById('company').value.length < 1)
		{
		blnValid = false;
		validString += '\n - Company';
		}
	if(document.getElementById('email').value.length < 1)
		{
		blnValid = false;
		validString += '\n - E-mail';
		}
	if(document.getElementById('email').value.length && !isEmail(document.getElementById('email').value))
		{
		blnValid = false;
		validString += '\n - You must enter a well-formed E-mail Address - username@domain.com';
		}
	if(!blnValid)
		{
		alert(validString);
		return false;
		}
	else
		{
		return true;
		}
	}
	
// get pricing form validation
function frmPricingValidate(objForm)
	{
	var blnValid = true;
	var validString = 'The following fields are required to be completed:';
	if(document.getElementById('name').value.length < 1)
		{
		blnValid = false;
		validString += '\n - Name';
		}
	if(document.getElementById('company').value.length < 1)
		{
		blnValid = false;
		validString += '\n - Company';
		}
	if(document.getElementById('email').value.length < 1)
		{
		blnValid = false;
		validString += '\n - E-mail';
		}
	if(document.getElementById('email').value.length && !isEmail(document.getElementById('email').value))
		{
		blnValid = false;
		validString += '\n - You must enter a well-formed E-mail Address - username@domain.com';
		}
	if(!blnValid)
		{
		alert(validString);
		return false;
		}
	else
		{
		return true;
		}
	}
	
// monday marketing minute signup form validation
function frmMMMValidate(objForm)
	{
	var blnValid = true;
	var validString = 'The following fields are required to be completed:';
	if(document.getElementById('name').value.length < 1)
		{
		blnValid = false;
		validString += '\n - Name';
		}
	if(document.getElementById('email').value.length < 1)
		{
		blnValid = false;
		validString += '\n - E-mail';
		}
	if(document.getElementById('email').value.length && !isEmail(document.getElementById('email').value))
		{
		blnValid = false;
		validString += '\n - You must enter a well-formed E-mail Address - username@domain.com';
		}
	if(!blnValid)
		{
		alert(validString);
		return false;
		}
	else
		{
		return true;
		}
	}
	