function filter(filterString, elementName)
{
    var rows = document.getElementsByName(elementName);
    var i=0;
    for (i=0;i<rows.length; i++)
    {
        var parent = rows[i].parentNode;        
        if (filterString.length == 0)
            parent.style.display = 'table-cell';
        else
        {
            if (rows[i].innerHTML.indexOf(filterString) == -1)
                parent.style.display = 'none';
            else
                parent.style.display = 'table-cell';
        }
    }
}

//Finds y value of given object
function findPos(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		do {
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	return [curtop];
	}
}

function animateScrollTo(element)
{
    element.scrollIntoView(false);
}
