function results(params) { var location = screen.width/2+110; var height = screen.height-80; window.open("http://tywent.pl/include/search_results.php?"+params, "search", 'location=0,toolbar=0,status=0,scrollbars=1,resizable=0,width=440,height='+height+',top=0,left='+location); } function goMain(url) { window.opener.location = url; } function getPerformanceType() { return $("#search_form input:radio:checked").val(); } function in_array(needle, haystack) { for(var i=0; i0) { tr.find("input[type='checkbox']").attr("checked", true); } else { tr.find("input[type='checkbox']").attr("checked", false); } }); $("#autocomplete input[name='key']").blur(function(){ // przelanczanie checkboxow przy wyszukiwarce wentylatorow if ($(this).val() == 1) { $("input[name='max_performance']").removeAttr("disabled"); $("input[name='max_performance_range']").removeAttr("disabled"); $("input[name='nominal_performance']").attr("disabled", true); $("input[name='nominal_performance_range']").attr("disabled", true); $("input[name='compresses']").attr("disabled", true); $("input[name='compresses_range']").attr("disabled", true); } else { $("input[name='max_performance']").attr("disabled", true); $("input[name='max_performance_range']").attr("disabled", true); $("input[name='nominal_performance']").removeAttr("disabled"); $("input[name='nominal_performance_range']").removeAttr("disabled"); $("input[name='compresses']").removeAttr("disabled"); $("input[name='compresses_range']").removeAttr("disabled"); } }); // wyswietlanie szczeglow zamowienia w archiwum $(".see_details").click(function(){ var id = $(this).attr('id').split('_')[1]; $(".details").hide(); $("#details_"+id).show(); return false; }); // wyszukiwarka z autouzupelnianiem $("#key").keyup(function(){ var key = $(this).val(); if (key.length > 2) { $.ajax({ type: "GET", url: "autocomplete.php", dataType: "xml", date: {key: $(this).val()}, success: function(xml) { var data = ''; $(xml).find('word').each(function() { data += $(this).text()+'###'; }); var table = data.split("###"); $("#key").autocomplete(table, { matchContains:true, max:500 }); } }); } }); }); });