'); } ); $('#searchForm').append(''); $('#searchForm').append(''); $('#searchForm').append(''); if ($('#cur').size())$('#searchForm').append(''); sAction = ''; if ( $('#onlyFirm').size() && $('#onlyFirm')[0].checked ) { sAction = WWW+'/board/dc-washington/firm-4971919_ppc-amazon-advertising-services'+((iSelC=parseInt($('#targetCategoryLocal')[0].options[$('#targetCategoryLocal')[0].selectedIndex].value))>0?'/'+iSelC+'_1':'')+'.htm'; } else if ( city ) { sAction = WWW+'/board/'+city+'.htm'; } if (sAction)$('#searchForm').attr('action',sAction); $('#searchForm').submit(); }; changeSearch = function( type, btn ) { if (!btn)btn=new Object(); $('#input_byid').removeAttr('name'); $('.search_string').removeClass('byid'); $('#search_form .headerline a:not(:last)').removeClass('right'); switch(type){ case 'cats': $( '.hidden_cats').hide(); break; case 'text': if (btn.id == 'idSearchBtn' ){ $('#input_byid').attr('name','byid'); $('.search_string').addClass('byid'); $('.byidhide').hide(); } else { $('.byidhide').show(); if($('#onlyFirm').size())changeFirmOnly($('#onlyFirm')[0]); } $( '.hidden_letters,.hidden_cats').show(); break; }; $( '#textSearch,#lettersSearch,#catsSearch' ).hide(); $('a[id$=SearchBtn]').removeClass('orange'); $('#'+(btn.id=='idSearchBtn'?'id':type)+'SearchBtn').addClass('orange').prevAll('a:first').addClass('right'); $('#'+type+'Search').show(); }; function changeGetProd() { var _0c = _('gprd0').checked; var _1c = _('gprd1').checked; var val = _0c ? (_1c?-1:0) : (_1c?1:-1) ; if (val>=0) { $('#getproducts_inp').val(val).attr('name','products'); } else { $('#getproducts_inp').removeAttr('name'); } } function changeFirmOnly(chk) { if (chk.checked) { $('.defaultCats,.onlyfirmhide,#search_select_reg').hide(); $('.onlyFirmCats').css('visibility','visible'); } else { $('.defaultCats').show()[0].selected = true; $('.onlyFirmCats').css('visibility','hidden'); $('.onlyfirmhide,#search_select_reg').show(); } } var aSFilter = new Array(); function checkFilters(event) { if (event.target.options[event.target.selectedIndex].className) { $('#searchb_filter').show().html(''); catID = event.target.options[event.target.selectedIndex].className; if ( typeof aSFilter[catID] != 'undefined' ) { if (aSFilter[catID]){ $('#searchb_filter').show().html(aSFilter[catID]); } else { $('#searchb_filter').hide(); } return ; } $.post('/end.php?params[a]=loadB_Filters¶ms[ct]='+catID+'¶ms[act]='+$('#crntA').val(),function(data){ if (data && data!='0'){ aSFilter[catID] = data; $('#searchb_filter').show().html(aSFilter[catID]); } else { aSFilter[catID] = ''; $('#searchb_filter').hide(); } }); } else { $('#searchb_filter').hide(); } }; function initRegions4Search(){ $('#search_select_reg_opn').append($('#flyRegList').addClass('insearch board')); if($(window).width()<1000){ $('#flyRegList').css('margin-top',($('#search_form').height()+10)+'px'); } flyReg.getRegions('setSearchCityTranslit'); } $('#search_select_reg .openreg').click(initRegions4Search);$('#targetCategory').change(checkFilters); var curTS=$('#search_form input[type=text]'); curTS.keydown(function(e){if (e.which!=13)return;startSearch();}); $('#search_form').click(function(){ $('#search_form .additional_params:hidden').slideDown('fast'); $('#changeQuery').remove(); $('#searchParamsText').slideUp('fast'); });var FLY_REG_IS_HIDDEN=true;var FLY_REG_SEARCH_IS_FIX = false;initOpenSearch('https://www.cataloxy.us/o_s/us/board.xml','Search for products on Cataloxy.us');