﻿// ############################################################################
// ##
// ##  CUSTOM SEARCH FUNCTIONS
// ##
// ############################################################################

// ====================
// Function:    SearchKeywordsFieldOnClick, SearchKeywordsFieldOnBlur, SearchKeywordsFieldOnLoad
//
// Purpose:     Triggered when the site search form keywords field is clicked,
//              blurred, or loaded. Intended to help control behaviour of the
//              keywords field. 
//
// Input:       this - The keywords field object.
//
// Output:      Controls behaviour of the search keywords field when clicked.
//
// Assumptions: -
//
// History:     20080505 RW Created
//              20110812 SC Modified to change default 'Enter Keywords' text to suit client requirements
// ====================
function SearchKeywordsFieldOnClick(objField) {
    if (objField.value == 'Enter search criteria here...') {
        objField.value = '';
    }
}
function SearchKeywordsFieldOnBlur(objField) {
    if (objField.value == '') {
        objField.value = 'Enter search criteria here...';
    }
}
function SearchKeywordsFieldOnLoad(objField) {
    objField.value = 'Enter search criteria here...';
}

addEvent(window, "load", function () {
    SearchKeywordsFieldOnLoad(document.getElementById('ctl00_cplHeader_SearchForm_Keywords'));
});
