<?php
function buildFilterButton( $name, $value, $is_active, $order_column, $order_val, $page, $maxSymbols = 0, $forGroup = FALSE ) {
	$url = getCurPageURL();
	return (!$forGroup ? "<span class='btn-span-separator'>" : "" )."<a href='".buildURL(urlReplaceParam($url, $value, (!$is_active ? $value : NULL )), $order_column, $order_val, $page )."' class='btn-top btn-top-text ".( $is_active ? "btn-top-active" : "" )."' title='".$name."'><span>".($maxSymbols == 0 ? $name : (/* Task 63236 */ (mb_strlen($name) > $maxSymbols ? mb_substr($name, 0, $maxSymbols).".." : $name)))."</span></a>".(!$forGroup ? "</span>" : "" );
}

function buildURL( $url, $order_column, $order_val, $page ) {
	$url = urlReplaceParam($url,'order_column', $order_column);
	$url = urlReplaceParam($url,'order_val', $order_val);
	$url = urlReplaceParam($url,'page', $page);
	return  $url;
}
?>