var step = 1;
var time = null;
var inter = 6;
var clipbot = 0;
var ie_clipTop = 0;
var ie_clipBottom = 106;
var ie_clipRight = 190;
var ns_clipBottom = 106;
var startPos = 330;
ie_top = new Array(2);
ie_bottom = new Array(2);
layheight = new Array(2);
function down(layname) {
	if (layname)
		layhelp = layname;
	if (document.layers) {
		if ( document.layers[layhelp].top > (startPos - layheight[layhelp] + ns_clipBottom) ) {
			document.layers[layhelp].top -= step;
			document.layers[layhelp].clip.top += step;
			document.layers[layhelp].clip.bottom += step;
			
			if (document.layers[layhelp].top > clipbot)
				time= setTimeout("down('"+layhelp+"')", inter);
		}
	} else if (document.all) {
		if ( document.all(layhelp).style.posTop > (startPos - layheight[layhelp] + ie_clipBottom) ) {
			
			document.all(layhelp).style.posTop -= step;
			ie_top[layhelp] += step;
			ie_bottom[layhelp] += step;
			
			document.all(layhelp).style.clip = 'rect(' + ie_top[layhelp]  + ' ' + ie_clipRight + ' ' + ie_bottom[layhelp] + ' 0)';
			if (document.all(layhelp).style.posTop > (startPos - layheight[layhelp]))
				time= setTimeout("down('"+layhelp+"')", inter);
		}
	} else {
		if ( document.getElementById(layhelp).style.top > (startPos - layheight[layhelp] + ie_clipBottom) ) {
			
			alert("Hier");
			document.getElementById(layhelp).style.top -= step;
			ie_top[layhelp] += step;
			ie_bottom[layhelp] += step;
			
			document.getElementById(layhelp).style.clip = 'rect(' + ie_top[layhelp]  + ' ' + ie_clipRight + ' ' + ie_bottom[layhelp] + ' 0)';
			if (document.getElementById(layhelp).style.top > (startPos - layheight[layhelp]))
				time= setTimeout("down('"+layhelp+"')", inter);
		}
	}
}

function up(layname) {
	if (layname)
		layhelp = layname;
		
	if (document.layers) {
		if ( document.layers[layhelp].top < startPos) {
			document.layers[layhelp].top += step;
			document.layers[layhelp].clip.top -= step;
			document.layers[layhelp].clip.bottom -= step;
			if (document.layers[layhelp].top < startPos)
				time= setTimeout("up('"+layhelp+"')", inter);
		}
	} else if (document.all)  {
		if ( document.all(layhelp).style.posTop < startPos ) {
			document.all(layhelp).style.posTop += step;
			ie_top[layhelp] -= step;
			ie_bottom[layhelp] -= step;
			
			document.all(layhelp).style.clip = 'rect(' + ie_top[layhelp]  + ' ' + ie_clipRight + ' ' + ie_bottom[layhelp] + ' 0)';
			if ((document.all(layhelp).style.posTop ) < startPos)
				time= setTimeout("up('"+layhelp+"')", inter);
		}
	} else {
		if ( document.getElementById(layhelp).style.posTop < startPos ) {
			document.getElementById(layhelp).style.posTop += step;
			ie_top[layhelp] -= step;
			ie_bottom[layhelp] -= step;
			
			document.getElementById(layhelp).style.clip = 'rect(' + ie_top[layhelp]  + ' ' + ie_clipRight + ' ' + ie_bottom[layhelp] + ' 0)';
			if ((document.getElementById(layhelp).style.posTop ) < startPos)
				time= setTimeout("up('"+layhelp+"')", inter);
		}
	}
}

function stop() {
	clearTimeout(time);
}

function setClipping(layname, clipBottom, scroll) {
	clipbot = clipBottom;
	ie_top[layname] = ie_clipTop;
	ie_bottom[layname] = ie_clipBottom;
	if (document.layers) {
		document.layers[layname].top = startPos;
		layheight[layname] = document.layers[layname].document.height;
		document.layers[layname].clip.left = 0;
		document.layers[layname].clip.right = 190;
		document.layers[layname].clip.bottom = ns_clipBottom;
		document.layers[layname].visibility = "show";
		document.layers[layname].visibility = "visible";
	} else if (document.all) {
		layheight[layname] = document.all(layname).scrollHeight;
		document.all(layname).style.posTop=startPos;
		document.all(layname).style.clip = 'rect(' + ie_clipTop  + ' ' + ie_clipRight + ' ' + ie_clipBottom + ' 0)';
		document.all(layname).style.visibility = "visible";
	} else {
		layheight[layname] = document.getElementById(layname).scrollHeight;
		document.getElementById(layname).style.top=startPos;
		document.getElementById(layname).style.clip = 'rect(' + ie_clipTop  + ' ' + ie_clipRight + ' ' + ie_clipBottom + ' 0)';
		document.getElementById(layname).style.visibility = "visible";
	}	
}