var size = 70; ms._autoValidation = true; function generatenavigation() { var i = 0; var indexoftables = ""; document.querySelectorAll("h2, h3").forEach(function(d) { i++; d.id = "heading-" + i; indexoftables += '' + d.textContent + "
\n"; }); document.getElementById("indexoftables").innerHTML = indexoftables; i = 0; var indexoffigures = ""; document.querySelectorAll("figure").forEach(function(d) { i++; d.id = "figure-" + i; d = d.getElementsByTagName("figcaption").item(0); indexoffigures += '' + d.textContent + "
\n"; }); document.getElementById("indexoffigures").innerHTML = indexoffigures; } function remarks(remark) { if (remark == "Wrong SIDC in standard") return { monoColor: "Red" }; if (["N/A"].indexOf(remark) != -1) { return { monoColor: "Silver" }; } else { return {}; } } function labels(icon) { if (icon.hierarchy.split(".")[0] == "TACGRP") { return { infoColor: "Silver", additionalInformation: "H", additionalInformation1: "H1", hostile: "N", uniqueDesignation: "T", dtg: "W", dtg1: "W1", altitudeDepth: "X" }; } else { return {}; } } function renderSymbolSet(symbolset) { var output = ""; var i; output += "

" + symbolset.name + "

"; output += ""; output += ""; for (i = 0; i < symbolset.mainIcon.length; i++) { output += ""; for (var j = 0; j < symbolset.mainIcon[i].names.length; j++) { if (j == symbolset.mainIcon[i].names.length - 1) { output += "
" + symbolset.mainIcon[i].names[j] + ""; } else { if ( symbolset.mainIcon[i].names[j] && !( symbolset.mainIcon[i].hasOwnProperty("geometry") && symbolset.mainIcon[i].geometry != "POINT" ) ) output += "
" + symbolset.mainIcon[i].names[j] + ""; } } output += "
SIDC: " + symbolset.mainIcon[i]["codingscheme"] + "*" + symbolset.mainIcon[i]["battledimension"] + "*" + symbolset.mainIcon[i].functionid; if ( !( symbolset.mainIcon[i].hasOwnProperty("geometry") && symbolset.mainIcon[i].geometry != "POINT" ) ) { output += "
"; } else { output += ""; } output += ""; } output += "
DescriptionIconRemarks
" + new ms.Symbol( symbolset.mainIcon[i]["codingscheme"] + "F" + symbolset.mainIcon[i]["battledimension"] + "P" + symbolset.mainIcon[i].functionid, { size: size }, remarks(symbolset.mainIcon[i].remarks), labels(symbolset.mainIcon[i]) ).asSVG(); output += "" + symbolset.mainIcon[i].geometry; output += "" + (symbolset.mainIcon[i].remarks ? symbolset.mainIcon[i].remarks : "") + "
"; return output; }