function cleanupPath(path) {
	var idx = path.indexOf("?");
	if (idx < 0)
		return path;
	else
		return path.substring(0, idx);
}
function gbJumpTo(pos) {
	var newHref = document.location.protocol
		+ "//"
		+ document.location.host
		+ cleanupPath(document.location.pathname)
		+ "?jump=" + pos
		+ "&cc=" + Math.random();
	document.location.href = newHref;
}

function gbGetActualJumpPos() {
	var jumpp 	= "0";
	var name	= "jump";
	var query 	= document.location.search;

	if (query && name) {
		var staridx = -1;
		var endidx 	= -1;
		var namelen = name.length + 2;

		startidx = query.indexOf("?" + name + "=");
		if (startidx == -1)
			startidx = query.indexOf("&" + name + "=");

		if (startidx != -1) {
			endidx = query.indexOf("&", startidx + namelen);

			if (endidx != -1)
				jumpp = query.substring(startidx + namelen, endidx);
			else
				jumpp = query.substring(startidx + namelen);
		}
	}
	return jumpp;
}

