varstrgURL=location.pathname;// path of current component// constuctor for the array of objectsfunctiontabElement(id,folderName,tabTxt){this.id=id;// elementID as needed in html; this.folderName=folderName;// folder name of the component this.tabTxt=tabTxt;// Text displayed as menu on the webthis.currentListItem='<li id="'+this.id+'" class="current"> <a href="../..'+this.folderName+'index.html"><span>'+this.tabTxt+'</span></a></li>';this.listItem='<li id="'+this.id+'"> <a href="../..'+this.folderName+'index.html"><span>'+this.tabTxt+'</span></a></li>';};// array of objectsvararr=[];// fill arrayarr.push(newtabElement("GEN","/General/html/","General"));arr.push(newtabElement("CORE","/Core/html/","Core"));arr.push(newtabElement("DRV","/Driver/html/","Driver"));arr.push(newtabElement("DSP","/DSP/html/","DSP"));arr.push(newtabElement("RTOSv1","/RTOS/html/","RTOS v1"));arr.push(newtabElement("RTOSv2","/RTOS2/html/","RTOS v2"));// arr.push( new tabElement( "RTX", "/RTX/html/", "RTX") );arr.push(newtabElement("PACK","/Pack/html/","Pack"));arr.push(newtabElement("SVD","/SVD/html/","SVD"));arr.push(newtabElement("DAP","/DAP/html/","DAP"));// write tabs// called from the header file.functionwriteComponentTabs(){for(vari=0;i<arr.length;i++){if(strgURL.search(arr[i].folderName)>0){// if this is the current folderdocument.write(arr[i].currentListItem);// then print and hightlight the tab}else{document.write(arr[i].listItem);// else, print the tab}}};