var images_prefix="http://stradi.utia.cas.cz/nuclearrisk.info/Images/" var item_no=-1;var max_count=23;var map=null;var overlay=null;var nuclides=["all_nuclides","Kr-85m","Kr-88","I-131","I-132","I-133","I-134","I-135","Te-132","Cs-134","Cs-136","Cs-137","Xe-133","Xe-135","all_nuclides"];var default_nuclide=nuclides[11];var active_category="conc";var active_nuclide=default_nuclide;var dose_active_nuclide="all_nuclides";var animation_timeout=600;var sequence=1;var markers=[];var date_string='2017/03/23 06:00 UTC';$("#nuclide_combo").val(default_nuclide);var pois_list=[[14.474722,48.974722,'Ceske Budejovice'],[14.416667,50.083333,'Prague'],[16.366667,48.2,'Vienna'],[13.293542,49.395278,'Klatovy'],[14,49.016667,'Prachatice'],[14.316667,48.816667,'Cesky Krumlov'],[14.770556,49.003611,'Trebon'],[14.698889,49.186667,'Veseli nad Luznici'],[14.416667,49.65,'Sedlcany'],[14.009167,49.688333,'Pribram'],[14.688611,49.782778,'Benesov'],[14.65,49.4,'Tabor'],[13.9,49.25,'Strakonice'],[14.133333,49.3,'Pisek'],[15,49.15,'Jindrichuv Hradec']];var imageBounds=new google.maps.LatLngBounds(new google.maps.LatLng(35.0000,0.0000),new google.maps.LatLng(64.9520,30.0000));var categories={'conc':['Conc','Bq/m3','Activity concentration'],'depo':['Depo','Bq/m2','Deposition'],'all_pathways':['All_pathways_GDR','mSv/h','All pathways 1-24 hours (cloud+ground+inhalation)'],'ti_all_pathways_day':['Time_int_all_pathways','mSv','Dose from all pathways in the first day (cloud+ground+inhalation)','day'],'ti_all_pathways_week':['Time_int_all_pathways','mSv','Dose from all pathways in the first week (cloud+ground+inhalation)','week'],'ti_all_pathways_month':['Time_int_all_pathways','mSv','Dose from all pathways in the first month (cloud+ground+inhalation)','month'],'ti_all_pathways_year':['Time_int_all_pathways','mSv','Dose from all pathways in the first year (cloud+ground+inhalation)','year']} function test_selection(){$("#nuclide_combo").hide();$("#btn-play").hide();$("#btn-pause").hide();$("#btn-backward").hide();$("#btn-forward").hide();$("#repeat-chck").hide();if(active_category=='conc'||active_category=='depo'||active_category=='all_pathways'){$("#nuclide_combo").show();$("#btn-play").show();$("#btn-pause").show();$("#btn-backward").show();$("#btn-forward").show();$("#repeat-chck").show();console.log('Setting all_nuclides as active nuclide')} if((active_category=='conc'||active_category=='depo')&&active_nuclide=='all_nuclides'){alert("Cannot show sum over all nuclides for '"+categories[active_category][2]+"', showing "+default_nuclide);$("#nuclide_combo").val(default_nuclide);active_nuclide=default_nuclide;}} function FormatNumberLength(num,length){var r=""+num;while(r.length0){item_no-=2;}else{item_no=max_count-1;} console.log(item_no);sequence_frame();} function show_image_single(time_string){var file_name=images_prefix+categories[active_category][0]+"/all_nuclides_"+time_string+".svg";console.log("Showing single image: "+file_name);if(overlay){console.log("removing overlay...");overlay.remove();overlay=null;} overlay=new ProjectedOverlay(map,file_name,imageBounds,{"percentOpacity":100});} function update_title(){$("#title").html(categories[active_category][2]+" ("+categories[active_category][1]+"), time = "+(item_no+1)+"/"+(max_count+1)+" hours");} function update_block(){update();if(active_category=='conc'||active_category=='depo'||active_category=='all_pathways'){console.log('active category sequence');sequence=1;show_image_sequence();}else{console.log('active category single');var time_string=categories[active_category][3];sequence=0;show_image_single(time_string);}} function update(){if(active_category=='conc'||active_category=='depo'||active_category=='all_pathways'){$("#title").html(categories[active_category][2]+" ("+categories[active_category][1]+"), time = "+(item_no+1)+"/"+(max_count+1)+" hours");$("#colorbar_div").html("");}else{var time_string=categories[active_category][3];$("#title").html(categories[active_category][2]+" ("+categories[active_category][1]+"), first "+time_string+" since release start");$("#colorbar_div").html("");}} function center_map(lat,lon){var poi_location=new google.maps.LatLng(lat,lon);pause();map.setZoom(8);map.setCenter(poi_location);} function add_poi_listener(marker,poi_img_path,poi_title){marker.addListener('click',function(){pause();map.setZoom(8);map.setCenter(marker.getPosition());$('#poi_image').html("");$('#poi_modal').modal('show');$('#poi_modal_title').html(poi_title+" - Radiation situation during first 24 hours after release start");});} function create_markers(pois_list){var pois_no=pois_list.length;for(var i=0;i