function validate() {
	var pass = true;
	//document.contactform.submit();
	if(trim($F('name')).length == 0) {
		$('name').setStyle({'border':'1px solid #e20024;'})
		pass = false;
	} else {
		$('name').setStyle({'border':'1px solid #ACACAC;'})
	}
	if(trim($F('surname')).length == 0) {
		$('surname').setStyle({'border':'1px solid #e20024;'})
		pass = false;
	} else {
		$('surname').setStyle({'border':'1px solid #ACACAC;'})
	}
	if(trim($F('concern')).length == 0) {
		$('concern').setStyle({'border':'1px solid #e20024;'})
		pass = false;
	} else {
		$('concern').setStyle({'border':'1px solid #ACACAC;'})
	}
	/*if(!echeck($F('email'))) {
		$('email').setStyle({'border':'1px solid #e20024;'})
		pass = false;
	} else {
		$('email').setStyle({'border':'1px solid #ACACAC;'})
	}*/
	if(pass == true) {
		document.contactform.submit();
	} else {
		$('contacterror').innerHTML = '<strong>Error:</strong><br />Please check annd correct your input.<br />The corresponding fields have been highlighted.';
	}
	return false;
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function echeck(str) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    return false
	}
	 if (str.indexOf(at,(lat+1))!=-1){
	    return false
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    return false
	 }
	 if (str.indexOf(dot,(lat+2))==-1){
	    return false
	 }
	 if (str.indexOf(" ")!=-1){
	    return false
	 }
	 return true					
}
