function aHover(aTag, style)
{
	aTag.className = style;
}

function aNormal(aTag)
{
	aTag.className = ''
}

// *********** Input Focus voor IE **********

window.onload = function(){ 
	var inputs = document.getElementsByTagName("input"), i = inputs.length; 
	while(i--)
	{
		inputs[i].onfocus = function(){ 
			this.className += " focus";
		}
		inputs[i].onblur = function(){
			this.className = this.className.replace("focus", "");
		}
	}
}

// *********** ZOEKEN ***********

var myTimeout;

function showSearch(id)
{
	clearTimeout(myTimeout);
	document.getElementById(id).style.display = "block";
}

function hideSearch(id)
{
    var txtzoek;

    if (document.getElementById("ctrlLayout_Iconen_txtZoek") != undefined) txtzoek = document.getElementById("ctrlLayout_Iconen_txtZoek")
    if (document.getElementById("Iconen_txtZoek") != undefined) txtzoek = document.getElementById("Iconen_txtZoek")

	if(txtzoek.value.length == 0)
	{
		myTimeout = setTimeout("document.getElementById('" + id + "').style.display = 'none'",1500);
	}
}


// *********** ROUTEBESCHRIJVING ***********

function showRoute(from)
{
	document.getElementById('std').style.display = "none";
	document.getElementById('noord').style.display = "none";
	document.getElementById('zuid').style.display = "none";
	if(from)
	{
		document.getElementById(from).style.display = "block";
	}
	else {
		document.getElementById('std').style.display = "block";
	}
}

// Popup window
function popupWindow( Name, width, height) {
	style = "height=" + height + ",width=" + width + ", top=" + ((screen.height/2)-(height/2)) + ", left=" + ((screen.width/2)-(width/2)) + ", status=yes, toolbar=no, menubar=no, location=no, scrollbars=yes, resizable=yes";
	open( Name, 'Popup', style );
}

function goTop() {
    return location.href = location.pathname + "#top";
}