document.observe("dom:loaded",function(){try{if($$("body")[0].hasClassName("SearchPage")===true){if($("content_main")){pageToolBarFunctions=new PageToolBarFunctions({textDiv:"content_main"})}}else{if($("content_body")){pageToolBarFunctions=new PageToolBarFunctions({textDiv:"content_body"})}}if(typeof pageToolBarFunctions!=="undefined"){pageToolBarFunctions.shareThisSelector=" .page_toolbar_sharethis";pageToolBarFunctions.registerToolBars("#page_toolbar")}}catch(a){alert("error! "+a.toString())}});Prototype.Browser.IE6=Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5),10)==6;Prototype.Browser.IE7=Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5),10)==7;var PageToolBarFunctions=Class.create({initialize:function(a){this.printSelector=" .page_toolbar_print";this.shareThisSelector=" .page_toolbar_sharethis";this.shareThisObj=SHARETHIS.addEntry({},{button:false})},registerToolBars:function(a){$$(a+this.printSelector).each(function(b){b.observe("click",function(){window.print()})});if($$(".page_toolbar_email")[0]){$$(".page_toolbar_email")[0].observe("click",function(){attachChicklet("email")})}}});var DEFAULT_SIZE="100%";var LARGER_SIZE="110%";function toggle_text_size(){if($("content_body").style.fontSize==LARGER_SIZE){decrease_text()}else{increase_text()}}function change_link_text(){if($$(".page_toolbar_text a")){$$(".page_toolbar_text a").each(function(a){a.removeClassName("increase").addClassName("decrease");a.setAttribute("title","Decrease Text Size");a.removeChild(a.firstChild);a.update("Increase/Decrease Text Size")})}}function increase_text(){if($$(".page_toolbar_text a")){$$(".page_toolbar_text a").each(function(a){a.removeClassName("increase").addClassName("decrease");a.setAttribute("title","Decrease Text Size");a.removeChild(a.firstChild);a.update("Increase/Decrease Text Size")})}$("content_body").style.fontSize=LARGER_SIZE}function decrease_text(){if($$(".page_toolbar_text a")){$$(".page_toolbar_text a").each(function(a){a.removeClassName("decrease").addClassName("increase");a.setAttribute("title","Increase Text Size");a.removeChild(a.firstChild);a.update("Increase/Decrease Text Size")})}$("content_body").style.fontSize=DEFAULT_SIZE}function check_text_size(){var a=get_cookie("text_size");var b=a?a:get_default_text_size();return set_current_text_size(b)}function text_size_unload(){var a=get_current_text_size();make_cookie("text_size",a)}function set_current_text_size(a){if(a==LARGER_SIZE){document.documentElement.style.fontSize=LARGER_SIZE;return true}return false}function get_default_text_size(){return DEFAULT_SIZE}function get_current_text_size(){if(document.documentElement.style.fontSize==LARGER_SIZE){return LARGER_SIZE}else{return DEFAULT_SIZE}}function make_cookie(b,c){var a="";document.cookie=b+"="+c+a+"; path=/"}function get_cookie(b){var f=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var e=a[d];while(e.charAt(0)==" "){e=e.substring(1,e.length)}if(e.indexOf(f)==0){return e.substring(f.length,e.length)}}return null}function addUnloadEvent(b){var a=window.onunload;if(typeof window.onunload!="function"){window.onunload=b}else{window.onunload=function(){if(a){a()}b()}}}function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}var ALLOW_REFRESH=true;var VISIBILITY_CLASS_NAME="show";var MORE_LINK_CLASS_NAME="more";var MORE_LINK_TEXT="More ...";var BACK_LINK_CLASS_NAME="back";var BACK_LINK_TEXT="Back";var CONTENT_MAIN_ID="content_main";var CONTENT_BODY_ID="content_body";var SMART_NavigationSiteMap_ID="smart_NavigationSiteMap";var SUBLIST_CLASS_NAME="sub";var VISIBLE_SMART_CLASS_NAME="visible_smart";function show_content_body(){document.getElementById(CONTENT_BODY_ID).style.display="block";var a=document.getElementById("content_graph_wrapper");if(a!=null){a.style.display="block"}}function hide_content_body(){document.getElementById(CONTENT_BODY_ID).style.display="none";var a=document.getElementById("content_graph_wrapper");if(a!=null){a.style.display="none"}}function check_smart_navigation(a){if($(a)){if(a=="smart_Related_Information"){$$("#"+a+" ul li").each(function(c,b){if(b>4){c.hide()}})}if($$("#"+a+" ul li a").length){$(a).show();return true}else{$(a).hide();return false}}return false}function check_smart_NavigationSiteMap(){var b=document.getElementById(SMART_NavigationSiteMap_ID).getElementsByTagName("ul");for(var a=0;a<b.length;a++){if(b[a].className==SUBLIST_CLASS_NAME){create_more_link(b[a],b[a].parentNode.getAttribute("id"))}}}function remove_visible_links(){var b=document.getElementById(CONTENT_MAIN_ID).getElementsByTagName("div");for(var a=0;a<b.length;a++){if(b[a].className==VISIBLE_SMART_CLASS_NAME){document.getElementById(CONTENT_MAIN_ID).removeChild(b[a])}}}function create_more_link(e,a){var b=false;var h=e.getElementsByTagName("li");for(var c=0;c<h.length;c++){if(h[c].className!=VISIBILITY_CLASS_NAME){b=true}}if(b){var d=document.createElement("a");var g=document.createTextNode(MORE_LINK_TEXT);var f=build_more_link(a);d.setAttribute("href",f);if(ALLOW_REFRESH==false){d.onclick=function(){hide_content_body();remove_visible_links();show_more(a);return false}}d.appendChild(g);var j=document.createElement("li");j.appendChild(d);j.className=MORE_LINK_CLASS_NAME;e.appendChild(j)}}function show_more(c){var d=c+"_visible";var h=document.getElementById(c).getElementsByTagName("ul")[0].cloneNode(true);h.removeChild(h.lastChild);var a=document.createElement("div");a.setAttribute("id",d);a.appendChild(h);a.className=VISIBLE_SMART_CLASS_NAME;var j=document.createElement("a");var b=document.createTextNode(BACK_LINK_TEXT);j.appendChild(b);j.className=BACK_LINK_CLASS_NAME;var f=build_back_link(c);j.setAttribute("href",f);if(ALLOW_REFRESH==false){j.onclick=function(){remove_visible_links();show_content_body();return false}}a.appendChild(j);document.getElementById(CONTENT_MAIN_ID).appendChild(a);var g=document.getElementById(CONTENT_MAIN_ID).getElementsByTagName("div");for(var e=0;e<g.length;e++){if(g[e].className=="content_sub"){document.getElementById(CONTENT_MAIN_ID).appendChild(a);document.getElementById(CONTENT_MAIN_ID).appendChild(g[e]);e=g.length}}}function check_query(){var d=document.location.search;d=d.substring(1);var a=d.split("&");for(i=0;i<a.length;i++){var b=a[i].split("=");var c=b[0];var e=b[1];if(c=="more"){hide_content_body();remove_visible_links();show_more(e);i=a.length}}}function rebuild_original_query(d){var f="";if(d==""){return f}else{d=d.substring(1);var a=d.split("&");for(i=0;i<a.length;i++){var b=a[i].split("=");var c=b[0];var e=b[1];if(c!="more"){f+=c+"="+e+"&"}}if(f!=""){return"?"+f.substring(0,f.length-1)}else{return""}}}function build_back_link(){var b="";var c=document.URL.split("?");if(c.length==1){b=document.URL}else{var a=rebuild_original_query(document.location.search);b=c[0]+a}return b}function build_more_link(b){var c="";var d=document.URL.split("?");if(d.length==1){c=document.URL+"?more="+b}else{var a=rebuild_original_query(document.location.search);c=d[0];if(a==""){c+="?more="+b}else{c+=a+"&more="+b}}return c}function popupEmailWindow(c,a,b){top.thisWin=window.open("/EmailPage/email_this_page.jsp?siteName="+escape(b)+"&pageDisplayName="+c+"&pageURL="+escape(a),"thisPage","scrollbars=1,resizable=1,menubar=0,toolbar=0,width=640,height=500");if(!top.thisWin.closed){top.thisWin.focus()}}function popUp(b,a,c){if(!a){a=660}if(!c){c=400}day=new Date();id=day.getTime();options="toolbar=no, scrollbars=no, location=no, statusbar=no, menubar=no, resizable=no, width="+a+", height="+c+", left=570, top=150";window.open(b,id,options)}function eHA_escapeSingleQuote(a){sRetVal=new String(a);sRetVal=sRetVal.replace(/'/g,"\\'");return sRetVal}function eHA_escapeDoubleQuote(a){sRetVal=new String(a);sRetVal=sRetVal.replace(/\"/g,/\\"/);return sRetVal}function clearField(a,b){if(a.value==b){a.value=""}}function revertField(a,b){if(a.value==""){a.value=b}}function returnPageURL(){return document.location.href}function rotateNodes(){var a=document.getElementsByTagName("div");var c;for(c=0;c<a.length;c++){if(a[c].className=="news_online_section"){var b=a[c]}}if(b!=null){b.parentNode.parentNode.appendChild(b)}}function bookmarkPage(b,a){try{window.external.AddFavorite(b,a)}catch(c){alert("To bookmark this page please type Ctrl+D on your keyboard.")}}function page_toolbar(){if($$(".page_toolbar_text a")){$$(".page_toolbar_text a").each(function(a){a.onclick=function(){toggle_text_size();return false}})}if($$(".page_toolbar_print a")){$$(".page_toolbar_print a").each(function(a){a.onclick=function(){window.print();return false}})}if($$(".page_toolbar_bookmark a")){$$(".page_toolbar_bookmark a").each(function(a){a.onclick=function(){var c=document.location.href;var b=document.title;bookmarkPage(c,b);return false}})}}var SPOTLIGHT_RANDOM=false;var SPOTLIGHT_NEXT_LINK_CLASSNAME="next";var SPOTLIGHT_NEXT_LINK_TEXTNODE="Next";var SPOTLIGHT_PREV_LINK_CLASSNAME="previous";var SPOTLIGHT_PREV_LINK_TEXTNODE="Previous";var SPOTLIGHT_VISIBLE_CLASSNAME="visible_spotlight";var SPOTLIGHT_HIDDEN_CLASSNAME="hidden_spotlight";var SPOTLIGHT_NAV_CLASSNAME="spotlight_nav";function hide_node(a){a.className=SPOTLIGHT_HIDDEN_CLASSNAME}function show_node(a){a.className=SPOTLIGHT_VISIBLE_CLASSNAME}function setup_arrows(e){var f=$$("#"+e+" ul li").length;var d=new Element("ul",{id:e+"_nav","class":"spotlight_nav"});for(i=0;i<f;i++){var b=new Element("li",{id:"spotlight_nav_"+(i+1)});var c=new Element("a",{href:"#"}).update(i+1);b.appendChild(c);d.appendChild(b)}$$("#"+e+" ul li h4 a").each(function(a){var g=new Element("a",{"class":"spotlight_more_link",href:a.href});g.update("more");a.up("li").appendChild(g)});hide_spotlights($(e),false);$(e).appendChild(d);$("spotlight_nav_1").addClassName("sel");$$("#"+e+" .spotlight_nav li").each(function(a){a.onclick=function(){hide_spotlights($(e),true);show_spotlight(a.id.replace("nav_",""));clearTimeout(theInterval);start_intervals();return false}})}function show_spotlight(a){show_node($(a));select_button(a.replace("_","_nav_"))}function select_button(a){var b=$(a).up("ul").getElementsByTagName("li");for(i=0;i<b.length;i++){b[i].removeClassName("sel")}$(a).addClassName("sel")}function hide_spotlights(c,a){var d=c.down("ul").getElementsByTagName("li");if((d!=null)&&(d.length>0)){for(var b=0;b<d.length;b++){d[b].id="spotlight_"+(b+1);hide_node(d[b])}if(SPOTLIGHT_RANDOM){var f=get_rand_node(d[0])}else{var f=d[0]}if(a==false){show_node(f)}}}function get_visible_spotlight(d){var a=false;var f=document.getElementById(d);var e=f.getElementsByTagName("ul")[0].getElementsByTagName("li");if((e!=null)&&(e.length>0)){for(var c=0;c<e.length;c++){var b=e[c];if(b.className=="visible_spotlight"){var a=b;c=e.length+1}}if(a){return a}return e[0]}return false}function get_next_node(c){if(SPOTLIGHT_RANDOM){return get_rand_node(c)}var d=c.parentNode.getElementsByTagName("li");if((d!=null)&&(d.length>0)){for(var b=0;b<d.length;b++){if(d[b]==c){if(b==d.length-1){b=-1}var a=d[b+1];b=d.length+1}}}else{var a=c.parentNode.firstChild}return a}function get_prev_node(b){if(SPOTLIGHT_RANDOM){return get_rand_node(b)}var c=b.parentNode.getElementsByTagName("li");if((c!=null)&&(c.length>0)){for(var a=c.length-1;a>=0;a--){if(c[a]==b){if(a==0){a=c.length}return c[a-1]}}}return b.parentNode.firstChild}function get_rand_node(d){var a=d;var f=d.parentNode.getElementsByTagName("li");if((f!=null)&&(f.length>0)){while(a==d){var b=Math.random()*f.length;var c=Math.floor(b);a=f[c]}return a}return false}function go_forward(a){var b=get_visible_spotlight(a);hide_node(b);show_node(get_next_node(b));if($(a).down(".spotlight_nav .sel").next("li")){$(a).down(".spotlight_nav .sel").next("li").addClassName("sel");$(a).down(".spotlight_nav .sel").removeClassName("sel")}else{$(a).down(".spotlight_nav li").addClassName("sel");$(a).down(".spotlight_nav .sel").next("li.sel").removeClassName("sel")}}function go_backward(a){var b=get_visible_spotlight(a);hide_node(b);show_node(get_prev_node(b));if($(a).down(".spotlight_nav .sel").previous("li")){$(a).down(".spotlight_nav .sel").previous("li").addClassName("sel");$(a).down(".spotlight_nav .sel").next("li").removeClassName("sel")}else{$(a).down(".spotlight_nav li:last-child").addClassName("sel");$(a).down(".spotlight_nav .sel").removeClassName("sel")}}var theInterval="";var all_interval_expressions="";function start_intervals(){theInterval=window.setInterval(all_interval_expressions,10000)}addLoadEvent(start_intervals);addLoadEvent(dropdownEvents);var dropdownHeight=250;function dropdownEvents(){$$(".dropdown_list_wrapper h4").each(function(a){a.onclick=function(){dropdownRelease();if(a.offsetTop+dropdownHeight-document.viewport.getScrollOffsets().top+220>document.viewport.getDimensions().height){a.next("ul").style.top="auto";a.next("ul").style.bottom="15px"}else{a.next("ul").style.top="15px";a.next("ul").style.bottom="auto"}a.next("ul").addClassName("sel");a.up(".dropdown_list_wrapper").style.position="relative";if(a.next("ul").offsetHeight>dropdownHeight){a.next("ul").style.height=dropdownHeight+"px"}}})}function dropdownRelease(){$$(".dropdown_list_wrapper ul").invoke("removeClassName","sel");$$(".dropdown_list_wrapper").each(function(a){a.style.position="static"})}function dropdownClickHandler(a){var b=true;if(Event.element(a).up(".dropdown_list_wrapper")){b=false}if(b){dropdownRelease()}}function createNewsButtons(d){if($(d)){var a=new Element("ul",{"class":"featured_news_nav"});var b=1;var e=$$("#"+d+" ul li h3").each(function(g){g.up("li").id="featured_news_"+b;var f=new Element("li",{id:"featured_news_nav_"+b});var h=new Element("a",{href:"#"});h.update(g.innerHTML);b++;f.appendChild(h);a.appendChild(f)});$$(".featured_news")[0].insertBefore(a,$$(".featured_news ul")[0]);$$("#"+d+" .featured_news_nav a").each(function(f){f.onclick=function(){clearNewsSelect(d);this.up("li").addClassName("sel");$(this.up("li").id.replace("_nav_","_")).addClassName("sel");return false}});var c=$$("#"+d+" .featured_news_nav li")[0];c.addClassName("sel");$(c.id.replace("_nav_","_")).addClassName("sel")}}function clearNewsSelect(a){$$("#"+a+" ul li").invoke("removeClassName","sel")}function setup_location_page(){}function Calendar_filter(a){if(a=="null"){$$("#calendar table div.event").each(function(b){b.show()})}else{$$("#calendar table div.event").each(function(b){if(a.indexOf(":")!=-1){if(b.hasClassName("event_category_"+a.replace(/ /g,"_"))){b.show()}else{b.hide()}}else{var c=false;$w(b.className).each(function(d){if(d.indexOf(a.replace(/ /g,"_"))!=-1){c=true}});if(c){b.show()}else{b.hide()}}})}}function Calendar_addCalendarToolsEvents(){if($("calendar_tools")){$("event_filter").onchange=function(){Calendar_filter(this.options[this.options.selectedIndex].value);return false}}};
