function validateInput(control)
{		
	var parentid = control.id.substring(0, control.id.lastIndexOf("_")+1);
	var namebox = window.document.getElementById(parentid+"txtName");
	var emailBox = window.document.getElementById(parentid+"txtEmail");	
	var subTwnBox = window.document.getElementById(parentid+"txtSubTwn");
	var stateBox = window.document.getElementById(parentid+"ddlState");				
	var cmntBox = window.document.getElementById(parentid+"txtCmnt");
	
	if (namebox.value == "")
	{
		namebox.focus();
		alert("Please enter your name");
		return false;	
	}		
	if (!isValidEmail(emailBox.value))
	{
		emailBox.focus();
		alert("Please enter a valid email address");
		return false;
	}
	if (subTwnBox.value == "")
	{
		subTwnBox.focus();
		alert("Please enter your suburb or town");
		return false;	
	}	
	if (stateBox.value == "0")
	{
		stateBox.focus();
		alert("Please select your state");
		return false;	
	}
	if (cmntBox.value == "")
	{
		cmntBox.focus();
		alert("Please enter your comment");
		return false;	
	}			
	return true;
}	
