CINXE.COM
FEMA Flood Map Service Center | Search All Products
<script> var userName = ''; </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "//www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html lang="en" dir="ltr"> <head profile="http://www.w3.org/1999/xhtml/vocab"> <!-- Google tag (gtag.js) --------Keep this at the top of <head> --> <meta name="google-site-verification" content="qcqSjE7cGbCl81WDJ3x6qh_QdN5Y2cJ8ZTAms33LMEU" /> <script src="../portal/js/analytics.js"></script> <!-- Google Analytics 4 tag Do Not Remove nor Move from Location (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id="+gaIDs.GA4></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', gaIDs.GA4); </script> <!-- Google Tag Manager Verification Do Not Remove nor Move from Location --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', gaIDs.GTM); if (top !=self) { top.location.replace(self.location.href) }</script> <!-- End Google Tag Manager --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="shortcut icon" href="/portal/images/favicon.ico" type="image/vnd.microsoft.icon" /> <link rel="canonical" href="//www.fema.gov/msc-theme-template-v1" /> <link rel="shortlink" href="//www.fema.gov/msc-theme-template-v1" /> <link type="text/css" rel="stylesheet" href="/portal/css/css_lQaZfjVpwP_oGNqdtWCSpJT1EMqXdMiU84ekLLxQnc4.css" media="all" /> <link type="text/css" rel="stylesheet" href="/portal/css/css__LeQxW73LSYscb1O__H6f-j_jdAzhZBaesGL19KEB6U.css" media="all" /> <link type="text/css" rel="stylesheet" href="/portal/css/css_nUJ8u_JWGd1VahIuXxln_PiAqHp-WV5Yj9hgbc8AaDQ.css" media="all" /> <link type="text/css" rel="stylesheet" href="/portal/css/css_3fvnOdj11KR2mn-V0IWeO4G5jN8xqN0KkpQGevj2N7w.css" media="all" /> <link type="text/css" rel="stylesheet" href="/portal/css/css_dH6Xfje_EDDoUXU7K-sOHH6iaAvf32U1bMcyyDzHpD0.css" media="all" /> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,vietnamese,latin-ext,greek-ext,cyrillic' rel='stylesheet' type='text/css'> <script language="javascript" type="text/javascript"> var ExpandAllSectionsText = "Expand All Sections"; var CollapseAllSectionsText = "Collapse All Sections"; var NoResultsFoundText = ""; var advancedSearchText = "Search for"; var NavigationPlaceholderText = "Start typing here to filter…"; var SearchPlaceholderText = "Search anything on fema.gov"; var closeText = "Close"; var downloadAppLabel = "Download FEMA Mobile App"; var inThisSectionLabel = "In this Section"; var inThisSectionText = "In this Section"; var AppAuthSubText = "Remember to plug in your PIV/CAC card."; var PivH2 = "PIV Card Login"; //MediaElement variables var playButton = "Play."; var progressBar = "Progress Bar."; var closedCaptionButton = "Closed caption button."; var volumeButton = "Volume button."; var fullScreenButton = "Fullscreen button."; </script> <script src="/portal/js/js_lZ9kpQqrFO9iMOrWRPD2c5I8gI7-sX7TO_pTARrQEMU.js"></script> <script src="/portal/js/js_THcwq4G882w3Eb1HklHrvzGAKa_-1g_0QbuBqjMhaV4.js"></script> <script src="/portal/js/js_NpX2cwCeepkWZZ194B6-ViyVBHleaYLOx5R9EWBOMRU.js"></script> <script src="/portal/js/js_Js4lOJ0_Am6ebnC0EP-psjO8Yu5gmlcOhu72hrxvi2s.js"></script> <script>window.CKEDITOR_BASEPATH = '/sites/all/libraries/ckeditor/'</script> <script src="/portal/js/js_x1Asg_paR91u1arDvF7gS_xR7fthnVj3L414MbNvdNU.js"></script> <script src="/portal/js/js_7E18bMLOJVTzOcxdValVlyzHz_k7NhhgkX2FcSMA2HA.js"></script> <script>jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"unicorn","theme_token":"7aChE41vTJ2gXfIwJxBfTJwCRKDJJwq0OWv_tEw0MdY","js":{"profiles\/fema_gov\/modules\/contrib\/extlink_extra\/extlink_extra.js":1,"profiles\/fema_gov\/themes\/bootstrap\/js\/bootstrap.js":1,"sites\/all\/modules\/jquery_update\/replace\/jquery\/1.9\/jquery.min.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/external\/jquery.cookie.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.core.min.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.widget.min.js":1,"profiles\/fema_gov\/modules\/contrib\/extlink\/extlink.js":1,"profiles\/fema_gov\/libraries\/colorbox\/jquery.colorbox-min.js":1,"sites\/all\/modules\/colorbox\/js\/colorbox.js":1,"sites\/all\/modules\/colorbox\/styles\/default\/colorbox_style.js":1,"sites\/all\/modules\/colorbox\/js\/colorbox_load.js":1,"sites\/all\/modules\/colorbox\/js\/colorbox_inline.js":1,"profiles\/fema_gov\/modules\/custom\/wcm_survey\/js\/wcm_survey.js":1,"profiles\/fema_gov\/modules\/custom\/wcm_survey\/js\/json3.min.js":1,"profiles\/fema_gov\/modules\/custom\/wcm_survey\/js\/jquery.cookie.js":1,"0":1,"profiles\/fema_gov\/themes\/unicorn\/js\/mediaelement\/build\/mediaelement-and-player.min.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_mediaelement_fixes.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_image_rotator.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/affix.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/alert.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/button.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/carousel.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/collapse.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/dropdown.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/modal.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/tooltip.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/popover.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/scrollspy.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/tab.js":1,"profiles\/fema_gov\/themes\/unicorn\/..\/bootstrap\/bootstrap\/js\/transition.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_content_collapse.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_nav_filter.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_site_wide_fixes.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_social_images.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_download_app.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/tablesorter.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_tables.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/stacktable.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_mobile_fixes.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/left_menu_collapse.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/unicorn_is_useful_fixes.js":1,"profiles\/fema_gov\/themes\/unicorn\/js\/jquery.dataTables.min.js":1},"css":{"modules\/system\/system.base.css":1,"misc\/ui\/jquery.ui.core.css":1,"misc\/ui\/jquery.ui.theme.css":1,"profiles\/fema_gov\/modules\/features\/fema_diamond\/fema_diamond.css":1,"sites\/all\/modules\/date\/date_api\/date.css":1,"sites\/all\/modules\/date\/date_popup\/themes\/datepicker.1.7.css":1,"sites\/all\/modules\/date\/date_repeat_field\/date_repeat_field.css":1,"profiles\/fema_gov\/modules\/custom\/diamond\/diamond.css":1,"profiles\/fema_gov\/modules\/custom\/fema_faq\/css\/fema_faq.css":1,"modules\/field\/theme\/field.css":1,"profiles\/fema_gov\/modules\/custom\/wcm_survey\/wcm_survey.css":1,"profiles\/fema_gov\/modules\/custom\/workbench_notification\/workbench_notification.css":1,"profiles\/fema_gov\/modules\/custom\/diamond\/diamond_medialibrary\/diamond_medialibrary.css":1,"profiles\/fema_gov\/modules\/contrib\/extlink\/extlink.css":1,"sites\/all\/modules\/views\/css\/views.css":1,"sites\/all\/modules\/colorbox\/styles\/default\/colorbox_style.css":1,"sites\/all\/modules\/ctools\/css\/ctools.css":1,"profiles\/fema_gov\/modules\/contrib\/extlink_extra\/extlink_extra.508.css":1,"profiles\/fema_gov\/themes\/unicorn\/js\/mediaelement\/build\/mediaelementplayer.css":1,"profiles\/fema_gov\/themes\/unicorn\/css\/style.css":1,"profiles\/fema_gov\/themes\/unicorn\/css\/jquery.dataTables.min.css":1}},"colorbox":{"opacity":"0.85","current":"{current} of {total}","previous":"\u00ab Prev","next":"Next \u00bb","close":"Close","maxWidth":"98%","maxHeight":"98%","fixed":true,"mobiledetect":true,"mobiledevicewidth":"480px"},"wcmSurvey":{"userPercentage":"25","pageDepth":"4","url":"\/\/www.surveymonkey.com\/s\/FEMAgov","force":false,"surveyRetakeTimeout":"90","surveyPopup":"\u003Cdiv id=\u0022wcm-survey-popup\u0022 class=\u0022unicorn\u0022\u003E\n \u003Cdiv class=\u0022logo\u0022\u003E\n \u003Cimg alt=\u0022Federal Emergency Management Agency Seal\u0022 src=\u0022\/\/www.fema.gov\/sites\/default\/files\/images\/fema_surveypopup.png\u0022\/\u003E\n \u003C\/div\u003E\n \u003Cdiv class=\u0022message\u0022\u003E\n \u003Cp\u003EYou have been selected to participate in a brief survey about your experience today with FEMA.gov.\u003C\/p\u003E \u003C\/div\u003E\n \u003Cdiv class=\u0022choices\u0022\u003E\n \u003Cspan class=\u0022button yes\u0022\u003E\u003Ca title=\u0022Yes, I\u0027ll give feedback\u0022 href=\u0022\/\/www.surveymonkey.com\/s\/FEMAgov\u0022 class=\u0022accept\u0022 target=\u0022_blank\u0022 id=\u0022external_link\u0022\u003EYes, I\u0027ll give feedback\u003C\/a\u003E\u003C\/span\u003E\n \u003Cspan class=\u0022button no\u0022\u003E\u003Ca title=\u0022No Thanks, I do not want to give feedback\u0022 href=\u0022#\u0022 class=\u0022decline\u0022\u003ENo, thanks\u003C\/a\u003E\u003C\/span\u003E\n \u003C\/div\u003E\n\u003C\/div\u003E\n","debugMode":1,"position":"top","offset":"65px","height":"250px","width":"631px","maxHeight":"75%","maxWidth":"75%"},"diamondMedialibrary":{"path":"media-library"},"extlink":{"extTarget":0,"extClass":0,"extLabel":"(link is external)","extImgClass":0,"extSubdomains":1,"extExclude":"(.*\\.gov)|(.*\\.mil)|(\\*.fema.maps.arcgis.com)||(\\.addthis.com)|(.*\\.fema.net)|(s3-us-gov-west-1\\.amazonaws\\.com)|(surveymonkey\\.com)","extInclude":"","extCssExclude":"","extCssExplicit":"","extAlert":0,"extAlertText":{"value":"You are now leaving an official website of the Federal Emergency Management Agency. Links to non-FEMA sites are provided for the visitor\u0027s convenience and do not represent an endorsement by FEMA of any commercial or private issues, products or services. Note that the privacy policy of the linked site may differ from that of FEMA.","format":"untouched_html"},"mailtoClass":0,"mailtoLabel":"(link sends e-mail)"},"extlink_extra":{"extlink_alert_type":"confirm","extlink_alert_timer":"0","extlink_alert_url":"\/\/www.fema.gov\/now-leaving","extlink_cache_fix":0,"extlink_exclude_warning":"","extlink_508_fix":1,"extlink_508_text":" [external link]","extlink_url_override":0,"extlink_url_params":{"external_url":null,"back_url":null}},"bootstrap":{"anchorsFix":1,"anchorsSmoothScrolling":1,"popoverEnabled":1,"popoverOptions":{"animation":1,"html":0,"placement":"right","selector":"","trigger":"click","title":"","content":"","delay":0,"container":"body"},"tooltipEnabled":1,"tooltipOptions":{"animation":1,"html":0,"placement":"auto left","selector":"","trigger":"hover focus","delay":0,"container":"body"}}});</script> <!-- [head] --> <title>FEMA Flood Map Service Center | Search All Products</title> <link rel="stylesheet" type="text/css" href="/portal/css/smoothness/jquery-ui-1.10.4.custom.css"> <link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css" /> <link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.10/js/esri/css/esri.css" /> <link rel="stylesheet" type="text/css" href="/portal/css/msc.css"> <script src="/portal/js/jquery.dataTables.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function ($) { $('.dropdown-toggle').dropdown(); if(userName!=''){ var logoutLink = document.createElement('a'); $(logoutLink).attr({"href": "/portal/logout", "class":"logout-link"}).text("Logout"); $("#msc-logout-link-span").append(logoutLink); } window.gtagEventHandler=function gtagEventHandler(event) { var action; if ($(this).attr('alt').toLowerCase().indexOf('view') > -1 ) { action = "View"; } else if ($(this).attr('alt').toLowerCase().indexOf('download') > -1) { action = "Download"; } else { action = null ; } if ( action ) { var title=$.grep([event.data.category,event.data.product_type_id,event.data.produt_subtype_id], function(item,index) {return item}).join(" | "); } } var dojoConfig = { parseOnLoad : true }; var helpWindow = null; window.openHelpWindow = function openHelpWindow(anchor){ console.log('open help windown' + anchor); window.open("/portal/help?helpID=" +anchor, "mscPortalHelpWindow", "location=0,scrollbars=1,resizable=1,width=1050,height=300"); } }); </script> <script src="/portal/js/jquery-ui-1.10.4.js"></script> <script> var IEScriptDialogDisplayed = false; var initialLackOfAvailabilityResults = false; console.log("Availability results:" + initialLackOfAvailabilityResults); // jQuery(function(){ jQuery('#txtjurisdictionname').autocomplete( {source:'/portal/liveSearch?suggest=jurisdiction', minLength:3, select:function(evt, ui){ // when jurisdiction selected, populate hidden fields in this form to pass key/value through jQuery('#jurisdictionvalue').val(ui.item.label); jQuery('#jurisdictionkey').val(ui.item.value); } }); //remove productid field live search jQuery('#txtproductid').autocomplete({source:'/portal/liveSearch?suggest=productid', minLength:3}); jQuery( "#accordion" ).accordion({ collapsible: true, active : "none", heightStyle: "content" }); function expand(){ if (jQuery("#expandAll").text() == "Expand All") { jQuery('#accordion .ui-accordion-content').show(); jQuery(this).text("Collapse All"); document.getElementById("btn-folder").src = "/portal/images/ico-folder_open.png"; } else { jQuery(".ui-accordion-content").hide(); jQuery(this).text("Expand All"); document.getElementById("btn-folder").src = "/portal/images/ico-folder_closed.png"; } return false; } jQuery("#expandAll").on('click', expand); var disclaimer = jQuery("#frp_disclaimer").detach(); var prelimDisclaimer1 = jQuery("#prelim_firm_disclaimer1").detach(); jQuery( ".productListC" ).accordion({ collapsible: true, active : "none", heightStyle: "content" }); jQuery("#floodRisk_map_accordion").prepend(disclaimer); jQuery("#prelim_firm_accordion").prepend(prelimDisclaimer1); jQuery( ".lomcListC" ).accordion({ collapsible: true, heightStyle: "content" }); jQuery( "#accordion" ).accordion({ icons: { "header": "ico-folder-closed", "activeHeader": "ico-folder-open" } }); //jQuery( ".lomcListC" ).accordion({ icons: { "header": "ui-icon-folder-collapsed", "activeHeader": "ui-icon-folder-open" } }); //jQuery( ".productListC" ).accordion({ icons: { "header": "ui-icon-folder-collapsed", "activeHeader": "ui-icon-folder-open" } }); jQuery('#accordion').accordion({ header: ".ui-accordion-header" }); jQuery('#accordion .ui-accordion-header').attr('tabindex','0'); jQuery( "#txtstartdate" ).datepicker(); jQuery( "#txtenddate" ).datepicker(); jQuery( ".searchresults" ).hide(); jQuery( "#searchresultsEmpty" ).hide(); jQuery( "#countyDropdown" ).hide(); jQuery( "#communityDropdown" ).hide(); }); </script> <script> function getAjaxData(callMethod){ //get county if(callMethod === 'getCounty') { //jQuery('#selcounty').attr("disabled", false); jQuery('#selcounty').empty(); jQuery('#selcommunity').empty(); jQuery('#countyDropdown').show(); jQuery('#communityDropdown').hide(); jQuery('#selcounty').append(jQuery('<option/>').attr("value", "none").text("--Select--")); var action = "/portal/advanceSearch" + "?getCounty=" + catalogSearchForm.selstate.options[catalogSearchForm.selstate.selectedIndex].value; jQuery.getJSON(action, function(data) { jQuery.each(data, function(i, item){ jQuery('#selcounty').append(jQuery('<option/>').attr("value", data[i].value).text(data[i].label)); }); }); } //get community if(callMethod === 'getCommunity') { //jQuery('#selcommunity').attr("disabled", false); jQuery('#selcommunity').empty(); jQuery('#selcommunity').append(jQuery('<option/>').attr("value", "none").text("--Select--")); jQuery('#communityDropdown').show(); var action = "/portal/advanceSearch" + "?getCommunity=" + catalogSearchForm.selcounty.options[catalogSearchForm.selcounty.selectedIndex].value + "&state="+ catalogSearchForm.selstate.options[catalogSearchForm.selstate.selectedIndex].value; jQuery.getJSON(action, function(data) { jQuery.each(data, function(i, item){ jQuery('#selcommunity').append(jQuery('<option/>').attr("value", data[i].value).text(data[i].label)); }); }); } } var selectedOption; var stringSelectedOption; var hasC; var jurisditionkeyhasC; var effective_products; var downloadAllProductsData; function updateSelectedOption(){ var selCommunity = document.getElementById("selcommunity"); selectedOption = selCommunity.options[selCommunity.selectedIndex].value; stringSelectedOption = selectedOption.toString(); hasC= stringSelectedOption.includes('C') } function getNumberOfProducts(products) { let sum = 0; for (let [key, value] of Object.entries(products)) { sum += value.length; } return sum; } function isEmpty(obj) { return Object.keys(obj).length === 0; } const getData = function (data) { let returnData = []; if (!isEmpty(data.EFFECTIVE)) returnData.push(["Effective Products (" + eff_root_count + ")"]); if ("FIRM_PANEL" in data.EFFECTIVE && data.EFFECTIVE.FIRM_PANEL.length > 0) { returnData.push(["Firm Panels (" + data.EFFECTIVE.FIRM_PANEL.length + ")"]); //returnData.push(["Product ID", "Effective Date", "Size", "Download", "View"]); for (let i = 0; i < data.EFFECTIVE.FIRM_PANEL.length; i++) { let panel = { productID: data.EFFECTIVE.FIRM_PANEL[i].product_NAME, effectiveDate: data.EFFECTIVE.FIRM_PANEL[i].product_EFFECTIVE_DATE_STRING, LOMC: "", size: data.EFFECTIVE.FIRM_PANEL[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIRM_PANEL_INDEX&productID=" + data.EFFECTIVE.FIRM_PANEL[i].product_NAME, view: "https://msc.fema.gov/portal/viewProduct?productID=" + data.EFFECTIVE.FIRM_PANEL[i].product_NAME } returnData.push(panel); if ("EFFECTIVE_LOMC" in data && "LOMC" in data.EFFECTIVE_LOMC) { if ("LOMA" in data.EFFECTIVE_LOMC.LOMC && panel.productID in data.EFFECTIVE_LOMC.LOMC.LOMA) { let lomaData = data.EFFECTIVE_LOMC.LOMC.LOMA[panel.productID]; for (let i = 0; i < lomaData.length; i++) { let loma = { productID: lomaData[i].c_PRODUCT_NAME, effectiveDate: lomaData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMA", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMA&productID=" + lomaData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if ("LOMR" in data.EFFECTIVE_LOMC.LOMC && panel.productID in data.EFFECTIVE_LOMC.LOMC.LOMR) { let lomrData = data.EFFECTIVE_LOMC.LOMC.LOMR[panel.productID]; for (let i = 0; i < lomrData.length; i++) { let loma = { productID: lomrData[i].c_PRODUCT_NAME, effectiveDate: lomrData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMR", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + lomrData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if ("REVAL" in data.EFFECTIVE_LOMC.LOMC && panel.productID in data.EFFECTIVE_LOMC.LOMC.REVAL) { let revalData = data.EFFECTIVE_LOMC.LOMC.REVAL[panel.productID]; for (let i = 0; i < revalData.length; i++) { let loma = { productID: revalData[i].c_PRODUCT_NAME, effectiveDate: revalData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "REVAL", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=REVAL&productID=" + revalData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } } } } if ("FIS_REPORT" in data && data.FIS_REPORT.length > 0) { returnData.push(["FIS Reports (" + data.FIS_REPORT.length + ")"]); for (let i = 0; i < data.FIS_REPORT.length; i++) { let fis_report = { productID: data.FIS_REPORT[i].product_NAME, effectiveDate: data.FIS_REPORT[i].product_EFFECTIVE_DATE_STRING, size: data.FIS_REPORT[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIS_REPORT&productID=" + data.FIS_REPORT[i].product_NAME } returnData.push(fis_report); } } if ("LOMR" in data.EFFECTIVE || "LOMA" in data.EFFECTIVE || "REVAL" in data.EFFECTIVE) { returnData.push(["LOMC " + eff_main_lomc_count.innerHTML.trim()]); } if ("LOMR" in data.EFFECTIVE && data.EFFECTIVE.LOMR.length > 0) { returnData.push(["LOMR (" + data.EFFECTIVE.LOMR.length + ")"]); for (let i = 0; i < data.EFFECTIVE.LOMR.length; i++) { let lomrData = { productID: data.EFFECTIVE.LOMR[i].product_NAME, effectiveDate: data.EFFECTIVE.LOMR[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.EFFECTIVE.LOMR[i].product_NAME } returnData.push(lomrData); } } if ("LOMA" in data.EFFECTIVE && data.EFFECTIVE.LOMA.length > 0) { returnData.push(["LOMA (" + data.EFFECTIVE.LOMA.length + ")"]); for (let i = 0; i < data.EFFECTIVE.LOMA.length; i++) { let lomaData = { productID: data.EFFECTIVE.LOMA[i].product_NAME, effectiveDate: data.EFFECTIVE.LOMA[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.EFFECTIVE.LOMA[i].product_NAME } returnData.push(lomaData); } } if ("REVAL" in data.EFFECTIVE && data.EFFECTIVE.REVAL.length > 0) { returnData.push(["Revalidations (" + data.EFFECTIVE.REVAL.length + ")"]); for (let i = 0; i < data.EFFECTIVE.REVAL.length; i++) { let revalData = { productID: data.EFFECTIVE.REVAL[i].product_NAME, effectiveDate: data.EFFECTIVE.REVAL[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.EFFECTIVE.REVAL[i].product_NAME } returnData.push(revalData); } } if ("NFHL_STATE_DATA" in data.EFFECTIVE && data.EFFECTIVE.NFHL_STATE_DATA.length > 0) { returnData.push(["NFHL Data-State (" + data.EFFECTIVE.NFHL_STATE_DATA.length + ")"]); for (let i = 0; i < data.EFFECTIVE.NFHL_STATE_DATA.length; i++) { let nfhlStateData = { productID: data.EFFECTIVE.NFHL_STATE_DATA[i].product_NAME, latestStudyEffectiveDate: data.EFFECTIVE.NFHL_STATE_DATA[i].product_EFFECTIVE_DATE_STRING, latestLOMREffectiveDate: data.EFFECTIVE.NFHL_STATE_DATA[i].product_DESCRIPTION, size: data.EFFECTIVE.NFHL_STATE_DATA[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=NFHL&productSubTypeID=NFHL_STATE_DATA&productID=" + data.EFFECTIVE.NFHL_STATE_DATA[i].product_NAME } returnData.push(nfhlStateData); } } if ("NFHL_COUNTY_DATA" in data.EFFECTIVE && data.EFFECTIVE.NFHL_COUNTY_DATA.length > 0) { returnData.push(["NFHL Data-County (" + data.EFFECTIVE.NFHL_COUNTY_DATA.length + ")"]); for (let i = 0; i < data.EFFECTIVE.NFHL_COUNTY_DATA.length; i++) { let nfhlCountyData = { productID: data.EFFECTIVE.NFHL_COUNTY_DATA[i].product_NAME, latestStudyEffectiveDate: data.EFFECTIVE.NFHL_COUNTY_DATA[i].product_EFFECTIVE_DATE_STRING, latestLOMREffectiveDate: data.EFFECTIVE.NFHL_COUNTY_DATA[i].product_DESCRIPTION, size: data.EFFECTIVE.NFHL_COUNTY_DATA[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=NFHL&productSubTypeID=NFHL_STATE_DATA&productID=" + data.EFFECTIVE.NFHL_COUNTY_DATA[i].product_NAME } returnData.push(nfhlCountyData); } } if ("PRELIM_FIRM" in data || "PRELIM_FIS_REPORT" in data || "PRELIM_FIRM_DB" in data) { returnData.push(["Preliminary Products " + prelim_root_count.innerHTML.trim()]); } if ("PRELIM_FIRM" in data && data.PRELIM_FIRM.length > 0) { returnData.push(["Preliminary FIRM Panels (" + data.PRELIM_FIRM.length + ")"]); for (let i = 0; i < data.PRELIM_FIRM.length; i++) { let prelimFirmPanel = { productID: data.PRELIM_FIRM[i].product_NAME, issueDate: data.PRELIM_FIRM[i].product_ISSUE_DATE_STRING, size: data.PRELIM_FIRM[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=PRELIM_PRODUCT&productSubTypeID=PRELIM_FIRM_INDEX&productID=" + data.PRELIM_FIRM[i].product_NAME } returnData.push(prelimFirmPanel); } } if ("PRELIM_FIS_REPORT" in data && data.PRELIM_FIS_REPORT.length > 0) { returnData.push(["Preliminary FIS Reports (" + data.PRELIM_FIS_REPORT.length + ")"]); for (let i = 0; i < data.PRELIM_FIS_REPORT.length; i++) { let prelimFISReport = { productID: data.PRELIM_FIS_REPORT[i].product_NAME, issueDate: data.PRELIM_FIS_REPORT[i].product_ISSUE_DATE_STRING, size: data.PRELIM_FIS_REPORT[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=PRELIM_PRODUCT&productSubTypeID=PRELIM_FIS_REPORT&productID=" + data.PRELIM_FIS_REPORT[i].product_NAME } returnData.push(prelimFISReport); } } if ("PRELIM_FIRM_DB" in data && data.PRELIM_FIRM_DB.length > 0) { returnData.push(["Preliminary FIRM Database (" + data.PRELIM_FIRM_DB.length + ")"]); for (let i = 0; i < data.PRELIM_FIRM_DB.length; i++) { let prelimFirmDatabase = { productID: data.PRELIM_FIRM_DB[i].product_NAME, issueDate: data.PRELIM_FIRM_DB[i].product_ISSUE_DATE_STRING, size: data.PRELIM_FIRM_DB[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=PRELIM_PRODUCT&productSubTypeID=PRELIM_FIRM_DB&productID=" + data.PRELIM_FIRM_DB[i].product_NAME } returnData.push(prelimFirmDatabase); } } if ("PENDING" in data && !isEmpty(data.PENDING)) { returnData.push(["Pending Products (" + pending_root_count + ")"]); if ("FIRM_PANEL" in data.PENDING && data.PENDING.FIRM_PANEL.length > 0) { returnData.push(["Firm Panels (" + data.PENDING.FIRM_PANEL.length + ")"]); for (let i = 0; i < data.PENDING.FIRM_PANEL.length; i++) { let panel = { productID: data.PENDING.FIRM_PANEL[i].product_NAME, effectiveDate: data.PENDING.FIRM_PANEL[i].product_EFFECTIVE_DATE_STRING, LOMC: "", size: data.PENDING.FIRM_PANEL[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIRM_PANEL_INDEX&productID=" + data.PENDING.FIRM_PANEL[i].product_NAME, view: "https://msc.fema.gov/portal/viewProduct?productID=" + data.PENDING.FIRM_PANEL[i].product_NAME } returnData.push(panel); if (panel.productID in data.PENDING_LOMC.LOMC.LOMA) { let lomaData = data.PENDING_LOMC.LOMC.LOMA[panel.productID]; for (let i = 0; i < lomaData.length; i++) { let loma = { productID: lomaData[i].c_PRODUCT_NAME, effectiveDate: lomaData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMA", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMA&productID=" + lomaData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if (panel.productID in data.PENDING_LOMC.LOMC.LOMR) { let lomrData = data.PENDING_LOMC.LOMC.LOMR[panel.productID]; for (let i = 0; i < lomrData.length; i++) { let loma = { productID: lomrData[i].c_PRODUCT_NAME, effectiveDate: lomrData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMR", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + lomrData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if (panel.productID in data.PENDING_LOMC.LOMC.REVAL) { let revalData = data.PENDING_LOMC.LOMC.REVAL[panel.productID]; for (let i = 0; i < revalData.length; i++) { let loma = { productID: revalData[i].c_PRODUCT_NAME, effectiveDate: revalData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "REVAL", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=REVAL&productID=" + revalData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } } } if ("PENDING_FIS_REPORT" in data && data.PENDING_FIS_REPORT.length > 0) { returnData.push(["FIS Reports (" + data.PENDING_FIS_REPORT.length + ")"]); for (let i = 0; i < data.PENDING_FIS_REPORT.length; i++) { let fis_report = { productID: data.PENDING_FIS_REPORT[i].product_NAME, effectiveDate: data.PENDING_FIS_REPORT[i].product_EFFECTIVE_DATE_STRING, size: data.PENDING_FIS_REPORT[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIS_REPORT&productID=" + data.PENDING_FIS_REPORT[i].product_NAME } returnData.push(fis_report); } } if ("LOMR" in data.PENDING || "LOMA" in data.PENDING || "REVAL" in data.PENDING) { returnData.push(["LOMC " + pending_lomc_count.innerHTML.trim()]); } if ("LOMR" in data.PENDING && data.PENDING.LOMR.length > 0) { returnData.push(["LOMR (" + data.PENDING.LOMR.length + ")"]); for (let i = 0; i < data.PENDING.LOMR.length; i++) { let lomrData = { productID: data.PENDING.LOMR[i].product_NAME, effectiveDate: data.PENDING.LOMR[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.PENDING.LOMR[i].product_NAME } returnData.push(lomrData); } } if ("LOMA" in data.PENDING && data.PENDING.LOMA.length > 0) { returnData.push(["LOMA (" + data.PENDING.LOMA.length + ")"]); for (let i = 0; i < data.PENDING.LOMA.length; i++) { let lomaData = { productID: data.PENDING.LOMA[i].product_NAME, effectiveDate: data.PENDING.LOMA[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.PENDING.LOMA[i].product_NAME } returnData.push(lomaData); } } if ("REVAL" in data.PENDING && data.PENDING.REVAL.length > 0) { returnData.push(["Revalidations (" + data.PENDING.REVAL.length + ")"]); for (let i = 0; i < data.PENDING.REVAL.length; i++) { let revalData = { productID: data.PENDING.REVAL[i].product_NAME, effectiveDate: data.PENDING.REVAL[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.PENDING.REVAL[i].product_NAME } returnData.push(revalData); } } if ("FIRM_DB" in data.PENDING && data.PENDING.FIRM_DB.length > 0) { returnData.push(["FIRM Database (" + data.PENDING.FIRM_DB.length + ")"]); for (let i = 0; i < data.PENDING.FIRM_DB.length; i++) { let firmdb_data = { productID: data.PENDING.FIRM_DB[i].product_NAME, effectiveDate: data.PENDING.FIRM_DB[i].product_EFFECTIVE_DATE_STRING, description: data.PENDING.FIRM_DB[i].product_DESCRIPTION, size: data.PENDING.FIRM_DB[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.PENDING.FIRM_DB[i].product_NAME } returnData.push(firmdb_data); } } } if ("HISTORIC" in data && !isEmpty(data.HISTORIC)) { returnData.push(["Historic Products (" + his_root_count + ")"]); if ("FIRM_PANEL" in data.HISTORIC && data.HISTORIC.FIRM_PANEL.length > 0) { returnData.push(["Firm Panels (" + data.HISTORIC.FIRM_PANEL.length + ")"]); //returnData.push(["Product ID", "Effective Date", "Size", "Download", "View"]); for (let i = 0; i < data.HISTORIC.FIRM_PANEL.length; i++) { let panel = { productID: data.HISTORIC.FIRM_PANEL[i].product_NAME, effectiveDate: data.HISTORIC.FIRM_PANEL[i].product_EFFECTIVE_DATE_STRING, LOMC: "", size: data.HISTORIC.FIRM_PANEL[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIRM_PANEL_INDEX&productID=" + data.HISTORIC.FIRM_PANEL[i].product_NAME, view: "https://msc.fema.gov/portal/viewProduct?productID=" + data.HISTORIC.FIRM_PANEL[i].product_NAME } returnData.push(panel); if (panel.productID in data.HISTORIC_LOMC.LOMC.LOMA) { let lomaData = data.HISTORIC_LOMC.LOMC.LOMA[panel.productID]; for (let i = 0; i < lomaData.length; i++) { let loma = { productID: lomaData[i].c_PRODUCT_NAME, effectiveDate: lomaData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMA", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMA&productID=" + lomaData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if (panel.productID in data.HISTORIC_LOMC.LOMC.LOMR) { let lomrData = data.HISTORIC_LOMC.LOMC.LOMR[panel.productID]; for (let i = 0; i < lomrData.length; i++) { let loma = { productID: lomrData[i].c_PRODUCT_NAME, effectiveDate: lomrData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "LOMR", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + lomrData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } if (panel.productID in data.HISTORIC_LOMC.LOMC.REVAL) { let revalData = data.HISTORIC_LOMC.LOMC.REVAL[panel.productID]; for (let i = 0; i < revalData.length; i++) { let loma = { productID: revalData[i].c_PRODUCT_NAME, effectiveDate: revalData[i].c_PRODUCT_EFFECTIVE_DATE_STRING, LOMC: "REVAL", size: "", download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=REVAL&productID=" + revalData[i].c_PRODUCT_NAME, view: "" } returnData.push(loma); } } } } } if ("HISTORIC_FIS_REPORT" in data && data.HISTORIC_FIS_REPORT.length > 0) { returnData.push(["FIS Reports (" + data.HISTORIC_FIS_REPORT.length + ")"]); for (let i = 0; i < data.HISTORIC_FIS_REPORT.length; i++) { let fis_report = { productID: data.HISTORIC_FIS_REPORT[i].product_NAME, effectiveDate: data.HISTORIC_FIS_REPORT[i].product_EFFECTIVE_DATE_STRING, size: data.HISTORIC_FIS_REPORT[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FINAL_PRODUCT&productSubTypeID=FIS_REPORT&productID=" + data.HISTORIC_FIS_REPORT[i].product_NAME } returnData.push(fis_report); } } if ("LOMR" in data.HISTORIC || "LOMA" in data.HISTORIC || "REVAL" in data.HISTORIC) { returnData.push(["LOMC " + his_lomc_count.innerHTML.trim()]); } if ("LOMR" in data.HISTORIC && data.HISTORIC.LOMR.length > 0) { returnData.push(["LOMR (" + data.HISTORIC.LOMR.length + ")"]); for (let i = 0; i < data.HISTORIC.LOMR.length; i++) { let lomrData = { productID: data.HISTORIC.LOMR[i].product_NAME, effectiveDate: data.HISTORIC.LOMR[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.HISTORIC.LOMR[i].product_NAME } returnData.push(lomrData); } } if ("LOMA" in data.HISTORIC && data.HISTORIC.LOMA.length > 0) { returnData.push(["LOMA (" + data.HISTORIC.LOMA.length + ")"]); for (let i = 0; i < data.HISTORIC.LOMA.length; i++) { let lomaData = { productID: data.HISTORIC.LOMA[i].product_NAME, effectiveDate: data.HISTORIC.LOMA[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.HISTORIC.LOMA[i].product_NAME } returnData.push(lomaData); } } if ("REVAL" in data.HISTORIC && data.HISTORIC.REVAL.length > 0) { returnData.push(["Revalidations (" + data.HISTORIC.REVAL.length + ")"]); for (let i = 0; i < data.HISTORIC.REVAL.length; i++) { let revalData = { productID: data.HISTORIC.REVAL[i].product_NAME, effectiveDate: data.HISTORIC.REVAL[i].product_EFFECTIVE_DATE_STRING, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=LOMC&productSubTypeID=LOMR&productID=" + data.HISTORIC.REVAL[i].product_NAME } returnData.push(revalData); } } if ("FLOOD_RISK_MAP" in data || "FLOOD_RISK_REPORT" in data || "FLOOD_RISK_DB" in data) { returnData.push(["Flood Risk Products " + floodRisk_root_count.innerHTML.trim()]); } if("FLOOD_RISK_MAP" in data && data.FLOOD_RISK_MAP.length > 0){ returnData.push(["Flood Risk Maps (" + data.FLOOD_RISK_MAP.length + ")"]); for(let i = 0; i < data.FLOOD_RISK_MAP.length; i++){ let flood_risk_map = { productID: data.FLOOD_RISK_MAP[i].product_NAME, postingDate: data.FLOOD_RISK_MAP[i].product_POSTING_DATE_STRING, size: data.FLOOD_RISK_MAP[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FLOOD_RISK_PRODUCT&productSubTypeID=FLOOD_RISK_MAP&productID=" + data.FLOOD_RISK_MAP[i].product_NAME } returnData.push(flood_risk_map); } } if("FLOOD_RISK_REPORT" in data && data.FLOOD_RISK_REPORT.length > 0){ returnData.push(["Flood Risk Reports (" + data.FLOOD_RISK_REPORT.length + ")"]); for(let i = 0; i < data.FLOOD_RISK_REPORT.length; i++){ let flood_risk_report = { productID: data.FLOOD_RISK_REPORT[i].product_NAME, postingDate: data.FLOOD_RISK_REPORT[i].product_POSTING_DATE_STRING, size: data.FLOOD_RISK_REPORT[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FLOOD_RISK_PRODUCT&productSubTypeID=FLOOD_RISK_REPORT&productID=" + data.FLOOD_RISK_REPORT[i].product_NAME } returnData.push(flood_risk_report); } } if("FLOOD_RISK_DB" in data && data.FLOOD_RISK_DB.length > 0){ returnData.push(["Flood Risk Database (" + data.FLOOD_RISK_DB.length + ")"]); for(let i = 0; i < data.FLOOD_RISK_DB.length; i++){ let flood_risk_db = { productID: data.FLOOD_RISK_DB[i].product_NAME, fileFormat: data.FLOOD_RISK_DB[i].product_DESCRIPTION, postingDate: data.FLOOD_RISK_DB[i].product_POSTING_DATE_STRING, size: data.FLOOD_RISK_DB[i].product_FILE_SIZE, download: "https://msc.fema.gov/portal/downloadProduct?productTypeID=FLOOD_RISK_PRODUCT&productSubTypeID=FLOOD_RISK_DB&productID=" + data.FLOOD_RISK_DB[i].product_NAME } returnData.push(flood_risk_db); } } console.log(returnData); return returnData; } function downloadAllProducts(data) { // Creating a Blob for having a csv file format // and passing the data with type const blob = new Blob([data], { type: 'text/csv' }); // Creating an object for downloading url const url = window.URL.createObjectURL(blob) // Creating an anchor(a) tag of HTML const a = document.createElement('a') // Passing the blob downloading url a.setAttribute('href', url) // Setting the anchor tag attribute for downloading // and passing the download file name a.setAttribute('download', getSearchString().replace(/[,]+/g, "").trim().replace(/[ ]+/g, "_") + '.csv'); // Performing a download with click a.click() } function csvmaker(data) { csvRows = []; let headers = Object.keys(data[0]); for (let i = 0; i < data.length; i++) { if (data[i].length == 1) { csvRows.push(data[i][0]); csvRows.join('\n'); headers = []; } else { if (headers.toString() != Object.keys(data[i]).toString()) { headers = Object.keys(data[i]); csvRows.push(headers.join(',')); csvRows.join('\n'); } const values = Object.values(data[i]).join(','); csvRows.push(values); csvRows.join('\n'); } } return csvRows.join('\n') } async function getAllProductsCSV() { const csvData = csvmaker(getData(downloadAllProductsData)); downloadAllProducts(csvData); } var effLoma = null; var effLomr = null; var effReval = null; var pendLoma = null; var pendLomr = null; var pendReval = null; var histLoma = null; var histLomr = null; var histReval = null; var effFirmTable = null; var pendFirmTable = null; var histFirmTable = null; function validate(){ jQuery('#error').empty(); jQuery('#error').addClass("hide"); jQuery('#startdateLabel').attr('style', ''); jQuery('#enddateLabel').attr('style', ''); if (jQuery.trim(jQuery('#txtjurisdictionname').val()) != '' ){ if( jQuery('#jurisdictionkey').val() != jQuery('#txtjurisdictionname').val()){ if(jQuery('#jurisdictionkey').val() != 'PASSEDIN'){ jQuery('#error').append("Please select Jurisdiction name from dropdown menu to proceed."); jQuery('#error').removeClass("hide"); return false; } } } if (jQuery.trim(jQuery('#txtjurisdictionname').val()) == '' && jQuery.trim(jQuery('#txtproductid').val()) == '' && (jQuery.trim(jQuery('#selstate').val()) == 'none' || jQuery.trim(jQuery('#selstate').val()) == '' )){ var errorMsg = "Please enter one of three search options to start search"; jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } if (jQuery.trim(jQuery('#selstate').val()) != 'none' && jQuery.trim(jQuery('#selcounty').val()) == 'none' ){ var errorMsg = "Please enter county information to start search"; jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } if ((jQuery.trim(jQuery('#selstate').val()) != 'none' && jQuery.trim(jQuery('#selstate').val()) != '') && (jQuery.trim(jQuery('#selcounty').val()) != 'none' && jQuery.trim(jQuery('#selcounty').val()) != '') && (jQuery('#selcommunity').val() == 'none' || jQuery('#selcommunity').val() == null)){ var errorMsg = "Please enter community information to start search"; jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } if ((jQuery.trim(jQuery('#txtstartdate').val()) != '' && jQuery.trim(jQuery('#txtenddate').val())=='') || (jQuery.trim(jQuery('#txtenddate').val()) != '' && jQuery.trim(jQuery('#txtstartdate').val())=='')){ var errorMsg = "Please enter complete date range information to start search"; jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } if (jQuery.trim(jQuery('#txtstartdate').val()) != '' && jQuery.trim(jQuery('#txtenddate').val()) != '' ){ var errorMsg = "Please enter an valid date format: MM/dd/yyyy"; if(!validateDate(jQuery.trim(jQuery('#txtstartdate').val()))) { jQuery('#startdateLabel').attr('style', 'color:red'); jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } else if(!validateDate(jQuery.trim(jQuery('#txtenddate').val()))) { jQuery('#enddateLabel').attr('style', 'color:red'); jQuery('#error').append(errorMsg); jQuery('#error').removeClass("hide"); return false; } } return true; } function getDateString(dateString){ var dateStr = ''; var d = new Date(); var fullYear = d.getFullYear(); var month = d.getMonth() + 1; var day = d.getDate(); if(dateString=='today'){ dateStr = month + '/' + day + '/' + fullYear; } else if(dateString=='lastYear'){ dateStr = month + '/' + day + '/' + (fullYear-1); } return dateStr; } function validateDate(dateString){ var res = dateString.split("/"); if(res.length!=3) return false; var month = parseInt(res[0]) ; var day = parseInt(res[1]); var year = parseInt(res[2]); var d = new Date(dateString); if(d.getDate()!= day) return false; if(d.getMonth()+1 != month) return false; if(d.getFullYear()!=year) return false; return true; } function validateDateOld(dateString){ var date_regex = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}jQuery/ ; if(!(date_regex.test(dateString))) { return false; } return true; } function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } function getSearchString(){ var searchString = ''; var searchMethod = ''; if(jQuery.trim(jQuery('#txtjurisdictionname').val()) != ''){ searchString = jQuery('#txtjurisdictionname').val(); searchMethod = 'search by Jurisdiction Name'; } else if(jQuery('#txtproductid').val() != ''){ searchString = "Product " + jQuery('#txtproductid').val(); searchMethod = 'search by ProductId'; } else if(catalogSearchForm.selcommunity.options[catalogSearchForm.selcommunity.selectedIndex].value != 'none') { searchString = catalogSearchForm.selcommunity.options[catalogSearchForm.selcommunity.selectedIndex].label ; searchMethod = 'search by Pull down Menu' } if(searchString.length > 95) { var newStr = ''; var splitStr = searchString.split(","); for (var i = 0; i < splitStr.length; i++) { if(i==splitStr.length - 1) { newStr = newStr + splitStr[i]; } else { newStr = newStr + splitStr[i] + ','; } if(i%8 == 1 ) newStr = newStr + '<br />'; } searchString = newStr; } return searchString; } function setSearchCriteria(){ var cid = ''; if(jQuery.trim(jQuery('#txtjurisdictionname').val()) != ''){ cid = jQuery('#jurisdictionvalue').val(); if(cid.length > 6) { var res = cid.split("|"); if(res.length != 0) { cid = res[1]; } } } //else if(catalogSearchForm.selcommunity.options[catalogSearchForm.selcommunity.selectedIndex].value != 'none') { // cid = catalogSearchForm.selcommunity.options[catalogSearchForm.selcommunity.selectedIndex].value ; //} else if (jQuery('#selcommunity').val() != 'none' && jQuery('#selcommunity').val() != null){ cid = cid = catalogSearchForm.selcommunity.options[catalogSearchForm.selcommunity.selectedIndex].value ; } jQuery('#searchedCid').val(cid); //should set whatever value, don't check //if (jQuery('#txtstartdate').val().trim() != '' && // jQuery('#txtenddate').val().trim() != '' ){ jQuery('#searchedDateStart').val(jQuery('#txtstartdate').val()); jQuery('#searchedDateEnd').val(jQuery('#txtenddate').val()); //} } //reset function reset(){ //clear EFFECTIVE FIRM_PANEL if(effFirmTable != null){ effFirmTable.destroy(); } //jQuery('#eff_firmpanel_header').empty(); jQuery('#eff_firmpanel_count').empty(); jQuery('#eff_firmpanel_loma_count').empty(); jQuery('#eff_firmpanel_lomr_count').empty(); jQuery('#eff_firmpanel_list').empty(); jQuery('#eff_firmpanel_LOMA_list').empty(); jQuery('#eff_firmpanel_LOMR_list').empty(); jQuery('#eff_firmpanel_REVAL_list').empty(); eff_root_count = 0; //clear Effective LOMC eff_loma_header_exist = false; eff_lomr_header_exist = false; eff_reval_header_exist = false; root_eff_reval_count =0 ; root_eff_loma_count = 0; root_eff_lomr_count = 0; jQuery('#eff_lomc_list').empty(); jQuery('#eff_loma_list').empty(); jQuery('#eff_lomr_list').empty(); jQuery('#eff_reval_list').empty(); jQuery('#eff_main_lomc_count').empty(); jQuery('#eff_main_loma_count').empty(); jQuery('#eff_main_lomr_count').empty(); jQuery('#eff_main_reval_count').empty(); //clear NFHL County/state jQuery('#nfhl_county_header').empty(); jQuery('#nfhl_state_header').empty(); jQuery('#nfhl_county_count').empty(); jQuery('#nfhl_state_count').empty(); jQuery('#nfhl_county_list').empty(); jQuery('#nfhl_state_list').empty(); //clear FIS Report jQuery('#eff_fis_list_header').empty(); jQuery('#fis_main_count').empty(); jQuery('#fis_main_list').empty(); jQuery('#fis_pending_count').empty(); jQuery('#fis_effective_count').empty(); jQuery('#pending_fis_list').empty(); jQuery('#eff_fis_list').empty(); jQuery('#his_fis_list').empty(); fis_pending_count=0; fis_his_count=0; fis_effective_count=0; //clear PENDING root_pending_reval_count = 0; root_pending_lomr_count = 0; root_pending_loma_count = 0; if(pendFirmTable != null){ pendFirmTable.destroy(); } jQuery('#pending_firmpanel_count').empty(); jQuery('#pending_firmpanel_list').empty(); jQuery('#pending_firmpanel_loma_count').empty(); jQuery('#pending_firmpanel_lomr_count').empty(); jQuery('#pending_firmpanel_LOMA_list').empty(); jQuery('#pending_firmpanel_LOMR_list').empty(); jQuery('#pending_firmpanel_REVAL_list').empty(); jQuery('#pending_firmdb_count').empty(); jQuery('#pending_firmdb_list').empty(); jQuery('#pending_lomc_count').empty(); jQuery('#pending_lomr_count').empty(); jQuery('#pending_lomr_list').empty(); jQuery('#pending_loma_count').empty(); jQuery('#pending_loma_list').empty(); jQuery('#pending_reval_count').empty(); jQuery('#pending_reval_list').empty(); pending_root_count=0; //clear History root_his_reval_count = 0; root_his_lomr_count = 0; root_his_loma_count = 0; if(histFirmTable != null){ histFirmTable.destroy(); } jQuery('#his_firmpanel_count').empty(); jQuery('#fis_his_count').empty(); jQuery('#his_firmpanel_list').empty(); jQuery('#his_firmpanel_LOMA_list').empty(); jQuery('#his_firmpanel_lomr_count').empty(); jQuery('#his_firmpanel_LOMR_list').empty(); jQuery('#his_firmpanel_REVAL_list').empty(); jQuery('#his_lomc_count').empty(); jQuery('#his_lomr_count').empty(); jQuery('#his_lomr_list').empty(); jQuery('#his_loma_count').empty(); jQuery('#his_loma_list').empty(); jQuery('#his_reval_count').empty(); jQuery('#his_reval_list').empty(); his_root_count = 0; //pending container for LOMC jQuery('#pendingLOMCContainer').empty(); //Effective container for LOMC jQuery('#effectiveLOMCContainer').empty(); //Historic container for LOMC jQuery('#historicLOMCContainer').empty(); //clear prelim products var prelimFirmTableAPI = new jQuery.fn.dataTable.Api("#prelimFirmPanelContainerTable"); prelimFirmTableAPI.destroy(); jQuery('#prelimFirmPanelContainer').empty(); var prelimFisTableAPI = new jQuery.fn.dataTable.Api("#prelimFisReportContainerTable"); prelimFisTableAPI.destroy(); jQuery('#prelimFisReportContainer').empty(); var prelimFirmDBTableAPI = new jQuery.fn.dataTable.Api("#prelimFirmDBContainerTable"); prelimFirmDBTableAPI.destroy(); jQuery('#prelimFirmDBContainer').empty(); jQuery('#prelim_firmpanel_count').empty(); jQuery('#prelim_fisreport_count').empty(); jQuery('#prelim_firmdb_count').empty(); prelim_firmpanel_count =0; prelim_fisreport_count=0; prelim_firmdb_count =0; floodRisk_map_count =0; floodRisk_report_count=0; floodRisk_db_count =0; //clear flood risk products jQuery('#floodRiskMapContainer').empty(); jQuery('#floodRiskReportContainer').empty(); jQuery('#floodRiskDBContainer').empty(); jQuery('#floodRisk_map_count').empty(); jQuery('#floodRisk_report_count').empty(); jQuery('#floodRisk_db_count').empty(); //make search results section invisible jQuery( ".searchresults" ).hide(); jQuery( "#searchresultsEmpty" ).hide(); //reset accordion jQuery( "#accordion" ).accordion({ collapsible: true, active : "none", heightStyle: "content" }); var disclaimer = jQuery("#frp_disclaimer").detach(); var effDisclaimer = jQuery("#eff_firm_disclaimer").detach(); var prelimDisclaimer = jQuery("#prelim_firm_disclaimer").detach(); var prelimDisclaimer1 = jQuery("#prelim_firm_disclaimer1").detach(); var pendDisclaimer = jQuery("#pend_firm_disclaimer").detach(); var histDisclaimer = jQuery("#hist_firm_disclaimer").detach(); jQuery( ".productListC" ).accordion({ collapsible: true, active : "none", heightStyle: "content" }); jQuery("#floodRisk_map_accordion").prepend(disclaimer); jQuery("#prelim_firm_accordion").prepend(prelimDisclaimer1); jQuery("#prelimFirmPanelContainer").closest("div").prepend(prelimDisclaimer); jQuery("#pendingLOMCContainer").closest("div").prepend(pendDisclaimer); jQuery("#effectiveLOMCContainer").closest("div").prepend(effDisclaimer); jQuery("#historicLOMCContainer").closest("div").prepend(histDisclaimer); jQuery( ".lomcListC" ).accordion({ collapsible: true, heightStyle: "content" }); } <!-- add global header --> //eff root count var eff_root_count = 0; //historic root count var his_root_count = 0; //pending root count var pending_root_count = 0; //Effectivev Lom header var effLomTblHeader= '<tr>' + '<th id="productId"> Product ID </th>' + '<th id="effectiveDate"> Effective Date </th>' + '<th id="download"> Download </th>' + '</tr>'; //NFHL County (State)Header var effNFHLTblHeader = '<tr>' + '<th> Product ID </th>' + '<th> Latest Study Effective Date </th>' + '<th> Latest LOMR Effective Date </th>' + '<th> Size </th>' + '<th> Download </th>' + '</tr>'; //FIS Report Header var fisReportTblHeader = '<tr>' + '<th id="productId"> Product ID </th>' + '<th id="effectiveDate"> Effective Date </th>' + '<th id="size"> Size </th>' + '<th id="download"> Download </th>' + '</tr>'; <!-- add pending --> //get Pending Data function getPendingData(item, data){ var firm_panel_count =0; //add FHBM and conversion letter to FIRM_PANEL if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'],[]); } } //add FHBM and conversion letter to FIRM_PANEL if(item['FHBM'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'],[]); } } //add FHBM_INDEX to FIRM_PANEL if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'],[]); } } //add FLOODWAY_STUDY_INDEX to FIRM_PANEL if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'],[]); } } //add FLOODWAY_STUDY_MAP to FIRM_PANEL if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'],[]); } } //add FIRM_PANEL_INDEX TO FIRM PANEL if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] != null) { //firm_panel_index_count = item['FIRM_PANEL_INDEX'].length; item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'],[]); } } if(item['FIRM_PANEL'] == null) { jQuery('#pending_firmpanel_count').text(" (0) "); jQuery( "#pending_firmpanel_root" ).addClass("ui-state-disabled"); } //FIRM_PANEL if(item['FIRM_PANEL'] != null) { firm_panel_count = item['FIRM_PANEL'].length; if(item['FIRM_PANEL'].length > 0) { jQuery( "#pending_firmpanel_root" ).removeClass( 'ui-state-disabled' ); jQuery('#pending_firmpanel_count').text(" (" + item['FIRM_PANEL'].length + " )"); } else { jQuery( "#pending_firmpanel_root" ).addClass("ui-state-disabled"); } pendFirmTable = jQuery("#pendingLOMCContainer").closest("table").DataTable({ "dom": '<"paging"lip>t', "processing":true, "data":item.FIRM_PANEL, "deferRender":true, "destroy":true, "pageLength":100, "order":[1,'asc'], "columns":[ { "data":"product_NAME", "title":"Product ID" },{ "data":function( data, type, row, meta){ if(data.product_SUBTYPE_ID.indexOf("INDEX")>-1){ return "0"+data.product_SUBTYPE_ID; }else{ return data.product_SUBTYPE_ID; } }, "title":"Product Type", "visible":false },{ "data":"product_EFFECTIVE_DATE_STRING", "title":"Effective Date", "type":"date" },{ "render":function( data, type, row, meta){ if(pendLoma!=null&& (pendLoma[row.product_NAME]!=null|| pendLomr[row.product_NAME]!=null|| pendReval[row.product_NAME]!=null) ){ return "<a href='javascript:void(0)' "+ "class='lomcDetails'><img id='img" + row.product_NAME+"'"+ " src='/portal/images/btn-lomc_closed.png'"+ " alt='Expand LOMC for "+row.product_NAME+"' "+ "/></a>"; } else{ return ""; } }, "title":"LOMC", "orderable":false, "searchable":false },{ "data":"product_FILE_SIZE", "title":"Size" },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'PENDING'}); }, "title":"Download", "orderable":false, "searchable":false },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/viewProduct"+ "?productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-view.png' "+ "alt='View Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'PENDING'}); }, "title":"View", "orderable":false, "searchable":false } ] }); // Add event listener for opening and closing details jQuery("#pendingLOMCContainer").off('click', 'a.lomcDetails'); jQuery("#pendingLOMCContainer").on('click', 'a.lomcDetails', function (event) { var tr = jQuery(this).closest('tr'); var row = pendFirmTable.row( tr ); var img = jQuery(event.target); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); img.attr('src','images/btn-lomc_closed.png') .attr('alt','Image Lomc Close') .attr('title','Image Lomc Close'); } else { // Open this row var panelLoma = jQuery(formatLomc( histLoma[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMA", category: 'PENDING'}); var panelLomr = jQuery(formatLomc( histLomr[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMR", category: 'PENDING'}); var panelReval = jQuery(formatLomc( histReval[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"REVAL", category: 'PENDING'}); var lomchtml = panelLoma.add(panelLomr).add(panelReval); row.child(lomchtml).show(); tr.addClass('shown'); img.attr('src','images/btn-lomc_open.png') .attr('alt','Image Lomc Open') .attr('title','Image Lomc Open'); } }); //reappy accordion jQuery( ".lomcListC" ).accordion({ collapsible: true, heightStyle: "content" }); } //FIRM_DB var pending_firmdb_count =0; if(item['FIRM_DB'] != null) { pending_firmdb_count = item['FIRM_DB'].length; for(var x = 0; x < pending_firmdb_count; x++) { var mydata = item['FIRM_DB'][x]; jQuery('<tr>' + '<td> ' + mydata.product_NAME + '</td>'+ '<td> ' + mydata.product_EFFECTIVE_DATE_STRING + '</td>'+ '<td> ' + mydata.product_DESCRIPTION + '</td>'+ '<td> ' + mydata.product_FILE_SIZE + '</td>'+ '<td> ' + '' + '<a href="/portal/downloadProduct?productTypeID=' + mydata.product_TYPE_ID + '&productSubTypeID=' + mydata.product_SUBTYPE_ID + '&productID='+ mydata.product_NAME + '" target="_blank"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ mydata.product_NAME +'" /></a>' + '</td>' + '<tr>').on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'PENDING'}).appendTo('#pending_firmdb_list'); } //jQuery('#pending_firmdb_count').text(" (" + pending_firmdb_count + ")"); } jQuery('#pending_firmdb_count').text(" (" + pending_firmdb_count + ")"); pending_root_count = pending_firmdb_count + firm_panel_count + fis_pending_count; //jQuery('#pending_root_count').text(" (" + pending_root_count + ")"); //if(pending_root_count == '0') { // jQuery( "#pending_root" ).addClass("ui-state-disabled"); //} else { // jQuery( "#pending_root" ).removeClass( 'ui-state-disabled' ); //} if(pending_firmdb_count == '0') { jQuery( "#pending_firmdb_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_firmdb_root" ).removeClass( 'ui-state-disabled' ); } // //This is where user search for LOMC PENDING products var pending_lomc_counter=0; if(item['LOMA'] != null) { //var loma_count = item['LOMA'].length; root_pending_loma_count = item['LOMA'].length; pending_lomc_counter = pending_lomc_counter + root_pending_loma_count; jQuery('#pending_loma_count').text(" (" + root_pending_loma_count + ")"); } if(item['LOMR'] != null) { //var lomr_count = item['LOMR'].length; root_pending_lomr_count = item['LOMR'].length; pending_lomc_counter = pending_lomc_counter + root_pending_lomr_count; jQuery('#pending_lomr_count').text(" (" + root_pending_lomr_count + ")"); } if(item['REVAL'] != null) { //var reval_count = item['REVAL'].length; root_pending_reval_count = item['REVAL'].length; pending_lomc_counter = pending_lomc_counter + root_pending_reval_count; jQuery('#pending_reval_count').text(" (" + root_pending_reval_count + ")"); } jQuery('#pending_lomc_count').text(" (" + pending_lomc_counter + ")"); } function getPendingLOMCData(item){ var pending_main_loma_count =0 ; var pending_main_lomr_count = 0; var pending_main_reval_count = 0; var pending_main_lomc_total = 0; var pending_loma_temp = root_pending_loma_count; var pending_lomr_temp = root_pending_lomr_count; var pending_reval_temp = root_pending_reval_count; var pending_lomc_temp = 0; var backColor = ''; //LOMA if(item['LOMA']!= null){ pending_loma_temp = writeLOMCtoPage(item['LOMA'], '#pending_loma_list', 0,'PENDING'); } //LOMR if(item['LOMR']!= null){ pending_lomr_temp = writeLOMCtoPage(item['LOMR'], '#pending_lomr_list', 0,'PENDING'); } //REVLIDATION if(item['REVAL']!= null){ pending_reval_temp = writeLOMCtoPage(item['REVAL'], '#pending_reval_list', 0,'PENDING'); } pending_lomc_temp = pending_loma_temp + pending_lomr_temp + pending_reval_temp; jQuery('#pending_lomc_count').text(" (" + pending_lomc_temp + ")"); //add to root pending_root_count = pending_root_count + pending_lomc_temp; //} //if(his_main_loma_count > 0) { jQuery('#pending_loma_count').text(" (" + pending_loma_temp + ")"); //} //if(his_main_lomr_count > 0) { jQuery('#pending_lomr_count').text(" (" + pending_lomr_temp + ")"); //} //if(his_main_reval_count > 0) { jQuery('#pending_reval_count').text(" (" + pending_reval_temp + ")"); //} if(pending_lomr_temp == '0') { jQuery( "#pending_lomr_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_lomr_root" ).removeClass( 'ui-state-disabled' ); } if(pending_loma_temp == '0') { jQuery( "#pending_loma_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_loma_root" ).removeClass( 'ui-state-disabled' ); } if(pending_reval_temp == '0') { jQuery( "#pending_reval_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_reval_root" ).removeClass( 'ui-state-disabled' ); } if(pending_lomc_temp == '0') { jQuery( "#pending_lomc_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_lomc_root" ).removeClass( 'ui-state-disabled' ); } } function toggle_visibility(x) { var loma = 'loma_noaccordion' + x; var lomr = 'lomr_noaccordion' + x; var reval = 'reval_noaccordion' + x; jQuery("."+loma).toggle(); jQuery("."+lomr).toggle(); jQuery("."+reval).toggle(); //switch image var imgid = 'img' + x; if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_open.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_closed.png'); jQuery("#" + imgid).attr('alt','Image Lomc Close'); jQuery("#" + imgid).attr('title','Image Lomc Close'); } else { if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_closed.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_open.png'); jQuery("#" + imgid).attr('alt','Image Lomc Open'); jQuery("#" + imgid).attr('title','Image Lomc Open'); } } return false; } <!-- add historic --> var root_his_reval_count = 0; var root_his_lomc_count = 0; var root_his_lomr_count = 0; //get Historic Data function getHistoricData(item, data){ var firm_panel_count =0; //add FHBM and conversion letter to FIRM_PANEL if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'],[]); } } //add FHBM and conversion letter to FIRM_PANEL if(item['FHBM'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'],[]); } } //add FHBM_INDEX to FIRM_PANEL if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'],[]); } } //add FLOODWAY_STUDY_INDEX to FIRM_PANEL if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'],[]); } } //add FLOODWAY_STUDY_MAP to FIRM_PANEL if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'],[]); } } //add FIRM_PANEL_INDEX TO FIRM PANEL if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] != null) { //firm_panel_index_count = item['FIRM_PANEL_INDEX'].length; item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'],[]); } } if(item['FIRM_PANEL'] == null) { jQuery('#his_firmpanel_count').text(" (0) "); jQuery( "#his_firmpanel_root" ).addClass("ui-state-disabled"); } //FIRM_PANEL if(item['FIRM_PANEL'] != null) { firm_panel_count = item['FIRM_PANEL'].length; if(item['FIRM_PANEL'].length > 0) { jQuery( "#his_firmpanel_root" ).removeClass( 'ui-state-disabled' ); jQuery('#his_firmpanel_count').text(" (" + item['FIRM_PANEL'].length + " )"); //add to root his_root_count = his_root_count + firm_panel_count; }else { jQuery( "#his_firmpanel_count" ).addClass("ui-state-disabled"); } histFirmTable = jQuery("#historicLOMCContainer").closest("table").DataTable({ "dom": '<"paging"lip>t', "processing":true, "data":item.FIRM_PANEL, "deferRender":true, "destroy":true, "pageLength":100, "order":[1,'asc'], "columns":[ { "data":"product_NAME", "title":"Product ID" },{ "data":function( data, type, row, meta){ if(data.product_SUBTYPE_ID.indexOf("INDEX")>-1){ return "0"+data.product_SUBTYPE_ID; }else{ return data.product_SUBTYPE_ID; } }, "title":"Product Type", "visible":false },{ "data":"product_EFFECTIVE_DATE_STRING", "title":"Effective Date", "type":"date" },{ "render":function( data, type, row, meta){ if(histLoma!=null&& (histLoma[row.product_NAME]!=null|| histLomr[row.product_NAME]!=null|| histReval[row.product_NAME]!=null) ){ return "<a href='javascript:void(0)' "+ "class='lomcDetails'><img id='img" + row.product_NAME+"'"+ " src='/portal/images/btn-lomc_closed.png'"+ " alt='Expand LOMC for "+row.product_NAME+"' "+ "/></a>"; } else{ return ""; } }, "title":"LOMC", "orderable":false, "searchable":false },{ "data":"product_FILE_SIZE", "title":"Size" },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'HISTORIC'}); }, "title":"Download", "orderable":false, "searchable":false },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/viewProduct"+ "?productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-view.png' "+ "alt='View Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'HISTORIC'}); }, "title":"View", "orderable":false, "searchable":false } ] }); // Add event listener for opening and closing details jQuery("#historicLOMCContainer").off('click', 'a.lomcDetails'); jQuery("#historicLOMCContainer").on('click', 'a.lomcDetails', function (event) { var tr = jQuery(this).closest('tr'); var row = histFirmTable.row( tr ); var img = jQuery(event.target); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); img.attr('src','images/btn-lomc_closed.png') .attr('alt','Image Lomc Close') .attr('title','Image Lomc Close'); } else { // Open this row var panelLoma = jQuery(formatLomc( histLoma[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMA", category: 'HISTORIC'}); var panelLomr = jQuery(formatLomc( histLomr[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMR", category: 'HISTORIC'}); var panelReval = jQuery(formatLomc( histReval[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"REVAL", category: 'HISTORIC'}); var lomchtml = panelLoma.add(panelLomr).add(panelReval); row.child(jQuery(lomchtml)).show(); tr.addClass('shown'); img.attr('src','images/btn-lomc_open.png') .attr('alt','Image Lomc Open') .attr('title','Image Lomc Open'); } }); // jQuery("#historicLOMCContainer").on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'HISTORIC'}); //reappy accordion jQuery( ".lomcListC" ).accordion({ collapsible: true, heightStyle: "content" }); } //This is where user search for LOMC products var his_lomc_counter=0; if(item['LOMA'] != null) { //var loma_count = item['LOMA'].length; root_his_loma_count = item['LOMA'].length; his_lomc_counter = his_lomc_counter + root_his_loma_count; jQuery('#his_loma_count').text(" (" + root_his_loma_count + ")"); } if(item['LOMR'] != null) { //var lomr_count = item['LOMR'].length; root_his_lomr_count = item['LOMR'].length; his_lomc_counter = his_lomc_counter + root_his_lomr_count; jQuery('#his_lomr_count').text(" (" + root_his_lomr_count + ")"); } if(item['REVAL'] != null) { //var reval_count = item['REVAL'].length; root_his_reval_count = item['REVAL'].length; his_lomc_counter = his_lomc_counter + root_his_reval_count; jQuery('#his_reval_count').text(" (" + root_his_reval_count + ")"); } //if(his_lomc_counter > 0 ){ jQuery('#his_lomc_count').text(" (" + his_lomc_counter + ")"); //} //his_root_count = firm_panel_count + fis_his_count ; //jQuery('#historic_root_count').text(" (" + his_root_count + ")"); //if(his_root_count == '0') { // jQuery( "#historic_root" ).addClass("ui-state-disabled"); //} else { // jQuery( "#historic_root" ).removeClass( 'ui-state-disabled' ); //} if(his_lomc_counter == '0') { jQuery( "#historic_lomc_root" ).addClass("ui-state-disabled"); } else { jQuery( "#historic_lomc_root" ).removeClass( 'ui-state-disabled' ); } //if(fis_his_count == '0') { // jQuery( "#historic_fis_root" ).addClass("ui-state-disabled"); //} else { // jQuery( "#historic_fis_root" ).removeClass( 'ui-state-disabled' ); //} } function getHistoricLOMCData(item){ var his_main_loma_count =0 ; var his_main_lomr_count = 0; var his_main_reval_count = 0; var his_main_lomc_total = 0; var his_loma_temp = root_his_loma_count; var his_lomr_temp = root_his_lomr_count; var his_reval_temp = root_his_reval_count; var his_lomc_temp = 0; var backColor = ''; //LOMA if(item['LOMA']!= null){ his_loma_temp = writeLOMCtoPage(item['LOMA'], '#his_loma_list', 0,'HISTORIC'); } //LOMR if(item['LOMR']!= null){ his_lomr_temp = writeLOMCtoPage(item['LOMR'], '#his_lomr_list', 0,'HISTORIC'); } //REVLIDATION if(item['REVAL'] != null){ his_reval_temp = writeLOMCtoPage(item['REVAL'], '#his_reval_list', 0,'HISTORIC'); } his_lomc_temp = his_loma_temp + his_lomr_temp + his_reval_temp; //if(his_main_lomc_total > 0){ jQuery('#his_lomc_count').text(" (" + his_lomc_temp + ")"); //add to root his_root_count = his_root_count + his_lomc_temp; //} //if(his_main_loma_count > 0) { jQuery('#his_loma_count').text(" (" + his_loma_temp + ")"); //} //if(his_main_lomr_count > 0) { jQuery('#his_lomr_count').text(" (" + his_lomr_temp + ")"); //} //if(his_main_reval_count > 0) { jQuery('#his_reval_count').text(" (" + his_reval_temp + ")"); //} if(his_lomr_temp == '0') { jQuery( "#his_lomr_root" ).addClass("ui-state-disabled"); } else { jQuery( "#his_lomr_root" ).removeClass( 'ui-state-disabled' ); } if(his_loma_temp == '0') { jQuery( "#his_loma_root" ).addClass("ui-state-disabled"); } else { jQuery( "#his_loma_root" ).removeClass( 'ui-state-disabled' ); } if(his_reval_temp == '0') { jQuery( "#his_reval_root" ).addClass("ui-state-disabled"); } else { jQuery( "#his_reval_root" ).removeClass( 'ui-state-disabled' ); } if(his_lomc_temp == '0') { jQuery( "#historic_lomc_root" ).addClass("ui-state-disabled"); } else { jQuery( "#historic_lomc_root" ).removeClass( 'ui-state-disabled' ); } } function toggle_visibility(x) { var loma = 'loma_noaccordion' + x; var lomr = 'lomr_noaccordion' + x; var reval = 'reval_noaccordion' + x; jQuery("."+loma).toggle(); jQuery("."+lomr).toggle(); jQuery("."+reval).toggle(); //switch image var imgid = 'img' + x; if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_open.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_closed.png'); jQuery("#" + imgid).attr('alt','Image Lomc Close'); jQuery("#" + imgid).attr('title','Image Lomc Close'); } else { if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_closed.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_open.png'); jQuery("#" + imgid).attr('alt','Image Lomc Open'); jQuery("#" + imgid).attr('title','Image Lomc Open'); } } return false; } var root_eff_reval_count =0 ; var root_eff_loma_count = 0; var root_eff_lomr_count = 0; var root_his_reval_count = 0; var root_his_lomr_count = 0; var root_his_loma_count = 0; var root_pending_reval_count = 0; var root_pending_lomr_count = 0; var root_pending_loma_count = 0; //get Effective Data function getEffectiveData(item, data){ var firm_panel_count =0; var firm_panel_index_count = 0; //if(item['FIRM_PANEL'] == null) { // jQuery('#eff_firmpanel_count').text(" (0) "); //} //add conversion letter to FIRM_PANEL if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['CONV_LETTER'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['CONV_LETTER'],[]); } } //add FHBM to FIRM_PANEL if(item['FHBM'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM'],[]); } } //add FHBM_INDEX to FIRM_PANEL if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FHBM_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FHBM_INDEX'],[]); } } //add FLOODWAY_STUDY_INDEX to FIRM_PANEL if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_INDEX'],[]); } } //add FLOODWAY_STUDY_MAP to FIRM_PANEL if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] != null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FLOODWAY_STUDY_MAP'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FLOODWAY_STUDY_MAP'],[]); } } //add FIRM_PANEL_INDEX TO FIRM PANEL if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] != null) { //firm_panel_index_count = item['FIRM_PANEL_INDEX'].length; item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'].sort(),item['FIRM_PANEL']); } else { //possible FIRM_PANEL empty if(item['FIRM_PANEL_INDEX'] != null && item['FIRM_PANEL'] == null) { item['FIRM_PANEL'] = jQuery.merge(item['FIRM_PANEL_INDEX'],[]); } } if(item['FIRM_PANEL'] == null) { jQuery('#eff_firmpanel_count').text(" (0) "); jQuery( "#eff_firmpanel_root" ).addClass("ui-state-disabled"); } if(item['FIRM_PANEL'] != null) { firm_panel_count = item['FIRM_PANEL'].length; if(item['FIRM_PANEL'].length > 0) { jQuery('#eff_firmpanel_count').text(" (" + item['FIRM_PANEL'].length + " )"); //add to root eff_root_count = eff_root_count + firm_panel_count; //jQuery(firmPanelTblHeader).appendTo('#eff_firmpanel_header'); jQuery( "#eff_firmpanel_root" ).removeClass( 'ui-state-disabled' ); } else { effFirmTable.destroy(); jQuery( "#eff_firmpanel_root" ).addClass("ui-state-disabled"); } effFirmTable = jQuery("#effectiveLOMCContainer").closest("table").DataTable({ "dom": '<"paging"lip>t', "processing":true, "data":item.FIRM_PANEL, "deferRender":true, "destroy":true, "pageLength":100, "order":[1,'asc'], "columns":[ { "data":"product_NAME", "title":"Product ID" },{ "data":function( data, type, row, meta){ if(data.product_SUBTYPE_ID.indexOf("INDEX")>-1){ return "0"+data.product_SUBTYPE_ID; }else{ return data.product_SUBTYPE_ID; } }, "title":"Product Type", "visible":false },{ "data":"product_EFFECTIVE_DATE_STRING", "title":"Effective Date", "type":"date" },{ "data":null, "render":function( data, type, row, meta){ if(effLoma!=null&& (effLoma[row.product_NAME]!=null|| effLomr[row.product_NAME]!=null|| effReval[row.product_NAME]!=null) ){ return "<a href='javascript:void(0)' "+ "class='lomcDetails'><img id='img" + row.product_NAME+"'"+ " src='/portal/images/btn-lomc_closed.png'"+ " alt='Expand LOMC for "+row.product_NAME+"' "+ "/></a>"; } else{ return ""; } }, "title":"LOMC", "orderable":false, "searchable":false },{ "data":"product_FILE_SIZE", "title":"Size" },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'EFFECTIVE'}); }, "title":"Download", "orderable":false, "searchable":false },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/viewProduct"+ "?productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-view.png' "+ "alt='View Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'EFFECTIVE'}); }, "title":"View", "orderable":false, "searchable":false } ] }); // Add event listener for opening and closing details jQuery("#effectiveLOMCContainer").off('click', 'a.lomcDetails'); jQuery("#effectiveLOMCContainer").on('click', 'a.lomcDetails', function (event) { var tr = jQuery(this).closest('tr'); var row = effFirmTable.row( tr ); var img = jQuery(event.target); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); img.attr('src','images/btn-lomc_closed.png') .attr('alt','Image Lomc Close') .attr('title','Image Lomc Close'); } else { // Open this row var panelLoma = jQuery(formatLomc( effLoma[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMA", category: 'EFFECTIVE'}); var panelLomr = jQuery(formatLomc( effLomr[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"LOMR", category: 'EFFECTIVE'}); var panelReval = jQuery(formatLomc( effReval[row.data().product_NAME])) .on("click", "img", {product_type_id: 'LOMC', produt_subtype_id:"REVAL", category: 'EFFECTIVE'}); var lomchtml = panelLoma.add(panelLomr).add(panelReval); row.child(lomchtml).show(); tr.addClass('shown'); img.attr('src','images/btn-lomc_open.png') .attr('alt','Image Lomc Open') .attr('title','Image Lomc Open'); } }); } //NFHL Data (County) var showNFHL_state = false; var nfhl_county_count =0; if(item['NFHL_COUNTY_DATA'] != null) { nfhl_county_count = item['NFHL_COUNTY_DATA'].length; //set header if(nfhl_county_count > 0) { jQuery(effNFHLTblHeader).appendTo('#nfhl_county_header'); showNFHL_state = true; } else { jQuery('#nfhl_county_header').empty(); } for(var x = 0; x < nfhl_county_count; x++) { var mydata = item['NFHL_COUNTY_DATA'][x]; jQuery('<tr>' + '<td class=""> ' + mydata.product_NAME + '</td>'+ '<td class=" text-center"> ' + mydata.product_EFFECTIVE_DATE_STRING + '</td>'+ '<td class=""> ' + mydata.product_DESCRIPTION + '</td>'+ '<td class=" text-right"> ' + mydata.product_FILE_SIZE + '</td>'+ '<td class=""> ' + '' + '<a href="/portal/downloadProduct?productTypeID=' + mydata.product_TYPE_ID + '&productSubTypeID=' + mydata.product_SUBTYPE_ID + '&productID='+ mydata.product_NAME + '" target="_blank"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ mydata.product_NAME+'" /></a>' + '</td>' + '<tr>').on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'EFFECTIVE'}).appendTo('#nfhl_county_list'); } //jQuery('#nfhl_county_count').text(" (" + nfhl_county_count + ")"); } //NFHL Data (state) - only show NFHL state when NFHL county exists var nfhl_state_count = 0; //if(item['NFHL_STATE_DATA'] != null && showNFHL_state == true) { //don't care if county NFHL exists or not, just show state if(item['NFHL_STATE_DATA'] != null) { nfhl_state_count = item['NFHL_STATE_DATA'].length; //set header if(nfhl_state_count > 0) { jQuery(effNFHLTblHeader).appendTo('#nfhl_state_header'); } else { jQuery('#nfhl_state_header').empty(); } for(var x = 0; x < nfhl_state_count; x++) { var mydata = item['NFHL_STATE_DATA'][x]; jQuery('<tr>' + '<td class=""> ' + mydata.product_NAME + '</td>'+ '<td class="text-center"> ' + mydata.product_EFFECTIVE_DATE_STRING + '</td>'+ '<td class=""> ' + mydata.product_DESCRIPTION + '</td>'+ '<td class="text-right"> ' + mydata.product_FILE_SIZE + '</td>'+ '<td class=""> ' + '' + '<a href="/portal/downloadProduct?productTypeID=' + mydata.product_TYPE_ID + '&productSubTypeID=' + mydata.product_SUBTYPE_ID + '&productID='+ mydata.product_NAME + '" target="_blank"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ mydata.product_NAME+'" /></a>' + '</td>' + '<tr>').on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'EFFECTIVE'}).appendTo('#nfhl_state_list'); } //jQuery('#nfhl_state_count').text(" (" + nfhl_state_count + ")"); } jQuery('#nfhl_state_count').text(" (" + nfhl_state_count + ")"); jQuery('#nfhl_county_count').text(" (" + nfhl_county_count + ")"); //add to root eff_root_count = eff_root_count + nfhl_state_count + nfhl_county_count; //jQuery('#firm_panel_count').text(" (" + firm_panel_count + " )"); //This is where user search for LOMC products var lomc_count=0; if(item['LOMA'] != null) { //var loma_count = item['LOMA'].length; root_eff_loma_count = item['LOMA'].length; lomc_count = lomc_count + root_eff_loma_count; jQuery('#eff_main_loma_count').text(" (" + root_eff_loma_count + ")"); } if(item['LOMR'] != null) { //var lomr_count = item['LOMR'].length; root_eff_lomr_count = item['LOMR'].length; lomc_count = lomc_count + root_eff_lomr_count; jQuery('#eff_main_lomr_count').text(" (" + root_eff_lomr_count + ")"); } if(item['REVAL'] != null) { //var reval_count = item['REVAL'].length; root_eff_reval_count = item['REVAL'].length; lomc_count = lomc_count + root_eff_reval_count; jQuery('#eff_main_reval_count').text(" (" + root_eff_reval_count + ")"); } //if(lomc_count > 0 ){ jQuery('#eff_main_lomc_count').text(" (" + lomc_count + ")"); //add to root //eff_root_count = eff_root_count + lomc_count; //} //var eff_root_count= firm_panel_count + lomc_count + nfhl_state_count + nfhl_county_count + fis_effective_count; //jQuery('#eff_root_count').text(" (" + eff_root_count + ")"); //if(eff_root_count == '0') { // jQuery( "#eff_root" ).addClass("ui-state-disabled"); //} else { // jQuery( "#eff_root" ).removeClass( 'ui-state-disabled' ); //} //eff_root_count= firm_panel_count + lomc_count + nfhl_state_count + nfhl_county_count; if(lomc_count == '0') { jQuery( "#eff_lomc_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_lomc_root" ).removeClass( 'ui-state-disabled' ); } if(nfhl_state_count == '0') { jQuery( "#eff_nfhl_state_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_nfhl_state_root" ).removeClass( 'ui-state-disabled' ); } if(nfhl_county_count == '0') { jQuery( "#eff_nfhl_county_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_nfhl_county_root" ).removeClass( 'ui-state-disabled' ); } } //get FIS Report var fis_pending_count=0; var fis_his_count=0; var fis_effective_count=0; function getFisReportData(item){ var fis_main_count =0; fis_effective_count=0; fis_pending_count=0; fis_his_count=0; var fis_main_count = item.length; //set header if(fis_main_count > 0) { jQuery(fisReportTblHeader).appendTo('#eff_fis_list_header'); } else { jQuery('#eff_fis_list_header').empty(); } var backColor= '<tr>'; for(var x = 0; x < item.length; x++) { if(backColor == '<tr class="even">'){ backColor = '<tr>'; } else { backColor = '<tr class="even">'; } var mydata = item[x]; var fisReportHtml = backColor + '<td class="" headers="productId"> ' + mydata.product_NAME + '</td>'+ '<td class="text-center" headers="effectiveDate"> ' + mydata.product_EFFECTIVE_DATE_STRING + '</td>'+ '<td class="text-right" headers="size"> ' + mydata.product_FILE_SIZE + '</td>'+ '<td class="" headers="download"> ' + '' + '<a href="/portal/downloadProduct?productTypeID=' + mydata.product_TYPE_ID + '&productSubTypeID=' + mydata.product_SUBTYPE_ID + '&productID='+ mydata.product_NAME + '" target="_blank"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ mydata.product_NAME+'" /></a>' + '</td>' + '<tr>'; //logic to compare and put it into effective or pending as well if(mydata.product_EFFECTIVE_FLAG == '0') { jQuery(fisReportHtml).on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'EFFECTIVE'}).appendTo('#eff_fis_list'); fis_effective_count++; } else if (mydata.product_EFFECTIVE_FLAG == '1'){ jQuery(fisReportHtml).on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'PENDING'}).appendTo('#pending_fis_list'); fis_pending_count++; } else if (mydata.product_EFFECTIVE_FLAG == '2'){ jQuery(fisReportHtml).on('click','img',{product_type_id: mydata['product_TYPE_ID'], produt_subtype_id: mydata['product_SUBTYPE_ID'], category: 'HISTORIC'}).appendTo('#his_fis_list'); fis_his_count++; } //no need to add to main list //jQuery(fisReportHtml).appendTo('#fis_main_list'); //jQuery('<tr>' + // '<td> ' + mydata.product_NAME + '</td>'+ // '<td> ' + mydata.product_EFFECTIVE_DATE_STRING + '</td>'+ // '<td> ' + // '' + // '<a href="/portal/downloadProduct?productTypeID=' + mydata.product_TYPE_ID + // '&productSubTypeID=' + mydata.product_SUBTYPE_ID + // '&productID='+ mydata.product_NAME + '"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ mydata.product_NAME+'" /></a>' + // '</td>' // + '<tr>').appendTo('#fis_main_list'); } if(fis_main_count > 0) { //jQuery('#fis_main_count').text(" (" + fis_main_count + " )"); } //if(fis_effective_count > 0) { jQuery('#fis_effective_count').text(" (" + fis_effective_count + " )"); //add to root eff_root_count = eff_root_count + fis_effective_count; //} //if(fis_pending_count > 0) { jQuery('#fis_pending_count').text(" (" + fis_pending_count + " )"); //} //if(fis_his_count > 0) { jQuery('#fis_his_count').text(" (" + fis_his_count + " )"); //add to root his_root_count = his_root_count + fis_his_count; //} if(fis_his_count == '0') { jQuery( "#historic_fis_root" ).addClass("ui-state-disabled"); } else { jQuery( "#historic_fis_root" ).removeClass( 'ui-state-disabled' ); } if(fis_pending_count == '0') { jQuery( "#fis_pending_root" ).addClass("ui-state-disabled"); } else { jQuery( "#fis_pending_root" ).removeClass( 'ui-state-disabled' ); } if(fis_effective_count == '0') { jQuery( "#fis_effective_root" ).addClass("ui-state-disabled"); } else { jQuery( "#fis_effective_root" ).removeClass( 'ui-state-disabled' ); } } var eff_loma_header_exist = false; var eff_lomr_header_exist = false; var eff_reval_header_exist = false; function getEffFIRMLOMCData(item){ //console.log("GET EFF LOMC " + item); var eff_main_loma_count =0 ; var eff_main_lomr_count = 0; var eff_main_reval_count = 0; var eff_main_lomc_total = 0; var eff_loma_temp = root_eff_loma_count; var eff_lomr_temp = root_eff_lomr_count; var eff_reval_temp = root_eff_reval_count; var eff_lomc_temp = 0; //LOMA if(item['LOMA'] != null){ eff_loma_temp = writeLOMCtoPage(item['LOMA'], '#eff_loma_list', 0,'EFFECTIVE'); } //LOMR if(item['LOMR'] != null){ eff_lomr_temp = writeLOMCtoPage(item['LOMR'], '#eff_lomr_list', 0,'EFFECTIVE'); } //REVLIDATION if(item['REVAL'] != null){ eff_reval_temp = writeLOMCtoPage(item['REVAL'], '#eff_reval_list', 0,'EFFECTIVE'); } eff_lomc_temp = eff_loma_temp + eff_lomr_temp + eff_reval_temp; //if(eff_main_lomc_total > 0){ jQuery('#eff_main_lomc_count').text(" (" + eff_lomc_temp + ")"); //add to root eff_root_count = eff_root_count + eff_lomc_temp; //} //if(eff_main_loma_count > 0) { jQuery('#eff_main_loma_count').text(" (" + eff_loma_temp + ")"); //} //if(eff_main_lomr_count > 0) { jQuery('#eff_main_lomr_count').text(" (" + eff_lomr_temp + ")"); //} //if(eff_main_reval_count > 0) { jQuery('#eff_main_reval_count').text(" (" + eff_reval_temp + ")"); //} if(eff_lomr_temp == '0') { jQuery( "#eff_main_lomr_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_main_lomr_root" ).removeClass( 'ui-state-disabled' ); } if(eff_loma_temp == '0') { jQuery( "#eff_main_loma_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_main_loma_root" ).removeClass( 'ui-state-disabled' ); } if(eff_reval_temp == '0') { jQuery( "#eff_main_reval_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_main_reval_root" ).removeClass( 'ui-state-disabled' ); } if(eff_lomc_temp == '0') { jQuery( "#eff_lomc_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_lomc_root" ).removeClass( 'ui-state-disabled' ); } } //get Prelim data var prelim_firmpanel_count =0; var prelim_fisreport_count=0; var prelim_firmdb_count =0; function getPRELIMData(item,key){ //var prelim_firmpanel_count =0; //var prelim_fisreport_count=0; //var prelim_firmdb_count =0; var cid = jQuery('#searchedCid').val(); var countyFipsParam = ""; var container; var domStruct; if(key == "PRELIM_FIRM") { container = '#prelimFirmPanelContainer'; prelim_firmpanel_count = item.length; domStruct = '<"paging"lip>t'; } else if (key == "PRELIM_FIRM_DB") { container = '#prelimFirmDBContainer'; prelim_firmdb_count = item.length; countyFipsParam = "&stateName=&countyName=" + cid; domStruct = 't'; } else if (key == "PRELIM_FIS_REPORT") { container = '#prelimFisReportContainer'; prelim_fisreport_count = item.length; domStruct = 't'; } else { return; } jQuery(container).closest("table").dataTable({ "dom": domStruct, "data":item, "deferRender":true, "destroy":true, "pageLength":100, "order":[1,'asc'], "columns":[ {"data":"product_NAME", "title":"Product ID"}, { "data":function( data, type, row, meta){ if(data.product_SUBTYPE_ID.indexOf("INDEX")>-1){ return "0"+data.product_SUBTYPE_ID; }else{ return data.product_SUBTYPE_ID; } }, "title":"Product Type", "visible":false }, {"data":"product_ISSUE_DATE_STRING", "title":"Issue Date", "type":"date"}, {"data":"product_FILE_SIZE", "title":"Size"}, { "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData, rowIndex, colIndex){ jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'PRELIMINARY'}); }, "title":"Download", "orderable":false, "searchable":false } ] }); //jQuery(container).on('click','img',{product_type_id: 'PRELIM_PRODUCT', produt_subtype_id: key, category: 'PRELIMINARY'}); //if(prelim_firmpanel_count > 0) { jQuery('#prelim_firmpanel_count').text(" (" + prelim_firmpanel_count + " )"); //} //if(prelim_fisreport_count > 0) { jQuery('#prelim_fisreport_count').text(" (" + prelim_fisreport_count + " )"); //} //if(prelim_firmdb_count > 0) { jQuery('#prelim_firmdb_count').text(" (" + prelim_firmdb_count + " )"); //} var prelim_root_count = prelim_firmpanel_count + prelim_fisreport_count + prelim_firmdb_count; jQuery('#prelim_root_count').text(" (" + prelim_root_count + " )"); if(prelim_firmpanel_count == '0') { jQuery( "#prelim_firmpanel_root" ).addClass("ui-state-disabled"); } else { jQuery( "#prelim_firmpanel_root" ).removeClass( 'ui-state-disabled' ); } if(prelim_fisreport_count == '0') { jQuery( "#prelim_fisreport_root" ).addClass("ui-state-disabled"); } else { jQuery( "#prelim_fisreport_root" ).removeClass( 'ui-state-disabled' ); } if(prelim_firmdb_count == '0') { jQuery( "#prelim_firmdb_root" ).addClass("ui-state-disabled"); } else { jQuery( "#prelim_firmdb_root" ).removeClass( 'ui-state-disabled' ); } if(prelim_root_count == '0') { jQuery( "#prelim_root" ).addClass("ui-state-disabled"); } else { jQuery( "#prelim_root" ).removeClass( 'ui-state-disabled' ); } } //get FloodRisk data var floodRisk_map_count =0; var floodRisk_report_count=0; var floodRisk_db_count =0; function getFloodRiskData(item,key){ //var floodRisk_map_count =0; //var floodRisk_report_count=0; //var floodRisk_db_count =0; var container; var backColor = '<tr>'; var descriptionVisible = false; if(key == "FLOOD_RISK_MAP") { container = '#floodRiskMapContainer'; floodRisk_map_count = item.length; } else if (key == "FLOOD_RISK_REPORT") { container = '#floodRiskReportContainer'; floodRisk_report_count = item.length; } else if (key == "FLOOD_RISK_DB") { container = '#floodRiskDBContainer'; floodRisk_db_count = item.length; descriptionVisible = true; } if(descriptionVisible){ jQuery(container).closest("table").dataTable({ "dom": 't', "data":item, "deferRender":true, "destroy":true, "pageLength":100, "columns":[ { "data":"product_NAME", "title":"Product ID" },{ "data":"product_DESCRIPTION", "title":"File Format" },{ "data":"product_POSTING_DATE_STRING", "title":"MSC Posting Date", "type":"date" },{ "data":"product_FILE_SIZE", "title":"Size" },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ //console.log(cell); jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'Flood Risk Products'}); }, "title":"Download", "orderable":false, "searchable":false } ] }); }else{ jQuery(container).closest("table").dataTable({ "dom": 't', "data":item, "deferRender":true, "destroy":true, "pageLength":100, "columns":[ { "data":"product_NAME", "title":"Product ID" },{ "data":"product_POSTING_DATE_STRING", "title":"MSC Posting Date", "type":"date" },{ "data":"product_FILE_SIZE", "title":"Size" },{ "data":null, "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.product_TYPE_ID+ "&productSubTypeID="+row.product_SUBTYPE_ID+ "&productID="+row.product_NAME+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_NAME+"'></a>"; }, "createdCell":function(cell, cellData, rowData){ console.log(cell); jQuery(cell).on('click', 'img',{ product_type_id: rowData.product_TYPE_ID, produt_subtype_id: rowData.product_SUBTYPE_ID, category: 'Flood Risk Products'}); }, "title":"Download", "orderable":false, "searchable":false } ] }); } //if(floodRisk_map_count > 0) { jQuery('#floodRisk_map_count').text(" (" + floodRisk_map_count + " )"); //} //if(floodRisk_report_count > 0) { jQuery('#floodRisk_report_count').text(" (" + floodRisk_report_count + " )"); //} //if(floodRisk_db_count > 0) { jQuery('#floodRisk_db_count').text(" (" + floodRisk_db_count + " )"); //} var floodRisk_root_count = floodRisk_map_count + floodRisk_report_count + floodRisk_db_count; jQuery('#floodRisk_root_count').text(" (" + floodRisk_root_count + " )"); if(floodRisk_root_count == '0') { jQuery( "#floodRisk_root" ).addClass("ui-state-disabled"); } else { jQuery( "#floodRisk_root" ).removeClass( 'ui-state-disabled' ); } if(floodRisk_map_count == '0') { jQuery( "#floodRisk_map_root" ).addClass("ui-state-disabled"); } else { jQuery( "#floodRisk_map_root" ).removeClass( 'ui-state-disabled' ); } if(floodRisk_report_count == '0') { jQuery( "#floodRisk_report_root" ).addClass("ui-state-disabled"); } else { jQuery( "#floodRisk_report_root" ).removeClass( 'ui-state-disabled' ); } if(floodRisk_db_count == '0') { jQuery( "#floodRisk_db_root" ).addClass("ui-state-disabled"); } else { jQuery( "#floodRisk_db_root" ).removeClass( 'ui-state-disabled' ); } } function toggle_visibility(x) { //console.log("Toggle Visibility " + x); var loma = 'loma_noaccordion' + x; var lomr = 'lomr_noaccordion' + x; var reval = 'reval_noaccordion' + x; jQuery("."+loma).toggle(); jQuery("."+lomr).toggle(); jQuery("."+reval).toggle(); //switch image var imgid = 'img' + x; if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_open.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_closed.png'); jQuery("#" + imgid).attr('alt','Image Lomc Close'); jQuery("#" + imgid).attr('title','Image Lomc Close'); } else { if(jQuery("#" + imgid).attr('src').indexOf('btn-lomc_closed.png') != -1){ jQuery("#" + imgid).attr('src','images/btn-lomc_open.png'); jQuery("#" + imgid).attr('alt','Image Lomc Open'); jQuery("#" + imgid).attr('title','Image Lomc Open'); } } return false; } function showDownloadAll(){ var eff_firmpanel_count = jQuery('#eff_firmpanel_count').text(); var eff_fisreport_count = jQuery('#fis_effective_count').text(); var pending_firmpanel_count = jQuery('#pending_firmpanel_count').text(); var pending_fisreport_count = jQuery('#fis_pending_count').text(); var his_firmpanel_count = jQuery('#his_firmpanel_count').text(); var his_fisreport_count = jQuery('#fis_his_count').text(); var prelim_firmpanel_count = jQuery('#prelim_firmpanel_count').text(); var prelim_fisreport_count = jQuery('#prelim_fisreport_count').text(); var eff_loma_count = jQuery('#eff_main_loma_count').text(); var eff_lomr_count = jQuery('#eff_main_lomr_count').text(); var eff_reval_count = jQuery('#eff_main_reval_count').text(); var pending_loma_count = jQuery('#pending_loma_count').text(); var pending_lomr_count = jQuery('#pending_lomr_count').text(); var pending_reval_count = jQuery('#pending_reval_count').text(); var his_loma_count = jQuery('#his_loma_count').text(); var his_lomr_count = jQuery('#his_lomr_count').text(); var his_reval_count = jQuery('#his_reval_count').text(); if(isZero(eff_firmpanel_count) == true){ jQuery('#eff_firmpanel_downloadAll').hide(); } else { jQuery('#eff_firmpanel_downloadAll').show(); } if(isZero(eff_fisreport_count) == true){ jQuery('#eff_fisreport_downloadAll').hide(); } else { jQuery('#eff_fisreport_downloadAll').show(); } if(isZero(pending_firmpanel_count) == true){ jQuery('#pending_firmpanel_downloadAll').hide(); } else { jQuery('#pending_firmpanel_downloadAll').show(); } if(isZero(pending_fisreport_count) == true){ jQuery('#pending_fisreport_downloadAll').hide(); } else { jQuery('#pending_fisreport_downloadAll').show(); } if(isZero(his_firmpanel_count) == true){ jQuery('#his_firmpanel_downloadAll').hide(); } else { jQuery('#his_firmpanel_downloadAll').show(); } if(isZero(his_fisreport_count) == true){ jQuery('#his_fisreport_downloadAll').hide(); } else { jQuery('#his_fisreport_downloadAll').show(); } if(isZero(prelim_firmpanel_count) == true){ jQuery('#prelim_firmpanel_downloadAll').hide(); } else { jQuery('#prelim_firmpanel_downloadAll').show(); } if(isZero(prelim_fisreport_count) == true){ jQuery('#prelim_fisreport_downloadAll').hide(); } else { jQuery('#prelim_fisreport_downloadAll').show(); } //add EFFECTIVE LOMC Bucket if(isZero(eff_loma_count) == true){ jQuery('#eff_loma_downloadAll').hide(); } else { jQuery('#eff_loma_downloadAll').show(); } if(isZero(eff_lomr_count) == true){ jQuery('#eff_lomr_downloadAll').hide(); } else { jQuery('#eff_lomr_downloadAll').show(); } if(isZero(eff_reval_count) == true){ jQuery('#eff_reval_downloadAll').hide(); } else { jQuery('#eff_reval_downloadAll').show(); } //add PENDING LOMC Bucket if(isZero(pending_loma_count) == true){ jQuery('#pending_loma_downloadAll').hide(); } else { jQuery('#pending_loma_downloadAll').show(); } if(isZero(pending_lomr_count) == true){ jQuery('#pending_lomr_downloadAll').hide(); } else { jQuery('#pending_lomr_downloadAll').show(); } if(isZero(pending_reval_count) == true){ jQuery('#pending_reval_downloadAll').hide(); } else { jQuery('#pending_reval_downloadAll').show(); } //add HISTORIC LOMC Bucket if(isZero(his_loma_count) == true){ jQuery('#his_loma_downloadAll').hide(); } else { jQuery('#his_loma_downloadAll').show(); } if(isZero(his_lomr_count) == true){ jQuery('#his_lomr_downloadAll').hide(); } else { jQuery('#his_lomr_downloadAll').show(); } if(isZero(his_reval_count) == true){ jQuery('#his_reval_downloadAll').hide(); } else { jQuery('#his_reval_downloadAll').show(); } } function isZero(counterText){ //this code creates issue when search product id, which has no searchedCid if(jQuery("#searchedCid").val()===""){ return true; } var startIndex = counterText.indexOf("("); var endIndex = counterText.indexOf(")"); if(startIndex == -1) { return true; } var zero = jQuery.trim(counterText.substring(startIndex + 1, endIndex)); //var zero = counterText.substring(startIndex + 1, endIndex).trim(); //or || zero == '1'? if(zero=='0') { return true; } return false; } //the top one breaking out since the searchCid code function isZeroToo(counterText){ var startIndex = counterText.indexOf("("); var endIndex = counterText.indexOf(")"); if(startIndex == -1) { return true; } var zero = jQuery.trim(counterText.substring(startIndex + 1, endIndex)); //var zero = counterText.substring(startIndex + 1, endIndex).trim(); //or || zero == '1'? if(zero=='0') { return true; } return false; } function writeLOMCtoPage(itemArray, listId, count, cat){ var product_name = ''; var date_string = ''; var file_path = ''; var type_id = ''; var subtype_id = ''; var lomcList = []; for(var x = 0; x < itemArray.length; x++) { var mydata = itemArray[x]; var tempItem = {}; var cRequired = true; if(mydata.c_PRODUCT_NAME==null){ cRequired = false; } tempItem.product_name = (cRequired)?mydata.c_PRODUCT_NAME:mydata.product_NAME; tempItem.date_string = (cRequired)?mydata.c_PRODUCT_EFFECTIVE_DATE_STRING:mydata.product_EFFECTIVE_DATE_STRING; tempItem.file_path = (cRequired)?mydata.c_PRODUCT_FILE_PATH:mydata.product_FILE_PATH; tempItem.type_id = (cRequired)?mydata.c_PRODUCT_TYPE_ID:mydata.product_TYPE_ID; tempItem.subtype_id = (cRequired)?mydata.c_PRODUCT_SUBTYPE_ID:mydata.product_SUBTYPE_ID; lomcList.push(tempItem); count = count+1; if(x==0){ type_id = tempItem.type_id; subtype_id = tempItem.subtype_id; } } jQuery(listId).closest("table").dataTable({ "dom": '<"paging"lip>t', "data":lomcList, "deferRender":true, "destroy":true, "pageLength":100, "columns":[ { "data":"product_name", "title":"Product ID" },{ "data":"date_string", "title":"Effective Date", "type":"date" },{ "render":function( data, type, row, meta){ return "<a target='_blank' href='/portal/downloadProduct"+ "?productTypeID="+row.type_id+ "&productSubTypeID="+row.subtype_id+ "&productID="+row.product_name+"'>"+ "<img src='/portal/images/btn-download.png' "+ "alt='DL:Download Product "+row.product_name+"'></a>"; }, "title":"Download", "orderable":false, "searchable":false } ] }); jQuery(listId).on('click','img',{product_type_id: type_id, produt_subtype_id: subtype_id, category: cat}); return count; } function showNoResults(){ var showNoResults = false; if((isZeroToo(jQuery('#eff_root_count').text()) == true) && (isZeroToo(jQuery('#prelim_root_count').text()) == true) && (isZeroToo(jQuery('#pending_root_count').text()) == true) && (isZeroToo(jQuery('#historic_root_count').text()) == true) && (isZeroToo(jQuery('#floodRisk_root_count').text()) == true) ) { showNoResults = true; } return showNoResults; } function formatLomc(lomcdata){ var lomchtml = ""; if(typeof lomcdata != "undefined" && lomcdata != null) { for(var lomcList = 0; lomcList < lomcdata.length; lomcList ++) { var lomcrow = lomcdata[lomcList]; lomchtml = "<tr class='even'>" + '<td class=""> ' + lomcrow.c_PRODUCT_NAME + '</td>'+ '<td class="text-center"> ' + lomcrow.c_PRODUCT_EFFECTIVE_DATE_STRING + '</td>'+ '<td class=""> ' + lomcrow.c_PRODUCT_SUBTYPE_ID + '</td>'+ '<td class=""></td>' + '<td class=""> ' + '<a href="/portal/downloadProduct?productTypeID=' + lomcrow.c_PRODUCT_TYPE_ID + '&productSubTypeID=' + lomcrow.c_PRODUCT_SUBTYPE_ID + '&productID='+ lomcrow.c_PRODUCT_NAME + '" target="_blank"><img src="/portal/images/btn-download.png" alt="DL:Download Product '+ lomcrow.c_PRODUCT_NAME +'" /></a>' + '</td>' + '<td class=""></td>' + '</tr>' + lomchtml; } } return lomchtml; } function search(){ //validation var validation = validate(); if(!validation) { return; } var searchString = getSearchString(); setSearchCriteria(); //reset reset(); jQuery.ajax({ beforeSend: function(){ jQuery('#mainSearch').prop('disabled', true); jQuery("#wait").css("display","block"); }, complete: function(){ jQuery("#wait").css("display","none"); jQuery('#mainSearch').prop('disabled', false); }, type: 'POST', url: '/portal/advanceSearch', data: jQuery("form").serialize() + "&method=search", dataType:'json', success:function(data){ jQuery('#mainSearch').prop('disabled', false); // if(jQuery.isEmptyObject(data['EFFECTIVE'])==true // && jQuery.isEmptyObject(data['HISTORIC'])==true // && jQuery.isEmptyObject(data['PENDING'])==true // && jQuery.isEmptyObject(data['FIS_REPORT'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM_INDEX'])==true // && jQuery.isEmptyObject(data['PRELIM_FIS_REPORT'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM_DB'])==true // && jQuery.isEmptyObject(data['EFFECTIVE_LOMC'])==true // && jQuery.isEmptyObject(data['HISTORIC_LOMC'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_MAP'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_REPORT'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_DB'])==true // ) { // jQuery('.searchresults').hide(); // jQuery('#searchresultsEmpty').show(); // jQuery('#searchByEmpty').html("for " + searchString); // return; // } jQuery('#searchresultsEmpty').hide(); jQuery('.searchresults').show(); jQuery('#searchBy').html("for " + searchString); if(data['FIS_REPORT'] == null) { data['FIS_REPORT'] = []; } effLoma = null; effLomr = null; effReval = null; pendLoma = null; pendLomr = null; pendReval = null; histLoma = null; histLomr = null; histReval = null; effFirmTable = null; pendFirmTable = null; histFirmTable = null; if(data['EFFECTIVE_LOMC']!=null&&data['EFFECTIVE_LOMC']['LOMC']!=null){ if(data['EFFECTIVE_LOMC']['LOMC']['LOMA']!=null){ effLoma = data['EFFECTIVE_LOMC']['LOMC']['LOMA']; } if(data['EFFECTIVE_LOMC']['LOMC']['LOMR']!=null){ effLomr = data['EFFECTIVE_LOMC']['LOMC']['LOMR']; } if(data['EFFECTIVE_LOMC']['LOMC']['REVAL']!=null){ effReval = data['EFFECTIVE_LOMC']['LOMC']['REVAL']; } } if(data['PENDING_LOMC']!=null&&data['PENDING_LOMC']['LOMC']!=null){ if(data['PENDING_LOMC']['LOMC']['LOMA']!=null){ pendLoma = data['PENDING_LOMC']['LOMC']['LOMA']; } if(data['PENDING_LOMC']['LOMC']['LOMR']!=null){ pendLomr = data['PENDING_LOMC']['LOMC']['LOMR']; } if(data['PENDING_LOMC']['LOMC']['REVAL']!=null){ pendReval = data['PENDING_LOMC']['LOMC']['REVAL']; } } if(data['HISTORIC_LOMC']!=null&&data['HISTORIC_LOMC']['LOMC']!=null){ if(data['HISTORIC_LOMC']['LOMC']['LOMA']!=null){ histLoma = data['HISTORIC_LOMC']['LOMC']['LOMA']; } if(data['HISTORIC_LOMC']['LOMC']['LOMR']!=null){ histLomr = data['HISTORIC_LOMC']['LOMC']['LOMR']; } if(data['HISTORIC_LOMC']['LOMC']['REVAL']!=null){ histReval = data['HISTORIC_LOMC']['LOMC']['REVAL']; } } console.log("=========DATA=========="); console.log(data); downloadAllProductsData = data; jQuery.each(data, function(i, item){ //Effective Products if(i=='EFFECTIVE'){ getEffectiveData(item, data); getEffFIRMLOMCData(item); } //Pending Products if(i=='PENDING'){ getPendingData(item, data); getPendingLOMCData(item); } //Historic if(i=='HISTORIC'){ getHistoricData(item, data); getHistoricLOMCData(item); } //Fis Report if(i=='FIS_REPORT'){ getFisReportData(item); } //Prelim products if(i=='PRELIM_FIRM' || i=='PRELIM_FIRM_INDEX' || i=='PRELIM_FIS_REPORT' || i=='PRELIM_FIRM_DB'){ var prelim_data; if(data['PRELIM_FIRM_INDEX'] != null && data['PRELIM_FIRM'] != null) { data['PRELIM_FIRM'] = jQuery.merge(data['PRELIM_FIRM_INDEX'].sort(), data['PRELIM_FIRM']); data['PRELIM_FIRM_INDEX'] = null; prelim_data = data['PRELIM_FIRM']; getPRELIMData(prelim_data,'PRELIM_FIRM'); } else if(data['PRELIM_FIRM_INDEX'] != null && data['PRELIM_FIRM'] == null){ data['PRELIM_FIRM'] = jQuery.merge(data['PRELIM_FIRM_INDEX'].sort(), []); data['PRELIM_FIRM_INDEX'] = null; prelim_data = data['PRELIM_FIRM']; getPRELIMData(prelim_data,'PRELIM_FIRM'); } else { prelim_data = item; getPRELIMData(prelim_data,i); } } //flood risk products if(i=='FLOOD_RISK_MAP' || i=='FLOOD_RISK_REPORT' || i=='FLOOD_RISK_DB'){ getFloodRiskData(item,i); } }); if(jQuery.isEmptyObject(data['PRELIM_FIRM'])==true && jQuery.isEmptyObject(data['PRELIM_FIRM_DB'])==true && jQuery.isEmptyObject(data['PRELIM_FIRM_INDEX'])==true && jQuery.isEmptyObject(data['PRELIM_FIS_REPORT'])==true ) { jQuery('#prelim_root_count').text(" (0)"); jQuery( "#prelim_root" ).addClass("ui-state-disabled"); } if(jQuery.isEmptyObject(data['FLOOD_RISK_MAP'])==true && jQuery.isEmptyObject(data['FLOOD_RISK_REPORT'])==true && jQuery.isEmptyObject(data['FLOOD_RISK_DB'])==true ) { jQuery('#floodRisk_root_count').text("(0)"); jQuery( "#floodRisk_db_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_map_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_report_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_root" ).addClass("ui-state-disabled"); } if(jQuery.isEmptyObject(data['FIS_REPORT'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY_MAP'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY_INDEX'])==true ) { jQuery('#fis_pending_count').text("(0)"); jQuery('#fis_effective_count').text("(0)"); jQuery('#fis_his_count').text("(0)"); jQuery( "#fis_effective_root" ).addClass("ui-state-disabled"); jQuery( "#historic_fis_root" ).addClass("ui-state-disabled"); jQuery( "#fis_pending_root" ).addClass("ui-state-disabled"); } //set eff root jQuery('#eff_root_count').text(" (" + eff_root_count + ")"); if(eff_root_count == '0') { jQuery( "#eff_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_root" ).removeClass( 'ui-state-disabled' ); } //set his root jQuery('#historic_root_count').text(" (" + his_root_count + ")"); if(his_root_count == '0') { jQuery( "#historic_root" ).addClass("ui-state-disabled"); } else { jQuery( "#historic_root" ).removeClass( 'ui-state-disabled' ); } //set pending root jQuery('#pending_root_count').text(" (" + pending_root_count + ")"); if(pending_root_count == '0') { jQuery( "#pending_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_root" ).removeClass( 'ui-state-disabled' ); } //store form to sessionStorage //sessionStorage.setItem("oldform",catalogSearchForm); showDownloadAll(); var showNoResutls = showNoResults(); if(showNoResutls) { //show no resutl jQuery("#emptyResult").empty(); jQuery("#emptyResult").append("There are no products available that meet this search criteria. If you think this message has returned in error please call the FEMA Map Information eXchange (FMIX) at 1-877-FEMA-MAP"); jQuery( "#emptyResult" ).show(); jQuery("#emptyResultDiv").removeClass("hide"); } else { //show nomal jQuery( "#emptyResult" ).hide(); jQuery("#emptyResultDiv").addClass("hide"); } jQuery("table").filter(function(){ return jQuery(this).css('width') == '0px'; }).each(function(index, node){ jQuery(node).attr('style', ''); }); if(typeof _initAutoTracker === 'function'){ _initAutoTracker(); } location.hash = "#searchresultsanchor"; } }); var jurisdictionKeyEntered = document.getElementById("jurisdictionkey").value; jurisditionkeyhasC= jurisdictionKeyEntered.includes('C'); if(hasC || jurisditionkeyhasC){ document.getElementById("address-search-message").style.display = "block"; } else{ document.getElementById("address-search-message").style.display = "none"; } } function resetForm(){ jQuery("*").attr("disabled", false); jQuery('#txtjurisdictionname').val(''); jQuery('#txtproductid').val(''); jQuery('#txtstartdate').val(''); jQuery('#txtenddate').val(''); jQuery('#selstate').val(''); jQuery('#selcounty').val(''); jQuery('#selcommunity').val(''); hasC = false; jurisditionkeyhasC = false; jQuery('#jurisdictionkey').val(''); jQuery('#jurisdictionvalue').val(''); jQuery('#searchedCid').val(''); jQuery('#searchedDateStart').val(''); jQuery('#searchedDateEnd').val(''); //clear error message box jQuery('#error').empty(); jQuery('#error').addClass("hide"); jQuery('#startdateLabel').attr('style', ''); jQuery('#enddateLabel').attr('style', ''); //reset county, and community jQuery( "#countyDropdown" ).hide(); jQuery( "#communityDropdown" ).hide(); //resets hide jQuery('.searchresults').hide(); jQuery("#emptyResult").empty(); jQuery("#emptyResult").hide(); jQuery("#emptyResultDiv").addClass("hide"); } //get county information function getCounty(catalogSearchForm){ var stateVal = catalogSearchForm.selstate.options[catalogSearchForm.selstate.selectedIndex].value; if(stateVal!="none"){ getAjaxData("getCounty"); } else { //jQuery('#selcounty').val(''); //jQuery('#selcommunity').val(''); //jQuery('#selcounty').attr("disabled", true); //jQuery('#selcommunity').attr("disabled", true); jQuery( "#countyDropdown" ).hide(); jQuery( "#communityDropdown" ).hide(); } } //define countyVal as a global variable and get community var countyVal; function getCommunity(catalogSearchForm){ countyVal = catalogSearchForm.selcounty.options[catalogSearchForm.selcounty.selectedIndex].value; if(countyVal!="none") { getAjaxData("getCommunity"); } else { jQuery( "#communityDropdown" ).hide(); } } //availability Search - address Search TODO: merge with search function //no need to copy to here jQuery( document ).ready(function() { if(initialLackOfAvailabilityResults) { jQuery("#emptyResult").empty(); jQuery("#emptyResult").append("There are no products available that meet this search criteria. If you think this message has returned in error please call the FEMA Map Information eXchange (FMIX) at 1-877-FEMA-MAP"); jQuery("#emptyResult").show(); jQuery("#emptyResultDiv").removeClass("hide"); initialLackOfAvailabilityResults = false; } jQuery(window).load = loadJson(); function loadJson() { //var data = jQuery.parseJSON('{"EFFECTIVE":{"FIRM_PANEL":[{"searchSource":"Community","ref_STATE_ABBREV_NAME":null,"ref_COUNTY_NAME":null,"ref_COUNTY_FIPS":null,"ref_COMMUN_NAME":null,"ref_COMMUN_ID":null,"ref_PRODUCT_TYPE":null,"product_ID":259554495,"product_TYPE_ID":"FINAL_PRODUCT","product_SUBTYPE_ID":"FIRM_PANEL","product_NAME":"45053C_NTU_20240201","product_DESCRIPTION":"NTU LETTER","product_EFFECTIVE_DATE":1706763600000,"product_ISSUE_DATE":null,"product_EFFECTIVE_DATE_STRING":"02/01/2024","product_POSTING_DATE":1706763600000,"product_POSTING_DATE_STRING":null,"product_ISSUE_DATE_STRING":null,"product_EFFECTIVE_FLAG":"0","product_FILE_PATH":"/45/CONLET/45053C_NTU_20240201.pdf","product_FILE_SIZE":"1MB","product_NTU":null,"product_SUPERSEDED":"F","product_CREATED_DATE":null,"product_UPDATED_DATE":null,"product_CREATED_BY":null,"product_UPDATED_BY":null}],"NFHL_STATE_DATA":[{"searchSource":"Community","ref_STATE_ABBREV_NAME":null,"ref_COUNTY_NAME":null,"ref_COUNTY_FIPS":null,"ref_COMMUN_NAME":null,"ref_COMMUN_ID":null,"ref_PRODUCT_TYPE":null,"product_ID":265909087,"product_TYPE_ID":"NFHL","product_SUBTYPE_ID":"NFHL_STATE_DATA","product_NAME":"NFHL_45_20241103","product_DESCRIPTION":"11/04/2024","product_EFFECTIVE_DATE":1683604800000,"product_ISSUE_DATE":1730606400000,"product_EFFECTIVE_DATE_STRING":"05/09/2023","product_POSTING_DATE":1731733200000,"product_POSTING_DATE_STRING":null,"product_ISSUE_DATE_STRING":null,"product_EFFECTIVE_FLAG":"0","product_FILE_PATH":"NFHL_45_20241103.zip","product_FILE_SIZE":"1110MB","product_NTU":null,"product_SUPERSEDED":null,"product_CREATED_DATE":null,"product_UPDATED_DATE":null,"product_CREATED_BY":null,"product_UPDATED_BY":null}]},"EFFECTIVE_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}},"HISTORIC":{},"HISTORIC_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}},"PENDING":{},"PENDING_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}}}'); var data = {"EFFECTIVE":{"FIRM_PANEL":[{"searchSource":"Community","ref_STATE_ABBREV_NAME":null,"ref_COUNTY_NAME":null,"ref_COUNTY_FIPS":null,"ref_COMMUN_NAME":null,"ref_COMMUN_ID":null,"ref_PRODUCT_TYPE":null,"product_ID":259554495,"product_TYPE_ID":"FINAL_PRODUCT","product_SUBTYPE_ID":"FIRM_PANEL","product_NAME":"45053C_NTU_20240201","product_DESCRIPTION":"NTU LETTER","product_EFFECTIVE_DATE":1706763600000,"product_ISSUE_DATE":null,"product_EFFECTIVE_DATE_STRING":"02/01/2024","product_POSTING_DATE":1706763600000,"product_POSTING_DATE_STRING":null,"product_ISSUE_DATE_STRING":null,"product_EFFECTIVE_FLAG":"0","product_FILE_PATH":"/45/CONLET/45053C_NTU_20240201.pdf","product_FILE_SIZE":"1MB","product_NTU":null,"product_SUPERSEDED":"F","product_CREATED_DATE":null,"product_UPDATED_DATE":null,"product_CREATED_BY":null,"product_UPDATED_BY":null}],"NFHL_STATE_DATA":[{"searchSource":"Community","ref_STATE_ABBREV_NAME":null,"ref_COUNTY_NAME":null,"ref_COUNTY_FIPS":null,"ref_COMMUN_NAME":null,"ref_COMMUN_ID":null,"ref_PRODUCT_TYPE":null,"product_ID":265909087,"product_TYPE_ID":"NFHL","product_SUBTYPE_ID":"NFHL_STATE_DATA","product_NAME":"NFHL_45_20241103","product_DESCRIPTION":"11/04/2024","product_EFFECTIVE_DATE":1683604800000,"product_ISSUE_DATE":1730606400000,"product_EFFECTIVE_DATE_STRING":"05/09/2023","product_POSTING_DATE":1731733200000,"product_POSTING_DATE_STRING":null,"product_ISSUE_DATE_STRING":null,"product_EFFECTIVE_FLAG":"0","product_FILE_PATH":"NFHL_45_20241103.zip","product_FILE_SIZE":"1110MB","product_NTU":null,"product_SUPERSEDED":null,"product_CREATED_DATE":null,"product_UPDATED_DATE":null,"product_CREATED_BY":null,"product_UPDATED_BY":null}]},"EFFECTIVE_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}},"HISTORIC":{},"HISTORIC_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}},"PENDING":{},"PENDING_LOMC":{"LOMC":{"LOMA":{},"LOMR":{},"REVAL":{}}}}; var searchString = getParameterByName("communityName"); //address URL append CommunityName= if(searchString == '') searchString = getParameterByName("addcommunity"); //if(jQuery.isEmptyObject(data['EFFECTIVE'])==true // && jQuery.isEmptyObject(data['HISTORIC'])==true // && jQuery.isEmptyObject(data['PENDING'])==true // && jQuery.isEmptyObject(data['FIS_REPORT'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM_INDEX'])==true // && jQuery.isEmptyObject(data['PRELIM_FIS_REPORT'])==true // && jQuery.isEmptyObject(data['PRELIM_FIRM_DB'])==true // && jQuery.isEmptyObject(data['EFFECTIVE_LOMC'])==true // && jQuery.isEmptyObject(data['HISTORIC_LOMC'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_MAP'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_REPORT'])==true // && jQuery.isEmptyObject(data['FLOOD_RISK_DB'])==true // ) { // jQuery('.searchresults').hide(); // jQuery('#searchresultsEmpty').show(); // jQuery('#searchByEmpty').html("for " + searchString); // return; // } //test set value to jurisdiction name var cid = ''; var cidFromAdd = ''; var cidFromPA = getParameterByName("communityID"); //passed from address search if(cidFromPA == '') { cidFromAdd = getParameterByName("addcommunity"); cid = cidFromAdd; } else { cid = cidFromPA; } jQuery('#searchedCid').val(cid); jQuery('#txtjurisdictionname').val(searchString); jQuery('#jurisdictionkey').val('PASSEDIN'); //this is what we care about the cid jQuery('#jurisdictionvalue').val(cid); if(cidFromPA != ''){ //var lastYear = getDateString('lastYear'); //var today = getDateString('today'); var postDate = getParameterByName("postDate"); jQuery( '#txtstartdate' ).val(postDate); jQuery( '#txtenddate' ).val(postDate); jQuery('#searchedDateStart').val(postDate); jQuery('#searchedDateEnd').val(postDate); } //end test set value jQuery('#searchresultsEmpty').hide(); jQuery('.searchresults').show(); jQuery('#searchBy').text("for " + searchString); if(data['FIS_REPORT'] == null){ data['FIS_REPORT'] = []; } effLoma = null; effLomr = null; effReval = null; pendLoma = null; pendLomr = null; pendReval = null; histLoma = null; histLomr = null; histReval = null; effFirmTable = null; pendFirmTable = null; histFirmTable = null; if(data['EFFECTIVE_LOMC']!=null&&data['EFFECTIVE_LOMC']['LOMC']!=null){ if(data['EFFECTIVE_LOMC']['LOMC']['LOMA']!=null){ effLoma = data['EFFECTIVE_LOMC']['LOMC']['LOMA']; } if(data['EFFECTIVE_LOMC']['LOMC']['LOMR']!=null){ effLomr = data['EFFECTIVE_LOMC']['LOMC']['LOMR']; } if(data['EFFECTIVE_LOMC']['LOMC']['REVAL']!=null){ effReval = data['EFFECTIVE_LOMC']['LOMC']['REVAL']; } } if(data['PENDING_LOMC']!=null&&data['PENDING_LOMC']['LOMC']!=null){ if(data['PENDING_LOMC']['LOMC']['LOMA']!=null){ pendLoma = data['PENDING_LOMC']['LOMC']['LOMA']; } if(data['PENDING_LOMC']['LOMC']['LOMR']!=null){ pendLomr = data['PENDING_LOMC']['LOMC']['LOMR']; } if(data['PENDING_LOMC']['LOMC']['REVAL']!=null){ pendReval = data['PENDING_LOMC']['LOMC']['REVAL']; } } if(data['HISTORIC_LOMC']!=null&&data['HISTORIC_LOMC']['LOMC']!=null){ if(data['HISTORIC_LOMC']['LOMC']['LOMA']!=null){ histLoma = data['HISTORIC_LOMC']['LOMC']['LOMA']; } if(data['HISTORIC_LOMC']['LOMC']['LOMR']!=null){ histLomr = data['HISTORIC_LOMC']['LOMC']['LOMR']; } if(data['HISTORIC_LOMC']['LOMC']['REVAL']!=null){ histReval = data['HISTORIC_LOMC']['LOMC']['REVAL']; } } console.log("=========DATA=========="); console.log(data); downloadAllProductsData = data; jQuery.each(data, function(i, item){ //Effective Products if(i=='EFFECTIVE'){ getEffectiveData(item, data); getEffFIRMLOMCData(item); } //Pending Products if(i=='PENDING'){ getPendingData(item, data); getPendingLOMCData(item); } //Historic if(i=='HISTORIC'){ getHistoricData(item, data); getHistoricLOMCData(item); } //Fis Report if(i=='FIS_REPORT'){ getFisReportData(item); } //Prelim products if(i=='PRELIM_FIRM' || i=='PRELIM_FIRM_INDEX' || i=='PRELIM_FIS_REPORT' || i=='PRELIM_FIRM_DB'){ console.log(item); if(data['PRELIM_FIRM_INDEX'] != null && data['PRELIM_FIRM'] != null) { data['PRELIM_FIRM'] = jQuery.merge(data['PRELIM_FIRM_INDEX'].sort(), data['PRELIM_FIRM']); data['PRELIM_FIRM_INDEX'] = null; getPRELIMData(data['PRELIM_FIRM'],'PRELIM_FIRM'); } else if(data['PRELIM_FIRM_INDEX'] != null && data['PRELIM_FIRM'] == null){ data['PRELIM_FIRM'] = jQuery.merge(data['PRELIM_FIRM_INDEX'].sort(), []); data['PRELIM_FIRM_INDEX'] = null; getPRELIMData(data['PRELIM_FIRM'],'PRELIM_FIRM'); } else { getPRELIMData(item,i); } } //flood risk products if(i=='FLOOD_RISK_MAP' || i=='FLOOD_RISK_REPORT' || i=='FLOOD_RISK_DB'){ getFloodRiskData(item,i); } }); //508 consideration. applies fors and ids to all the select boxes in the datatables jQuery("div.dataTables_length").each(function(i, thing){ var id = thing.id+"_select"; jQuery(thing).find("select").attr("id", id); jQuery(thing).find("label").attr("for", id); }); if(jQuery.isEmptyObject(data['PRELIM_FIRM'])==true && jQuery.isEmptyObject(data['PRELIM_FIRM_DB'])==true && jQuery.isEmptyObject(data['PRELIM_FIRM_INDEX'])==true && jQuery.isEmptyObject(data['PRELIM_FIS_REPORT'])==true ) { jQuery('#prelim_root_count').text(" (0)"); jQuery( "#prelim_root" ).addClass("ui-state-disabled"); } if(jQuery.isEmptyObject(data['FLOOD_RISK_MAP'])==true && jQuery.isEmptyObject(data['FLOOD_RISK_REPORT'])==true && jQuery.isEmptyObject(data['FLOOD_RISK_DB'])==true ) { jQuery('#floodRisk_root_count').text("(0)"); jQuery( "#floodRisk_db_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_map_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_report_root" ).addClass("ui-state-disabled"); jQuery( "#floodRisk_root" ).addClass("ui-state-disabled"); } if(jQuery.isEmptyObject(data['FIS_REPORT'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY_MAP'])==true && jQuery.isEmptyObject(data['FLOODWAY_STUDY_INDEX'])==true ) { jQuery('#fis_pending_count').text("(0)"); jQuery('#fis_effective_count').text("(0)"); jQuery('#fis_his_count').text("(0)"); jQuery( "#fis_effective_root" ).addClass("ui-state-disabled"); jQuery( "#historic_fis_root" ).addClass("ui-state-disabled"); jQuery( "#fis_pending_root" ).addClass("ui-state-disabled"); } //set eff root jQuery('#eff_root_count').text(" (" + eff_root_count + ")"); if(eff_root_count == '0') { jQuery( "#eff_root" ).addClass("ui-state-disabled"); } else { jQuery( "#eff_root" ).removeClass( 'ui-state-disabled' ); } //set his root jQuery('#historic_root_count').text(" (" + his_root_count + ")"); if(his_root_count == '0') { jQuery( "#historic_root" ).addClass("ui-state-disabled"); } else { jQuery( "#historic_root" ).removeClass( 'ui-state-disabled' ); } //set pending root jQuery('#pending_root_count').text(" (" + pending_root_count + ")"); if(pending_root_count == '0') { jQuery( "#pending_root" ).addClass("ui-state-disabled"); } else { jQuery( "#pending_root" ).removeClass( 'ui-state-disabled' ); } showDownloadAll(); var showNoResutls = showNoResults(); if(showNoResutls) { //show no resutl jQuery("#emptyResult").empty(); jQuery("#emptyResult").append("There are no products available that meet this search criteria. If you think this message has returned in error please call the FEMA Map Information eXchange (FMIX) at 1-877-FEMA-MAP"); jQuery("#emptyResult").show(); jQuery("#emptyResultDiv").removeClass("hide"); } else { //show nomal jQuery( "#emptyResult" ).hide(); jQuery("#emptyResultDiv").addClass("hide"); } jQuery("table").filter(function(){ return jQuery(this).css('width') == '0px'; }).each(function(index, node){ jQuery(node).attr('style', ''); }); if(typeof _initAutoTracker === 'function'){ _initAutoTracker(); } } }); //ready to load //end availability Search //set other components disable jQuery(document).ready(function(){ jQuery("#eff_root").focus(function(){ jQuery('.ui-accordion-header').attr('tabindex','0'); }); jQuery("#prelim_root").focus(function(){ jQuery('.ui-accordion-header').attr('tabindex','0'); }); jQuery("#pending_root").focus(function(){ jQuery('.ui-accordion-header').attr('tabindex','0'); }); jQuery("#historic_root").focus(function(){ jQuery('.ui-accordion-header').attr('tabindex','0'); }); jQuery("#floodRisk_root").focus(function(){ jQuery('.ui-accordion-header').attr('tabindex','0'); }); //jQuery('#accordion').accordion({ // beforeActivate: function(event,ui){ // jQuery('.ui-accordion-header').attr('tabindex','0'); // } //}); //jQuery('.productListC').accordion({ // beforeActivate: function(event,ui){ // jQuery('.ui-accordion-header').attr('tabindex','0'); // } //}); jQuery('.help-text-icon').on('keydown', function(event){ if(event.which==1||event.which==13){ openHelpWindow(jQuery(event.target).attr("helpanchor")); } event.stopPropagation(); }); jQuery('.help-text-icon').on('click', function(event){ openHelpWindow(jQuery(event.target).attr("helpanchor")); event.stopPropagation(); }); jQuery('.downloadall-icon').on('keydown', function(event){ if(event.which==1||event.which==13){ downloadAll(jQuery(event.target).attr("downloadtype")); } event.stopPropagation(); }); jQuery('.downloadall-icon').on('click', function(event){ downloadAll(jQuery(event.target).attr("downloadtype")); event.stopPropagation(); }); jQuery('#selstate').change(function(){ //disable , empty whatever value jQuery('#txtjurisdictionname').val(''); jQuery('#txtproductid').val(''); jQuery('#txtjurisdictionname').attr("disabled", true); jQuery('#txtproductid').attr("disabled", true); }); jQuery('#selcounty').change(function(){ //disable , empty whatever value jQuery('#txtjurisdictionname').val(''); jQuery('#txtproductid').val(''); jQuery('#txtjurisdictionname').attr("disabled", true); jQuery('#txtproductid').attr("disabled", true); }); jQuery('#selcommunity').change(function(){ //disable , empty whatever value jQuery('#txtjurisdictionname').val(''); jQuery('#txtproductid').val(''); jQuery('#txtjurisdictionname').attr("disabled", true); jQuery('#txtproductid').attr("disabled", true); }); jQuery('#txtjurisdictionname').change(function(){ //disable , empty whatever value jQuery('#selstate').attr("disabled", true); jQuery('#selcounty').attr("disabled", true); jQuery('#selcommunity').attr("disabled", true); jQuery('#txtproductid').attr("disabled", true); if(jQuery('#jurisdictionkey').val() == 'PASSEDIN'){ jQuery('#jurisdictionkey').val(''); } //IE7 issue //if( jQuery('#jurisdictionkey').val() != // jQuery('#txtjurisdictionname').val()){ //if(jQuery('#jurisdictionkey').val() != 'PASSEDIN'){ // jQuery('#error').empty(); // jQuery('#error').append("Please select Jurisdiction name from dropdown menu to proceed."); //jQuery('#txtjurisdictionname').val(''); //} //} }); jQuery('#txtproductid').change(function(){ //disable , empty whatever value jQuery('#txtjurisdictionname').val(''); jQuery('#jurisdictionkey').val(''); jQuery('#selstate').attr("disabled", true); jQuery('#selcounty').attr("disabled", true); jQuery('#selcommunity').attr("disabled", true); jQuery('#txtjurisdictionname').attr("disabled", true); }); }); //end of disable other search if one is focused function downloadAll(key){ var downloadString = ''; var type=""; var subType=""; var category=""; console.log("Download All Key:" + key); if(key == 'eff_firmpanel') { downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIRM_PANEL&bucket=EFFECTIVE'; type="FINAL_PRODUCT"; subType="FIRM_PANEL"; category="EFFECTIVE"; } else if(key == 'eff_fisreport') { type="FINAL_PRODUCT"; subType="FIS_REPORT"; category="EFFECTIVE"; downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIS_REPORT&bucket=EFFECTIVE'; } else if(key == 'pending_firmpanel') { type="FINAL_PRODUCT"; subType="FIRM_PANEL"; category="PENDING"; downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIRM_PANEL&bucket=PENDING'; } else if(key == 'pending_fisreport') { type="FINAL_PRODUCT"; subType="FIS_REPORT"; category="PENDING"; downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIS_REPORT&bucket=PENDING'; } else if(key == 'his_firmpanel') { type="FINAL_PRODUCT"; subType="FIRM_PANEL"; category="HISTORIC"; downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIRM_PANEL&bucket=HISTORIC'; } else if(key == 'his_fisreport') { type="FINAL_PRODUCT"; subType="FIS_REPORT"; category="HISTORIC"; downloadString = downloadString + 'type=FINAL_PRODUCT&subType=FIS_REPORT&bucket=HISTORIC'; } else if(key == 'prelim_firmpanel') { type="PRELIM_PRODUCT"; subType="PRELIM_FIRM"; category="PRELIMINARY" downloadString = downloadString + 'type=PRELIM_PRODUCT&subType=PRELIM_FIRM'; } else if(key == 'prelim_fisreport') { type="PRELIM_PRODUCT"; subType="PRELIM_FIS_REPORT"; category="PRELIMINARY"; downloadString = downloadString + 'type=PRELIM_PRODUCT&subType=PRELIM_FIS_REPORT'; } else if(key == 'eff_loma') { type="LOMC"; subType="LOMA"; category="EFFECTIVE"; downloadString = downloadString + 'type=LOMC&subType=LOMA&bucket=EFFECTIVE'; } else if(key == 'eff_lomr') { type="LOMC"; subType="LOMR"; category="EFFECTIVE"; downloadString = downloadString + 'type=LOMC&subType=LOMR&bucket=EFFECTIVE'; } else if(key == 'eff_reval') { type="LOMC"; subType="REVAL"; category="EFFECTIVE"; downloadString = downloadString + 'type=LOMC&subType=REVAL&bucket=EFFECTIVE'; } else if(key == 'pending_loma') { type="LOMC"; subType="LOMA"; category="PENDING"; downloadString = downloadString + 'type=LOMC&subType=LOMA&bucket=PENDING'; } else if(key == 'pending_lomr') { type="LOMC"; subType="LOMR"; category="PENDING"; downloadString = downloadString + 'type=LOMC&subType=LOMR&bucket=PENDING'; } else if(key == 'pending_reval') { type="LOMC"; subType="REVAL"; category="PENDING"; downloadString = downloadString + 'type=LOMC&subType=REVAL&bucket=PENDING'; } else if(key == 'his_loma') { type="LOMC"; subType="LOMA"; category="HISTORIC"; downloadString = downloadString + 'type=LOMC&subType=LOMA&bucket=HISTORIC'; } else if(key == 'his_lomr') { type="LOMC"; subType="LOMR"; category="HISTORIC"; downloadString = downloadString + 'type=LOMC&subType=LOMR&bucket=HISTORIC'; } else if(key == 'his_reval') { type="LOMC"; subType="REVAL"; category="HISTORIC"; downloadString = downloadString + 'type=LOMC&subType=REVAL&bucket=HISTORIC'; } var cid = jQuery('#searchedCid').val(); downloadString = downloadString +"&CID=" + cid; console.log("downloadString+CID:"+downloadString); //optional date var startDate = jQuery('#searchedDateStart').val(); var endDate = jQuery('#searchedDateEnd').val(); if(startDate != '' && endDate != '' ) { downloadString = downloadString + "&startDateString=" + startDate + "&endDateString=" + endDate; } console.log("downloadString+dates:"+downloadString); var contextPath = window.location.protocol+"//"+window.location.host; var finalpath = '/util/bundle/confirm?' + downloadString; console.log("contextPath:" +contextPath); console.log("finalpath: "+finalpath); if(key == 'prelim_firmpanel'||key == 'prelim_fisreport'){ contextPath = "https:\/\/hazards.fema.gov\/femaportal"; var fips = ""; var paramFips = get("countyFips"); //paramFips = Sanitizer.sanitize(paramFips); if(jQuery("#selcounty").val()=="none"){ var jurVals = jQuery("#jurisdictionvalue").val().split("|"); if(jurVals.length>1){ fips = jurVals[3]; }else if(paramFips!=""&&typeof paramFips!="undefined"){ fips = paramFips; //fips= Sanitizer.sanitize(fips); }else{ fips = "45053"; } }else{ fips = jQuery("#selcounty").val(); } downloadString = downloadString +"&countyFips=" + fips; //downloadString = Sanitizer.sanitize(downloadString); finalpath = '/util/prelim/bundle/execute?'+downloadString; //finalpath = Sanitizer.sanitize(finalpath); console.log("finalpath: "+finalpath); } window.open(contextPath+finalpath, "mscDownloadAll", "location=0,scrollbars=1,resizable=1,width=1050,height=300"); } function subscribeLink(){ var fips = ""; if(jQuery("#selcounty").val()=="none"){ var jurVals = jQuery("#jurisdictionvalue").val().split("|"); if(jurVals.length>1){ fips = jurVals[3]; }else{ fips = "45053"; } }else{ fips = jQuery("#selcounty").val(); } document.location = "/portal/subscriptionHome?searchedCID="+encodeURIComponent(jQuery("#searchedCid").val())+"&searchedFIPS="+fips; } function get(name){ if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)) return decodeURIComponent(name[1]); } </script> <!-- [/head] --> <!--[if lt IE 9]> <link rel="stylesheet" href="/profiles/fema_gov/themes/unicorn/css/ie8.css"> <![endif]--> <!-- We participate in the US government's analytics program. See the data at analytics.usa.gov. --> <script async type="text/javascript" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=FEMA" id="_fed_an_ua_tag"></script> </head> <body class="html not-front not-logged-in no-sidebars page-msc-theme-template-v1 i18n-en unicorn" > <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=" + gaIDs.GTM height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <div id="skip-link"> <a href="#main-content" class="element-invisible element-focusable">Skip to main content</a> </div> <div class="main-container container"> <div class="dg-bg"></div> <div class="block-left"> <div class="global-nav-wrapper"> <div class="logo"> <a class="logo" href="//www.fema.gov/"><img src="/portal/images/fema-logo-main.png" alt="US Department of Homeland Security - Federal Emergency Management Agency" lang="en" /></a> </div><!-- .logo --> <div class="global-nav"> <!-- Global Navigation --> <div type="" class="global-nav-modal" data-toggle="modal" data-target="#navigation" tabindex="0"> Navigation </div> <div class="modal fade" id="navigation" tabindex="-1" role="dialog" aria-labelledby="navigationLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true"><div class="close-icon">×</div></span> <div class="close-text">Close</div> </button> <div class="modal-title" id="navigationLabel">Navigation</div> <label for="unicornNavSearchBox">Enter Search Term(s):</label> <input placeholder="Start typing here to filter…" id="unicornNavSearchBox" type="text" size="31" /> </div> <div class="modal-body"> <div id="navigationItems"> <div id="noResults"> </div> <ul id="unicornNavFilter"><li class="first collapsed"><a href="//www.fema.gov/about-agency">About the Agency</a></li> <li class="leaf"><a href="//www.fema.gov/volunteer-donate-responsibly">Volunteer & Donate Responsibly</a></li> <li class="collapsed"><a href="//www.fema.gov/welcome-assistance-firefighters-grant-program" title="Assistance To Firefighters Grant Program">Assistance To Firefighters Grant Program</a></li> <li class="leaf"><a href="//www.fema.gov/authorized-equipment-list" title="">Authorized Equipment List</a></li> <li class="collapsed"><a href="//www.fema.gov/blog">Blog</a></li> <li class="leaf"><a href="https://careers.fema.gov" title="">Careers</a></li> <li class="collapsed"><a href="//www.fema.gov/faith">Center for Faith-Based & Neighborhood Partnerships</a></li> <li class="leaf"><a href="//www.fema.gov/children-and-disasters">Children and Disasters</a></li> <li class="leaf"><a href="//www.fema.gov/climate-change">Climate Change</a></li> <li class="collapsed"><a href="//www.fema.gov/community-resilience-indicators">Community Resilience Indicators and National-Level Measures: A Draft Interagency Concept</a></li> <li class="collapsed"><a href="//www.fema.gov/contact-us">Contact Us</a></li> <li class="collapsed"><a href="//www.fema.gov/dam-safety">Dam Safety</a></li> <li class="collapsed"><a href="//www.fema.gov/data-visualization">Data Visualization</a></li> <li class="collapsed"><a href="//www.fema.gov/disability" title="">Disability</a></li> <li class="collapsed"><a href="//www.fema.gov/disaster-assistance-reports">Disaster Assistance Reports</a></li> <li class="collapsed"><a href="//www.fema.gov/disasters" title="">Disaster Declarations</a></li> <li class="collapsed"><a href="//www.fema.gov/disaster-emergency-communications">Disaster Emergency Communications</a></li> <li class="leaf"><a href="//www.fema.gov/disaster-recovery-centers">Disaster Recovery Centers</a></li> <li class="leaf"><a href="//www.fema.gov/media-library/resources-documents" title="">Document and Resource Library</a></li> <li class="collapsed"><a href="//www.fema.gov/email">Email Updates</a></li> <li class="leaf"><a href="//www.fema.gov/emergency-management-agencies">Emergency Management Agencies</a></li> <li class="leaf"><a href="//training.fema.gov/emi" title="">Emergency Management Institute</a></li> <li class="leaf"><a href="//www.fema.gov/el-nino" title="">El Niño</a></li> <li class="collapsed"><a href="//www.fema.gov/office-environmental-planning-and-historic-preservation">Environmental Planning and Historic Preservation Program</a></li> <li class="collapsed"><a href="//www.fema.gov/ned">Exercise</a></li> <li class="leaf"><a href="//www.fema.gov/fact-sheets">Fact Sheets</a></li> <li class="collapsed"><a href="//www.fema.gov/finance-center">Finance Center</a></li> <li class="collapsed"><a href="//www.fema.gov/national-flood-insurance-program-flood-hazard-mapping">Flood Hazard Mapping</a></li> <li class="collapsed"><a href="//www.fema.gov/national-flood-insurance-program">Flood Insurance</a></li> <li class="leaf"><a href="/portal/" title="">Flood Map Service Center</a></li> <li class="leaf"><a href="//www.fema.gov/faq/" title="">Frequently Asked Questions (FAQs)</a></li> <li class="collapsed"><a href="//www.fema.gov/grants" title="Grants">Grants</a></li> <li class="collapsed"><a href="//www.fema.gov/grants-management-modernization-program">Grants Management Modernization Program</a></li> <li class="collapsed"><a href="//www.fema.gov/hazard-mitigation-assistance">Hazard Mitigation Assistance</a></li> <li class="collapsed"><a href="//www.fema.gov/hazard-mitigation-planning">Hazard Mitigation Planning</a></li> <li class="collapsed"><a href="//www.fema.gov/hazus">Hazus</a></li> <li class="collapsed"><a href="//www.fema.gov/high-water-mark-initiative">High Water Mark Initiative</a></li> <li class="leaf"><a href="https://www.fema.gov" title="">Home</a></li> <li class="leaf"><a href="//www.fema.gov/how-make-payment-fema" title="">How to Make a Payment to FEMA</a></li> <li class="collapsed"><a href="//www.fema.gov/hurricane-harvey">Hurricane Harvey</a></li> <li class="collapsed"><a href="//www.fema.gov/hurricane-irma">Hurricane Irma</a></li> <li class="collapsed"><a href="//www.fema.gov/hurricane-katrina-decade-progress-through-partnerships">Hurricane Katrina</a></li> <li class="collapsed"><a href="//www.fema.gov/hurricane-maria">Hurricane Maria</a></li> <li class="leaf"><a href="//www.fema.gov/incident-management-assistance-teams" title="">Incident Management Assistance Teams</a></li> <li class="leaf"><a href="https://training.fema.gov/is/" title="">Independent Study Program</a></li> <li class="leaf"><a href="//www.fema.gov/disaster/updates/hurricane-nate-news-graphics-and-social-media" title="">News, Graphics, and Social Media</a></li> <li class="leaf"><a href="//www.fema.gov/resources-people-disabilities-access-functional-needs" title="">Accessible ASL Videos</a></li> <li class="leaf"><a href="//www.fema.gov/individual-and-community-preparedness-division">Individual and Community Preparedness Division</a></li> <li class="collapsed"><a href="//www.fema.gov/individual-disaster-assistance">Individual Disaster Assistance</a></li> <li class="collapsed"><a href="//www.fema.gov/integrated-public-alert-warning-system">Integrated Public Alert & Warning System</a></li> <li class="collapsed"><a href="//www.fema.gov/international-affairs">International Affairs</a></li> <li class="collapsed"><a href="//www.fema.gov/mississippi-recovery-office" title="">Mississippi Recovery</a></li> <li class="leaf"><a href="//www.fema.gov/media-library/multimedia/list" title="">Multimedia Library (Photos, Video, and Audio)</a></li> <li class="collapsed"><a href="//www.fema.gov/national-exercise-program">National Exercise Program</a></li> <li class="collapsed"><a href="//www.fema.gov/national-continuity-programs">National Continuity Programs</a></li> <li class="collapsed"><a href="//www.fema.gov/national-disaster-recovery-framework">National Disaster Recovery Framework</a></li> <li class="collapsed"><a href="//www.fema.gov/national-incident-management-system">National Incident Management System</a></li> <li class="collapsed"><a href="//www.fema.gov/national-preparedness">National Preparedness</a></li> <li class="leaf"><a href="//www.fema.gov/media-contacts">News Desk Contacts</a></li> <li class="collapsed"><a href="//www.fema.gov/news-releases" title="">News Releases</a></li> <li class="leaf"><a href="//www.fema.gov/official-accounts">Official Accounts</a></li> <li class="collapsed"><a href="//www.fema.gov/openfema">OpenFEMA</a></li> <li class="leaf"><a href="//www.fema.gov/preliminary-damage-assessment-reports" title="Preliminary Damage Assessments Reports">Preliminary Damage Assessment Reports</a></li> <li class="collapsed"><a href="//www.fema.gov/preparedness-non-disaster-grants">Preparedness (Non-Disaster) Grants</a></li> <li class="collapsed"><a href="//www.fema.gov/private-sector">Private Sector</a></li> <li class="collapsed"><a href="//www.fema.gov/appeals" title="">Public Assistance Appeals Database</a></li> <li class="collapsed"><a href="//www.fema.gov/public-assistance-local-state-tribal-and-non-profit">Public Assistance: Local, State, Tribal and Non-Profit</a></li> <li class="collapsed"><a href="//www.fema.gov/region-i-ct-me-ma-nh-ri-vt">Region I</a></li> <li class="collapsed"><a href="//www.fema.gov/region-ii-nj-ny-pr-vi-0">Region II</a></li> <li class="collapsed"><a href="//www.fema.gov/region-iii-dc-de-md-pa-va-wv">Region III</a></li> <li class="collapsed"><a href="//www.fema.gov/region-iv-al-fl-ga-ky-ms-nc-sc-tn">Region IV</a></li> <li class="collapsed"><a href="//www.fema.gov/region-v-il-mi-mn-oh-wi">Region V</a></li> <li class="collapsed"><a href="//www.fema.gov/region-vii-ia-ks-mo-ne">Region VII</a></li> <li class="collapsed"><a href="//www.fema.gov/region-viii-co-mt-nd-sd-ut-wy">Region VIII</a></li> <li class="collapsed"><a href="//www.fema.gov/fema-region-ix-arizona-california-hawaii-nevada-pacific-islands">Region IX</a></li> <li class="collapsed"><a href="//www.fema.gov/required-notices">Required Notices</a></li> <li class="collapsed"><a href="//www.fema.gov/reservist-program" title="Reservist Program">Reservist Program</a></li> <li class="collapsed"><a href="//www.fema.gov/safer-stronger-protected-homes-communities">Safer, Stronger, Protected Homes & Communities</a></li> <li class="collapsed"><a href="//www.fema.gov/social-media">Social Media</a></li> <li class="leaf"><a href="//www.fema.gov/states" title="">States</a></li> <li class="leaf"><a href="//www.fema.gov/testimony-and-speeches">Testimony & Speeches</a></li> <li class="leaf"><a href="//www.fema.gov/text-messages">Text Messages</a></li> <li class="collapsed"><a href="//www.fema.gov/fema-tribal-affairs">Tribal</a></li> <li class="collapsed"><a href="//www.fema.gov/unified-federal-environmental-and-historic-preservation-review-presidentially-declared-disasters">Unified Federal Environmental and Historic Preservation Review</a></li> <li class="collapsed"><a href="//www.fema.gov/urban-search-rescue">Urban Search and Rescue</a></li> <li class="leaf"><a href="//www.fema.gov/us-coast-guard-retiree-fema-reservist-initiative">U.S. Coast Guard Retiree to FEMA Reservist Initiative</a></li> <li class="last collapsed"><a href="//www.fema.gov/voluntary-faith-based-community-based-organizations">Voluntary, Faith-Based, & Community-Based Organizations</a></li> </ul> </div> </div> </div> </div> </div> <!-- Global Search --> <div type="" class="global-search" data-toggle="modal" data-target="#uniSearch" tabindex="0"> Search </div> <div class="modal fade search-modal" id="uniSearch" tabindex="-1" role="dialog" aria-labelledby="uniSearchLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true"><div class="close-icon">×</div></span> <div class="close-text">Close</div> </button> <div class="modal-title" id="uniSearchLabel">Search</div> </div> <div class="modal-body"> <form accept-charset="UTF-8" action="//search.usa.gov/search" id="search_form" method="get"><div style="margin:0;padding:0;display:inline"> <input name="utf8" type="hidden" value="✓" /></div> <input id="affiliate" name="affiliate" type="hidden" value="fema" /> <label for="query">Enter Search Term(s):</label> <input placeholder="Search anything on fema.gov" autocomplete="off" class="usagov-search-autocomplete" id="query" name="query" type="text" size="31" /> <input class="search-submit" name="commit" type="submit" value="GO" /> </form> </div> </div> </div> </div> </div><!-- .global-nav-wrapper--> <!-- Left Sidebar (Rendered) --> <div class="contextual-nav-desktop"> <div class="region region-sidebar-first"> <!-- [sidebar-left] --> <ul> <li class="leaf"> <ul> <li class="leaf"><a href="/portal/">MSC Home</a></li> <li class="leaf"><a href="/portal/search">MSC Search by Address</a></li> <li class="leaf"><a href="/portal/advanceSearch">MSC Search All Products</a></li> <li class="expanded"><a href="/portal/resources/productsandtools">MSC Products and Tools</a> <ul> <li class="leaf"><a href="/portal/resources/hazus">Hazus</a></li> <li class="leaf"><a href="/portal/resources/lomc">LOMC Batch Files</a></li> <li class="leaf"><a href="/portal/productAvailability">Product Availability</a></li> </ul> </li> <li class="leaf"><a href="/portal/resources/faq">MSC Frequently Asked Questions (FAQs)</a> </li> <li class="leaf"><a href="/portal/subscriptionHome">MSC Email Subscriptions</a></li> <li class="leaf"><a href="/portal/resources/contact">Contact MSC Help</a></li> </ul> </li> </ul> <!-- [/sidebar-left] --> </div><!-- .region region-sidebar-first --> </div><!-- .contextual-nav-desktop --> </div><!-- .global-nav --> </div><!-- .block-left --> <a id="main-content" name="main-content" href="#" class="element-invisible element-focusable">Main Content</a> <div class="block-right"> <div class="content-wrapper"> <section> <h1 class="page-header">FEMA Flood Map Service Center: Search All Products</h1> <div class="region region-content"> <section id="block-block-5" class="block block-block clearfix"> <script></script> <style type="text/css"> /* This hides the related links section for disaster/4341 */ body.page-node-317009 div.content > h2, body.page-node-317012 div.content > h2 { display: none; } body.page-taxonomy img.gis_image { border: none; height: 153px !important; margin-right: 0; max-width: 100% !important; width: 198px !important; } div.leadership { margin-bottom: 22px; } div.leadership div.col-md-9 { padding-left:0; margin-left:35px; } div.leadership-main div.col-md-2 { text-align:center; overflow: hidden; } div.headshot-wrapper-big { width:140px; height: 175px; text-align:center; overflow: hidden; margin-top: 7px; } div.content img.leader-headshot-big { margin-left: -25px; height:175px !important; width:175px !important; max-width: inherit !important; text-align:center; } div.headshot-wrapper { height: 113px; width:100px; overflow:hidden; text-align:center; } div.content img.leader-headshot-small { margin-left:-8px; width:115px !important; height:115px !important; max-width: inherit !important; } </style> </section> <!-- /.block --> </div> <div class="region region-content"> <!-- [content] --> <span id="msc-logout-link-span"></span> <input type="hidden" id="MSC_hidden_suggestURL" name="MSC_hidden_suggestURL" value='/portal/advanceSearch' /> <div id="msc-content" role="main" class="region region-content searchallproducts search"> <p id="error" class="alert alert-danger hide" role="alert"/> <div class="searchcriteria"> <p>Choose one of the three search options below and optionally enter a posting date range.</p> <form id="catalogSearchForm" name="catalogSearchForm" action="/portal/advanceSearch" method="post"> <div class="row"> <fieldset id="search-jurisdiction" class="col-md-4"> <h2 class="h2break">Jurisdiction </h2> <div> <div id="dropdownSearch" class="form-group"> <label for="selstate">State</label> <select id="selstate" class="selectfield form-control" name="selstate" onchange="getCounty(document.catalogSearchForm)" size="1"> <option selected="selected" value="none">-- Select --</option> <option value="01">ALABAMA</option> <option value="02">ALASKA</option> <option value="60">AMERICAN SAMOA</option> <option value="04">ARIZONA</option> <option value="05">ARKANSAS</option> <option value="06">CALIFORNIA</option> <option value="08">COLORADO</option> <option value="09">CONNECTICUT</option> <option value="10">DELAWARE</option> <option value="11">DISTRICT OF COLUMBIA</option> <option value="12">FLORIDA</option> <option value="13">GEORGIA</option> <option value="66">GUAM</option> <option value="15">HAWAII</option> <option value="16">IDAHO</option> <option value="17">ILLINOIS</option> <option value="18">INDIANA</option> <option value="19">IOWA</option> <option value="20">KANSAS</option> <option value="21">KENTUCKY</option> <option value="22">LOUISIANA</option> <option value="23">MAINE</option> <option value="75">MARIANA DISTRICT - DEFUNCT</option> <option value="24">MARYLAND</option> <option value="25">MASSACHUSETTS</option> <option value="26">MICHIGAN</option> <option value="27">MINNESOTA</option> <option value="28">MISSISSIPPI</option> <option value="29">MISSOURI</option> <option value="30">MONTANA</option> <option value="31">NEBRASKA</option> <option value="32">NEVADA</option> <option value="33">NEW HAMPSHIRE</option> <option value="34">NEW JERSEY</option> <option value="35">NEW MEXICO</option> <option value="36">NEW YORK</option> <option value="37">NORTH CAROLINA</option> <option value="38">NORTH DAKOTA</option> <option value="69">NORTHERN MARIANA ISLANDS</option> <option value="39">OHIO</option> <option value="40">OKLAHOMA</option> <option value="41">OREGON</option> <option value="42">PENNSYLVANIA</option> <option value="72">PUERTO RICO</option> <option value="44">RHODE ISLAND</option> <option value="45">SOUTH CAROLINA</option> <option value="46">SOUTH DAKOTA</option> <option value="47">TENNESSEE</option> <option value="48">TEXAS</option> <option value="49">UTAH</option> <option value="50">VERMONT</option> <option value="78">VIRGIN ISLANDS</option> <option value="51">VIRGINIA</option> <option value="53">WASHINGTON</option> <option value="54">WEST VIRGINIA</option> <option value="55">WISCONSIN</option> <option value="56">WYOMING</option> </select> </div> <div id="countyDropdown" class="form-group"> <label for="selcounty">County</label> <select id="selcounty" class="selectfield form-control" name="selcounty" onchange="getCommunity(document.catalogSearchForm)" size="1"> <option selected="selected" value="none">-- Select --</option> </select> </div> <div id="communityDropdown" class="form-group"> <label for="selcommunity">Community</label> <select id="selcommunity" class="selectfield form-control" name="selcommunity" size="1" onchange= "updateSelectedOption()" > <option selected="selected" value="none">-- Select --</option> </select> </div> </div> </fieldset> <fieldset id="search-jurisdictionname" class="col-md-4"> <h2 class="h2break">Jurisdiction Name </h2> <div class="form-group"> <label for="txtjurisdictionname">Jurisdiction Name or FEMA ID</label> <input type="text" id="txtjurisdictionname" class="form-control" name="txtjurisdictionname" /> <input type="hidden" id="jurisdictionkey" name="jurisdictionkey"/> <input type="hidden" id="jurisdictionvalue" name="jurisdictionvalue"/> <input type="hidden" id="searchedCid" name="searchedCid"/> <input type="hidden" id="searchedDateStart" name="searchedDateStart"/> <input type="hidden" id="searchedDateEnd" name="searchedDateEnd"/> <p class="field-instructions inline">(Ex. Fairfax County-wide or 51059C)</p> </div> </fieldset> <fieldset id="search-productid" class="col-md-4"> <h2 class="h2break">Product ID <a href="javascript:openHelpWindow('fullcatalogsearchbyproductid');" ><img src="/portal/images/icon-question-mark.png" class="help-icon" alt="Product ID Help" /></a> </h2> <div class="form-group"> <label for="txtproductid">Product ID</label> <input type="text" id="txtproductid" class="form-control" name="txtproductid" /> <p class="field-instructions inline">(Ex. Panel Number, LOMC Case Number)</p> </div> </fieldset> </div> <fieldset id="msc-postingdate"> <h2>Filter by Posting Date Range <span class="optional">(optional)</span> </h2> <p class="field-instructions">Use this search criteria if you are trying to narrow down results based on when products were posted to the MSC. This field is optional - you do not need to know the date on which desired products were posted to successfully complete a search.</p> <div class="form-group msc-postingdate"> <label id="startdateLabel" for="txtstartdate">Date From</label> <input type="text" class="date form-control" id="txtstartdate" name="txtstartdate" placeholder="mm/dd/yyyy" /> </div> <div class="form-group msc-postingdate"> <label id="enddateLabel" for="txtenddate">Date To</label> <input type="text" class="date form-control" id="txtenddate" name="txtenddate" placeholder="mm/dd/yyyy" /> </div> </fieldset> <div class="buttons h2break"> <input type="button" id="mainSearch" class="btn btn-primary" value="Search" onclick="search();"/> <input type="button" class="btn btn-default" value="Clear All Fields" onclick="resetForm();"/> </div> <div id="wait"></div> </form> </div> <a id="searchresultsanchor" class="anchor"></a> <h1 class="adv-searchresults" id="searchresultsEmpty">No Results Found <span id="searchByEmpty"></span> </h1> <h1 class="adv-searchresults searchresults">Search Results <span id="searchBy"></span> </h1> <div id="emptyResultDiv" class="nosearchresults alert alert-block alert-warning hide"> <p id="emptyResult"></p> </div> <div class="searchresults"> <!-- Included JSP --> <!DOCTYPE html> <html> <p class="field-instructions">Click <a href="javascript:subscribeLink();">subscribe</a> to receive email notifications when products are updated.<br> Click to <a id="print" href="javascript:getAllProductsCSV()">download a listing</a> of all products.<img tabindex="0" hspace="40" helpAnchor="printAllHelp" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon"/><br> If you are a person with a disability, are blind, or have low vision, and need assistance, please contact a <a href="https://msc.fema.gov/portal/resources/contact">map specialist</a>.</p> <div id="address-search-message" class="alert alert-block alert-info" > <p><strong>Please Note:</strong> Searching All Products by county displays all products for all communities within the county. You can refine your search results by specifying your specific jurisdiction location using the drop-down menus above.</p> </div> <img src="/portal/images/ico-folder_closed.png" id="btn-folder" tabindex="0" hspace="8"> <button id="expandAll" class="btn btn-primary" style="font-weight:bold; text-decoration: underline;">Expand All</button><img tabindex="0" hspace="40" helpAnchor="expandAndCollapse" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon"/><br></br> <div id="accordion"> <h3 id="eff_root">Effective Products <span id="eff_root_count"></span> <img tabindex="0" hspace="40" helpAnchor="effectiveproducts" id="helpicon1" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon" style="margin-left: 20px;"/> </h3> <div id="firm_accordion" class="productListC"> <h3 id="eff_firmpanel_root" class="ui-accordion-div"> FIRM Panels <span id="eff_firmpanel_count"></span> <span id="eff_firmpanel_downloadAll"><img tabindex="0" hspace="40" downloadType="eff_firmpanel" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Effective FIRM Panels" /></span> </h3> <div class="ui-accordion-div"> <div id="eff_firm_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Searches often result in many map files listed under a given section. You can determine the Product ID for the individual map panel needed by looking at the Map Index file. The index map files have "IND" within the Product ID and appear at the start of the list. These index files show an overview of a jurisdiction and how it is subdivided into map panels with the Product ID for each panel shown.</p> </div> <table class="ui-accordion-table" summary="Effective Firm Panels Information by product name and effective date"> <thead id="eff_firmpanel_header"></thead> <tbody id ="effectiveLOMCContainer"> </tbody> </table> </div> <h3 id="fis_effective_root"> FIS Reports <span id="fis_effective_count"></span> <span id="eff_fisreport_downloadAll"><img tabindex="0" hspace="40" downloadType="eff_fisreport" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Effective FIS Reports" /> </span> </h3> <div class="ui-accordion-div"> <div id="eff_fis_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Sometimes small portions of the FIS are revised by Letters of Map Revisions (LOMR). When using the FIS report, you should also check LOMR documents listed in the LOMC section below for revisions that affect your specific area of interest.</p> </div> <table class="ui-accordion-table" summary="FIS Report Data Information by product name and effective date"> <thead id="eff_fis_list_header"></thead> <tbody id="eff_fis_list"> </tbody> </table> </div> <h3 id="eff_lomc_root">LOMC <span id="eff_main_lomc_count"></span> </h3> <div id="eff_lomc_accordion" class="productListC"> <h3 id="eff_main_lomr_root"> LOMR <span id="eff_main_lomr_count"></span> <span id="eff_lomr_downloadAll"><img tabindex="0" hspace="40" downloadType="eff_lomr" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Effective LOMR" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead id="eff_lomr_header"> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="eff_lomr_list"></tbody> </table> </div> <h3 id="eff_main_loma_root"> LOMA <span id="eff_main_loma_count"></span> <span id="eff_loma_downloadAll"><img tabindex="0" hspace="40" downloadType="eff_loma" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Effective LOMA" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead id="eff_loma_header"> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="eff_loma_list"></tbody> </table> </div> <h3 id="eff_main_reval_root"> Revalidations <span id="eff_main_reval_count"></span> <span id="eff_reval_downloadAll"><img tabindex="0" hspace="40" downloadType="eff_reval" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Effective Revalidations" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead id="eff_reval_header"> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="eff_reval_list"></tbody> </table> </div> </div> <h3 id="eff_nfhl_state_root">NFHL Data-State <span id="nfhl_state_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead id="nfhl_state_header"></thead> <tbody id="nfhl_state_list"></tbody> </table> </div> <h3 id="eff_nfhl_county_root">NFHL Data-County <span id="nfhl_county_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead id="nfhl_county_header"></thead> <tbody id="nfhl_county_list"></tbody> </table> </div> </div> <h3 id="prelim_root">Preliminary Products <span id="prelim_root_count"></span> <img tabindex="0" hspace="40" helpAnchor="preliminaryproducts" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon" /> </h3> <div id="prelim_firm_accordion" class="productListC"> <div id="prelim_firm_disclaimer1" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Preliminary data are for review and guidance purposes only. By viewing preliminary data and maps, the user acknowledges that the information provided is preliminary and subject to change. Preliminary data, including new or revised FIRMs, FIS reports, and FIRM Databases, are not final and are presented on the MSC as the best information available at this time. Additionally, preliminary data cannot be used to rate flood insurance policies or enforce the Federal mandatory purchase requirement. FEMA will remove preliminary data once effective data are available.</p> </div> <h3 id="prelim_firmpanel_root"> Preliminary FIRM Panels <span id="prelim_firmpanel_count"></span> <span id="prelim_firmpanel_downloadAll"> <img tabindex="0" hspace="40" downloadType="prelim_firmpanel" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Preliminary FIRM Panels" /> </span> </h3> <div class="ui-accordion-div"> <div id="prelim_firm_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Searches often result in many map files listed under a given section. You can determine the Product ID for the individual map panel needed by looking at the Map Index file. The index map files have "IND" within the Product ID and appear at the start of the list. These index files show an overview of a jurisdiction and how it is subdivided into map panels with the Product ID for each panel shown.</p> </div> <table id="prelimFirmPanelContainerTable" class="ui-accordion-table"> <thead> </thead> <tbody id="prelimFirmPanelContainer"> </tbody> </table> </div> <h3 id="prelim_fisreport_root"> Preliminary FIS Reports <span id="prelim_fisreport_count"></span> <span id="prelim_fisreport_downloadAll"> <img tabindex="0" hspace="40" downloadType="prelim_fisreport" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Preliminary FIS Reports" /> </span> </h3> <div class="ui-accordion-div"> <div id="prelim_fis_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Sometimes small portions of the FIS are revised by Letters of Map Revisions (LOMR). When using the FIS report, you should also check LOMR documents listed in the LOMC section below for revisions that affect your specific area of interest.</p> </div> <table id="prelimFisReportContainerTable" class="ui-accordion-table"> <thead> </thead> <tbody id="prelimFisReportContainer"> </tbody> </table> </div> <h3 id="prelim_firmdb_root"> Preliminary FIRM Database <span id="prelim_firmdb_count"></span></h3> <div class="ui-accordion-div"> <table id="prelimFirmDBContainerTable" class="ui-accordion-table"> <thead> </thead> <tbody id="prelimFirmDBContainer"> </tbody> </table> </div> </div> <h3 id="pending_root">Pending Product <span id="pending_root_count" ></span> <img tabindex="0" hspace="40" helpAnchor="pendingproducts" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon" /> </h3> <div id="pending_accordion" class="productListC"> <h3 id="pending_firmpanel_root" class="ui-accordion-div"> FIRM Panels <span id="pending_firmpanel_count"></span> <span id="pending_firmpanel_downloadAll"> <img tabindex="0" hspace="40" downloadType="pending_firmpanel" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Pending FIRM Panels" /> </span> </h3> <div class="ui-accordion-div"> <div id="pend_firm_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Searches often result in many map files listed under a given section. You can determine the Product ID for the individual map panel needed by looking at the Map Index file. The index map files have "IND" within the Product ID and appear at the start of the list. These index files show an overview of a jurisdiction and how it is subdivided into map panels with the Product ID for each panel shown.</p> </div> <table class="ui-accordion-table"> <thead> </thead> <tbody id ="pendingLOMCContainer"> </tbody> </table> </div> <h3 id="fis_pending_root"> FIS Reports <span id="fis_pending_count"></span> <span id="pending_fisreport_downloadAll"> <img tabindex="0" hspace="40" downloadType="pending_fisreport" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Pending FIS Reports" /> </span> </h3> <div class="ui-accordion-div"> <div id="pend_fis_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Sometimes small portions of the FIS are revised by Letters of Map Revisions (LOMR). When using the FIS report, you should also check LOMR documents listed in the LOMC section below for revisions that affect your specific area of interest.</p> </div> <table class="ui-accordion-table"> <thead> <tr> <th id="productId"> Product ID </th> <th id="effectiveDate"> Effective Date </th> <th id="size"> Size </th> <th id="download"> Download </th> </tr> </thead> <tbody id="pending_fis_list"></tbody> </table> </div> <h3 id="pending_lomc_root">LOMC <span id="pending_lomc_count"></span></h3> <div id="main_pending_lomc_accordion" class="productListC"> <h3 id="pending_lomr_root">LOMR <span id="pending_lomr_count"></span> <span id="pending_lomr_downloadAll"><img tabindex="0" hspace="40" downloadType="pending_lomr" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Pending LOMR" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="pending_lomr_list"></tbody> </table> </div> <h3 id="pending_loma_root"> LOMA <span id="pending_loma_count"></span> <span id="pending_loma_downloadAll"><img tabindex="0" hspace="40" downloadType="pending_loma" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Pending LOMA" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="pending_loma_list"></tbody> </table> </div> <h3 id="pending_reval_root"> Revalidations <span id="pending_reval_count"></span> <span id="pending_reval_downloadAll"><img tabindex="0" hspace="40" downloadType="pending_reval" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Pending Revalidations" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="pending_reval_list"></tbody> </table> </div> </div> <h3 id="pending_firmdb_root">FIRM Database <span id="pending_firmdb_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead> <tr> <th id="productID"> Product ID </th> <th id ="effectiveDate"> Effective Date </th> <th id ="Description"> Description </th> <th id="size"> Size </th> <th id="download"> Download </th> </tr> </thead> <tbody id="pending_firmdb_list"></tbody> </table> </div> </div> <h3 id="historic_root">Historic Products <span id="historic_root_count"></span> <img tabindex="0" hspace="40" helpAnchor="historicproducts" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon" /> </h3> <div id="historic_firm_accordion" class="productListC"> <h3 id="his_firmpanel_root" class="ui-accordion-div"> FIRM Panels <span id="his_firmpanel_count" style="font-size:15px"></span> <span id="his_firmpanel_downloadAll"> <img tabindex="0" hspace="40" downloadType="his_firmpanel" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Historic FIRM Panels" /> </span> </h3> <div class="ui-accordion-div"> <div id="hist_firm_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Searches often result in many map files listed under a given section. You can determine the Product ID for the individual map panel needed by looking at the Map Index file. The index map files have "IND" within the Product ID and appear at the start of the list. These index files show an overview of a jurisdiction and how it is subdivided into map panels with the Product ID for each panel shown.</p> </div> <table class="ui-accordion-table" summary="Firm Panel Information by product name, effective Date"> <thead> </thead> <tbody id="historicLOMCContainer"> </tbody> </table> </div> <h3 id="historic_fis_root"> FIS Reports <span id="fis_his_count"></span> <span id="his_fisreport_downloadAll"> <img tabindex="0" hspace="40" downloadType="his_fisreport" id="his_fisreport_downloadAll" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Historic FIS Reports" /> </span> </h3> <div class="ui-accordion-div"> <div id="hist_fis_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Sometimes small portions of the FIS are revised by Letters of Map Revisions (LOMR). When using the FIS report, you should also check LOMR documents listed in the LOMC section below for revisions that affect your specific area of interest.</p> </div> <table class="ui-accordion-table" summary="Historic Fis Report Data Information by product name, effective Date"> <thead> <tr> <th id="productId"> Product ID </th> <th id="effectiveDate"> Effective Date </th> <th id="size"> Size </th> <th id="download"> Download </th> </tr> </thead> <tbody id="his_fis_list"></tbody> </table> </div> <h3 id="historic_lomc_root"> LOMC <span id="his_lomc_count"></span></h3> <div id="main_lomc_accordion" class="productListC"> <h3 id="his_lomr_root"> LOMR <span id="his_lomr_count"></span> <span id="his_lomr_downloadAll"><img tabindex="0" hspace="40" downloadType="his_lomr" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Historic LOMR" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="his_lomr_list"></tbody> </table> </div> <h3 id="his_loma_root"> LOMA <span id="his_loma_count"></span> <span id="his_loma_downloadAll"><img tabindex="0" hspace="40" downloadType="his_loma" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Historic LOMA" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="his_loma_list"></tbody> </table> </div> <h3 id="his_reval_root"> Revalidations <span id="his_reval_count"></span> <span id="his_reval_downloadAll"><img tabindex="0" hspace="40" downloadType="his_reval" src="/portal/images/btn-download_all.png" class="downloadall-icon" alt="DL ALL:Download All Historic Revalidations" /> </span> </h3> <div class="ui-accordion-div"> <table class="ui-accordion-second-table"> <thead> <tr> <th> Product ID </th> <th> Effective Date </th> <th> Download </th> </tr> </thead> <tbody id="his_reval_list"></tbody> </table> </div> </div> </div> <h3 id="floodRisk_root">Flood Risk Products <span id="floodRisk_root_count"></span> <img tabindex="0" hspace="40" helpAnchor="floodriskproducts" id="helpicon" src="/portal/images/icon-question-mark.png" class="help-text-icon" alt="Help Icon" /> </h3> <div id="floodRisk_map_accordion" class="productListC"> <div id="frp_disclaimer" class="alert alert-block alert-info"> <p><strong>Please note:</strong> Flood Risk Products have purposes that are different from regulatory flood hazard products (i.e., FIRM, FIS Report, and FIRM Database). Regulatory flood hazard products are mandated by law and used by the National Flood Insurance Program (NFIP) for rating flood insurance policies and enforcing the federal mandatory insurance purchase requirements. Flood Risk Products are supplementary resources for communicating flood risk to communities and may not entirely align with the regulatory flood maps. The information in these products reflect what was produced by the FEMA Risk MAP study in that area. Depending on the requirements of the study, the Flood Risk Products available for your community may consist of a Flood Risk Map, Flood Risk Report or Flood Risk Database.</p> </div> <h3 id="floodRisk_map_root"> Flood Risk Maps<span id="floodRisk_map_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead> <tr> <th> Product ID </th> <th> MSC Posting Date </th> <th class="size"> Size </th> <th> Download </th> </tr> </thead> <tbody id="floodRiskMapContainer"> </tbody> </table> </div> <h3 id="floodRisk_report_root"> Flood Risk Reports <span id="floodRisk_report_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead> <tr> <th> Product ID </th> <th> MSC Posting Date </th> <th> Size </th> <th> Download </th> </tr> </thead> <tbody id="floodRiskReportContainer"> </tbody> </table> </div> <h3 id="floodRisk_db_root"> Flood Risk Database <span id="floodRisk_db_count"></span></h3> <div class="ui-accordion-div"> <table class="ui-accordion-table"> <thead> <tr> <th> Product ID </th> <th> File Format </th> <th> MSC Posting Date </th> <th> Size </th> <th> Download </th> </tr> </thead> <tbody id="floodRiskDBContainer"> </tbody> </table> </div> </div> </div> </html> </div> </div> <!-- [/content] --> </div> <div class="contextual-nav-mobile"></div> <footer class="content-footer"> <div class="region region-footer"> <section id="block-unicorn-social-links-unicorn-social-links" class="block block-unicorn-social-links clearfix"> <div class="socialImagesDiv"> <a id="showThisPageSpan" href="#"><span class="icon-show"><img src="/portal/images/icon_share.png" alt="Click to expand and share this page on social networks"></span><span id="showText">Share This Page.</span></a> <div class="social-images"> <a href="https://www.facebook.com/sharer/sharer.php?u=UNIURL" target="_blank"><img src="/portal/images/icon_facebook.png" alt="Facebook Icon"></a> <a href="https://twitter.com/intent/tweet?text=FEMA+Flood+Map+Service+Center&url=UNIURL&via=fema" target="_blank"><img src="/portal/images/icon_twitter.png" alt="Twitter Icon"></a> <a href="https://www.linkedin.com/shareArticle?mini=true&url=UNIURL&title=FEMA Flood Map Service Center&summary=&source=" target="_blank"><img src="/portal/images/icon_linkedin.png" alt="LinkedIn Icon"></a> <a href="https://plus.google.com/share?url=UNIURL" target="_blank"><img src="/portal/images/icon_googleplus.png" alt="Google Plus Icon"></a> <a href="https://www.tumblr.com/share/link?url=UNIURL&name=FEMA Flood Map Service Center&description=" target="_blank"><img src="/portal/images/icon_tumblr.png" alt="Tumblr Icon"></a> </div> </div> </section> <!-- /.block --> <section id="block-menu-menu-unicorn-footer-menu" class="block block-menu clearfix"> <ul><li class="first leaf"><a href="//www.fema.gov/" title="">Home</a></li> <li class="leaf"><a href="https://www.fema.gov/about/website-information/plug-ins" title="">Download Plug-ins</a></li> <li class="leaf"><a href="https://www.fema.gov/about" title="">About Us</a></li> <li class="leaf"><a href="https://www.fema.gov/about/website-information/privacy-policy" title="">Privacy Policy</a></li> <li class="leaf"><a href="https://www.fema.gov/foia" title="">FOIA</a></li> <li class="leaf"><a href="https://www.oig.dhs.gov/" title="">Office of the Inspector General</a></li> <li class="leaf"><a href="https://www.fema.gov/about/strategic-plan" title="">Strategic Plan</a></li> <li class="leaf"><a href="https://www.whitehouse.gov" title="">Whitehouse.gov</a></li> <li class="leaf"><a href="https://www.dhs.gov" title="">DHS.gov</a></li> <li class="leaf"><a href="https://www.ready.gov" title="">Ready.gov</a></li> <li class="leaf"><a href="https://www.usa.gov" title="">USA.gov</a></li> <li class="last leaf"><a href="https://www.disasterassistance.gov/" title="">DisasterAssistance.gov</a></li> </ul> </section> <!-- /.block --> <section id="block-boxes-unicorn-footer-dhs-text" class="block block-boxes block-boxes-simple clearfix"> <div id='boxes-box-unicorn_footer_dhs_text' class='boxes-box'><div class="boxes-box-content"><p><a href="https://www.oig.dhs.gov/hotline"><img src="https://www.oig.dhs.gov/sites/default/files/img/oig-hotline.png" alt="OIG Hotline to report waste and abuse" /></a></p> <p lang="en"><img lang="en" src="/portal/images/icon_usflag.gif" alt="US flag signifying that this is a United States Federal Government website"> Official website of the Department of Homeland Security</p></div></div> </section> <!-- /.block --> </div> </footer> </section> <div class="clearfix"></div> </div><!-- .content --> </div> </div><!-- .block-right --> <!-- this holds the mobile nag in desktop view --> <div id="dialog-download-app"></div> <script src="/portal/js/js_AZ9y0PShar4GyPuQUcAgecHmIwX4TUOo0HFPa06mnF0.js"></script> <script src="/portal/js/js_x7i9_K8_u7Lf_Pr4XToSxjCDPT7-3IXdc15I1723_SU.js"></script> </body> </html>