function changePage(pageNum)
{
	var e = document.getElementById("postbackForm");
	if(e != null)
	{
		e.page.value = pageNum;
		e.submit();
	}
}

function zoekBack()
{
document.getElementById('zoek').style.color= '#423A75';
}
function questionBack()
{
document.getElementById('question').style.color= '#423A75';
}

function doSearch(keyword)
{
	var e = document.getElementById("searchform");
	if(e != null)
	{
		// grrrr reset() doesn't seem to work right
		try
		{
			e.elements["termfield"].value = "";
			e.elements["number"].value = "";
			e.elements["catsearch"].value = "-1";
			e.elements["color"].value = "";
		}
		catch(err)
		{
		}
	}

	var tf = document.getElementById("termfield");
	if(tf != null)
	{
		tf.value = keyword;
	}

	e.submit();
}

var scrollTimer;

function ScrollLeft()
{
	scrollTimer = setInterval("document.getElementById('imageline').scrollLeft -= 2", 10);
}

function stopScroll()
{
	clearInterval(scrollTimer);
}

function scrollRight()
{
	scrollTimer = setInterval("document.getElementById('imageline').scrollLeft += 2", 10);
}

function resizeTableCells()
{
	var elements = document.getElementsByTagName("table");
	
	for(var i=0; i<elements.length; i++)
	{
		var t = elements[i];

		if(t.className == 'img')
		{
			t.style.height = t.parentNode.clientHeight - 6;
		}
	}
}
