function showSearchInput() {
	jQuery('#searchDiv').fadeIn();
}

function hideSearchInput() {
	jQuery('#searchDiv').fadeOut();
}

function bw_initSearchField(elem) {
	if (jQuery(elem).hasClass('searchInputNotUsed')) {
		jQuery(elem).removeClass('searchInputNotUsed').attr('value', '');
	}
}

function bw_submit(elem) {
	if (!bw_validate(jQuery(elem).parents('form'))) {
		return false;
	}
	jQuery(elem).parents('form').submit();
}

function bw_validate(elem) {
	var jqElem = jQuery(elem).find('.searchInput');
	return (jqElem.attr('value') != '') && !jqElem.hasClass('searchInputNotUsed');
}
