
function addLoadEvent(func){
	var oldonload = window.onload;
	
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
		


function toggle(DOMid){
	if (document.getElementById(DOMid) != null){
		dObj = document.getElementById(DOMid);
		if (dObj.style.display == 'none' || dObj.style.display == ''){
			dObj.style.display = 'block';
		}else{
			dObj.style.display = 'none';
		}
	}
}

function getNode(DOMid){
	return document.getElementById(DOMid);
}


function xmlParse(string){
	// code for IE
	if (window.ActiveXObject){
	  var doc=new ActiveXObject("Microsoft.XMLDOM");
	  doc.async="false";
	  doc.loadXML(string);
	
	// code for Mozilla, Firefox, Opera, etc.
	}else{
	  var parser=new DOMParser();
	  var doc=parser.parseFromString(string,"text/xml");
	}
	
	var x=doc; //.documentElement;
	return x;	
}


//IE6 menu handling.. : /
startList = function() {
if (document.all&&document.getElementById) {
	navRoot = document.getElementById("navList");
		for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

Event.onReady(startList);
