function Section(name,toc,color){this.name=name;this.toc=toc;this.color=color;this.title=LocStr[Lang][name+"_title"];toc.section=this;if(AllSections[name]!=null)alert("Cannot create section: name "+name+" already exists");else{AllSections[name]=this;AllSectionsIndexed[AllSectionsIndexed.length]=this;}}function getNbLocSections(){var sectionIndex;var curSection;var nbLocSections=0;for(sectionIndex=0;sectionIndex<AllSectionsIndexed.length;sectionIndex++){curSection=AllSectionsIndexed[sectionIndex];if(curSection.title){nbLocSections++;}}return nbLocSections;}function getTabsImageWidth(){return((getNbLocSections()-2)*78+176);}function getSectionLinkCode(node,sctName,remember){var homePath;var defaultNodeName;var code;homePath=getRelPathHome(node.url);if(remember)code="javascript:changeSection('"+sctName+"')";else{defaultNodeName=AllSections[sctName].toc.tree.defaultNodeName;code=homePath+AllNodes[defaultNodeName].url;}return code;}function getSectionsNavBarCode(node,remember,fext){var code="";var pos0Code;var backImgCode;var linkCode;var zoneEnd=getCodeLine(getZoneEnd(),fext);var homePath=getRelPathHome(node.url);var imagesPath=getRelPathImages(node.url);var title;var sectionName;var sectionIndex;var locSectionIndex=0;var curSection;var nbLocSections;var x1Value,x2Value,x3Value,x4Value;var tabsWidth;var totalWidth;var hrefCode;var helpLinkText;sectionName=node.tree.container.section.name;tabsWidth=getTabsImageWidth();code+=getCodeLine("<div class=\"searchToolbar\">",fext);code+=getCodeLine("<form method=\"get\" onsubmit=\"return siteSearch(this)\" action=\"\" target=\"_top\">",fext);code+=getCodeLine("<div class=\"searchSiteHeader\">"+LocStr[Lang]["_siteSearch"]+"</div>",fext);code+=getCodeLine("<input class=\"searchSiteField\" size=\"30\" name=\"sp_q\" />",fext);code+=getCodeLine("<input type=\"image\" class=\"searchSiteOKButton\" src=\""+imagesPath+"site_search_small.png\" />",fext);if(AllNodes[HelpNodeName].url){helpLinkText=LocStr[Lang]["_helpLink"];code+=getCodeLine("<a href=\""+homePath+AllNodes[HelpNodeName].url+"\"><img alt=\""+helpLinkText+"\" class=\"helpButton\" src=\""+imagesPath+"help.gif\" /></a>",fext);code+=getCodeLine("<a href=\""+homePath+AllNodes[HelpNodeName].url+"\" class=\"helpLink\">"+helpLinkText+"</a>",fext);}code+=getCodeLine("</form>",fext);code+=getCodeLine("</div>",fext);code+=getCodeLine("<!-- Background of horizontal bar -->",fext);pos0Code="position: absolute; left: 0px; top: 0px; ";backImgCode="background-image:url("+imagesPath+"nav_bar_v_background"+sectionName+".png)";code+=getCodeLine("<div style=\""+pos0Code+"width:100%; height:98px; background-color: white; "+backImgCode+"\">",fext);code+=getCodeLine("</div>",fext);code+=getCodeLine("<!-- Create a div with same background and fixed width to avoid refresh pb when scrolling horizontally -->",fext);totalWidth=149+14+tabsWidth+5+322;code+=getCodeLine("<div id=\"navbarFixedBackgroundZone\" style=\""+pos0Code+"width:"+totalWidth+"px; height: 98px; background-color: white; "+backImgCode+"\">",fext);code+=getCodeLine("</div>",fext);code+=getCodeLine("<div style=\"position:absolute; top:0px; left: "+MenuWidth+"px; height:93px;\">",fext);code+=getCodeLine("<map id=\"allSectionsMap\" name=\"tabs\">",fext);for(sectionIndex=0;sectionIndex<AllSectionsIndexed.length;sectionIndex++){curSection=AllSectionsIndexed[sectionIndex];if(curSection.title){x1Value=8+79*locSectionIndex;x2Value=32+79*locSectionIndex;x3Value=56+79*locSectionIndex;x4Value=81+79*locSectionIndex;linkCode=getSectionLinkCode(node,curSection.name,remember);code+=getCodeLine("<area alt=\"\" shape=\"poly\" coords=\""+x1Value+",26,"+x1Value+",11,"+x2Value+",0,"+x3Value+",0,"+x4Value+",11,"+x4Value+",26,"+x1Value+",26\" href=\""+linkCode+"\" />",fext);locSectionIndex++;}}code+=getCodeLine("</map>",fext);code+=getCodeLine(getZoneStartLeft(0,30,tabsWidth,27,2,"tabsImgZone"),fext);code+=getCodeLine("<img alt=\"\" width=\""+tabsWidth+"\" height=\"27\" name=\"tabsImg\" src=\""+imagesPath+Lang+"/nav_bar_tabs"+sectionName+".gif\" usemap=\"#tabs\" />",fext);code+=zoneEnd;code+=getCodeLine(getZoneStartLeft(tabsWidth+5,24,322,33,2,"borderImgZone"),fext);code+=getCodeLine("<img alt=\"\" name=\"borderImg\" src=\""+imagesPath+"nav_bar_border"+sectionName+".jpg\" />",fext);code+=zoneEnd;code+=getCodeLine(getZoneStartLeft(250,57,295,26,1),fext);code+=getCodeLine("<img alt=\"\" name=\"titleImg\" src=\""+imagesPath+"nav_bar_title"+sectionName+".gif\" />",fext);code+=zoneEnd;code+=getCodeLine("</div>",fext);return code;}
