/* #############################################################################
Extracted from direct/js/main.js and direct/js/topNav.js
############################################################################# */
var TESCODIRECT = {
	VERSION : "1.0.0",
	NAME : "TESCODIRECT",
	
	system : {},
	app : {},
	lib : {
		DOM : {}
	}
}

TESCODIRECT.lib.topNav = new function() {
	this.VERSION = "1.0.0";
	this.NAME = "TESCODIRECT.lib.topNav";

	this.init = function() {
		//if (startDebugging)
		//	startDebugging();
		if(window.attachEvent) {
			var o = document.getElementById("nav");
			if(o) {
				var oLi = o.getElementsByTagName("li");
				for (var i = 0; i < oLi.length; i++) {

					var ieUL = oLi[i].getElementsByTagName('ul')[0];
					if (ieUL)
					{	
						var ieMat = document.createElement('iframe');
						ieMat.src='images/trans.gif';
						ieMat.style.width=ieUL.offsetWidth+"px";
						ieMat.style.height=ieUL.offsetHeight+"px";	
						ieUL.insertBefore(ieMat,ieUL.firstChild);
						ieUL.style.zIndex="99";
					}		
				
					oLi[i].onmouseover = function()
					{													
						this.className += " sfhover";
					}
					
					oLi[i].onmouseout = function()
					{
						this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
		}
	}
}

