function backToAnc(objid) {
	var tgx = dx = 0;
	var tgy = dy = 0;
	var wx1 = wx2 = wx3 = 0;
	var wy1 = wy2 = wy3 = 0;

	if((document.getElementById) && (!document.all)){ // DOM
		tgx = document.getElementById(objid).offsetLeft;
		tgy = document.getElementById(objid).offsetTop;
		dx = document.getElementById('wrapper').offsetWidth;
		dy = document.getElementById('wrapper').offsetHeight;
	} else if (document.all) {	// not DOM
		tgx = document.all(objid).offsetLeft;
		tgy = document.all(objid).offsetTop;
		dx = document.all('wrapper').offsetWidth;
		dy = document.all('wrapper').offsetHeight;
	}

	if (document.documentElement) {
		wx1 = document.documentElement.clientWidth || 0;
		wy1 = document.documentElement.clientHeight || 0;
	}
	if (document.body && (!document.getElementById)) {
		wx2 = document.body.clientWidth || 0;
		wy2 = document.body.clientHeight || 0;
	}
	wx3 = window.innerWidth || 0;
	wy3 = window.innerHeight || 0;
	var wx = Math.max(wx1, Math.max(wx2, wx3));
	var wy = Math.max(wy1, Math.max(wy2, wy3));

	var mx = dx - wx;
	var my = dy - wy;

	tgx = Math.min(tgx, mx);
	tgy = Math.min(tgy, my);

	slowScroll(tgx, tgy);
}

function slowScroll(tgx, tgy) {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));

	var fx = Math.floor((tgx - x) / 2);
	var fy = Math.floor((tgy - y) / 2);

	window.scrollTo(x + fx, y + fy);

	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var ax = Math.max(x1, Math.max(x2, x3));
	var ay = Math.max(y1, Math.max(y2, y3));

	if (x != ax || y != ay) {
		window.setTimeout("slowScroll("+tgx+", "+tgy+")", 25);
	}
}