	<!--
	
	var valid= false;
			
			
	function checkEmail(str) {
		var emailFilter=/^.+@.+\..{2,4}$/;
		if (!(emailFilter.test(str))) { return false; }
		
		var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
		if (str.match(illegalChars)) { return false; }
		return true;
	}

	function getform() {
	
		var sendOK="Yes"

		if (document.contactus.name.value =="") {
				sendOK="No"
				alert ('You have not entered a name');
				document.contactus.name.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		}

		if (document.contactus.title.value =="") {
				sendOK="No"
				alert ('You have not entered a title');
				document.contactus.title.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		}
	
		if (document.contactus.email.value !="") {
		
			if (!checkEmail(document.contactus.email.value)) {
				sendOK="No"
				alert ('You have not entered a valid email address');
				document.contactus.email.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
			}
		
		}else{
				sendOK="No"
				alert ('You have not entered an email address');
				document.contactus.email.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		
		}

		if (document.contactus.body.value =="") {
				sendOK="No"
				alert ('You have not entered a message');
				document.contactus.body.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();
				return;
		}		

		if(valid == false){
			sendOK="No"
			alert ('Verify code was incorrect');
			document.contactus.code.focus()
			document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();
			return;
		}

		if (sendOK=="Yes"){
			document.contactus.action = '/contact/sendform.php';
			document.contactus.submit();
		}
	}
	

function checkCaptcha()
{
	valid= false;

	var xmlhttp;
	if (window.XMLHttpRequest)
	  {
	  // code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else if (window.ActiveXObject)
	  {
	  // code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	else
	  {
	  alert("Your browser does not support XMLHTTP!");
	  }
	xmlhttp.onreadystatechange=function() 
	{
	if(xmlhttp.readyState==4)
	  {
	  var wasvalid ="";
	  
		//alert(xmlhttp.responseText);

		wasvalid = xmlhttp.responseText ;
		
		//alert('response text : ' + wasvalid);
		
		  if(trimAll(wasvalid)  == 'true'){
			//alert('set true');
			valid = true;
			getform();
		  }else{
			//alert('set false');
		  }
		  
		  

	  }
	}
	
	var rand = Math.random(9999);
	
	url = "/_inc/sendcaptcha.php?code="+ document.contactus.code.value + "&rand="+rand;
	//alert(url);
	xmlhttp.open("GET", url, true);
	xmlhttp.send(null);
}

function trimAll(sString)
{
	while (sString.substring(0,1) == ' ')
	{
	sString = sString.substring(1, sString.length);
	}
	
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
	sString = sString.substring(0,sString.length-1);
	}
return sString;
}


//-->

