function FreeEstimateValidation(form)
		{	
				var chkMSG = '';	
				if ( !check_email(form.Email.value) ) 
						{	
							chkMSG = "Illegal email address.";
							document.getElementById("Email").focus();
						}							
				if ( form.Comments.value.indexOf('http') >= 0 ) chkMSG = "No url allowed in comments.";
				if ( form.DayTel.value == "" )  
					{
						chkMSG = "Phone required."; 
						document.getElementById("DayTel").focus();
					}
				if ( form.FullName.value == "" ) 
					{
						chkMSG = "Name required."; 
						document.getElementById("FullName").focus();
					}
				if ( chkMSG )
				{
					alert(chkMSG);
					return false;
				}
				else
					{
					return true;
					}
		}
		
function ContactUsValidation(form)
		{	
				var chkMSG = '';	
				if ( !check_email(form.Email.value) ) 
						{	
							chkMSG = "Illegal email address.";
							document.getElementById("Email").focus();
						}							
				if ( form.Comments.value.indexOf('http') >= 0 ) chkMSG = "No url allowed in comments.";				
				if ( form.FullName.value == "" ) 
					{
						chkMSG = "Name required."; 
						document.getElementById("FullName").focus();
					}
				if ( chkMSG )
				{
					alert(chkMSG);
					return false;
				}
				else
					{
					return true;
					}
		}
		
function openOrClose(sID)	
	{	
		if (document.getElementById(sID).style.display != "block")		document.getElementById(sID).style.display = "block";	
		else		
		document.getElementById(sID).style.display = "none";
	}	
	
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);
				} 
			}
	}
 
function ClickOnLink(oDiv)
{
	location.href = oDiv.childNodes[0].href;
}

