window.onload=LoadPage; window.onunload=Window_Unload; //window.onresize=ResizeWindow; window.onbeforeprint = set_to_print; window.onafterprint = reset_form; var languageFilter; var data; var tf; var mf; var lang = 'CSharp'; var vbDeclaration; var vbUsage; var csLang; var cLang; var jsharpLang; var jsLang; var xamlLang; var scrollPos = 0; var inheritedMembers; var protectedMembers; var netcfMembersOnly; var netXnaMembersOnly; // Initialize array of section states var sectionStates = new Array(); var sectionStatesInitialized = false; //Hide sample source in select element function HideSelect() { var selectTags = document.getElementsByTagName("SELECT"); var spanEles = document.getElementsByTagName("span"); var i = 10; var m; if (selectTags.length != null || selectTags.length >0) { for (n=0; n0) { for (n=0; n node ids begin with "sectionToggle", so the same id can refer to different sections in different topics // we don't want to persist their state; set it to expanded if (itemId.indexOf("sectionToggle", 0) == 0) return "e"; // the default state for new section ids is expanded if (sectionStates[itemId] == null) return "e"; // otherwise, persist the passed in state return sectionStates[itemId]; } var noReentry = false; function OnLoadImage(eventObj) { if (noReentry) return; if (!sectionStatesInitialized) InitSectionStates(); var elem; if(document.all) elem = eventObj.srcElement; else elem = eventObj.target; if ((sectionStates[elem.id] == "e")) ExpandSection(elem); else if((sectionStates[elem.id] == "c")) CollapseSection(elem); } /* ********** ********** Begin ********** */ function LoadPage() { // If not initialized, grab the DTE.Globals object if (globals == null) globals = GetGlobals(); // show correct language LoadLanguages(); LoadMembersOptions(); Set_up_checkboxes(); DisplayLanguages(); DisplayFilteredMembers(); ChangeMembersOptionsFilterLabel(); if (!sectionStatesInitialized) InitSectionStates(); var imgElements = document.getElementsByName("toggleSwitch"); for (i = 0; i < imgElements.length; i++) { if ((sectionStates[imgElements[i].id] == "e")) ExpandSection(imgElements[i]); else CollapseSection(imgElements[i]); } SetCollapseAll(); // ResizeWindow(); // split screen var screen = new SplitScreen('header', 'mainSection'); // filtering dropdowns if (document.getElementById('languageSpan') != null) { var languageMenu = new Dropdown('languageFilterToolTip', 'languageSpan'); languageFilter = new Selector('languageSpan'); languageFilter.register(codeBlockHandler); languageFilter.register(styleSheetHandler); languageFilter.register(persistenceHandler); languageFilter.register(languageHandler); toggleLanguage('languageSpan', 'x-lang', 'CSharp'); toggleInlineStyle('cs'); } if (document.getElementById('membersOptionsFilterToolTip') != null) { var languageMenu = new Dropdown('membersOptionsFilterToolTip', 'membersOptionsSpan'); } data = new DataStore('docs'); registerEventHandler(window, 'load', function() {if (languageFilter != null) languageFilter.select(data)}); // process tab behavior for syntax, snippets, type and member sections tf = new TypeFilter(); mf = new MemberFilter(); setUpSyntax(); setUpSnippets(); setUpType(); setUpAllMembers(); var mainSection = document.getElementById("mainSection"); // vs70.js did this to allow up/down arrow scrolling, I think try { mainSection.setActive(); } catch(e) { } //set the scroll position try{mainSection.scrollTop = scrollPos;} catch(e){} } function Window_Unload() { SaveLanguages(); SaveMembersOptions(); SaveSections(); } /* function ResizeWindow() { if (document.body.clientWidth==0) return; var header = document.all.item("header"); var mainSection = document.all.item("mainSection"); if (mainSection == null) return; document.body.scroll = "no" mainSection.style.overflow= "auto"; header.style.width= document.body.offsetWidth - 2; //mainSection.style.paddingRight = "20px"; // Width issue code mainSection.style.width= document.body.offsetWidth - 2; mainSection.style.top=0; if (document.body.offsetHeight > header.offsetHeight + 10) mainSection.style.height= document.body.offsetHeight - (header.offsetHeight + 2); else mainSection.style.height=0; try { mainSection.setActive(); } catch(e) { } } */ function set_to_print() { //breaks out of divs to print var i; if (window.text)document.all.text.style.height = "auto"; for (i=0; i < document.all.length; i++) { if (document.all[i].tagName == "body") { document.all[i].scroll = "yes"; } if (document.all[i].id == "header") { document.all[i].style.margin = "0px 0px 0px 0px"; document.all[i].style.width = "100%"; } if (document.all[i].id == "mainSection") { document.all[i].style.overflow = "visible"; document.all[i].style.top = "5px"; document.all[i].style.width = "100%"; document.all[i].style.padding = "0px 10px 0px 30px"; } } } function reset_form() { //returns to the div nonscrolling region after print document.location.reload(); } function Set_up_checkboxes() { var checkbox; checkbox = document.getElementById("vbDeclarationCheckbox"); if(checkbox != null) { if(vbDeclaration == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("vbUsageCheckbox"); if(checkbox != null) { if(vbUsage == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("csCheckbox"); if(checkbox != null) { if(csLang == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("cCheckbox"); if(checkbox != null) { if(cLang == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("jsharpCheckbox"); if(checkbox != null) { if(jsharpLang == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("jsCheckbox"); if(checkbox != null) { if(jsLang == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("xamlCheckbox"); if(checkbox != null) { if(xamlLang == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("inheritedCheckbox"); if(checkbox != null) { if(inheritedMembers == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("protectedCheckbox"); if(checkbox != null) { if(protectedMembers == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("netcfCheckbox"); if(checkbox != null) { if(netcfMembersOnly == "on") checkbox.checked = true; else checkbox.checked = false; } checkbox = document.getElementById("netXnaCheckbox"); if(checkbox != null) { if(netXnaMembersOnly == "on") checkbox.checked = true; else checkbox.checked = false; } } /* ********** ********** End ********** */ /* ********** ********** Begin Language Filtering ********** */ function SetLanguage(key) { var i = 0; if(vbDeclaration == "on") i++; if(vbUsage == "on") i++; if(csLang == "on") i++; if(cLang == "on") i++; if(jsharpLang == "on") i++; if(jsLang == "on") i++; if(xamlLang == "on") i++; if(key.id == "vbDeclarationCheckbox") { if(vbDeclaration == "on") { if(i == 1) { key.checked = true; return; } vbDeclaration = "off"; } else vbDeclaration = "on"; } if(key.id == "vbUsageCheckbox") { if(vbUsage == "on") { if(i == 1) { key.checked = true; return; } vbUsage = "off"; } else vbUsage = "on"; } if(key.id == "csCheckbox") { if(csLang == "on") { if(i == 1) { key.checked = true; return; } csLang = "off"; } else csLang = "on"; } if(key.id == "cCheckbox") { if(cLang == "on") { if(i == 1) { key.checked = true; return; } cLang = "off"; } else cLang = "on"; } if(key.id == "jsharpCheckbox") { if(jsharpLang == "on") { if(i == 1) { key.checked = true; return; } jsharpLang = "off"; } else jsharpLang = "on"; } if(key.id == "jsCheckbox") { if(jsLang == "on") { if(i == 1) { key.checked = true; return; } jsLang = "off"; } else jsLang = "on"; } if(key.id == "xamlCheckbox") { if(xamlLang == "on") { if(i == 1) { key.checked = true; return; } xamlLang = "off"; } else xamlLang = "on"; } DisplayLanguages(); } function DisplayLanguages() { var spanElements = document.getElementsByTagName("span"); var x = 0; if(vbDeclaration == "on") x++; if(vbUsage == "on") x++; if(csLang == "on") x++; if(cLang == "on") x++; if(jsharpLang == "on") x++; if(jsLang == "on") x++; if(xamlLang == "on") x++; var i; for(i = 0; i < spanElements.length; ++i) { if(spanElements[i].getAttribute("codeLanguage") != null) { if(spanElements[i].getAttribute("codeLanguage") == "VisualBasic") { if(vbDeclaration == "on" || vbUsage == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "VisualBasicDeclaration") { if(vbDeclaration == "on") spanElements[i].style.display = ""; else{ spanElements[i].style.display = "none"; } } if(spanElements[i].getAttribute("codeLanguage") == "VisualBasicUsage") { if(vbUsage == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "CSharp") { if(csLang == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "ManagedCPlusPlus") { if(cLang == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "JSharp") { if(jsharpLang == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "JScript") { if(jsLang == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "XAML") { if(xamlLang == "on") spanElements[i].style.display = ""; else spanElements[i].style.display = "none"; } if(spanElements[i].getAttribute("codeLanguage") == "NotVisualBasicUsage") { if((x == 1) && (vbUsage == "on")) { spanElements[i].style.display = "none"; } else { spanElements[i].style.display = ""; } } } } ChangeLanguageFilterLabel(); } function ChangeLanguageFilterLabel() { var i = 0; if(vbDeclaration == "on") i++; if(vbUsage == "on") i++; if(csLang == "on") i++; if(cLang == "on") i++; if(jsharpLang == "on") i++; if(jsLang == "on") i++; if(xamlLang == "on") i++; var labelElement; labelElement = document.getElementById("showAllLabel"); if(labelElement == null) return; labelElement.style.display = "none"; labelElement = document.getElementById("multipleLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("vbLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("csLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("cLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("jsharpLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("jsLabel"); labelElement.style.display = "none"; labelElement = document.getElementById("xamlLabel"); labelElement.style.display = "none"; if(i == 7) { labelElement = document.getElementById("showAllLabel"); labelElement.style.display = "inline"; } else if ((i > 1) && (i < 7)) { if((i == 2) && ((vbDeclaration == "on") && (vbUsage == "on"))) { labelElement = document.getElementById("vbLabel"); labelElement.style.display = "inline"; } else { labelElement = document.getElementById("multipleLabel"); labelElement.style.display = "inline"; } } else if (i == 1) { if(vbDeclaration == "on" || vbUsage == "on") { labelElement = document.getElementById("vbLabel"); labelElement.style.display = "inline"; } if(csLang == "on") { labelElement = document.getElementById("csLabel"); labelElement.style.display = "inline"; } if(cLang == "on") { labelElement = document.getElementById("cLabel"); labelElement.style.display = "inline"; } if(jsharpLang == "on") { labelElement = document.getElementById("jsharpLabel"); labelElement.style.display = "inline"; } if(jsLang == "on") { labelElement = document.getElementById("jsLabel"); labelElement.style.display = "inline"; } if(xamlLang == "on") { labelElement = document.getElementById("xamlLabel"); labelElement.style.display = "inline"; } } } function LoadLanguages() { var value; value = Load("vbDeclaration"); if(value == null) vbDeclaration = "on"; else vbDeclaration = value; value = Load("vbUsage"); if(value == null) vbUsage = "on"; else vbUsage = value; value = Load("csLang"); if(value == null) csLang = "on"; else csLang = value; value = Load("cLang"); if(value == null) cLang = "on"; else cLang = value; value = Load("jsharpLang"); if(value == null) jsharpLang = "on"; else jsharpLang = value; value = Load("jsLang"); if(value == null) jsLang = "on"; else jsLang = value; value = Load("xamlLang"); if(value == null) xamlLang = "on"; else xamlLang = value; } function SaveLanguages() { Save("vbDeclaration", vbDeclaration); Save("vbUsage", vbUsage); Save("csLang", csLang); Save("cLang", cLang); Save("jsharpLang", jsharpLang); Save("jsLang", jsLang); Save("xamlLang", xamlLang); } /* ********** ********** End Language Filtering ********** */ /* ********** ********** Begin Members Options Filtering ********** */ function SetMembersOptions(key) { if(key.id == "inheritedCheckbox") { if(key.checked == true) inheritedMembers = "on"; else inheritedMembers = "off"; } if(key.id == "protectedCheckbox") { if(key.checked == true) protectedMembers = "on"; else protectedMembers = "off"; } if(key.id == "netcfCheckbox") { if(key.checked == true) netcfMembersOnly = "on"; else netcfMembersOnly = "off"; } if(key.id == "netXnaCheckbox") { if(key.checked == true) netXnaMembersOnly = "on"; else netXnaMembersOnly = "off"; } DisplayFilteredMembers(); ChangeMembersOptionsFilterLabel(); } function DisplayFilteredMembers() { var iAllMembers = document.getElementsByTagName("tr"); var i; for(i = 0; i < iAllMembers.length; ++i) { if (((iAllMembers[i].getAttribute("protected") == "true") && (protectedMembers == "off")) || ((iAllMembers[i].notSupportedOnXna == "true") && (netXnaMembersOnly == "on")) || ((iAllMembers[i].getAttribute("name") == "inheritedMember") && (inheritedMembers == "off")) || ((iAllMembers[i].getAttribute("notSupportedOn") == "netcf") && (netcfMembersOnly == "on"))) iAllMembers[i].style.display = "none"; else iAllMembers[i].style.display = ""; } } function ChangeMembersOptionsFilterLabel() { var showAllMembersLabelElement = document.getElementById("showAllMembersLabel"); var filteredMembersLabelElement = document.getElementById("filteredMembersLabel"); if(showAllMembersLabelElement == null || filteredMembersLabelElement == null) return; if ((inheritedMembers=="off") || (protectedMembers=="off") || (netXnaMembersOnly == "on") || (netcfMembersOnly=="on")) { filteredMembersLabelElement.style.display = "inline"; showAllMembersLabelElement.style.display = "none"; } else { filteredMembersLabelElement.style.display = "none"; showAllMembersLabelElement.style.display = "inline"; } } function LoadMembersOptions() { var value; value = Load("inheritedMembers"); if(value == null) inheritedMembers = "on"; else inheritedMembers = value; value = Load("protectedMembers"); if(value == null) protectedMembers = "on"; else protectedMembers = value; value = Load("netcfMembersOnly"); if(value == null) netcfMembersOnly = "off"; else netcfMembersOnly = value; value = Load("netXnaMembersOnly"); if(value == null) netXnaMembersOnly = "off"; else netXnaMembersOnly = value; } function SaveMembersOptions() { Save("inheritedMembers", inheritedMembers); Save("protectedMembers", protectedMembers); Save("netcfMembersOnly", netcfMembersOnly); Save("netXnaMembersOnly", netXnaMembersOnly); } /* ********** ********** End Members Options Filtering ********** */ /* ********** ********** Begin Expand/Collapse ********** */ // expand or collapse a section function ExpandCollapse(imageItem) { if (sectionStates[imageItem.id] == "e") CollapseSection(imageItem); else ExpandSection(imageItem); SetCollapseAll(); } // expand or collapse all sections function ExpandCollapseAll(imageItem) { var collapseAllImage = document.getElementById("collapseAllImage"); var expandAllImage = document.getElementById("expandAllImage"); if (imageItem == null || collapseAllImage == null || expandAllImage == null) return; noReentry = true; // Prevent entry to OnLoadImage var imgElements = document.getElementsByName("toggleSwitch"); var i; var collapseAll = (imageItem.src == collapseAllImage.src); if (collapseAll) { imageItem.src = expandAllImage.src; imageItem.alt = expandAllImage.alt; for (i = 0; i < imgElements.length; ++i) { CollapseSection(imgElements[i]); } } else { imageItem.src = collapseAllImage.src; imageItem.alt = collapseAllImage.alt; for (i = 0; i < imgElements.length; ++i) { ExpandSection(imgElements[i]); } } SetAllSectionStates(collapseAll); SetToggleAllLabel(collapseAll); noReentry = false; } function ExpandCollapse_CheckKey(imageItem, eventObj) { if(eventObj.keyCode == 13) ExpandCollapse(imageItem); } function ExpandCollapseAll_CheckKey(imageItem, eventObj) { if(eventObj.keyCode == 13) ExpandCollapseAll(imageItem); } function SetAllSectionStates(collapsed) { for (var sectionId in sectionStates) sectionStates[sectionId] = (collapsed) ? "c" : "e"; } function ExpandSection(imageItem) { noReentry = true; // Prevent re-entry to OnLoadImage try { var collapseImage = document.getElementById("collapseImage"); imageItem.src = collapseImage.src; imageItem.alt = collapseImage.alt; imageItem.parentNode.parentNode.nextSibling.style.display = ""; sectionStates[imageItem.id] = "e"; } catch (e) { } noReentry = false; } function CollapseSection(imageItem) { noReentry = true; // Prevent re-entry to OnLoadImage var expandImage = document.getElementById("expandImage"); imageItem.src = expandImage.src; imageItem.alt = expandImage.alt; imageItem.parentNode.parentNode.nextSibling.style.display = "none"; sectionStates[imageItem.id] = "c"; noReentry = false; } function AllCollapsed() { var imgElements = document.getElementsByName("toggleSwitch"); var allCollapsed = true; var i; for (i = 0; i < imgElements.length; i++) allCollapsed = allCollapsed && (sectionStates[imgElements[i].id] == "c"); return allCollapsed; } function SetCollapseAll() { var imageElement = document.getElementById("toggleAllImage"); if (imageElement == null) return; var allCollapsed = AllCollapsed(); if (allCollapsed) { var expandAllImage = document.getElementById("expandAllImage"); if (expandAllImage == null) return; imageElement.src = expandAllImage.src; imageElement.alt = expandAllImage.alt; } else { var collapseAllImage = document.getElementById("collapseAllImage"); if (collapseAllImage == null) return; imageElement.src = collapseAllImage.src; imageElement.alt = collapseAllImage.alt; } SetToggleAllLabel(allCollapsed); } function SetToggleAllLabel(allCollapsed) { var collapseLabelElement = document.getElementById("collapseAllLabel"); var expandLabelElement = document.getElementById("expandAllLabel"); if (collapseLabelElement == null || expandLabelElement == null) return; if (allCollapsed) { collapseLabelElement.style.display = "none"; expandLabelElement.style.display = "inline"; } else { collapseLabelElement.style.display = "inline"; expandLabelElement.style.display = "none"; } } function SaveSections() { try { var states = ""; for (var sectionId in sectionStates) states += sectionId + ":" + sectionStates[sectionId] + ";"; Save("SectionStates", states.substring(0, states.length - 1)); } catch (e) { } } function OpenSection(imageItem) { if (sectionStates[imageItem.id] == "c") ExpandCollapse(imageItem); } /* ********** ********** End Expand/Collapse ********** */ /* ********** ********** Begin Copy Code ********** */ function CopyCode(key) { var trElements = document.getElementsByTagName("tr"); var i; for(i = 0; i < trElements.length; ++i) { if(key.parentNode.parentNode.parentNode == trElements[i].parentNode) { if (window.clipboardData) { // the IE-manner window.clipboardData.setData("Text", trElements[i].innerText); } else if (window.netscape) { // Gives unrestricted access to browser APIs using XPConnect try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch(e) { alert("Universal Connect was refused, cannot copy to " + "clipboard. Go to about:config and set " + "signed.applets.codebase_principal_support to true to " + "enable clipboard support."); return; } // Creates an instance of nsIClipboard var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return; // Creates an instance of nsITransferable var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); if (!trans) return; // register the data flavor trans.addDataFlavor('text/unicode'); // Create object to hold the data var str = new Object(); // Creates an instance of nsISupportsString var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); //Assigns the data to be copied var copytext = trElements[i].textContent; str.data = copytext; // Add data objects to transferable trans.setTransferData("text/unicode",str,copytext.length*2); var clipid = Components.interfaces.nsIClipboard; if (!clip) return false; // Transfer the data to clipboard clip.setData(trans,null,clipid.kGlobalClipboard); } } } } function ChangeCopyCodeIcon(key) { var i; var imageElements = document.getElementsByName("ccImage") for(i=0; i=5){ document.body.addBehavior(gsContextMenuPath); document.body.onbehaviorready="fnSetMenus()"; document.body.oncontextopen="clearDef()"; } } // Called by showDef. The showDef function sniffs for initialization. function openDialog(oNode,x,y){ var bStatus=oDialog.dlg_status; // BUGBUG: This code assumes that oDialog has been initialized if(bStatus==false){ oDialog.dlg_status=true; oDialog.style.display="block"; } else{ if(typeof(oTimeout)=="number"){ window.clearTimeout(oTimeout); } } var sTerm=oNode.getAttribute("G_RID"); var oDef=oNode.children(0); var sDef=oDef.text; sDef=sDef.substr(4,sDef.length-7); //Strips the html comment markers from the definition. oDialog.innerHTML=sDef //oDialog.innerHTML=g_glossary[sTerm]; var iScrollLeft=document.body.scrollLeft; var iScrollTop=document.body.scrollTop; var iOffsetLeft=getAbsoluteLeft(oNode)// - iScrollLeft; var iOffsetWidth=oNode.offsetWidth; var oParent=oNode.parentNode; var iOffsetParentLeft=getAbsoluteLeft(oParent); var iOffsetTop=getAbsoluteTop(oNode); //- iScrollTop; var iOffsetDialogWidth=oDialog.offsetWidth; if((iOffsetLeft + iOffsetWidth) > (iOffsetParentLeft + oParent.offsetWidth)){ iOffsetLeft=iOffsetParentLeft; if(iOffsetLeft - iOffsetDialogWidth>0){ iOffsetTop+=oNode.offsetHeight; } } var iLeft=0; var iTop=0; if((iOffsetLeft + iOffsetWidth - iScrollLeft + iOffsetDialogWidth) < document.body.offsetWidth ){ iLeft=iOffsetLeft + iOffsetWidth; } else{ if(iOffsetLeft - iOffsetDialogWidth>0){ iLeft=iOffsetLeft - iOffsetDialogWidth; } else{ iLeft=iOffsetParentLeft; } } if(iOffsetTop - iScrollTop"); oNewDialog=document.body.children(document.body.children.length-1); oNewDialog.className="clsTooltip"; oNewDialog.style.width=iWidth; oNewDialog.dlg_status=false; return oNewDialog; } function sendfeedback(subject, id,alias){ var rExp = /\"/gi; var url = location.href; // Need to replace the double quotes with single quotes for the mailto to work. var rExpSingleQuotes = /\'\'"/gi; var title; if(document.getElementsByTagName("TITLE")[0].innerText) title = document.getElementsByTagName("TITLE")[0].innerText.replace(rExp, "''") else title = document.getElementsByTagName("TITLE")[0].textContent.replace(rExp, "''"); location.href = "mailto:" + alias + "?subject=" + subject + title + "&body=Topic%20ID:%20" + id + "%0d%0aURL:%20" + url + "%0d%0a%0d%0aComments:%20"; } function setUpSyntax() { var syntaxSection = document.getElementById('syntaxCodeBlocks'); if (syntaxSection == null) return; processSection(syntaxSection, 'x-lang', lang, true, true, true, true); } function setUpSnippets() { var divs = document.getElementsByTagName("DIV"); for (var i = 0; i < divs.length; i++) { var name = divs[i].getAttribute("name"); if (name == null || name != "snippetGroup") continue; processSection(divs[i], 'x-lang', lang, true, true, true, true); } } function setUpType() { var typeSection = document.getElementById("typeSection"); if (typeSection == null) return; processSection(typeSection, 'value', 'all', true, false, true, false); } function setUpAllMembers() { var allMembersSection = document.getElementById("allMembersSection"); if (allMembersSection == null) return; processSection(allMembersSection, 'value', 'all', true, false, true, false); } function processSection(section, attribute, value, toggleClassValue, toggleStyleValue, curvedToggleClassValue, registerValue) { var nodes = section.childNodes; var curvedTabId; var tabId; var blockId; if (nodes.length != 2) return; if (nodes[0].tagName == 'TABLE') { var rows = nodes[0].getElementsByTagName('tr'); if (rows.length != 2) return; curvedTabId = rows[0].getAttribute('id'); tabId = rows[1].getAttribute('id'); } if(nodes[1].tagName == 'DIV') { blockId = nodes[1].getAttribute('id'); } if (toggleClassValue) toggleClass(tabId,attribute,value,'activeTab','tab'); if (toggleStyleValue) toggleStyle(blockId,attribute,value,'display','block','none'); if (curvedToggleClassValue) curvedToggleClass(curvedTabId, attribute, value); if (languageFilter == null) return; if (registerValue) languageFilter.registerTabbedArea(curvedTabId, tabId, blockId); }