function openersIndex() {
// Get all elements with an id attribute
let elements = document.querySelectorAll('[id]');
// Loop over them
for (let element of elements) {
// Get the value of the href attribute
let href = element.href;
// Add an event listener to each element
element.addEventListener('click', function(event) {
// Prevent the default action
event.preventDefault();
// Check if the href ends with 'png'
if (href.includes('png')) {
// Redirect to park/view.html with the href as a hash
window.location = 'park/view.html#' + href;}
// Check if the href ends with 'jpg'
else if (href.includes('jpg')) {
// Redirect to park/view.html with the href as a hash
window.location = 'park/view.html#' + href;}
// Check if the href is on the web and ends with 'pdf'
else if (href.includes('https') && href.includes('pdf')) {
// Redirect to assets-a-cgi-pd.cgi with the href as a query
window.location = 'assets-a-cgi-pd.cgi?' + href;}
// Check if the href is local and ends with 'pdf'
else if (href.includes('file') && href.includes('pdf')) {
// Open file
window.location = href;}
});}
}