slider_down = [];
var slider_template = [];
var slider_value = [];

function position_slider(no, client_x) {
	const lb = slider_lb[no];
	const ub = slider_ub[no];
	const min_x = slider_min_x[no];
	const max_x = slider_max_x[no];
	
	var x = (client_x - slider_margin_left) / (slider_w - slider_margin_right - slider_margin_left);
	x = min_x + x * (max_x - min_x);
	x = Math.max(x, min_x);
	x = Math.min(x, max_x);
	if(Math.abs(x - lb) < Math.abs(x - ub))
		slider_lb[no] = x;
	else
		slider_ub[no] = x;
}

functio