var d = document

if(d.layers) {
	alert("Netscape 4? You need to upgrade your browser.");
	}
else if(d.all) {
	var isIE = 1;
	var isNav = 0, isNS6 = 0;
	}
else if (d.getElementByID) {
	var isNS6 = 1;
	var isNav = 0, isIE = 0;
	}

function shiftTo(obj, x, y) {
	if(isIE) {
		theObj = eval("d.all."+obj+".style");
		theObj.pixelLeft = x;
		theObj.pixelTop = y;
		}
	else {
		theObj = eval("d.getElementById('"+obj+"')");
		theObj.style.top = y;
		theObj.style.left = x;
		}
	}


var speed,smaj,dist,mainxpos = 0,mainypos = 0, curdist;

function startscroll(target) {
	if(target < mainxpos) {
		speed = -5;
		dist = mainxpos - target;
		}
	else {
		speed = 5;
		dist = target - mainxpos;
		}
	if(smaj) {clearTimeout(smaj);}
	if(Math.abs(dist) < 1) {
		return;
		}
	else {
		smaj = setTimeout('scrollcycle('+target+')','25');
		}
	}

function scrollcycle(target) {
	if(target < mainxpos) {
		curdist = mainxpos - target;
		speed = -(curdist/10)-0.5;
		}
	else {
		curdist = target - mainxpos;
		speed = (curdist/10)+0.5;
		}
	mainxpos += speed;
	mainxpos = mainxpos;
	shiftTo('answers',0,-mainxpos);
	if(Math.abs(curdist) > 1) {
		smaj = setTimeout('scrollcycle('+target+')',25);
		}
	else {
		if(smaj) {clearTimeout(smaj);}
		}
	}
