function onIEWinResize(d){function f(g){return(isNaN(parseInt(g,10))?0:parseInt(g,10))}if(!d){d=window.event}var a,c,b=this,e=b.getElementsByTagName("div");if(e.length>0){if(b.currentStyle){c=b.currentStyle}else{if(document.defaultView&&document.defaultView.getComputedStyle){c=document.defaultView.getComputedStyle(b,"")}else{c=b.style}}for(a=0;a<e.length;a++){if(e[a].className=="buzy_ele"){e[a].style.height=(b.offsetHeight-f(c.borderBottomWidth)-f(c.borderTopWidth));e[a].style.width=(b.offsetWidth-f(c.borderLeftWidth)-f(c.borderRightWidth));e[a].firstChild.style.height=e[a].style.height;e[a].firstChild.style.width=e[a].style.width;break}}}}function getBusyOverlay(r,s,D,E){if(typeof(r)==="object"&&document.getElementsByTagName){function A(b){return(isNaN(parseInt(b,10))?0:parseInt(b,10))}var v,G,j,l,H,B,F,w,m,n,x,z,e,k,u,I,c,a,h,f,q,g,y,t,p,d=true;if(r.currentStyle){k=r.currentStyle}else{if(document.defaultView&&document.defaultView.getComputedStyle){k=document.defaultView.getComputedStyle(r,"")}else{k=r.style}}while(k.display.search(/block|inline-block|table|inline-table|list-item/i)<0){r=r.parentNode;if(r.currentStyle){k=r.currentStyle}else{if(document.defaultView&&document.defaultView.getComputedStyle){k=document.defaultView.getComputedStyle(r,"")}else{k=r.style}}if(r.tagName.toUpperCase()==="BODY"){r=""}}if(typeof(r)==="object"){if(!D){D=new Object();D.opacity=0}if(!E){E=new Object();E.size=32}g=Math.max(0,Math.min(1,(typeof D.opacity==="number"?D.opacity:0)||0));y=(typeof D.color==="string"?D.color:"white");t=(typeof D.text==="string"?D.text:"");p=(typeof D.style==="string"?D.style:"");h=document.createElement("canvas");j=h.getContext?1:0;l=navigator.userAgent.indexOf("WebKit")>-1?1:0;H=navigator.userAgent.indexOf("Gecko")>-1&&window.updateCommands?1:0;v=navigator.appName=="Microsoft Internet Explorer"&&window.navigator.systemLanguage&&!window.opera?1:0;G=document.all&&document.namespaces?1:0;c=document.createElement("div");r.style.position=(k.position=="static"?"relative":k.position);e=r.style.zIndex>=0?(r.style.zIndex-0+2):2;if(v&&!k.hasLayout){r.style.zoom=1}c.style.position="absolute";c.style.overflow="hidden";c.style.display="block";c.style.zIndex=e;c.style.left=0+"px";c.style.top=0+"px";c.style.width="100%";c.style.height=s+"px";if(typeof(k.borderRadius)=="undefined"){if(typeof(k.MozBorderRadius)!="undefined"){m=parseFloat(k.MozBorderRadiusTopleft)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderTopWidth));n=parseFloat(k.MozBorderRadiusTopright)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderTopWidth));x=parseFloat(k.MozBorderRadiusBottomleft)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderBottomWidth));z=parseFloat(k.MozBorderRadiusBottomright)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderBottomWidth));c.style.MozBorderRadiusTopleft=m+"px";c.style.MozBorderRadiusTopright=n+"px";c.style.MozBorderRadiusBottomleft=x+"px";c.style.MozBorderRadiusBottomright=z+"px"}else{if(typeof(k.WebkitBorderRadius)!="undefined"){m=parseFloat(k.WebkitBorderTopLeftRadius)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderTopWidth));n=parseFloat(k.WebkitBorderTopRightRadius)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderTopWidth));x=parseFloat(k.WebkitBorderBottomLeftRadius)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderBottomWidth));z=parseFloat(k.WebkitBorderBottomRightRadius)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderBottomWidth));c.style.WebkitBorderTopLeftRadius=m+"px";c.style.WebkitBorderTopRightRadius=n+"px";c.style.WebkitBorderBottomLeftRadius=x+"px";c.style.WebkitBorderBottomRightRadius=z+"px"}}}else{m=parseFloat(k.borderTopLeftRadius)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderTopWidth));n=parseFloat(k.borderTopRightRadius)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderTopWidth));x=parseFloat(k.borderBottomLeftRadius)-Math.min(parseFloat(k.borderLeftWidth),parseFloat(k.borderBottomWidth));z=parseFloat(k.borderBottomRightRadius)-Math.min(parseFloat(k.borderRightWidth),parseFloat(k.borderBottomWidth));c.style.borderTopLeftRadius=m+"px";c.style.borderTopRightRadius=n+"px";c.style.borderBottomLeftRadius=x+"px";c.style.borderBottomRightRadius=z+"px"}r.appendChild(c);I=document.createElement("div");I.style.position="absolute";I.style.cursor="progress";I.style.display="block";I.style.zIndex=(e-1);I.style.left=0+"px";I.style.top=0+"px";I.style.width=100+"%";I.style.height=100+"%";I.style.backgroundColor=y;if(v){I.style.zoom=1;I.style.margin="0px";I.style.padding="0px";I.style.height=c.style.height;I.style.width=c.style.width}if(typeof(k.borderRadius)=="undefined"){if(typeof(k.MozBorderRadius)!="undefined"){I.style.MozBorderRadiusTopleft=m+"px";I.style.MozBorderRadiusTopright=n+"px";I.style.MozBorderRadiusBottomleft=x+"px";I.style.MozBorderRadiusBottomright=z+"px"}else{if(typeof(k.WebkitBorderRadius)!="undefined"){I.style.WebkitBorderTopLeftRadius=m+"px";I.style.WebkitBorderTopRightRadius=n+"px";I.style.WebkitBorderBottomLeftRadius=x+"px";I.style.WebkitBorderBottomRightRadius=z+"px"}}}else{I.style.borderTopLeftRadius=m+"px";I.style.borderTopRightRadius=n+"px";I.style.borderBottomLeftRadius=x+"px";I.style.borderBottomRightRadius=z+"px"}if(v){I.style.filter="alpha(opacity="+parseInt(g*100)+")"}else{I.style.opacity=g}c.appendChild(I);u=Math.max(16,Math.min(512,(typeof E.size==="number"?(E.size==0?32:E.size):32)));if(G){if(document.namespaces.v==null){var C=document.createStyleSheet();C.addRule("v\\:*","behavior: url(#default#VML);");document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}if(!j){h=document.createElement("div")}h.style.position="absolute";h.style.cursor="progress";h.style.zIndex=(e-0+1);h.style.top="50%";h.style.left="50%";h.style.marginTop="-"+(u/2)+"px";h.style.marginLeft="-"+(u/2)+"px";h.width=u;h.height=u;h.style.width=u+"px";h.style.height=u+"px";c.appendChild(h);if(typeof(t)!=""){a=document.createElement("div");a.style.position="absolute";a.style.overflow="hidden";a.style.cursor="progress";a.style.zIndex=(e-0+1);a.style.top="50%";a.style.left="0px";a.style.marginTop=2+(u/2)+"px";a.style.textAlign="center";a.style.width=100+"%";a.style.height="auto";if(typeof(p)!=""){a.innerHTML="<span "+(p.match(/:/i)?"style":"class")+'="'+p+'">'+t+"</span>"}else{a.innerHTML="<span>"+t+"</span>"}c.appendChild(a)}if(H){c.style.MozUserSelect="none";I.style.MozUserSelect="none";h.style.MozUserSelect="none"}else{if(l){c.style.KhtmlUserSelect="none";I.style.KhtmlUserSelect="none";h.style.KhtmlUserSelect="none"}else{if(v){c.style.unselectable="on";I.style.unselectable="on";h.style.unselectable="on"}}}if(G){q=getBusyVL(h,E.color,E.size,E.type,E.iradius,E.weight,E.count,E.speed,E.minopac);q.start()}else{if(j){q=getBusyCV(h.getContext("2d"),E.color,E.size,E.type,E.iradius,E.weight,E.count,E.speed,E.minopac);q.start()}else{q=getBusy(h,E.color,E.size,E.type,E.iradius,E.weight,E.count,E.speed,E.minopac);q.start()}}if(v){r.onresize=onIEWinResize}return{remove:function(){if(d){d=false;q.stop();delete q;r.removeChild(c)}}}}}}function getBusy(s,l,z,b,g,o,e,F,D){function B(c){var f=c||"#000000";if(!f.match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)){if(c.match(/^#[0-9a-f][0-9a-f][0-9a-f]$/i)){f="#"+c.substr(1,1)+c.substr(1,1)+c.substr(2,1)+c.substr(2,1)+c.substr(3,1)+c.substr(3,1)}}return f}var d=false,E=0,j=0,C=0,H=100,I,G,A,u,n,m,r,a,J,K,q=new Array();I=B(l);b=b||"t";u=(b.match(/^[coprt]/i)?b.substr(0,1).toLowerCase():"t");e=Math.max(5,Math.min(36,e||12));F=Math.max(30,Math.min(1000,F||96));z=Math.max(16,Math.min(512,z||32));g=Math.max(1,Math.min((z/2)-2,g||z/4));o=Math.max(1,Math.min((z/2)-g,o||z/10));D=Math.max(0,Math.min(0.5,D||0.25));C=360/e;a=(Math.PI/2)*-1;J=Math.PI/180;o=(u!="c"?parseInt((o/2)*3):o);r=parseInt((z/2)-(o/2));for(E=0;E<e;E++){K=document.createElement("div");n=Math.round(r+r*Math.cos(a+(E+1)*C*J));m=Math.round(r+r*Math.sin(a+(E+1)*C*J));K.style.position="absolute";K.style.margin="0px";K.style.width=o+"px";K.style.height=o+"px";K.style.lineHeight="1px";K.style.fontSize="0px";K.style.top=m+"px";K.style.left=n+"px";K.style.backgroundColor=I;if(document.all&&!window.opera){K.style.filter="alpha(opacity="+parseInt(Math.min(1,Math.max(D,1-((e+1-E)/(e+1))))*100)+")"}else{K.style.opacity=Math.min(1,Math.max(D,1-((e+1-E)/(e+1))))}s.appendChild(K);q[E]=K}function k(){if(!d){return}j=(j+1)%e;if(document.all&&!window.opera){for(E=0;E<e;E++){C=((j+E)%e);q[C].style.filter="alpha(opacity="+parseInt(Math.min(1,Math.max(D,1-((e+1-E)/(e+1))))*100)+")"}}else{for(E=0;E<e;E++){C=((j+E)%e);q[C].style.opacity=Math.min(1,Math.max(D,1-((e+1-E)/(e+1))))}}setTimeout(k,F)}k(0);return{start:function(){if(!d){d=true;k(0)}},stop:function(){d=false;for(E=0;E<e;E++){if(document.all&&!window.opera){q[E].style.filter="alpha(opacity=0)"}else{q[E].setAttribute("opacity",0)}}},pause:function(){d=false}}}function getBusyVL(u,l,z,b,g,r,e,F,D){function B(c){var f=c||"#000000";if(!f.match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)){if(c.match(/^#[0-9a-f][0-9a-f][0-9a-f]$/i)){f="#"+c.substr(1,1)+c.substr(1,1)+c.substr(2,1)+c.substr(2,1)+c.substr(3,1)+c.substr(3,1)}}return f}var d=false,j=0,C=0,H=100,J,E,G,A,v,q,o,M,a,I,L,n,K,m,s=new Array();J=B(l);b=b||"t";v=(b.match(/^[coprt]/i)?b.substr(0,1).toLowerCase():"t");e=Math.max(5,Math.min(36,e||12));F=Math.max(30,Math.min(1000,F||96));z=Math.max(16,Math.min(512,z||32));g=Math.max(1,Math.min((z/2)-2,g||z/4));r=Math.max(1,Math.min((z/2)-g,r||z/10));D=Math.max(0,Math.min(0.5,D||0.25));G=(z/2)-g;q=z/2;o=q;C=360/e;M=parseInt((z/2)*H);a=parseInt(M/2);I=parseInt((r/2)*H);L=parseInt(I/2);n=M-parseInt(g*H);switch(v){case"c":A="m "+M+","+(n-I)+" ar "+(M-I)+","+(n-I-I)+","+(M+I)+","+n+","+(M-I)+","+(n-I-I)+","+(M-I)+","+(n-I-I)+" e";break;case"p":A="m "+(M-L)+",0 l "+(M-I)+","+n+","+(M+I)+","+n+","+(M+L)+",0 x e";break;case"o":A="m "+M+","+(n-a)+" ar "+(M-I)+",0,"+(M+I)+","+n+","+(M-I)+",0,"+(M-I)+",0 e";break;case"t":A="m "+(M-I)+","+n+" l "+(M-I)+","+I+" qy "+M+",0 qx "+(M+I)+","+I+" l "+(M+I)+","+n+" x e";break;default:A="m "+(M-I)+",0 l "+(M-I)+","+n+","+(M+I)+","+n+","+(M+I)+",0 x e";break}for(E=0;E<e;E++){K=document.createElement("v:shape");K.setAttribute("filled","t");K.setAttribute("stroked","f");K.setAttribute("coordorigin","0,0");K.setAttribute("coordsize",(z*H)+","+(z*H));K.setAttribute("path",A);K.style.rotation=(E*C);K.style.position="absolute";K.style.margin="0px";K.style.width=z+"px";K.style.height=z+"px";K.style.top="-1px";K.style.left="-1px";u.appendChild(K);m=document.createElement("v:fill");m.setAttribute("color",J);m.setAttribute("opacity",Math.min(1,Math.max(D,1-((e+1-E)/(e+1)))));K.appendChild(m);s[E]=m}function k(){if(!d){return}j=(j+1)%e;for(E=0;E<e;E++){C=((j+E)%e);s[C].setAttribute("opacity",Math.min(1,Math.max(D,1-((e+1-E)/(e+1)))))}setTimeout(k,F)}k(0);return{start:function(){if(!d){d=true;k(0)}},stop:function(){d=false;for(E=0;E<e;E++){s[E].setAttribute("opacity",0)}},pause:function(){d=false}}}function getBusyCV(v,m,r,a,g,p,d,C,A){function f(h){function i(x){return(Math.max(0,Math.min(parseInt(x,16),255)))}var w=0,t=0,c=0;h=h||"#000";if(h.match(/^#[0-9a-f][0-9a-f][0-9a-f]$/i)){w=i(h.substr(1,1)+h.substr(1,1)),t=i(h.substr(2,1)+h.substr(2,1)),c=i(h.substr(3,1)+h.substr(3,1))}else{if(h.match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)){w=i(h.substr(1,2)),t=i(h.substr(3,2)),c=i(h.substr(5,2))}}return w+","+t+","+c}function s(i,c,t){i.beginPath();i.moveTo(-c/2,t/2);i.quadraticCurveTo(-c/2,0,0,0);i.quadraticCurveTo(c/2,0,c/2,t/2);i.quadraticCurveTo(c/2,t,0,t);i.quadraticCurveTo(-c/2,t,-c/2,t/2);i.fill()}function e(i,c,t){i.beginPath();i.moveTo(c/2,0);i.lineTo(-c/2,0);i.lineTo(-c/2,t-(c/2));i.quadraticCurveTo(-c/2,t,0,t);i.quadraticCurveTo(c/2,t,c/2,t-(c/2));i.fill()}function k(i,c,t){i.beginPath();i.moveTo(c/2,0);i.lineTo(-c/2,0);i.lineTo(-c/4,t);i.lineTo(c/4,t);i.fill()}function u(c,h,i){c.beginPath();c.arc(h,h,h,0,Math.PI*2,false);c.fill()}var b=false,j=0,z=0,E,B,D,q,o,n;E=f(m);a=a||"t";q=(a.match(/^[coprt]/i)?a.substr(0,1).toLowerCase():"t");d=Math.max(5,Math.min(36,d||12));C=Math.max(30,Math.min(1000,C||96));r=Math.max(16,Math.min(512,r||32));g=Math.max(1,Math.min((r/2)-2,g||r/4));p=Math.max(1,Math.min((r/2)-g,p||r/10));A=Math.max(0,Math.min(0.5,A||0.25));D=(r/2)-g;o=r/2;n=o;function l(){if(!b){return}j=(j+1)%d;v.clearRect(0,0,r,r);v.save();v.translate(o,n);for(B=0;B<d;B++){z=2*((j+B)%d)*Math.PI/d;v.save();v.translate(g*Math.sin(-z),g*Math.cos(-z));v.rotate(z);v.fillStyle="rgba("+E+","+Math.min(1,Math.max(A,1-((d+1-B)/(d+1))))+")";switch(q){case"c":u(v,p/2,D);break;case"o":s(v,p,D);break;case"p":k(v,p,D);break;case"t":e(v,p,D);break;default:v.fillRect(-p/2,0,p,D);break}v.restore()}v.restore();setTimeout(l,C)}l(0);return{start:function(){if(!b){b=true;l(0)}},stop:function(){b=false;v.clearRect(0,0,r,r)},pause:function(){b=false}}};
