
tabControl=function(tabCtrl,index,hSize){if(location.search.length>1){return;}
this.selectedTab=null;this.selectedPanel=null;this.start(tabCtrl,index,hSize);};tabControl.prototype.start=function(tabCtrl,index,hSize){var tabLinks=null;var panels=[];var child=document.getElementById(tabCtrl).firstChild;var isTabs=true;while(child){if(child.nodeType===1){if(isTabs){child.className="tabIndex";tabLinks=child.getElementsByTagName("a");isTabs=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;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.tab){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,objConfig){if(location.search.length>1){return;}
var config={ctrlClass:"slideControls",slideClass:"slides",index:"random"};if(arguments.length>1){Core.mergeProps(config,objConfig);}
this.allSlides=[];this.currSlide=config.index;this.lastIndex=0;this.start(slider,config);};Slider.prototype.start=function(slider,config){var thisSlider=document.getElementById(slider);(typeof config.slideClass==="string")?thisSlider.className=config.slideClass:thisSlider.className="slides";var allChildren=thisSlider.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";if(this.allSlides.length>1){var counterTxt=document.createElement("span");counterTxt.className="counterTxt";var counterNode=document.createTextNode(this.setCounterTxt());counterTxt.appendChild(counterNode);var prevBtn=document.createElement("a");prevBtn.appendChild(document.createTextNode(" Prev "));prevBtn.setAttribute("href","#");prevBtn.className="btnPrev";prevBtn.mySlider=this;prevBtn.counterNode=counterNode;prevBtn.onclick=this.prev;var nextBtn=document.createElement("a");nextBtn.appendChild(document.createTextNode(" Next"));nextBtn.setAttribute("href","#");nextBtn.className="btnNext";nextBtn.mySlider=this;nextBtn.counterNode=counterNode;nextBtn.onclick=this.next;var slideCtrl=document.createElement("DIV");slideCtrl.appendChild(counterTxt);slideCtrl.appendChild(prevBtn);slideCtrl.appendChild(nextBtn);(typeof config.ctrlClass==="string")?slideCtrl.className=config.ctrlClass:slideCtrl.className="slideControls";thisSlider.parentNode.insertBefore(slideCtrl,thisSlider);}};Slider.prototype.setCounterTxt=function(){return(this.currSlide+1)+" of "+(this.lastIndex+1);}
Slider.prototype.next=function(){var thisSlider=this.mySlider;thisSlider.allSlides[thisSlider.currSlide].style.display="none";if(thisSlider.currSlide<thisSlider.lastIndex){thisSlider.allSlides[++thisSlider.currSlide].style.display="block";}else{thisSlider.currSlide=0;thisSlider.allSlides[0].style.display="block";}
this.counterNode.nodeValue=thisSlider.setCounterTxt();};Slider.prototype.prev=function(){var thisSlider=this.mySlider;thisSlider.allSlides[thisSlider.currSlide].style.display="none";if(thisSlider.currSlide>0){thisSlider.allSlides[--thisSlider.currSlide].style.display="block";}else{thisSlider.currSlide=thisSlider.lastIndex;thisSlider.allSlides[thisSlider.lastIndex].style.display="block";}
this.counterNode.nodeValue=thisSlider.setCounterTxt();};Accordion=function(strAccordID,objConfig){var config={tExpand:300,tCollapse:0,buildOnSearch:false};if(arguments.length>1){Core.mergeProps(config,objConfig);}
if(location.search.length>1&&!config.buildOnSearch){return;}
var pic1=new Image(20,20);pic1.src="/images/minus.gif";this.tExpand=config.tExpand;this.tCollapse=config.tCollapse||config.tExpand*0.8;this.expandedFold=null;this.expandAfterFold=null;this.start(strAccordID);};Accordion.prototype.start=function(accord){var thisAccord=document.getElementById(accord);var children=thisAccord.childNodes;var panel,title,panelLinks,fold;for(var i=0;children[i];i++)
{if(children[i].nodeType===1){panel=children[i];panelLinks=panel.getElementsByTagName("a");title=panelLinks[0].parentNode;Core.addClass(title,"accPanTitle");fold=panel.getElementsByTagName("div")[0];if(fold){panel._fold=fold;fold._thisAccord=this;Core.addClass(fold,"accPanFold hidden");fold._title=title;fold._titleLink=panelLinks[0];fold._titleLink._fold=fold;fold._titleLink.onclick=this.clickListener;}
for(var j=1;panelLinks[j];j++)
{panelLinks[j].onfocus=this.focusListener;}}}
if(location.hash.length>1){var selectedPanel=document.getElementById(location.hash.substring(1));if(selectedPanel&&selectedPanel.parentNode===thisAccord){this.expand(selectedPanel._fold);}}};Accordion.prototype.collapse=function(fold,expandAfterFold){clearTimeout(fold._timer);this.expandedFold=null;this.expandAfterFold=expandAfterFold;this.collapseAnimate(fold);};Accordion.prototype.collapseAnimate=function(fold){var foldHeight=parseInt(fold.style.height);var duration=this.tCollapse;var freq=Math.PI/(2*duration);var ratio=0;var startTime=new Date().getTime();fold._timer=setInterval(function(){var elapsedTime=new Date().getTime()-startTime;if(elapsedTime<duration){ratio=Math.sin(elapsedTime*freq);var displacement=Math.round(ratio*foldHeight);fold.style.height=(foldHeight-displacement)+"px";fold.style.opacity=1-ratio;}
else{clearInterval(fold._timer);fold.style.height=0;Core.removeClass(fold._title,"selected");Core.addClass(fold,"hidden");if(fold._thisAccord.expandAfterFold){fold._thisAccord.expand(fold._thisAccord.expandAfterFold);}}},10);};Accordion.prototype.expand=function(fold){if(fold===this.expandedFold){return;}
if(this.expandedFold){this.collapse(this.expandedFold,fold);}
else{this.expandedFold=fold;clearTimeout(fold._timer);fold.style.height=0;Core.removeClass(fold,"hidden");Core.addClass(fold._title,"selected");fold.style.opacity=1;this.expandAnimate(fold);}};Accordion.prototype.expandAnimate=function(fold){var foldHeight=fold.scrollHeight;var duration=this.tExpand;var freq=Math.PI/(2*duration);var ratio=0;var startTime=new Date().getTime();fold._timer=setInterval(function(){var elapsedTime=new Date().getTime()-startTime;if(elapsedTime<duration){ratio=Math.sin(elapsedTime*freq);fold.style.height=Math.round(ratio*foldHeight)+"px";fold.scrollTop=0;}
else{clearInterval(fold._timer);fold.style.height=foldHeight+"px";}},10);};Accordion.prototype.clickListener=function(){var fold=this._fold;if(fold===fold._thisAccord.expandedFold){fold._thisAccord.collapse(fold);}else{fold._thisAccord.expand(fold);}
return false;};Accordion.prototype.focusListener=function(){var element=this;while(element.parentNode){if(element._thisAccord){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);if(listing.tagName=="DL"||listing.tagName=="dl"){entries=listing.getElementsByTagName("dt").length;}else{entries=listing.getElementsByTagName("li").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);}};