	<!--
	
	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.contactform.name.value =="") {
				sendOK="No"
				alert ('You have not entered a name');
				document.contactform.name.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		}

		if (document.contactform.position.value =="") {
				sendOK="No"
				alert ('You have not entered a position');
				document.contactform.position.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		}
		
		if (document.contactform.email.value !="") {
		
			if (!checkEmail(document.contactform.email.value)) {
				sendOK="No"
				alert ('You have not entered a valid email address');
				document.contactform.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.contactform.email.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();				
				return;
		
		}
		
		if (document.contactform.message.value =="") {
				sendOK="No"
				alert ('You have not entered a message');
				document.contactform.message.focus()
				document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();
				return;
		}		
		
		if(valid == false){
			sendOK="No"
			alert ('Verify code was incorrect');
			document.contactform.code.focus()
			document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();
			return;
		}
		
		if (sendOK=="Yes"){
			document.contactform.action = 'sendform.php';
			document.contactform.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;
		  }else{
			//alert('set false');
		  }
		  
		  
	  getform()
	  }
	}
	
	var rand = Math.random(9999);
	
	url = "sendcaptcha.php?code="+ document.contactform.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;
}


//-->

