/* dropnav.js version 1.12*/
/***************************************************
This file should not need modification.
****************************************************/


var myrules = {
	'#topNav li' : function(el){	
		el.onmouseover = function(){
		  if(this.getElementsByTagName("UL").item(0)) {
				this.getElementsByTagName("UL").item(0).className += " IEshow";

				if(!this.getElementsByTagName("A").item(0).className.match(/currentPage/)){
					this.getElementsByTagName("A").item(0).style.borderBottom = "6px solid #000000";
				}
			}
		},
		el.onmouseout = function(){			
			if(this.getElementsByTagName("UL").item(0)) {
				this.getElementsByTagName("UL").item(0).className = "";				
				
				if(!this.getElementsByTagName("A").item(0).className.match(/currentPage/)){
					this.getElementsByTagName("A").item(0).style.borderBottom = "6px solid #ffffff";
				}
			}
		}
	},	
	'#topNav li a' : function(el){
		var root = document.getElementById("topNav");
		var ulList = root.getElementsByTagName("UL");
		el.onfocus = function(){			
			if(this.parentNode.parentNode.id == "topNav") {
				for(var i = 0; i < ulList.length; i++) {		
					ulList.item(i).className = "";
				}
			}

			if(this.parentNode.getElementsByTagName("UL").item(0)) {
				this.parentNode.getElementsByTagName("UL").item(0).className = "show";
			}
		},
		el.onblur = function(){	
			var parentUlLinks = this.parentNode.parentNode.getElementsByTagName("A");
			
			if(parentUlLinks.item(parentUlLinks.length -1).href == this.href ) {		
				for(var i = 0; i < ulList.length; i++) {		
					ulList.item(i).className = "";
				}
			}
		}
	}

};

Behaviour.register(myrules);



