<!--

var lyrheight = 0;
var heightshowsb = 300;
var time,amount,theTime,theHeight,DHTML;

function getObj(name) {
	if (document.getElementById) {
		return document.getElementById(name)
		} 
	else if (document.all) {
		return document.all[name]
		}
	else if (document.layers) {
		return document.layers[name];
		}
	}

function showLayer(layer) {
	var layertoshow = new getObj(layer)
	if (document.layers) {
		vista = 'show';
		layertoshow.visibility = vista;
		}
	else if (document.all || document.getElementById) {
		vista = 'visible';
		layertoshow.style.visibility = vista;
		}
	}

function prepareLayer(layername,clipt,clipw,clipb,top,sbar) {
	layerToShow = sbar;
	clipTop = clipt;
	clipWidth = clipw;
	clipBottom = clipb;
	topper = top;
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var x = new getObj(layername);
	if (document.layers)
	{
		lyrheight = x.clip.bottom;
		lyrheight += 20;
		x.clip.top = clipTop;
		x.clip.left = 0;
		x.clip.right = clipWidth;
		x.clip.bottom = clipBottom;
	}
	else if (document.getElementById || document.all)
	{
		lyrheight = x.offsetHeight;
		x.style.clip = 'rect('+clipTop+' '+clipWidth+' '+clipBottom+' 0)'
	}
	if (lyrheight > heightshowsb) {
		showLayer(layerToShow)
		} else {
			return;
			}
}

function scrollLayer(layername,amt,tim) {
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	realscroll();
}

function realscroll() {
	if (!DHTML) return;
	clipTop += amount;
	clipBottom += amount;
	topper -= amount;
	if (clipTop < 0 || clipBottom > lyrheight)
	{
		clipTop -= amount;
		clipBottom -= amount;
		topper += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+clipTop+' '+clipWidth+' '+clipBottom+' 0)'
		thelayer.style.clip = clipstring;
		thelayer.style.top = topper;
	}
	else if (document.layers)
	{
		thelayer.clip.top = clipTop;
		thelayer.clip.bottom = clipBottom;
		thelayer.top = topper;
	}
	time = setTimeout('realscroll()',theTime);
}

function stopScroll()
{
	if (time) clearTimeout(time);
}
// -->
