function fixTax(){
if (window.document.bando.thetax.value.indexOf('.') == -1){window.document.bando.thetax.value += ".0";}
var theinput  = window.document.bando.thetax.value;
var dot=".";
var firstsplit = theinput.split(".");
var beforesplit = firstsplit[0];
var aftersplit = firstsplit[1];
var trimaftersplit = aftersplit.substring(0,2);
if (aftersplit.substring(1) <= 0){trimaftersplit = aftersplit.substring(0,2) + "0";}
var all = beforesplit + dot + trimaftersplit;
window.document.bando.thetax.value = all;
}
//
function whoa(){
window.document.bando.taxableamount.value="Enter amount";
window.document.bando.taxableamount.focus();
window.document.bando.taxableamount.select();
}
//
function bAndoTaxer(){
var daamount = window.document.bando.taxableamount.value;
var darate = window.document.bando.yourbiz.value;
var datax = eval(daamount * darate);
var yourtaxx = Math.round(datax * 100)/100;
if (isNaN(window.document.bando.taxableamount.value) || window.document.bando.taxableamount.value <= 0){
whoa();
return window.document.bando.thetax.value="Try again!";
}
else {
window.document.bando.thetax.value="$" + yourtaxx;
fixTax();
}
}
//
function scrollme(x,y){
window.scroll(x,y);
}
//
function taxScrubber(){
if (window.document.bando.taxableamount.value.indexOf('.') == -1){window.document.bando.taxableamount.value += ".";}
var theinput  = window.document.bando.taxableamount.value;
var dot=".";
var firstsplit = theinput.split(".");
var beforesplit = firstsplit[0];
var aftersplit = firstsplit[1];
var trimaftersplit = aftersplit.substring(0,2);
var all = beforesplit + dot + trimaftersplit;
window.document.bando.taxableamount.value = all;
}
//
function addZeroTax(){
if ((window.document.bando.taxableamount.value == "0") || (window.document.bando.taxableamount.value <= "")){
whoa();
}
}
//
function goTaxGo(rateper100){
//scrollme(0,0);
//window.document.bando.yourbiz.value='.008';
window.document.bando.yourbiz.value = rateper100;
window.document.bando.therate.value = (rateper100)*100;
window.document.bando.taxableamount.value='Enter amount';
window.document.bando.thetax.value='';
//
if (window.document.bando.therate.value.indexOf('.') == -1){window.document.bando.therate.value += ".0";}
var theinput  = window.document.bando.therate.value;
var dot=".";
var firstsplit = theinput.split(".");
var beforesplit = firstsplit[0];
var aftersplit = firstsplit[1];
var trimaftersplit = aftersplit.substring(0,2);
if (aftersplit.substring(1) <= 0){trimaftersplit = aftersplit.substring(0,2) + "0";}
var all = beforesplit + dot + trimaftersplit;
window.document.bando.therate.value = all;
}
//
var ugh = window.document.input;
function xout(ugh) {
aa = ugh.value;
xthis = "<>?':;{}[]`~!@#%^&*()-_=+\|/$гевой,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + '"' + " ";     // x these out
var yo;
var izdis = "";
for (yo = 0; yo < aa.length; yo++) {  // Search through string and append to unfiltered values to returnString.
var xx = aa.charAt(yo);
if (xthis.indexOf(xx) == -1) izdis += xx;
}
ugh.value = izdis;
}
//
function trimthefatTax(){
while(''+window.document.bando.taxableamount.value.charAt(window.document.bando.taxableamount.value.length-1)=='.')window.document.bando.taxableamount.value=window.document.bando.taxableamount.value.substring(0,window.document.bando.taxableamount.value.length-1);
while(''+window.document.bando.taxableamount.value.charAt(0)=='0')window.document.bando.taxableamount.value=window.document.bando.taxableamount.value.substring(1,window.document.bando.taxableamount.value.length);
}