function protStart(){protTabStart()}function calcTabRow(a,b){var h=document.createElement("div");h.className="calc-tab-row";h.style.left=a+px;h.style.zIndex=5+b;h.id="divCR_"+b;document.body.appendChild(h);return h}function protTabStart(){if(BrowserDetect.browser=="Konqueror"){return}var F,B;if(!(F=document.getElementById("divCalcTabs"))){return}var n=document.createElement("div");n.id="divCalcTabContainer";F.parentNode.replaceChild(n,F);var m=document.getElementById("divCalcSp");B=Y.util.Dom.getRegion(m);var I=B.bottom;var u=B.left;var E=[];var z=[];var y=[];var M;for(var O=0;O<F.childNodes.length;O++){if(F.childNodes[O].nodeType==3){continue}E.push(F.childNodes[O].innerHTML);y.push(F.childNodes[O].href)}var N=0;var L,K;B=Y.util.Dom.getRegion(n);L=B.left;K=B.top;var R,Q,j;z.push(calcTabRow(u,z.length));var C;var q,l;var G=0;while(M=E.shift()){q=document.createElement("span");q.className="calc-tab";q.innerHTML=M;q.id="sCT_"+G;oH=document.createComment(y.shift().replace(/about\:blank/,""));Event.addListener(q,"click",protTabClick);if(z[z.length-1].childNodes.length>0){l=document.createElement("span");l.className="calc-tab-space";l.innerHTML="&nbsp;";z[z.length-1].appendChild(l)}B=Y.util.Dom.getRegion(z[z.length-1]);q.appendChild(oH);z[z.length-1].appendChild(q);var x=B.right-B.left;if(x>690){var P=z[z.length-1].lastChild;z[z.length-1].removeChild(z[z.length-1].lastChild);z[z.length-1].removeChild(z[z.length-1].lastChild);B=Y.util.Dom.getRegion(z[z.length-1]);R=B.left;Q=B.top;j=B.bottom-B.top;z.push(calcTabRow(u,z.length));z[z.length-1].style.top=Q+j+px;if(isie6){R-=1}R=u;z[z.length-1].style.left=R+px;z[z.length-1].appendChild(P)}G++}tabRowsZ=z.length;B=Y.util.Dom.getRegion(z[z.length-1]);var J=B.bottom-B.top;var y=[];B=Y.util.Dom.getRegion(z[z.length-1].firstChild);J=2;var b=[];for(O=z.length-1;O>-1;O--){for(g=0;g<z[O].childNodes.length;g++){z[O].childNodes[g].style.paddingBottom=J+px}B=Y.util.Dom.getRegion(z[O].firstChild);b[O]=B.top;z[O].style.height=J+30+px;J=(B.bottom-B.top-((isie6)?-1:2))}var a=b[0];for(O=0;O<b.length;O++){z[O].style.top=I+b[O]-a+px}if(typeof pg=="number"){protTabSet(pg)}B=Y.util.Dom.getRegion(z[z.length-1]);F=document.getElementById("divCalc");F.style.paddingTop=B.bottom-I+15+px}function protTabRow(a,b){var h=document.createElement("div");h.className="calc-tab-row";h.style.left=a+px;h.style.zIndex=5+b;h.id="divCR_"+b;document.body.appendChild(h);return h}function protTabSet(l){var j,k,h,b,a;if(!(j=document.getElementById("sCT_"+l))){return}b=parseInt(j.parentNode.id.split("_")[1]);if((b+1)<tabRowsZ){protFlipRows(l)}h=document.getElementsByTagName("span");for(k=0;k<h.length;k++){if(h[k].id.match(/^sCT/)){h[k].className="calc-tab"}}j.className="calc-tab-selected"}function protTabClick(a){a=EventUtil.getEvent();go(a.target.lastChild.nodeValue)}function protFlipRows(l){var h;if(!(h=document.getElementById("sCT_"+l))){return}var r,q,m,k,A,z,b,a,y,x;o1=h.parentNode;o2=document.getElementById("divCR_"+(tabRowsZ-1));r=o1.id;q=o2.id;m=Y.util.Dom.getRegion(o1.firstChild);k=Y.util.Dom.getRegion(o2.firstChild);h1=parseInt(getStyle(o1.firstChild,"paddingBottom"));h2=parseInt(getStyle(o2.firstChild,"paddingBottom"));y=o1.style.zIndex;x=o2.style.zIndex;b=o1.innerHTML;a=o2.innerHTML;var u=(isie6)?-2:1;o1.style.top=k.top+u+px;o2.style.top=m.top+u+px;o1.id="_X";o2.id=r;o1.id=q;for(c=0;c<o1.childNodes.length;c++){o1.childNodes[c].style.paddingBottom=2+px}for(c=0;c<o2.childNodes.length;c++){o2.childNodes[c].style.paddingBottom=h1+px}o1.style.zIndex=x;o2.style.zIndex=y;m=Y.util.Dom.getRegion(o1.firstChild);k=Y.util.Dom.getRegion(o2.firstChild);o1.style.height=m.bottom-m.top+px;o2.style.height=k.bottom-k.top+px}