	
/** IE script for nav **/
// ** Special thanks to Nick Rigby & A List Apart
// http://www.alistapart.com/articles/horizdropdowns/

// this script runs only for windows ie

// second - changed to make script work on all submenus

startList = function() {
	if (document.all&&document.getElementById) {
		//alert("startList");
		navRoot = document.getElementById("mNav");
		setChildNodes(navRoot);
	}
}

function hideIFrameHack (obj) {
 }

function setChildNodes(element) {
		//alert(element.childNodes.length);
		var x = 0;
		for (var i=0; i<element.childNodes.length; i++) {
			node = element.childNodes[i];
			if (node.nodeName=="LI") {
				x++;
				node.id = "li"+x;
				node.className += " standard";
				node.onmouseover=function() {
					this.className=this.className.replace(" standard", " hover");
					var obj = this; 
					if (obj.hasChildNodes()) {
						// look for a UL
						for (var n=0; n<obj.childNodes.length; n++) {
							nodeB = obj.childNodes[n];
							if (nodeB.nodeName=="UL") {
								var body = document.getElementsByTagName("body")[0];
								//Hack to add an iframe under the menu which should hide the selects:
								var iframeShim = document.getElementById(this.id+"_hvrShm");
								if (iframeShim != null) {
								   iframeShim.style.visibility = 'visible';
								} else {
								   nodeB.insertAdjacentHTML("afterEnd",
								          '<IFRAME style="position:absolute;z-index:4; background:none"'+
								          ' src="javascript:false;" frameBorder="0" scrolling="no"' +
								          ' id="'+this.id+'_hvrShm" />');
								   //alert(nodeB.clientLeft+'px');
								   var iframeShim = document.getElementById(this.id+"_hvrShm");
								       iframeShim.style.top = "19px";//nodeB.style.top;
								       iframeShim.style.left = "-5px";//nodeB.style.left;
								       iframeShim.style.width = "172px";//nodeB.style.width;
								       //iframeShim.style.height = "600px";//nodeB.offsetHeight;
								       iframeShim.style.height = nodeB.clientHeight+'px';
								}
							}
						}
					}

				}
				node.onmouseout=function() {
					this.className=this.className.replace(" hover", " standard");
					//find and remove the iframe:
					//alert('b : '+this.id);
					 var iframeShim = document.getElementById(this.id+"_hvrShm");
					 //alert('c : '+iframeShim);
					 if (iframeShim != null) {
					   iframeShim.style.visibility = 'hidden';
					 }

				}
				if (node.hasChildNodes()) {
					// look for a UL
					for (var n=0; n<node.childNodes.length; n++) {
						nodeB = node.childNodes[n];
						if (nodeB.nodeName=="UL") {
							// recursive script
							//setChildNodes(nodeB);
						}
					}
				}
			}
		}
		//alert("element "+element.id+" has "+x+" LI tags");
	return;
}
window.onload=startList;