function rewritejobsearch(form){
	
	// Store the current title value
	var searchstring = form.var3.value;

	 //alert(searchstring); // debug

	// Clean up the title		
	var url = searchstring
		.toLowerCase() // change everything to lowercase
		.replace(/^\s+|\s+$/g, "") // trim leading and trailing spaces		
		.replace(/[_|\s]+/g, "-") // change all spaces and underscores to a hyphen
		.replace(/[^a-z0-9-]+/g, "") // remove all non-alphanumeric characters except the hyphen
		.replace(/[-]+/g, "-") // replace multiple instances of the hyphen with a single instance
		.replace(/^-+|-+$/g, "") // trim leading and trailing hyphens				
		; 
	
	//alert(url); // outputs 'this-is-a-title-with-a-symbol'

	
	window.location = '/employment/42/' + url;
}