function OnloadImg(url, title = '') { if (title == '') { title = 'ImageViewer'; } var img = new Image(); img.src = url; var win_width = img.width; var win_height = img.height; var win_top = (screen.height / 2) - (win_height / 2); var win_left = (screen.width / 2) - (win_width / 2); var OpenWindow = window.open('', '_blank', 'width=' + win_width + ', height=' + win_height + ', top=' + win_top + ', left=' + win_left + ', menubars=no, scrollbars=auto'); var doc_head = "" + title + ""; var doc_style = ""; var doc_image = ""; OpenWindow.document.write(doc_head + doc_style + doc_image); } // url.style.display='none' function Close_IDofHref(obj) { const id = obj.attributes.href.nodeValue.replace("#", ''); document.getElementById(id).style.display = 'none'; } // url.style.display='block' function Open_IDofHref() { const id = this.attributes.href.nodeValue.replace("#", ''); document.getElementById(id).style.display = 'block'; } function ToggleNextElement_Div() { const element = this.nextElementSibling; if (element.localName != 'div') return; if (element.style.display == '' || element.style.display == 'none') element.style.display = 'block'; else element.style.display = 'none'; }