﻿var ZHD_COL_DELIMITER=String.fromCharCode(16);var ZHD_ROW_DELIMITER=String.fromCharCode(15);var __zhd_m_bPageLoaded=false;window.onload=__zhd_Page_OnLoad;function __zhd_ClientAPIEnabled(){return typeof(zhd)!="undefined"}function __zhd_Page_OnLoad(){if(__zhd_ClientAPIEnabled()){var sLoadHandlers=zhd.getVar("__zhd_pageload");if(sLoadHandlers!=null){eval(sLoadHandlers)}zhd.dom.attachEvent(window,"onscroll",__zhd_bodyscroll)}__zhd_m_bPageLoaded=true}function __zhd_KeyDown(iKeyCode,sFunc,e){if(e==null){e=window.event}if(e.keyCode==iKeyCode){eval(unescape(sFunc));return false}}function __zhd_bodyscroll(){var A=document.forms[0];if(__zhd_ClientAPIEnabled()&&__zhd_m_bPageLoaded){A.ScrollTop.value=document.documentElement.scrollTop?document.documentElement.scrollTop:zhd.dom.getByTagName("body")[0].scrollTop}}function __zhd_setScrollTop(B){if(__zhd_ClientAPIEnabled()){if(B==null){B=document.forms[0].ScrollTop.value}var C=zhd.getVar("ScrollToControl");if(C!=null&&C.length>0){var A=zhd.dom.getById(C);if(A!=null){B=zhd.dom.positioning.elementTop(A);zhd.setVar("ScrollToControl","")}}window.scrollTo(0,B)}}function __zhd_SetInitialFocus(A){var B=zhd.dom.getById(A);if(B!=null&&__zhd_CanReceiveFocus(B)){B.focus()}}function __zhd_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 __zhd_ContainerMaxMin_OnClick(K,F){var E=zhd.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(zhd.getVar("min_icon_"+H)){G=zhd.getVar("min_icon_"+H)}else{G=zhd.getVar("min_icon")}if(zhd.getVar("max_icon_"+H)){B=zhd.getVar("max_icon_"+H)}else{B=zhd.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;zhd.dom.expandElement(E,I);A.title=zhd.getVar("min_text");if(D!=null){if(zhd.getVar("__zhd_"+H+":defminimized")=="true"){zhd.dom.setCookie(D,"true",365)}else{zhd.dom.deleteCookie(D)}}else{zhd.setVar("__zhd_"+H+"_Visible","true")}}else{A.src=B;zhd.dom.collapseElement(E,I);A.title=zhd.getVar("max_text");if(D!=null){if(zhd.getVar("__zhd_"+H+":defminimized")=="true"){zhd.dom.deleteCookie(D)}else{zhd.dom.setCookie(D,"false",365)}}else{zhd.setVar("__zhd_"+H+"_Visible","false")}}return true}return false}function __zhd_Help_OnClick(A){var B=zhd.dom.getById(A);if(B!=null){if(B.style.display=="none"){B.style.display=""}else{B.style.display="none"}return true}return false}function __zhd_SectionMaxMin(D,C){var B=zhd.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{zhd.setVar(D.id+":exp",1)}}else{D.src=G;B.style.display="none";if(A){F="False"}else{zhd.setVar(D.id+":exp",0)}}if(A){zhdcore.setUserProp(D.getAttribute("userctr"),D.getAttribute("userkey"),F,null)}return true}return false}function __zhd_enableDragDrop(){var E=zhd.getVar("__zhd_dragDrop").split(";");var C;for(var B=0;B<E.length;B++){C=E[B].split(" ");if(C[0].length>0){var D=zhd.dom.getById(C[0]);var A=zhd.dom.getById(C[1]);if(D!=null&&A!=null){D.setAttribute("moduleid",C[2]);zhd.dom.positioning.enableDragAndDrop(D,A,"__zhd_dragComplete()","__zhd_dragOver()")}}}}var __zhd_oPrevSelPane;var __zhd_oPrevSelModule;var __zhd_dragEventCount=0;function __zhd_dragOver(){__zhd_dragEventCount++;if(__zhd_dragEventCount%75!=0){return}var B=zhd.dom.getById(zhd.dom.positioning.dragCtr.contID);var D=__zhd_getMostSelectedPane(zhd.dom.positioning.dragCtr);if(__zhd_oPrevSelPane!=null){__zhd_oPrevSelPane.pane.style.border=__zhd_oPrevSelPane.origBorder}if(D!=null){__zhd_oPrevSelPane=D;D.pane.style.border="4px double "+ZHD_HIGHLIGHT_COLOR;var F=__zhd_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(__zhd_oPrevSelModule!=null){zhd.dom.getNonTextNode(__zhd_oPrevSelModule.control).style.border=__zhd_oPrevSelModule.origBorder}if(A!=null){__zhd_oPrevSelModule=A;zhd.dom.getNonTextNode(A.control).style.borderTop="5px groove "+ZHD_HIGHLIGHT_COLOR}else{if(C!=null){__zhd_oPrevSelModule=C;zhd.dom.getNonTextNode(C.control).style.borderBottom="5px groove "+ZHD_HIGHLIGHT_COLOR}}}}function __zhd_dragComplete(){var F=zhd.dom.getById(zhd.dom.positioning.dragCtr.contID);var B=F.getAttribute("moduleid");if(__zhd_oPrevSelPane!=null){__zhd_oPrevSelPane.pane.style.border=__zhd_oPrevSelPane.origBorder}if(__zhd_oPrevSelModule!=null){zhd.dom.getNonTextNode(__zhd_oPrevSelModule.control).style.border=__zhd_oPrevSelModule.origBorder}var A=__zhd_getMostSelectedPane(zhd.dom.positioning.dragCtr);var E;if(A==null){var C=__zhd_Panes();for(var D=0;D<C.length;D++){if(C[D].id==F.parentNode.id){A=C[D]}}}if(A!=null){E=__zhd_getPaneControlIndex(F,A);__zhd_MoveToPane(A,F,E);zhd.callPostBack("MoveToPane","moduleid="+B,"pane="+A.paneName,"order="+E*2)}}function __zhd_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}zhd.dom.removeChild(A.controls[C].control)}zhd.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++){zhd.dom.appendChild(A.pane,B[C])}__zhd_RefreshPanes()}else{E.style.top=0;E.style.left=0;E.style.position="relative"}}function __zhd_RefreshPanes(){var A=zhd.getVar("__zhd_Panes").split(";");var C=zhd.getVar("__zhd_PaneNames").split(";");__zhd_m_aryPanes=new Array();for(var B=0;B<A.length;B++){if(A[B].length>0){__zhd_m_aryPanes[__zhd_m_aryPanes.length]=new __zhd_Pane(zhd.dom.getById(A[B]),C[B])}}}var __zhd_m_aryPanes;var __zhd_m_aryModules;function __zhd_Panes(){if(__zhd_m_aryPanes==null){__zhd_m_aryPanes=new Array();__zhd_RefreshPanes()}return __zhd_m_aryPanes}function __zhd_Modules(A){if(__zhd_m_aryModules==null){__zhd_RefreshPanes()}return __zhd_m_aryModules[A]}function __zhd_getMostSelectedPane(D){var F=new zhd.dom.positioning.dims(D);var E=0;var B;var H;for(var A=0;A<__zhd_Panes().length;A++){var C=__zhd_Panes()[A];var G=new zhd.dom.positioning.dims(C.pane);B=zhd.dom.positioning.elementOverlapScore(G,F);if(B>E){E=B;H=C}}return H}function __zhd_getPaneControlIndex(B,D){if(D==null){return}var A=new zhd.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 zhd.dom.positioning.dims(F.control);if(A.t<C.t){return F.index}}if(F!=null){return F.index+1}else{return 0}}function __zhd_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(zhd.dom.isNonTextNode(E)){if(__zhd_m_aryModules==null){__zhd_m_aryModules=new Array()}var A=E.getAttribute("moduleid");if(A!=null&&A.length>0){D+=A+"~";this.controls[this.controls.length]=new __zhd_PaneControl(E,G);__zhd_m_aryModules[A]=E.id;G+=1}}}this.moduleOrder=D}function __zhd_PaneControl(A,B){this.control=A;this.id=A.id;this.index=B;this.origBorder=A.style.border}function __zhdcore(){this.GetUserVal=0;this.SetUserVal=1}__zhdcore.prototype={getUserProp:function(A,B,C){this._doUserCallBack(zhdcore.GetUserVal,A,B,null,new zhdcore.UserPropArgs(A,B,C))},setUserProp:function(B,C,A,D){this._doUserCallBack(zhdcore.SetUserVal,B,C,A,new zhdcore.UserPropArgs(B,C,D))},_doUserCallBack:function(F,B,D,A,E){if(zhd&&zhd.xmlhttp){var C=F+COL_DELIMITER+B+COL_DELIMITER+D+COL_DELIMITER+A;zhd.xmlhttp.doCallBack("__Page",C,zhdcore._callBackSuccess,E,zhdcore._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}};__zhdcore.prototype.UserPropArgs=function(A,B,C){this.namingCtr=A;this.key=B;this.pFunc=C};var zhdcore=new __zhdcore();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()})});