/* when focus enters the search box, if the search text is the "default",
 * then replace it with nothing, and change the color to black. Finally,
 * select all the text that is in the box.
 */
function searchBoxFocus(searchBox, defaultMessage) {
    if (searchBox.value == defaultMessage) {
        searchBox.value = '';
        searchBox.style.color = 'black';
    }
    searchBox.select();
}

/* when focus leaves the search box, if the search text is empty, then
 * replace it with the default text, and gray it out
 */
function searchBoxBlur(searchBox, defaultMessage) {
    if (searchBox.value == '') {
        searchBox.value = defaultMessage;
        searchBox.style.color = 'gray';
    }
}
