/*
Purpose:	Metalunderground.com specific functions (not so generic)

Notes:		This code should be referenced in the template <head>

Modification Log:
Date			Author				Description
----			------				-----------
06/2005			Doug Gibson			created
*/


// Toggles the class/display properties of a group of arbitrary-classed items and saves their original class for reversion
function revealMsgOrigin(sClassName,newClassName){
	var DOMtree=document.getElementsByTagName("*");
	var DOMnodes=new Array();
	var i,j;
	// LOOP OVER THE DOM AND OVER EACH ITEM'S CLASSES
	for(i=0,j=0; i<DOMtree.length; i++){
		var c=" "+DOMtree[i].className+" ";
		// REMOVE THE NEW CLASS FROM ANY ALREADY-MARKED ITEMS
		if(c.indexOf(" "+newClassName+" ")!=-1){
			DOMtree[i].className=DOMtree[i].className.replace(newClassName,'');
		}
		if(c.indexOf(" "+sClassName+" ")!=-1){
			DOMtree[i].className+=' '+newClassName;
		}
	}
	return false;
}
