/* * ../SourceForge/trunk/mathjax/extensions/MathMenu.js * * Copyright (c) 2010 Design Science, Inc. * * Part of the MathJax library. * See http://www.mathjax.org for details. * * Licensed under the Apache License, Version 2.0; * you may not use this file except in compliance with the License. * * http://www.apache.org/licenses/LICENSE-2.0 */ MathJax.Unpack([ ['(','function(','b,c,f','){var ','k="1.0.2";var i=','b.Browser.','isPC,g=',5,'isMSIE;var e=(i?null:"5px");var j=b.Insert({delay:150,helpURL',':"http://www.mathjax.org','/help/user/",','showRenderer',':true,','showFontMenu',':false,','showContext',14,'windowSettings',':{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:100,height:50},styles:{".','MathJax_Menu','":{','position:"absolute','","','background-color','":"white",color:"black",width:"auto",','padding:(i?"2px','":"5px 0px"),border:"','1px solid #CCCCCC','",margin:0,','cursor:"default','",font:"menu","','text-align":"','left","text-indent":0,"text-transform','":"none","','line-height','":"normal","','letter-','spacing":"normal","word-',37,'wrap',35,'white-space":"nowrap","float',33,'z-index":','201,"','border-radius":e',',"-webkit-',45,',"-moz-',45,',"-khtml-',45,',"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\'gray\', Positive=\'true','\')"},".','MathJax_MenuItem','":{',25,' 2em":"1px 2em"),background:"transparent','"},".','MathJax_MenuTitle','":{"',23,'":"#CCCCCC",margin:(i?"-1px -1px 1px -1px":"-5px 0 0 0"),"',31,'center","','font-style":"italic','","font-size":"','80%",color:"#444444",padding:"2px 0",overflow:"hidden',58,'MathJax_MenuArrow','":{',21,'",right:".5em",color:"#666666','","font-family":(g?"\'Arial unicode MS\'":null)},".','MathJax_MenuActive',' .',69,'":{color:"','white',58,'MathJax_MenuCheck','":{',21,'",left:".7em',73,'MathJax_MenuRadioCheck','":{',21,'",left:(i?"1em":".7em")},".','MathJax_MenuLabel','":{',25,' 2em 4px 1.33em":"1px 2em 3px 1.33em"),"',65,58,'MathJax_MenuRule',60,'border-top":(i?"',27,'":"1px solid #DDDDDD"),margin:(i?"4px 1px 0px":"4px 3px")},".','MathJax_MenuDisabled',77,'GrayText',58,74,60,23,'":(i?"Highlight":"#606872"),color:(i?"HighlightText":"white")}}},(b.config.MathMenu||{}));var d=',1,'l){if(!l){l=window.event}if(','l){if(','l.preventDefault','){',111,'()}if(','l.stopPropagation','){',115,'()}l.cancelBubble=true;l.returnValue=false}','return ','false};var a=','MathJax.','Menu','=MathJax.Object.Subclass({','version:k,items:[],posted',14,'title:null,margin:5,Init:',1,'l){this.items=[].','slice.call(arguments,','0)},With:',1,'l){if(l){b.Insert(this,l)}return this},','Post:',1,'n,v','){if(!n){n=window.event}','var t=(!this.title?null:[["div",{','className:"',59,'"},[this.','title]]]);var l','=document.getElementById("MathJax_MenuFrame','");if(!l){l','=a.Background(','this)}var o=c','.addElement(','l',',"div",{','onmouseup:a.Mouseup,','ondblclick',':this.False,ondragstart:this.False,onselectstart:this.False,','oncontextmenu',':this.False,','menuItem',':this,',138,19,'"},t);for(var q=0,p=this.items.length;q
',163,161,'-this.margin','){u=',163,161,'-o.',161,178,'}a.skipUp=true}else{var r="left",w=v.',161,';u=v.',161,'-2;s=0;while(v&&v!==l){u+=v.offsetLeft;s+=v.offsetTop;v=v.parentNode}if(u+o.',161,'>',163,161,178,'){r="right";u=Math.max(this.margin,u-w-o.',161,'+6)}if(!i){o.style["borderRadiusTop','"+r]=0;o.style["','WebkitBorderRadiusTop',198,'MozBorderRadiusTop',198,'KhtmlBorderRadiusTop"+r]=0}}o.style.left=u+"px";o.style.top=s+"px";if(','document.selection','&&',204,'.empty){',204,'.empty()}','return this.False(','n)},Remove:',1,'l,m){','var n',142,'");if(n){n.','parentNode.removeChild(','n',');if(this.','msieBackgroundBug','){detachEvent("onresize",a.Resize)}}},Mouseup:',1,213,'if(a.skipUp){','delete ','a.skipUp}else{','this.Remove(l,m',')}},False:d},{config:j,div:null,Remove:',1,'l){a.Event(l,this,"','Remove")},Mouseover:',1,230,'Mouseover")},Mouseout:',1,230,'Mouseout")},Mousedown:',1,230,'Mousedown")},Mouseup:',1,230,'Mouseup")},Mousemove:',1,230,'Mousemove")},Event:',1,'n,o,l',136,'var m=o.',154,';if(m&&m[l]){',119,'m[l](n,o)}',119,'null},BGSTYLE:{',21,'",left:0,top:0,"',43,'200,width:"100%",height:"100%",border:0,padding:0,margin:0},Background:',1,'m',3,'n=c',146,'document.','body,"','div",{style:this.BGSTYLE,','id:"MathJax_MenuFrame"},[["',268,154,':m,','onmousedown',':this.Remove}]]);var l=n.','firstChild',';if(m.',220,'){l.style.backgroundColor="white";l.style.filter="alpha(opacity=0)";n.width=n.height=0;this.Resize();attachEvent("onresize",this.Resize)}else{l','.style.position="','fixed"}',119,'n},Resize:','function(){','setTimeout(','a.SetWH,0)},SetWH:','function(){var ','l',142,'");if(l){l=l.',275,';l',159,'=l.style.height="1px";l',159,'=',163,'scrollWidth+"px";l.style.height=',163,'scrollHeight','+"px"}},saveCookie:',283,'c.Cookie.Set("menu",this.cookie)},getCookie:',283,'this.cookie=c.Cookie.Get("menu")}});var h=a.ITEM',123,'name:"",Create:',1,'m){if(!','this.hidden',3,'l={onmouseover:a.Mouseover,onmouseout:a.Mouseout,',149,273,151,'onselectend',153,138,54,'",',154,':this};if(this.disabled){','l.className+=" ',100,'"}c',146,'m,"div",l,this.Label(l,m))}},Mouseover:',1,'q,s','){if(!this.disabled){','this.Activate(s)}','if(!this.menu||!this.menu.posted){','var r',142,'").childNodes,','n=s','.parentNode.childNodes;for(var ','o=0,l=n.length;o
");',720,'("");n.',266,'close();var p=n.',163,275,';var o=(n.outerHeight-n.innerHeight)||30,m=(n.outerWidth-n.innerWidth)||30;m','=Math.min(Math.floor(0.5*screen.','width),p.',161,'+m+25);o',731,'height),p.offsetHeight+o+25);n.resizeTo(m,o);if(q&&q.screenX!=null',3,'l','=Math.max(0,Math.min(q.','screenX-Math.floor(m/2),screen.width-m-20)),s',739,'screenY-Math.floor(o/2),screen.height-o-20));n.moveTo(l,s)}',225,670,'w};a.Scale=',286,'m=',551,552,'"],l=',551,'.NativeMML;var o=(m?m','.config.scale',':l',753,');var n=prompt("Scale all mathematics (compared to surrounding text) by",o+"%");if(n){if(n.match(/^\\s*\\d+\\s*%?\\s*$/)){n=parseInt(n);if(n){if(n!==o){if(m){m',753,'=n}if(l){l',753,'=n}a.cookie.scale=n;a.saveCookie();b.Reprocess()}}','else{alert("The scale should ','not be zero")}}',761,'be a perentage (e.g., 120%)")}}};a.Zoom=',283,'if(!',121,'Extension.MathZoom){',680,'MathZoom.js")}};a.Renderer=',286,'l=b.config.outputJax["jax/mml"];if(l[0]!==',665,'renderer','){',678,'(["Require','",f,"[MathJax]/','jax/output/"+',665,774,'+"/config.js"],[',286,'p=',551,'[',665,774,'];for(var o=0,n=l.length;o"+r+"