//This code is optimized by the w3compiler from Port80 Software:  BUY w3compiler to remove this comment from your optimized files at www.w3compiler.com!
h=Math;m=h.pow;n=h.abs;o=h.sqrt;p=h.max;q=h.min;u=h.round;v=h.floor;w=h.ceil;gd=parseInt;gl=document;gm=gl.implementation;go=top;gp=true;gx=Array;hc=false;hh=navigator.userAgent;hr=parent;hv=alert;hn=hh.toLowerCase().indexOf("msie")>-1;ib=gm&&gm.createDocument;hb=((hh.toLowerCase().indexOf('safari')!=-1)&&(hh.toLowerCase().indexOf('mac')!=-1))?gp:hc;function curvyCorners(){if(typeof(arguments[0])!="object")throw hi("First parameter of curvyCorners() must be an object.");if(typeof(arguments[1])!="object"&&typeof(arguments[1])!="string")throw hi("Second parameter of curvyCorners() must be an object or a class name.");if(typeof(arguments[1])=="string"){var startIndex=0;var boxCol=ho(arguments[1]);}else{var startIndex=1;var boxCol=arguments}var curvyCornersCol=new gx();if(arguments[0].validTags)var hj=arguments[0].validTags;else var hj=["div"];for(var i=startIndex,j=boxCol.length;i<j;i++){var currentTag=boxCol[i].tagName.toLowerCase();if(hp(hj,currentTag)!==hc){curvyCornersCol[curvyCornersCol.length]=new curvyObject(arguments[0],boxCol[i]);}}this.objects=curvyCornersCol;this.applyCornersToAll=function(){for(var x=0,k=this.objects.length;x<k;x++){this.objects[x].applyCorners();}}}function curvyObject(){this.box=arguments[1];this.settings=arguments[0];this.topContainer=null;this.bottomContainer=null;this.masterCorners=new gx();this.contentDIV=null;var boxHeight=gq(this.box,"height","height");var boxWidth=gq(this.box,"width","width");var borderWidth=gq(this.box,"borderTopWidth","border-top-width");var borderColour=gq(this.box,"borderTopColor","border-top-color");var boxColour=gq(this.box,"backgroundColor","background-color");var backgroundImage=gq(this.box,"backgroundImage","background-image");var boxPosition=gq(this.box,"position","position");var boxPadding=gq(this.box,"paddingTop","padding-top");this.boxHeight=gd(((boxHeight!=""&&boxHeight!="auto"&&boxHeight.indexOf("%")==-1)?boxHeight.substring(0,boxHeight.indexOf("px")):this.box.scrollHeight));this.boxWidth=gd(((boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1)?boxWidth.substring(0,boxWidth.indexOf("px")):this.box.scrollWidth));this.borderWidth=gd(((borderWidth!=""&&borderWidth.indexOf("px")!==-1)?borderWidth.slice(0,borderWidth.indexOf("px")):0));this.boxColour=format_colour(boxColour);this.boxPadding=gd(((boxPadding!=""&&boxPadding.indexOf("px")!==-1)?boxPadding.slice(0,boxPadding.indexOf("px")):0));this.borderColour=format_colour(borderColour);this.borderString=this.borderWidth+"px"+" solid "+this.borderColour;this.backgroundImage=((backgroundImage!="none")?backgroundImage:"");this.boxContent=this.box.innerHTML;if(boxPosition!="absolute")this.box.style.position="relative";this.box.style.padding="0px";if(hn&&boxWidth=="auto"&&boxHeight=="auto")this.box.style.width="100%";if(this.settings.autoPad==gp&&this.boxPadding>0)this.box.innerHTML="";this.applyCorners=function(){for(var t=0;t<2;t++){switch(t){case 0:if(this.settings.tl||this.settings.tr){var gc=gl.createElement("DIV");gc.style.width="100%";gc.style.fontSize="1px";gc.style.overflow="hidden";gc.style.position="absolute";gc.style.paddingLeft=this.borderWidth+"px";gc.style.paddingRight=this.borderWidth+"px";var topMaxRadius=p(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);gc.style.height=topMaxRadius+"px";gc.style.top=0-topMaxRadius+"px";gc.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(gc);}break;case 1:if(this.settings.bl||this.settings.br){var gc=gl.createElement("DIV");gc.style.width="100%";gc.style.fontSize="1px";gc.style.overflow="hidden";gc.style.position="absolute";gc.style.paddingLeft=this.borderWidth+"px";gc.style.paddingRight=this.borderWidth+"px";var botMaxRadius=p(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);gc.style.height=botMaxRadius+"px";gc.style.bottom=0-botMaxRadius+"px";gc.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(gc);}break}}if(this.topContainer)this.box.style.borderTopWidth="0px";if(this.bottomContainer)this.box.style.borderBottomWidth="0px";var corners=["tr","tl","br","bl"];for(var i in corners){if(i>-1<4){var cc=corners[i];if(!this.settings[cc]){if(((cc=="tr"||cc=="tl")&&this.topContainer!=null)||((cc=="br"||cc=="bl")&&this.bottomContainer!=null)){var g=gl.createElement("DIV");g.style.position="relative";g.style.fontSize="1px";g.style.overflow="hidden";if(this.backgroundImage=="")g.style.backgroundColor=this.boxColour;else g.style.backgroundImage=this.backgroundImage;switch(cc){case"tl":g.style.height=topMaxRadius-this.borderWidth+"px";g.style.marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";g.style.borderLeft=this.borderString;g.style.borderTop=this.borderString;g.style.left=-this.borderWidth+"px";break;case"tr":g.style.height=topMaxRadius-this.borderWidth+"px";g.style.marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";g.style.borderRight=this.borderString;g.style.borderTop=this.borderString;g.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";g.style.left=this.borderWidth+"px";break;case"bl":g.style.height=botMaxRadius-this.borderWidth+"px";g.style.marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";g.style.borderLeft=this.borderString;g.style.borderBottom=this.borderString;g.style.left=-this.borderWidth+"px";g.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;case"br":g.style.height=botMaxRadius-this.borderWidth+"px";g.style.marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";g.style.borderRight=this.borderString;g.style.borderBottom=this.borderString;g.style.left=this.borderWidth+"px";g.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break}}}else{if(this.masterCorners[this.settings[cc].radius]){var g=this.masterCorners[this.settings[cc].radius].cloneNode(gp);}else{var g=gl.createElement("DIV");g.style.height=this.settings[cc].radius+"px";g.style.width=this.settings[cc].radius+"px";g.style.position="absolute";g.style.fontSize="1px";g.style.overflow="hidden";var borderRadius=gd(this.settings[cc].radius-this.borderWidth);for(var ga=0,j=this.settings[cc].radius;ga<j;ga++){if((ga+1)>=borderRadius)var gr=-1;else var gr=(v(o(m(borderRadius,2)-m((ga+1),2)))-1);if(borderRadius!=j){if((ga)>=borderRadius)var gt=-1;else var gt=w(o(m(borderRadius,2)-m(ga,2)));if((ga+1)>=j)var gu=-1;else var gu=(v(o(m(j,2)-m((ga+1),2)))-1);}if((ga)>=j)var hk=-1;else var hk=w(o(m(j,2)-m(ga,2)));if(gr>-1)this.drawPixel(ga,0,this.boxColour,100,(gr+1),g,-1,this.settings[cc].radius);if(borderRadius!=j){for(var gf=(gr+1);gf<gt;gf++){if(this.settings.antiAlias){if(this.backgroundImage!=""){var borderFract=(hd(ga,gf,borderRadius)*100);if(borderFract<30){this.drawPixel(ga,gf,this.borderColour,100,1,g,0,this.settings[cc].radius);}else{this.drawPixel(ga,gf,this.borderColour,100,1,g,-1,this.settings[cc].radius);}}else{var hq=BlendColour(this.boxColour,this.borderColour,hd(ga,gf,borderRadius));this.drawPixel(ga,gf,hq,100,1,g,0,this.settings[cc].radius,cc);}}}if(this.settings.antiAlias){if(gu>=gt){if(gt==-1)gt=0;this.drawPixel(ga,gt,this.borderColour,100,(gu-gt+1),g,0,0);}}else{if(gu>=gr){this.drawPixel(ga,(gr+1),this.borderColour,100,(gu-gr),g,0,0);}}var hl=this.borderColour}else{var hl=this.boxColour;var gu=gr}if(this.settings.antiAlias){for(var gf=(gu+1);gf<hk;gf++){this.drawPixel(ga,gf,hl,(hd(ga,gf,j)*100),1,g,((this.borderWidth>0)?0:-1),this.settings[cc].radius);}}}this.masterCorners[this.settings[cc].radius]=g.cloneNode(gp);}if(cc!="br"){for(var t=0,k=g.childNodes.length;t<k;t++){var gn=g.childNodes[t];var gz=gd(gn.style.top.substring(0,gn.style.top.indexOf("px")));var ha=gd(gn.style.left.substring(0,gn.style.left.indexOf("px")));var he=gd(gn.style.height.substring(0,gn.style.height.indexOf("px")));if(cc=="tl"||cc=="bl"){gn.style.left=this.settings[cc].radius-ha-1+"px"}if(cc=="tr"||cc=="tl"){gn.style.top=this.settings[cc].radius-he-gz+"px"}switch(cc){case"tr":gn.style.backgroundPosition="-"+n((this.boxWidth-this.settings[cc].radius+this.borderWidth)+ha)+"px -"+n(this.settings[cc].radius-he-gz-this.borderWidth)+"px";break;case"tl":gn.style.backgroundPosition="-"+n((this.settings[cc].radius-ha-1)-this.borderWidth)+"px -"+n(this.settings[cc].radius-he-gz-this.borderWidth)+"px";break;case"bl":gn.style.backgroundPosition="-"+n((this.settings[cc].radius-ha-1)-this.borderWidth)+"px -"+n((this.boxHeight+this.settings[cc].radius+gz)-this.borderWidth)+"px";break}}}}if(g){switch(cc){case"tl":if(g.style.position=="absolute")g.style.top="0px";if(g.style.position=="absolute")g.style.left="0px";if(this.topContainer)this.topContainer.appendChild(g);break;case"tr":if(g.style.position=="absolute")g.style.top="0px";if(g.style.position=="absolute")g.style.right="0px";if(this.topContainer)this.topContainer.appendChild(g);break;case"bl":if(g.style.position=="absolute")g.style.bottom="0px";if(g.style.position=="absolute")g.style.left="0px";if(this.bottomContainer)this.bottomContainer.appendChild(g);break;case"br":if(g.style.position=="absolute")g.style.bottom="0px";if(g.style.position=="absolute")g.style.right="0px";if(this.bottomContainer)this.bottomContainer.appendChild(g);break}}}}var radiusDiff=new gx();radiusDiff["t"]=n(this.settings.tl.radius-this.settings.tr.radius);radiusDiff["b"]=n(this.settings.bl.radius-this.settings.br.radius);for(z in radiusDiff){if(z=="t"||z=="b"){if(radiusDiff[z]){var smallerCornerType=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");var gb=gl.createElement("DIV");gb.style.height=radiusDiff[z]+"px";gb.style.width=this.settings[smallerCornerType].radius+"px";gb.style.position="absolute";gb.style.fontSize="1px";gb.style.overflow="hidden";gb.style.backgroundColor=this.boxColour;switch(smallerCornerType){case"tl":gb.style.bottom="0px";gb.style.left="0px";gb.style.borderLeft=this.borderString;this.topContainer.appendChild(gb);break;case"tr":gb.style.bottom="0px";gb.style.right="0px";gb.style.borderRight=this.borderString;this.topContainer.appendChild(gb);break;case"bl":gb.style.top="0px";gb.style.left="0px";gb.style.borderLeft=this.borderString;this.bottomContainer.appendChild(gb);break;case"br":gb.style.top="0px";gb.style.right="0px";gb.style.borderRight=this.borderString;this.bottomContainer.appendChild(gb);break}}var ge=gl.createElement("DIV");ge.style.position="relative";ge.style.fontSize="1px";ge.style.overflow="hidden";ge.style.backgroundColor=this.boxColour;ge.style.backgroundImage=this.backgroundImage;switch(z){case"t":if(this.topContainer){if(this.settings.tl.radius&&this.settings.tr.radius){ge.style.height=topMaxRadius-this.borderWidth+"px";ge.style.marginLeft=this.settings.tl.radius-this.borderWidth+"px";ge.style.marginRight=this.settings.tr.radius-this.borderWidth+"px";ge.style.borderTop=this.borderString;if(this.backgroundImage!="")ge.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";this.topContainer.appendChild(ge);}this.box.style.backgroundPosition="0px -"+(topMaxRadius-this.borderWidth)+"px"}break;case"b":if(this.bottomContainer){if(this.settings.bl.radius&&this.settings.br.radius){ge.style.height=botMaxRadius-this.borderWidth+"px";ge.style.marginLeft=this.settings.bl.radius-this.borderWidth+"px";ge.style.marginRight=this.settings.br.radius-this.borderWidth+"px";ge.style.borderBottom=this.borderString;if(this.backgroundImage!="")ge.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(topMaxRadius+this.borderWidth))+"px";this.bottomContainer.appendChild(ge);}}break}}}if(this.settings.autoPad==gp&&this.boxPadding>0){var contentContainer=gl.createElement("DIV");contentContainer.style.position="relative";contentContainer.innerHTML=this.boxContent;contentContainer.className="autoPadDiv";var topPadding=n(topMaxRadius-this.boxPadding);var botPadding=n(botMaxRadius-this.boxPadding);if(topMaxRadius<this.boxPadding)contentContainer.style.paddingTop=topPadding+"px";if(botMaxRadius<this.boxPadding)contentContainer.style.paddingBottom=botMaxRadius+"px";contentContainer.style.paddingLeft=this.boxPadding+"px";contentContainer.style.paddingRight=this.boxPadding+"px";this.contentDIV=this.box.appendChild(contentContainer);}};this.drawPixel=function(ga,gf,colour,transAmount,height,g,image,cornerRadius){var gi=gl.createElement("DIV");gi.style.height=height+"px";gi.style.width="1px";gi.style.position="absolute";gi.style.fontSize="1px";gi.style.overflow="hidden";var topMaxRadius=p(this.settings["tr"].radius,this.settings["tl"].radius);if(image==-1&&this.backgroundImage!=""){gi.style.backgroundImage=this.backgroundImage;gi.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-ga)+this.borderWidth)+"px -"+((this.boxHeight+topMaxRadius+gf)-this.borderWidth)+"px"}else{gi.style.backgroundColor=colour}if(transAmount!=100)setOpacity(gi,transAmount);gi.style.top=gf+"px";gi.style.left=ga+"px";g.appendChild(gi);}}function ic(hr,gy,referenceNode){hr.insertBefore(gy,referenceNode.nextSibling);}function BlendColour(Col1,Col2,Col1Fraction){var red1=gd(Col1.substr(1,2),16);var hs=gd(Col1.substr(3,2),16);var blue1=gd(Col1.substr(5,2),16);var red2=gd(Col2.substr(1,2),16);var ht=gd(Col2.substr(3,2),16);var blue2=gd(Col2.substr(5,2),16);if(Col1Fraction>1||Col1Fraction<0)Col1Fraction=1;var endRed=u((red1*Col1Fraction)+(red2*(1-Col1Fraction)));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=u((hs*Col1Fraction)+(ht*(1-Col1Fraction)));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=u((blue1*Col1Fraction)+(blue2*(1-Col1Fraction)));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+gv(endRed)+gv(endGreen)+gv(endBlue);}function gv(strNum){base=strNum/16;rem=strNum%16;base-=(rem/16);baseS=hm(base);remS=hm(rem);return baseS+''+remS}function hm(x){if((x>=0)&&(x<=9)){return x}else{switch(x){case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F"}}}function hd(x,y,r){var gw=0;var gj=new gx(1);var gk=new gx(1);var gh=0;var gs="";var gg=o((m(r,2)-m(x,2)));if((gg>=y)&&(gg<(y+1))){gs="Left";gj[gh]=0;gk[gh]=gg-y;gh++}var gg=o((m(r,2)-m(y+1,2)));if((gg>=x)&&(gg<(x+1))){gs+="Top";gj[gh]=gg-x;gk[gh]=1;gh++}var gg=o((m(r,2)-m(x+1,2)));if((gg>=y)&&(gg<(y+1))){gs+="Right";gj[gh]=1;gk[gh]=gg-y;gh++}var gg=o((m(r,2)-m(y,2)));if((gg>=x)&&(gg<(x+1))){gs+="Bottom";gj[gh]=gg-x;gk[gh]=0}switch(gs){case"LeftRight":gw=q(gk[0],gk[1])+((p(gk[0],gk[1])-q(gk[0],gk[1]))/2);break;case"TopRight":gw=1-(((1-gj[0])*(1-gk[1]))/2);break;case"TopBottom":gw=q(gj[0],gj[1])+((p(gj[0],gj[1])-q(gj[0],gj[1]))/2);break;case"LeftBottom":gw=(gk[0]*gj[1])/2;break;default:gw=1}return gw}function rgb2Hex(rgbColour){try{var rgbArray=rgb2Array(rgbColour);var red=gd(rgbArray[0]);var hf=gd(rgbArray[1]);var blue=gd(rgbArray[2]);var hu="#"+gv(red)+gv(hf)+gv(blue);}catch(e){hv("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}return hu}function rgb2Array(rgbColour){var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));var rgbArray=rgbValues.split(", ");return rgbArray}function setOpacity(obj,opacity){opacity=(opacity==100)?99.999:opacity;if(hb&&obj.tagName!="IFRAME"){var rgbArray=rgb2Array(obj.style.backgroundColor);var red=gd(rgbArray[0]);var hf=gd(rgbArray[1]);var blue=gd(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+hf+", "+blue+", "+opacity/100+")"}else if(typeof(obj.style.opacity)!="undefined"){obj.style.opacity=opacity/100}else if(typeof(obj.style.MozOpacity)!="undefined"){obj.style.MozOpacity=opacity/100}else if(typeof(obj.style.filter)!="undefined"){obj.style.filter="alpha(opacity:"+opacity+")"}else if(typeof(obj.style.KHTMLOpacity)!="undefined"){obj.style.KHTMLOpacity=opacity/100}}function hp(array,value){for(var i=0;i<array.length;i++){if(array[i]===value)return i}return hc}function id(array,value){for(hw in array){if(hw===value)return gp}return hc}function addEvent(elm,evType,fn,hg){if(elm.addEventListener){elm.addEventListener(evType,fn,hg);return gp}else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,fn);return r}else{elm['on'+evType]=fn}}function removeEvent(obj,evType,fn,hg){if(obj.removeEventListener){obj.removeEventListener(evType,fn,hg);return gp}else if(obj.detachEvent){var r=obj.detachEvent("on"+evType,fn);return r}else{hv("Handler could not be removed");}}function format_colour(colour){var returnColour="#ffffff";if(colour!=""&&colour!="transparent"){if(colour.substr(0,3)=="rgb"){returnColour=rgb2Hex(colour);}else if(colour.length==4){returnColour="#"+colour.substring(1,2)+colour.substring(1,2)+colour.substring(2,3)+colour.substring(2,3)+colour.substring(3,4)+colour.substring(3,4);}else{returnColour=colour}}return returnColour}function gq(obj,hx,hy){try{if(obj.currentStyle){var returnVal=eval("obj.currentStyle."+hx);}else{if(hb&&obj.style.display=="none"){obj.style.display="";var hz=gp}var returnVal=gl.defaultView.getComputedStyle(obj,'').getPropertyValue(hy);if(hb&&hz){obj.style.display="none"}}}catch(e){}return returnVal}function ho(searchClass,gy,tag){var classElements=new gx();if(gy==null)gy=gl;if(tag==null)tag='*';var els=gy.getElementsByTagName(tag);var elsLen=els.length;var ia=new RegExp("(^|\s)"+searchClass+"(\s|$)");for(i=0,j=0;i<elsLen;i++){if(ia.test(els[i].className)){classElements[j]=els[i];j++}}return classElements}function hi(errorMessage){return new Error("curvyCorners Error:\n"+errorMessage)}
