centerl2();window.numScroll=null;window.active=false;window.browserName=navigator.appName;window.browserVer=parseInt(navigator.appVersion);l2Hover=function(a){var b=getElementsByClassName(document,"l2");var f=getElementsByClassName(document,"l2_sub");centerl2();window.maxNumToShow=a;window.active=false;for(var c=0;c<b.length;c++){b[c].pos=c;b[c].origClassName=b[c].className;var e=b[c].getElementsByTagName("a")[0];b[c].linkName=e.innerHTML;if(!e.onmouseover){e.onmouseover=function(){showL3Menu(this.parentNode)}}if(!e.onmouseout){e.onmouseout=function(){registerHide(this.parentNode)}}b[c].onmouseout=function(h){var g=this;if(window.pos!=g.pos){return}if(!h){var h=window.event}if(h&&h.clientX){var n=new Object();n.x=h.clientX+window.scrollX;n.y=h.clientY+window.scrollY;var j,i,r,p;j=r=0;var o=this.getElementsByTagName("a")[0];var m=this.getElementsByTagName("ul")[0];var l=o;var q=getElementCoordinates(o);var k=getElementCoordinates(m);q=q.shrink(1);k=k.shrink(1);if(n.x>q.x1&&n.x<q.x2&&n.y>q.y1&&n.y<k.y2||n.x>k.x1&&n.x<k.x2&&n.y>k.y1&&n.y<k.y2){unregisterHide(g);return}}registerHide(g)}}for(var c=0;c<f.length;c++){f[c].onmouseover=function(){unregisterHide(this.parentNode)};f[c].onmouseout=function(){registerHide(this.parentNode)}}};scrollDown=function(a){if(a){d=setTimeout("scrollDownOne()",50)}else{clearTimeout(d)}};scrollUp=function(a){if(a){u=setTimeout("scrollUpOne()",50)}else{clearTimeout(u)}};scrollUpOne=function(){if((numScroll)>0){numScroll--;updateScroll();u=setTimeout("scrollUpOne()",50)}};scrollDownOne=function(){if((numScroll)<(subs.length-window.maxNumToShow)){numScroll++;updateScroll();d=setTimeout("scrollDownOne()",50)}};resetInnerHTML=function(){if(numScroll>0){numScroll=0;updateScroll()}};function updateScroll(){for(var a=0;a<window.maxNumToShow;a++){subs[a].innerHTML=subsInnerHTML[a+numScroll]}}function centerl2(){var m=navigator.userAgent.indexOf("canoo");if(m==-1){var b=document.getElementById("nav");if(!b||b.centered){return}b.style.visibility="hidden";var f=getElementsByClassName(document,"nav_l1")[0];var l=f.getElementsByTagName("img");for(var k=0;k<l.length;k++){var c=l[k];if(c.src&&c.src.indexOf("_sel.gif")>=0){break}}if(k<l.length){var o=getElementCoordinates(l[k]);var s=null;var a=b.childNodes;var n=0;for(var k=0;k<a.length;k++){if(a[k].tagName=="LI"){if(s!=null){var h=getElementCoordinates(a[k]);s.x1=Math.min(s.x1,h.x1);s.y1=Math.min(s.y1,h.y1);s.x2=Math.max(s.x2,h.x2);s.y2=Math.max(s.y2,h.y2)}else{s=getElementCoordinates(a[k])}n++}}s=computeWidthAndCenters(s);var g=o.xc-s.x1;if(n%2==1){var j=0;for(var k=0;k<a.length;k++){if(a[k].tagName=="LI"){j++;if(j==Math.ceil(n/2)){break}}}var r=a[k];var q=r.getElementsByTagName("a")[0];var p=getElementCoordinates(q);p.x1+=10;p=computeWidthAndCenters(p);g-=p.xc-s.xc}else{g+=5}var e=g-s.w/2;if(e>=0){b.style.marginLeft=e.toPixels()}}b.centered=true;b.style.visibility="visible"}}function showL3Menu(b){if(!window.active||(window.pos!=b.pos)){if(document.getElementById("allCategories")&&window.pos==document.getElementById("allCategories").pos){hideMenu()}closeL3Menu();window.pos=b.pos;b.className+=" sfhover";var c=b.getElementsByTagName("ul")[0];window.objLeft=c.style.left;if(browserName=="Microsoft Internet Explorer"){if(typeof document.body.style.maxHeight!="undefined"){c.style.top="17px";c.style.left=(b.offsetLeft+50)}else{c.style.left=(b.offsetLeft+50)}}subs=getElementsByClassName(b,"menuItem");subsInnerHTML=new Array();for(var a=0;a<subs.length;a++){if(a>=window.maxNumToShow){subs[a].style.visibility="hidden";subs[a].style.display="none";subs[a].style.margin="-999px"}var e=subs[a].getElementsByTagName("a")[0];subsInnerHTML.push(subs[a].innerHTML);numScroll=0}window.active=true}else{unregisterHide(b)}}function closeL3Menu(){if(window.obj){window.obj.className=window.obj.origClassName;if(browserName=="Microsoft Internet Explorer"){window.obj.getElementsByTagName("ul")[0].style.left="-999px"}resetInnerHTML();window.obj=null;window.active=false}}function registerHide(a){unregisterHide(a);if(window.obj&&window.obj!=a){closeL3Menu()}window.obj=a;a.t=setTimeout("if (window.obj && window.obj.t != null) { closeL3Menu(); }",500)}function unregisterHide(a){if(a.t!=null){clearTimeout(a.t);a.t=null}};
