/*Checked Value on Form*/
function get_check_value()
{
var c_value = "";
for (var i=0; i < document.contactform.DesiredService.length; i++)
   {
   if (document.contactform.DesiredService[i].checked)
      {
      c_value = c_value + document.contactform.DesiredService[i].value + ", ";
      }
   }
//c_value = "You selected the following:\n" + c_value;
document.contactform.DesiredServices.value = c_value;
//alert(document.contactform.DesiredServices.value);
//return false;
}


/*THIS IS THE VALIDATION FOR THE LEAD FORM*/
function ValidateContactForm(form)
{
	if (document.contactform.Name.value=="")
	{
	alert("Please enter your Name.");
	document.contactform.Name.focus();
	return false;
	}
	
	if(!check_email(document.contactform.Email.value))
	{
	    alert("Please make sure your Email Address is Correct");
		document.contactform.Email.focus();
		return false;
	}
	//alert("Worked");
	//return false;
	return true;
}


function check_email(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0) return (false);	
	}
	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) return (-1);
	}
}

