var arrList = new Array();

function mv_filter(strFilter) {
// Filters a list to only display those elements with the CSS class matching strFilter
	var regFilter = new RegExp("(^|\\s)" + strFilter + "(\\s|$)");	// regular expression to match for the indicated CSS class, even in multiple classes have been attached to the object 
	var objCurrent;
	for(i=0; i<arrList.length; i++) {
		objCurrent = arrList[i];
		if(regFilter.test(objCurrent.className)){	// if this object has the indicated CSS class...
			objCurrent.style.display = "block";	// make it visible
		} else {
			objCurrent.style.display = "none";	// else make it hidden
		}			
	}
}


addLoadEvent(function() {
  // code to run on page load  

	// Populate array of pointers to the actual case studies
	arrList = getElementsByClassName("mv_link","li");

});