function process(a){showLoading();setTimeout(function(){a()},500)}function hideMe(){var a=new CSInterface;loadProgress();a.evalScript("progress()",function(a){1==a&&hideLoading()})}function loadProgress(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'progress.jsx")')}function addEditHeights(){var a=new CSInterface;loadAddHdLayer();a.evalScript("add_heights_layer()");hideMe()}
function addEditDepths(){var a=new CSInterface;loadAddHdLayer();a.evalScript("add_depths_layer()");hideMe()}function loadAddHdLayer(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_addHeightsAndDepths_layer.jsx")')}function delHD(){confirm("The app deletes the sketched in areas in Top-Layer, not the already generated heights and depths on the 3D Map. Shall they be deleted, too, click APPLY. Continue?")&&delHD2()}
function delHD2(){var a=new CSInterface;loadAddHdLayer();a.evalScript("killHD()")}function createHD(){var a=new CSInterface;loadCreateHD();a.evalScript("start_hd()");hideMe()}function loadCreateHD(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_createHD.jsx")')}function guides(){var a=new CSInterface;loadGuides();a.evalScript("tl_guides()");hideMe()}
function loadGuides(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_guides.jsx")')}function selectBrush(a,b){var c=new CSInterface;LoadAddTextureLayer();c.evalScript('selectBrush("'+a+'", "'+b+'")')}function LoadAddTextureLayer(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_TL_addTextureLayer.jsx")')}
function addTextureLayer(a,b,c){showLoading();var d=new CSInterface;LoadAddTextureLayer();setTimeout(function(){d.evalScript('startNewTexture("'+a+'", "'+b+'", "'+c+'")');hideMe()},500)}function LoadAddTextureLayer(){var a=new CSInterface,b="i3dmg_geo_TL_addTextureLayer.jsx",c=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+c+b+'")')}
function tl_efx_texture(){confirm("The app generates a basic texture now. All previous textures are deleted. Continue?")?tl_efx_texture_go():hideMe()}function tl_efx_texture_go(){var a=new CSInterface;loadAutexture();a.evalScript("autoTexture()");hideMe()}function loadAutexture(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_TL_autoTexture.jsx")')}
function tl_efx_topo(){var a=new CSInterface;loadEffects();a.evalScript("tl_fakeContourLines()");hideMe()}function tl_efx_grid1(){var a=new CSInterface;loadEffects();a.evalScript("makeGrid1()");hideMe()}function tl_efx_grid2(){var a=new CSInterface;loadEffects();a.evalScript("makeGrid2()");hideMe()}function loadEffects(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_TL_efx_topo.jsx")')}
function closeTL(){var a=new CSInterface;loadCreateHD();a.evalScript("closeAndHide()");hideMe()}function openTL(){var a=new CSInterface;loadOpenTL();a.evalScript("open_tl()");hideMe()}function loadOpenTL(){var a=new CSInterface,b=a.getSystemPath(SystemPath.EXTENSION)+"/host/";a.evalScript('$.evalFile("'+b+'i3dmg_geo_open_toplayer.jsx")')}function urlopen(){cep.util.openURLInDefaultBrowser("http://www.3d-map-generator.com")};