// Load multiple functions on window onload and onresize

// Source: http://simon.incutio.com/archive/2004/05/26/addLoadEvent



// Populates label text into an input field (i.e. search box)

function populateSearchFieldText (field_id, label) {

    if (!document.getElementById) return false;

    

    // On startup copy label text to field

    var field = document.getElementById(field_id);

    field.value = label;

    

    // On focus blank out field if label text is value

    field.onfocus = function () {

        if (this.value == label) {

            this.value = '';

        }

    }

    

    // On blur copy label text if value is blank

    field.onblur = function () {

        if (this.value == '') {

            this.value = label;

        }

    }

    

}

// Load functions at startup
// Disable at present
//addLoadEvent(function(){
//    populateSearchFieldText("search-input", "Enter term(s)");
//})
