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);}}


function yg_Browser(){d = document;var nav=navigator; this.agt=nav.userAgent.toLowerCase(); this.major = parseInt(nav.appVersion); this.ns=(d.layers); this.dom=(d.getElementById)?1:0; this.ns4up=(this.ns && this.major >=4); this.ns6=(this.agt.indexOf("Netscape6")!=-1); this.op=(window.opera? 1:0); this.ie=(d.all); this.ie5=(d.all&&this.dom); this.fb=(this.agt.indexOf("firebird")!=-1); this.sf=(this.agt.indexOf("safari")!=-1); this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1)); this.mac=(this.agt.indexOf("mac")!=-1);}
var oBw = new yg_Browser();
function yg_getW(o) { var w=0; w=(oBw.op)? o.style.pixelWidth:o.offsetWidth; return w; }
function yg_getH(o) { var h=0; h=(oBw.op)? o.style.pixelHeight:o.offsetHeight; return h; }
function yg_getPageX(o) { if (oBw.op) {  var x=0; while(eval(o)) { x+=o.style.pixelLeft; e=o.offsetParent; } return x; } else { var m=(oBw.mac&&oBw.ie)? document.body.leftMargin:0; var x=0; while(eval(o)) { x+=o.offsetLeft; o=o.offsetParent; } return parseInt(x)+parseInt(m) } }
function yg_getPageY(o) { if(oBw.ns) { var y=(o.pageY)? o.pageY:o.y; return y; } else if (oBw.op) {  var y=0; while(eval(o)) { y+=o.style.pixelTop; o=o.offsetParent; } return y; }  else { var m = (oBw.mac&&oBw.ie)? document.body.topMargin:0; var y=0; while(eval(o)) { y+=o.offsetTop; o=o.offsetParent; }  return parseInt(y)+parseInt(m); } }
function yg_show(o,disp) { (!disp)? 0:o.style.display=disp; o.style.visibility='visible'; }
function yg_hide(o,disp) { (!disp)? 0:o.style.display=disp; o.style.visibility='hidden'; }
function yg_addEvt(o,e,f,c){ if(o.addEventListener)o.addEventListener(e,f,c);else if(o.attachEvent)o.attachEvent("on"+e,f);else eval("o.on"+e+"="+f)}
function yg_remEvt(o,e,f) { if(o.removeEventListener)o.removeEventListener(e,f,false);else if(o.detachEvent)o.detachEvent('on'+e,f); }
function yshp_setPageX(o,x) { if(oBw.op) o.style.pixelLeft=x; else o.style.left=x;}
function yshp_setPageY(o,y) { if(oBw.op) o.style.pixelTop=y; else o.style.top=y;}
function yg_setZ(o,z) { if(oBw.ns)o.zIndex=z;else o.style.zIndex=z; }
