function a1(){var csInterface= new CSInterface();csInterface["evalScript"]("fxPath()",ResetFX)}try{var gCSInterface;var gResourceBundle;var gPanelPath;var gTotalImages=54;var gExtensionId="fx_box.extension";var gShowErrors=true;var gExternalFolder="";var gPersistentOn=false;var ddAddMoreTextures;var divImages;var isocons;var gDefaultText="";$(document)["ready"](function(){try{gCSInterface=  new CSInterface();gResourceBundle= gCSInterface["initResourceBundle"]();GetUIItems();gPanelPath= gCSInterface["getSystemPath"](SystemPath.EXTENSION);gDefaultText= gResourceBundle["keySelecttextures"];isocons["innerHTML"]= gResourceBundle["keySelecttextures"];a1()}catch(e){if(gShowErrors){alert("ready : resource bundle error "+ e)};gCSInterface= null;gResourceBundle= {}}});function EvalScript(script,callback){loadJSX();gCSInterface["evalScript"](script,callback)}function loadJSX(){var csInterface= new CSInterface();var fileName="mylib.jsx";var extensionRoot=csInterface["getSystemPath"](SystemPath.EXTENSION)+ "/host/";csInterface["evalScript"]("$.evalFile(\""+ extensionRoot+ fileName+ "\")")}function GetUIItems(){divImages= document["getElementById"]("container");isocons= document["getElementById"]("isocons")}function RemoveAllFromDiv(){try{var imageNumber=0;var olddiv=document["getElementById"]("img"+ imageNumber);while(olddiv){divImages["removeChild"](olddiv);imageNumber++;olddiv= document["getElementById"]("img"+ imageNumber)}}catch(e){if(gShowErrors){alert("RemoveAllFromDiv : "+ e)}}}function ResetFX(inValue){try{AddAllImages(inValue);gExternalFolder= "";isocons["innerHTML"]= "Select a FX tool"}catch(e){if(gShowErrors){alert("ResetTextures catch : "+ e)}}}function FxClickImg(inThis){if(jQuery("#c1")["hasClass"]("active")){fxPfad(inThis,false)}else {FxClick(inThis,false)}}function fxPfad(inUIElement){efxURL= inUIElement["getAttribute"]("data-fullres");delFX2(efxURL)}function delFX2(){var csInterface= new CSInterface();csInterface["evalScript"]("fxPfad(\""+ efxURL+ "\")",delFX3)}function delFX3(inValue){var csInterface= new CSInterface();delFXurl= inValue+ "-UNINSTALLER.jsx";loadAddFX();csInterface["evalScript"]("delFX2(\""+ delFXurl+ "\")",refresh)}function refresh(){window["location"]["reload"](false)}function loadAddFX(){var csInterface= new CSInterface();var fileName="addFX.jsx";var extensionRoot=csInterface["getSystemPath"](SystemPath.EXTENSION)+ "/host/";csInterface["evalScript"]("$.evalFile(\""+ extensionRoot+ fileName+ "\")")}function FxClick(inUIElement){efxURL= inUIElement["getAttribute"]("data-fullres")+ "/index.html";a2(efxURL)}function a2(){var csInterface= new CSInterface();csInterface["evalScript"]("fxPfad(\""+ efxURL+ "\")",hierRein)}function hierRein(inValue){window["location"]["href"]= inValue}function AddAllImages(inFolder){try{var csInterface= new CSInterface();loadJSX();csInterface["evalScript"]("myLib.createImages('"+ escape(encodeURIComponent(inFolder))+ "');",AddAllImagesCallback)}catch(e){alert("AllAllImages error: "+ e)}}function MouseOverImg(inUIElement){try{isocons["innerHTML"]= inUIElement["getAttribute"]("data-fullres")}catch(e){alert(e)}}function MouseOutImg(inUIElement){try{isocons["innerHTML"]= "Select a FX tool"}catch(e){alert(e)}}function AddAllImagesCallback(inObjectAsString){try{var params=eval(inObjectAsString);var ClickFunction=function(){FxClickImg(this,false)};var MouseFunction=function(){MouseOverImg(this)};var MouseOutFunction=function(){MouseOutImg(this)};var imageNumber=0;var delimiter=IsWindowsOS()?"\\":"/";if(params!== undefined){for(var i=0;i< params["files"]["length"];i++){if(params["files"][i]["toLowerCase"]()["lastIndexOf"](".png")=== (params["files"][i]["length"]- 4)|| params["files"][i]["toLowerCase"]()["lastIndexOf"](".png")=== (params["files"][i]["length"]- 4)){var newimg=document["createElement"]("span");newimg["setAttribute"]("id","img"+ imageNumber.toString());var fileNameStart=params["files"][i]["lastIndexOf"](delimiter)+ 1;var fileNameEnd=params["files"][i]["length"]- 4;var fileName=params["files"][i]["substr"](fileNameStart,fileNameEnd- fileNameStart);newimg["setAttribute"]("data-fullres",fileName);var urlFileName="url('"+ params["files"][i]+ "')";newimg["style"]["backgroundImage"]= urlFileName;newimg["onclick"]= ClickFunction;newimg["onmouseover"]= MouseFunction;newimg["onmouseout"]= MouseOutFunction;if(imageNumber=== 0){RemoveAllFromDiv()};divImages["appendChild"](newimg);imageNumber++}}};gTotalImages= imageNumber}catch(e){alert("AddAllImagesCallback error: "+ e)}}function IsWindowsOS(){var isWindows=true;if(navigator["userAgent"]["indexOf"]("Mac OS X")!=  -1){isWindows= false};return isWindows}}catch(e){if(gShowErrors){alert("Probably a syntax error in panel.js : "+ e)}};function urlopen(){cep["util"]["openURLInDefaultBrowser"]("http://www.3d-map-generator.com")}