var DEF_VAL = "Search all content..."; // Default Value

var isSafari = ((parseInt(navigator.productSub)>=20020000)&&     // detecting WebCore
               (navigator.vendor.indexOf("Apple Computer")!=-1));

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;
    // finding all input[type=text].search's 
    var theInputs = document.getElementsByTagName("input");
    for (var i=0; i<theInputs.length; i++) {
        var theInput = theInputs[i];
        if (theInput.className == "search") {
            // found one.
            if (isSafari) {
                // changing type to "search"
                theInput.setAttribute("type", "search");
                theInput.setAttribute("placeholder", DEF_VAL);
            } else {
                theInput.setAttribute("id", "searchStyled");
                // doing the "Search this Site..."-Displaying- & -Hiding-Stuff
                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;
            }
        }
    }
}