function toggle(classname, ending, total) {
	altclassname = classname+'alt';
	toggleid = classname+'toggle';
	
	objs = document.getElementsByTagName('tr');
	for(i = 0; i < objs.length; ++i) {
		obj = objs[i];
		
		if(obj.className == classname) {
			obj.className = altclassname;
		}
		else if(obj.className == altclassname) {
			obj.className = classname;
		}
	}
	
	obj = document.getElementById(toggleid);	
	if(obj.className == '') {
		text = 'Show top 10 '+ending;
		obj.firstChild.data = text;
		obj.className = altclassname;
	}
	else {
		text = 'Show all '+total+' '+ending;
		obj.firstChild.data = text;
		obj.className = '';
	}
}
