function $(id)
{
	return document.getElementById(id);
}


var it;

function scroll_up()
{
	d = -10;
	it = setInterval(scroll_engine,50);
}

function scroll_down()
{
	d = 10;
	it = setInterval(scroll_engine,50);
}

function scroll_stop()
{
	clearInterval(it);
}

function scroll_engine()
{
	$('text').scrollTop += d;
}

function ie6(id)
{
	if(fixie)
	{
		if($('ul_'+id))
			$('ul_'+id).style.visibility = 'visible';
	}
}

function ie6bg(id)
{
	if(fixie)
	{
		$(id).style.background = '#e8e8e8 url(img/hover_bg.jpg) right no-repeat'
		$(id).getElementsByTagName('a')[0].style.color = "#0b58a0";
	}
}

function ie6bg_hide(id)
{
	if(fixie)
	{
		$(id).style.background = '';
		$(id).getElementsByTagName('a')[0].style.color = "white";
	}
}

function ie6_hide(id)
{
	if(fixie)
	{
		if($('ul_'+id))
			$('ul_'+id).style.visibility = 'hidden';
	}
}

window.onload = function()
{
	if($('text'))
	{
		if($('text').clientHeight > 350)
		{
			$('text').style.height = '350px';
			$('text').style.overflow = 'hidden';
			$('nav').style.display = 'block';
		}
	}
	//if(fixie)
	{
//		var items = document.getElementsByName('menuitem');
//		for(i=0; i<items.length; ++i)
		{
//			document.getElementById('menuitem1').attachEvent("onmouseover",ie6);
		}
	}
}
