function xTr4LaR93(field,mandatory,errortype,namefield,nameismandatory,nameerrortype,textfield,textismandatory,texterror) {
//start name field validation
if (namefield == '' && nameismandatory) {
   if (nameerrortype) alert('name field is mandatory');
   return false;
}
var invalidChars = '\/\\";@:$?+=&~!#*()%<>[]\{\}^|%,123456789';
for (i=0; i<invalidChars.length; i++) {
   if (namefield.indexOf(invalidChars.charAt(i),0) > -1) {
      if (nameerrortype) alert('name field contains invalid characters - only letters are allowed');
      return false;
   }
}
for (i=0; i<field.length; i++) {
   if (namefield.charCodeAt(i)>127) {
      if (nameerrortype) alert("email field contains non ascii characters.");
      return false;
   }
}
//start email field validation
if (field == '' && mandatory) {
   if (errortype) alert('email field is mandatory');
   return false;
}
var invalidChars = '\/\'\\ "&;#:$?+=~!*()%<>[]\{\}^|%';
for (i=0; i<invalidChars.length; i++) {
   if (field.indexOf(invalidChars.charAt(i),0) > -1) {
      if (errortype) alert('email field contains invalid characters');
      return false;
   }
}
for (i=0; i<field.length; i++) {
   if (field.charCodeAt(i)>127) {
      if (errortype) alert("email field contains non ascii characters.");
      return false;
   }
}

var atPos = field.indexOf('@',0);
if (atPos == -1) {
   if (errortype) alert('email field must contain an @');
   return false;
}
if (atPos == 0) {
   if (errortype) alert('email field must not start with @');
   return false;
}
if (field.indexOf('@', atPos + 1) > - 1) {
   if (errortype) alert('email field must contain only one @');
   return false;
}
if (field.indexOf('.', atPos) == -1) {
   if (errortype) alert('email field must contain a period');
   return false;
}
if (field.indexOf('@.',0) != -1) {
   if (errortype) alert('period must not immediately follow @ in email field');
   return false;
}
if (field.indexOf('.@',0) != -1){
   if (errortype) alert('period must not immediately precede @ in email field');
   return false;
}
if (field.indexOf('..',0) != -1) {
   if (errortype) alert('two periods must not be adjacent in email field');
   return false;
}
var suffix = field.substring(field.lastIndexOf('.')+1);
if (   suffix != 'com'
	&& suffix != 'net'
	&& suffix != 'org'
	&& suffix != 'edu'
	&& suffix != 'mil'
	&& suffix != 'gov'
	&& suffix != 'biz'
	&& suffix != 'name'
	&& suffix != 'info'
	&& suffix != 'mobi'
	&& suffix != 'us'
	&& suffix != 'tv'
	&& suffix != 'uk'
	&& suffix != 'nz'
	&& suffix != 'au'
	&& suffix != 'ws'
	&& suffix != 'cc'
	&& suffix != 'de'
	&& suffix != 'jp'
	&& suffix != 'be'
	&& suffix != 'at'
	&& suffix != 'cn'
	&& suffix != 'tw'
	&& suffix != 'jobs'
	&& suffix != 'fm'
	&& suffix != 'ms'
	&& suffix != 'nu'
	&& suffix != 'tc'
	&& suffix != 'tk'
	&& suffix != 'vg'
	&& suffix != 'eu'  ) {
   if (errortype) alert('invalid or unaccepted primary domain in email field');
   return false;
}
//start text field validation
if (textfield == '' && textismandatory) {
   if (texterror) alert('message field must not be left blank');
   return false;
}
var invalidChars = '<>';
for (i=0; i<invalidChars.length; i++) {
   if (textfield.indexOf(invalidChars.charAt(i),0) > -1) {
      if (texterror) alert('text field contains invalid characters - greater than ">" or less than "<" symbols are not allowed');
      return false;
   }
}
window.document.taco.submit();
}