function filtersport(){
 
var sportselect = document.getElementById("ssport");
var sportindex = sportselect.selectedIndex;
var sportid = sportselect.options[sportindex].value;
window.location = "festivals-and-tournaments.aspx?childsports=" + sportid;
	
}

// DS 16/11/10 - Function added to correct pagination querystring while maintaining URL rewriting
function changeNextString(){
	var links = $('.pagination span a');
	for(i=0;i<=links.length-1;i++){
		var destination = $(links[i]).attr("href");
		if(destination.indexOf("childsports") > -1){
			var newDestination = destination.substring(0,destination.indexOf('?'));		
			var pagenumber = destination.substring(destination.indexOf('?'),destination.length);
			pagenumber = pagenumber.replace('?pagenumber=','');
			
			newDestination = newDestination + "/pagenumber/" + pagenumber.substring(0,1);
			newDestination = newDestination.replace("//","/");
			$(links[i]).attr("href",newDestination);
		}
	}
}		
