
tabControl=function(tabCtrl,index,hSize){this.selectedTab=null;this.selectedPanel=null;this.init(tabCtrl,index,hSize);};tabControl.prototype.init=function(tabCtrl,index,hSize){if(location.search.length>1){return;}
var tabLinks=null;var panels=[];var child=document.getElementById(tabCtrl).firstChild;var isFirst=true;while(child){if(child.nodeType===1){if(isFirst){child.className="tabIndex";tabLinks=child.getElementsByTagName("a");isFirst=false;}else{panels.push(child);}}
child=child.nextSibling;}
var numTabbedPanels=Math.max(tabLinks.length,panels.length);if(!(typeof(index)==="number"&&index<numTabbedPanels)){index=Math.floor(Math.random()*numTabbedPanels);}
if(!(typeof(hSize)==="string"&&hSize.toLowerCase()==="h2")){hSize="h3";}
var currPanel,heading;for(var i=0;i<numTabbedPanels;i++){if(tabLinks[i]&&panels[i]){currPanel=panels[i];tabLinks[i].panel=currPanel;currPanel.tab=tabLinks[i];currPanel.tabCtrl=this;currPanel.isPanel=true;tabLinks[i].onclick=this.clickListener;currPanel.style.display="none";if(heading=currPanel.getElementsByTagName(hSize)[0]){heading.className="hidden";}}else{alert("On "+tabCtrl+" the number of tabs and panels differ... they need to match");break;}}
if(location.hash.length>1){var element=document.getElementById(location.hash.substring(1));while(element){if(element.isPanel){this.show(element);return;}
element=element.parentNode;}}else{this.show(panels[index]);}};tabControl.prototype.show=function(tabPanel){if(tabPanel!==this.selectedPanel){Core.addClass(tabPanel.tab,"selected");tabPanel.style.display="block";if(this.selectedTab){Core.removeClass(this.selectedTab,"selected");this.selectedPanel.style.display="none";}
this.selectedTab=tabPanel.tab;this.selectedPanel=tabPanel;}};tabControl.prototype.clickListener=function(){this.panel.tabCtrl.show(this.panel);return false;};Slider=function(slider,controller,index){this.allSlides=[];this.currSlide=index;this.lastIndex=0;this.init(slider,controller);};Slider.prototype.init=function(slider,controller){if(location.search.length>1){return;}
var allChildren=document.getElementById(slider).childNodes;for(var i=0,j=allChildren.length;i<j;i++){if(allChildren[i].nodeType===1){allChildren[i].style.display="none";this.allSlides[this.allSlides.length]=allChildren[i];}}
this.lastIndex=this.allSlides.length-1;if(!(typeof(this.currSlide)==="number"&&this.currSlide<=this.lastIndex)){this.currSlide=Math.floor(Math.random()*(this.lastIndex+1));}
this.allSlides[this.currSlide].style.display="block";var holder=document.createElement("p");var status=document.createElement("span");var statusText=document.createTextNode((this.currSlide+1)+" of "+(this.lastIndex+1));status.appendChild(statusText);var prevButt=document.createElement("BUTTON");prevButt.appendChild(document.createTextNode("Prev"));prevButt.mySlider=this;prevButt.statusText=statusText;prevButt.onclick=this.prev;var nextButt=document.createElement("BUTTON");nextButt.appendChild(document.createTextNode("Next"));nextButt.mySlider=this;nextButt.statusText=statusText;nextButt.onclick=this.next;holder.appendChild(status);holder.appendChild(prevButt);holder.appendChild(nextButt);var slideCtr=document.getElementById(controller);(slideCtr.className==="")?slideCtr.className="slideControls":slideCtr.className+=" "+"slideControls";slideCtr.appendChild(holder);};Slider.prototype.next=function(){var thisSlider=this.mySlider;if(thisSlider.currSlide<thisSlider.lastIndex){thisSlider.allSlides[thisSlider.currSlide].style.display="none";thisSlider.allSlides[++thisSlider.currSlide].style.display="block";}else{thisSlider.allSlides[thisSlider.currSlide].style.display="none";thisSlider.currSlide=0;thisSlider.allSlides[thisSlider.currSlide].style.display="block";}
this.statusText.nodeValue=(thisSlider.currSlide+1)+" of "+(thisSlider.lastIndex+1);};Slider.prototype.prev=function(){var thisSlider=this.mySlider;if(thisSlider.currSlide>0){thisSlider.allSlides[thisSlider.currSlide].style.display="none";thisSlider.allSlides[--thisSlider.currSlide].style.display="block";}else{thisSlider.allSlides[thisSlider.currSlide].style.display="none";thisSlider.currSlide=thisSlider.lastIndex;thisSlider.allSlides[thisSlider.lastIndex].style.display="block";}
this.statusText.nodeValue=(thisSlider.currSlide+1)+" of "+(thisSlider.lastIndex+1);};Accordion=function(accord){var pic1=new Image(20,20);pic1.src="/images/minus.gif";this.expandedPanel=null;this.expandAfterPanel=null;this.init(accord);};Accordion.prototype.init=function(accord){if(location.search.length>1){return;}
var thisAccord=document.getElementById(accord);var children=thisAccord.childNodes;var panel;for(var i=0;children[i];i++)
{if(children[i].nodeType===1){panel=children[i];panel._thisAccord=this;var panelLinks=panel.getElementsByTagName("a");var title=panelLinks[0].parentNode;Core.addClass(title,"accPanTitle");panel._title=title;panel._titleLink=panelLinks[0];panel._titleLink.onclick=this.clickListener;for(var j=1;panelLinks[j];j++)
{panelLinks[j].onfocus=this.focusListener;}
var fold=panel.getElementsByTagName("div")[0];if(fold){Core.addClass(fold,"accPanFold");fold._height=fold.offsetHeight;panel._fold=fold;Core.addClass(panel,"collapsed");}}}
if(location.hash.length>1){var selectedPanel=document.getElementById(location.hash.substring(1));if(selectedPanel&&selectedPanel.parentNode===thisAccord){this.expand(selectedPanel);}}};Accordion.prototype.collapse=function(panel){this.expandedPanel=null;var content=panel._fold;content._step=0;clearTimeout(content._timer);this.collapseAnimate(content);};Accordion.prototype.collapseAnimate=function(content){if(content._step>100){var panel=content.parentNode;Core.removeClass(panel._title,"selected");Core.addClass(panel,"collapsed");if(this.expandAfterPanel){this.expandStart(this.expandAfterPanel);}}else{content._timer=setTimeout(function(){content.parentNode._thisAccord.collapseAnimate(content);},10);}
var stepFactor=1-content._step/100;content.style.height=(stepFactor*content._height)+"px";content.style.opacity=stepFactor;content._step+=5;};Accordion.prototype.expand=function(panel){if(this.expandedPanel){this.expandAfterPanel=panel;this.collapse(this.expandedPanel);}
else if(panel!==this.expandedPanel){this.expandStart(panel);}};Accordion.prototype.expandStart=function(panel){this.expandAfterPanel=null;this.expandedPanel=panel;Core.removeClass(panel,"collapsed");Core.addClass(panel._title,"selected");var content=panel._fold;clearTimeout(content._timer);content._step=0;content.style.opacity=1;this.expandAnimate(content);};Accordion.prototype.expandAnimate=function(content){if(content._step<=100){content._timer=setTimeout(function(){content.parentNode._thisAccord.expandAnimate(content);},10);content.style.height=((content._step/100)*content._height)+"px";content._step+=5;content.scrollTop=0;}else{content.style.height=content.scrollHeight+"px";}};Accordion.prototype.clickListener=function(){var panel=this.parentNode.parentNode;if(panel!==panel._thisAccord.expandedPanel){panel._thisAccord.expand(panel);}else{panel._thisAccord.collapse(panel);}
return false;};Accordion.prototype.focusListener=function(){var element=this;while(element.parentNode){if(element._thisAccord&&(element!==element._thisAccord.expandedPanel)){element._thisAccord.expand(element);return;}
element=element.parentNode;}};var Directory={init:function(){var index=document.getElementById("index");var indexTabs=index.getElementsByTagName("a");var curTab,listing,entries,title,p,total=0;for(var i=0,j=indexTabs.length;i<j;i++)
{curTab=indexTabs[i];listing=document.getElementById(curTab.hash.substring(1));if(listing){do{listing=listing.nextSibling;}while(listing&&listing.nodeType!==1);entries=listing.getElementsByTagName("dt").length;title=entries+((entries===1)?" entry":" entries");p=document.createElement("p");p.appendChild(document.createTextNode(title));listing.parentNode.insertBefore(p,listing);total+=entries;}else{title="0 entries";Core.addClass(curTab,"inactive");}
curTab.setAttribute("title",title);}
var t=document.createTextNode(" The listing has "+total+((total==1)?" entry in total.":" entries in total."));do{index=index.previousSibling;}while(index&&index.nodeType!==1);index.appendChild(t);}};