<!--

if (document.compatMode == 'CSS1Compat') {
	// Do nothing the browser is in Standards Mode
} else {
	// Browser is in Quirks Mode
	alert("Your browser is currently running in 'Quirks Mode' rather than 'Standards Mode'.  This site is standards complient and so will not display properly in 'Quirks Mode'.  To view the site you will need to switch your browser to 'Standards Mode'.");
}

function switchSubMenu (tid, sh, mid) {

	var menu = document.getElementById('menu_'+tid);
	var submenu = document.getElementById('submenu_'+tid);

	if ( typeof switchSubMenu.timer == 'undefined' ) {
        // It has not... perform the initilization
        switchSubMenu.timer = null;
    }
	switchSubMenu.oldtab = switchSubMenu.tabName;
	switchSubMenu.tabName = tid;

	switch (sh) {
	case('show'):
		if (switchSubMenu.tabName == switchSubMenu.oldtab) { 
			window.clearTimeout(switchSubMenu.timer);
		}
		
		submenu.style.left = (menu.offsetLeft + 20) + 'px';
		submenu.style.top = (menu.offsetTop + 25) + 'px';
		
		submenu.style.visibility='visible';
		break;
	case('hide'):
		switchSubMenu.timer = window.setTimeout(
			function() { 
				submenu.style.visibility='hidden'; 
			},100);
		break;
	}
}

function switchTab (tid, sh) {

	var tab = document.getElementById('menu_'+tid);
	var menu = document.getElementById('submenu_'+tid);

	if ( typeof switchTab.timer == 'undefined' ) {
        // It has not... perform the initilization
        switchTab.timer = null;
    }
	switchTab.oldtab = switchTab.tabName;
	switchTab.tabName = tid;

	switch (sh) {
	case('show'):
		if (switchTab.tabName == switchTab.oldtab) { 
			window.clearTimeout(switchTab.timer);
		}
		tab.className = 'menu_item_hover';
		menu.style.visibility='visible';
		break;
	case('hide'):
		switchTab.timer = window.setTimeout(
			function() { 
				menu.style.visibility='hidden'; 
				if (tab.getAttribute("rel") && tab.getAttribute("rel") == 'active') {
					tab.className = 'menu_item_hover';
				} else {
					tab.className = 'menu_item';
				}
					
			},100);
		break;
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

-->

