﻿// The two functions blankSearchField and checkBlankedSearchField are used
// in the header with the search by zip code text box.

// When the user selects the text box, if it is populated with the default text
// the text is cleared and the style changed
function blankSearchField(field, defaultValue) {

    if (field.value == defaultValue) {

        field.value = '';
        $(field).setProperty('class', 'formTextBoxZipCodeActive');

    } // End if statement

} // End function blankSearchField

// When the user is no longer working in the text box and if there is no text
// entered in the text box then restore the default text and style
function checkBlankedSearchField(field, defaultValue) {

    if (field.value.length == 0) {

        field.value = defaultValue;
        $(field).setProperty('class', 'formTextBoxZipCode');

    } // End if statement

} // End function checkBlankedSearchField
