var lokiManager=new function(){var g=LOKI_API_KEY;var c={"1":"Scanner not found","2":"Wi-Fi not available","3":"No Wi-Fi in range","4":"Invalid Application Key","5":"Location server unavailable","6":"Location cannot be determined","7":"Proxy unauthorized","8":"File I/O Error","9":"Invalid File format","1000":"Plugin could not be installed","1001":"User denied location request","1002":"Your browser is not supported"};function e(h){if(h){showProgress('<img src="'+Images.spinner.src+'"/>&nbsp;'+progress)}else{e.close()}}function f(h){return function(i){e(false);h(i)}}function b(i,h){return function(j){try{i[h](j)}catch(k){showMessage("Error<br/>"+k.message?k.message:k.description)}}}function d(h){return function(i){var j=c[i+""];if(!j){j="Unexpected error "+i}h(j)}}function a(h,i){return function(k){var j={latitude:parseFloat(k.latitude+""),longitude:parseFloat(k.longitude+"")};if(((j.latitude+"")!="NaN")&&((j.longitude+"")!="NaN")){h(j)}else{i(c["6"])}}}return{request:function(l,m,k){var i=LokiAPI();i.setKey(g);var j=a(l,m);i.onSuccess=k?f(j):j;var h=d(m);i.onFailure=k?f(h):h;if(k){e(true)}i.requestLocation(true,i.NO_STREET_ADDRESS_LOOKUP)},flashRequest:function(i,j,h){this.request(b(i,j),b(i,h),false)}}};