[if config SalesTax ne multi]
    <script>    // JavaScript Form Validation Demo    // by Paul Colton
    function check_tax(form) {
        // Make sure the email field is not blank
        var foundState = false;
		[calc]
			if($Variable->{TAXCOUNTRY}) {
				return q{var ch = 'NEVAIRBE';}
					unless $Variable->{TAXCOUNTRY} =~ /\b$Values->{country}\b/;
			}
			return q{var ch = form.state.value;}
		[/calc]
        ch = ch.toUpperCase();
                [loop list="__TAXAREA__"]
        if(ch == "[loop-code]") {
            alert("You will be charged [currency][fly-tax [loop-code]][/currency] sales tax\nsince you are shipping to [loop-code]. Click Recalculate to see the amount in your total.");
            foundState = true;
        }
                [/loop]
        return foundState;
    }
    </script>
[/if]
