/*
javascript.js,rollover.js,links.js,tabber/tabber-minimized.js,utility_effects.js
*/
Event.observe(window,"load",function(){$$("select.plank-select-link").each(function(a){Event.observe(a,"change",function(){if(a.tagName.toLowerCase()!="select"||a.value===""){return;}var b=a.value;window.location.assign(b);});});});function toggle_poll(){if(document.getElementById("homepage_poll").style.display=="none"){document.getElementById("homepage_poll").style.display="block";document.getElementById("homepage_poll_results").style.display="none";}else{document.getElementById("homepage_poll").style.display="none";document.getElementById("homepage_poll_results").style.display="block";}}function toggle_text(){curtext=document.getElementById("showhide").innerHTML;if(curtext=="- hide"){document.getElementById("showhide").innerHTML="+ show";}else{document.getElementById("showhide").innerHTML="- hide";}}function print_page(){window.print();}function simpleSwitch(a,b){document.getElementById(a).innerHTML=document.getElementById(b).innerHTML;}function confirmSubmit(b){var a=confirm(b);if(a){return true;}else{return false;}}function initRollovers(){if(!document.getElementById){return;}var e=new Array();var a;var g=document.getElementsByTagName("img");for(var c=0;c<g.length;c++){if(g[c].className=="imgover"){var f=g[c].getAttribute("src");var b=f.substring(f.lastIndexOf("."),f.length);var d=f.replace(b,"_o"+b);g[c].setAttribute("hsrc",d);e[c]=new Image();e[c].src=d;g[c].onmouseover=function(){a=this.getAttribute("src");this.setAttribute("src",this.getAttribute("hsrc"));};g[c].onmouseout=function(){if(!a){a=this.getAttribute("src").replace("_o"+b,b);}this.setAttribute("src",a);};}}}window.onload=initRollovers;function links_in_new_window(){var b=window.location.hostname;var a=document.getElementsByTagName("a");re=new RegExp("\\b"+b+"\\b","i");for(x=0;x<a.length;x++){var c=a[x];if(c.href.search(re)==-1){c.target="_blank";}else{if(Element.hasClassName(c,"external")==true){c.target="_blank";}}}}Event.observe(window,"load",links_in_new_window,false);function tabberObj(b){var a;this.div=null;this.classMain="tabber";this.classMainLive="tabberlive";this.classTab="tabbertab";this.classTabDefault="tabbertabdefault";this.classNav="tabbernav";this.classTabHide="tabbertabhide";this.classNavActive="tabberactive";this.titleElements=["h2","h3","h4","h5","h6"];this.titleElementsStripHTML=true;this.removeTitle=true;this.addLinkId=false;this.linkIdFormat="<tabberid>nav<tabnumberone>";for(a in b){this[a]=b[a];}this.REclassMain=new RegExp("\\b"+this.classMain+"\\b","gi");this.REclassMainLive=new RegExp("\\b"+this.classMainLive+"\\b","gi");this.REclassTab=new RegExp("\\b"+this.classTab+"\\b","gi");this.REclassTabDefault=new RegExp("\\b"+this.classTabDefault+"\\b","gi");this.REclassTabHide=new RegExp("\\b"+this.classTabHide+"\\b","gi");this.tabs=new Array();if(this.div){this.init(this.div);this.div=null;}}tabberObj.prototype.init=function(f){var j,d,b,l,g=0,m,a,k,c,h;if(!document.getElementsByTagName){return false;}if(f.id){this.id=f.id;}this.tabs.length=0;j=f.childNodes;for(d=0;d<j.length;d++){if(j[d].className&&j[d].className.match(this.REclassTab)){l=new Object();l.div=j[d];this.tabs[this.tabs.length]=l;if(j[d].className.match(this.REclassTabDefault)){g=this.tabs.length-1;}}}m=document.createElement("ul");m.className=this.classNav;for(d=0;d<this.tabs.length;d++){l=this.tabs[d];l.headingText=l.div.title;if(this.removeTitle){l.div.title="";}if(!l.headingText){for(b=0;b<this.titleElements.length;b++){h=l.div.getElementsByTagName(this.titleElements[b])[0];if(h){l.headingText=h.innerHTML;if(this.titleElementsStripHTML){l.headingText.replace(/<br>/gi," ");l.headingText=l.headingText.replace(/<[^>]+>/g,"");}break;}}}if(!l.headingText){l.headingText=d+1;}a=document.createElement("li");l.li=a;k=document.createElement("a");k.appendChild(document.createTextNode(l.headingText));k.href="javascript:void(null);";k.title=l.headingText;k.onclick=this.navClick;k.tabber=this;k.tabberIndex=d;if(this.addLinkId&&this.linkIdFormat){c=this.linkIdFormat;c=c.replace(/<tabberid>/gi,this.id);c=c.replace(/<tabnumberzero>/gi,d);c=c.replace(/<tabnumberone>/gi,d+1);c=c.replace(/<tabtitle>/gi,l.headingText.replace(/[^a-zA-Z0-9\-]/gi,""));k.id=c;}a.appendChild(k);m.appendChild(a);}f.insertBefore(m,f.firstChild);f.className=f.className.replace(this.REclassMain,this.classMainLive);this.tabShow(g);if(typeof this.onLoad=="function"){this.onLoad({tabber:this});}return this;};tabberObj.prototype.navClick=function(g){var d,b,c,f,e;b=this;if(!b.tabber){return false;}c=b.tabber;f=b.tabberIndex;b.blur();if(typeof c.onClick=="function"){e={tabber:c,index:f,event:g};if(!g){e.event=window.event;}d=c.onClick(e);if(d===false){return false;}}c.tabShow(f);return false;};tabberObj.prototype.tabHideAll=function(){var a;for(a=0;a<this.tabs.length;a++){this.tabHide(a);}};tabberObj.prototype.tabHide=function(a){var b;if(!this.tabs[a]){return false;}b=this.tabs[a].div;if(!b.className.match(this.REclassTabHide)){b.className+=" "+this.classTabHide;}this.navClearActive(a);return this;};tabberObj.prototype.tabShow=function(a){var b;if(!this.tabs[a]){return false;}this.tabHideAll();b=this.tabs[a].div;b.className=b.className.replace(this.REclassTabHide,"");this.navSetActive(a);if(typeof this.onTabDisplay=="function"){this.onTabDisplay({tabber:this,index:a});}return this;};tabberObj.prototype.navSetActive=function(a){this.tabs[a].li.className=this.classNavActive;return this;};tabberObj.prototype.navClearActive=function(a){this.tabs[a].li.className="";return this;};function tabberAutomatic(d){var a,c,b;if(!d){d={};}a=new tabberObj(d);c=document.getElementsByTagName("div");for(b=0;b<c.length;b++){if(c[b].className&&c[b].className.match(a.REclassMain)){d.div=c[b];c[b].tabber=new tabberObj(d);}}return this;}function tabberAutomaticOnLoad(b){var a;if(!b){b={};}a=window.onload;if(typeof window.onload!="function"){window.onload=function(){tabberAutomatic(b);};}else{window.onload=function(){a();tabberAutomatic(b);};}}if(typeof tabberOptions=="undefined"){tabberAutomaticOnLoad();}else{if(!tabberOptions.manualStartup){tabberAutomaticOnLoad(tabberOptions);}}Effect.OpenUp=function(a){a=$(a);new Effect.BlindDown(a,arguments[1]||{});};Effect.CloseDown=function(a){a=$(a);new Effect.BlindUp(a,arguments[1]||{});};Effect.Combo=function(a){a=$(a);if(a.style.display=="none"){new Effect.OpenUp(a,arguments[1]||{});}else{new Effect.CloseDown(a,arguments[1]||{});}};
