function validRequired(formField,fieldLabel)
{
  var result = true;
  if (formField.value == "")
  {
    alert('Please enter a value for the "' + fieldLabel +'" field.');
    formField.focus();
    result = false;
  }
  return result;
}

function FormValidator(theForm)
{
	if (!validRequired(theForm.txtFirstName,"Name"))
    return false;
	if (!validRequired(theForm.txtSurname,"Surname"))
    return false;
	if (!validRequired(theForm.txtEmail,"Email Address"))
    return false;
	if (!validRequired(theForm.txtContact,"Contact Number"))
    return false;
	if (!validRequired(theForm.txtInf,"Enquiry"))
    return false;
  return (true);
}

matchHeight=function(){ 
    var divs,contDivs,maxHeight,divHeight,d; 
	divs=document.getElementsByTagName('div'); 
	contDivs=[]; 
	maxHeight=0; 
	for(var i=0;i<divs.length;i++){ 
		if(/\bcontainer\b/.test(divs[i].className)){ 
			d=divs[i]; 
			contDivs[contDivs.length]=d; 
			if(d.offsetHeight){ 
				divHeight=d.offsetHeight; 
			} else if(d.style.pixelHeight){ 
				divHeight=d.style.pixelHeight; 
			} 
			maxHeight=Math.max(maxHeight,divHeight); 
		} 
	} 
	for(var i=0;i<contDivs.length;i++){ 
		contDivs[i].style.height=maxHeight; 
    }
} 

window.onload=function(){ 
     if(document.getElementsByTagName){ 
          matchHeight(); 
     } 
} 