/* JSCookMenu v2.0.4 (c) Copyright 2002-2014 by Heng Yuan http://jscook.sourceforge.net/JSCookMenu/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Modified for WYSIWYG Web Builder 11 by Pablo */ var _cmNodeProperties={prefix:"",mainFolderLeft:"",mainFolderRight:"",mainItemLeft:"",mainItemRight:"",folderLeft:"",folderRight:"",itemLeft:"",itemRight:"",mainSpacing:0,subSpacing:0,delay:500,zIndexStart:1E3,zIndexInc:5,subMenuHeader:null,subMenuFooter:null,offsetHMainAdjust:[0,0],offsetVMainAdjust:[0,0],offsetSubAdjust:[0,0],clickOpen:0,effect:null},_cmIDCount=0,_cmIDName="cmSubMenuID",_cmTimeOut=null,_cmCurrentItem=null,_cmNoAction={},_cmNoClick={},_cmSplit={},_cmMenuList=[],_cmItemList=[],_cmFrameList= [],_cmFrameListSize=0,_cmFrameIDCount=0,_cmFrameMasking=!1,_cmClicked=!1,_cmHideObjects=0;function cmClone(a){var b={};for(v in a)b[v]=a[v];return b}function cmAllocMenu(a,b,c,d,e){var g={};g.div=a;g.menu=b;g.orient=c;g.nodeProperties=d;g.prefix=e;a=_cmMenuList.length;_cmMenuList[a]=g;return a} function cmAllocFrame(){if(0<_cmFrameListSize)return cmGetObject(_cmFrameList[--_cmFrameListSize]);var a=document.createElement("iframe"),b=_cmFrameIDCount++;a.id="cmFrame"+b;a.frameBorder="0";a.style.display="none";a.src="javascript:false";document.body.appendChild(a);a.style.filter="alpha(opacity=0)";a.style.zIndex=99;a.style.position="absolute";a.style.border="0";a.scrolling="no";return a}function cmFreeFrame(a){_cmFrameList[_cmFrameListSize++]=a.id} function cmNewID(){return _cmIDName+ ++_cmIDCount} function cmActionItem(a,b,c,d,e){_cmItemList[_cmItemList.length]=a;a=_cmItemList.length-1;d=d.nodeProperties.clickOpen;var g=3==d||2==d&&b;b="this,"+b+","+(c?"'"+c+"'":"null")+","+e+","+a;return null!=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)||3==d?' onclick="cmItemMouseOver('+b+",false);cmItemMouseDownOpenSub("+b+");cmItemMouseUp("+b+')" onmouseover="cmItemMouseOver('+b+',true)"':(g?' onmouseover="cmItemMouseOver('+b+',true)" onmousedown="cmItemMouseDownOpenSub ('+b+ ')"':' onmouseover="cmItemMouseOverOpenSub ('+b+')" onmousedown="cmItemMouseDown ('+b+')"')+' onmouseout="cmItemMouseOut ('+b+')" onmouseup="cmItemMouseUp ('+b+')"'}function cmNoClickItem(a,b,c,d,e){_cmItemList[_cmItemList.length]=a;a=_cmItemList.length-1;b="this,"+b+","+(c?"'"+c+"'":"null")+","+e+","+a;return' onmouseover="cmItemMouseOver ('+b+')" onmouseout="cmItemMouseOut ('+b+')"'}function cmNoActionItem(a){return a[1]} function cmSplitItem(a,b,c){a="cm"+a;b?(a+="Main",a=c?a+"HSplit":a+"VSplit"):a+="HSplit";return eval(a)} function cmDrawSubMenu(a,b,c,d,e,g,k){var h='
';d.subMenuHeader&&(h+=d.subMenuHeader);var h=h+(''),f="",m,p,l,q,n;for(q=5;q"):(n=b+"Menu",n+=l?"Folder":"Item",h+='");h+="
',h=null!=m[0]?h+m[0]:h+(l?d.folderLeft:d.itemLeft),h+=''+m[1],h+='',l?(h+=d.folderRight,f+=cmDrawSubMenu(m,b,p,d,e+d.zIndexInc,g,k)):h+=d.itemRight,h+="
";d.subMenuFooter&&(h+=d.subMenuFooter);return h+("
"+f)} function cmDraw(a,b,c,d,e){var g=cmGetObject(a);e||(e=d.prefix);e||(e="");d||(d=_cmNodeProperties);c||(c="hbr");var k=cmAllocMenu(a,b,c,d,e),h=_cmMenuList[k];d.delay||(d.delay=_cmNodeProperties.delay);d.clickOpen||(d.clickOpen=_cmNodeProperties.clickOpen);d.zIndexStart||(d.zIndexStart=_cmNodeProperties.zIndexStart);d.zIndexInc||(d.zIndexInc=_cmNodeProperties.zIndexInc);d.offsetHMainAdjust||(d.offsetHMainAdjust=_cmNodeProperties.offsetHMainAdjust);d.offsetVMainAdjust||(d.offsetVMainAdjust=_cmNodeProperties.offsetVMainAdjust); d.offsetSubAdjust||(d.offsetSubAdjust=_cmNodeProperties.offsetSubAdjust);h.cmFrameMasking=_cmFrameMasking;c="h"!=c.charAt(0);var f=null;c?(f='
')+''):(f='
'),f+="");var m="",p,l,q,n,r;for(p=0;p
"):f+(cmActionItem(l,1,q,h,k)+">");l==_cmSplit&&(l=cmSplitItem(e,1,c));if(l[0]==_cmNoAction||l[0]==_cmNoClick)f+=cmNoActionItem(l),f+=c?"":"";else{var x=c;c=!0;r=e+"Main"+(n?"Folder":"Item");var u= n?d.mainFolderLeft:d.mainItemLeft,w=n?d.mainFolderRight:d.mainItemRight;""!=u&&(f+=c?"',f+=null==l[0]?u:l[0],f+=c?"":"");f+=c?"';f+=l[1];f+=c?"":"";""!=w&&(f+=c?"',f+=w,f+=c?"":"");(c=x)?f+="":t||(f+="
");n&&(m+=cmDrawSubMenu(l,e,q,d,d.zIndexStart,h,k))}}f=c?f+"
":f+"";f+=""+m;g.innerHTML=f} function cmDrawFromText(a,b,c,d){for(var e=null,g=cmGetObject(a).firstChild;g;g=g.nextSibling)if(g.tagName){var k=g.tagName.toLowerCase();if("ul"==k||"ol"==k){e=cmDrawFromTextSubMenu(g);break}}e&&cmDraw(a,e,b,c,d)} function cmDrawFromTextSubMenu(a){var b=[];for(a=a.firstChild;a;a=a.nextSibling)if(a.tagName&&"li"==a.tagName.toLowerCase())if(null==a.firstChild)b[b.length]=_cmSplit;else{for(var c=[],d=a.firstChild,e=!1;d;d=d.nextSibling)if(d.tagName){if("cmNoClick"==d.className){c[0]=_cmNoClick;c[1]=getActionHTML(d);e=!0;break}if("cmNoAction"==d.className){c[0]=_cmNoAction;c[1]=getActionHTML(d);e=!0;break}var g=d.tagName.toLowerCase();if("span"==g){c[0]=d.firstChild?d.innerHTML:null;d=d.nextSibling;break}}if(e)b[b.length]= c;else if(d){for(;d;d=d.nextSibling)if(d.tagName){g=d.tagName.toLowerCase();if("a"==g)c[1]=d.innerHTML,c[2]=d.href,c[3]=d.target,c[4]=d.title,""==c[4]&&(c[4]=null);else if("span"==g||"div"==g)c[1]=d.innerHTML,c[2]=null,c[3]=null,c[4]=null;break}for(;d;d=d.nextSibling)if(d.tagName&&(g=d.tagName.toLowerCase(),"ul"==g||"ol"==g)){d=cmDrawFromTextSubMenu(d);for(i=0;i";for(a=a.firstChild;a&&(!a.tagName||"tbody"!=a.tagName.toLowerCase());a=a.nextSibling);if(!a)return"";for(a=a.firstChild;a&&(!a.tagName||"tr"!=a.tagName.toLowerCase());a=a.nextSibling);return a?a.innerHTML:""} function cmGetMenuItem(a){if(!a.subMenuID)return null;var b=cmGetObject(a.subMenuID);if(a.menu){var c=a.menu,b=b.firstChild.firstChild.firstChild.firstChild,d;for(d=0;de&&(c="l"),"l"==c&&cmGetXAt(a)+cmGetWidth(a)-de&&(c="l"),"l"==c&&cmGetXAt(a)-d parseInt(navigator.appVersion)&&(_cmHideObjects=1)}catch(k){}}1==_cmHideObjects&&(c.cmOverlap||(c.cmOverlap=[]),cmHideControl("IFRAME",c),cmHideControl("OBJECT",c))}function cmResetMenu(a,b){if(a.cmItems){var c,d,e=a.cmItems;for(c=0;cc+e||f+pd+g||m+la?(this.percent+=this.speed,cmTimeEffect(this.menu.id,this.show,10)):this.show&&this.base.finishShowing())}; CMSlidingEffectInstance.prototype.hideEffect=function(a){this.base.canHide(a)&&(a=this.percent,"h"==this.slideOrient?this.slideMenuV():this.slideMenuH(),0a&&(a=0);100a&&(a=0);100=a?a=10:100<=a&&(a=100):a=10;this.speed=a} CMSlidingEffect.prototype.getInstance=function(a,b){return new CMSlidingEffectInstance(a,b,this.speed)};function CMFadingEffectInstance(a,b,c){this.base=new CMSpecialEffectInstance(this,a);a.style.overflow="visible";this.showSpeed=b;this.hideSpeed=c;this.opacity=0} CMFadingEffectInstance.prototype.showEffect=function(a){if(this.base.canShow(a)){a=this.menu;var b=this.opacity;this.setOpacity();0==b&&this.base.startShowing();100>b?(this.opacity+=10,cmTimeEffect(a.id,this.show,this.showSpeed)):this.show&&this.base.finishShowing()}};CMFadingEffectInstance.prototype.hideEffect=function(a){this.base.canHide(a)&&(a=this.menu,this.setOpacity(),0