if (typeof(WCH) == "undefined") WCH = null;
document.write('<style type="text/css" media="all">.menu ul {visibility:hidden; position:absolute;}</style>');
var ADxMenu = function() {
	var self = this;

	this.Init = function() {
		self.DomLoaded.load(Setup);};
	function Setup() {
		var aTmp2, i, j, oLI, aUL, aA;
		var aTmp = xGetElementsByClassName("adxm", document, "ul");
		for (i=0;i<aTmp.length;i++) {

			aTmp[i].className = aTmp[i].className.replace("adxie", "");

			aTmp2 = aTmp[i].getElementsByTagName("li");
			for (j=0;j<aTmp2.length;j++) {
				oLI = aTmp2[j];
				aUL = oLI.getElementsByTagName("ul");
				if (aUL && aUL.length) {
					oLI.UL = aUL[0];	
					aA = oLI.getElementsByTagName("a");
					if (aA && aA.length)
						oLI.A = aA[0];	
					oLI.onmouseenter = function() {
						this.className += " adxmhover";
						this.UL.className += " adxmhoverUL";
						if (this.A) this.A.className += " adxmhoverA";
						if (WCH) WCH.Apply( this.UL, this, true );};
					oLI.onmouseleave = function() {
						this.className = this.className.replace(/adxmhover/,"");
						this.UL.className = this.UL.className.replace(/adxmhoverUL/,"");
						if (this.A) this.A.className = this.A.className.replace(/adxmhoverA/,"");
						if (WCH) WCH.Discard( this.UL, this );
					};}}	}	};
	function xGetElementsByClassName(clsName, parentEle, tagName) {
		var elements = null;
		var found = new Array();
		var re = new RegExp('\\b'+clsName+'\\b');
		if (!parentEle) parentEle = document;
		if (!tagName) tagName = '*';
		if (parentEle.getElementsByTagName) {elements = parentEle.getElementsByTagName(tagName);}
		else if (document.all) {elements = document.all.tags(tagName);}
		if (elements) {
			for (var i = 0; i < elements.length; ++i) {
				if (elements[i].className.search(re) != -1) {
					found[found.length] = elements[i];}}}return found;}
	
	this.DomLoaded = {
		onload: [],
		loaded: function() {
			if (arguments.callee.done) return;
			arguments.callee.done = true;
			for (i = 0;i < DomLoaded.onload.length;i++) DomLoaded.onload[i]();},
		load: function(fireThis) {
			this.onload.push(fireThis);}};
	
	return this;
}();

ADxMenu.Init();


