// JavaScript Document

function updatePostnummersLink(key) {
//-----------------------------------
	//alert($("#" + key).val());
	$("#" + key + "_href").attr("href", "/node/organisaties?q=node/organisaties/filter/" + key + "=" + $("#" + key).val());
	$("#" + key + "_refresh_href").attr("href", "/node/organisaties?q=node/organisaties/filter/" + key + "_refresh=" + $("#" + key).val());
}

function refreshGemeente(key) {
//-----------------------------
	var str = "";
	$('#gemeentelist :selected').each(function(i, selected){
       str += $(selected).val() + ",";
    });
	document.location="/node/organisaties/filter/postnummer_refresh=" + str;	
}

function refreshRegio(key) {
//-----------------------------
	var str = "";
	$('#regiolist :selected').each(function(i, selected){
       str += $(selected).val() + ",";
    });
	document.location="/node/organisaties/filter/postnummer_refresh=" + str;	
}

function refreshPostcode(key) {
//-----------------------------
	document.location="/node/organisaties/filter/postnummer_refresh=" + $("#" + key).val();	
}

if (Drupal.jsEnabled) {
  $(document).ready(function() {
		updatePostnummersLink("postnummer");
  });
}