var x = 0;
function scrollDown(id)
{
	var el = document.getElementById(id);
	var max = (el.offsetHeight / 67) - 4;
	max = (max * 67) * -1;
	if (x > max)
	{
		x -= 67;
		el.style.top = x + 'px';
	}
}

function scrollUp(id)
{
	if (x < 0)
	{
		var el = document.getElementById(id);
		x += 67;
		el.style.top = x + 'px';
	}
}

function over(id)
{
	var over = document.getElementById('over_' + id);
	var out = document.getElementById('out_' + id);
	
	over.style.display = 'block';
	out.style.display = 'none';
}

function out(id)
{
	var over = document.getElementById('over_' + id);
	var out = document.getElementById('out_' + id);
	
	over.style.display = 'none';
	out.style.display = 'block';
}

function gotoUrl(selObj)
{
	if (selObj.options[selObj.selectedIndex].value != "")
		window.open(selObj.options[selObj.selectedIndex].value, '_self');
}

function onInit()
{
	var highlight = _GET("highlight");
	if (highlight)
	{
		x = document.getElementById("content");
		highlightText(highlight, "highlighted", x);
	}
}

function onLoadForm(widget)
{
	widget.addEventListener("beforeSubmit", function()
	{
		document.getElementById('form').style.display="none";
		document.getElementById('done').style.display="inline";
	});
}
