function doSearch(f,cur_ch){
  if(cur_ch == $("#search_cat").attr('value')){
    //отправляем с фильтрами
    pcf = getFilters();
    if($("#search_pcf2").length){
      $("#search_pcf2").attr('value',pcf);
    }else{
      $("#search_pcf").attr('value',pcf);
    }
    if($("#search_pr_min2").length){
      $("#search_pr_min2").attr('value',trackbar.getObject('price_filter').leftValue);
    }else{
      $("#search_pr_min").attr('value',trackbar.getObject('price_filter').leftValue);
    }
    if($("#search_pr_max2").length){
      $("#search_pr_max2").attr('value',trackbar.getObject('price_filter').rightValue);
    }else{
      $("#search_pr_max").attr('value',trackbar.getObject('price_filter').rightValue);
    }
    f.submit();
  }else{
    //отправляем как есть
    f.submit();
  }
}

function in_basket(id){
   self.parent.location = "/cgi-bin/basket.cgi?do=add-to-basket&id="+id;
   return true;
}

function in_descr(url){
   self.parent.location = url;
   return true;
}

function change_big_pic(url,curtd, w, h){
  $("td").each(function (i) {
    if ($(this).attr("id").indexOf('sm_pic_td_') >-1){
      $(this).css('border-color', 'e5e5e5');
    }
  });
  $("#sm_pic_td_"+curtd).css('border-color', '#7dccfb');
  $("#big_pic").animate({'opacity': '0'},'fast', function(){
    $("#big_pic").animate({'width': w+'px', 'height':h+'px'},'slow', function (){
      $("#big_pic").html("<img src=\""+url+"\">");
      $("#big_pic").animate({'opacity': '1'});
    });
  });
  
  
}

function show_full_name(id){
	dots_span = document.getElementById('dots_span_'+id);
	full_name_span = document.getElementById('full_name_span_'+id);
  a_href = document.getElementById('show_full_'+id);
	if(full_name_span && dots_span){
		if(full_name_span.style.display == 'none'){
			full_name_span.style.display = 'inline';
			dots_span.style.display = 'none';
      a_href.innerHTML='скрыть';
		}else{
			full_name_span.style.display = 'none';
			dots_span.style.display = 'inline';
      a_href.innerHTML='подробнее';
		}
	}
}
