function countryChange(url) {
	var country = document.getElementById('selectCountry');
	if (country) {
		// remove the existing "scid" parameter, if exists
		var parameter = 'scid';
		var urlparts= url.split('?');   // prefer to use l.search if you have a location/link object
		if (urlparts.length>=2) {		
			var prefix= encodeURIComponent(parameter)+'=';
			var pars= urlparts[1].split(/[&;]/g);
			for (var i= pars.length; i--; i>0)               // reverse iteration as may be destructive
				if (pars[i].lastIndexOf(prefix, 0)!==-1)   // idiom for string.startsWith
					pars.splice(i, 1);
			url= urlparts[0]+(pars.length > 0 ? '?'+pars.join('&') : '');
		}
		location.href = url + (url.indexOf('?') != -1 ? '&' : '?') + 'scid=' + country.value;
	}
}
