function getElementsByClassName(node, classname, tag)
{
	var a = [];
	if( node == null )
		node = document;
	if( tag == null )
		tag = "*";
	var re = new RegExp('\\b' + classname + '\\b');
	var els = node.getElementsByTagName(tag);
	for(var i=0,j=els.length; i<j; i++)
		if(re.test(els[i].className))a.push(els[i]);
	return a;
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function getStyle( el, styleProp )
{
	var x = $( el );
	if (x.currentStyle)
		var y = x.currentStyle[ styleProp ];
	else if (window.getComputedStyle)
		var y = document.defaultView.getComputedStyle( x,null ).getPropertyValue( styleProp );
	if( y == null || y == "" )
	{
		// kludge for opera's inability to compute border styles
		y = 0;
	}

	return y;
}
