﻿/// Use - control initial prompt text in a textbox.
/// Removes inital text and class from textbox if it exists.
/// The text and class are reset if the original text is set to blank.
function TextBoxPreUseTextSetter(textBoxClientID, text, cssClass) {
    $('#' + textBoxClientID).click(function() {
        if ($(this).val() == text) {
            $(this).val('');
            $(this).removeClass(cssClass);
        }
    });

    $('#' + textBoxClientID).blur(function() {
        if ($(this).val() == '') {
            $(this).val(text);
            $(this).addClass(cssClass);
        }
    });
}