/*TO SET THE CURRENT YEAR FOR THE COPYRIGHT*/
var curdate = new Date()
var year = curdate.getYear()

/*THIS IS THE VALIDATION FOR THE LEAD FORM*/
function ValidateForm(form)
{
	if (document.form1.realname.value=="")
	{
	alert("Please enter your Name.");
	document.form1.realname.focus();
	return false;
	}

	if (document.form1.Company.value=="")
	{
	alert("Please enter your Company Name.");
	document.form1.Company.focus();
	return false;
	}
	
	if(!check_email(document.form1.email.value))
	{
	    alert("Please make sure your Email Address is Correct");
		document.form1.email.focus();
		return false;
	}

	if (document.form1.Comments.value=="")
	{
	alert("Please let us know why you would like for us to contact you.");
	document.form1.Comments.focus();
	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);
	}
}