var g_filePKey=null;function makeRequest(aa,ba){if(window.XMLHttpRequest){var ca=new XMLHttpRequest();} else{var ca=new ActiveXObject("Microsoft.XMLHTTP");} ca.open("POST",aa,false);ca.send(ba);var da=ca.responseText;var ea=new DOMParser();var fa=ea.parseFromString(da,"text/xml");if((fa.documentElement.getAttribute("success")!="true")&&(fa.documentElement.getAttribute("fileformat")==null)&&(fa.documentElement.getAttribute("errorclass")!="AppError")){alert("Problem: ("+fa.documentElement.getAttribute("success")+")\n"+da);} return(da);} function loadMap(ga){setBusyWait();window.scrollTo(0,0);var ha=document.implementation.createDocument('','X',null);ha.documentElement.setAttribute("function","OPENFILE");ha.documentElement.setAttribute("filepkey",ga);var ia=makeRequest('requestTarget.php',ha);var ja=new DOMParser();var ka=ja.parseFromString(ia,"text/xml");g_filePKey=ga;dataTools.setPKey(ka.documentElement.getAttribute("nextpkey"));deleteAllRootNodes();for(var i=0;i0){createFreeRelations(na);} if(na.nodeName=="NODEREL"){if(na.getAttribute("relationtype")!="main"){var oa=new nodeRel().fromXML(na);oa.redraw();}}}} function saveMap(pa){setBusyWait();var qa=document.implementation.createDocument('','ALL',null);qa.documentElement.setAttribute("fileformat","1");qa.documentElement.setAttribute("nextpkey",dataTools.getNewPKey());qa.documentElement.setAttribute("function","SAVEFILE");qa.documentElement.setAttribute("filepkey",g_filePKey);qa.documentElement.setAttribute("description",pa);var ra=qa.createElement("NODESET");for(var i=0;i=0;i--){rootNode[i].erase();}} catch (ex) { console.log("ERROR in erase...",ex) }} function getUserInfo(Fb){var Gb=document.implementation.createDocument('','X',null);Gb.documentElement.setAttribute("function","GETUSERINFO");var Hb=makeRequest('requestTarget.php',Gb);var Ib=new DOMParser();var Jb=Ib.parseFromString(Hb,"text/xml");return(Jb.documentElement.getAttribute(Fb));}