// JavaScript Document KCT

	function Browser(){
	  this.uA = navigator.userAgent.toLowerCase();
	  this.aN = navigator.appName.toLowerCase();
	  this.iE = this.aN.indexOf('microsoft') != -1 ? 1 : 0;
	  this.mac =  this.uA.indexOf('mac') != -1 ? 1 : 0;
	  this.win = this.uA.indexOf('windows') != -1 ? 1 : 0;
	  this.safari =  this.uA.indexOf('webkit') != -1 ? 1 : 0;
	  this.opera =  this.uA.indexOf('opera') != -1 ? 1 : 0;    
	  this.mozilla = this.aN.indexOf('netscape') != -1 && !this.safari ? 1 : 0;
	  this.winMozilla = this.mozilla && this.win ? 1 : 0;
	  this.winIE = this.iE && this.win && !this.opera ? 1 : 0;
	  this.winIE6Down = this.winIE && parseInt(this.uA.split('msie ')[1].substring(0,1)) <= 6 ? 1: 0;
	  this.macIE = this.iE && this.mac ? 1 : 0;
	};


	var browser = new Browser();

	function setMenu(){
		//alert('hoit');
		setMenuButton('nav1');
		setMenuButton('nav2');
		setMenuButton('nav3');
	}
	function setMenuButton(button){
		theElement = document.getElementById(button);
		if(theElement){
			//alert(theElement);
			if(browser.WinIE6Down || browser.WinIE || browser.MacIE ){
				theElement.attachEvent ('onmouseover', toggleOn(button));
				theElement.attachEvent ('onmouseout', toggleOff(button));
			}else{
				theElement.onmouseover =  function(){ toggleOn(button); };
				theElement.onmouseout =  function(){ toggleOff(button); };
			}
		}
	}
	
	function toggleOn(el) {
		var el = document.getElementById(el);
		el.className = 'active';
	}
	function toggleOff(el) {
		var el = document.getElementById(el);
		el.className = 'none';
	}
	
 	window.onload=function(){setMenu()};