function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function ShowHideObj(obj,showhide) {
	if (document.all) { 
		if (showhide=='show') {
			obj.style.visibility='visible';
		} else {
			obj.style.visibility='hidden' ;
		}
	} else {
		obj.visibility=showhide ;
	}
}

var objBox
var contentHeight
var parentHeight
var objDownButton
var objUpButton
var inited = false

function scroll(scrolldir,amount) {

	if (!inited) {
		objBox=MM_findObj('classinfo');
		if (objBox) {
			parentHeight= (IE4) ? objBox.offsetParent.offsetHeight : objBox.parentLayer.clip.height ;
			contentHeight= (IE4) ? objBox.scrollHeight : objBox.document.height ;
			objDownButton = MM_findObj('downbutton')
			objUpButton = MM_findObj('upbutton')
			inited = true
		}
	}	


if (inited) {

	var returnvalue=!(amount=='page') // return true unless amount=page, so it should continue the loop
	scrollamount= (amount=='page') ? parentHeight * .9 : 7 ;


	if (IE4) {
		maxdown = contentHeight + objBox.style.pixelTop - parentHeight;
		maxup = 0 - objBox.style.pixelTop;
//alert(objBox.scrollHeight)

	} 
	if (NS4) {
		maxdown = contentHeight + objBox.top - parentHeight;
		maxup =	0 - objBox.top;
	}

	scrollamount = (scrolldir=='down' ? Math.min(scrollamount,maxdown) : Math.min(scrollamount,maxup))
	if (scrolldir=='down') { scrollamount=0-scrollamount}

	if (IE4) { objBox.style.pixelTop += scrollamount;
	} else {
	if (NS4) { objBox.top += scrollamount;}
	}

	maxdown+=scrollamount
	maxup-=scrollamount

	ShowHideObj(objDownButton,(maxdown>0) ? 'show':'hide') 
	ShowHideObj(objUpButton,(maxup>0) ? 'show':'hide') 

	if (scrolldir=='down' && maxdown<=0 || scrolldir=='up' && maxup <=0) {
		returnvalue=false;
	}
} else { 	// if not inited
	returnvalue = false 
}
	return returnvalue
}

