// Trim prototype voor string
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); };

function initSFMenu(intUseSubnav) 
{
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if(intUseSubnav == 1)
	{
		var sfEls2 	= document.getElementById("sub-nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls2.length; i++) {
			sfEls2[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls2[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}

	///////
	// Check of gezocht kan worden
	///////
	function CheckZoeken(strStandaard, strFout)
	{
		var objZoekTerm 			= document.getElementById('strZoekTrefwoord');
		
		if(objZoekTerm)
		{
			if(objZoekTerm.value.trim()=='' || objZoekTerm.value.trim()==strStandaard)
			{
				alert(strFout);
				objZoekTerm.value = '';
				return false;
			}
			
			objZoekTerm.value = objZoekTerm.value.trim();
			return true;
		}
	}
	
	function clearZoekscherm(obj) {
        if (obj.defaultValue == obj.value)
				{
					obj.value = ""
				}
	}
