(function(){var version= "1.6.5";var f=function(){"undefined"==typeof altergeo_token_callback&&(altergeo_token_callback=function(a){});"undefined"==typeof altergeo_token_err_callback&&(altergeo_token_err_callback=function(){});h(altergeo_token_callback,altergeo_token_err_callback)};document.addEventListener?window.addEventListener("load",f,!1):document.attachEvent&&window.attachEvent("onload",f);var h=function(a,c){try{var b=m();b?(b.apikey="AQIAAGygRH/XVfSKjl6xRlOBKmJMzgA2",g("http://t00.p.altergeo.ru/prepare?doc_type=json&apikey=AQIAAGygRH/XVfSKjl6xRlOBKmJMzgA2&sd="+
b.sd+"&"+("_nc="+parseInt(1E5*Math.random()))+"&callback",function(b){try{a({token:b.wi2geo.token.id})}catch(d){c()}},c)):g("http://t00.p.altergeo.ru/prepare?doc_type=json&apikey=AQIAAGygRH/XVfSKjl6xRlOBKmJMzgA2&_nc="+parseInt(1E5*Math.random())+"&callback",function(b){try{a({token:b.wi2geo.token.id})}catch(d){c()}},c)}catch(d){alert(d),c()}},m=function(){try{var a=null;if(window._altergeo_bho&&window._altergeo_bho.sd)a=window._altergeo_bho;else if(n()){var c=document.getElementById("__altergeo_location_plugin__");
if(!c){var b=document.createElement("embed");b.setAttribute("type","application/altergeo-provider");b.setAttribute("id","__altergeo_location_plugin__");b.setAttribute("width","0px");b.setAttribute("height","0px");document.body.appendChild(b);c=document.getElementById("__altergeo_location_plugin__")}a=c}return a}catch(d){onError()}},n=function(){if(/(msie)|(trident)/i.test(navigator.userAgent))return!1;for(var a=0;a<navigator.plugins.length;a++)if("Html5 location provider"===navigator.plugins[a].name)return!0;
return!1},g=function(a){var c=0,b=a.document,d=b.documentElement;return function(f,g,h){function k(){try{clearTimeout(a[e][1]),delete a[e][0]}catch(b){a[e]=null}d.removeChild(l);0==arguments.length?h():g.apply(this,arguments)}var e="__ALTERGEO__JSONP__"+c++,l=b.createElement("script");a[e]=[k,setTimeout(function(){k()},3E3)];d.insertBefore(l,d.lastChild).src=f+"="+e+"[0]"}}(window)})();
