Вход Регистрация
Файл: map_ua_files/mod_sbd_.js
Строк: 315
<?php
var AccordionMenu=(function(){var N=YAHOO.util.Dom;var L=YAHOO.util.Event;var A={};var C={};var E;N.addClass(document.documentElement,"accordion-menu-js");function G(S){var P=L.getTarget(S);if((S.tagName+"").toUpperCase()=="DD"){var Q=S.previousSibling;while(Q){if(Q.tagName&&Q.tagName.toUpperCase()=="DT"){break}Q=Q.previousSibling}if(!Q||Q.tagName.toUpperCase()!="DT"){return }else{return(Q.tagName==="DT")?Q:null}}else{if(S.clientX){var R=false;while(P.parentNode){if(N.hasClass(P,"a-m-t")){R=true;break}P=P.parentNode}if(!R){return null}else{return(P.tagName==="DT")?P:null}}}}function D(Q){if(!Q){return null}var P=Q.nextSibling;while(P){if(P.tagName&&P.tagName.toUpperCase()=="DD"){break}P=P.nextSibling}if(!P||P.tagName.toUpperCase()!="DD"){return }else{return P}}function O(T,Q,X){T.hasAnimation+=1;N.addClass(X,"a-m-d-before-expand");var S={height:{from:0,to:X.offsetHeight}};N.removeClass(X,"a-m-d-before-expand");var R=function(){P.onComplete.unsubscribe(R);P.stop();N.removeClass(X,"a-m-d-anim");N.addClass(X,"a-m-d-expand");R=null;T.hasAnimation-=1;var Y=G(X);N.addClass(Y,"a-m-t-expand");if(C[T.id]&&C[T.id].onOpen&&X.style.height!=""){C[T.id].onOpen({dl:T,dt:Y,dd:X})}X.style.height=""};var U=function(){if(X.style.height){N.addClass(X,"a-m-d-anim");P.onTween.unsubscribe(U);U=null;X.oAnim=null}};if(X.oAnim){X.oAnim.stop();X.oAnim=null;T.hasAnimation-=1}var W=YAHOO.util.Easing.easeOut;var V=0.5;if(C[T.id]){W=C[T.id]["easeOut"]?W:YAHOO.util.Easing.easeIn;V=C[T.id]["seconds"];if(!C[T.id]["animation"]){var P={onComplete:{unsubscribe:function(){}},stop:function(){}};R();return }}var P=new YAHOO.util.Anim(X,S,V,W);P.onComplete.subscribe(R);P.onTween.subscribe(U);P.animate();X.oAnim=P}function K(R,S,P){R.hasAnimation+=1;N.addClass(P,"a-m-d-anim");var Q={height:{from:P.offsetHeight,to:0}};var U=function(){W.onComplete.unsubscribe(U);N.removeClass(P,"a-m-d-anim");N.removeClass(P,"a-m-d-expand");P.style.height="";P.oAnim=null;U=null;R.hasAnimation-=1;var X=G(P);N.removeClass(X,"a-m-t-expand");if(C[R.id]&&C[R.id].onOpen){C[R.id].onClose({dl:R,dt:X,dd:P})}};if(P.oAnim){P.oAnim.stop();P.oAnim=null;R.hasAnimation-=1}var T=YAHOO.util.Easing.easeOut;var V=0.5;if(C[R.id]){T=C[R.id]["easeOut"]?T:YAHOO.util.Easing.easeIn;V=C[R.id]["seconds"];if(!C[R.id]["animation"]){var W={onComplete:{unsubscribe:function(){}},stop:function(){}};U();return }}var W=new YAHOO.util.Anim(P,Q,V,T);W.onComplete.subscribe(U);W.animate();P.oAnim=W}function F(R,U,Q){var T=N.getElementsByClassName("a-m-d-expand","dd",R);for(var S=0;S<T.length;S++){var P=T[S];if(P!=Q){K(R,null,P)}}}var M=function(Q){var P=G(Q);if(!P){return }if(E){N.removeClass(E,"a-m-t-hover")}N.addClass(P,"a-m-t-hover");E=P;L.preventDefault(Q);return false};var I=function(Q){var P=G(Q);if(!P){return }if(E&&E!=P){N.removeClass(E,"a-m-t-hover");N.removeClass(E,"a-m-t-down")}N.removeClass(P,"a-m-t-down");N.removeClass(P,"a-m-t-hover");E=null;L.preventDefault(Q);return false};var B=function(Q){var P=G(Q);if(!P){return }N.addClass(P,"a-m-t-down");L.preventDefault(Q);return false};var J=function(S){var R=G(S);if(!R){return }var P=D(R);if(!P){return }var Q=R.parentNode;if(Q.hasAnimation==null){Q.hasAnimation=0}if(Q.hasAnimation>0){return }N.removeClass(R,"a-m-t-down");if(N.hasClass(P,"a-m-d-expand")){K(Q,R,P)}else{if(C[Q.id]&&C[Q.id].dependent==false){}else{F(Q,R,P)}O(Q,R,P)}L.preventDefault(S);return false};L.on(document,"mouseover",M);L.on(document,"mouseout",I);L.on(document,"mousedown",B);L.on(document,"click",J);var H={openDtById:function(R){var S=document.getElementById(R);if(!S){return }if(!N.hasClass(S,"a-m-t")){return }var Q=S.parentNode;var P=D(S);if(Q.hasAnimation==null){Q.hasAnimation=0}if(Q.hasAnimation>0){return }if(N.hasClass(P,"a-m-d-expand")){return }if(C[Q.id]&&C[Q.id].dependent==false){}else{F(Q,S,P)}O(Q,S,P)},closeDtById:function(R){var S=document.getElementById(R);if(!S){return }if(!N.hasClass(S,"a-m-t")){return }var Q=S.parentNode;var P=D(S);if(Q.hasAnimation==null){Q.hasAnimation=0}if(Q.hasAnimation>0){return }if(!N.hasClass(P,"a-m-d-expand")){return }K(Q,S,P)},setting:function(R,P){if(!P){return }if(typeof (R)!="string"){return }var Q=function(U){U=U||this;U.hasAnimation=0;C[U.id]={element:U,dependent:true,onOpen:function(){},onClose:function(){},seconds:0.5,easeOut:true,openedIds:[],animation:true};oMenu=C[U.id];if(typeof (P.animation)=="boolean"){oMenu.animation=!!P.animation}if(typeof (P.dependent)=="boolean"){oMenu.dependent=!!P.dependent}if(typeof (P.easeOut)=="boolean"){oMenu.easeOut=!!P.easeOut}if(typeof (P.seconds)=="number"){oMenu.seconds=Math.max(0,P.seconds)}if(typeof (P.onOpen)=="function"){oMenu.onOpen=P.onOpen}if(typeof (P.onClose)=="function"){oMenu.onClose=P.onClose}if(P.openedIds.shift){oMenu.openedIds=P.openedIds}for(var V=0;V<oMenu.openedIds.length;V++){var T=oMenu.openedIds[V];var W=document.getElementById(T);if(W&&W.tagName.toUpperCase()=="DT"){var U=W.parentNode;var S=D(W);O(U,W,S)}else{if(!W){function X(){var a=this;if(a.tagName.toUpperCase()=="DT"){var Z=a.parentNode;var Y=D(a);O(Z,a,Y)}}L.onAvailable(T,X)}}}};if(document.getElementById(R)){Q(document.getElementById(R))}else{L.onAvailable(R,Q)}}};return H})();var runOk=1;var currentId 0;function switchRun(){runOk=1};
?>
Онлайн: 1
Реклама