﻿// Standaard-tekst in input verbergen (onFocus)
function textFieldFocus(object, defaultValue) {
  if (object.id == 'ctl00_cphFormulier_c_password') { document.getElementById("hiddenpassword").style.display = "none"; }
  else {
    if (object.value == defaultValue) { object.value = ""; }
    object.className = "active";
  }
}

// Standaard-tekst in input tonen (onBlur)
function textFieldBlur(object, defaultValue) {
  if (object.id == 'ctl00_cphFormulier_c_password') { if (object.value == "") { document.getElementById("hiddenpassword").style.display = "block"; } }
  else {
    if (object.value == "") {
      object.value = defaultValue;
      object.className = "";
    }
  }
}

function zoek(){
  var inpZoek = document.getElementById('zoekstring');
  var strZoek = inpZoek.value;
    strZoek = escape(strZoek);
    strZoek = strZoek.replace(/ /g,'+').replace(/\%20/g,'+');
    document.location.href = '/pages/zoeken.aspx?z='+strZoek;
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
	  if(sfEls[i].className != "tussen")
	  {
		  sfEls[i].onmouseover=function() {
			  this.className+=" sfhover";
		  }
		  sfEls[i].onmouseout=function() {
			  this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		  }
	  }
	}
	try
	{
	  var sfEls = document.getElementById("submenu").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"), "");
		  }
	  }
	}catch(e){}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
