/**
 * Javascript file for Henri (www.henri.nl)
 */
 
function autoClear(textfield, clearValue){
	// add handler for focus: clear if value equals the default value
	$(textfield).focus(function(){
						if($(this).val() == clearValue){
							$(this).val("");	// leeg maken
						}
					});
	// add handler for blur: set to default value if empty
	$(textfield).blur(function(){
						if($(this).val() == ""){
							$(this).val(clearValue);	// leeg maken
						}
					});
}

function autoSubmit(field, theForm){
	$(field).change(function(){
		$(theForm).submit();
	});
}

function submitFilter(clearValue){
	
	if($('#tf_trefwoord').val() == clearValue){
		$('#tf_trefwoord').val("");	// leeg maken
	}
	
	return true;
}