
function GeometryEditor(config)
{GeometryEditor.superclass.constructor.call(this,config);try{var a=this;a.width=null;a.height=null;if(a.authoring){a.cfg={authoring:true,menuIntegration:"OVERRIDE",toolbarIntegration:"OVERRIDE"};}
else
a.cfg={authoring:false,menuIntegration:"MERGE",toolbarIntegration:"MERGE"};if(config)
for(var t in config)
this.cfg[t]=config[t];a.divId=null;a.div=null;a.embed=null;a.embedId=null;a.editorWin=null;a.svgdoc=null;a.data=lxG.defaultValue;a.dataObject=null;a.menu=null;a.toolbar=null;a.editorLoading=false;a.onEditorLoadDoneCalled=false;a.reloadedByFF=false;a.hmenu=null;a.ul=null;a.hmenu2=null;a.ul2=null;a.createWay=null;a.macro=null;a.macros=[];a.nMacros=0;a.cmds={};a.initCmds();if(a.cfg.authoring){a.addMenuset(a.cfg.menuset?a.cfg.menuset:"FULL");a.addToolbarset(a.cfg.toolbarset?a.cfg.toolbarset:"BASE");}
a.finalMenu=null;a.finalToolbar=null;a.disabled=false;a.redefineFlag=false;a.objIds=null;a.objChgListener=null;a.testingExpr=false;a.errMsg=null;a.cmd=null;a.olWin=null;a.sigWin=null;a.olwOn=false;a.sigOn=false;a.macroMode=0;a.x=0;a.y=0;a.initNewStatus=[];}catch(e)
{alert("lxG constructor: "+e.message+" "+e.name+" "+e.lineNumber+" "+e.fileName+" "+e.stack);}}
Ext.extend(GeometryEditor,BaseTool);var lxG=GeometryEditor,lxGP=lxG.prototype;lxG.APIs={"set":{"desc0":"set value","desc":"set the value of an object","args":[{"type":"id","notNull":true,"desc":"the object to be set"},{"type":"expr","notNull":true,"desc":"the property"}]}};lxG.defaultValue={"width":700,"height":500,"menu":{},"toolbar":[],"macros":[],"data":[]};lxG.toolBasePath=_lx_browser.systemBasePath+"GeometryEditor/";lxGP.calXY=function()
{var x=0,y=0,t1,t2;t1=this.div;while(t1)
{y+=t1.offsetTop;t2=parseInt(t1.clientTop);if(isNaN(t2))
t2=parseInt(t1.style.borderTopWidth);if(!isNaN(t2))
y+=t2;t1=t1.offsetParent;}
this.x=x;this.y=y;}
lxGP.isThere=function()
{return!!this.editorWin.svgNS;};lxGP.getDescendents=function(id)
{var t=this.editorWin.ids[id],gUtil=this.editorWin.gUtil,r=null;if(t)
{gUtil.getAllDescendents([t],0,0,false,false,false);for(i=0;i<gUtil.nDescendents;i++)
{obj=gUtil.descendents[i];if(obj.id)
{if(!r)
r=[];r.push(obj.id);}}}
return r;};lxGP.set=function(id,val,type)
{var ed=this.editorWin,t=ed.ids[id],bak=t.absExpression,s=true;if(t&&t.getVal)
{this.errMsg="The unit for "+id+" is wrong!";try{this.testingExpr=true;if(!ed.testExpr(t,val))
s=false
else
{this.testingExpr=false;ed.updExpr(t,val);}}catch(e)
{ed.updExpr(t,bak);s=false;}}
else
{this.errMsg="Object with id "+id+" not found";s=false;}
this.testingExpr=false;return s;};lxGP.getIds=function()
{var i,arr={};for(i in this.editorWin.ids)
arr[i]=this.editorWin.ids[i].OT2=="Expr";return arr;};lxGP.get=function(id,type)
{var t=this.editorWin.ids[id];if(t&&t.result){if(t.result.getCvtVal)
return t.getVal();else
return t.result.toString();}
return null;};lxGP.getTriplet=function(id,type)
{var t=this.editorWin.ids[id];if(t)
{if(t.result){if(t.result.getCvtVal)
return[t.result.getCvtVal(),t.result.unit.systemUnit.name,t.result.order];else
return[t.result.toString(),"text",0];}
else if(t.OT3=="Function")
{if(t.nP!=0)
return null;return[t.result,"fun",0];}
else
return[t.getTN(),"text",0];}
else
return null;};lxGP.addObjectChangeListener=function(ids,h)
{var i;this.objChgListener=h;this.objIds=[];if(!h)
return;for(i=0;i<ids.length;i++)
this.objIds.push(ids[i]);};lxGP.initCmds=function()
{if(!LX_CMD.aTrees)
LX_CMD.init();for(var t in LX_CMD.sCmds)
this.cmds[t]=[0,0,0,0];};lxGP.resetCmds=function()
{var c;for(var t in this.cmds)
{c=this.cmds[t];c[0]=c[1]=c[2]=c[3]=0;}};lxGP.isLoading=function()
{return this.editorLoading;};lxGP.getData=function()
{if(!this.createWay)
{alert("Fail to call getDataValue() because create() or createHTML() was not called!");return null;}
if(this.editorLoading)
{alert("Fail to call getDataValue() because data from last time is still loading!");return null;}
return this.editorWin.constructDataStr();};lxGP.preCreate=function()
{if(this.createWay)
{alert("Editor Instance "+this.instanceName+" already created!");return false;}
this.editorLoading=true;this.calXY();return true;};lxGP.create=function(cfg)
{a=this;a.divId=cfg.renderTo;a.div=document.getElementById(a.divId);a.div.style.overflow="visible";a.embedId=a.divId+"___embed";if(!a.preCreate())
return;if(cfg.width)
a.width=cfg.width;if(cfg.height)
a.height=cfg.height;a.data=cfg.data;if(!cfg.dom){a.createWay="HTML";var u=lxG.toolBasePath+"js/view.php";var ret="<div style='overflow:auto'><embed xmlns='http://www.w3.org/1999/xhtml' id='"+a.embedId+"' src='"+u+"' width='"+(a.width||400)+"' height='"+(a.height||400)+"' type='image/svg+xml' style='overflow:hidden' /></div>";return ret;}
a.createWay="DOM";a.embedDiv=document.createElement("div");a.div.appendChild(a.embedDiv);a.embedDiv.style.overflow="auto";var u=lxG.toolBasePath+"js/view.php";var em;if(_lx_browser.isIE)
{em=document.createElement("embed");em.setAttribute("src",u);}
else
{em=document.createElement("object");em.setAttribute("data",u);}
em.setAttribute("width",a.width||400);em.setAttribute("height",a.height||400);em.setAttribute("type","image/svg+xml");em.setAttribute("id",a.embedId);a.embedDiv.appendChild(em);em.style.overflow="hidden";a.embed=em;};lxGP.update=function(cfg)
{if(cfg.width)
this.width=cfg.width;if(cfg.height)
this.height=cfg.height;this.data=cfg.data;if(this.editorLoading)
{alert("Fail to call update() because editor is still loading");return;}
this.updEditorWinContent();};lxGP.updEditorWinContent=function()
{try{if(!this.data||this.data=="{}")
this.dataObject=lxG.defaultValue;else if(typeof this.data=="string")
{try{this.dataObject=eval("("+this.data+")");}catch(e)
{alert("Invalid data format: "+this.data.substr(0,200)+" ...");this.dataObject=lxG.defaultValue;}}
else
this.dataObject=this.data;var w=this.width,h=this.height,t=this.editorWin.svgdoc.getElementById("boundaryBox");if(this.authoring)
{w=this.width||Math.max(_lx_browser.getWindowSize().width-50,1000);h=this.height||1000;this.editorWin.setWH(w,h);}
else
{w=this.width||this.dataObject.width;h=this.height||this.dataObject.height;t.setAttributeNS(null,"style","fill:none; stroke-width: 2; stroke: black;");}
this.embed.setAttribute("width",this.authoring?w:this.dataObject.width);this.embed.setAttribute("height",this.authoring?h:this.dataObject.height);this.embedDiv.style.width=(w+5)+"px";this.embedDiv.style.height=(h+5)+"px";this.resetCmds();t=this.setupMenu();if(t>w)
w=t;t=this.setupToolbar();if(t>w)
w=t;this.div.style.width=(w+5)+"px";this.setupMacros();if(this.cfg['authoring'])
lxG.execCommand(null,this.instanceName,'Tools Signature Window');this.editorWin.updDrawing(this.dataObject);}catch(e)
{alert("lxG.setupMenu "+e.message+" "+e.name+" "+e.lineNumber+" "+e.fileName+" "+e.stack);}};lxGP.postUpdDrawing=function()
{if(this.editorLoading)
{this.editorLoading=false;this.onCreated();}
else
{if(this.reloadedByFF)
{this.reloadedByFF=false;if(window.GeometryEditor_OnFFReloadDone)
GeometryEditor_OnFFReloadDone(this);return;}
this.onUpdated();}};lxGP.addMenuset=function(m)
{if(this.createWay)
{alert("addMenuset() must be called before "+(this.createWay=="DOM"?"create()":"createHTML()"));return;}
if(typeof m=="string")
m=LX_CMD.PREDEFINED_GUIS[m];if(m&&(m instanceof Array))
m=LX_CMD.toStdMenuForm(m);if(!m)
{alert("Unrecognized menuset definition by the site!");return;}
if(!this.menu)
this.menu=m;else
LX_CMD.mergeMenu(this.menu,m,false);};lxGP.setupMenu=function()
{try{var tw,tul,tli,tul2,tli2,i,j,m,m2,b,c,ta,t,cmds=LX_CMD.aCmds,tp=this.div,tul3,tli3,timg3;if(this.hmenu)
{this.hmenu.destroy();this.hmenu=null;tp.removeChild(this.ul);this.ul=null;}
m=this.dataObject.menu;if(typeof m=="string")
m=LX_CMD.PREDEFINED_GUIS[m];if(m&&(m instanceof Array))
m=LX_CMD.toStdMenuForm(m);if(!m)
{alert("Unrecognized menu definition in the object!");return;}
for(t in m)
for(i=0;i<m[t].length;i++)
if(LX_CMD.sCmds[m[t][i]])
this.cmds[m[t][i]][0]=1;if(this.menu)
{m2=this.menu;if(this.cfg.menuIntegration=="MERGE")
m2=LX_CMD.mergeMenu(m2,m,true);m=m2;}
for(t in m)
for(i=0;i<m[t].length;i++)
if(LX_CMD.sCmds[m[t][i]])
this.cmds[m[t][i]][2]=1;this.finalMenu=m;for(t in m)
{if(m[t].length==0)
continue;if(!this.ul)
{tw=lxEM.randomString();window[tw]=this.editorWin;this.ul=tul=document.createElement("ul");tul.setAttribute("id",tw);tp.insertBefore(tul,this.embedDiv);tul.style.visibility="hidden";}
tli=document.createElement("li");tli.appendChild(document.createTextNode(t));tul.appendChild(tli);tul2=document.createElement("ul");tli.appendChild(tul2);for(i=0;i<m[t].length;i++)
{b=m[t][i];c=cmds[b];if(!c)
{alert("Unrecognized menu item command: "+b);continue;}
tli2=document.createElement("li");tul2.appendChild(tli2);if(b!="Macro")
{ta=document.createElement("a");tli2.appendChild(ta);ta.appendChild(document.createTextNode((c[3]=="")?b:c[3]));ta.href="javascript:"+"lxG.execCommand(this,'"+this.instanceName+"','"+b+"')";ta.title=(c[4]=="")?b:c[4];}
else
tli2.appendChild(document.createTextNode("Macro"));if(b=="Tools in Draw Mode")
{timg3=document.createElement("img");tli2.appendChild(timg3);timg3.src=lxG.toolBasePath+"hmenu/icons/checkbox-"+(1-this.macroMode)+".gif";}
else if(b=="Object List Window")
{timg3=document.createElement("img");tli2.appendChild(timg3);timg3.src=lxG.toolBasePath+"hmenu/icons/checkbox-"+(this.olwOn?1:0)+".gif";}
else if(b=="Tools Signature Window")
{timg3=document.createElement("img");tli2.appendChild(timg3);timg3.src=lxG.toolBasePath+"hmenu/icons/checkbox-"+(this.sigOn?1:0)+".gif";}
else
{timg3=document.createElement("img");tli2.appendChild(timg3);timg3.src=lxG.toolBasePath+"hmenu/icons/radio-0.gif";}
tli2.id=b;if(b=="Macro")
{tul3=document.createElement("ul");tli2.appendChild(tul3);for(j=0;j<lxG.MAXMACROS;j++)
{tli3=document.createElement("li");tul3.appendChild(tli3);timg3=document.createElement("img");tli3.appendChild(timg3);ta=document.createElement("a");tli3.appendChild(ta);ta.appendChild(document.createTextNode("Macro"+j));ta.href="javascript:"+"lxG.execCommand(this,'"+this.instanceName+"','"+b+"')";tli3.id="Macro"+j;timg3.src=lxG.toolBasePath+"hmenu/icons/radio-0.gif";}}}}
if(this.ul)
{this.hmenu=DynarchMenu.setup(tw,{tooltips:true});if(this.hmenu.items["Macro"])
{for(i=0;i<lxG.MAXMACROS;i++)
this.hmenu.items["Macro"+i].display(false);this.hmenu.items["Macro"].disable(true);}}
return 0;}catch(e)
{alert("lxG.setupMenu "+e.message+" "+e.name+" "+e.lineNumber+" "+e.fileName+" "+e.stack);}};lxGP.addToolbarset=function(m)
{if(this.createWay)
{alert("addToolbarset() must be called before "+(this.createWay=="DOM"?"create()":"createHTML()"));return;}
if(typeof m=="string")
m=LX_CMD.PREDEFINED_GUIS[m];if(!m)
{alert("Unrecognized toolbarset definition by the site!");return;}
if(!this.toolbar)
this.toolbar=m;else
LX_CMD.mergeToolbar(this.toolbar,m,false);};lxG.MAXMACROS=30;lxGP.setupToolbar=function()
{try{var tw,tul,tli,i,j,m,m2,timg,b,c,tp=this.div,tul3,tli3,timg3,t;if(this.hmenu2)
{this.hmenu2.destroy();this.hmenu2=null;tp.removeChild(this.ul2);this.ul2=null;}
m=this.dataObject.toolbar;if(typeof m=="string")
m=LX_CMD.PREDEFINED_GUIS[m];if(!m)
{alert("Unrecognized toolbar definition in the object!");return;}
for(i=0;i<m.length;i++)
if(LX_CMD.sCmds[m[i]])
this.cmds[m[i]][1]=1;if(this.toolbar)
{m2=this.toolbar;if(this.cfg.toolbarIntegration=="MERGE")
m2=LX_CMD.mergeToolbar(m2,m,true);m=m2;}
for(i=0;i<m.length;i++)
if(LX_CMD.sCmds[m[i]])
this.cmds[m[i]][3]=1;this.finalToolbar=m;if(m.length>0)
{tw=lxEM.randomString();window[tw]=this.editorWin;this.ul2=tul=document.createElement("ul");tul.setAttribute("id",tw);tp.insertBefore(tul,this.embedDiv);tul.style.visibility="hidden";}
for(i=0;i<m.length;i++)
{b=m[i];c=LX_CMD.aCmds[b];if(!c)
{alert("Unrecognized toolbar button command: "+b);continue;}
tli=document.createElement("li");tli.id=b;timg=document.createElement("img");tul.appendChild(tli);if(b!="Macro")
{ta=document.createElement("a");tli.appendChild(ta);ta.appendChild(timg);ta.href="javascript:"+"lxG.execCommand(this,'"+this.instanceName+"','"+b+"')";ta.title=(c[4]=="")?b:c[4];}
else
tli.appendChild(document.createTextNode("Macro"));timg.src=lxG.toolBasePath+"/icons/"+((c[1]=="")?"paw_blue.gif":c[1]);if(b=="Macro")
{tul3=document.createElement("ul");tli.appendChild(tul3);for(j=0;j<lxG.MAXMACROS;j++)
{tli3=document.createElement("li");tul3.appendChild(tli3);timg3=document.createElement("img");tli3.appendChild(timg3);ta=document.createElement("a");tli3.appendChild(ta);ta.appendChild(document.createTextNode("Macro"+j));ta.href="javascript:"+"lxG.execCommand(this,'"+this.instanceName+"','"+b+"')";tli3.id="Macro"+j;timg3.src=lxG.toolBasePath+"hmenu/icons/radio-0.gif";}}}
if(this.ul2)
{this.hmenu2=DynarchMenu.setup(tw,{toolbar:true,tooltips:true});t=this.hmenu2.items["Mover"];if(t)
t.setPressed(true);t=this.hmenu2.items["Macro"];if(t)
{for(i=0;i<lxG.MAXMACROS;i++)
this.hmenu2.items["Macro"+i].display(false);t.disable(true);}
t=this.hmenu2.items["Tools in Draw Mode"];if(t)
t.setPressed(this.macroMode==0);t=this.hmenu2.items["Object List Window"];if(t)
t.setPressed(this.olwOn);t=this.hmenu2.items["Tools Signature Window"];if(t)
t.setPressed(this.sigOn);}
return m.length*LX_CMD.iconWidth;}catch(e)
{alert("lxG.setupToolbar "+e.message+" "+e.name+" "+e.lineNumber+" "+e.fileName+" "+e.stack);}};lxGP.disableMainWin=function(t)
{this.disabled=t;var i;if(this.hmenu)
for(i in this.hmenu.items)
this.hmenu.items[i].disable(t);if(this.hmenu2)
for(i in this.hmenu2.items)
this.hmenu2.items[i].disable(t);};lxG.execCommand=function(action,instanceName,cmd)
{try{var i,item,editor=BaseTool.getInstance(instanceName),editorWin=editor.editorWin,gEL=editorWin.gEL,c=LX_CMD.sCmds,h1=editor.hmenu,h2=editor.hmenu2,grp,idx,bReset,m,cmd2,s=lxG.toolBasePath+"hmenu/icons/radio-",t0=s+"0.gif",t1=s+"1.gif";if(gEL.major=="macro")
{gEL.statusObj.rollbackPhases();gEL.statusObj.startPhases();}
editor.cmd=cmd;editor.redefineFlag=false;bReset=false;if(cmd!="Macro")
{grp=LX_CMD.cmdGroups['Tools'];for(i=0;i<grp.length;i++)
if(grp[i]==cmd)
{bReset=true;break;}
cm=LX_CMD.aCmds[cmd];if(cm[2]==0)
editorWin.execCmd(cm[0]);else if(cm[2]==2)
{m=editorWin.gML.stdMacros[cm[7]];if(editor.macroMode==0)
{bReset=true;editorWin.execMacro(m.macroIdx);}
else
editor.macroDraw(m);}
else
cm[0][0].apply(editor,cm[0][1]);}
else
{if(action)
item=action.info;idx=parseInt(item.id.substr(5));cmd2="Macro"+idx;m=editorWin.gML.macros[idx+editorWin.gML.nStdMacros];if(editor.macroMode==0)
{bReset=true;editorWin.execMacro(m.macroIdx);}
else
editor.macroDraw(m);}
if(bReset)
{if(h1)
for(i in h1.items)
{if(i=="Tools in Draw Mode"||i=="Object List Window"||i=="Tools Signature Window")
continue;h1.items[i].icon.src=(i==cmd||i==cmd2)?t1:t0;}
if(h2)
for(i in h2.items)
{if(i=="Tools in Draw Mode"||i=="Object List Window"||i=="Tools Signature Window")
continue;h2.items[i].setPressed(i==cmd||i==cmd2);}}
if(cmd=="Tools in Draw Mode")
lxG.execCommand(null,editor.instanceName,'Mover');else
editorWin.gOM.updGUI();editor.updSigW()}catch(e)
{alert("lxG.toolbarHandler "+e.message+" "+e.name+" "+e.lineNumber+" "+e.fileName+" "+e.stack);}};lxGP.macroDraw=function(m)
{var ew=this.editorWin,gOM=ew.gOM,t,n=gOM.getNSels(),i,arr;this.macro=m;if(this.macroMode==1)
{t=ew.PRCHECK0(m.psInfo,gOM.sels,n,2);n=ew.gBOI.nP;if(ew.Util.sizeOut==0)
{arr=[];for(i=0;i<n;i++)
arr.push(ew.gBOI.ps[i]);t=m.simulate(arr,n);ew.gBOI.reset();if(t<=0)
alert('The selection of "'+ew.gBOI.ps[(-t)].getTN()+'" makes an output object with wrong unit');return;}}
LX_Dialog.call(this,"create","dlgCreate.html");};lxGP.addMacro=function(name,dataStr)
{var n;if(!name)
var name="Macro"+(this.nMacros);this.macros[this.nMacros]=m={"idx":this.nMacros,"URL":"local","name":name,"data":dataStr,"mo":null};this.nMacros++;if(this.createWay&&!this.editorLoading)
this.setupMacro(m);return m.idx;};lxGP.setupMacro=function(m)
{if(!m.mo)
m.mo=this.editorWin.gML.newMacroFromStr(m.data);m.mo.name=m.name;var t=null,n="Macro"+m.idx;if(this.hmenu)
t=this.hmenu.items["Macro"];if(t)
{t.disable(false);t=this.hmenu.items[n];t.disable(false);t.display(true);t.setLabel(m.name);}
t=null;if(this.hmenu2)
t=this.hmenu2.items["Macro"];if(t)
{t.disable(false);t=this.hmenu2.items[n];t.disable(false);t.display(true);t.setLabel(m.name);}};lxGP.setupMacros=function()
{var i,ms=this.dataObject.macros,m;if(ms)
for(i=0;i<ms.length;i++)
{m=ms[i];this.macros[this.nMacros]={"idx":this.nMacros,"URL":m.URL,"name":m.name,"data":m.data,"mo":null};this.nMacros++;}
for(i=0;i<this.nMacros;i++)
this.setupMacro(this.macros[i]);};lxGP.getMacroByIdx=function(idx)
{if(idx<0||idx>=this.nMacros)
{alert("Macro index "+idx+" is out of range!");return"";}
return this.editorWin.gML.macros[idx+this.editorWin.gML.nStdMacros].serializeOut();};lxGP.createSigWin=function()
{var s=this.instanceName;this.sigWin=new Ext.Window({title:'Tool Signature',hidden:true,closeAction:"hide",resizable:true,plain:true,layout:'fit',height:70,width:500,x:150,y:this.y-90,autoScroll:true,html:"<div><span id='"+s+"_mName'>&nbsp;</span><span class='lxNormalSig' id='"+s+"_sig0'>&nbsp;</span></div>"});this.sigWin.on("hide",this.synSigBtn,this);};lxGP.updSigW=function(m,i)
{if(!this.sigOn)
return;var t,s=this.instanceName,t1,tn,n,m,j,i,gEL=this.editorWin.gEL,sto;if(gEL.major=='macro')
{sto=gEL.statusObj;m=sto.macro;i=sto.phase;if(sto.toRenew)
i++;n=m.nGivens+m.nGivens2+m.nGivens3;}
tn=document.getElementById(s+"_mName");t=document.getElementById(s+"_sig0");if(m)
{if(i==0)
{tn.firstChild.nodeValue=m.name+"( ";while(t.nextSibling)
t.parentNode.removeChild(t.nextSibling);t.firstChild.nodeValue=m.givens[0].OT2;for(j=1;j<n;j++)
{t1=document.createElement("span");t1.appendChild(document.createTextNode(" , "));t.parentNode.appendChild(t1);t1=document.createElement("span");t1.id=s+"_sig"+j;t1.className='lxNormalSig';t.parentNode.appendChild(t1);t1.appendChild(document.createTextNode(m.givens[j].OT2));}
t1=document.createElement("span");t1.appendChild(document.createTextNode(" ) "));t.parentNode.appendChild(t1);}
if(i>0)
document.getElementById(s+"_sig"+(i-1)).className='lxNormalSig';if(sto.toRenew)
{for(j=i;j<n;j++)
document.getElementById(s+"_sig"+j).className='lxActiveSig';}
document.getElementById(s+"_sig"+i).className='lxActiveSig';}
else
{while(t.nextSibling)
t.parentNode.removeChild(t.nextSibling);tn.firstChild.nodeValue="";t.firstChild.nodeValue="";}};lxGP.createOLWin=function()
{var s=this.instanceName,s1=lxG.toolBasePath;this.olWin=new Ext.Window({hidden:true,closeAction:"hide",title:'Object List',resizable:true,plain:true,layout:'fit',height:400,width:300,x:600,y:this.y-10,autoScroll:true,html:"<div id='"+(this.instanceName+'_olClientArea')+"'><table width='95%' class='lxOLTbl' cellspacing='0' cellpadding='0' border='0'><tbody id='"+s+"_olTbl' ><tr><th><img title='Help' src='"+s1+"icons/help.gif' onclick='lxG.olwHelp()' /></th><th>#</th><th>Description</th><th>Visible</th></tr></tbody></table></div>"});this.olWin.on("hide",this.synOLBtn,this);};lxGP.updOLW=function(noScroll,noAnce,noDesc)
{if(!this.olwOn)
return;var div=document.getElementById(this.instanceName+'_olClientArea');var tbody=document.getElementById(this.instanceName+'_olTbl'),tr=tbody.firstChild.nextSibling,td,ed=this.editorWin,arr=ed.objectsInOrder,n=ed.numOfObjects,nSel,i,j=0,obj,cn,tn,ti,t,gOM=ed.gOM,gUtil=ed.gUtil,tv;for(i=0;i<n;i++)
{obj=arr[i];if(obj.OT1Idx==-1)
continue;cn=''+(j++);ti=obj.gIdx+'';tn=obj.getTN();tv=(obj.OT1=="Logic"||!obj.systemSetVisible)?"N/A":(obj.visible?"Y":"N");if(!tr)
{tr=document.createElement('tr');tbody.appendChild(tr);obj.olwTr=tr;td=document.createElement('td');tr.appendChild(td);td.className="lxCN";td.appendChild(document.createTextNode(cn));td=document.createElement('td');tr.appendChild(td);td.appendChild(document.createTextNode(ti));td=document.createElement('td');tr.appendChild(td);td.appendChild(document.createTextNode(tn));td=document.createElement('td');tr.appendChild(td);td.appendChild(document.createTextNode(tv));if(tr.addEventListener)
{tr.addEventListener('click',lxG.olwClick,true);}
else
{tr.attachEvent("onclick",lxG.olwClick);}}
else
{obj.olwTr=tr;td=tr.firstChild;td.firstChild.nodeValue=cn;td=td.nextSibling;td.firstChild.nodeValue=ti;td=td.nextSibling;td.firstChild.nodeValue=tn;td=td.nextSibling;td.firstChild.nodeValue=tv;}
tr=tr.nextSibling;}
if(tr)
{while(tbody.lastChild!=tr)
tbody.removeChild(tbody.lastChild);tbody.removeChild(tr);}
for(i=0;i<n;i++)
{obj=arr[i];if(obj.OT1Idx==-1)
continue;obj.olwTr.style.backgroundColor=obj.selected?"blue":"#ffffff";obj.olwTr.style.color=obj.selected?"#ffffff":"#000000";}
nSel=gOM.getNSels();if(nSel>0)
{obj=gOM.getSel(nSel-1);if(!noScroll)
div.scrollTop=parseInt(obj.olwTr.firstChild.firstChild.nodeValue)/n*div.scrollHeight-40;if(nSel==1)
{if(!noAnce)
{gUtil.getAllAncestors(gOM.sels,0,0,false,true,true);for(i=0;i<gUtil.nAncestors;i++)
gUtil.ancestors[i].olwTr.style.backgroundColor="#cccccc";}
if(!noDesc)
{gUtil.getAllDescendents(gOM.sels,0,0,false,true,true);for(i=0;i<gUtil.nDescendents;i++)
gUtil.descendents[i].olwTr.style.backgroundColor="#cccccc";}
if(!noAnce)
for(i=0;i<obj.nP;i++)
obj.ps[i].olwTr.style.backgroundColor="#888888";if(!noDesc)
for(i=0;i<obj.nC;i++)
obj.cs[i].olwTr.style.backgroundColor="#888888";}}};lxGP.synSigBtn=function(){this.synPanelBtn(0);};lxGP.synOLBtn=function(){this.synPanelBtn(1);};lxGP.synPanelBtn=function(i){var ton,tcmd,tupd,tw,w;w=panelMeta[i];tcmd=w[0];tw=w[1];ton=this[tw]&&!this[tw].hidden;tupd=w[3];this[w[4]]=ton;var t,s=lxG.toolBasePath+"hmenu/icons/checkbox-",t0=s+"0.gif",t1=s+"1.gif";if(this.hmenu)
{t=this.hmenu.items[tcmd];if(t)
t.icon.src=s+(ton?1:0)+".gif";}
if(this.hmenu2)
{t=this.hmenu2.items[tcmd];if(t)
t.setPressed(ton);}
if(ton)
this[tupd]();};lxG.olwHelp=function()
{window.open(lxG.toolBasePath+"dialogs/olwhelp.html",'','resizable, top=100, left=700, width=300, height=300');};lxG.olwClick=function(evt)
{if(!evt)
var evt=window.event;var tr=evt.target||evt.srcElement;while(tr.tagName.toLowerCase()!='tr')
tr=tr.parentNode;var i,j,t=tr.parentNode.id,t1=t.substr(0,t.lastIndexOf('_')),ed=BaseTool.getInstance(t1),idx=parseInt(tr.firstChild.firstChild.nodeValue),win=ed.editorWin,obj=win.objectsInOrder[idx],gEL=win.gEL,gOM=win.gOM;if(gEL.major=='move1')
{gOM.switchSel(obj);lxG.updGUI(t1,true);}
else if(gEL.major=='dialog')
{for(i=1;i<gEL.types.length;i++)
for(j=0;j<gEL.nTypes[i];j++)
{t=gEL.types[i][j].name;if(obj.isType(t))
{if(gOM.refObj)
{t1=win.hasPathFrom(gOM.refObj,obj);if(gOM.refObjSign&&t1||!gOM.refObjSign&&!t1)
return;}
if(gOM.refFun&&!gOM.refFun(obj))
return;lxG.selObj(ed.instanceName,gEL.minor,obj);return;}}
if(gEL.checkII&&obj.OT2.indexOf("Recurs")!=-1)
lxG.selObj(ed.instanceName,gEL.minor,obj);}};lxG.onDataLoadDone=function(editorWin)
{var s,t;for(t in lxG.instances)
{if(lxG.instances[t].editorWin==editorWin){lxG.instances[t].postUpdDrawing();break;}}};lxG.onEditorLoadDone=function(editorWin)
{var editor,i,embed,svgdoc;for(var t in lxG.instances)
{embed=document.getElementById(lxG.instances[t].embedId);if(!embed)
continue;try{if(embed.contentDocument)
svgdoc=embed.contentDocument;else
svgdoc=embed.getSVGDocument();}
catch(e){continue;}
if(svgdoc==editorWin.document)
{editor=lxG.instances[t];editor.embedDiv=embed.parentNode;editor.embed=embed;editor.editorWin=editorWin;editor.editorWin.editor=editor;editor.svgdoc=editorWin.document;editorWin.instanceName=editor.instanceName;editorWin.AUTHORING=editor.cfg['authoring'];}}
editor.reloadedByFF=editor.onEditorLoadDoneCalled;editor.onEditorLoadDoneCalled=true;editor.updEditorWinContent();};lxG.serializeMacros=function(instanceName)
{var ed=lxG.instances[instanceName];var i,m,t=['['],b=false;for(i=0;i<ed.nMacros;i++)
{m=ed.macros[i];if(m.URL=="local")
continue;if(b)
t[t.length]=",";t.push('{"URL":"',m.URL,'","name":"',m.name,'"');if(m.URL=="document")
t.push(',"data":',m.mo.serializeOut());t[t.length]="}";b=true;}
t[t.length]="]";return t.join('');};lxG.serializeMenu=function(instanceName)
{var editor=lxG.instances[instanceName],c=editor.cmds;var t,i,s,tt=[],trees=LX_CMD.sTrees,cmds=LX_CMD.sCmds,b=false;var a=['{'];for(i=0;i<trees.length;i++)
tt[i]=['"',trees[i],'":['];for(t in cmds)
if(c[t][0]==1)
tt[cmds[t][6]].push('"',t,'"',",");for(i=0;i<trees.length;i++)
{s=tt[i];if(s.length>3)
{s[s.length-1]="]";if(b)
a.push(",");a.push(s.join(''));b=true;}}
a[a.length]="}";return a.join('');};lxG.serializeToolbar=function(instanceName)
{var editor=lxG.instances[instanceName],c=editor.cmds;var items=LX_CMD.PREDEFINED_GUIS["FULL"],i,b=false;var a=['['];for(i=0;i<items.length;i++)
{if(c[items[i]][1]==1)
{if(b)
a.push(',');a.push('"',items[i],'"');b=true;}}
a[a.length]="]";return a.join('');};lxG.initNewStatus=function(instanceName,dlgIdx)
{var ed=lxG.instances[instanceName],f=ed.initNewStatus[dlgIdx];if(f)
f.call(ed,ed.getDlgObj(dlgIdx));};lxG.selObj=function(instanceName,dlgIdx,obj)
{var win=lxEM.instances[instanceName].getDlgObj(dlgIdx).win;if(win&&!win.closed)
{if(win.selObj)
return win.selObj(obj);}
return false;};lxG.errReport=function(iName,msg)
{if(window.GeometryEditor_errorReport)
GeometryEditor_errorReport(iName,msg);else
alert(iName+' '+msg);};lxG.updGUI=function(instanceName,noScroll)
{var editor=lxG.instances[instanceName],editorWin=editor.editorWin,t,gOM=editorWin.gOM,b,c,r,n=gOM.getNSels(),i,psInfo;if(editor.disabled)
return;for(b in editor.cmds)
{t=editor.cmds[b];if(t[2]||t[3])
{c=LX_CMD.sCmds[b];if(c[2]==2)
{psInfo=editorWin.gML.stdMacros[c[7]].psInfo;if(editor.macroMode==0)
r=editorWin.simplePRCHECK2(psInfo);else
r=editorWin.PRCHECK0(psInfo,gOM.sels,n,2);}
else
r=editorWin.PRCHECK0(c[7],gOM.sels,n,2);if(t[2])
editor.hmenu.items[b].disable(!r);if(t[3])
editor.hmenu2.items[b].disable(!r);}}
t=editor.cmds["Macro"];if(t[2]||t[3])
{r=true;for(i=0;i<editor.nMacros;i++)
{b="Macro"+i;psInfo=editor.macros[i].mo.psInfo;if(editor.macroMode==1)
r=editorWin.PRCHECK0(psInfo,gOM.sels,n,2);else
r=editorWin.simplePRCHECK2(psInfo);if(t[2])
editor.hmenu.items[b].disable(!r);if(t[3])
editor.hmenu2.items[b].disable(!r);}}
editorWin.gBOI.reset();if(editor.olwOn)
editor.updOLW(noScroll);};var panelMeta=[["Tools Signature Window","sigWin","createSigWin","updSigW","sigOn"],["Object List Window","olWin","createOLWin","updOLW","olwOn"]]
LX_WIN=function(i)
{var tw,tcreator,w,ton;w=panelMeta[i];tcmd=w[0];tw=w[1];tcreator=w[2];if(!this[tw])
this[tcreator]();ton=this[tw]&&!this[tw].hidden;ton?this[tw].hide():this[tw].show();this.synPanelBtn(i);};LX_NewMacro=function()
{var gOM=this.editorWin.gOM,gML=this.editorWin.gML,m,t;m=gML.testNewMacro(gOM.sels,gOM.getNSels(),true);if(m==-1)
return;LX_Dialog.call(this,"macro","dlgMacro.html");};LX_MacroMode=function()
{var t,s=lxG.toolBasePath+"hmenu/icons/checkbox-",t0=s+"0.gif",t1=s+"1.gif";t=this.hmenu.items["Tools in Draw Mode"];if(t)
t.icon.src=s+this.macroMode+".gif";this.macroMode=1-this.macroMode;t=this.hmenu2.items["Tools in Draw Mode"];if(t)
t.setPressed(this.macroMode==0);};LX_ExpNewMacro=function()
{var gOM=this.editorWin.gOM,gML=this.editorWin.gML,m,n,t;m=gML.testNewMacro(gOM.sels,gOM.getNSels());if(m==-1)
return;n="Macro"+(m-gML.nStdMacros);t=prompt("\nPlease enter the name of the new macro",n);if(!t||t=="")
return;if(this.hmenu.items["Macro"])
{this.hmenu.items["Macro"].disable(false);this.hmenu.items[n].display(true);this.hmenu.items[n].setLabel(t);}
if(this.hmenu2.items["Macro"])
{this.hmenu2.items["Macro"].disable(false);this.hmenu2.items[n].display(true);this.hmenu2.items[n].setLabel(t);}
m=gML.newMacro();this.macros[this.nMacros]={"idx":this.nMacros,"URL":"document","name":t,"data":m.serializeOut(),"mo":m};m.name=t;this.nMacros++;};LX_Calculator=function(subType)
{var dlgObj=LX_Dialog.call(this,"calculator","dlgCalculator.html",false,setTypes_Cal);dlgObj.openSubType=subType;};LX_Property=function()
{if(this.editorWin.gOM.getNSels()>1)
return;var t1,t,gOM=this.editorWin.gOM;if(gOM.getNSels()==1)
{t=LX_CMD.dps[gOM.getSel(0).OT2];t1=(t&&t[0]&&t[0]!="")?(t[0]+".html"):"dpGeoObject.html";}
else
t1="dpCanvas.html";LX_Dialog.call(this,"property",t1,false,setTypes_Any);};LX_Dialog=function(dlgName,dlgURL,c,f)
{if(c)
this.editorWin.gOM.unSelectAnything();var dlgObj=LXopenDialog(this,dlgName,dlgURL);var t=this.editorWin.gEL;dlgObj.extWin.on("close",t.recoverLastStatus,t);this.initNewStatus[dlgObj.dlgIdx]=f;this.editorWin.gEL.setStatus("dialog",dlgObj.dlgIdx,false);return dlgObj;};LX_Redefine=function()
{var t=LX_CMD.dps[this.editorWin.gOM.getSel(0).OT2];this.redefineFlag=true;if(t)
t[1].call(this);};LX_PlotPoint=function()
{var ew=this.editorWin,gOM=ew.gOM,Util=ew.Util,OT2='PlotPoint',t,n,cs=ew.coordinateSystem;if(!cs)
{alert("Coordinate system is not defined!");return false;}
n=gOM.getNSels();t=ew.PRCHECK0(OT2,gOM.sels,n,2);if(Util.sizeOut==0)
{ew._CO(OT2);return;}
LX_Dialog.call(this,"plotPoint","dlgPlotPoint.html");};function setTypes_Point(){this.editorWin.gEL.setTypes("Point");}
function setTypes_Any(){this.editorWin.gEL.setTypes("Object");}
function setTypes_Cal(dlgObj){var gEL=this.editorWin.gEL;gEL.setTypes("NumAndFun");gEL.setTypes("Transformable");gEL.setTypes("CS");if(dlgObj.openType==LX_WM.OPENBYDIALOG&&dlgObj.dlgOpener.win.getRefObj)
gEL.setRefObj(dlgObj.dlgOpener.win.getRefObj(),true);};LX_CMD={};LX_CMD.iconWidth=35;LX_CMD.aTrees=null;LX_CMD.aCmds=null;LX_CMD.mergeMenu=function(m1,m2,rtnNew)
{var t,i,j,m=m1;if(rtnNew)
{m={};for(t in m1)
{m[t]=[];for(i=0;i<m1[t].length;i++)
m[t].push(m1[t][i]);}}
for(t in m2)
{if(m[t])
{for(i=0;i<m2[t].length;i++)
{for(j=0;j<m[t].length;j++)
if(m2[t][i]==m[t][j])
break;if(j==m[t].length)
m[t].push(m2[t][i]);}}
else
{m[t]=[];for(i=0;i<m2[t].length;i++)
m[t].push(m2[t][i]);}}
return m;};LX_CMD.mergeToolbar=function(m1,m2,rtnNew)
{var i,j,m=m1;if(rtnNew)
{m=[];for(i=0;i<m1.length;i++)
m.push(m1[i]);}
for(i=0;i<m2.length;i++)
{for(j=0;j<m.length;j++)
if(m2[i]==m[j])
break;if(j==m.length)
m.push(m2[i]);}
return m;};LX_CMD.init=function()
{var t,t2,sTr=LX_CMD.sTrees,uTr=LX_CMD.uTrees,sC=LX_CMD.sCmds,uC=LX_CMD.uCmds;if(uTr&&uTr.length>0)
{LX_CMD.aTrees=[];for(t=0;t<sTr.length;t++)
LX_CMD.aTrees.push(sTr[t]);for(t=0;t<uTr.length;t++)
{LX_CMD.aTrees.push(uTr[t]);}}
else
LX_CMD.aTrees=sTr;if(uC)
{LX_CMD.aCmds={};for(t in sC)
LX_CMD.aCmds[t]=sC[t];for(t in uC)
{LX_CMD.aCmds[t]=uC[t];}}
else
LX_CMD.aCmds=sC;};LX_CMD.toStdMenuForm=function(m)
{var i,m2={},tr=LX_CMD.aTrees,cmds=LX_CMD.aCmds,t;for(i=0;i<tr.length;i++)
m2[tr[i]]=[];for(i=0;i<m.length;i++)
if(cmds[m[i]])
{t=cmds[m[i]][6];if(typeof t=="number")
t=tr[t];if(!t)
{alert("Command "+m[i]+" is not assigned to a menu tree!");continue;}
m2[t].push(m[i]);}
return m2;};LX_CMD.uCmds={};LX_CMD.uTrees=[];lxG.defineCommand=function(name,fun,icon,label,tooltip,menuTree,enableCondition)
{if(LX_CMD.sCmds[name])
{alert("Command Name: "+name+"is reserved!");return;}
LX_CMD.uCmds[name]=[fun,icon?icon:"",1,label?label:"",tooltip?tooltip:"","",menuTree?menuTree:"",enableCondition?enableCondition:""];};lxG.defineMenuTree=function(name)
{for(var i=0;i<LX_CMD.sTrees.length;i++)
if(LX_CMD.sTrees[i]==name)
{alert("MenuTree Name: "+name+" is reserved!");return;}
LX_CMD.uTrees.push(name);};LX_CMD.sCmds={"Clear":["_Clear()","",0,"","","",0,""],"Reload":["_Reload();","",0,"","","",0,""],"Undo":["_Undo()","undo.gif",0,"","","",1,"Undo"],"Redo":["_Redo()","redo.gif",0,"","","",1,"Redo"],"Delete":["_Delete()","delete.gif",0,"","","",1,"NObject"],"Style":[[LX_Dialog,["style","dlgStyle.html"]],"",1,"","","",1,"NObject"],"Color":[[LX_Dialog,["pColor","dlgPColor.html"]],"",1,"","","",1,"NObject"],"Show All Hidden":["_ShowAllHidden()","",0,"","","",1,""],"Hide Object(s)":["_HideObject()","",0,"","","",1,"NObject"],"Set Object(s) Manipulable":["_setManipulable(0)","",0,"","","",1,"NObject"],"Set Object(s) NOT Manipulable":["_setManipulable(1)","",0,"","","",1,"NObject"],"Menu Customization":[[LX_Dialog,["custMenu","dlgCustMenu.html",true]],"",1,"","","",1,""],"Toolbar Customization":[[LX_Dialog,["custToolbar","dlgCustToolbar.html",true]],"",1,"","","",1,""],"Properties":[[LX_Property,[]],"property.gif",1,"","","",1,""],"Redefine":[[LX_Redefine,[]],"",1,"","","",1,"OneObject"],"Settings":[[LX_Dialog,['settings','dlgSettings.html']],"",1,"","","",1,""],"Tools in Draw Mode":[[LX_MacroMode,[]],"drawmode.gif",1,"","","",2,""],"Object List Window":[[LX_WIN,[1]],"objlist.gif",1,"","","",2,""],"Tools Signature Window":[[LX_WIN,[0]],"sig.gif",1,"","","",2,""],"Mover":["gEL.setStatus( 'move1', -1, false )","mover.gif",0,"Select or Move object(s)","","",3,""],"Pencil":["gEL.setStatus( 'pencil', -1, false )","pencil.gif",0,"","","",3,""],"Free Point":["gEL.setStatus( 'macro', 0, false )","point.gif",0,"","","",3,""],"Line":["gEL.setStatus( 'macro', 1, false )","line.gif",0,"","","",3,""],"Ray":["gEL.setStatus( 'macro', 2, false )","ray.gif",0,"","","",3,""],"Segment":["gEL.setStatus( 'macro', 3, false )","segment.gif",0,"","","",3,""],"Compass Circle":["gEL.setStatus( 'macro', 4, false );","circle.gif",0,"","","",3,""],"MidPoint":["","",2,"","","",4,"MidPoint"],"Circle With Center And One Point":["","",2,"","","",4,"CompassCircle"],"Circle By Center And Radius":["","",2,"","","",4,"CircleWithCenterAndRadius"],"Parallel Line":["","",2,"","","",4,"ParallelLine"],"Perpendicular Line":["","",2,"","","",4,"PerpendicularLine"],"Line With Two Points":["","",2,"","","",4,"Line"],"Ray With Two Points":["","",2,"","","",4,"Ray"],"Segment With Two Points":["","",2,"","","",4,"Segment"],"Polygon":["_CO( 'BasicPolygon' )","",0,"","","",4,"BasicPolygon"],"Point On an Object":["","",2,"","","",4,"PointOnObject"],"Parallelogram Point":["","",2,"","","",4,"ParallelogramPoint"],"Perpendicular Point":["","",2,"","","",4,"PerpendicularPoint"],"Arc Through Three Points":["","",2,"","","",4,"ArcThroughThreePoints"],"Arc Sector":["","",2,"","","",4,"ArcSector"],"Arc Segment":["","",2,"","","",4,"ArcSegment"],"Mark Center":["_MarkCenter()","",0,"","","",5,"OnePoint"],"Mark Mirror":["_MarkMirror()","",0,"","","",5,"OneStraight"],"Translation":["","",2,"","","",5,"Translation"],"Polar Translation":["","",2,"","","",5,"PolarTranslation"],"Rotation":["","",2,"","","",5,"Rotation"],"Dilation":["","",2,"","","",5,"Dilation"],"Reflection":["","",2,"","","",5,"Reflection"],"Point Reflection":["","",2,"","","",5,"PointReflection"],"Length":["","",2,"","","",6,"Length"],"Slope":["","",2,"","","",6,"Slope"],"Radius":["","",2,"","","",6,"Radius"],"Diameter":["","",2,"","","",6,"Diameter"],"Circumference":["","",2,"","","",6,"Circumference"],"Area":["","",2,"","","",6,"Area"],"Distance":["","",2,"","","",6,"Distance"],"Perimeter":["","",2,"","","",6,"Perimeter"],"Angle By Three Points":["","",2,"","","",6,"AngleByThreePoints"],"Angle":["","",2,"","","",6,"Angle"],"Coordinates":["","",2,"","","",6,"Coordinates"],"Abscissa":["","",2,"","","",6,"Abscissa"],"Ordinate":["","",2,"","","",6,"Ordinate"],"Parallel":["","",2,"","","",6,"Parallel"],"Perpendicular":["","",2,"","","",6,"Perpendicular"],"Collinear":["","",2,"","","",6,"Collinear"],"Tangent":["","",2,"","","",6,"Tangent"],"Point On":["","",2,"","","",6,"PointOn"],"Circle Equation":["","",2,"","","",6,"CircleEq"],"Button Show/Hide":["gBOI.addExtra(true,2,[],-1);_CA('BtnShowOrHide')","",0,"","","",7,"BtnShowOrHide"],"Button Movement":["gBOI.addExtra(true,-1);_CA('BtnMovement')","",0,"","","",7,"BtnMovement"],"Button Sequential Events":["gBOI.addExtra(true,-1);_CA('BtnSequentialEvents')","",0,"","","",7,"BtnSequentialEvents"],"Button Circular Events":["gBOI.addExtra(true,0,[],-1);_CA('BtnCircularEvents')","",0,"","","",7,"BtnCircularEvents"],"Button Animation":["gBOI.addExtra(true,-1);_CA('BtnAnimation')","",0,"","","",7,"BtnAnimation"],"Button Change Expression":[[LX_Dialog,['chgExpr','dlgChgExpr.html']],"",1,"","","",7,"OneExpr"],"User Input":["gBOI.addExtra(true,'');_CO( 'UserInput' )","",0,"","","",7,""],"Text":["gBOI.addExtra(true,2,-1);gBOI.label='Plain Text';_CO( 'Text' );","",0,"","","",7,""],"Ruler":[[LX_Dialog,['ruler','dlgRuler.html']],"",1,"","","",7,""],"Protractor":["_Protractor()","",0,"","","",7,""],"Slider":[[LX_Dialog,['slider','dlgSlider.html']],"",1,"","","",7,""],"Expression":[[LX_Calculator,[0]],"",1,"","","",7,""],"Define Coordinate System":[[LX_Dialog,['cs','dlgCS.html']],"",1,"","","",8,""],"Mark Coordinate System":["_MarkCS()","",0,"","","",8,"OneCS"],"Plot Point":[[LX_PlotPoint,[]],"",1,"","","",8,"PlotPoint"],"New Function":[[LX_Calculator,[1]],"",1,"","","",8,""],"Plot Function":["","",2,"","","",8,"PlotFunction"],"Express New Macro":[[LX_ExpNewMacro,[]],"macro.jpg",1,"","","",9,"NObject"],"New Macro Wizard":[[LX_NewMacro,[]],"macro.jpg",1,"","","",9,"NObject"],"Macro":["","macro.jpg",0,"","","Tools",9,""],"Synchronized Copy":[[LX_Dialog,["synCopy","dlgSynCopy.html",false,setTypes_Point]],"",1,"","","",10,""],"Locus":["_Locus();","",0,"","","",10,"TwoPoint"],"Recursion":[[LX_Dialog,['recursion','dlgRecursion.html']],"",1,"","","",10,"NObject"],"Events":[[LX_Dialog,['events','dlgEvents.html',true]],"",1,"","","",10,""],"Sequence":["gBOI.addExtra(true,-1,2,-1);_CM( 'Sequence' )","",0,"","","",11,"Sequence"],"Sequence Min":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Min' )","",0,"","","",11,"MSequence"],"Sequence Max":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Max' )","",0,"","","",11,"MSequence"],"Sequence Median":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Median' )","",0,"","","",11,"MSequence"],"Sequence Count":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Count' )","",0,"","","",11,"MSequence"],"Sequence Q1":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Q1' )","",0,"","","",11,"MSequence"],"Sequence Q3":["gBOI.addExtra(true,2,-1);_CM( 'MSequence', 'Q3' )","",0,"","","",11,"MSequence"]};LX_CMD.sTrees=["File","Edit","View","Draw","Tools","Transform","Measure","Objects","Graph","Macros","Advanced","Statistics"];LX_CMD.PREDEFINED_GUIS={FULL:["Clear","Reload","Undo","Redo","Delete","Style","Color","Show All Hidden","Hide Object(s)","Set Object(s) Manipulable","Set Object(s) NOT Manipulable","Menu Customization","Toolbar Customization","Properties","Redefine","Settings","Tools in Draw Mode","Object List Window","Tools Signature Window","Mover","Pencil","Free Point","Line","Ray","Segment","Compass Circle","MidPoint","Circle With Center And One Point","Circle By Center And Radius","Parallel Line","Perpendicular Line","Line With Two Points","Ray With Two Points","Segment With Two Points","Polygon","Point On an Object","Parallelogram Point","Perpendicular Point","Arc Through Three Points","Arc Sector","Arc Segment","Mark Center","Mark Mirror","Translation","Polar Translation","Rotation","Dilation","Reflection","Point Reflection","Length","Slope","Radius","Diameter","Circumference","Area","Distance","Perimeter","Angle By Three Points","Angle","Coordinates","Abscissa","Ordinate","Parallel","Perpendicular","Collinear","Tangent","Point On","Circle Equation","Button Show/Hide","Button Movement","Button Sequential Events","Button Circular Events","Button Animation","Button Change Expression","User Input","Text","Ruler","Protractor","Slider","Expression","Express New Macro","New Macro Wizard","Macro","Define Coordinate System","Mark Coordinate System","Plot Point","New Function","Plot Function","Synchronized Copy","Locus","Recursion","Events","Sequence","Sequence Min","Sequence Max","Sequence Median","Sequence Count","Sequence Q1","Sequence Q3"],BASE:["Undo","Redo","Delete","Mover","Pencil","Free Point","Line","Ray","Segment","Compass Circle","Object List Window","Tools in Draw Mode","Tools Signature Window","Properties"]};LX_CMD.cmdGroups={"Tools":["Mover","Pencil","Free Point","Line","Ray","Segment","Compass Circle"]};LX_CMD.dps={"PlotPoint":["dpPlotPoint",null],"PerpendicularPoint":["dpPPPt",null],"CircleWithCenterAndRadius":["dpCircleR",null],"Expr":["dpExpr",null],"Recursion":["dpRecursion",null],"TranslatePoint":["dpTranslate",null],"TranslateLine":["dpTranslate",null],"TranslateCircle":["dpTranslate",null],"TranslatePolygon":["dpTranslate",null],"PolarTranslatePoint":["dpPolarTranslate",null],"PolarTranslateLine":["dpPolarTranslate",null],"PolarTranslateCircle":["dpPolarTranslate",null],"PolarTranslatePolygon":["dpPolarTranslate",null],"RotatePoint":["dpRotate",null],"RotateLine":["dpRotate",null],"RotateCircle":["dpRotate",null],"RotatePolygon":["dpRotate",null],"DilatePoint":["dpDilate",null],"DilateLine":["dpDilate",null],"DilateCircle":["dpDilate",null],"DilatePolygon":["dpDilate",null],"BtnShowOrHide":["dpShowHide",null],"BtnCircularEvents":["dpCircularEvents",null]};lxG.toolFullName="GeometryEditor";_dynarch_menu_url=_lx_browser.systemBasePath+"hmenu/src/";(function(){var UA=navigator.userAgent,w=window;_dynarch_top=window.parent;try{_dynarch_top._dynarch_menu_test=null;}catch(ex){_dynarch_top=w;}w.is_gecko=/gecko/i.test(UA);w.is_opera=/opera/i.test(UA);w.is_ie=/msie/i.test(UA)&&!is_opera&&!(/mac_powerpc/i.test(UA));w.is_ie5=is_ie&&/msie 5\.[^5]/i.test(UA);w.is_mac_ie=/msie.*mac/i.test(UA);w.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);if(typeof _dynarch_top._dynarch_menu_url=="undefined")_dynarch_top._dynarch_menu_url="/hmenu/";else{_dynarch_top._dynarch_menu_url=_dynarch_top._dynarch_menu_url.replace(/\x2f*$/,'/');if(!/^(https?:|\x2f)/.test(_dynarch_top._dynarch_menu_url)&&_dynarch_top!=window)_dynarch_top._dynarch_menu_url=_dynarch_top.document.URL.replace(/\x2f?[^\x2f]*$/,"/")+_dynarch_top._dynarch_menu_url;}w._dynarch_menu_shadow=new Image();w._dynarch_menu_shadow.src=_dynarch_top._dynarch_menu_url+"img/shadow.png";w._dynarch_menu_ediv="<div unselectable='on'>&nbsp;</div>";})();function DynarchMenu(el,config){var T1,a,i;if(config.d_profile){DynarchMenu.profile={item:0,tree:0};T1=(new Date()).getTime();}this._baseMenuInfo=null;this._popupMenus=[];this._activeKeymap=null;this._globalKeymap=null;this._activePopup=null;this._fixed=false;this.items={};this.target=null;this.config=config;try{this._df=config.frames.popups.document.createDocumentFragment();}catch(e){this._df=null;this._ca=[];}el.parentNode.insertBefore(this.createMenuTree(el,!config.vertical),el);if(this._df){config.container.appendChild(this._df);this._df=null;}else{a=this._ca;for(i=a.length;--i>=0;)config.container.appendChild(a[i]);}if(config.d_profile)alert("DynarchMenu: generated in "+(((new Date()).getTime()-T1)/1000)+" sec.\n"+"containing "+DynarchMenu.profile.item+" items in "+DynarchMenu.profile.tree+" (sub)menus.");if(config.setFocus)config.frames.popups.focus();};DynarchMenu._hiderID=0;DynarchMenu._createHider=function(win){var f=null;if(is_ie&&!is_ie5){var filter='filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);';var id='dynarch-menu-hider-'+(++this._hiderID);win.document.body.insertAdjacentHTML('beforeEnd','<iframe id="'+id+'" scroll="no" frameborder="0" '+'style="position:absolute;visibility:hidden;'+filter+'border:0;top:0;left:0;width:0;height:0;" '+'src="javascript:false;"></iframe>');f=win.document.getElementById(id);}return f;};DynarchMenu._setupHider=function(f,x,y,w,h){if(f){var s=f.style;s.left=x+"px";s.top=y+"px";s.width=w+"px";s.height=h+"px";s.visibility="visible";}};DynarchMenu._closeHider=function(f){if(f)f.style.visibility="hidden";};DynarchMenu._C=null;DynarchMenu._T=null;DynarchMenu._OT=null;DynarchMenu._RE_PR=/(^|\s+)pressed(\s+|$)/ig;DynarchMenu._RE_AH=/(^|\s+)active|hover(\s+|$)/ig;DynarchMenu._RE_DS=/(^|\s+)disabled(\s+|$)/ig;DynarchMenu._RE_CP=/clones-popup-(.*)/;DynarchMenu._RE_OPL=/(^|\s+)open-left(\s+|$)/;DynarchMenu._RE_CTX_ID=/context-for-(.*)/;DynarchMenu._RE_CTX_CL=/context-class-([^-\s]+)-([^\s]+)/;DynarchMenu._RE_CTX_AL=/context-align-([a-z]+)/;DynarchMenu._RE_SCROLL_D=/(^|\s+)dynarch-menu-scroll-(up-|down-)?disabled/g;DynarchMenu._RE_SCROLL_H=/(^|\s+)dynarch-menu-scroll-(up-|down-)?hover/g;DynarchMenu._activeItem=null;DynarchMenu._menus=null;DynarchMenu._nop=function(){};DynarchMenu.setup=function(el,args){if(typeof args=="undefined")args={};var config={},tmp;function PD(name,value){var v=args[name];config[name]=(typeof v=="undefined")?value:v;};PD("className",null);PD("tooltips",false);PD("shadows",[4,4]);PD("smoothShadow",true);PD("dx",0);PD("dy",0);PD("basedx",0);PD("basedy",0);PD("timeout",150);PD("baseTimeout",50);PD("context",false);PD("vertical",false);PD("electric",config.vertical?250:false);PD("blink",false);PD("lazy",false);PD("d_profile",false);PD("toolbar",false);PD("ctxbutton",2);PD("frames",{main:window,popups:window});PD("scrolling",null);if(config.scrolling===true){config.scrolling={step1:5,step2:10,speed:30};}tmp=config.frames;if(typeof tmp.main=="string")tmp.main=_dynarch_top.frames[tmp.main];if(typeof tmp.popups=="string")tmp.popups=_dynarch_top.frames[tmp.popups];PD("crossFrames",tmp.main!==tmp.popups);PD("container",config.frames.popups.document.body);PD("clone",false);PD("onPopup",DynarchMenu._nop);PD("setFocus",true);if(config.blink===true)config.blink=5;if(typeof el=="string")el=tmp.main.document.getElementById(el);if(is_mac_ie)return null;if(is_ie5)config.smoothShadow=false;if(config.context)config.vertical=true;if(!el){alert("Error: menu element not found.");return false;}el.style.display="none";var i,els,a=DynarchMenu._menus,tmp2;if(!a||a.length==0){a=DynarchMenu._menus=[];els=[config.frames.main,config.frames.main.document];if(config.frames.popups!==config.frames.main){els[els.length]=config.frames.popups;els[els.length]=config.frames.popups.document;}for(i=els.length;--i>=0;){tmp=els[i];DynarchMenu.watchFrame(tmp,tmp);}DynarchMenu._eventElements=els;}return a[a.length]=new DynarchMenu(el,config);};document.DynarchMenu=DynarchMenu;_dynarch_top.DynarchMenu=DynarchMenu;DynarchMenu.watchFrame=function(f,w){if(typeof w=="undefined")w=window;try{DynarchMenu._addEvent(f,(is_ie||is_opera)?"keydown":"keypress",w.DynarchMenu._documentKeyPress);DynarchMenu._addEvent(f,"mousedown",w.DynarchMenu._documentMouseDown);DynarchMenu._addEvent(f,"mouseup",w.DynarchMenu._documentMouseUp);DynarchMenu._addEvent(f,"mouseover",w.DynarchMenu._documentMouseOver);}catch(e){};};DynarchMenu._clearTimeout=function(){if(_dynarch_top.DynarchMenu._T){_dynarch_top.clearTimeout(_dynarch_top.DynarchMenu._T);_dynarch_top.DynarchMenu._T=null;}};DynarchMenu._forAllMenus=function(callback){for(var i=_dynarch_top.DynarchMenu._menus.length;--i>=0&&!callback(_dynarch_top.DynarchMenu._menus[i]););};DynarchMenu._closeOtherMenus=function(menu){DynarchMenu._forAllMenus(function(tmp){if(tmp!=menu){var a=tmp._popupMenus,i;for(i=a.length;--i>=0;)a[i].close(false,true);tmp._baseMenuInfo.close();window.status="";}});};DynarchMenu.prototype.cloneEl=function(el,doc){if(this.config.clone){if(el.ownerDocument!=doc){if(is_ie){var div=doc.createElement("div");div.innerHTML=el.outerHTML;el=div.removeChild(div.firstChild);}else el=doc.importNode(el,true);}else el=el.cloneNode(true);}return el;};DynarchMenu.prototype.addIcon=function(info,item,icon){var doc=info.parent.base?this.config.frames.main.document:this.config.frames.popups.document;var CE=DynarchMenu._createElement,t,l=item.firstChild.firstChild,r=CE("tr",CE("tbody",t=CE("table",null,doc))),td1=CE("td",r),td2=CE("td",r);icon.unselectable="on";td1.appendChild(r=this.cloneEl(icon,doc));td1.className="icon";td2.className="label";while(l){td1=l.nextSibling;td2.appendChild(l);l=td1;}t.cellSpacing=t.cellPadding=0;t.style.borderCollapse="collapse";item.firstChild.appendChild(t);return r;};DynarchMenu.prototype.createMenuItem=function(li,parent,horiz,arrow){var tmp,ctx=null,cfg=this.config,licl=li.className,icon=null,label,html_popup=true,tooltip,action=null,item,info,self=this,key=null,disabled=/(^|\s+)disabled(\s+|$)/i.test(licl),nohover=DynarchMenu.getCA(li,"nohover"),win=parent.base?cfg.frames.main:cfg.frames.popups,doc=win.document,CE=DynarchMenu._createElement;if(cfg.d_profile)++DynarchMenu.profile.item;tmp=DynarchMenu._getChildrenByTagName(li,"a");tmp=tmp.length>0?tmp[0]:li;label=DynarchMenu._getLabel(tmp);if(typeof label=="string"){label=label.replace(/(^\s+|\s+$)/g,'');if(/^a$/i.test(tmp.tagName)&&tmp.accessKey){key=tmp.accessKey;tmp.accessKey="";}else if(!/^<img/i.test(label)){label=label.replace(/_([a-zA-Z0-9])/,"<u unselectable='on'>$1</u>");key=RegExp.$1;label=label.replace(/__/,"_");}html_popup=false;}tooltip=/^\s*$/.test(tmp.title)?"":tmp.title;if(tmp.href&&/\S/.test(tmp.href)){if(/^javascript:(.*)$/i.test(tmp.href))action=new DynarchMenu.JSAction(RegExp.$1);else action=new DynarchMenu.LinkAction(tmp.href,tmp.target);action.className="explicit-action";action.explicit=true;}else action=new DynarchMenu.DefaultAction(li);tmp=DynarchMenu._getChildrenByTagName(li,"img");if(tmp.length>0)icon=tmp[0];info=new DynarchMenu.MenuItem({html_popup:html_popup,separator:html_popup||!/\S/.test(label)&&!icon,icon:icon,label:label,parent:parent,submenu:null,tooltip:tooltip,action:action,menu:this,disabled:disabled,nohover:nohover,align:licl?(DynarchMenu._RE_CTX_AL.test(licl)?RegExp.$1:"mouse"):"mouse"});if(li.id)this.items[info.id=li.id]=info;if(action)action.info=info;if(horiz){item=CE("td",null,doc);info.labelTD=item;if(info.separator)item.innerHTML="<div unselectable='on'></div>";else{item.innerHTML="<div unselectable='on'>"+label+"</div>";if(icon)info.icon=this.addIcon(info,item,icon);}}else{item=CE("tr",null,doc);tmp=CE("td",item);if(info.separator&&!html_popup){tmp.innerHTML=_dynarch_menu_ediv;tmp.colSpan=3;}else{tmp.className="icon";if(icon)tmp.appendChild(info.icon=this.cloneEl(icon,doc));else tmp.innerHTML=_dynarch_menu_ediv;tmp=CE("td",item);tmp.className="label";info.labelTD=tmp;if(html_popup)tmp.appendChild(this.cloneEl(label,doc));else tmp.innerHTML=label;tmp=CE("td",item);tmp.className="end";tmp.innerHTML=_dynarch_menu_ediv;if(arrow)tmp.className+=" arrow";}}if(is_ie&&key&&parent.base){tmp=CE("a",item);tmp.href="#";tmp.accessKey=key;}info.element=item;item.className=(info.separator&&!html_popup)?"separator":"item";if(action.className)item.className+=" "+action.className;if(disabled)info.disabled=true;if(cfg.tooltips)item.title=info.tooltip;DynarchMenu.addInfo(item,"__msh_info",info);if(DynarchMenu._RE_CTX_ID.test(licl)){ctx=document.getElementById(RegExp.$1);if(ctx)DynarchMenu.setupContext(ctx,info);}else if(DynarchMenu._RE_CTX_CL.test(licl)){ctx=document.getElementsByTagName(RegExp.$1);tmp=new RegExp('(^|\\s)'+RegExp.$2+'(\\s|$)');for(i=ctx.length;--i>=0;)if(tmp.test(ctx[i].className))DynarchMenu.setupContext(ctx[i],info);}else if(licl)item.className+=" "+licl;if(!nohover){if(html_popup)item.onmouseover=win.DynarchMenu.EventHandlers.popup_resetActive;if(key)parent.keymap[key.toLowerCase()]=info;item.onmouseover=win.DynarchMenu.EventHandlers.item_onMouseOver;if(!info.separator){item.onmouseout=win.DynarchMenu.EventHandlers.item_onMouseOut;item.onmousedown=win.DynarchMenu.EventHandlers.item_onMouseDown;}}return item;};DynarchMenu._documentMouseDown=function(ev){ev||(ev=window.event);var el=is_ie?ev.srcElement:ev.target,j;for(j=el;j&&!j.__msh_info;j=j.parentNode);if(!j||j.__msh_info.base)_dynarch_top.DynarchMenu._closeOtherMenus(j&&j.__msh_info.menu);};DynarchMenu._msupTimeout=null;DynarchMenu._documentMouseUp=function(ev){ev||(ev=window.event);if(DynarchMenu._msupTimeout)return false;var menu=_dynarch_top.DynarchMenu._C,el,info;if(menu){el=is_ie?ev.srcElement:ev.target;for(;el&&!(el.__msh_is_dynarch_menu&&(info=el.__msh_info));el=el.parentNode);if(!el)_dynarch_top.DynarchMenu._closeOtherMenus(null);else if(info&&info.exec)info.exec();}_dynarch_top.DynarchMenu._C=null;_dynarch_top.DynarchMenu._activeItem=null;};DynarchMenu._documentMouseOver=function(ev){var menu=_dynarch_top.DynarchMenu._C,el,tmout;if(menu&&menu.config.electric){ev||(ev=window.event);el=is_ie?ev.srcElement:ev.target;for(;el&&!el.__msh_is_dynarch_menu;el=el.parentNode);if(!el||el===document.body){tmout=menu.config.electric;if(tmout===true)tmout=1;if(!_dynarch_top.DynarchMenu._T)_dynarch_top.DynarchMenu._T=_dynarch_top.setTimeout('_dynarch_top.DynarchMenu._closeOtherMenus(null); _dynarch_top.DynarchMenu._T = null;',tmout);}else _dynarch_top.DynarchMenu._clearTimeout();}};DynarchMenu._documentKeyPress=function(ev){ev||(ev=window.event);DynarchMenu._forAllMenus(function(menu){var tmp=menu._activePopup,item=tmp?tmp.active_item:null,kmap;function do_27(){if(tmp){tmp.close(true,true);if(item)item.mouseout();if(tmp.base||(tmp.parent.base&&tmp.config.context)){tmp.resetActive();tmp.active_submenu=null;_dynarch_top.DynarchMenu._activeItem=null;_dynarch_top.DynarchMenu._closeOtherMenus(null);}DynarchMenu._stopEvent(ev);}};function do_13(){if(!item)return;item.activate(true,true);if(item.action&&!item.submenu)item.exec();DynarchMenu._stopEvent(ev);};function do_ud(up){if(tmp){if(!item)item=up?tmp.getFirstItem():tmp.getLastItem();else item=up?tmp.getNextItem(item):tmp.getPrevItem(item);if(item){item.hover(false,true);tmp.active_item=item;}DynarchMenu._stopEvent(ev);}};function serveKeymap(keymap){var key=String.fromCharCode((is_ie||is_opera)?ev.keyCode:ev.charCode).toLowerCase();item=keymap[key];if(typeof item!="undefined"){item.hover(true,true);if(!item.submenu)item.exec();tmp=item.submenu;item=null;do_ud(true);DynarchMenu._stopEvent(ev);}};switch(ev.keyCode){case 27:do_27();break;case 13:do_13();if(item){tmp=item.submenu;item=null;do_ud(true);}break;case 37:if(!menu._activeKeymap)break;if(tmp.parent&&!tmp.parent.horiz)do_27();else{if(tmp.parent){tmp=tmp.parent;item=tmp.active_item;}do_ud(false);item.activate(false,true);}break;case 39:if(!menu._activeKeymap)break;if(item&&!item.parent.horiz&&item.submenu){do_13();tmp=item.submenu;item=null;do_ud(true);}else{while(tmp.parent){tmp=tmp.parent;item=tmp.active_item;}do_ud(true);item.activate(false,true);}break;case 40:case 38:if(!menu._activeKeymap)break;do_ud(ev.keyCode==40);break;default:kmap=ev.altKey?menu._globalKeymap:menu._activeKeymap;if(kmap)serveKeymap(kmap);}});};DynarchMenu.prototype.createMenuTree=function(ul,horiz){var base=!this._baseMenuInfo,a_li,div,table,i,info,li,item,tmp,ret=null,self=this,cfg=this.config,ctx=cfg.context,submenu,CE=DynarchMenu._createElement,win=base?cfg.frames.main:cfg.frames.popups,doc=win.document;if(cfg.d_profile)++DynarchMenu.profile.tree;a_li=DynarchMenu._getChildrenByTagName(ul,"li");if(a_li.length==0)return;ret=div=CE("div",null,doc);div.className=(base&&horiz)?"dynarch-horiz-menu":"dynarch-popup-menu";if(base&&horiz&&cfg.toolbar)div.className+=" dynarch-menu-toolbar";if(base&&!horiz&&!ctx)div.className+=" dynarch-popup-base-menu";if(ul.className)div.className+=" "+ul.className;tmp=["a","b","c","d"];if(cfg.scrolling)tmp.unshift("dynarch-menu-scroll");for(i=tmp.length;--i>=0;(div=CE("div",div)).className=tmp[i]);info=new DynarchMenu.MenuTree({menu:this,base:base,horiz:horiz,element:ret,active_submenu:null,active_item:null,visible:false,keymap:{},config:cfg,_T_close:null,open_left:DynarchMenu._RE_OPL.test(ul.className)});if(ul.id)info.id=ul.id;DynarchMenu.addInfo(ret,"__msh_info",info);info.table=table=CE("table",div);table.cellSpacing=0;table.cellPadding=0;tmp=CE("tbody",table);DynarchMenu._class(ret,null,cfg.className);if(base){this._globalKeymap=info.keymap;this._baseMenuInfo=info;if(ctx)ret.style.display="none";}else{ret.style.display="none";if(this.config.lazy)this.config.container.appendChild(ret);else if(this._df)this._df.appendChild(ret);else this._ca[this._ca.length]=ret;}if(horiz){info.parent=null;div=CE("tr",tmp);}else div=tmp;ret.onmouseover=win.DynarchMenu.EventHandlers.tree_onMouseOver;ret.onmouseout=win.DynarchMenu.EventHandlers.tree_onMouseOut;for(i=0;i<a_li.length;++i){li=a_li[i];if(DynarchMenu._RE_CP.test(li.className)){tmp=document.getElementById(RegExp.$1);}else{tmp=DynarchMenu._getChildrenByTagName(li,"ul");tmp=(tmp.length>0)?tmp[0]:null;}item=this.createMenuItem(li,info,horiz,!!tmp);div.appendChild(item);if(tmp){item.className+=" has-submenu";item.__msh_info.ul=ul=tmp;item.__msh_info.submenu=function(){var menu=this.menu;submenu=this.submenu=menu.createMenuTree(this.ul,false).__msh_info;submenu.parent=info;submenu.parent_item=this;menu._popupMenus[menu._popupMenus.length]=submenu;};if(!this.config.lazy)item.__msh_info.submenu();}}return ret;};DynarchMenu.prototype.destroy=function(){var a=this._baseMenuInfo.element,i,el;try{a.parentNode.removeChild(a);a=this._popupMenus;for(i=a.length;--i>=0;)try{el=a[i].element;el.parentNode.removeChild(el);el=a[i]._shadow;if(el)el.parentNode.removeChild(el);}catch(e){};a=_dynarch_top.DynarchMenu._menus;for(i=a.length;--i>=0;)if(a[i]==this)a.splice(i,1);if(a.length==0){a=DynarchMenu._eventElements;for(i=a.length;--i>=0;){el=a[i];if(el)try{DynarchMenu._removeEvent(el,(is_ie||is_opera)?"keydown":"keypress",el.DynarchMenu._documentKeyPress);DynarchMenu._removeEvent(el,"mousedown",el.DynarchMenu._documentMouseDown);DynarchMenu._removeEvent(el,"mouseup",el.DynarchMenu._documentMouseUp);DynarchMenu._removeEvent(el,"mouseover",el.DynarchMenu._documentMouseOver);}catch(e){};}}}catch(ex){};};DynarchMenu._stopEvent=function(ev){if(is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}};DynarchMenu._removeEvent=function(el,evname,func){if(el.removeEventListener)el.removeEventListener(evname,func,true);else if(el.detachEvent)el.detachEvent("on"+evname,func);else el["on"+evname]=null;};DynarchMenu._addEvent=function(el,evname,func){if(el.addEventListener)el.addEventListener(evname,func,true);else if(el.attachEvent)el.attachEvent("on"+evname,func);else el["on"+evname]=func;};DynarchMenu._getChildrenByTagName=function(el,tag){var i,a=[];if(tag)tag=tag.toLowerCase();for(i=el.firstChild;i;i=i.nextSibling){if(i.nodeType!=1)continue;if(!tag||tag==i.tagName.toLowerCase())a[a.length]=i;}return a;};DynarchMenu._createElement=function(tagName,parent,doc){if(!doc){if(parent)doc=parent.ownerDocument;if(!doc)doc=document;}var el=doc.createElement(tagName);if(is_ie)el.unselectable="on";else if(is_gecko)el.style.setProperty("-moz-user-select","none","");if(parent)parent.appendChild(el);return el;};DynarchMenu._getLabel=function(el){var i,c,txt;if(el.tagName.toLowerCase()=="a"){if(is_ie){c=DynarchMenu._getChildrenByTagName(el,null);for(i=c.length;--i>=0;c[i].unselectable="on");}return el.innerHTML;}c=DynarchMenu._getChildrenByTagName(el,'div');if(c.length)return c[0];txt="";for(i=el.firstChild;i;i=i.nextSibling)if(i.nodeType==3)txt+=i.data;return txt;};DynarchMenu._getPos=function(el){if(/^body$/i.test(el.tagName))return{x:0,y:0};var SL=0,ST=0,is_div=/^div$/i.test(el.tagName),r,tmp;if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;if(el.parentNode&&el.parentNode!==el.offsetParent){if(el.parentNode.scrollTop)ST+=el.parentNode.scrollTop;if(el.parentNode.scrollLeft)ST+=el.parentNode.scrollLeft;}r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){tmp=this._getPos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};DynarchMenu._class=function(el,del,add){if(!el)return;if(el.element)el=el.element;if(del)el.className=el.className.replace(del,' ');if(add)el.className+=" "+add;};DynarchMenu._related=function(element,ev){var related,type;if(is_ie){type=ev.type;if(type=="mouseover")related=ev.fromElement;else if(type=="mouseout")related=ev.toElement;}else related=ev.relatedTarget;for(;related;related=related.parentNode)if(related===element)return true;return false;};DynarchMenu.psLeft=function(){var d=document;return d.documentElement.scrollLeft||d.body.scrollLeft;};DynarchMenu.psTop=function(){var d=document;return d.documentElement.scrollTop||d.body.scrollTop;};DynarchMenu.preloadImages=function(filter){if(is_ie){var ai=[],hi={},i;function f(s,p){var i,t,pp=s.href;if(filter&&s.readOnly&&!filter.test(p+pp))return;if(pp)p+=pp.replace(/(\x2f?)[^\x2f]+$/,"$1");for(i=s.rules.length;--i>=0;){t=s.rules(i).style.backgroundImage;if(/url\((.*?)\)/.test(t)){t=p+RegExp.$1;if(!hi[t]){ai.push(t);hi[t]=1;}}}for(i=s.imports.length;--i>=0;)f(s.imports(i),p);};for(i=document.styleSheets.length;--i>=0;)f(document.styleSheets[i],"");document.write("<div style='display:none'>");for(i=ai.length;--i>=0;)document.write("<img src='"+ai[i]+"' />");document.write("</div>");}};DynarchMenu._infoMap=null;DynarchMenu._cleanUp=function(){var a=_dynarch_top.DynarchMenu._infoMap,i,o,p;for(i=a.length;--i>=0;){o=a[i][0];p=a[i][1];try{o[p]=null;o.parentNode.removeChild(o);o=a[i][0]=null;}catch(e){};a.splice(i,1);}_dynarch_top.DynarchMenu._infoMap=null;};DynarchMenu.addInfo=function(el,name,value){el.__msh_is_dynarch_menu=true;el[name]=value;if(is_ie){var a=_dynarch_top.DynarchMenu._infoMap;if(!a){a=_dynarch_top.DynarchMenu._infoMap=[];DynarchMenu._addEvent(_dynarch_top,"unload",_dynarch_top.DynarchMenu._cleanUp);}a[a.length]=[el,name];}};DynarchMenu.setupContext=function(ctx,tree){this.addInfo(ctx,"__msh_info2",tree);var buttons=2,b;if(tree&&tree.menu&&tree.menu.config&&tree.menu.config.ctxbutton)buttons=tree.menu.config.ctxbutton;if(/dynarch-menu-ctxbutton-([a-z]+)/.test(ctx.className)){b=RegExp.$1;buttons=((b=="left")?1:((b=="both")?3:buttons));}if(buttons&1)ctx.onclick=DynarchMenu.EventHandlers.ctx_onContextMenu;if(buttons&2)ctx[is_opera?"onmousedown":"oncontextmenu"]=DynarchMenu.EventHandlers.ctx_onContextMenu;};DynarchMenu.JSAction=function(code){this.js=code.replace(/%20/g,' ');};DynarchMenu.JSAction.prototype.exec=function(){var retval=false;eval(this.js);return retval;};DynarchMenu.LinkAction=function(url,target){if(!(target&&/\S/.test(target)))target=null;if(is_ie)url=url.replace(/^about:blank(.+)$/,"$1");this.url=url;this.target=target;};DynarchMenu.LinkAction.prototype.exec=function(){if(this.target){var tmp=document.getElementById(this.target);if(!tmp&&document.getElementsByName){tmp=document.getElementsByName(this.target);tmp=tmp.length?tmp[0]:null;}if(tmp){tmp=is_opera?tmp:tmp.contentWindow;tmp.location=this.url;}else window.open(this.url,this.target);}else window.location=this.url;return false;};DynarchMenu.DefaultAction=function(li){this.params=li;while(li&&/^([uo]l|li)$/i.test(li.tagName)){if(li.onclick){this.action=li.onclick;break;}li=li.parentNode;}};DynarchMenu.DefaultAction.prototype.exec=function(){if(!this.info.submenu){if(typeof this.action=="function")return this.action(this.info);else try{var retval=false;eval(this.action);return retval;}catch(e){};}return true;};DynarchMenu.EventHandlers={popup_resetActive:function(ev){this.__msh_info.parent.resetActive();return false;},item_onMouseOver:function(ev){ev||(ev=window.event);if(DynarchMenu._related(this,ev))return false;var item=this.__msh_info;if(!item.separator)return item.hover();else if(item.html_popup){item.parent.clearTimeout();return item.parent.resetActive(item);}},item_onMouseOut:function(ev){ev||(ev=window.event);if(DynarchMenu._related(this,ev))return false;return this.__msh_info.mouseout();},item_onMouseDown:function(ev){ev||(ev=window.event);var info=this.__msh_info,ret;_dynarch_top.DynarchMenu._C=info.menu;DynarchMenu._stopEvent(ev);_dynarch_top.DynarchMenu._activeItem=info;if(info.parent&&!info.parent.base)info.parent.closePopups();ret=info.activate(false,true);return ret;},tree_onMouseOver:function(ev){ev||(ev=window.event);if(!DynarchMenu._related(this,ev)){var info=this.__msh_info;if(info.parent){info.parent.resetActive(info.parent_item,"active");info.parent.active_submenu=info;}}return false;},tree_onMouseOut:function(ev){ev||(ev=window.event);if(!DynarchMenu._related(this,ev)){var info=this.__msh_info;if(!info.active_submenu)this.__msh_info.resetActive();}return false;},ctx_onContextMenu:function(ev){ev||(ev=window.event);DynarchMenu._closeOtherMenus();if(!is_opera||ev.button==2){if(DynarchMenu._msupTimeout)clearTimeout(DynarchMenu._msupTimeout);DynarchMenu._msupTimeout=setTimeout(function(){DynarchMenu._msupTimeout=null;},150);var info=this.__msh_info2;if(typeof info.submenu=="function")info.submenu();info.submenu.openContext(ev,this);setTimeout(function(){_dynarch_top.DynarchMenu._C=info.menu;},info.menu.config.timeout);DynarchMenu._stopEvent(ev);return false;}}};DynarchMenu.populateObject=function(o,props){for(var i in props)o[i]=props[i];};DynarchMenu.MenuItem=function(props){this.visible=true;this.pressed=false;DynarchMenu.populateObject(this,props);};DynarchMenu.MenuItem.prototype.disable=function(dis){if(typeof dis=="undefined")dis=true;this.disabled=dis;DynarchMenu._class(this.element,DynarchMenu._RE_DS,dis?"disabled":null);};DynarchMenu.MenuItem.prototype.display=function(dis){if(typeof dis=="undefined")dis=!this.visible;this.visible=dis;this.element.style.display=dis?"":"none";};DynarchMenu.MenuItem.prototype._exec=function(){if(!this.disabled&&!this.separator&&this.action&&!this.action.exec()){DynarchMenu._class(this.element,DynarchMenu._RE_AH);var a=this.menu._popupMenus,i;for(i=a.length;--i>=0;)a[i].close(false,true);this.menu._baseMenuInfo.close();window.status="";}};DynarchMenu.MenuItem.prototype.exec=function(){var step=this.menu.config.blink;if((this.submenu&&!this.action.explicit)||this.html_popup||!step)return this._exec();var self=this;var timer=setInterval(function(){DynarchMenu._class(self.element,DynarchMenu._RE_AH,--step&1?'active':null);if(!step){clearInterval(timer);self._exec();}},60);};DynarchMenu.MenuItem.prototype.setLabel=function(text){this.labelTD.innerHTML="<div unselectable='on'>"+text+"</div>";this.label=text;};DynarchMenu.MenuItem.prototype.hover=function(activate,instant){var menu=this.parent,el=this.element;if(this.disabled&&menu.base){menu.clearPopups(this);menu.resetActive();return;}menu.clearTimeout();window.status=this.tooltip;el.title=menu.config.tooltips?this.tooltip:"";if(typeof activate=="undefined")activate=this.submenu&&(menu.config.electric||!menu.base||menu.active_submenu);menu.clearPopups(this);if(menu.resetActive(this))DynarchMenu._clearTimeout();if(activate)this.activate(true,instant);return false;};DynarchMenu.MenuItem.prototype.activate=function(noclose,instant){if(!this.disabled){var menu=this.parent,submenu=this.submenu,el=this.element;menu.resetActive(this);if(submenu){if(typeof submenu=="function"){this.submenu();submenu=this.submenu;}if(!noclose&&!menu.config.electric&&menu.base&&submenu==menu.active_submenu){submenu.close(false,true);_dynarch_top.DynarchMenu._activeItem=null;menu.resetActive(this,"hover");}else submenu.open(el,this,instant);}}return false;};DynarchMenu.MenuItem.prototype.setClass=function(del,add){DynarchMenu._class(this.element,del,add);};DynarchMenu.MenuItem.prototype.setPressed=function(state){if(typeof state=="undefined")state=!this.pressed;this.pressed=state;this.setClass(DynarchMenu._RE_PR,state?"pressed":null);};DynarchMenu.MenuItem.prototype.mouseout=function(){var p=this.parent,s=this.submenu;if(s&&DynarchMenu._OT)clearTimeout(DynarchMenu._OT);DynarchMenu._clearTimeout();if(!s||!s.visible)p.resetActive();window.status="";return false;};DynarchMenu.MenuTree=function(props){DynarchMenu.populateObject(this,props);if(!this.base)this.hider=DynarchMenu._createHider(this.menu.config.frames.popups);};DynarchMenu.MenuTree.prototype.getNextItem=function(item){var i=item.element.nextSibling;while(i&&i.__msh_info.separator)i=i.nextSibling;if(!i){if(this.menu.config.scrolling)return null;i=item.element.parentNode.firstChild;}return i.__msh_info;};DynarchMenu.MenuTree.prototype.getPrevItem=function(item){var i=item.element.previousSibling;while(i&&i.__msh_info.separator)i=i.previousSibling;if(!i){if(this.menu.config.scrolling)return null;i=item.element.parentNode.lastChild;}return i.__msh_info;};DynarchMenu.MenuTree.prototype.resetActive=function(item,cls){item||(item=null);if(!cls)(!item||!item.html_popup)?(cls="hover"):(cls="");DynarchMenu._class(this.active_item,DynarchMenu._RE_AH);DynarchMenu._class(item,DynarchMenu._RE_AH,_dynarch_top.DynarchMenu._activeItem==item?"active":cls);var tmp=this.active_item!=item;this.active_item=item;if(item&&this.menu.config.scrolling)this._scrollIntoView(item);return tmp;};DynarchMenu.MenuTree.prototype.clearPopups=function(item){var m=this.active_submenu;if(m&&m!=item.submenu)m.close();};DynarchMenu.MenuTree.prototype.closePopups=function(){var i,m;for(i=this.getFirstItem().element;i;i=i.nextSibling){m=i.__msh_info.submenu;if(m&&typeof m!="function")m.closePopups().close(false,true);}return this;};DynarchMenu.MenuTree.prototype.clearTimeout=function(){if(this._T_close){clearTimeout(this._T_close);this._T_close=null;}};DynarchMenu.MenuTree.prototype.close=function(by_key,instant){var self=this.menu;if(this.base){self._activeKeymap=null;self._activePopup=null;}else{if(!this.visible||(this._T_close&&!instant))return false;var info=this;tmp=this.closePopups().parent;tmp.resetActive(by_key?tmp.active_item:null);DynarchMenu._class(this.active_item,DynarchMenu._RE_AH);if(!by_key)tmp.active_item=null;tmp.active_submenu=null;this.active_item=this.active_submenu=null;if(instant||(this.parent.base&&!self.config.vertical))this._close();else this._T_close=setTimeout(function(){info._close();info._T_close=null;},self.config.timeout);}};DynarchMenu.MenuTree.prototype.getFirstItem=function(){return this.horiz?this.element.firstChild.__msh_info:this.table.firstChild.firstChild.__msh_info;};DynarchMenu.MenuTree.prototype.getLastItem=function(){return this.horiz?this.element.lastChild.__msh_info:this.table.lastChild.lastChild.__msh_info;};DynarchMenu.MenuTree.prototype.openContext=function(ev,trigger){var el=ev.srcElement||ev.target,p,align=this.parent_item.align;if(!trigger)trigger=null;this.menu.target=trigger;if(el.className&&DynarchMenu._RE_CTX_AL.test(el.className))align=RegExp.$1;switch(align){case"bottom":p=DynarchMenu._getPos(el);p.y+=el.offsetHeight;break;case"right":p=DynarchMenu._getPos(el);p.x+=el.offsetWidth;break;default:p={x:ev.clientX+DynarchMenu.psLeft(),y:ev.clientY+DynarchMenu.psTop()};break;}this.open(null,null,true,p);};DynarchMenu.MenuTree.prototype.open=function(el,item,instant,pos){this.clearTimeout();DynarchMenu._clearTimeout();if(DynarchMenu._OT)clearTimeout(DynarchMenu._OT);var info=this;if(instant)this._open(el,item,pos);else DynarchMenu._OT=setTimeout(function(){info._open(el,item,pos);DynarchMenu._OT=null;},this.menu.config[this.parent.base?"baseTimeout":"timeout"]);};DynarchMenu.MenuTree.prototype._close=function(){this.element.style.display="none";this.visible=false;this.menu._activePopup=this.parent;this.menu._activeKeymap=this.parent.keymap;if(this._shadow)this._shadow.style.display="none";for(var i=this.getFirstItem().element;i;i=i.nextSibling)DynarchMenu._class(i,DynarchMenu._RE_AH);DynarchMenu._closeHider(this.hider);};DynarchMenu.$=function(func,obj,par){return function(p1){func.call(obj,par,this,p1);};};DynarchMenu.MenuTree.prototype._scrollIntoView=function(item){var diff,el=item.element,table=this.table,div=table.parentNode;if(div.scrollTop>el.offsetTop){div.scrollTop=el.offsetTop;this._scrollSetArrowState();}else{diff=el.offsetTop+el.offsetHeight-(div.scrollTop+div.offsetHeight);if(diff>0)div.scrollTop+=diff;this._scrollSetArrowState();}};DynarchMenu.MenuTree.prototype._scrollSetArrowState=function(){try{var table=this.table,div=table.parentNode,s1=this._scrollDiv1,s2=this._scrollDiv2;if(div.scrollTop==0){s1.className+=" dynarch-menu-scroll-disabled dynarch-menu-scroll-up-disabled";this._scrollStopHandler();}else s1.className=s1.className.replace(DynarchMenu._RE_SCROLL_D," ");if(div.scrollTop+div.offsetHeight==table.offsetHeight){s2.className+=" dynarch-menu-scroll-disabled dynarch-menu-scroll-down-disabled";this._scrollStopHandler();}else s2.className=s2.className.replace(DynarchMenu._RE_SCROLL_D," ");}catch(ex){};};DynarchMenu.MenuTree.prototype._scrollHandler=function(dir){this.table.parentNode.scrollTop+=this._scrollStep*dir;this._scrollSetArrowState();};DynarchMenu.MenuTree.prototype._scrollStartHandler=function(dir,div){this._scrollStep=this.menu.config.scrolling.step1;this._scrollTimer=setInterval(DynarchMenu.$(this._scrollHandler,this,dir),this.menu.config.scrolling.speed);div.className+=" dynarch-menu-scroll-hover "+(dir>0?"dynarch-menu-scroll-down-hover":"dynarch-menu-scroll-up-hover");};DynarchMenu.MenuTree.prototype._scrollStopHandler=function(undef,div){if(this._scrollTimer){clearInterval(this._scrollTimer);this._scrollTimer=null;}div.className=div.className.replace(DynarchMenu._RE_SCROLL_H," ");};DynarchMenu.MenuTree.prototype._scrollDoubleSpeed=function(dbl){this._scrollStep=this.menu.config.scrolling[dbl?"step2":"step1"];};DynarchMenu.MenuTree.prototype._setupScroll=function(){var scroll_div=this.table.parentNode;if(!this._hasScroll){var CE=DynarchMenu._createElement;this._hasScroll=true;var s1=CE("div",null,document);s1.className="dynarch-menu-scroll-up";s1.innerHTML="&nbsp;";if(is_ie)s1.style.width=this.table.offsetWidth+"px";var p=scroll_div.parentNode;p.insertBefore(s1,scroll_div);var s2=s1.cloneNode(true);s2.className="dynarch-menu-scroll-down";p.appendChild(s2);var AI=DynarchMenu.addInfo;AI(s1,"onmouseover",DynarchMenu.$(this._scrollStartHandler,this,-1));AI(s2,"onmouseover",DynarchMenu.$(this._scrollStartHandler,this,1));var tmp=DynarchMenu.$(this._scrollStopHandler,this);AI(s1,"onmouseout",tmp);AI(s2,"onmouseout",tmp);tmp=DynarchMenu.$(this._scrollDoubleSpeed,this,true);AI(s1,"onmousedown",tmp);AI(s2,"onmousedown",tmp);tmp=DynarchMenu.$(this._scrollDoubleSpeed,this,false);AI(s1,"onmouseup",tmp);AI(s2,"onmouseup",tmp);this._scrollDiv1=s1;this._scrollDiv2=s2;}this._showScroll(true);scroll_div.scrollTop=0;this._scrollDiv1.className+=" dynarch-menu-scroll-up-disabled";this._scrollDiv2.className=this._scrollDiv2.className.replace(DynarchMenu._RE_SCROLL_D," ");};DynarchMenu.MenuTree.prototype._showScroll=function(disp){if(this._hasScroll){var p=this.table.parentNode.parentNode;p.firstChild.style.display=disp?"":"none";p.lastChild.style.display=disp?"":"none";}};DynarchMenu.MenuTree.prototype._open=function(el,item,pos){this.menu.config.onPopup.call(this,this.menu.target,item,pos);var m=this.element,self=this.menu,cfg=self.config,win=cfg.frames.popups,p=el?win.DynarchMenu._getPos(el):pos,pe,base=this.parent?this.parent.base:false,dx=base?cfg.basedx:cfg.dx,dy=base?cfg.basedy:cfg.dy,horiz=this.parent?this.parent.horiz:false,tmp,s,vw,sw;if(!el)el={offsetHeight:0,offsetWidth:0};if(base&&cfg.crossFrames){if(cfg.vertical){p.x=win.DynarchMenu.psLeft();p.y+=win.DynarchMenu.psTop();}else p.y=win.DynarchMenu.psTop();}else if(self._fixed&&!is_ie&&base){p.x+=win.DynarchMenu.psLeft();p.y+=win.DynarchMenu.psTop();}pe={x:p.x,y:p.y};_dynarch_top.DynarchMenu._C=self;DynarchMenu._closeOtherMenus(self);if((!base||cfg.vertical)&&item)item.parent.closePopups();if(!(base&&cfg.crossFrames)){if(horiz)p.y+=el.offsetHeight;else{if(!is_khtml){p.x+=el.offsetWidth;}else if(el){p=win.DynarchMenu._getPos(el.lastChild);p.x+=el.lastChild.offsetWidth;p.y-=1;}}}vw=win.DynarchMenu.getWinSize();vw.x+=win.DynarchMenu.psLeft();vw.y+=win.DynarchMenu.psTop();sw=cfg.shadows||[0,0];s=m.style;if(is_ie)s.position="absolute";s.visibility="hidden";s.display="block";var scroll_div=this.table.parentNode;if(cfg.scrolling){this._showScroll(false);scroll_div.style.height="";scroll_div.style.width="";}if(this.open_left||p.x+m.offsetWidth>vw.x){p.x=pe.x-m.offsetWidth+(horiz?el.offsetWidth:2);dx=-dx;}if(p.y+m.offsetHeight>vw.y&&pe.y>m.offsetHeight){p.y=pe.y-m.offsetHeight+(horiz?0:(win.DynarchMenu._getPos(m).y+m.offsetHeight-win.DynarchMenu._getPos(this.getLastItem().element).y));dy=-dy;}else if(!horiz)p.y-=win.DynarchMenu._getPos(this.getFirstItem().element).y-win.DynarchMenu._getPos(m).y;if(p.x+m.offsetWidth+sw[0]>vw.x)p.x-=sw[0];if(p.y<0)p.y=0;var y_low=p.y+m.offsetHeight-vw.y;if(cfg.scrolling&&y_low>0){var height=scroll_div.offsetHeight-y_low;height-=m.offsetHeight-scroll_div.offsetHeight;height-=sw[1];if(sw[3])height-=sw[3];height-=24;if(height<vw.y*0.75){y_low=Math.floor(vw.y*0.75-height);height+=y_low;p.y-=y_low;}if(is_ie)scroll_div.style.width=this.table.offsetWidth+"px";if(height<scroll_div.offsetHeight){scroll_div.style.height=height+"px";this._setupScroll();}}p.x+=dx;p.y+=dy;s.left=p.x+"px";s.top=p.y+"px";DynarchMenu._setupHider(this.hider,p.x,p.y,m.offsetWidth+sw[0],m.offsetHeight+sw[1]);if(this.parent){this.parent.active_submenu=this;this.parent.resetActive(item,"active");}self._activePopup=this;self._activeKeymap=this.keymap;tmp=this._shadow;if(cfg.shadows){if(!tmp){var SS=cfg.smoothShadow;this._shadow=tmp=DynarchMenu._createElement((SS&&!is_ie)?"img":"div",null,cfg.container.ownerDocument);if(SS)tmp.src=_dynarch_menu_shadow.src;tmp.className="dynarch-menu-shadow";DynarchMenu.addInfo(tmp,'__msh_info',this);if(is_ie)tmp.style.position="absolute";if(SS&&is_ie&&!is_ie5){tmp.className="dynarch-IE6-shadow";tmp.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_dynarch_menu_shadow.src+"',sizingMethod='scale')";}tmp.style.width="2px";tmp.style.height="2px";cfg.container.appendChild(tmp);}s=tmp.style;if(sw.length>2){s.left=p.x+sw[0]+"px";s.top=p.y+sw[1]+"px";s.width=m.offsetWidth+sw[2]+"px";s.height=m.offsetHeight+sw[3]+"px";}else{s.left=p.x+sw[0]+"px";s.top=p.y+sw[1]+"px";s.width=m.offsetWidth+"px";s.height=m.offsetHeight+"px";}s.display="block";}this.visible=true;m.style.visibility="visible";};DynarchMenu.getWinSize=function(){if(is_gecko){return{x:window.innerWidth,y:window.innerHeight};}if(is_opera)return{x:window.innerWidth,y:window.innerHeight};if(is_ie){if(!document.compatMode||document.compatMode=="BackCompat")return{x:document.body.clientWidth,y:document.body.clientHeight};else return{x:document.documentElement.clientWidth,y:document.documentElement.clientHeight};}var div=document.createElement("div"),s=div.style;s.position="absolute";s.bottom=s.right="0px";document.body.appendChild(div);s={x:div.offsetLeft,y:div.offsetTop};document.body.removeChild(div);return s;};DynarchMenu.getCA=function(el,name){return el.getAttribute("DynarchMenu:"+name);};DynarchMenu._nfo={product:"hmenu-2.9",licensee:"Dynarch.com user: talentmath",license_key:"linkware-13256928",purchase_date:"Wed Mar 26 22:15:22 2008 GMT",license_type:"linkware"};
