function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function page(month, direction) {
	for (i = 0; i < divs.length; i++)
		document.getElementById(divs[i]).style.display = 'none';
	if (direction > 0)
		(divs[currentMonthIndex + 1] == null) ? currentMonthIndex = 0 : currentMonthIndex++;
	else if (direction < 0)
		(divs[currentMonthIndex - 1] == null) ? currentMonthIndex = (divs.length - 1) : currentMonthIndex--;
	document.getElementById(divs[currentMonthIndex]).style.display = 'block';
}
