var over_div=0;

function loadLine()
{
    //определяем ширину окна
    if (self.innerWidth)
        f_width = self.innerWidth;
    else if (document.documentElement && document.documentElement.clientWidth)
        f_width = document.documentElement.clientWidth;
    else if (document.body)
        f_width = document.body.clientWidth;

    bottom_width = f_width - 2*66 - 10;
    document.getElementById('scroll_div').style.width = bottom_width;

}

function i_over(n)
{
	document.getElementById('i'+n).src = menu_items_over[n].src;
}

function i_out(n)
{
	document.getElementById('i'+n).src = menu_items[n].src;
}

var dtimer;

function img_over(n)
{
	document.getElementById('odiv0').style.display = 'none';
	document.getElementById('odiv1').style.display = 'none';
	document.getElementById('odiv2').style.display = 'none';
	document.getElementById('odiv3').style.display = 'none';
	document.getElementById('odiv4').style.display = 'none';
	ndiv = 'odiv'+n;
	document.getElementById(ndiv).style.display = 'block';
}

function img_out(n)
{
	nn = n;
	dtimer = setTimeout('div_hide(nn)',0.0001);
}

function div_hide(n)
{
	if(!over_div)
	{
		ndiv = 'odiv'+n;
		document.getElementById(ndiv).style.display = 'none';
	}
}

var ds = 0;
var timer;

function start_scroll(ds)
{
    document.getElementById('scroll_div').scrollLeft += ds;
	dds = ds;
	timer = setTimeout('start_scroll(dds)',8);
}

function stop_scroll()
{
	clearTimeout(timer);
}

function closePreloader(){
	return;
	document.getElementById("cont").style.display = "block";
	document.getElementById("preloader").style.display = "none";
}
