function getWidth(el,includePadding,includeBorder){var width;el=typeof el=="string"?document.getElementById(el):el;if(window.getComputedStyle){try{var style=document.defaultView.getComputedStyle(el,null)}catch(e){alert(document.getElementById(el));document.write(texto)}if(style.getPropertyValue("display")=="none")return 0;width=parseInt(style.getPropertyValue("width"));if(/opera/i.test(navigator.userAgent)){width-=parseInt(style.getPropertyValue("padding-left"));width-=parseInt(style.getPropertyValue("padding-right"));
width-=parseInt(style.getPropertyValue("border-left-width"));width-=parseInt(style.getPropertyValue("border-right-width"))}if(includePadding){width+=parseInt(style.getPropertyValue("padding-left"));width+=parseInt(style.getPropertyValue("padding-right"))}if(includeBorder){width+=parseInt(style.getPropertyValue("border-left-width"));width+=parseInt(style.getPropertyValue("border-right-width"))}}else{if(el.currentStyle["display"]=="none")return 0;var widthCSS=el.currentStyle["width"];var bRegex=/thin|medium|thick/;
width=el.offsetWidth;if(!includeBorder){var borderLeftCSS=el.currentStyle["borderLeftWidth"];var borderRightCSS=el.currentStyle["borderRightWidth"];var temp=document.createElement("DIV");if(!bRegex.test(borderLeftCSS)){temp.style.width=borderLeftCSS;el.parentNode.appendChild(temp);width-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}else if(bRegex.test(borderLeftCSS))if(el.offsetWidth>el.clientWidth&&el.currentStyle["borderLeftStyle"]!="none"){temp.style.width="10px";temp.style.border=
borderLeftCSS+" "+el.currentStyle["borderLeftStyle"]+" #000000";el.parentNode.appendChild(temp);width-=Math.round((temp.offsetWidth-10)/2);el.parentNode.removeChild(temp)}if(!bRegex.test(borderRightCSS)){temp.style.width=borderRightCSS;el.parentNode.appendChild(temp);width-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}else if(bRegex.test(borderRightCSS))if(el.offsetWidth>el.clientWidth&&el.currentStyle["borderRightStyle"]!="none"){temp.style.width="10px";temp.style.border=borderRightCSS+
" "+el.currentStyle["borderRightStyle"]+" #000000";el.parentNode.appendChild(temp);width-=Math.round((temp.offsetWidth-10)/2);el.parentNode.removeChild(temp)}}if(!includePadding){var paddingLeftCSS=el.currentStyle["paddingLeft"];var paddingRightCSS=el.currentStyle["paddingRight"];var temp=document.createElement("DIV");temp.style.width=paddingLeftCSS;el.parentNode.appendChild(temp);width-=Math.round(temp.offsetWidth);temp.style.width=paddingRightCSS;width-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}}return width}
function getHeight(el,includePadding,includeBorder){var height;el=typeof el=="string"?document.getElementById(el):el;if(window.getComputedStyle){var style=document.defaultView.getComputedStyle(el,null);if(style.getPropertyValue("display")=="none")return 0;height=parseInt(style.getPropertyValue("height"));if(/opera/i.test(navigator.userAgent)){height-=parseInt(style.getPropertyValue("padding-top"));height-=parseInt(style.getPropertyValue("padding-bottom"));height-=parseInt(style.getPropertyValue("border-top-width"));
height-=parseInt(style.getPropertyValue("border-bottom-width"))}if(includePadding){height+=parseInt(style.getPropertyValue("padding-top"));height+=parseInt(style.getPropertyValue("padding-bottom"))}if(includeBorder){height+=parseInt(style.getPropertyValue("border-top-width"));height+=parseInt(style.getPropertyValue("border-bottom-width"))}}else{if(el.currentStyle["display"]=="none")return 0;var heightCSS=el.currentStyle["height"];var bRegex=/thin|medium|thick/;height=el.offsetHeight;if(!includeBorder){var borderTopCSS=
el.currentStyle["borderTopWidth"];var borderBottomCSS=el.currentStyle["borderBottomWidth"];var temp=document.createElement("DIV");if(!bRegex.test(borderTopCSS)){temp.style.width=borderTopCSS;el.parentNode.appendChild(temp);height-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}else if(bRegex.test(borderTopCSS))if(el.offsetHeight>el.clientHeight&&el.currentStyle["borderTopStyle"]!="none"){temp.style.width="10px";temp.style.border=borderTopCSS+" "+el.currentStyle["borderTopStyle"]+" #000000";
el.parentNode.appendChild(temp);height-=Math.round((temp.offsetWidth-10)/2);el.parentNode.removeChild(temp)}if(!bRegex.test(borderBottomCSS)){temp.style.width=borderBottomCSS;el.parentNode.appendChild(temp);height-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}else if(bRegex.test(borderBottomCSS))if(el.offsetHeight>el.clientHeight&&el.currentStyle["borderBottomStyle"]!="none"){temp.style.width="10px";temp.style.border=borderBottomCSS+" "+el.currentStyle["borderBottomStyle"]+" #000000";
el.parentNode.appendChild(temp);height-=Math.round((temp.offsetWidth-10)/2);el.parentNode.removeChild(temp)}}if(!includePadding){var paddingTopCSS=el.currentStyle["paddingTop"];var paddingBottomCSS=el.currentStyle["paddingBottom"];var temp=document.createElement("DIV");temp.style.width=paddingTopCSS;el.parentNode.appendChild(temp);height-=Math.round(temp.offsetWidth);temp.style.width=paddingBottomCSS;height-=Math.round(temp.offsetWidth);el.parentNode.removeChild(temp)}}return height}
qualSubAtivo="";var navPrincipalHeight;var paddingDefault;var navPrincipalHeight=25;var navPrincipalWidth=853;var paddingLeftDefault=8;var paddingRightDefault=12;var marginLeftNavPrincipal=112;var maxWidth=989;var IE6=false;var texto="";
function setPaddingNavPrincipal(paddingLeft,paddingRight,jaComecouExpandir){var paddingLeftLi=paddingLeft;var paddingRightLi=paddingRight;var offset=0;var expandiu=jaComecouExpandir;var ultimaIteracao=false;texto=texto+" width1 ";if(getHeight("navPrincipal")!=navPrincipalHeight||getWidth("navPrincipal")!=navPrincipalWidth){texto=texto+" width2 ";if(getHeight("navPrincipal")>navPrincipalHeight||getWidth("navPrincipal")>navPrincipalWidth){offset=-1;if(expandiu)ultimaIteracao=true;texto=texto+" width3 "}else if(getWidth("navPrincipal")<
navPrincipalWidth){offset=1;expandiu=true}paddingLeftLi=paddingLeftLi+offset;paddingRightLi=paddingRightLi+offset;if(paddingLeftLi<0||paddingRightLi<0)return true;lis=navPrincipalObj.getElementsByTagName("li");for(i=0;i<=lis.length-1;i++){lis[i].style.paddingLeft=paddingLeftLi+"px";lis[i].style.paddingRight=paddingRightLi+"px"}if(!ultimaIteracao)setPaddingNavPrincipal(paddingLeftLi,paddingRightLi,expandiu);else return true}else return true}
function getCenterX(qualSubMenu){var qualItem=-1;for(i=0;i<=subMenus.length-1;i++)if(subMenus[i]==qualSubMenu){qualItem=i;break}var x;x=marginLeftNavPrincipal;lis=navPrincipalObj.getElementsByTagName("li");texto=texto+" width4 ";for(i=0;i<qualItem;i++){x=x+parseInt(lis[i].style.paddingLeft);x=x+getWidth(lis[i]);x=x+parseInt(lis[i].style.paddingRight)}x=x+parseInt(lis[qualItem].style.paddingLeft);texto=texto+" width5 ";x=x+Math.round(getWidth(lis[qualItem])/2);return x}
function setSubMenuMargin(qualSubMenu){var marginLeft=0;var centerX=getCenterX(qualSubMenu);texto=texto+qualSubMenu;var subMenuWidth=getWidth(qualSubMenu);marginLeft=centerX-Math.round(subMenuWidth/2);if(marginLeft<0)marginLeft=0;if(centerX+Math.round(subMenuWidth/2)>maxWidth)marginLeft=maxWidth-subMenuWidth;if(IE6)marginLeft=Math.round(marginLeft/2);document.getElementById(qualSubMenu).style.marginLeft=marginLeft+"px";document.getElementById(qualSubMenu).style.display="none";document.getElementById(qualSubMenu).style.visibility=
"visible"}
function setClubeAtivo(qualClubeImg){subMenuClubes=document.getElementById("subClubes");lis=subMenuClubes.getElementsByTagName("li");for(i=0;i<lis.length-1;i++){linkEscudo=lis[i].getElementsByTagName("a")[0];escudo=lis[i].getElementsByTagName("a")[0].getElementsByTagName("img")[0];if(escudo.src.indexOf(qualClubeImg)==-1){linkEscudo.onmouseover=function(){temp2=this.getElementsByTagName("img")[0].src;this.getElementsByTagName("img")[0].src=temp2.replace("_pb.gif",".gif")};linkEscudo.onmouseout=function(){temp3=
this.getElementsByTagName("img")[0].src;this.getElementsByTagName("img")[0].src=temp3.replace(".gif","_pb.gif")};temp=escudo.src;escudo.src=temp.replace(".gif","_pb.gif")}}}function initMenu(){navPrincipalObj=document.getElementById("navPrincipal");setPaddingNavPrincipal(paddingLeftDefault,paddingRightDefault,false);for(i=0;i<=subMenus.length-1;i++)if(subMenus[i]!="")setSubMenuMargin(subMenus[i])}
function showSubMenu(qualSub){if(qualSubAtivo!=""){document.getElementById("sub"+qualSubAtivo).style.display="none";document.getElementById("menu"+qualSubAtivo).className=""}document.getElementById("sub"+qualSub).style.display="block";document.getElementById("sub"+qualSub).style.visibility="visible";document.getElementById("menu"+qualSub).className="active";qualSubAtivo=qualSub};