var DEF_VAL   = "search here..."; // Default Value
run();
function run()
{
    var oldOnload = window.onload; // window.onload will be overwritten, so save the old value
    if (typeof(window.onload) != "function") {
        window.onload = init;
    } else {
        window.onload = function() {
            oldOnload();
            init();
        }
    }
}

function init() {
    var theSearchField = document.getElementById('search');
        theSearchField.onfocus    = focusSearch;
        theSearchField.onblur     = blurSearch;
        if (theSearchField.value=='') theSearchField.value = DEF_VAL;
}

function focusSearch() {
    if (this.value==DEF_VAL) {
        this.value = '';
    }
}

function blurSearch() {
    if (this.value=='') {
        this.value = DEF_VAL;
    }
}