function keyPressHandler(e, that) {
	var kC = (window.event) ? // MSIE or Firefox?
		event.keyCode : e.keyCode;
	var Esc = (window.event) ?
		27 : e.DOM_VK_ESCAPE; // MSIE : Firefox
	if(kC == Esc)
		if (that.value) {
			that.value = '';
			that.style.textAlign = 'left';
		} else {
			resetSearchField(that);
			that.blur();
		}
}

function clearSearchField(that) {
	if (that.value == that.defaultValue) {
		that.value = '';
		that.style.textAlign = 'left';
	}
}

function resetSearchField(that) {
	if (!that.value) {
		that.value = that.defaultValue;
		that.style.textAlign = '';
	}
}

function focusInputField(that) {
	that.firstChild.focus();
	return false;
}