if (typeof c2 == 'undefined') c2 = {};
if (typeof c2.section == 'undefined') c2.section = {};

c2.section.search = {
    strImgURLPrefix: '',

    onSubmit:
        function (evt, obj) {
            Event.stop(evt);
            $('formSearch').wg.value = false;
            $('formSearch').area.value = '';
            c2.searchLayer.search($('formSearch'));
        },

    onClickCategory:
        function (evt, obj) {
            var objThis = c2.section.search;

            Event.stop(evt);
            if (Swaf.Dom.getStyle($('divSearchSelectBox'), 'display') == 'none') {
                $('imgSearchArrow').src = objThis.strImgURLPrefix + 'section/ico_search_arrow_on.gif';
                Swaf.Dom.setStyle($('divSearchSelectBox'), 'display', 'block');
            }
            else {
                $('imgSearchArrow').src = objThis.strImgURLPrefix + 'section/ico_search_arrow_off.gif';
                Swaf.Dom.setStyle($('divSearchSelectBox'), 'display', 'none');
            }
        },

    onSelectCategory:
        function (evt, obj) {
            var objThis = c2.section.search;

            $('spanSearchCurrCategory').innerHTML = obj.innerHTML;
            $('formSearch').category.value = $attr(obj, 'category');

            $('imgSearchArrow').src = objThis.strImgURLPrefix + 'section/ico_search_arrow_off.gif';
            Swaf.Dom.setStyle($('divSearchSelectBox'), 'display', 'none');
        }
}
