function switchInput () {
	var pwt = document.getElementById('password_tmp');
	var pw = document.getElementById('password');

	if (this == pwt) {
		this.style.display = 'none';
		pw.style.display = 'inline';
		pw.focus();
	}
	if (this == pw) {
		if (this.value == '') {
			this.style.display = 'none';
			pwt.style.display = 'inline';
		}
	}
}
function clearInput () { if (this.value == this.defaultValue) { this.value = ''; } }
function restoreInput () { if (this.value == '') { this.value = this.defaultValue; } }


window.onload = init;

function init() {
	if (document.getElementById('login')) {
		// Init handlers voor add/remove van tekst in inputvelden
		document.getElementById('login').onfocus = clearInput;
		document.getElementById('login').onblur = restoreInput;
		document.getElementById('password_tmp').onfocus = switchInput;
		document.getElementById('password').onblur = switchInput;
	}
    if (document.getElementById('zoekterm')) {
    	document.getElementById('zoekterm').onfocus = clearInput;
		document.getElementById('zoekterm').onblur = restoreInput;
    }
}
