String.prototype.find=function(a){return(this.indexOf(a)>=0?true:false)};var corners={r1:{margin:"0 3px",borderWidth:"0 2px"},r2:{margin:"0 2px"},r3:{margin:"0 1px"},r4:{height:"2px"},rb1:{margin:"0 8px",borderWidth:"0 2px"},rb2:{margin:"0 6px",borderWidth:"0 2px"},rb3:{margin:"0 5px"},rb4:{margin:"0 4px"},rb5:{margin:"0 3px"},rb6:{margin:"0 2px"},rb7:{margin:"0 1px",height:"2px"},rb8:{margin:"0",height:"2px"},rs1:{margin:"0 1px"},t1:{borderWidth:"0 5px"},t2:{borderWidth:"0 3px"},t3:{borderWidth:"0 2px"},t4:{height:"2px"},tb1:{borderWidth:"0 10px"},tb2:{borderWidth:"0 8px"},tb3:{borderWidth:"0 6px"},tb4:{borderWidth:"0 5px"},tb5:{borderWidth:"0 4px"},tb6:{borderWidth:"0 3px"},tb7:{borderWidth:"0 2px",height:"2px"},tb8:{borderWidth:"0 1px",height:"2px"},ts1:{borderWidth:"0 2px"}};function Nifty(u,e){var n=function(h){return document.getElementById(h)};var k=function(h,i){if(!h.style){return}for(s in i){h.style[s]=i[s]}return h};var m=function(i,h){if(i.currentStyle){return(i.currentStyle[h])}if(document.defaultView.getComputedStyle){return(document.defaultView.getComputedStyle(i,"")[h])}if(i.style){return i.style[h]}return 0};var f=function(h,B){for(var v=0;v<h.length;v++){B(h[v],v)}};var z=function(B,E){var G,H="",D="",C=new Array();if(E!=""){var h=[["left","tl bl"],["right","tr br"],["top","tr tl"],["bottom","br bl"],["transparent","alias"]];f(h,function(i){E=E.replace(i[0],i[1])});if(E.find("tl")){H="left"}if(E.find("tr")){H=(H=="left")?"both":"right"}if(E.find("bl")){D="left"}if(E.find("br")){D=(D=="left")?"both":"right"}}if(H==""&&D==""&&!E.find("none")){H="both";D="both"}var F=r(B);f(F,function(i){o(i);var I=[];if(H!=""){I.push(y(i,H,E,"Top"))}if(D!=""){I.push(y(i,D,E,"Bottom"))}i.oldSetStyle=i.setStyle;i.setStyle=function(v){this.oldSetStyle(v);this.updateColors()};i.updateColors=function(){for(G=0;G<I.length;G++){c(I[G],E.find("alias"))}}})};var r=function(B){var E,D,h="",H="",P=B,M="",L,C,G,K,O=[],J=[],I;if(B.find("#")){if(B.find(" ")){O=B.split(" ");var F=O[0].split("#");if(F.length==1){return(J)}G=n(F[1]);if(G){N=G.getElementsByTagName(O[1]);for(E=0;E<N.length;E++){J.push(N[E])}}return(J)}else{O=B.split("#");P=O[0];h=O[1];if(h!=""){G=n(h);if(G){J.push(G)}return(J)}}}if(B.find(".")){O=B.split(".");P=O[0];H=O[1];if(H.find(" ")){O=H.split(" ");H=O[0];M=O[1]}}var N=document.getElementsByTagName(P);if(H==""){for(E=0;E<N.length;E++){J.push(N[E])}return(J)}for(E=0;E<N.length;E++){I=N[E].className.split(" ");for(D=0;D<I.length;D++){if(I[D]==H){if(M==""){J.push(N[E])}else{L=N[E].getElementsByTagName(M);for(C=0;C<L.length;C++){J.push(L[C])}}}}}return(J)};var c=function(C,B){el=C.parentNode;var i,h,v="";if(B||(i=A(el))=="transparent"){i="transparent";h="transparent";v=g(el)}else{h=g(el);v=q(i,h)}k(C,{background:h});t(C,i,v)};var t=function(v,h,i){f(v.getElementsByTagName("b"),function(B){k(B,{backgroundColor:h,borderColor:i})})};var y=function(B,J,N,K){isTop=(K=="Top");var I=document.createElement("b"),C=4,G="",h,H,v="r",D,F;k(I,{marginLeft:"-"+l(B,"Left")+"px"});k(I,{marginRight:"-"+l(B,"Right")+"px"});if(N.find("alias")||(F=A(B))=="transparent"){v="t"}k(I,{display:"block"});I.className="niftycorners";h=l(B,K);var M={};var L=(isTop)?"marginBottom":"marginTop";if(N.find("small")){M[L]=(h-2)+"px";v+="s";C=2}else{if(N.find("big")){M[L]=(h-10)+"px";v+="b";C=8}else{M[L]=(h-5)+"px"}}k(I,M);var E=[];for(H=1;H<=C;H++){j=(isTop)?H:C-H+1;I.appendChild(b(j,J,v))}if(isTop){k(B,{paddingTop:0});B.insertBefore(I,B.firstChild)}else{k(B,{paddingBottom:0});B.appendChild(I)}c(I,N.find("alias"));return I};var b=function(i,v,B){var h=k(document.createElement("b"),{display:"block",height:"1px",lineHeight:"1px",fontSize:"1px",overflow:"hidden",borderStyle:"solid",borderWidth:"0 1px"});k(h,corners[B+i]);if(v=="left"){k(h,{borderRightWidth:"0",marginRight:"0"})}else{if(v=="right"){k(h,{borderLeftWidth:"0",marginLeft:"0"})}}return(h)};var o=function(h){if(h.currentStyle&&h.currentStyle.hasLayout!=null&&h.currentStyle.hasLayout==false){k(h,{display:"inline-block"})}};var d=function(h,D){var G,B=$A(h.split(",")),F,C,E=[],H;f(B,function(i){f(r(i),function(v){if(v.offsetHeight>D){D=E[G].offsetHeight}k(v,{height:"auto"});H=D-v.offsetHeight;if(H>0){F=k(document.createElement("b"),{height:H+"px",display:"block"});nc=v.lastChild;if(nc.className=="niftycorners"){v.insertBefore(F,nc)}else{v.appendChild(F)}}})})};var g=function(h){var i=h.parentNode,v;while(i.tagName.toUpperCase()!="HTML"&&(v=A(i))=="transparent"){i=i.parentNode}if(v=="transparent"){v="#FFFFFF"}return(v)};var A=function(h){var i=m(h,"backgroundColor");if(!i||i=="transparent"||i.find("rgba(0, 0, 0, 0)")){return("transparent")}if(i.find("rgb")){i=a(i)}return(i)};var l=function(h,i){var v=m(h,"padding"+i)||"0";return(parseInt(v))};var a=function(G){var E="",B,D,C;var F=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var D=F.exec(G);for(C=1;C<4;C++){B=parseInt(D[C]).toString(16);if(B.length==1){E+="0"+B}else{E+=B}}return("#"+E)};var q=function(E,D){var C,h,G,F=new Array(3);var B=(E.length==4)?1:2;var v=(D.length==4)?1:2;for(C=0;C<3;C++){h=parseInt(E.substr(1+B*C,B),16);if(B==1){h=16*h+h}G=parseInt(D.substr(1+v*C,v),16);if(v==1){G=16*G+G}F[C]=Math.floor((h*50+G*50)/100);F[C]=F[C].toString(16);if(F[C].length==1){F[C]="0"+F[C]}}return("#"+F[0]+F[1]+F[2])};var w,p=u.split(","),x=0;var e=e||"";if(e.find("fixed-height")){x=r(p[0])[0].offsetHeight}for(w=0;w<p.length;w++){z(p[w],e)}if(e.find("height")){d(u,x)}};
