function spy(str) {
	var e, f=document;
	if (!(e=f.getElementById('dss_spy'))) {
		e=f.createElement('div');
		e.id='dss_spy';
		e.style.position='fixed';
		e.style.top='0px';;
		e.style.right='0px';
		e.style.left='0px';
		e.style.height='5em';
		e.style.overflow='scroll';
		e.style.border='1px dotted black';
		e.style.backgroundColor='white';
		e.style.padding='2em';
		e.style.zIndex='100';
		f.getElementsByTagName('body')[0].appendChild(e);
	}
	if (e.childNodes.length>160) {
		e.removeChild(e.firstChild);
		e.removeChild(e.firstChild);
	}
	e.appendChild(f.createTextNode(str));
	e.appendChild(f.createElement('br'));
}

scrollTimer=null;
function scrollobj(objname,scrollspeed) {
	this.name=objname;
	this.scrollspeed=scrollspeed;
	this.x=0;
	this.y=0;
}
scrollobj.prototype.init = function(area,height) {
	this.area=document.getElementById(area);
	if (this.area.firstChild.nodeName!='#text') {
		this.h=this.area.firstChild.offsetHeight;
	}
	else
		this.h=this.area.childNodes[1].offsetHeight;
	this.a_h=this.h-height;
}
scrollobj.prototype.up = function() {
	if (scrollTimer)
		clearTimeout(scrollTimer);
	if (Math.abs(this.y)<this.a_h) {
		this.scroll(this.scrollspeed * -1);
		scrollTimer=setTimeout(this.name+'.up()',40);
	}
};
scrollobj.prototype.down = function() {
	if (scrollTimer)
		clearTimeout(scrollTimer);
	if (this.y<0) {
		this.scroll(this.scrollspeed);
		scrollTimer=setTimeout(this.name+'.down()',40);
	}
};
scrollobj.prototype.stop = function() {
	if (scrollTimer)
		clearTimeout(scrollTimer);
};
scrollobj.prototype.scroll = function(val) {
	var pos=this.y+val;
	this.y=pos;
	if (this.area.style)
		this.area.style.top=(pos)+'px';
	else
		this.area.y=pos;
};