function clrVal(txtFld){    if (txtFld.defaultValue == txtFld.value)             txtFld.value = '';        else             if (txtFld.value == '')                     txtFld.value = txtFld.defaultValue;    }function zipError(){    alert("Please enter a valid five-digit Ohio zip code.");    }function loadCounty(){    var errortest = true;                $.ajax({            type: "POST",                async: false,                url: "findCounty.php",                data: {                    zipCode: $("#calc_zipbox").val()                },                success: function(data){                    $("#calc_county").html(data);                    }                            });                return errortest;    }function loadSD(){    $.ajax({            type: "POST",                url: "findSD.php",                data: {                    zipCode: $("#calc_zipbox").val()                },                success: function(data){                    $("#calc_dropbox").html(data);                    }            });    }function loadSDCut(){var sdraw = $("#calc_dropbox").val();sdraw = sdraw.substr(0, (sdraw.length)-1);var sdtext = "cut from " + sdraw + ".";    $.ajax({            type: "POST",                url: "findSDCut.php",                data: {                    SDCode: $("#calc_dropbox").val()        },                success: function(data){                        $("#calc_sdcut").html(data);            $("#calc_sdtext").html(sdtext);        }            });    }function loadGenCut(){    $.ajax({            type: "POST",                url: "findGenCut.php",                data: {                    zipCode: $("#calc_zipbox").val()                },                success: function(data){                    $("#calc_maincut").html(data);                    }            });    }function loadLibCut(){    $.ajax({            type: "POST",                url: "findLibCut.php",                data: {                    zipCode: $("#calc_zipbox").val()                },                success: function(data){                    $("#calc_libcut").html(data);                    }            });    }function loadSchoolCut(){    $.ajax({            type: "POST",                url: "findSchoolCut.php",                data: {                    zipCode: $("#calc_zipbox").val()                },                success: function(data){                    $("#calc_schoolcut").html(data);                    }            });    }function testZip(zipCode){    $("#calc_textcontainer").fadeOut(0);                reZip = new RegExp(/(^\d{5}$)/);                firstChar = zipCode.substring(0, 1);        secondChar = zipCode.substring(1, 2);                if (firstChar != 4) {            zipError();                return false;            };                if (secondChar != 3 && secondChar != 4 && secondChar != 5) {            zipError();                return false;            };                if (!reZip.test(zipCode)) {                    zipError();                return false;            }                loadCounty();                if ($("#calc_county").html() == "error") {            zipError();                return false;            }                loadGenCut();        loadLibCut();        loadSchoolCut();        loadSD();            return true;            }$(document).ready(function(){    $('#calc_zipbox').keypress(function(e){            if (e.which == 10 || e.which == 13) {                    $("#calc_btn_img").click();                    }            });                $("#calc_btn_img").click(function(){                    var zip = $("#calc_zipbox").val();           		        if (testZip(zip)) {		        		        		        		            $("#calc_textcontainer").fadeIn(1000);		            		            		            		        };                            });            $('#calc_dropbox').change(function() {		if ($("#calc_dropbox").val() != "") {			loadSDCut();		}     });                });