//swiped from http://www.dustindiaz.com/getelementsbyclass/
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;
}

//swiped from http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml
//returns the value of the given attribute
//beware that the returned values may take different forms for ie and firefox
function cascadedstyle(el, cssproperty, csspropertyNS){ //element, string, hyphenated-string
	if (el.currentStyle) 
	{//if IE5+
		return el.currentStyle[cssproperty];
	}
	else if (window.getComputedStyle)
	{ //if NS6+
		var elstyle=window.getComputedStyle(el, "");
		return elstyle.getPropertyValue(csspropertyNS);
	}
}

//Swiped from http://www.w3schools.com/dom/loadxmldoc.asp
function loadXML(filePath)
{
	var xmlDoc;
	// code for IE
	if (window.ActiveXObject)
	{
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	}
	// code for Mozilla, Firefox, Opera, etc.
	else if (document.implementation && document.implementation.createDocument)
	{
		xmlDoc=document.implementation.createDocument("","",null);
		alert(xmlDoc);
	}
	else
	{
		alert('Your browser cannot handle this script');
	}
	xmlDoc.async=false;
	xmlDoc.load(filePath);
	return(xmlDoc);
}