function toggleNextSibling (e) { if (e.nextSibling.style.display=='none') { e.nextSibling.style.display='block'; } else { e.nextSibling.style.display='none'; } }var InstanceReportXslt = "https://sec.kscope.io/static/js/xbrl/InstanceReport.xslt"; var InstanceReportXsltDoc = null; var isRedline = (location.href.indexOf("&redline=true") >= 0 || location.href.indexOf("?redline=true") >= 0);var processXsltInBrowser = "false";var reports = new Array(); reports[1]="R1.htm"; reports[2]="all"; var parentreport = new Array();// parentreport[1]=-1; parentreport[2]=-1; var url_path = ""; var fetch_prefix = ""; var fetch_wraps_xml_in_html = ""; function loadXmlDoc(url) { var doc; var jqxhr=$.ajax({type: "GET", url: url, async: false}); // code for IE if (window.ActiveXObject) { doc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0"); doc.loadXML(jqxhr.responseText); } // code for other browsers else if (document.implementation && document.implementation.createDocument) { doc=document.implementation.createDocument("","",null); doc.async=true; doc = jqxhr.responseXML.documentElement; } return doc; } function fixSrcAttr(src) { var uri = src.substr(0,5); // No change is needed if the 'src' attribute contains an embedded image if (uri == 'data:') { return src; } // EDGAR no change if already a server query format (url_path has a fetchPrefix) if (url_path && src.indexOf(fetch_prefix)>0) { return src; } // Absolute URL on EDGAR website is unchanged var idx = src.lastIndexOf('https://www.sec.gov/Archives/edgar/data/') if (idx > -1) { return src; } // For all other URLs use only basename component var idx = src.lastIndexOf('/'); if (idx > -1) { src = src.substring(idx+1,src.length); } return url_path + src; } function getReport(url, xsl_url) { var _url = url_path + url; if (xsl_url == null) { xsl_url = InstanceReportXslt; } var ext = url.substring(url.lastIndexOf('.')+1, url.length); if (ext == 'htm') { $.ajax({ type: "GET", url: _url, dataType: "text", async:false, success: function (data) { jQuery('#reportDiv').append(data) .find('img').attr('src', function(i, val) { return fixSrcAttr(val);}).end(); } }); } else if (processXsltInBrowser == 'true') { $.ajax({ type: "GET", url: _url, dataType: "text", async: false, success: function(data) { var path; if (fetch_wraps_xml_in_html) { // remove EDGAR workstation HTML wrpping of XML data = data.replace(/.+<PRE><FONT SIZE = 3>/g, ''); // header data = data.replace(/<\/FONT><\/PRE><\/BODY><\/HTML>/g, ''); // footer data = data.replace(/<P CLASS=\"page\"> <\/P>/g, '\n'); // newlines data = data.replace(/>/g, '>'); data = data.replace(/</g, '<'); data = data.replace(/&/g, '&'); // end of EDGAR HTML wrapping removal path = _url; // EDGAR workstation and ops GW } else { data = data.replace(/^\s+|\s+$/g, ''); // leading or trailing whitespace causes problems path = "/" + _url.substring(1, _url.lastIndexOf('/')+1); } // code for IE if (window.ActiveXObject) { xsl_doc = loadXmlDoc(xsl_url) var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0"); xslt.stylesheet = xsl_doc; var xslproc = xslt.createProcessor(); var doc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0"); doc.loadXML(data); xslproc.input = doc; xslproc.addParameter("source", path ); xslproc.addParameter("asPage", "true" ); xslproc.transform(); // Find all images and prepend the base URL to the src attribute jQuery('#reportDiv').append(jQuery(xslproc.output) .find('img') .attr('src', function(i, val) { return fixSrcAttr(val); }).end()); } // code for other browsers else if (document.implementation && document.implementation.createDocument) { xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(loadXmlDoc(xsl_url)); xsltProcessor.setParameter(null,"source",path); xsltProcessor.setParameter(null,"asPage","true"); parser = new DOMParser(); xmlDoc = parser.parseFromString(data, "text/xml"); var rpt = xsltProcessor.transformToFragment(xmlDoc, document); document.getElementById("reportDiv").appendChild(rpt); FixNotesForGeckoWebkit( document.getElementById( 'reportDiv' ) ); // Find all images and prepend the base URL to the src attribute jQuery('#reportDiv').find('img') .attr('src', function(i, val) { return fixSrcAttr(val); }); } else { alert('Your browser cannot handle this script'); } } }); } } function clearReportDiv() { // code for IE if (window.ActiveXObject) { document.getElementById("reportDiv").innerHTML=''; } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { x = document.getElementById("reportDiv").childNodes; for (i=x.length-1;i>-1;i--) { node = document.getElementById("reportDiv").childNodes[i]; if (node) { document.getElementById("reportDiv").removeChild(node); } } } } function XX_loadReport(idx) { if (window.XMLHttpRequest || window.ActiveXObject) { clearReportDiv(); xsl_url = null; if (reports[idx].indexOf('FilingSummary.xml') > -1) { unHighlightAllMenuItems(); xsl_url = url_path + "RenderingLogs.xslt"; } if (reports[idx] == 'all') { highlightAllMenuItems(); jQuery.ajaxSetup({async:false}); for (var i=1; i<reports.length; i++) { if (reports[i] != 'all') { getReport(reports[i], xsl_url); } else { break; } } } else { getReport(reports[idx], xsl_url); } window.scrollTo(0,0); } else { alert('Your browser cannot handle this script'); } } function highlight(link) { var parent = document.getElementById( 'menu' ); var links = parent.getElementsByTagName( 'a' ); for (var i = 0; i < links.length; i++){ if (links[i].className == 'xbrlviewer') { if (links[i] == link) { link.style.background = "#C1CDCD"; } else { links[i].style.background = "#F5F5EB"; } } } } //the parameter 'div' represents <div id="reportDiv"> function FixNotesForGeckoWebkit( div ){ //textContent is only found in "other" browsers //if it exists, search it for our table - there should only be one if( div.textContent ){ var tables = div.getElementsByTagName( 'table' ); if( tables.length ){ //loop through the tables for( var t = 0; t < tables.length; t++ ){ var cells = tables[t].getElementsByTagName( 'td' ); //loop through the cells, checking for class="text" which indicates some kind of text content - this includes HTML for notes for( var i = 0; i < cells.length; i++ ){ var curCell = cells[ i ]; if( curCell.className == 'text' ){ //<td class="text" found - now check if this HTML had already been rendered - if so, we should not attempt to render it again var nodes = curCell.getElementsByTagName( '*' ); if( nodes.length <= 1 ){ //no "nodes" found so perform a secondary check that we have text which resembles HTML nodes = curCell.textContent.match( /<\/?[a-zA-Z]{1}\w*[^>]*>/g ); if( nodes && nodes.length ){ //this text does resemble HTML, use the textContent as HTML and that will convert the text to HTML content. curCell.innerHTML = curCell.textContent; } } } } } } } } function applyRedline( url ) { if (isRedline) { return url + "&redline=true"; } else { return url; } } window.onload = function () { if (window.location.href.substring(0,5)=='file:') { ableToOpenReportFiles = 0; try {$.ajax({type: "GET",url: reports[1],dataType: "text",async:false, success: function (data) { if (data != 0) ableToOpenReportFiles = 1; }}); } catch (err) {} if (ableToOpenReportFiles == 0) { alert("In this browser environment, opening the url\n" +window.location.href +"\nprevents individual report files such as " +reports[1]+" from opening.");}} loadReport(1); }