function loadPage(page)
{
	document.location.href = page;
}

function hilite(obj)
{
	obj.style.backgroundColor = "#AB3847";
	obj.style.cursor = "hand";
}

function lite(obj)
{
	obj.style.backgroundColor = "";
}

function login()
{
	var msg = "";
	if (document.loginform.username.value == "")
	{
		msg += "U dient een naam op te geven.";
	}

	if (document.loginform.password.value == "")
	{
		msg += "\nU dient een wachtwoord op te geven.";
	}
	
	if (msg.length > 0)
	{
		alert(msg);
		return false;
	}
	else
	{
		document.loginform.submit();
	}
}

function search()
{
	if (document.searchform.keyword.value == "")
	{
		alert("U dient een zoekwoord op te geven.");
		return false;
	}
	else
	{
		document.searchform.submit();
	}
}

function showHide(id)
{
	var img		= document.getElementById('openCloseImg' + id);
	var details = document.getElementById('detailsRow' + id);
	if(details.style.display == 'none')
	{
		img.src = "/Images/but/but_round_arrow_1.gif";
		details.style.display = 'block';
	}
	else
	{
		img.src = "/Images/but/but_round_arrow_2.gif";
		details.style.display = 'none';
	}		
}	

function expand(obj)
{
	nextObj = obj.nextSibling;
	if (nextObj.style.display == 'block')
	{
		obj.style.backgroundColor = '#FFFFFF';
		obj.style.border = 'solid 1px white';
		nextObj.style.display = 'none';
		obj.children[0].src = obj.children[0].src.replace('_2', '_1');
	}
	else
	{
		obj.style.backgroundColor = '#F2F2F2';
		obj.style.borderBottom = 'solid 1px #F2F2F2';
		obj.style.borderTop = 'solid 1px #CCCCCC';
		obj.style.borderLeft = 'solid 1px #CCCCCC';
		obj.style.borderRight = 'solid 1px #CCCCCC';
		nextObj.style.display = 'block';
		obj.children[0].src = obj.children[0].src.replace('_1', '_2');
	}
}

function expand2(obj)
{
	nextObj = obj.nextSibling;
	if (nextObj.style.display == 'block')
	{
		nextObj.style.display = 'none';
		obj.children[0].src = obj.children[0].src.replace('_2', '_1');
	}
	else
	{
		nextObj.style.display = 'block';
		obj.children[0].src = obj.children[0].src.replace('_1', '_2');
	}
}