<!-- Begin
//tidies up entries into the form fields prior to validation in the check_form function
function trim(st)
{
	var len = st.length
	var begin = 0, end = len - 1;
	while (st.charAt(begin) == " " && begin < len)
	{
		begin++;
	}
	while (st.charAt(end) == " " && begin < end)
	{
		end--;
	}
	return st.substring(begin, end+1);
}
//this is where content is validated in the form
function check_form()
{
	if( document.forms['composeform'].elements['mail_fromName'].value == '' )
    {
        alert('Please enter your name.');
        document.forms['composeform'].elements['mail_fromName'].focus();
        return false;
    }
	if( document.forms['composeform'].elements['mail_fromAddress'].value == '' )
    {
        alert('Please enter an email address, so we can get back to you.');
        document.forms['composeform'].elements['mail_fromAddress'].focus();
        return false;
    }
	
	if( document.forms['composeform'].elements['telephone_number'].value == '' )
    {
        alert('Please enter a telephone number, we will email you first, unless you request otherwise.');
        document.forms['composeform'].elements['telephone_number'].focus();
        return false;
    }

	if( document.forms['composeform'].elements['comments_questions'].value == '' )
    {
        alert('Please enter some comments, so we get your message.');
        document.forms['composeform'].elements['comments_questions'].focus();
 return false;
    }
	andSubmit();
    }

function andSubmit()
	{
	document.composeform.submit()
	}
// End -->
