//adapted from "searchfield.js" from http://tests.themasta.com/safari/

var DEF_VAL = "search via Google"; // 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() {
    if (!document.getElementById) return;
    var theInput = document.getElementById("searchBar");
   
    theInput.onfocus = function() { if (this.value==DEF_VAL) this.value = ""; };
    theInput.onblur  = function() { if (this.value=="")      this.value = DEF_VAL; };
    if (theInput.value=='') theInput.value = DEF_VAL;
}