
<!--
function ABAMod10(aba) { //v2.0
var valid = "0123456789";
var len = aba.length;
var bNum = true;
var iABA = parseInt(aba);
var sABA = aba.toString();
var url = "abaDisplay2.asp?aba=" + sABA;
var iTotal = 0;
var bResult = false;
var temp;
//alert(aba);
for (var j=0; j<len; j++) {
temp = "" + document.application.abarouting.value.substring(j, j+1);
if (valid.indexOf(temp) == "-1") bNum = false;
}
if(!bNum){alert("Not a Number");}
if(len !=0) {  // incase they omit the number entirely.
	if(len != 9){  
		alert("This is not a proper ABA length");
	}else{
	  for (var i=0; i<len; i += 3) {
		iTotal += parseInt(sABA.charAt(i),     10) * 3
			   +  parseInt(sABA.charAt(i + 1), 10) * 7
			   +  parseInt(sABA.charAt(i + 2), 10);
	  }
	  if (iTotal != 0 && iTotal % 10 == 0){
			//document.calculator.results.value = "Yes"; 
			bResult = true;
			frames['littlewindow'].window.location = url;
		}else{
			//document.calculator.results.value = "No"; 
			alert("This is NOT a valid ABA Routing Number!")
			bResult = false;
		}
	}
}else{ 
	// zero length do nothing
}
// not shown in page version of code
// intended to reset the frame detail.
if (!bResult){
	frames['littlewindow'].window.location = "blank.htm";
}
// end of not shown in page version of code

  return bResult;
}
//-->

