visibleYearIdx.length) { endArrayIndex = visibleYearIdx.length - 1; } endVisibleYearIdx = visibleYearIdx[endArrayIndex]; visibleYearArrayIndexEnd = endArrayIndex; getNextSet(); } } function getYears() { var years = document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidYears').value; if (years != "") arrYears = years.split(","); } function getAvailableYearsIndex() { var years = document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidVisibleYearsIndex').value; if (years != "") visibleYearIdx = years.split(","); } function previousYear() { //getYears(); getAvailableYearsIndex(); startVisibleYearIdx = parseInt(document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidStartVisibleYearIdx').value); visibleYearArrayIndexStart = parseInt(document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidStartVisibleYearArrayIdx').value); var newStartVisibleYearArrayIdx = parseInt(visibleYearArrayIndexStart) - parseInt(maxDisplayYears); if (newStartVisibleYearArrayIdx <= 0) { newStartVisibleYearArrayIdx = 0; } visibleYearArrayIndexStart = newStartVisibleYearArrayIdx; startVisibleYearIdx = visibleYearIdx[newStartVisibleYearArrayIdx]; var endArrayIndex = newStartVisibleYearArrayIdx + maxDisplayYears - 1; if (endArrayIndex > visibleYearIdx.length) { endArrayIndex = visibleYearIdx.length - 1; } endVisibleYearIdx = visibleYearIdx[endArrayIndex]; visibleYearArrayIndexEnd = endArrayIndex; getNextSet(); } function getNextSet() { showAvailableLinks(); //showLabels(); showPreviousNext(); document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidStartVisibleYearIdx').value = startVisibleYearIdx; document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidStartVisibleYearArrayIdx').value = visibleYearArrayIndexStart; }; function showLinks() { // display all year links between startVisibleYearIdx and endVisibleYearIdx var selectedYear = parseInt(document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidSelectedYearIdx').value); // var arrLinkElem = ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_years.getElementsByTagName("a"); // doesn't work in Firefox!! var arrLinkElem = document.getElementsByTagName("a"); for (var i = arrLinkElem.length - 1; i >= 0; i--) { if (arrLinkElem[i].id.indexOf("_sccgov_year_") > 0) { var arr1 = (arrLinkElem[i].id).split("_sccgov_year_"); var idx = parseInt(arr1[1]); if (idx <= endVisibleYearIdx && idx >= startVisibleYearIdx) arrLinkElem[i].style.display = "inline-block"; else arrLinkElem[i].style.display = "none"; } } }; function showAvailableLinks() { var visCount = 0; //get all those containers that are selectable and the current one var arrLinkElem = document.querySelectorAll('.sccgov_page_body_newsroomselectable_container, .sccgov_page_body_newsroomcurrentpage_container'); for (var i = 0; i < arrLinkElem.length ; i++) { if (arrLinkElem[i].id.indexOf("_sccgov_year_") > 0) { var arr1 = (arrLinkElem[i].id).split("_sccgov_year_"); var idx = parseInt(arr1[1]); for (var arrayIndex = 0; arrayIndex < visibleYearIdx.length ; arrayIndex++) { arrLinkElem[i].style.display = "none"; if (arrayIndex >= visibleYearArrayIndexStart && arrayIndex <= visibleYearArrayIndexEnd && visCount < maxDisplayYears) { if (idx == visibleYearIdx[arrayIndex]) { arrLinkElem[i].style.display = "inline-block"; visCount++; break; } } } } } }; function showLabels() { // only display the label of selected year // var arrSpanElem = ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_years.getElementsByTagName("Span"); // doesn't work in Firefox!! var arrSpanElem = document.getElementsByTagName("Span"); for (var i = arrSpanElem.length - 1; i >= 0; i--) { if (arrSpanElem[i].id.indexOf("_sccgov_lblyear_") > 0) { var arr2 = (arrSpanElem[i].id).split("_sccgov_lblyear_"); var idx = parseInt(arr2[1]); var selectedYear = parseInt(document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidSelectedYearIdx').value); if (idx <= endVisibleYearIdx && idx >= startVisibleYearIdx && idx == selectedYear) arrSpanElem[i].style.display = "inline-block"; else arrSpanElem[i].style.display = "none"; } } }; function showPreviousNext() { // show previous button if (visibleYearArrayIndexStart > 0) { document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_link_prev_year').style.display = "inline-block"; } else { document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_link_prev_year').style.display = "none"; } // show next button if (visibleYearArrayIndexEnd < visibleYearIdx.length - 1) { document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_link_next_year').style.display = "inline-block"; } else { document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_link_next_year').style.display = "none"; } }; //}); function setFormSubmitToFalse() { _spFormOnSubmitCalled = false; _spSuppressFormOnSubmitWrapper = true; return true; } function displayYears(index) { $('a[id*="_sccgov_year_"]').attr('class', 'sccgov_page_body_newsroomselectable_container'); $('a[id$=_sccgov_year_' + index + ']').attr('class', 'sccgov_page_body_newsroomcurrentpage_container'); } function checkYear(index) { var selectedYearIdx = document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidSelectedYearIdx').value; if (index == selectedYearIdx) return false; else return true; } function checkTab(tab) { var selectedTab = document.getElementById('ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidSelectedTab').value; if (tab == selectedTab) return false; else return true; } function displayTab(tab) { var displayTabHeader = "False"; var listName2 = ""; var showTab2 = true; if (displayTabHeader.toLowerCase() == "false") $("#sccgov_tab_header").css('display', 'none'); else { if (listName2 == "") { showTab2 = false; $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_2").css('display', 'none'); } $("#sccgov_tab_header").attr('class', 'sccgov_page_body_newsroomheaderclear_container'); if (tab == "1") { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_1").attr('class', 'sccgov_tab_newsroomcurrenttab_container'); $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tablink_1").css('cursor', 'text'); if (showTab2) { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_2").attr('class', 'sccgov_tab_newsroomselectable_container'); $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tablink_2").css('cursor', 'pointer'); } } else { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_1").attr('class', 'sccgov_tab_newsroomselectable_container'); $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tablink_1").css('cursor', 'pointer'); if (showTab2) { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_2").attr('class', 'sccgov_tab_newsroomcurrenttab_container'); $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tablink_2").css('cursor', 'text'); } } // draw bottom-line if (showTab2) { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_2").css('border-bottom', '1px solid #cccccc'); } else { $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_sccgov_tabdiv_1").css('border-bottom', '1px solid #cccccc'); } } } $(document).ready(function () { displayTab("1"); var index = $("#ctl00_m_g_87eb8095_f22b_4cb7_bca6_a9fae401d693_ctl00_hidSelectedYearIdx").val(); if (index == "") index = "0"; displayYears(index); }); ]]> < 2020 2019 2018 2017 2016 2015 2014 2013 2012 2011 2008 > 2020 +August 20208/7/2020 Press Conference: County Sheriff's Captain, Prominent Lawyer Charged with Gun Permit Scheme +July 2020Bend the Arc Livestream +May 2020Meet Percy You Matter. +April 2020Parent Project Video Review: Weeks 1 - 6+March 2020COVID-19 Hate Crime PSA - English COVID-19 Hate Crime PSA – 中文COVID-19 Hate Crime PSA - Tiếng ViệtCOVID-19 Hate Crime PSA - EspañolCOVID-19 Update from DA Jeff Rosen and SJPD Chief Eddie Garcia

©2022 County of Santa Clara. All rights reserved.