﻿
function ShowHideDIV(divID) {
    var theDIV = document.getElementById(divID);
    if (theDIV.style.visibility == 'hidden')
        theDIV.style.visibility = 'visible';
    else theDIV.style.visibility = 'hidden';
}


function DoSearch(){
    var x = document.getElementById('zipcodeInput').value;
    if(x == ""){
        alert('please specify a zip code');
        return false;
    }else{
        var objRegExp  = /(^\d{5}$)/;
        //check for valid US Zipcode
        if(!objRegExp.test(x)){
            alert('5-digit zip code required');
            return false;
        }
    }
    document.location.href = "/hearing-aid-clinic-locations.aspx?zip="+x;
}

function ClearTextBox(textbox) {
    textbox.value = '';
}