localWebsiteOnload=function(){};var menuOneActiveNode,activeNode,menuTimeout,menuEnterTimeout,delayedActiveNode;var dropdown=false;initMainMenu=function(){if(document.getElementById){var e,c,b,f,a,h,d;var g=document.getElementById("main_menu");if(!g){return}if(hasClassName(g,"dropdown")){dropdown=true}if(typeof primaryMenu!="undefined"){d=new RegExp("^"+primaryMenu,"i")}for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];if(f.nodeName=="LI"){if(menuOneActiveNode==null&&(typeof primaryMenu!="undefined")&&f.firstChild.innerHTML.match(d)){menuOneActiveNode=f;addClassName(f,"nav_on");selectMenuTwo(f)}f.onmouseover=function(){if(menuTimeout){window.clearTimeout(menuTimeout);menuTimeout=null}if(menuEnterTimeout){window.clearTimeout(menuEnterTimeout);menuEnterTimeout=null}if(activeNode&&this!=activeNode){removeClassName(activeNode,"mouse_over");if(activeNode==menuOneActiveNode){removeClassName(activeNode,"nav_on")}}if(activeNode||!dropdown){activeNode=this;addClassName(activeNode,"mouse_over")
}else{delayedActiveNode=this;menuEnterTimeout=window.setTimeout("if(delayedActiveNode){activeNode=delayedActiveNode;addClassName(activeNode,'mouse_over');}",250)}};f.onmouseout=function(){if(menuEnterTimeout){window.clearTimeout(menuEnterTimeout);menuEnterTimeout=null}if(menuTimeout){window.clearTimeout(menuTimeout);menuTimeout=null}menuTimeout=window.setTimeout("if(activeNode){removeClassName(activeNode,'mouse_over');activeNode=null;};if(menuOneActiveNode){addClassName(menuOneActiveNode,'nav_on');}",500)};for(c=0;c<f.childNodes.length;c++){a=f.childNodes[c];if(a.nodeName=="UL"&&typeof a.childNodes!="undefined"){for(b=0;b<a.childNodes.length;b++){h=a.childNodes[b];if(h.nodeName=="LI"){h.onmouseover=function(){addClassName(this,"mouse_over")};h.onmouseout=function(){removeClassName(this,"mouse_over")}}}}}}}}};selectMenuTwo=function(b){if(typeof secondaryMenu!="undefined"&&b.getElementsByTagName("UL").length==1){var a=new RegExp("^"+secondaryMenu,"i")}else{return}menuTwoList=b.getElementsByTagName("UL")[0];
if(menuTwoList!="undefined"){for(j=0;j<menuTwoList.childNodes.length;j++){menuTwoNode=menuTwoList.childNodes[j];if(menuTwoNode.nodeName=="LI"){if(menuTwoNode.firstChild.innerHTML.match(a)){addClassName(menuTwoNode,"nav_on");break}}}}};var TAB_COOKIE="last_tab";var activeTab;initTabs=function(f){if(document.getElementById){var g,c,e,l,k;g=document.getElementById(f);c=urlParamGet("ht");if(c==null){var b=getCookie(TAB_COOKIE);if(b!==null){c=b}}if(c){e=new RegExp(c,"i")}var h=null,d,m;for(l=0;l<g.childNodes.length;l++){d=g.childNodes[l];if(d.nodeName=="LI"){for(k=0;k<d.childNodes.length;k++){m=d.childNodes[k];if(m.nodeName=="A"&&m.rel){if(hasClassName(m,"nav_on")){activeTab=m}m.onclick=function(){selectTab(activeTab,this);return false};if(c!==null&&m.rel==c&&m!=activeTab){selectTab(activeTab,m)}}}}}}};selectTab=function(d,b){if(d&&d.rel){removeClassName(d,"nav_on");var c=document.getElementById(d.rel);if(c){removeClassName(c,"nav_on")}}if(b&&b.rel){addClassName(b,"nav_on");var a=document.getElementById(b.rel);
if(a){addClassName(a,"nav_on");activeTab=b;activeTab.blur();setCookie(TAB_COOKIE,b.rel)}}};urlParamGet=function(b){var a=window.location.search.match(new RegExp(b+"=([^&]+)","i"));return(a==null)?null:RegExp.$1};hasClassName=function(b,a){return(b.className&&b.className.indexOf(a)!=-1)};addClassName=function(b,a){if(!b.className){b.className=""}if(b.className.indexOf(a)==-1){b.className+=" "+a}};removeClassName=function(b,a){var c=b.className.indexOf(" "+a)==-1?a:" "+a;b.className=b.className.replace(c,"")};goToURL=function(a){if(a.options[a.selectedIndex].value!=""){window.location.href=a.options[a.selectedIndex].value}};var SESSION_COOKIE="sessionID";var USER_COOKIE="usrID";var OLD_USER_COOKIE="userID";var LOGGED_IN_COOKIE="show_logout";initCookies=function(){var c=getCookie(SESSION_COOKIE);var d=getCookie(OLD_USER_COOKIE);var b=getCookie(USER_COOKIE);if(b!==null){if(c===null){setUserCookie(b)}}else{setUserCookie(d)}if(c===null){setCookie(SESSION_COOKIE,getUniqueID())}if(getCookie(LOGGED_IN_COOKIE)!==null){if(document.getElementById){var a=document.getElementById("logout_link");
if(a){a.style.display="inline"}}}};setUserCookie=function(f){var b=new Date();var a=new Date(b.getTime()+(365*86400000));var d=getHost();var e;if(d&&d.indexOf(".")!=-1){var c=d.split(".");if(c.length>1){e="."+c[c.length-2]+"."+c[c.length-1]}}setCookie(USER_COOKIE,(f!==null?f:getUniqueID()),a,"/",e,false)};getHost=function(){var a=(typeof window.all!="undefined"&&typeof window.opera=="undefined")?window.location.hostname:window.location.host;if(!a){a=document.location.hostname}return !a?null:a};getUniqueID=function(){var a=(new Date()).getTime();a+=Math.random().toString().replace(/\./,"");return a};getCookie=function(c){var d=document.cookie.indexOf(c+"=");var a=d+c.length+1;if((!d)&&(c!=document.cookie.substring(0,c.length))){return null}if(d==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))};setCookie=function(b,d,a,f,c,e){document.cookie=b+"="+escape(d)+((a)?";expires="+a.toGMTString():"")+";path=/"+((c)?";domain="+c:"")+((e)?";secure":"")
};delCookie=function(a){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT;"};externalLink=function(){if(document.getElementsByTagName){var c,b;b=document.getElementsByTagName("a");for(c in b){if(b[c].rel=="externalLink"){b[c].target="_blank"}}}};getElementWithID=function(a){if(document.getElementById){return document.getElementById(a)}};submitQuickSearch=function(){var a=getElementWithID("frmSearch");if(a){a.submit()}};getSelectBoxValue=function(a){var b=getElementWithID(a);if(b){if(b.selectedIndex!=-1){return b.options[b.selectedIndex].value}else{return""}}else{return""}};mainOnLoad=function(){initCookies();initMainMenu();localWebsiteOnload()};
