function checkSelected(id)
{
	var myForm = document.forms['unrestricted-form'];
	var cnt = 0;
	for(var i=0; i<myForm.length;i++)
	{
		if(myForm[i].tagName=='INPUT')
		{
			if(myForm[i].type=='checkbox')
			{
				if(myForm[i].checked === true)
				{
					cnt++;		
				}
			}
		}
	}
	if(cnt <= 3)
	{
		return true;
	}
	else
	{
		alert("You are only permitted three choices");
		return(false);
	}
	
}
function checkBuildings()
{
	var myForm = document.forms['unrestricted-form'];
	var cnt = 0;
	for(var i=0; i<myForm.length;i++)
	{
		if(myForm[i].tagName=='INPUT')
		{
			if(myForm[i].type=='checkbox')
			{
				if(myForm[i].checked === true)
				{
					cnt++;		
				}
			}
		}
	}
	if(cnt == 3)
	{
		//cannot return as form gets submitted, yet formCheck has to do its thing
		//return true;
	}
	else
	{
		alert("Sorry you cannot continue because you have only made " + cnt + " choices of the required 3 ");
		return false;
	}
	valContactForm2(['title','firstname','lastname','jobtitle','organisation','address1','postcode','telephone','email']);

}
