function setKeywordDefault(userInputObject, defaultValue) {

  //check that browser supports autoSuggest (IE or Mozilla)
  if (userInputObject.createTextRange || userInputObject.setSelectionRange) {

    //create a string of user input
    userInput = userInputObject.value;

    // if userInput is empty
    if (userInput.length == 0) {

            //place the default value into input field
            userInputObject.value = defaultValue;

    } else if (userInputObject.value == defaultValue) {

            //clear the default value from the input field
            userInputObject.value = '';
    }

  }

}

function clearKeywordDefault(userInputObject, defaultValue) {


  //check that browser supports autoSuggest (IE or Mozilla)
  if (userInputObject.createTextRange || userInputObject.setSelectionRange) {

    //create a string of user input
    userInput = userInputObject.value;

    // if userInput is empty
    if (userInputObject.value == defaultValue) {

            //clear the default value from the input field
            userInputObject.value = '';

    }

  }

}
