// If there are query parameters in the URL other than orgid, move
// them to hash portion of url. This requires redirect.
var query = location.search;
if (query) {
	queryTokens = query.substring(1).split('&');
	var hashTokens = [];
	for ( var i = 0; i < queryTokens.length; i++) {
		if (queryTokens[i].substring(0, 6) != "orgid=" && queryTokens[i].substring(0, 12) != "gwt.codesvr=") {
			hashTokens.push(queryTokens[i]);
			queryTokens.splice(i, 1);
			i--;
		}
	}
	if (hashTokens.length > 0) {
		var url = location.href;
		url = url.substring(0, url.indexOf('?'));
		if (queryTokens.length > 0)
			url += '?' + queryTokens.join('&');
		url += '#' + hashTokens.join('&');
		location.replace(url);
	}
}