var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;function AddCss(){niftyCss=true;var a=CreateEl("link");a.setAttribute("type","text/css");a.setAttribute("rel","stylesheet");a.setAttribute("href",JsURL+"/fillet/fillet.css");a.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(a)}function Bindfillet(a,c){if(niftyOk==false){return}var d,b=a.split(","),e=0;if(c==null){c=""}if(c.find("fixed-height")){e=getElementsBySelector(b[0])[0].offsetHeight}for(d=0;d<b.length;d++){Rounded(b[d],c)}if(c.find("height")){SameHeight(a,e)}}function Rounded(a,d){var e,f="",c="",b=new Array();if(d!=""){d=d.replace("left","tl bl");d=d.replace("right","tr br");d=d.replace("top","tr tl");d=d.replace("bottom","br bl");d=d.replace("transparent","alias");if(d.find("tl")){f="both";if(!d.find("tr")){f="left"}}else{if(d.find("tr")){f="right"}}if(d.find("bl")){c="both";if(!d.find("br")){c="left"}}else{if(d.find("br")){c="right"}}}if(f==""&&c==""&&!d.find("none")){f="both";c="both"}b=getElementsBySelector(a);for(e=0;e<b.length;e++){FixIE(b[e]);if(f!=""){AddTop(b[e],f,d)}if(c!=""){AddBottom(b[e],c,d)}}}function AddTop(c,l,m){var k=CreateEl("b"),e=4,h="",a,j,b="r",f,g;k.style.marginLeft="-"+getPadding(c,"Left")+"px";k.style.marginRight="-"+getPadding(c,"Right")+"px";if(m.find("alias")||(g=getBackground(c))=="transparent"){g="transparent";f="transparent";h=getParentBk(c);b="t"}else{f=getParentBk(c);h=Mix(g,f)}k.style.background=f;k.className="niftycorners";a=getPadding(c,"Top");if(m.find("small")){k.style.marginBottom=(a-2)+"px";b+="s";e=2}else{if(m.find("big")){k.style.marginBottom=(a-10)+"px";b+="b";e=8}else{k.style.marginBottom=(a-5)+"px"}}for(j=1;j<=e;j++){k.appendChild(CreateStrip(j,l,g,h,b))}c.style.paddingTop="0";c.insertBefore(k,c.firstChild)}function AddBottom(c,l,m){var k=CreateEl("b"),e=4,h="",a,j,b="r",f,g;k.style.marginLeft="-"+getPadding(c,"Left")+"px";k.style.marginRight="-"+getPadding(c,"Right")+"px";if(m.find("alias")||(g=getBackground(c))=="transparent"){g="transparent";f="transparent";h=getParentBk(c);b="t"}else{f=getParentBk(c);h=Mix(g,f)}k.style.background=f;k.className="niftycorners";a=getPadding(c,"Bottom");if(m.find("small")){k.style.marginTop=(a-2)+"px";b+="s";e=2}else{if(m.find("big")){k.style.marginTop=(a-10)+"px";b+="b";e=8}else{k.style.marginTop=(a-5)+"px"}}for(j=e;j>0;j--){k.appendChild(CreateStrip(j,l,g,h,b))}c.style.paddingBottom=0;c.appendChild(k)}function CreateStrip(d,e,b,c,f){var a=CreateEl("b");a.className=f+d;a.style.backgroundColor=b;a.style.borderColor=c;if(e=="left"){a.style.borderRightWidth="0";a.style.marginRight="0"}else{if(e=="right"){a.style.borderLeftWidth="0";a.style.marginLeft="0"}}return(a)}function getElementsBySelector(d){var h,g,b="",n="",x=d,t="",r,e,m,q,w=[],p=[],o;if(d.find("#")){if(d.find(" ")){w=d.split(" ");var l=w[0].split("#");if(l.length==1){return(p)}m=document.getElementById(l[1]);if(m){u=m.getElementsByTagName(w[1]);for(h=0;h<u.length;h++){p.push(u[h])}}return(p)}else{w=d.split("#");x=w[0];b=w[1];if(b!=""){m=document.getElementById(b);if(m){p.push(m)}return(p)}}}if(d.find(".")){w=d.split(".");x=w[0];n=w[1];if(n.find(" ")){w=n.split(" ");n=w[0];t=w[1]}}var u=document.getElementsByTagName(x);if(n==""){for(h=0;h<u.length;h++){p.push(u[h])}return(p)}for(h=0;h<u.length;h++){o=u[h].className.split(" ");for(g=0;g<o.length;g++){if(o[g]==n){if(t==""){p.push(u[h])}else{r=u[h].getElementsByTagName(t);for(e=0;e<r.length;e++){p.push(r[e])}}}}}return(p)}function SameHeight(a,d){var g,b=a.split(","),f,c,e=[],h;for(g=0;g<b.length;g++){f=getElementsBySelector(b[g]);e=e.concat(f)}for(g=0;g<e.length;g++){if(e[g].offsetHeight>d){d=e[g].offsetHeight}e[g].style.height="auto"}for(g=0;g<e.length;g++){h=d-e[g].offsetHeight;if(h>0){f=CreateEl("b");f.className="niftyfill";f.style.height=h+"px";nc=e[g].lastChild;if(nc.className=="niftycorners"){e[g].insertBefore(f,nc)}else{e[g].appendChild(f)}}}}function CreateEl(a){return(document.createElement(a))}function FixIE(a){if(a.currentStyle!=null&&a.currentStyle.hasLayout!=null&&a.currentStyle.hasLayout==false){a.style.display="inline-block"}};