// JavaScript Document
<!--
var sendmail = 1;
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) 
	{
		alert('The following error(s) occurred:\n'+errors);
		sendmail = 0;
		//alert("send "+sendmail);
	}
document.MM_returnValue = (errors == '');
if (sendmail == 1)
{
	document.getinfo.action="AddNewNotary.asp";
	document.getinfo.submit();
}
}

function Checkdarea()
{
	if(isNaN(document.getinfo.dayphone_areacode.value))
	{
	alert("Invalid Daytime Phone Area Code.  Please check to make sure your entry contains numbers only.");
	document.getinfo.dayphone_areacode.value = ""
	document.getinfo.dayphone_areacode.focus();
	return false;
	}
}
function Checkdprefix()
{
	if(isNaN(document.getinfo.dayphone_prefix.value))
	{
	alert("Invalid Daytime Phone Prefix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.dayphone_prefix.value = ""
	document.getinfo.dayphone_prefix.focus();
	return false;
	}
}
function Checkdsuffix()
{
	if(isNaN(document.getinfo.dayphone_suffix.value))
	{
	alert("Invalid Daytime Phone Suffix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.dayphone_suffix.value = ""
	document.getinfo.dayphone_suffix.focus();
	return false;
	}
}
function Checkearea()
{
	if(isNaN(document.getinfo.eveningphone_areacode.value))
	{
	alert("Invalid Evening Phone Area Code.  Please check to make sure your entry contains numbers only.");
	document.getinfo.eveningphone_areacode.value = ""
	document.getinfo.eveningphone_areacode.focus();
	return false;
	}
}
function Checkeprefix()
{
	if(isNaN(document.getinfo.eveningphone_prefix.value))
	{
	alert("Invalid Evening Phone Prefix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.eveningphone_prefix.value = ""
	document.getinfo.eveningphone_prefix.focus();
	return false;
	}
}
function Checkesuffix()
{
	if(isNaN(document.getinfo.eveningphone_suffix.value))
	{
	alert("Invalid Evening Phone Suffix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.eveningphone_suffix.value = ""
	document.getinfo.eveningphone_suffix.focus();
	return false;
	}
}

function Checkfarea()
{
	if(isNaN(document.getinfo.fax_areacode.value))
	{
	alert("Invalid Fax Area Code.  Please check to make sure your entry contains numbers only.");
	document.getinfo.fax_areacode.value = ""
	document.getinfo.fax_areacode.focus();
	return false;
	}
}
function Checkfprefix()
{
	if(isNaN(document.getinfo.fax_prefix.value))
	{
	alert("Invalid Fax Prefix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.fax_prefix.value = ""
	document.getinfo.fax_prefix.focus();
	return false;
	}
}
function Checkfsuffix()
{
	if(isNaN(document.getinfo.fax_suffix.value))
	{
	alert("Invalid Fax Suffix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.fax_suffix.value = ""
	document.getinfo.fax_suffix.focus();
	return false;
	}
}

function Checkrarea()
{
	if(isNaN(document.getinfo.relative_phone_area.value))
	{
	alert("Invalid Realtive Phone Area Code.  Please check to make sure your entry contains numbers only.");
	document.getinfo.relative_phonearea.value = ""
	document.getinfo.relative_phonearea.focus();
	return false;
	}
}
function Checkrprefix()
{
	if(isNaN(document.getinfo.relative_phone_prefix.value))
	{
	alert("Invalid Realtive Phone Prefix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.relative_phoneprefix.value = ""
	document.getinfo.relative_phoneprefix.focus();
	return false;
	}
}
function Checkrsuffix()
{
	if(isNaN(document.getinfo.relative_phone_suffix.value))
	{
	alert("Invalid Realtive Phone Suffix.  Please check to make sure your entry contains numbers only.");
	document.getinfo.relative_phonesuffix.value = ""
	document.getinfo.relative_phonesuffix.focus();
	return false;
	}
}


function CheckDistanceNum()
{
	if(isNaN(document.getinfo.travel50.value))
	{
		alert("Invalid entry for Distance Willing To Travel for $50.  Please check to make sure your entry contains numbers only.")
		document.getinfo.travel50.value = ""
		document.getinfo.travel50.focus();
		return false;
	}
}

function CheckComExpMonth()
{
	if(isNaN(document.getinfo.comm_exp_month.value))
	{
		alert("Invalid Commission Expiration Month.  Please check to make sure your entry contains numbers only.")
		document.getinfo.comm_exp_month.value = ""
		document.getinfo.comm_exp_month.focus();
		return false;
	}
}
function CheckComExpDay()
{
	if(isNaN(document.getinfo.comm_exp_day.value))
	{
		alert("Invalid Commission Expiration Day.  Please check to make sure your entry contains numbers only.")
		document.getinfo.comm_exp_day.value = ""
		document.getinfo.comm_exp_day.focus();
		return false;
	}
}
function CheckComExpYear()
{
	if(isNaN(document.getinfo.comm_exp_year.value))
	{
		alert("Invalid Commission Expiration Year.  Please check to make sure your entry contains numbers only.")
		document.getinfo.comm_exp_year.value = ""
		document.getinfo.comm_exp_year.focus();
		return false;
	}
}

function CheckBondNum()
{
	if(isNaN(document.getinfo.bondamount.value))
	{
		alert("Invalid Bomd Amount.  Please check to make sure your entry contains numbers only.")
		document.getinfo.bondamount.value = ""
		document.getinfo.bondamount.focus();
		return false;
	}
}
function CheckBondExpMonth()
{
	if(isNaN(document.getinfo.bond_exp_month.value))
	{
		alert("Invalid Bond Expiration Month.  Please check to make sure your entry contains numbers only.")
		document.getinfo.bond_exp_month.value = ""
		document.getinfo.bond_exp_month.focus();
		return false;
	}
}
function CheckBondExpDay()
{
	if(isNaN(document.getinfo.bond_exp_day.value))
	{
		alert("Invalid Bond Expiration Day.  Please check to make sure your entry contains numbers only.")
		document.getinfo.bond_exp_day.value = ""
		document.getinfo.bond_exp_day.focus();
		return false;
	}
}
function CheckBondExpYear()
{
	if(isNaN(document.getinfo.bond_exp_year.value))
	{
		alert("Invalid Bond Expiration Year.  Please check to make sure your entry contains numbers only.")
		document.getinfo.bond_exp_year.value = ""
		document.getinfo.bond_exp_year.focus();
		return false;
	}
}
function IsCheckedRadio(rad, num)
{
  var ch, i;
  for(i=0;i<num;++i)
    ch = ch || rad[i].checked;
  return ch;
}
function isValidEmail(emailin) 
{ 
	var re = /[a-z_\-0-9\.]+@[a-z_\-0-9\.]+\.[a-z]{3}$/i
	if ( !re.test(emailin) )
		return false;
	else
		return true;
} 
function CheckFields()
{
	if(document.getinfo.SSN_TIN_Type[0].checked==true)
	{
	 if(!document.getinfo.SSN1.value)
		{
			alert("Please enter your SSN number.");
			document.getinfo.SSN1.focus();
			return false;
		}
	
	if(!document.getinfo.SSN2.value)
		{
			alert("Please enter your SSN number.");
			document.getinfo.SSN2.focus();
			return false;
		}
		
	if(!document.getinfo.SSN3.value)
		{
			alert("Please enter your SSN number.");
			document.getinfo.SSN3.focus();
			return false;
		}
	}
	else if(document.getinfo.SSN_TIN_Type[1].checked==true)
	{
	 if(!document.getinfo.TIN1.value)
		{
			alert("Please enter your TIN number.");
			document.getinfo.TIN1.focus();
			return false;
		}
	
	if(!document.getinfo.TIN2.value)
		{
			alert("Please enter your TIN number.");
			document.getinfo.TIN2.focus();
			return false;
		}
	}
	
	if(!document.getinfo.firstname.value)
	{
		alert("Please enter your First Name.");
		document.getinfo.firstname.focus();
		return false;
	}
	
	if(!document.getinfo.lastname.value)
	{
		alert("Please enter your Last Name.");
		document.getinfo.lastname.focus();
		return false;
	}
	if(!document.getinfo.week_address.value)
	{
		alert("Please enter your Weekday Address.");
		document.getinfo.week_address.focus();
		return false;
	}
	if(!document.getinfo.dayphone_areacode.value)
	{
		alert("Please enter your Daytime Phone Area Code.");
		document.getinfo.dayphone_areacode.value = ""
		document.getinfo.dayphone_areacode.focus();
		return false;
	}
	if(!document.getinfo.dayphone_prefix.value)
	{
		alert("Please enter your Daytime Phone Prefix.");
		document.getinfo.dayphone_prefix.value = ""
		document.getinfo.dayphone_prefix.focus();
		return false;
	}
	if(!document.getinfo.dayphone_suffix.value)
	{
		alert("Please enter your Daytime Phone Suffix.");
		document.getinfo.dayphone_suffix.value = ""
		document.getinfo.dayphone_suffix.focus();
		return false;
	}
	if(!document.getinfo.eveningphone_areacode.value)
	{
		alert("Please enter your Evening Phone Area Code.");
		document.getinfo.eveningphone_areacode.value = ""
		document.getinfo.eveningphone_areacode.focus();
		return false;
	}
	if(!document.getinfo.eveningphone_prefix.value)
	{
		alert("Please enter your Evening Phone Prefix.");
		document.getinfo.eveningphone_prefix.value = ""
		document.getinfo.eveningphone_prefix.focus();
		return false;
	}
	if(!document.getinfo.eveningphone_suffix.value)
	{
		alert("Please enter your Evening Phone Suffix.");
		document.getinfo.eveningphone_suffix.value = ""
		document.getinfo.eveningphone_suffix.focus();
		return false;
	}
	if(!document.getinfo.fax_areacode.value)
	{
		alert("Please enter your Fax Area Code.");
		document.getinfo.fax_areacode.value = ""
		document.getinfo.fax_areacode.focus();
		return false;
	}
	if(!document.getinfo.fax_prefix.value)
	{
		alert("Please enter your Fax Prefix.");
		document.getinfo.fax_prefix.value = ""
		document.getinfo.fax_prefix.focus();
		return false;
	}
	if(!document.getinfo.fax_suffix.value)
	{
		alert("Please enter your Fax Suffix.");
		document.getinfo.fax_suffix.value = ""
		document.getinfo.fax_suffix.focus();
		return false;
	}
	if(!document.getinfo.email.value)
	{
		alert("Please supply an Email Address.");
		document.getinfo.email.focus();
		return false;
	}
	else
	{
		if(!isValidEmail(document.getinfo.email.value) )
		{
				alert("Invalid Email address!");
				document.getinfo.email.focus();
				return false;
		}
	}
	
	if(!document.getinfo.Driver_License.value)
	{
		alert("Please enter Driver License #.");
		document.getinfo.Driver_License.focus();
		return false;
	}
	
	if(!document.getinfo.DriverLicenseExpM.value)
	{
		alert("Please enter Driver License expiration MONTH.  For example, March would be '03'.");
		document.getinfo.DriverLicenseExpM.focus();
		return false;
	}
	
	if(!document.getinfo.DriverLicenseExpY.value)
	{
		alert("Please enter Driver License expiration YEAR.  For example, 2003 would be '03'.");
		document.getinfo.DriverLicenseExpY.focus();
		return false;
	}
	
	
	if(!document.getinfo.relative_name.value)
	{
		alert("Please supply the name of your nearest relative.");
		document.getinfo.relative_name.focus();
		return false;
	}
	if(!document.getinfo.relative_phone_area.value)
	{
		alert("Please enter the Area Code for your nearest relative.");
		document.getinfo.relative_phone_area.value = ""
		document.getinfo.relative_phone_area.focus();
		return false;
	}
	if(!document.getinfo.relative_phone_prefix.value)
	{
		alert("Please enter the Prefix for your nearest relative.");
		document.getinfo.relative_phone_prefix.value = ""
		document.getinfo.relative_phone_prefix.focus();
		return false;
	}
	if(!document.getinfo.relative_phone_suffix.value)
	{
		alert("Please enter the Suffix for your nearest relative.");
		document.getinfo.relative_phone_suffix.value = ""
		document.getinfo.relative_phone_suffix.focus();
		return false;
	}

	if(!IsCheckedRadio(document.getinfo.felonymisdem,2))
		{
			alert("Please note whether or not you've had a previous felony conviction.");
			return false;
			document.getinfo.felonymisdem.focus();
		}
	if(!document.getinfo.countyreside.value)
		{
			alert("Please enter the county in which you currently reside.");
			document.getinfo.countyreside.focus();
			return false;
		}
	if(!document.getinfo.counties_service.value)
		{
			alert("Please enter the counties in which you service.");
			document.getinfo.counties_service.focus();
			return false;
		}
	if(!document.getinfo.travel50.value)
		{
			alert("Please enter the distance you are willing to travel for $50.");
			document.getinfo.travel50.focus();
			return false;
		}
	if(!IsCheckedRadio(document.getinfo.notarizedloan,2))
		{
			alert("Please tell us whether or not you have notarized loan documents before.");
			return false;
		}
	if(!document.getinfo.notarizedloan_num.selectedIndex)
		{
			alert("Please select how many documents you have notarized.");
			document.getinfo.notarizedloan_num.focus();
			return false;
		}
	if (!document.getinfo.exp_purchases.checked && !document.getinfo.exp_refi.checked && !document.getinfo.exp_linesofcred.checked && !document.getinfo.exp_fixed2and3.checked)
			{
				alert("Please tell us about your loan document experience.");
				document.getinfo.exp_purchases.focus();
				return false;
			}

	if(!document.getinfo.commission.value)
		{
			alert("Please enter your Commission number.");
			document.getinfo.commission.focus();
			return false;
		}
		
	if(!document.getinfo.comm_exp_month.value)
		{
			alert("Please enter your Commission Expiration Month.");
			document.getinfo.comm_exp_month.focus();
			return false;
		}
	
	if(!document.getinfo.comm_exp_day.value)
		{
			alert("Please enter your Commission Expiration Day.");
			document.getinfo.comm_exp_day.focus();
			return false;
		}
		
	if(!document.getinfo.comm_exp_year.value)
		{
			alert("Please enter your Commission Expiration Year.");
			document.getinfo.comm_exp_year.focus();
			return false;
		}
		
	if(!document.getinfo.bondcertificate.value)
		{
			alert("Please enter your Bond Certificate number.");
			document.getinfo.bondcertificate.focus();
			return false;
		}
		
	if(!document.getinfo.bondamount.value)
		{
			alert("Please enter your Bond amount.");
			document.getinfo.bondamount.focus();
			return false;
		}
	
	if(!document.getinfo.bond_exp_month.value)
		{
			alert("Please enter your Bond Certificate Expiration Month.");
			document.getinfo.bond_exp_month.focus();
			return false;
		}
	
	if(!document.getinfo.bond_exp_day.value)
		{
			alert("Please enter your Bond Certificate Expiration Day.");
			document.getinfo.bond_exp_day.focus();
			return false;
		}
		
	if(!document.getinfo.bond_exp_year.value)
		{
			alert("Please enter your Bond Certificate Expiration Year.");
			document.getinfo.bond_exp_year.focus();
			return false;
		}
		
	if(!IsCheckedRadio(document.getinfo.bilingual,2))
		{
			alert("Please tell us whether or not you are Bilingual.");
			return false;
		}
	
	
	
	
	
	if(!document.getinfo.checkto.value)
		{
			alert("Please the name of the person/company to make checks out to.");
			document.getinfo.checkto.focus();
			return false;
		}
		
	if(!document.getinfo.checksentto_add.value)
		{
			alert("Please the address of the person/company to make checks out to.");
			document.getinfo.checksentto_add.focus();
			return false;
		}

	if(!document.getinfo.checksentto_city.value)
		{
			alert("Please the city of the person/company to make checks out to.");
			document.getinfo.checksentto_city.focus();
			return false;
		}
	if(!document.getinfo.checksentto_state.value)
		{
			alert("Please the state of the person/company to make checks out to.");
			document.getinfo.checksentto_state.focus();
			return false;
		}
		
	if(!document.getinfo.checksentto_zip.value)
		{
			alert("Please enter the zip code of the person/company to make checks out to.");
			document.getinfo.checksentto_zip.focus();
			return false;
		}
	
	
	if(!document.getinfo.hearfromus.value)
		{
			alert("Please tell us how you heard about us.");
			document.getinfo.hearfromus.focus();
			return false;
		}
}

//-->
