var js_divSlider__div = null;
var js_divSlider__id = "hided";
var js_divSlider__hiderId = "hider";
var js_divSlider__secondsDelay = 5;
var js_divSlider__lastStep = 0;

function js_divSlider__init(id) {
	js_divSlider__id = id;
	js_divSlider__div = document.getElementById(js_divSlider__id);
}

function js_divSlider__slide(step) {
 	width = $(js_divSlider__id).getWidth();
 	maxwidth = $(js_divSlider__hiderId).getWidth();
 	left = document.getElementById(js_divSlider__id).style.left;
 	var strLeft = left;
 	if (strLeft.length==0) strLeft = "0px";
 	left = parseInt(strLeft.substring(0,strLeft.length-2));
 	if (step>0) {
		if (left+step>0) step = -left;
		// if ((left+width)==maxwidth) step = -js_divSlider__lastStep;
	} else {
	 	if (left+step+width<maxwidth) step = maxwidth-left-width+3;
	}
 	scrollBy(js_divSlider__id,step);
 	js_divSlider__lastStep = step;
}