function swapClass(){ 
 var i,x,tB,j=0,
 tA=new Array(),arg=swapClass.arguments;
 if(document.getElementsByTagName)
 	{for(i=4;i<arg.length;i++)
	{tB=document.getElementsByTagName(arg[i]);
  		for(x=0;x<tB.length;x++)
			{tA[j]=tB[x];j++;}
	}
	for(i=0;i<tA.length;i++)
	{
 		 if(tA[i].className)
		 	{if(tA[i].id==arg[1])
			{if(arg[0]==1)
				{tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
  			else{tA[i].className=arg[2];}
  	}
 else if(arg[0]==1 && arg[1]=='none')
  {if(tA[i].className==arg[2] || tA[i].className==arg[3]){
  tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
  }
  else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}
  
}


function writeStyles(a){ 
 var tS="<sty"+"le type=\"text/css\">";
 tS+="\n"+a+"\n<"+"/sty"+"le>";document.write(tS);
}
writeStyles('.closed ul{display:none;}.open ul{display:block;}.closed2 ul{display:none;}.open2 ul{display:block;}.closed3 ul {display:none;}.open3 ul {display:block;}');

function swapClassSimple(item, cls) {   
var n = document.getElementById(item);
if(n.className != 'noChildren'){
n.className = cls;}
n.style.fontWeight = 'bold';
}     

function setMENU(i,isFolder) {
	var idARRAY = i.split(",");
	for (loop = 0; loop < idARRAY.length; loop++) {
	classLVL = 'open' + loop;
	if (loop == idARRAY.length-1 && idARRAY.length != 1 && !isFolder) {
		classLVL = 'noChildren';
	}
	swapClassSimple('tree' + idARRAY[loop],classLVL);
	}
	}

//function setMENU(i) {
	//	var idARRAY = i.split(",");
	//	for (loop = 0; loop < idARRAY.length; loop++) {
		//	swapClass(1,''tree' + idARRAY[loop]','closed','open','li');
			
		//}
	//}
// function toggleState(node,a) {
		//if(ssel) resetAll(node);
		//if (a) {
		//	doToggle(node,'inline',a);
		//} else {
		//	doToggle(node);
		//}
	//}

//function setMENU(i) {
		//var idARRAY = i.split(",");
		//for (loop = 0; loop < idARRAY.length; loop++) {
			//toggleState('MNUtree' + idARRAY[loop],'true');
		//}
	//} 
function blurAnchors(){
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
//collect all anchors A
for(var i = 0; i < a.length; i++){
// mouse onfocus, blur anchors
a[i].onfocus = function(){this.blur();};
}
}
}