	var its;
	var browserName = '';
	var browserNameLong = '';
	var browserNew = '';
	var preloadFlag = false;
	var Macintosh = navigator.userAgent.indexOf('Mac')>0;

	function its() {
		var n = navigator;
		var ua = ' ' + n.userAgent.toLowerCase();
		var pl = n.platform.toLowerCase();
		var an = n.appName.toLowerCase();

		this.version = n.appVersion;
		this.nn = ua.indexOf('mozilla') > 0;

		if(ua.indexOf('compatible') > 0) {
			this.nn = false;
		}
		
		this.opera = ua.indexOf('opera') > 0;
		this.ie = ua.indexOf('msie') > 0;
		this.major = parseInt( this.version );
		this.minor = parseFloat( this.version );

		this.mac = ua.indexOf('mac') > 0;
		this.win = ua.indexOf('win') > 0;

		if(this.ie) {
			if(ua.indexOf("msie 5") > 1) {
				var msieIndex = navigator.appVersion.indexOf("MSIE") + 5;
				this.major = parseFloat(navigator.appVersion.substr(msieIndex,3));
			}
		}

		return this;
	}

	function browserNaming() {
		its = new its();
		
		if (!document.getElementById) {
			browserNew = false;
		}
		else {
			browserNew = true;
		}

		if (its.opera) {
			browserName = "Opera";
		}
		else if (its.ie) {
			browserName = "IE";
		}
		else {
			browserName = "NS";
		}

		browserNameLong = browserName + its.major;
	}

	function createObject(imgName,imgSrc) {
		if (loadingFlag) {
			eval(imgName + ' = new Image()');
			eval(imgName + '.src = "' + imgSrc + '"');
			return imgName;
		}
	}

	function changeImage(layer,imgName,imgObj) {
		if (preloadFlag) {
			if (browserNew) {
				document.getElementById(imgName).src = eval(imgObj+'.src');
			}
			if ((!browserNew) && (browserName == "NS") && (layer!=null)) {
				eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src');
			}
			else {
				document.images[imgName].src = eval(imgObj+'.src');
			}
		}
	}

	function unblur() {
		this.blur();
	}

	function getLinksToBlur() {
		if ((browserNew) || (browserName == "IE")) {
			if (browserNew) {
				links = document.getElementsByTagName("a");
			}
			else {
				links = document.all.tags("a");
			}
			for(i=0; i<links.length; i++) {
				links[i].onfocus = unblur
			}
		}
		if (browserName == "IE") {
			if (browserNew) {
				drops = document.getElementsByTagName("select");
			}
			else {
				drops = document.all.tags("select");
			}
			for(i=0; i<drops.length; i++) {
				drops[i].onfocus = unblur
			}
		}
	}

	function antispam(name,domain) {
    	document.location = "mailto:" + name + "@" + domain;
	}
	
	function spawnURL(desktopURL,windowName,width,height) {
		if ((Macintosh) && ((browserNameLong == "IE4") || (browserNameLong == "IE4.5"))) {
 			var newheight = parseInt(height + 17);
		}
		else {
			var newheight = height;
		}
		window.open(desktopURL,windowName,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,width='+width+',height='+newheight+',resizable=0');
	}
	
	function checkMenu(menuId) {
		theMenu = menuId + "Nav";
		if (menuStates[theMenu]) {
			menuSwitcher(theMenu,'off');
			menuStates[theMenu] = false;
		}
		else {
			menuSwitcher(theMenu,'on');
			menuStates[theMenu] = true;
			resetNavs(menuId);
		}
	}
	
	function checkUpMenu(menuId) {
		theMenu = menuId + "UpNav";
		if (upmenuStates[theMenu]) {
			menuSwitcher(theMenu,'off');
			upmenuStates[theMenu] = false;
		}
		else {
			menuSwitcher(theMenu,'on');
			upmenuStates[theMenu] = true;
			resetUpNavs(menuId);
		}
	}
	
	function checkInitState() {
		for (i=0; i<upmenuNumb; i++) {
			menuId = upmenuNames[i] + "UpNav";
			if (upmenuStates[menuId]) {
				if (browserNew) {
					d = document.getElementById(menuId);
					d.style.display = 'block';
				}
				else {
					d = document.all[menuId];
					d.className = 'on';
				}
			}
		}
		for (i=0; i<submenuNumb; i++) {
			submenuId = menuNames[i] + "Nav";
			if (menuStates[submenuId]) {
				if (browserNew) {
					d = document.getElementById(submenuId);
					d.style.display = 'block';
				}
				else {
					d = document.all[submenuId];
					d.className = 'on';
				}
			}
		}
	}
	
	function menuSwitcher(menuId,param) {
		if (browserNew) {
			d = document.getElementById(menuId);
			if (param=="on") {
				d.style.display = 'block';
			}
			else {
				d.style.display = 'none';
			}
		}
		else {
			d = document.all[menuId];
			d.className = param;
		}
	}
	
	function resetNavs(menuId) {
		for (i=0; i<submenuNumb; i++) {
			if (menuNames[i]!=menuId) {
				theMenu = menuNames[i] + "Nav";
				menuStates[theMenu] = false;
				if (browserNew) {
					d = document.getElementById(theMenu);
					d.style.display = 'none';
				}
				else {
					d = document.all[theMenu];
					d.className = 'off';
				}
			}
		}
	}
	
	function resetUpNavs(menuId) {
		resetNavs('');
		for (i=0; i<upmenuNumb; i++) {
			if (upmenuNames[i]!=menuId) {
				theMenu = upmenuNames[i] + "UpNav";
				upmenuStates[theMenu] = false;
				if (browserNew) {
					d = document.getElementById(theMenu);
					d.style.display = 'none';
				}
				else {
					d = document.all[theMenu];
					d.className = 'off';
				}
			}
		}
	}
	
	function getSelected() {
		var pageURL = location.href;
		if ((browserNew) || (browserName == "IE")) {
			if (browserNew) {
				menulinks = document.getElementsByTagName("a");
			}
			else {
				menulinks = document.all.tags("a");
			}
			for(i=0; i<menulinks.length; i++) {
				if(menulinks[i].href==pageURL) {
					if (browserNew) {
						menulinks[i].style.color = '#ED9C03';
					}
					else {
						menulinks[i].className = 'linkOn';
					}
					menulinks[i].href = '#';
				}
			}
		}
	}