var d = document;var pop_timeout = new Array();var pop_delay = new Array();var pop_chGoActive = new Array();var pop_chGoInactive = new Array();var pop_timeoutGoActive = new Array();var pop_timeoutGoInactive = new Array();var pop_isActive = new Array();pop_isActive['active'] = new Array();
function CallbackChain(){this._callbacks = new Array();this.add = cbc_add;this.get = cbc_get;this.count = cbc_count;this.execute = cbc_execute;return this;}
function cbc_add(refCallback){this._callbacks[this._callbacks.length] = refCallback;return true;}
function cbc_get(index){return this._callbacks[index];}
function cbc_count(){return this._callbacks.length;}
function cbc_execute(){for (var i = 0; i < this.count(); i++){var cb = this.get(i);cb();}return true;}
function connectHoverEvents(triggerId, targetId, showChain, hideChain, showDelay, hideTimeout) {var eMouseOver = pop_genActiveEvent(triggerId, showChain, showDelay);var eMouseOut = pop_genInactiveEvent(triggerId, hideChain, hideTimeout);var trigger = d.getElementById(triggerId);yg_addEvt(trigger,  "mouseover",  eMouseOver, false);yg_addEvt(trigger,  "mouseout",   eMouseOut,  false);if (targetId != null) {var target = d.getElementById(targetId);if (!target) return false;yg_addEvt(target, "mouseover",  eMouseOver, false);yg_addEvt(target, "mouseout",   eMouseOut,  false);}}
function pop_genActiveEvent(tabId, showChain, delay) {pop_chGoActive[tabId] = showChain;pop_timeoutGoActive[tabId] = new Function("if (pop_isActive['" +tabId+ "'] != true) {" + "  if (pop_isActive['active'].length != 0) {" + "    pop_makeAllInactive();" + "  } " + "  pop_chGoActive['" +tabId+ "'].execute();" + "} " + "pop_isActive['" +tabId+ "'] = true;" + "pop_isActive['active'][pop_isActive['active'].length] = '" +tabId+ "';");return new Function("clearTimeout(pop_timeout['" +tabId+ "']);" + "clearTimeout(pop_delay['" +tabId+ "']);" + "var defaultDelay = " +delay+ ";" + "var thisDelay = (pop_isActive['active'].length != 0) ? 1 : defaultDelay;" + "pop_delay['" +tabId+ "'] = setTimeout(\"pop_timeoutGoActive['" +tabId+ "']();\", thisDelay);" + "return false;");}
function pop_genInactiveEvent(tabId, hideChain, timeout) {pop_chGoInactive[tabId] = hideChain;pop_timeoutGoInactive[tabId] = new Function("pop_chGoInactive['" +tabId+ "'].execute();" + "pop_isActive['" +tabId+ "'] = false;" + "pop_markInactive('" +tabId+ "');");return new Function("clearTimeout(pop_delay['" +tabId+ "']);" + "clearTimeout(pop_timeout['" +tabId+ "']);" + "pop_timeout['" +tabId+ "'] = setTimeout(\"pop_timeoutGoInactive['" +tabId+ "']();\", " +timeout+ ");" + "return false;");}
function pop_makeAllInactive(skip){var array = pop_isActive['active'];var exceptionData = null;for (var i = (pop_isActive['active'].length - 1); i > -1; i--) {var cur = pop_isActive['active'][i];if (cur == skip) {exceptionData = cur;} else {pop_timeoutGoInactive[cur]();}pop_isActive['active'] = pop_isActive['active'].slice(0, i);}if (exceptionData != null) {pop_isActive['active'][pop_isActive['active'].length] = exceptionData;}}
function pop_markInactive(id) {var others = new Array();for (var i = (pop_isActive['active'].length - 1); i > -1; i--) {var cur = pop_isActive['active'][i];if (cur != id) {others[others.length] = cur;}}pop_isActive['active'] = others;}
function pop_showElement(elId) {var el = d.getElementById(elId);if (el) {el.style.visibility = "visible";}}
function pop_hideElement(elId) {var el = d.getElementById(elId);if (el) {el.style.visibility = "hidden";}}var navNoMenu = new Array("0", "1", "2", "3", "4", "5", "6");var navMenu = new Array("7");var IFRAME_ID = 'yshp_js_msie_iframe';var SHOW_DELAY = 250;var HOVER_TIMEOUT = 400;var oBw = new yg_Browser();
function setMenuPos(tabId, menuId, align) {var tab = d.getElementById(tabId);var menu = d.getElementById(menuId);var xOffset = 0;var yOffset = 0;var width = "auto";if (d.all && navigator.userAgent.indexOf("Mac_PowerPC") > -1) {xOffset = -6;yOffset = -15;width = "16.2em";}menu.style.width = width;if (tab.className == "selected") {yOffset = yOffset - 1;}var tabTop = yg_getPageY(tab);var tabLeft = yg_getPageX(tab);var tabHeight = yg_getH(tab);var tabWidth = yg_getW(tab);var tabRight = tabLeft + tabWidth;var menuWidth = yg_getW(menu);var menuHeight = yg_getH(menu);var menuTop = (tabTop + tabHeight + yOffset);var menuLeft = '';if (align == "right") {menuLeft = (tabRight - menuWidth + xOffset);} else {menuLeft = (tabLeft + xOffset);}menu.style.top = menuTop + "px";menu.style.left = menuLeft + "px";if (oBw.ie5 && oBw.win) {var iframe = d.getElementById(IFRAME_ID);if (iframe) {iframe.style.top = menuTop + "px";iframe.style.left = menuLeft + "px";iframe.style.height = menuHeight + "px";iframe.style.width = menuWidth + "px";iframe.style.zIndex = menu.style.zIndex + 1;}}return true;}
function selectTab(tabId) {var tab = d.getElementById(tabId);if (!tab) return false;if (tab.className != "selected") {tab.className = "highlighted";}return true;}
function deselectTab(tabId) {var tab = d.getElementById(tabId);if (!tab) return false;if (tab.className != "selected") {tab.className = "";}return true;}
function tabs_init() {if (!d.getElementById) return false;if (oBw.ie5 && oBw.win) {var tabs = d.getElementById('tabs');var iframe = d.createElement("iframe");iframe.setAttribute('id', IFRAME_ID);iframe.style.height = 0;iframe.style.width = 0;iframe.style.position = "absolute";iframe.style.visibility = "hidden";iframe.style.zIndex = 1;iframe.style.border = 0;tabs.parentNode.insertBefore(iframe, tabs);}for (var i = 0; i < navNoMenu.length; i++) {var num = navNoMenu[i];var tabId = "tab_"+num;var tab = d.getElementById(tabId);if (!tab) continue;var showChain = new CallbackChain();var hideChain = new CallbackChain();connectHoverEvents(tabId, '', showChain, hideChain, SHOW_DELAY, HOVER_TIMEOUT);}for (var i = 0; i < navMenu.length; i++) {var num = navMenu[i];var tabId = "tab_"+num;var tab = d.getElementById(tabId);if (!tab) continue;var menuId = "menu_"+num;var menu = d.getElementById(menuId);if (!menu) continue;var showChain = new CallbackChain();showChain.add(new Function("setMenuPos('" +tabId+ "', '" +menuId+ "', 'right');"));showChain.add(new Function("selectTab('" +tabId+ "');"));showChain.add(new Function("pop_showElement('" +menuId+ "');"));if (oBw.ie5 && oBw.win) showChain.add(new Function("pop_showElement('" +IFRAME_ID+ "');"));var hideChain = new CallbackChain();if (oBw.ie5 && oBw.win) hideChain.add(new Function("pop_hideElement('" +IFRAME_ID+ "');"));hideChain.add(new Function("pop_hideElement('" +menuId+ "');"));hideChain.add(new Function("deselectTab('" +tabId+ "');"));connectHoverEvents(tabId, menuId, showChain, hideChain, SHOW_DELAY, HOVER_TIMEOUT);}}