var TOP_COL_DELIMITER = String.fromCharCode(16); var TOP_ROW_DELIMITER = String.fromCharCode(15); var __top_m_bPageLoaded = false; window.onload = __top_Page_OnLoad; function __top_ClientAPIEnabled() { return typeof (top) != "undefined" && !!top.getVar } function __top_Page_OnLoad() { if (__top_ClientAPIEnabled()) { var sLoadHandlers = top.getVar("__top_pageload"); if (sLoadHandlers != null) { eval(sLoadHandlers) } top.dom.attachEvent(window, "onscroll", __top_bodyscroll) } __top_m_bPageLoaded = true } function __top_KeyDown(iKeyCode, sFunc, e) { if (e == null) { e = window.event } if (e.keyCode == iKeyCode) { eval(unescape(sFunc)); return false } } function __top_bodyscroll() { var A = document.forms[0]; if (__top_ClientAPIEnabled() && __top_m_bPageLoaded) { A.ScrollTop.value = document.documentElement.scrollTop ? document.documentElement.scrollTop : top.dom.getByTagName("body")[0].scrollTop } } function __top_setScrollTop(B) { if (__top_ClientAPIEnabled()) { if (B == null) { B = document.forms[0].ScrollTop.value } var C = top.getVar("ScrollToControl"); if (C != null && C.length > 0) { var A = top.dom.getById(C); if (A != null) { B = top.dom.positioning.elementTop(A); top.setVar("ScrollToControl", "") } } window.scrollTo(0, B) } } function __top_SetInitialFocus(A) { var B = top.dom.getById(A); if (B != null && __top_CanReceiveFocus(B)) { B.focus() } } function __top_CanReceiveFocus(A) { if (A.style.display != "none" && A.tabIndex > -1 && A.disabled == false && A.style.visible != "hidden") { var B = A.parentElement; while (B != null && B.tagName != "BODY") { if (B.style.display == "none" || B.disabled || B.style.visible == "hidden") { return false } B = B.parentElement } return true } else { return false } } function __top_ContainerMaxMin_OnClick(K, F) { var E = top.dom.getById(F); if (E != null) { var A = K.childNodes[0]; var H = K.getAttribute("containerid"); var D = K.getAttribute("cookieid"); var J = A.src.toLowerCase().substr(A.src.lastIndexOf("/")); var C; var B; var G; if (top.getVar("min_icon_" + H)) { G = top.getVar("min_icon_" + H) } else { G = top.getVar("min_icon") } if (top.getVar("max_icon_" + H)) { B = top.getVar("max_icon_" + H) } else { B = top.getVar("max_icon") } C = B.toLowerCase().substr(B.lastIndexOf("/")); var I = 5; if (K.getAttribute("animf") != null) { I = new Number(K.getAttribute("animf")) } if (J == C) { A.src = G; top.dom.expandElement(E, I); A.title = top.getVar("min_text"); if (D != null) { if (top.getVar("__top_" + H + ":defminimized") == "true") { top.dom.setCookie(D, "true", 365) } else { top.dom.deleteCookie(D) } } else { top.setVar("__top_" + H + "_Visible", "true") } } else { A.src = B; top.dom.collapseElement(E, I); A.title = top.getVar("max_text"); if (D != null) { if (top.getVar("__top_" + H + ":defminimized") == "true") { top.dom.deleteCookie(D) } else { top.dom.setCookie(D, "false", 365) } } else { top.setVar("__top_" + H + "_Visible", "false") } } return true } return false } function __top_Help_OnClick(A) { var B = top.dom.getById(A); if (B != null) { if (B.style.display == "none") { B.style.display = "" } else { B.style.display = "none" } return true } return false } function __top_SectionMaxMin(D, C) { var B = top.dom.getById(C); if (B != null) { var G = D.getAttribute("max_icon"); var E = D.getAttribute("min_icon"); var A = D.getAttribute("userctr") != null; var F; if (B.style.display == "none") { D.src = E; B.style.display = ""; if (A) { F = "True" } else { top.setVar(D.id + ":exp", 1) } } else { D.src = G; B.style.display = "none"; if (A) { F = "False" } else { top.setVar(D.id + ":exp", 0) } } if (A) { topcore.setUserProp(D.getAttribute("userctr"), D.getAttribute("userkey"), F, null) } return true } return false } function __top_enableDragDrop() { var E = top.getVar("__top_dragDrop").split(";"); var C; for (var B = 0; B < E.length; B++) { C = E[B].split(" "); if (C[0].length > 0) { var D = top.dom.getById(C[0]); var A = top.dom.getById(C[1]); if (D != null && A != null) { D.setAttribute("moduleid", C[2]); top.dom.positioning.enableDragAndDrop(D, A, "__top_dragComplete()", "__top_dragOver()") } } } } var __top_oPrevSelPane; var __top_oPrevSelModule; var __top_dragEventCount = 0; function __top_dragOver() { __top_dragEventCount++; if (__top_dragEventCount % 75 != 0) { return } var B = top.dom.getById(top.dom.positioning.dragCtr.contID); var D = __top_getMostSelectedPane(top.dom.positioning.dragCtr); if (__top_oPrevSelPane != null) { __top_oPrevSelPane.pane.style.border = __top_oPrevSelPane.origBorder } if (D != null) { __top_oPrevSelPane = D; D.pane.style.border = "4px double " + TOP_HIGHLIGHT_COLOR; var F = __top_getPaneControlIndex(B, D); var C; var A; for (var E = 0; E < D.controls.length; E++) { if (F > E && D.controls[E].id != B.id) { C = D.controls[E] } if (F <= E && D.controls[E].id != B.id) { A = D.controls[E]; break } } if (__top_oPrevSelModule != null) { top.dom.getNonTextNode(__top_oPrevSelModule.control).style.border = __top_oPrevSelModule.origBorder } if (A != null) { __top_oPrevSelModule = A; top.dom.getNonTextNode(A.control).style.borderTop = "5px groove " + TOP_HIGHLIGHT_COLOR } else { if (C != null) { __top_oPrevSelModule = C; top.dom.getNonTextNode(C.control).style.borderBottom = "5px groove " + TOP_HIGHLIGHT_COLOR } } } } function __top_dragComplete() { var F = top.dom.getById(top.dom.positioning.dragCtr.contID); var B = F.getAttribute("moduleid"); if (__top_oPrevSelPane != null) { __top_oPrevSelPane.pane.style.border = __top_oPrevSelPane.origBorder } if (__top_oPrevSelModule != null) { top.dom.getNonTextNode(__top_oPrevSelModule.control).style.border = __top_oPrevSelModule.origBorder } var A = __top_getMostSelectedPane(top.dom.positioning.dragCtr); var E; if (A == null) { var C = __top_Panes(); for (var D = 0; D < C.length; D++) { if (C[D].id == F.parentNode.id) { A = C[D] } } } if (A != null) { E = __top_getPaneControlIndex(F, A); __top_MoveToPane(A, F, E); top.callPostBack("MoveToPane", "moduleid=" + B, "pane=" + A.paneName, "order=" + E * 2) } } function __top_MoveToPane(A, E, D) { if (A != null) { var B = new Array(); for (var C = D; C < A.controls.length; C++) { if (A.controls[C].control.id != E.id) { B[B.length] = A.controls[C].control } top.dom.removeChild(A.controls[C].control) } top.dom.appendChild(A.pane, E); E.style.top = 0; E.style.left = 0; E.style.position = "relative"; for (var C = 0; C < B.length; C++) { top.dom.appendChild(A.pane, B[C]) } __top_RefreshPanes() } else { E.style.top = 0; E.style.left = 0; E.style.position = "relative" } } function __top_RefreshPanes() { var A = top.getVar("__top_Panes").split(";"); var C = top.getVar("__top_PaneNames").split(";"); __top_m_aryPanes = new Array(); for (var B = 0; B < A.length; B++) { if (A[B].length > 0) { __top_m_aryPanes[__top_m_aryPanes.length] = new __top_Pane(top.dom.getById(A[B]), C[B]) } } } var __top_m_aryPanes; var __top_m_aryModules; function __top_Panes() { if (__top_m_aryPanes == null) { __top_m_aryPanes = new Array(); __top_RefreshPanes() } return __top_m_aryPanes } function __top_Modules(A) { if (__top_m_aryModules == null) { __top_RefreshPanes() } return __top_m_aryModules[A] } function __top_getMostSelectedPane(D) { var F = new top.dom.positioning.dims(D); var E = 0; var B; var H; for (var A = 0; A < __top_Panes().length; A++) { var C = __top_Panes()[A]; var G = new top.dom.positioning.dims(C.pane); B = top.dom.positioning.elementOverlapScore(G, F); if (B > E) { E = B; H = C } } return H } function __top_getPaneControlIndex(B, D) { if (D == null) { return } var A = new top.dom.positioning.dims(B); var F; if (D.controls.length == 0) { return 0 } for (var E = 0; E < D.controls.length; E++) { F = D.controls[E]; var C = new top.dom.positioning.dims(F.control); if (A.t < C.t) { return F.index } } if (F != null) { return F.index + 1 } else { return 0 } } function __top_Pane(C, B) { this.pane = C; this.id = C.id; this.controls = new Array(); this.origBorder = C.style.border; this.paneName = B; var G = 0; var D = ""; for (var F = 0; F < C.childNodes.length; F++) { var E = C.childNodes[F]; if (top.dom.isNonTextNode(E)) { if (__top_m_aryModules == null) { __top_m_aryModules = new Array() } var A = E.getAttribute("moduleid"); if (A != null && A.length > 0) { D += A + "~"; this.controls[this.controls.length] = new __top_PaneControl(E, G); __top_m_aryModules[A] = E.id; G += 1 } } } this.moduleOrder = D } function __top_PaneControl(A, B) { this.control = A; this.id = A.id; this.index = B; this.origBorder = A.style.border } function __topcore() { this.GetUserVal = 0; this.SetUserVal = 1 } __topcore.prototype = { getUserProp: function(A, B, C) { this._doUserCallBack(topcore.GetUserVal, A, B, null, new topcore.UserPropArgs(A, B, C)) }, setUserProp: function(B, C, A, D) { this._doUserCallBack(topcore.SetUserVal, B, C, A, new topcore.UserPropArgs(B, C, D)) }, _doUserCallBack: function(F, B, D, A, E) { if (top && top.xmlhttp) { var C = F + COL_DELIMITER + B + COL_DELIMITER + D + COL_DELIMITER + A; top.xmlhttp.doCallBack("__Page", C, topcore._callBackSuccess, E, topcore._callBackFail, null, true, null, 0) } else { alert("Client Personalization not enabled") } }, _callBackSuccess: function(B, C, A) { if (C.pFunc) { C.pFunc(C.namingCtr, C.key, B) } }, _callBackFail: function(A, B) { window.status = A } }; __topcore.prototype.UserPropArgs = function(A, B, C) { this.namingCtr = A; this.key = B; this.pFunc = C }; var topcore = new __topcore(); jQuery(function(A) { A(".i-tabs").each(function() { var B = A(this); var D = A(".i-tabs-container", B); var C = B.attr("event") || "mouseover"; var E = A(".i-tabs-item", this); E.each(function(K, I) { var L = A(this); if (K == 0) { L.addClass("i-tabs-item-active") } var G = null; var H = null; var F = L.attr("mid"); var J = L.attr("eid"); if (!!F) { H = A("a[name=" + F + "]"); if (H.size() == 1) { G = H.next(); D.append(H.hide()) } } else { if (!!J) { G = A("#" + J) } } if (G == null) { return } D.append(G.addClass("i-tabs-content")); if (K > 0) { G.hide() } L.bind(C, function() { E.removeClass("i-tabs-item-active"); L.addClass("i-tabs-item-active"); A(".i-tabs-content", B).hide(); A(G).show() }) }) }); A(".i-columns").each(function() { var C = A(this); var B = A(".i-columns-item", this); B.each(function(H, G) { var I = A(this); var D = I.attr("mid"); var F = A("a[name=" + D + "]"); if (F.size() != 1) { return } var E = F.next(); I.append(F).append(E) }) }); A(".i-news").each(function() { var K = A(this); var M = parseInt(K.attr("pagesize")) || 3; var E = 1; var L = K.attr("effect") || "show"; var D = K.attr("event") || "click"; var S = K.attr("auto") == "false" ? false : true; var R = parseInt(K.attr("timeout")) || 3; var F = K.attr("hs") || ".i-news-item"; var I = A(".i-news-item", K); var H = I.size(); var O = A(".i-news-page", K); var G = A(".i-news-page-pre", K); var T = A(".i-news-page-next", K); var P = Math.ceil(H / M); var J = A(".i-news-item-container", K); var B = A(".i-news-page-container", K); if (J.size() == 1) { J.append(I) } if (B.size() == 1) { B.append(A(".i-news-page-pre,.i-news-page,.i-news-page-next", K)) } I.filter(":odd").addClass("i-news-item-alt"); O.filter(":odd").addClass("i-news-page-alt"); var Q = function() { if (E == 1) { G.addClass("i-news-page-pre-disable") } else { G.removeClass("i-news-page-pre-disable") } if (E == P) { T.addClass("i-news-page-next-disable") } else { T.removeClass("i-news-page-next-disable") } O.removeClass("i-news-page-active"); O.eq(E - 1).addClass("i-news-page-active"); var V = (E - 1) * M; var U = V + M; I.each(function(X, W) { if (X >= V && X < U) { if (L == "show") { A(this).show() } else { A(this).fadeIn() } A(this).addClass("i-news-item-active") } else { A(this).hide(); A(this).removeClass("i-news-item-active") } }) }; G.bind(D, function() { if (E > 1) { E--; Q() } }); T.bind(D, function() { if (E < P) { E++; Q() } }); O.bind(D, function() { E = parseInt(A(this).attr("page")); if (!E) { E = A.inArray(this, O.get()) + 1 } Q() }); var N = function() { E++; if (E > P) { E = 1 } Q() }; var C = null; if (S) { C = setInterval(N, 1000 * R) } A(".i-news-item,.i-news-page,.i-news-page-pre,.i-news-page-next", K).hover(function() { if (C) { clearInterval(C) } }, function() { if (S) { C = setInterval(N, 1000 * R) } }); Q() }) });
