menu_hiding_enabled = 0;
ie6 = 0;

$(document).ready(function(){
	if (ie6)
		setIE6();
	if (menu_hiding_enabled)
		hideMenu();
});

i = new Image();
i.src = '/images/menu-bottom-item-active.png';
i.src = '/images/menu-auto-active.gif';


function scrolling(obj, order, increase, delay, length) {
	if (!increase) increase = 1;
	if (!delay) delay = 1;
	
	var pos = (increase < 0) ? increase * -1 : increase;
	pos = Math.ceil(length / pos);
	var first = order ? obj.scrollLeft : obj.scrollTop;
	
	function doScroll() {
		if (length && pos-- <= 0) {
			clearInterval(obj.interval)
			return;
		}
		
		if (order)
			obj.scrollLeft += increase;
		else
			obj.scrollTop += increase;
		
		if ((order ? obj.scrollLeft : obj.scrollTop) !== first + increase) clearInterval(obj.interval)
			first = order ? obj.scrollLeft : obj.scrollTop;
	}
	
	if (obj.interval) clearInterval(obj.interval)
		obj.interval = setInterval(doScroll, delay);
}
