if(!document.createElement("canvas").getContext){(function(){var v=Math;var w=v.round;var s=v.sin;var E=v.cos;var n=v.abs;var D=v.sqrt;var a=10;var o=a/2;function h(){return this.context_||(this.context_=new q(this))}var u=Array.prototype.slice;function F(m,G,H){var j=u.call(arguments,2);return function(){return m.apply(G,j.concat(u.call(arguments)))}}var k={init:function(j){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var m=j||document;m.createElement("canvas");m.attachEvent("onreadystatechange",F(this.init_,this,m))}},init_:function(H){if(!H.namespaces.g_vml_){H.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!H.namespaces.g_o_){H.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!H.styleSheets.ex_canvas_){var G=H.createStyleSheet();G.owningElement.id="ex_canvas_";G.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var m=H.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){this.initElement(m[j])}},initElement:function(m){if(!m.getContext){m.getContext=h;m.innerHTML="";m.attachEvent("onpropertychange",C);m.attachEvent("onresize",b);var j=m.attributes;if(j.width&&j.width.specified){m.style.width=j.width.nodeValue+"px"}else{m.width=m.clientWidth}if(j.height&&j.height.specified){m.style.height=j.height.nodeValue+"px"}else{m.height=m.clientHeight}}return m}};function C(m){var j=m.srcElement;switch(m.propertyName){case"width":j.style.width=j.attributes.width.nodeValue+"px";j.getContext().clearRect();break;case"height":j.style.height=j.attributes.height.nodeValue+"px";j.getContext().clearRect();break}}function b(m){var j=m.srcElement;if(j.firstChild){j.firstChild.style.width=j.clientWidth+"px";j.firstChild.style.height=j.clientHeight+"px"}}k.init();var e=[];for(var z=0;z<16;z++){for(var y=0;y<16;y++){e[z*16+y]=z.toString(16)+y.toString(16)}}function r(){return[[1,0,0],[0,1,0],[0,0,1]]}function d(H,G){var m=r();for(var j=0;j<3;j++){for(var K=0;K<3;K++){var I=0;for(var J=0;J<3;J++){I+=H[j][J]*G[J][K]}m[j][K]=I}}return m}function x(m,j){j.fillStyle=m.fillStyle;j.lineCap=m.lineCap;j.lineJoin=m.lineJoin;j.lineWidth=m.lineWidth;j.miterLimit=m.miterLimit;j.shadowBlur=m.shadowBlur;j.shadowColor=m.shadowColor;j.shadowOffsetX=m.shadowOffsetX;j.shadowOffsetY=m.shadowOffsetY;j.strokeStyle=m.strokeStyle;j.globalAlpha=m.globalAlpha;j.arcScaleX_=m.arcScaleX_;j.arcScaleY_=m.arcScaleY_;j.lineScale_=m.lineScale_}function c(m){var I,H=1;m=String(m);if(m.substring(0,3)=="rgb"){var K=m.indexOf("(",3);var j=m.indexOf(")",K+1);var J=m.substring(K+1,j).split(",");I="#";for(var G=0;G<3;G++){I+=e[Number(J[G])]}if(J.length==4&&m.substr(3,1)=="a"){H=J[3]}}else{I=m}return{color:I,alpha:H}}function t(j){switch(j){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function q(m){this.m_=r();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=a*1;this.globalAlpha=1;this.canvas=m;var j=m.ownerDocument.createElement("div");j.style.width=m.clientWidth+"px";j.style.height=m.clientHeight+"px";j.style.overflow="hidden";j.style.position="absolute";m.appendChild(j);this.element_=j;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var l=q.prototype;l.clearRect=function(){this.element_.innerHTML=""};l.beginPath=function(){this.currentPath_=[]};l.moveTo=function(m,j){var G=this.getCoords_(m,j);this.currentPath_.push({type:"moveTo",x:G.x,y:G.y});this.currentX_=G.x;this.currentY_=G.y};l.lineTo=function(m,j){var G=this.getCoords_(m,j);this.currentPath_.push({type:"lineTo",x:G.x,y:G.y});this.currentX_=G.x;this.currentY_=G.y};l.bezierCurveTo=function(G,m,M,L,K,I){var j=this.getCoords_(K,I);var J=this.getCoords_(G,m);var H=this.getCoords_(M,L);p(this,J,H,j)};function p(j,H,G,m){j.currentPath_.push({type:"bezierCurveTo",cp1x:H.x,cp1y:H.y,cp2x:G.x,cp2y:G.y,x:m.x,y:m.y});j.currentX_=m.x;j.currentY_=m.y}l.quadraticCurveTo=function(K,G,m,j){var J=this.getCoords_(K,G);var I=this.getCoords_(m,j);var L={x:this.currentX_+2/3*(J.x-this.currentX_),y:this.currentY_+2/3*(J.y-this.currentY_)};var H={x:L.x+(I.x-this.currentX_)/3,y:L.y+(I.y-this.currentY_)/3};p(this,L,H,I)};l.arc=function(N,L,M,I,m,G){M*=a;var R=G?"at":"wa";var O=N+E(I)*M-o;var Q=L+s(I)*M-o;var j=N+E(m)*M-o;var P=L+s(m)*M-o;if(O==j&&!G){O+=0.125}var H=this.getCoords_(N,L);var K=this.getCoords_(O,Q);var J=this.getCoords_(j,P);this.currentPath_.push({type:R,x:H.x,y:H.y,radius:M,xStart:K.x,yStart:K.y,xEnd:J.x,yEnd:J.y})};l.rect=function(G,m,j,H){this.moveTo(G,m);this.lineTo(G+j,m);this.lineTo(G+j,m+H);this.lineTo(G,m+H);this.closePath()};l.strokeRect=function(G,m,j,H){var I=this.currentPath_;this.beginPath();this.moveTo(G,m);this.lineTo(G+j,m);this.lineTo(G+j,m+H);this.lineTo(G,m+H);this.closePath();this.stroke();this.currentPath_=I};l.fillRect=function(G,m,j,H){var I=this.currentPath_;this.beginPath();this.moveTo(G,m);this.lineTo(G+j,m);this.lineTo(G+j,m+H);this.lineTo(G,m+H);this.closePath();this.fill();this.currentPath_=I};l.createLinearGradient=function(m,H,j,G){var I=new A("gradient");I.x0_=m;I.y0_=H;I.x1_=j;I.y1_=G;return I};l.createRadialGradient=function(H,J,G,m,I,j){var K=new A("gradientradial");K.x0_=H;K.y0_=J;K.r0_=G;K.x1_=m;K.y1_=I;K.r1_=j;return K};l.drawImage=function(U,G){var N,L,P,ac,S,Q,X,ae;var O=U.runtimeStyle.width;var T=U.runtimeStyle.height;U.runtimeStyle.width="auto";U.runtimeStyle.height="auto";var M=U.width;var aa=U.height;U.runtimeStyle.width=O;U.runtimeStyle.height=T;if(arguments.length==3){N=arguments[1];L=arguments[2];S=Q=0;X=P=M;ae=ac=aa}else{if(arguments.length==5){N=arguments[1];L=arguments[2];P=arguments[3];ac=arguments[4];S=Q=0;X=M;ae=aa}else{if(arguments.length==9){S=arguments[1];Q=arguments[2];X=arguments[3];ae=arguments[4];N=arguments[5];L=arguments[6];P=arguments[7];ac=arguments[8]}else{throw Error("Invalid number of arguments")}}}var ad=this.getCoords_(N,L);var I=X/2;var m=ae/2;var ab=[];var j=10;var K=10;ab.push(" <g_vml_:group",' coordsize="',a*j,",",a*K,'"',' coordorigin="0,0"',' style="width:',j,"px;height:",K,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var J=[];J.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",w(ad.x/a),",","Dy=",w(ad.y/a),"");var Z=ad;var Y=this.getCoords_(N+P,L);var V=this.getCoords_(N,L+ac);var R=this.getCoords_(N+P,L+ac);Z.x=v.max(Z.x,Y.x,V.x,R.x);Z.y=v.max(Z.y,Y.y,V.y,R.y);ab.push("padding:0 ",w(Z.x/a),"px ",w(Z.y/a),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",J.join(""),", sizingmethod='clip');")}else{ab.push("top:",w(ad.y/a),"px;left:",w(ad.x/a),"px;")}ab.push(' ">','<g_vml_:image src="',U.src,'"',' style="width:',a*P,"px;"," height:",a*ac,'px;"',' cropleft="',S/M,'"',' croptop="',Q/aa,'"',' cropright="',(M-S-X)/M,'"',' cropbottom="',(aa-Q-ae)/aa,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",ab.join(""))};l.stroke=function(ag){var L=[];var M=false;var ar=c(ag?this.fillStyle:this.strokeStyle);var ac=ar.color;var am=ar.alpha*this.globalAlpha;var I=10;var O=10;L.push("<g_vml_:shape",' filled="',!!ag,'"',' style="position:absolute;width:',I,"px;height:",O,'px;"',' coordorigin="0 0" coordsize="',a*I," ",a*O,'"',' stroked="',!ag,'"',' path="');var N=false;var aq={x:null,y:null};var Y={x:null,y:null};for(var al=0;al<this.currentPath_.length;al++){var ak=this.currentPath_[al];var ap;switch(ak.type){case"moveTo":ap=ak;L.push(" m ",w(ak.x),",",w(ak.y));break;case"lineTo":L.push(" l ",w(ak.x),",",w(ak.y));break;case"close":L.push(" x ");ak=null;break;case"bezierCurveTo":L.push(" c ",w(ak.cp1x),",",w(ak.cp1y),",",w(ak.cp2x),",",w(ak.cp2y),",",w(ak.x),",",w(ak.y));break;case"at":case"wa":L.push(" ",ak.type," ",w(ak.x-this.arcScaleX_*ak.radius),",",w(ak.y-this.arcScaleY_*ak.radius)," ",w(ak.x+this.arcScaleX_*ak.radius),",",w(ak.y+this.arcScaleY_*ak.radius)," ",w(ak.xStart),",",w(ak.yStart)," ",w(ak.xEnd),",",w(ak.yEnd));break}if(ak){if(aq.x==null||ak.x<aq.x){aq.x=ak.x}if(Y.x==null||ak.x>Y.x){Y.x=ak.x}if(aq.y==null||ak.y<aq.y){aq.y=ak.y}if(Y.y==null||ak.y>Y.y){Y.y=ak.y}}}L.push(' ">');if(!ag){var X=this.lineScale_*this.lineWidth;if(X<1){am*=X}L.push("<g_vml_:stroke",' opacity="',am,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',t(this.lineCap),'"',' weight="',X,'px"',' color="',ac,'" />')}else{if(typeof this.fillStyle=="object"){var P=this.fillStyle;var U=0;var aj={x:0,y:0};var ad=0;var S=1;if(P.type_=="gradient"){var R=P.x0_/this.arcScaleX_;var m=P.y0_/this.arcScaleY_;var Q=P.x1_/this.arcScaleX_;var at=P.y1_/this.arcScaleY_;var ao=this.getCoords_(R,m);var an=this.getCoords_(Q,at);var K=an.x-ao.x;var J=an.y-ao.y;U=Math.atan2(K,J)*180/Math.PI;if(U<0){U+=360}if(U<0.000001){U=0}}else{var ao=this.getCoords_(P.x0_,P.y0_);var j=Y.x-aq.x;var G=Y.y-aq.y;aj={x:(ao.x-aq.x)/j,y:(ao.y-aq.y)/G};j/=this.arcScaleX_*a;G/=this.arcScaleY_*a;var ai=v.max(j,G);ad=2*P.r0_/ai;S=2*P.r1_/ai-ad}var ab=P.colors_;ab.sort(function(W,H){return W.offset-H.offset});var V=ab.length;var aa=ab[0].color;var Z=ab[V-1].color;var af=ab[0].alpha*this.globalAlpha;var ae=ab[V-1].alpha*this.globalAlpha;var ah=[];for(var al=0;al<V;al++){var T=ab[al];ah.push(T.offset*S+ad+" "+T.color)}L.push('<g_vml_:fill type="',P.type_,'"',' method="none" focus="100%"',' color="',aa,'"',' color2="',Z,'"',' colors="',ah.join(","),'"',' opacity="',ae,'"',' g_o_:opacity2="',af,'"',' angle="',U,'"',' focusposition="',aj.x,",",aj.y,'" />')}else{L.push('<g_vml_:fill color="',ac,'" opacity="',am,'" />')}}L.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",L.join(""))};l.fill=function(){this.stroke(true)};l.closePath=function(){this.currentPath_.push({type:"close"})};l.getCoords_=function(H,G){var j=this.m_;return{x:a*(H*j[0][0]+G*j[1][0]+j[2][0])-o,y:a*(H*j[0][1]+G*j[1][1]+j[2][1])-o}};l.save=function(){var j={};x(this,j);this.aStack_.push(j);this.mStack_.push(this.m_);this.m_=d(r(),this.m_)};l.restore=function(){x(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};function g(G){for(var I=0;I<3;I++){for(var H=0;H<2;H++){if(!isFinite(G[I][H])||isNaN(G[I][H])){return false}}}return true}function B(G,j,H){if(!g(j)){return}G.m_=j;if(H){var I=j[0][0]*j[1][1]-j[0][1]*j[1][0];G.lineScale_=D(n(I))}}l.translate=function(G,m){var j=[[1,0,0],[0,1,0],[G,m,1]];B(this,d(j,this.m_),false)};l.rotate=function(m){var H=E(m);var G=s(m);var j=[[H,G,0],[-G,H,0],[0,0,1]];B(this,d(j,this.m_),false)};l.scale=function(G,m){this.arcScaleX_*=G;this.arcScaleY_*=m;var j=[[G,0,0],[0,m,0],[0,0,1]];B(this,d(j,this.m_),true)};l.transform=function(I,H,K,J,m,j){var G=[[I,H,0],[K,J,0],[m,j,1]];B(this,d(G,this.m_),true)};l.setTransform=function(J,I,L,K,H,G){var j=[[J,I,0],[L,K,0],[H,G,1]];B(this,j,true)};l.clip=function(){};l.arcTo=function(){};l.createPattern=function(){return new f};function A(j){this.type_=j;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}A.prototype.addColorStop=function(m,j){j=c(j);this.colors_.push({offset:m,color:j.color,alpha:j.alpha})};function f(){}G_vmlCanvasManager=k;CanvasRenderingContext2D=q;CanvasGradient=A;CanvasPattern=f})()}if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(f,d,n,g,k,m,o,j,a,e){if(!document.getElementById){return}this.DETECT_KEY=e?e:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(f){this.setAttribute("swf",f)}if(d){this.setAttribute("id",d)}if(n){this.setAttribute("width",n)}if(g){this.setAttribute("height",g)}if(k){this.setAttribute("version",new deconcept.PlayerVersion(k.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(m){this.addParam("bgcolor",m)}var b=o?o:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var l=(j)?j:window.location;this.setAttribute("xiRedirectUrl",l);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var a=new Array();var b;var c=this.getVariables();for(b in c){a.push(b+"="+c[b])}return a},getSWFHTML:function(){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}d='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';d+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var c=this.getParams();for(var a in c){d+=[a]+'="'+c[a]+'" '}var b=this.getVariablePairs().join("&");if(b.length>0){d+='flashvars="'+b+'"'}d+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}d='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';d+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var a in c){d+='<param name="'+a+'" value="'+c[a]+'" />'}var b=this.getVariablePairs().join("&");if(b.length>0){d+='<param name="flashvars" value="'+b+'" />'}d+="</object>"}return d},write:function(a){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof a=="string")?document.getElementById(a):a;c.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var b=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){b=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(d){try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=new deconcept.PlayerVersion([6,0,21]);c.AllowScriptAccess="always"}catch(d){if(b.major==6){return b}}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(d){}}if(c!=null){b=new deconcept.PlayerVersion(c.GetVariable("$version").split(" ")[1].split(","))}}return b};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(d){var c=document.location.search||document.location.hash;if(c){var b=c.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==d){return b[a].substring((b[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var b=0;b<c.length;b++){c[b].style.display="none";for(var a in c[b]){if(typeof c[b][a]=="function"){c[b][a]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload)}if(Array.prototype.push==null){Array.prototype.push=function(a){this[this.length]=a;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c)}else{return false}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]}}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c)}if(f){f.VERSION=j;f.BUILD=h}else{YAHOO.log("mainClass is undefined for module "+a,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var c={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},b=navigator.userAgent,a;if((/KHTML/).test(b)){c.webkit=1}a=b.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){c.webkit=parseFloat(a[1]);if(/ Mobile\//.test(b)){c.mobile="Apple"}else{a=b.match(/NokiaN[^\/]*/);if(a){c.mobile=a[0]}}a=b.match(/AdobeAIR\/([^\s]*)/);if(a){c.air=a[0]}}if(!c.webkit){a=b.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){c.opera=parseFloat(a[1]);a=b.match(/Opera Mini[^;]*/);if(a){c.mobile=a[0]}}else{a=b.match(/MSIE\s([^;]*)/);if(a&&a[1]){c.ie=parseFloat(a[1])}else{a=b.match(/Gecko\/([^\s]*)/);if(a){c.gecko=1;a=b.match(/rv:([^\s\)]*)/);if(a&&a[1]){c.gecko=parseFloat(a[1])}}}}}a=b.match(/Caja\/([^\s]*)/);if(a&&a[1]){c.caja=parseFloat(a[1])}return c}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c=c+1){if(a[c]==b){d=false;break}}if(d){a.push(b)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var b=YAHOO.lang,f="[object Array]",c="[object Function]",a=Object.prototype,e=["toString","valueOf"],d={isArray:function(g){return a.toString.apply(g)===f},isBoolean:function(g){return typeof g==="boolean"},isFunction:function(g){return a.toString.apply(g)===c},isNull:function(g){return g===null},isNumber:function(g){return typeof g==="number"&&isFinite(g)},isObject:function(g){return(g&&(typeof g==="object"||b.isFunction(g)))||false},isString:function(g){return typeof g==="string"},isUndefined:function(g){return typeof g==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(j,h){var g,l,k;for(g=0;g<e.length;g=g+1){l=e[g];k=h[l];if(b.isFunction(k)&&k!=a[l]){j[l]=k}}}:function(){},extend:function(k,l,j){if(!l||!k){throw new Error("extend failed, please check that all dependencies are included.")}var h=function(){},g;h.prototype=l.prototype;k.prototype=new h();k.prototype.constructor=k;k.superclass=l.prototype;if(l.prototype.constructor==a.constructor){l.prototype.constructor=l}if(j){for(g in j){if(b.hasOwnProperty(j,g)){k.prototype[g]=j[g]}}b._IEEnumFix(k.prototype,j)}},augmentObject:function(l,k){if(!k||!l){throw new Error("Absorb failed, verify dependencies.")}var g=arguments,j,m,h=g[2];if(h&&h!==true){for(j=2;j<g.length;j=j+1){l[g[j]]=k[g[j]]}}else{for(m in k){if(h||!(m in l)){l[m]=k[m]}}b._IEEnumFix(l,k)}},augmentProto:function(k,j){if(!j||!k){throw new Error("Augment failed, verify dependencies.")}var g=[k.prototype,j.prototype],h;for(h=2;h<arguments.length;h=h+1){g.push(arguments[h])}b.augmentObject.apply(this,g)},dump:function(g,m){var j,l,p=[],q="{...}",h="f(){...}",n=", ",k=" => ";if(!b.isObject(g)){return g+""}else{if(g instanceof Date||("nodeType" in g&&"tagName" in g)){return g}else{if(b.isFunction(g)){return h}}}m=(b.isNumber(m))?m:3;if(b.isArray(g)){p.push("[");for(j=0,l=g.length;j<l;j=j+1){if(b.isObject(g[j])){p.push((m>0)?b.dump(g[j],m-1):q)}else{p.push(g[j])}p.push(n)}if(p.length>1){p.pop()}p.push("]")}else{p.push("{");for(j in g){if(b.hasOwnProperty(g,j)){p.push(j+k);if(b.isObject(g[j])){p.push((m>0)?b.dump(g[j],m-1):q)}else{p.push(g[j])}p.push(n)}}if(p.length>1){p.pop()}p.push("}")}return p.join("")},substitute:function(B,h,t){var p,n,m,x,y,A,w=[],l,q="dump",u=" ",g="{",z="}",r;for(;;){p=B.lastIndexOf(g);if(p<0){break}n=B.indexOf(z,p);if(p+1>=n){break}l=B.substring(p+1,n);x=l;A=null;m=x.indexOf(u);if(m>-1){A=x.substring(m+1);x=x.substring(0,m)}y=h[x];if(t){y=t(x,y,A)}if(b.isObject(y)){if(b.isArray(y)){y=b.dump(y,parseInt(A,10))}else{A=A||"";r=A.indexOf(q);if(r>-1){A=A.substring(4)}if(y.toString===a.toString||r>-1){y=b.dump(y,parseInt(A,10))}else{y=y.toString()}}}else{if(!b.isString(y)&&!b.isNumber(y)){y="~-"+w.length+"-~";w[w.length]=l}}B=B.substring(0,p)+y+B.substring(n+1)}for(p=w.length-1;p>=0;p=p-1){B=B.replace(new RegExp("~-"+p+"-~"),"{"+w[p]+"}","g")}return B},trim:function(g){try{return g.replace(/^\s+|\s+$/g,"")}catch(h){return g}},merge:function(){var k={},h=arguments,g=h.length,j;for(j=0;j<g;j=j+1){b.augmentObject(k,h[j],true)}return k},later:function(q,h,s,k,l){q=q||0;h=h||{};var j=s,p=k,n,g;if(b.isString(s)){j=h[s]}if(!j){throw new TypeError("method undefined")}if(!b.isArray(p)){p=[k]}n=function(){j.apply(h,p)};g=(l)?setInterval(n,q):setTimeout(n,q);return{interval:l,cancel:function(){if(this.interval){clearInterval(g)}else{clearTimeout(g)}}}},isValue:function(g){return(b.isObject(g)||b.isString(g)||b.isNumber(g)||b.isBoolean(g))}};b.hasOwnProperty=(a.hasOwnProperty)?function(g,h){return g&&g.hasOwnProperty(h)}:function(g,h){return !b.isUndefined(g[h])&&g.constructor.prototype[h]!==g[h]};d.augmentObject(b,d,true);YAHOO.util.Lang=b;b.augment=b.augmentProto;YAHOO.augment=b.augmentProto;YAHOO.extend=b.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(d,c,b,a){this.type=d;this.scope=c||window;this.silent=b;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var e="_YUICEOnSubscribe";if(d!==e){this.subscribeEvent=new YAHOO.util.CustomEvent(e,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(a,b,c){if(!a){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(a,b,c)}this.subscribers.push(new YAHOO.util.Subscriber(a,b,c))},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll()}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true}}return e},fire:function(){this.lastError=null;var m=[],f=this.subscribers.length;if(!f&&this.silent){return true}var k=[].slice.call(arguments,0),h=true,d,l=false;if(!this.silent){}var c=this.subscribers.slice(),a=YAHOO.util.Event.throwErrors;for(d=0;d<f;++d){var o=c[d];if(!o){l=true}else{if(!this.silent){}var n=o.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var b=null;if(k.length>0){b=k[0]}try{h=o.fn.call(n,b,o.obj)}catch(g){this.lastError=g;if(a){throw g}}}else{try{h=o.fn.call(n,this.type,k,o.obj)}catch(j){this.lastError=j;if(a){throw j}}}if(false===h){if(!this.silent){}break}}}return(h!==false)},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b)}this.subscribers=[];return a},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj}this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: '"+this.type+"', context: "+this.scope}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return a};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b)}else{return(this.fn==a)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var h=false;var j=[];var k=[];var g=[];var e=[];var c=0;var f=[];var b=[];var a=0;var d={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var l=YAHOO.env.ua.ie?"focusin":"focus";var m=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var n=this;var o=function(){n._tryPreloadAttach()};this._interval=setInterval(o,this.POLL_INTERVAL)}},onAvailable:function(t,p,r,s,q){var n=(YAHOO.lang.isString(t))?[t]:t;for(var o=0;o<n.length;o=o+1){f.push({id:n[o],fn:p,obj:r,overrideContext:s,checkReady:q})}c=this.POLL_RETRYS;this.startInterval()},onContentReady:function(q,n,o,p){this.onAvailable(q,n,o,p,true)},onDOMReady:function(n,o,p){if(this.DOMReady){setTimeout(function(){var q=window;if(p){if(p===true){q=o}else{q=p}}n.call(q,"DOMReady",[],o)},0)}else{this.DOMReadyEvent.subscribe(n,o,p)}},_addListener:function(p,n,z,t,x,C){if(!z||!z.call){return false}if(this._isValidCollection(p)){var A=true;for(var u=0,w=p.length;u<w;++u){A=this.on(p[u],n,z,t,x)&&A}return A}else{if(YAHOO.lang.isString(p)){var s=this.getEl(p);if(s){p=s}else{this.onAvailable(p,function(){YAHOO.util.Event.on(p,n,z,t,x)});return true}}}if(!p){return false}if("unload"==n&&t!==this){k[k.length]=[p,n,z,t,x];return true}var o=p;if(x){if(x===true){o=t}else{o=x}}var q=function(D){return z.call(o,YAHOO.util.Event.getEvent(D,p),t)};var B=[p,n,z,q,o,t,x];var v=j.length;j[v]=B;if(this.useLegacyEvent(p,n)){var r=this.getLegacyIndex(p,n);if(r==-1||p!=g[r][0]){r=g.length;b[p.id+n]=r;g[r]=[p,n,p["on"+n]];e[r]=[];p["on"+n]=function(D){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(D),r)}}e[r].push(B)}else{try{this._simpleAdd(p,n,q,C)}catch(y){this.lastError=y;this.removeListener(p,n,z);return false}}return true},addListener:function(o,r,n,p,q){return this._addListener(o,r,n,p,q,false)},addFocusListener:function(o,n,p,q){return this._addListener(o,l,n,p,q,true)},removeFocusListener:function(o,n){return this.removeListener(o,l,n)},addBlurListener:function(o,n,p,q){return this._addListener(o,m,n,p,q,true)},removeBlurListener:function(o,n){return this.removeListener(o,m,n)},fireLegacyEvent:function(s,q){var u=true,n,w,v,o,t;w=e[q].slice();for(var p=0,r=w.length;p<r;++p){v=w[p];if(v&&v[this.WFN]){o=v[this.ADJ_SCOPE];t=v[this.WFN].call(o,s);u=(u&&t)}}n=g[q];if(n&&n[2]){n[2](s)}return u},getLegacyIndex:function(o,p){var n=this.generateId(o)+p;if(typeof b[n]=="undefined"){return -1}else{return b[n]}},useLegacyEvent:function(n,o){return(this.webkit&&this.webkit<419&&("click"==o||"dblclick"==o))},removeListener:function(o,n,w){var r,u,y;if(typeof o=="string"){o=this.getEl(o)}else{if(this._isValidCollection(o)){var x=true;for(r=o.length-1;r>-1;r--){x=(this.removeListener(o[r],n,w)&&x)}return x}}if(!w||!w.call){return this.purgeElement(o,false,n)}if("unload"==n){for(r=k.length-1;r>-1;r--){y=k[r];if(y&&y[0]==o&&y[1]==n&&y[2]==w){k.splice(r,1);return true}}return false}var s=null;var t=arguments[3];if("undefined"===typeof t){t=this._getCacheIndex(o,n,w)}if(t>=0){s=j[t]}if(!o||!s){return false}if(this.useLegacyEvent(o,n)){var q=this.getLegacyIndex(o,n);var p=e[q];if(p){for(r=0,u=p.length;r<u;++r){y=p[r];if(y&&y[this.EL]==o&&y[this.TYPE]==n&&y[this.FN]==w){p.splice(r,1);break}}}}else{try{this._simpleRemove(o,n,s[this.WFN],false)}catch(v){this.lastError=v;return false}}delete j[t][this.WFN];delete j[t][this.FN];j.splice(t,1);return true},getTarget:function(p,o){var n=p.target||p.srcElement;return this.resolveTextNode(n)},resolveTextNode:function(p){try{if(p&&3==p.nodeType){return p.parentNode}}catch(o){}return p},getPageX:function(o){var n=o.pageX;if(!n&&0!==n){n=o.clientX||0;if(this.isIE){n+=this._getScrollLeft()}}return n},getPageY:function(n){var o=n.pageY;if(!o&&0!==o){o=n.clientY||0;if(this.isIE){o+=this._getScrollTop()}}return o},getXY:function(n){return[this.getPageX(n),this.getPageY(n)]},getRelatedTarget:function(o){var n=o.relatedTarget;if(!n){if(o.type=="mouseout"){n=o.toElement}else{if(o.type=="mouseover"){n=o.fromElement}}}return this.resolveTextNode(n)},getTime:function(p){if(!p.time){var o=new Date().getTime();try{p.time=o}catch(n){this.lastError=n;return o}}return p.time},stopEvent:function(n){this.stopPropagation(n);this.preventDefault(n)},stopPropagation:function(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}},preventDefault:function(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}},getEvent:function(p,n){var o=p||window.event;if(!o){var q=this.getEvent.caller;while(q){o=q.arguments[0];if(o&&Event==o.constructor){break}q=q.caller}}return o},getCharCode:function(o){var n=o.keyCode||o.charCode||0;if(YAHOO.env.ua.webkit&&(n in d)){n=d[n]}return n},_getCacheIndex:function(r,s,q){for(var p=0,o=j.length;p<o;p=p+1){var n=j[p];if(n&&n[this.FN]==q&&n[this.EL]==r&&n[this.TYPE]==s){return p}}return -1},generateId:function(n){var o=n.id;if(!o){o="yuievtautoid-"+a;++a;n.id=o}return o},_isValidCollection:function(p){try{return(p&&typeof p!=="string"&&p.length&&!p.tagName&&!p.alert&&typeof p[0]!=="undefined")}catch(n){return false}},elCache:{},getEl:function(n){return(typeof n==="string")?document.getElementById(n):n},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(o){if(!h){h=true;var n=YAHOO.util.Event;n._ready();n._tryPreloadAttach()}},_ready:function(o){var n=YAHOO.util.Event;if(!n.DOMReady){n.DOMReady=true;n.DOMReadyEvent.fire();n._simpleRemove(document,"DOMContentLoaded",n._ready)}},_tryPreloadAttach:function(){if(f.length===0){c=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var t=!h;if(!t){t=(c>0&&f.length>0)}var s=[];var u=function(w,x){var v=w;if(x.overrideContext){if(x.overrideContext===true){v=x.obj}else{v=x.overrideContext}}x.fn.call(v,x.obj)};var o,n,r,q,p=[];for(o=0,n=f.length;o<n;o=o+1){r=f[o];if(r){q=this.getEl(r.id);if(q){if(r.checkReady){if(h||q.nextSibling||!t){p.push(r);f[o]=null}}else{u(q,r);f[o]=null}}else{s.push(r)}}}for(o=0,n=p.length;o<n;o=o+1){r=p[o];u(this.getEl(r.id),r)}c--;if(t){for(o=f.length-1;o>-1;o--){r=f[o];if(!r||!r.id){f.splice(o,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(r,s,u){var p=(YAHOO.lang.isString(r))?this.getEl(r):r;var t=this.getListeners(p,u),q,n;if(t){for(q=t.length-1;q>-1;q--){var o=t[q];this.removeListener(p,o.type,o.fn)}}if(s&&p&&p.childNodes){for(q=0,n=p.childNodes.length;q<n;++q){this.purgeElement(p.childNodes[q],s,u)}}},getListeners:function(p,n){var s=[],o;if(!n){o=[j,k]}else{if(n==="unload"){o=[k]}else{o=[j]}}var u=(YAHOO.lang.isString(p))?this.getEl(p):p;for(var r=0;r<o.length;r=r+1){var w=o[r];if(w){for(var t=0,v=w.length;t<v;++t){var q=w[t];if(q&&q[this.EL]===u&&(!n||n===q[this.TYPE])){s.push({type:q[this.TYPE],fn:q[this.FN],obj:q[this.OBJ],adjust:q[this.OVERRIDE],scope:q[this.ADJ_SCOPE],index:t})}}}}return(s.length)?s:null},_unload:function(u){var o=YAHOO.util.Event,r,q,p,t,s,v=k.slice(),n;for(r=0,t=k.length;r<t;++r){p=v[r];if(p){n=window;if(p[o.ADJ_SCOPE]){if(p[o.ADJ_SCOPE]===true){n=p[o.UNLOAD_OBJ]}else{n=p[o.ADJ_SCOPE]}}p[o.FN].call(n,o.getEvent(u,p[o.EL]),p[o.UNLOAD_OBJ]);v[r]=null}}p=null;n=null;k=null;if(j){for(q=j.length-1;q>-1;q--){p=j[q];if(p){o.removeListener(p[o.EL],p[o.TYPE],p[o.FN],q)}}p=null}g=null;o._simpleRemove(window,"unload",o._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var n=document.documentElement,o=document.body;if(n&&(n.scrollTop||n.scrollLeft)){return[n.scrollTop,n.scrollLeft]}else{if(o){return[o.scrollTop,o.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(p,q,o,n){p.addEventListener(q,o,(n))}}else{if(window.attachEvent){return function(p,q,o,n){p.attachEvent("on"+q,o)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(p,q,o,n){p.removeEventListener(q,o,(n))}}else{if(window.detachEvent){return function(o,p,n){o.detachEvent("on"+p,n)}}else{return function(){}}}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(a.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");document.attachEvent("onreadystatechange",function(){if(document.readyState=="complete"){document.detachEvent("onreadystatechange",arguments.callee);a._ready()}});if(window==window.top){a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null}catch(c){}},a.POLL_INTERVAL)}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready()}},a.POLL_INTERVAL)}else{a._simpleAdd(document,"DOMContentLoaded",a._ready)}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e)}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[]}b[a].push({fn:c,obj:f,overrideContext:e})}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g)}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g)}}return b}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(g,d){this.__yui_events=this.__yui_events||{};var a=d||{};var j=this.__yui_events;if(j[g]){}else{var h=a.scope||this;var e=(a.silent);var b=new YAHOO.util.CustomEvent(g,h,e,YAHOO.util.CustomEvent.FLAT);j[g]=b;if(a.onSubscribeCallback){b.subscribeEvent.subscribe(a.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var f=this.__yui_subscribers[g];if(f){for(var c=0;c<f.length;++c){b.subscribe(f[c].fn,f[c].obj,f[c].overrideContext)}}}return j[g]},fireEvent:function(e,d,a,c){this.__yui_events=this.__yui_events||{};var g=this.__yui_events[e];if(!g){return null}var b=[];for(var f=1;f<arguments.length;++f){b.push(arguments[f])}return g.fire.apply(g,b)},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true}}return false}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,j,e,f){if(!d){}else{if(!j){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d)}if(c.isFunction(e)){g.subscribe(e)}else{g.subscribe(e.fn,e.scope,e.correctScope)}function h(p,o){if(!j.shift){j.shift=false}if(!j.alt){j.alt=false}if(!j.ctrl){j.ctrl=false}if(p.shiftKey==j.shift&&p.altKey==j.alt&&p.ctrlKey==j.ctrl){var k,n=j.keys,m;if(YAHOO.lang.isArray(n)){for(var l=0;l<n.length;l++){k=n[l];m=a.getCharCode(p);if(k==m){g.fire(m,p);break}}}else{m=a.getCharCode(p);if(n==m){g.fire(m,p)}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(j)}this.enabled=true};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(j)}this.enabled=false};this.toString=function(){return"KeyListener ["+j.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"")}};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k]}else{value[k]=v}}}}return reviver.call(o,key,value)};return typeof reviver==="function"?walk({"":data},""):data}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4)}return _CHARS[c]}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char)}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""))}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"'}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o)}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf()}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null"}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null"}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null"}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v}}}}a.sort()}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}"}return undefined}return{isValid:function(s){return _isValid(_prepare(s))},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver)}throw new SyntaxError("parseJSON")},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v}}return uniq})(w)}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[])}return undefined},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z"},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d}return str}}})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var n={},m=0,s=0,e=false,o=YAHOO.env.ua,t=YAHOO.lang;var k=function(y,u,z){var v=z||window,A=v.document,B=A.createElement(y);for(var x in u){if(u[x]&&YAHOO.lang.hasOwnProperty(u,x)){B.setAttribute(x,u[x])}}return B};var j=function(u,v,x){var w=x||"utf-8";return k("link",{id:"yui__dyn_"+(s++),type:"text/css",charset:w,rel:"stylesheet",href:u},v)};var q=function(u,v,x){var w=x||"utf-8";return k("script",{id:"yui__dyn_"+(s++),type:"text/javascript",charset:w,src:u},v)};var a=function(u,v){return{tId:u.tId,win:u.win,data:u.data,nodes:u.nodes,msg:v,purge:function(){d(this.tId)}}};var b=function(u,x){var v=n[x],w=(t.isString(u))?v.win.document.getElementById(u):u;if(!w){r(x,"target node not found: "+u)}return w};var r=function(x,w){var u=n[x];if(u.onFailure){var v=u.scope||u.win;u.onFailure.call(v,a(u,w))}};var c=function(x){var u=n[x];u.finished=true;if(u.aborted){var w="transaction "+x+" was aborted";r(x,w);return}if(u.onSuccess){var v=u.scope||u.win;u.onSuccess.call(v,a(u))}};var p=function(w){var u=n[w];if(u.onTimeout){var v=u.scope||u;u.onTimeout.call(v,a(u))}};var g=function(x,B){var v=n[x];if(v.timer){v.timer.cancel()}if(v.aborted){var z="transaction "+x+" was aborted";r(x,z);return}if(B){v.url.shift();if(v.varName){v.varName.shift()}}else{v.url=(t.isString(v.url))?[v.url]:v.url;if(v.varName){v.varName=(t.isString(v.varName))?[v.varName]:v.varName}}var E=v.win,D=E.document,C=D.getElementsByTagName("head")[0],y;if(v.url.length===0){if(v.type==="script"&&o.webkit&&o.webkit<420&&!v.finalpass&&!v.varName){var A=q(null,v.win,v.charset);A.innerHTML='YAHOO.util.Get._finalize("'+x+'");';v.nodes.push(A);C.appendChild(A)}else{c(x)}return}var u=v.url[0];if(!u){v.url.shift();return g(x)}if(v.timeout){v.timer=t.later(v.timeout,v,p,x)}if(v.type==="script"){y=q(u,E,v.charset)}else{y=j(u,E,v.charset)}f(v.type,y,x,u,E,v.url.length);v.nodes.push(y);if(v.insertBefore){var F=b(v.insertBefore,x);if(F){F.parentNode.insertBefore(y,F)}}else{C.appendChild(y)}if((o.webkit||o.gecko)&&v.type==="css"){g(x,u)}};var l=function(){if(e){return}e=true;for(var u in n){var v=n[u];if(v.autopurge&&v.finished){d(v.tId);delete n[u]}}e=false};var d=function(B){var y=n[B];if(y){var A=y.nodes,u=A.length,z=y.win.document,x=z.getElementsByTagName("head")[0];if(y.insertBefore){var w=b(y.insertBefore,B);if(w){x=w.parentNode}}for(var v=0;v<u;v=v+1){x.removeChild(A[v])}y.nodes=[]}};var h=function(v,u,w){var y="q"+(m++);w=w||{};if(m%YAHOO.util.Get.PURGE_THRESH===0){l()}n[y]=t.merge(w,{tId:y,type:v,url:u,finished:false,aborted:false,nodes:[]});var x=n[y];x.win=x.win||window;x.scope=x.scope||x.win;x.autopurge=("autopurge" in x)?x.autopurge:(v==="script")?true:false;t.later(0,x,g,y);return{tId:y}};var f=function(D,y,x,v,z,A,C){var B=C||g;if(o.ie){y.onreadystatechange=function(){var E=this.readyState;if("loaded"===E||"complete"===E){y.onreadystatechange=null;B(x,v)}}}else{if(o.webkit){if(D==="script"){if(o.webkit>=420){y.addEventListener("load",function(){B(x,v)})}else{var u=n[x];if(u.varName){var w=YAHOO.util.Get.POLL_FREQ;u.maxattempts=YAHOO.util.Get.TIMEOUT/w;u.attempts=0;u._cache=u.varName[0].split(".");u.timer=t.later(w,u,function(J){var G=this._cache,F=G.length,E=this.win,H;for(H=0;H<F;H=H+1){E=E[G[H]];if(!E){this.attempts++;if(this.attempts++>this.maxattempts){var I="Over retry limit, giving up";u.timer.cancel();r(x,I)}else{}return}}u.timer.cancel();B(x,v)},null,true)}else{t.later(YAHOO.util.Get.POLL_FREQ,null,B,[x,v])}}}}else{y.onload=function(){B(x,v)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(u){t.later(0,null,c,u)},abort:function(v){var w=(t.isString(v))?v:v.tId;var u=n[w];if(u){u.aborted=true}},script:function(u,v){return h("script",u,v)},css:function(u,v){return h("css",u,v)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var b=YAHOO.util,l,j,k={},f={},n=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var c=YAHOO.env.ua.opera,m=YAHOO.env.ua.webkit,a=YAHOO.env.ua.gecko,g=YAHOO.env.ua.ie;var e={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var o=function(q){if(!e.HYPHEN.test(q)){return q}if(k[q]){return k[q]}var r=q;while(e.HYPHEN.exec(r)){r=r.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}k[q]=r;return r};var p=function(r){var q=f[r];if(!q){q=new RegExp("(?:^|\\s+)"+r+"(?:\\s+|$)");f[r]=q}return q};if(n.defaultView&&n.defaultView.getComputedStyle){l=function(q,t){var s=null;if(t=="float"){t="cssFloat"}var r=q.ownerDocument.defaultView.getComputedStyle(q,"");if(r){s=r[o(t)]}return q.style[t]||s}}else{if(n.documentElement.currentStyle&&g){l=function(q,s){switch(o(s)){case"opacity":var u=100;try{u=q.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(t){try{u=q.filters("alpha").opacity}catch(t){}}return u/100;case"float":s="styleFloat";default:var r=q.currentStyle?q.currentStyle[s]:null;return(q.style[s]||r)}}}else{l=function(q,r){return q.style[r]}}}if(g){j=function(q,r,s){switch(r){case"opacity":if(YAHOO.lang.isString(q.style.filter)){q.style.filter="alpha(opacity="+s*100+")";if(!q.currentStyle||!q.currentStyle.hasLayout){q.style.zoom=1}}break;case"float":r="styleFloat";default:q.style[r]=s}}}else{j=function(q,r,s){if(r=="float"){r="cssFloat"}q.style[r]=s}}var d=function(q,r){return q&&q.nodeType==1&&(!r||r(q))};YAHOO.util.Dom={get:function(s){if(s&&(s.nodeType||s.item)){return s}if(YAHOO.lang.isString(s)||!s){return n.getElementById(s)}if(s.length!==undefined){var t=[];for(var r=0,q=s.length;r<q;++r){t[t.length]=b.Dom.get(s[r])}return t}return s},getStyle:function(q,s){s=o(s);var r=function(t){return l(t,s)};return b.Dom.batch(q,r,b.Dom,true)},setStyle:function(q,s,t){s=o(s);var r=function(u){j(u,s,t)};b.Dom.batch(q,r,b.Dom,true)},getXY:function(q){var r=function(s){if(YAHOO.env.ua.webkit>=528){var t=s.ownerDocument;if((this.getStyle(s,"display")=="none")||!YAHOO.util.Dom.isAncestor(t.documentElement,s)){return false}}else{if((s.parentNode===null||s.offsetParent===null||this.getStyle(s,"display")=="none")&&s!=s.ownerDocument.body){return false}}return h(s)};return b.Dom.batch(q,r,b.Dom,true)},getX:function(q){var r=function(s){return b.Dom.getXY(s)[0]};return b.Dom.batch(q,r,b.Dom,true)},getY:function(q){var r=function(s){return b.Dom.getXY(s)[1]};return b.Dom.batch(q,r,b.Dom,true)},setXY:function(q,t,s){var r=function(w){var v=this.getStyle(w,"position");if(v=="static"){this.setStyle(w,"position","relative");v="relative"}var y=this.getXY(w);if(y===false){return false}var x=[parseInt(this.getStyle(w,"left"),10),parseInt(this.getStyle(w,"top"),10)];if(isNaN(x[0])){x[0]=(v=="relative")?0:w.offsetLeft}if(isNaN(x[1])){x[1]=(v=="relative")?0:w.offsetTop}if(t[0]!==null){w.style.left=t[0]-y[0]+x[0]+"px"}if(t[1]!==null){w.style.top=t[1]-y[1]+x[1]+"px"}if(!s){var u=this.getXY(w);if((t[0]!==null&&u[0]!=t[0])||(t[1]!==null&&u[1]!=t[1])){this.setXY(w,t,true)}}};b.Dom.batch(q,r,b.Dom,true)},setX:function(r,q){b.Dom.setXY(r,[q,null])},setY:function(q,r){b.Dom.setXY(q,[null,r])},getRegion:function(q){var r=function(s){if((s.parentNode===null||s.offsetParent===null||this.getStyle(s,"display")=="none")&&s!=s.ownerDocument.body){return false}var t=b.Region.getRegion(s);return t};return b.Dom.batch(q,r,b.Dom,true)},getClientWidth:function(){return b.Dom.getViewportWidth()},getClientHeight:function(){return b.Dom.getViewportHeight()},getElementsByClassName:function(u,y,v,w){y=y||"*";v=(v)?b.Dom.get(v):null||n;if(!v){return[]}var r=[],q=v.getElementsByTagName(y),x=p(u);for(var s=0,t=q.length;s<t;++s){if(x.test(q[s].className)){r[r.length]=q[s];if(w){w.call(q[s],q[s])}}}return r},hasClass:function(s,r){var q=p(r);var t=function(u){return q.test(u.className)};return b.Dom.batch(s,t,b.Dom,true)},addClass:function(r,q){var s=function(t){if(this.hasClass(t,q)){return false}t.className=YAHOO.lang.trim([t.className,q].join(" "));return true};return b.Dom.batch(r,s,b.Dom,true)},removeClass:function(s,r){var q=p(r);var t=function(u){if(!r||!this.hasClass(u,r)){return false}var v=u.className;u.className=v.replace(q," ");if(this.hasClass(u,r)){this.removeClass(u,r)}u.className=YAHOO.lang.trim(u.className);return true};return b.Dom.batch(s,t,b.Dom,true)},replaceClass:function(t,r,q){if(!q||r===q){return false}var s=p(r);var u=function(v){if(!this.hasClass(v,r)){this.addClass(v,q);return true}v.className=v.className.replace(s," "+q+" ");if(this.hasClass(v,r)){this.replaceClass(v,r,q)}v.className=YAHOO.lang.trim(v.className);return true};return b.Dom.batch(t,u,b.Dom,true)},generateId:function(q,s){s=s||"yui-gen";var r=function(t){if(t&&t.id){return t.id}var u=s+YAHOO.env._id_counter++;if(t){t.id=u}return u};return b.Dom.batch(q,r,b.Dom,true)||r.apply(b.Dom,arguments)},isAncestor:function(q,r){q=b.Dom.get(q);r=b.Dom.get(r);if(!q||!r){return false}if(q.contains&&r.nodeType&&!m){return q.contains(r)}else{if(q.compareDocumentPosition&&r.nodeType){return !!(q.compareDocumentPosition(r)&16)}else{if(r.nodeType){return !!this.getAncestorBy(r,function(s){return s==q})}}}return false},inDocument:function(q){return this.isAncestor(n.documentElement,q)},getElementsBy:function(x,r,s,u){r=r||"*";s=(s)?b.Dom.get(s):null||n;if(!s){return[]}var t=[],w=s.getElementsByTagName(r);for(var v=0,q=w.length;v<q;++v){if(x(w[v])){t[t.length]=w[v];if(u){u(w[v])}}}return t},batch:function(u,x,w,s){u=(u&&(u.tagName||u.item))?u:b.Dom.get(u);if(!u||!x){return false}var t=(s)?w:window;if(u.tagName||u.length===undefined){return x.call(t,u,w)}var v=[];for(var r=0,q=u.length;r<q;++r){v[v.length]=x.call(t,u[r],w)}return v},getDocumentHeight:function(){var r=(n.compatMode!="CSS1Compat")?n.body.scrollHeight:n.documentElement.scrollHeight;var q=Math.max(r,b.Dom.getViewportHeight());return q},getDocumentWidth:function(){var r=(n.compatMode!="CSS1Compat")?n.body.scrollWidth:n.documentElement.scrollWidth;var q=Math.max(r,b.Dom.getViewportWidth());return q},getViewportHeight:function(){var q=self.innerHeight;var r=n.compatMode;if((r||g)&&!c){q=(r=="CSS1Compat")?n.documentElement.clientHeight:n.body.clientHeight}return q},getViewportWidth:function(){var q=self.innerWidth;var r=n.compatMode;if(r||g){q=(r=="CSS1Compat")?n.documentElement.clientWidth:n.body.clientWidth}return q},getAncestorBy:function(q,r){while(q=q.parentNode){if(d(q,r)){return q}}return null},getAncestorByClassName:function(r,q){r=b.Dom.get(r);if(!r){return null}var s=function(t){return b.Dom.hasClass(t,q)};return b.Dom.getAncestorBy(r,s)},getAncestorByTagName:function(r,q){r=b.Dom.get(r);if(!r){return null}var s=function(t){return t.tagName&&t.tagName.toUpperCase()==q.toUpperCase()};return b.Dom.getAncestorBy(r,s)},getPreviousSiblingBy:function(q,r){while(q){q=q.previousSibling;if(d(q,r)){return q}}return null},getPreviousSibling:function(q){q=b.Dom.get(q);if(!q){return null}return b.Dom.getPreviousSiblingBy(q)},getNextSiblingBy:function(q,r){while(q){q=q.nextSibling;if(d(q,r)){return q}}return null},getNextSibling:function(q){q=b.Dom.get(q);if(!q){return null}return b.Dom.getNextSiblingBy(q)},getFirstChildBy:function(q,s){var r=(d(q.firstChild,s))?q.firstChild:null;return r||b.Dom.getNextSiblingBy(q.firstChild,s)},getFirstChild:function(q,r){q=b.Dom.get(q);if(!q){return null}return b.Dom.getFirstChildBy(q)},getLastChildBy:function(q,s){if(!q){return null}var r=(d(q.lastChild,s))?q.lastChild:null;return r||b.Dom.getPreviousSiblingBy(q.lastChild,s)},getLastChild:function(q){q=b.Dom.get(q);return b.Dom.getLastChildBy(q)},getChildrenBy:function(r,t){var s=b.Dom.getFirstChildBy(r,t);var q=s?[s]:[];b.Dom.getNextSiblingBy(s,function(u){if(!t||t(u)){q[q.length]=u}return false});return q},getChildren:function(q){q=b.Dom.get(q);if(!q){}return b.Dom.getChildrenBy(q)},getDocumentScrollLeft:function(q){q=q||n;return Math.max(q.documentElement.scrollLeft,q.body.scrollLeft)},getDocumentScrollTop:function(q){q=q||n;return Math.max(q.documentElement.scrollTop,q.body.scrollTop)},insertBefore:function(r,q){r=b.Dom.get(r);q=b.Dom.get(q);if(!r||!q||!q.parentNode){return null}return q.parentNode.insertBefore(r,q)},insertAfter:function(r,q){r=b.Dom.get(r);q=b.Dom.get(q);if(!r||!q||!q.parentNode){return null}if(q.nextSibling){return q.parentNode.insertBefore(r,q.nextSibling)}else{return q.parentNode.appendChild(r)}},getClientRegion:function(){var u=b.Dom.getDocumentScrollTop(),s=b.Dom.getDocumentScrollLeft(),v=b.Dom.getViewportWidth()+s,q=b.Dom.getViewportHeight()+u;return new b.Region(u,v,q,s)}};var h=function(){if(n.documentElement.getBoundingClientRect){return function(r){var s=r.getBoundingClientRect();if((m||a)&&IP.Util.hasFixedAncestry(r)){return[s.left,s.top]}var q=r.ownerDocument;return[s.left+b.Dom.getDocumentScrollLeft(q),s.top+b.Dom.getDocumentScrollTop(q)]}}else{return function(s){var t=[s.offsetLeft,s.offsetTop];var r=s.offsetParent;var q=(m&&b.Dom.getStyle(s,"position")=="absolute"&&s.offsetParent==s.ownerDocument.body);if(r!=s){while(r){t[0]+=r.offsetLeft;t[1]+=r.offsetTop;if(!q&&m&&b.Dom.getStyle(r,"position")=="absolute"){q=true}r=r.offsetParent}}if(q){t[0]-=s.ownerDocument.body.offsetLeft;t[1]-=s.ownerDocument.body.offsetTop}r=s.parentNode;while(r.tagName&&!e.ROOT_TAG.test(r.tagName)){if(r.scrollTop||r.scrollLeft){if(!e.OP_SCROLL.test(b.Dom.getStyle(r,"display"))){if(!c||b.Dom.getStyle(r,"overflow")!=="visible"){t[0]-=r.scrollLeft;t[1]-=r.scrollTop}}}r=r.parentNode}return t}}}()})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this[0]=c};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top);var e=Math.min(this.right,f.right);var a=Math.min(this.bottom,f.bottom);var c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c)}else{return null}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top);var e=Math.max(this.right,f.right);var a=Math.max(this.bottom,f.bottom);var c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e);var d=g[1];var f=g[0]+e.offsetWidth;var a=g[1]+e.offsetHeight;var c=g[0];return new YAHOO.util.Region(d,f,a,c)};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0]}this.x=this.right=this.left=this[0]=a;this.y=this.top=this.bottom=this[1]=b};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(c){var b=YAHOO.util.Event.getTarget(c),a=b.nodeName.toLowerCase();if((a==="input"||a==="button")&&(b.type&&b.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(b.name)+"="+encodeURIComponent(b.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(a){this._msxml_progid.unshift(a)},setDefaultPostHeader:function(a){if(typeof a=="string"){this._default_post_header=a}else{if(typeof a=="boolean"){this._use_default_post_header=a}}},setDefaultXhrHeader:function(a){if(typeof a=="string"){this._default_xhr_header=a}else{this._use_default_xhr_header=a}},setPollingInterval:function(a){if(typeof a=="number"&&isFinite(a)){this._polling_interval=a}},createXhrObject:function(g){var f,a;try{a=new XMLHttpRequest();f={conn:a,tId:g}}catch(d){for(var b=0;b<this._msxml_progid.length;++b){try{a=new ActiveXObject(this._msxml_progid[b]);f={conn:a,tId:g};break}catch(c){}}}finally{return f}},getConnectionObject:function(a){var c;var d=this._transaction_id;try{if(!a){c=this.createXhrObject(d)}else{c={};c.tId=d;c.isUpload=true}if(c){this._transaction_id++}}catch(b){}finally{return c}},asyncRequest:function(f,c,e,a){var d=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var b=(e&&e.argument)?e.argument:null;if(!d){return null}else{if(e&&e.customevents){this.initCustomEvents(d,e)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(d,e,c,a);return d}if(f.toUpperCase()=="GET"){if(this._sFormData.length!==0){c+=((c.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(f.toUpperCase()=="POST"){a=a?this._sFormData+"&"+a:this._sFormData}}}if(f.toUpperCase()=="GET"&&(e&&e.cache===false)){c+=((c.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}d.conn.open(f,c,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((f.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(d)}this.handleReadyState(d,e);d.conn.send(a||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(d,b);if(d.startEvent){d.startEvent.fire(d,b)}return d}},initCustomEvents:function(a,c){var b;for(b in c.customevents){if(this._customEvents[b][0]){a[this._customEvents[b][0]]=new YAHOO.util.CustomEvent(this._customEvents[b][1],(c.scope)?c.scope:null);a[this._customEvents[b][0]].subscribe(c.customevents[b])}}},handleReadyState:function(c,d){var b=this;var a=(d&&d.argument)?d.argument:null;if(d&&d.timeout){this._timeOut[c.tId]=window.setTimeout(function(){b.abort(c,d,true)},d.timeout)}this._poll[c.tId]=window.setInterval(function(){if(c.conn&&c.conn.readyState===4){window.clearInterval(b._poll[c.tId]);delete b._poll[c.tId];if(d&&d.timeout){window.clearTimeout(b._timeOut[c.tId]);delete b._timeOut[c.tId]}b.completeEvent.fire(c,a);if(c.completeEvent){c.completeEvent.fire(c,a)}b.handleTransactionResponse(c,d)}},this._polling_interval)},handleTransactionResponse:function(g,h,a){var d,c;var b=(h&&h.argument)?h.argument:null;try{if(g.conn.status!==undefined&&g.conn.status!==0){d=g.conn.status}else{d=13030}}catch(f){d=13030}if(d>=200&&d<300||d===1223){c=this.createResponseObject(g,b);if(h&&h.success){if(!h.scope){h.success(c)}else{h.success.apply(h.scope,[c])}}this.successEvent.fire(c);if(g.successEvent){g.successEvent.fire(c)}}else{switch(d){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:c=this.createExceptionObject(g.tId,b,(a?a:false));if(h&&h.failure){if(!h.scope){h.failure(c)}else{h.failure.apply(h.scope,[c])}}break;default:c=this.createResponseObject(g,b);if(h&&h.failure){if(!h.scope){h.failure(c)}else{h.failure.apply(h.scope,[c])}}}this.failureEvent.fire(c);if(g.failureEvent){g.failureEvent.fire(c)}}this.releaseObject(g);c=null},createResponseObject:function(a,h){var d={};var k={};try{var c=a.conn.getAllResponseHeaders();var g=c.split("\n");for(var f=0;f<g.length;f++){var b=g[f].indexOf(":");if(b!=-1){k[g[f].substring(0,b)]=g[f].substring(b+2)}}}catch(j){}d.tId=a.tId;d.status=(a.conn.status==1223)?204:a.conn.status;d.statusText=(a.conn.status==1223)?"No Content":a.conn.statusText;d.getResponseHeader=k;d.getAllResponseHeaders=c;d.responseText=a.conn.responseText;d.responseXML=a.conn.responseXML;if(h){d.argument=h}return d},createExceptionObject:function(h,d,a){var f=0;var g="communication failure";var c=-1;var b="transaction aborted";var e={};e.tId=h;if(a){e.status=c;e.statusText=b}else{e.status=f;e.statusText=g}if(d){e.argument=d}return e},initHeader:function(a,d,c){var b=(c)?this._default_headers:this._http_headers;b[a]=d;if(c){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(a){var b;if(this._has_default_headers){for(b in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,b)){a.conn.setRequestHeader(b,this._default_headers[b])}}}if(this._has_http_headers){for(b in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,b)){a.conn.setRequestHeader(b,this._http_headers[b])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(o,h,c){var n,b,m,k,r,l=false,f=[],q=0,e,g,d,p,a;this.resetFormState();if(typeof o=="string"){n=(document.getElementById(o)||document.forms[o])}else{if(typeof o=="object"){n=o}else{return}}if(h){this.createFrame(c?c:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=n;return}for(e=0,g=n.elements.length;e<g;++e){b=n.elements[e];r=b.disabled;m=b.name;if(!r&&m){m=encodeURIComponent(m)+"=";k=encodeURIComponent(b.value);switch(b.type){case"select-one":if(b.selectedIndex>-1){a=b.options[b.selectedIndex];f[q++]=m+encodeURIComponent((a.attributes.value&&a.attributes.value.specified)?a.value:a.text)}break;case"select-multiple":if(b.selectedIndex>-1){for(d=b.selectedIndex,p=b.options.length;d<p;++d){a=b.options[d];if(a.selected){f[q++]=m+encodeURIComponent((a.attributes.value&&a.attributes.value.specified)?a.value:a.text)}}}break;case"radio":case"checkbox":if(b.checked){f[q++]=m+k}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(l===false){if(this._hasSubmitListener&&this._submitElementValue){f[q++]=this._submitElementValue}l=true}break;default:f[q++]=m+k}}}this._isFormSubmit=true;this._sFormData=f.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(a){var b="yuiIO"+this._transaction_id;var c;if(YAHOO.env.ua.ie){c=document.createElement('<iframe id="'+b+'" name="'+b+'" />');if(typeof a=="boolean"){c.src="javascript:false"}}else{c=document.createElement("iframe");c.id=b;c.name=b}c.style.position="absolute";c.style.top="-1000px";c.style.left="-1000px";document.body.appendChild(c)},appendPostData:function(a){var d=[],b=a.split("&"),c,e;for(c=0;c<b.length;c++){e=b[c].indexOf("=");if(e!=-1){d[c]=document.createElement("input");d[c].type="hidden";d[c].name=decodeURIComponent(b[c].substring(0,e));d[c].value=decodeURIComponent(b[c].substring(e+1));this._formNode.appendChild(d[c])}}return d},uploadFile:function(d,p,e,c){var j="yuiIO"+d.tId,k="multipart/form-data",m=document.getElementById(j),q=this,l=(p&&p.argument)?p.argument:null,n,h,b,g;var a={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",e);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",j);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",k)}else{this._formNode.setAttribute("enctype",k)}if(c){n=this.appendPostData(c)}this._formNode.submit();this.startEvent.fire(d,l);if(d.startEvent){d.startEvent.fire(d,l)}if(p&&p.timeout){this._timeOut[d.tId]=window.setTimeout(function(){q.abort(d,p,true)},p.timeout)}if(n&&n.length>0){for(h=0;h<n.length;h++){this._formNode.removeChild(n[h])}}for(b in a){if(YAHOO.lang.hasOwnProperty(a,b)){if(a[b]){this._formNode.setAttribute(b,a[b])}else{this._formNode.removeAttribute(b)}}}this.resetFormState();var f=function(){if(p&&p.timeout){window.clearTimeout(q._timeOut[d.tId]);delete q._timeOut[d.tId]}q.completeEvent.fire(d,l);if(d.completeEvent){d.completeEvent.fire(d,l)}g={tId:d.tId,argument:p.argument};try{g.responseText=m.contentWindow.document.body?m.contentWindow.document.body.innerHTML:m.contentWindow.document.documentElement.textContent;g.responseXML=m.contentWindow.document.XMLDocument?m.contentWindow.document.XMLDocument:m.contentWindow.document}catch(o){}if(p&&p.upload){if(!p.scope){p.upload(g)}else{p.upload.apply(p.scope,[g])}}q.uploadEvent.fire(g);if(d.uploadEvent){d.uploadEvent.fire(g)}YAHOO.util.Event.removeListener(m,"load",f);setTimeout(function(){document.body.removeChild(m);q.releaseObject(d)},100)};YAHOO.util.Event.addListener(m,"load",f)},abort:function(e,g,a){var d;var b=(g&&g.argument)?g.argument:null;if(e&&e.conn){if(this.isCallInProgress(e)){e.conn.abort();window.clearInterval(this._poll[e.tId]);delete this._poll[e.tId];if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId]}d=true}}else{if(e&&e.isUpload===true){var c="yuiIO"+e.tId;var f=document.getElementById(c);if(f){YAHOO.util.Event.removeListener(f,"load");document.body.removeChild(f);if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId]}d=true}}else{d=false}}if(d===true){this.abortEvent.fire(e,b);if(e.abortEvent){e.abortEvent.fire(e,b)}this.handleTransactionResponse(e,g,true)}return d},isCallInProgress:function(b){if(b&&b.conn){return b.conn.readyState!==4&&b.conn.readyState!==0}else{if(b&&b.isUpload===true){var a="yuiIO"+b.tId;return document.getElementById(a)?true:false}else{return false}}},releaseObject:function(a){if(a&&a.conn){a.conn=null;a=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var b=YAHOO.util;var a=function(d,c,e,f){if(!d){}this.init(d,c,e,f)};a.NAME="Anim";a.prototype={toString:function(){var c=this.getEl()||{};var d=c.id||c.tagName;return(this.constructor.NAME+": "+d)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(c,e,d){return this.method(this.currentFrame,e,d-e,this.totalFrames)},setAttribute:function(c,f,e){var d=this.getEl();if(this.patterns.noNegatives.test(c)){f=(f>0)?f:0}if("style" in d){b.Dom.setStyle(d,c,f+e)}else{if(c in d){d[c]=f}}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g)}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style" in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)]}else{g=0}}else{if(c in e){g=e[c]}}return g},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px"}return""},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(k){return(typeof k!=="undefined")};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"]}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g<c;++g){e[g]=j[g]+f[d]["by"][g]*1}}else{e=j+f[d]["by"]*1}}}this.runtimeAttributes[d].start=j;this.runtimeAttributes[d].end=e;this.runtimeAttributes[d].unit=(h(f[d].unit))?f[d]["unit"]:this.getDefaultUnit(d);return true},init:function(e,k,j,c){var d=false;var f=null;var h=0;e=b.Dom.get(e);this.attributes=k||{};this.duration=!YAHOO.lang.isUndefined(j)?j:1;this.method=c||b.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=b.AnimMgr.fps;this.setEl=function(n){e=b.Dom.get(n)};this.getEl=function(){return e};this.isAnimated=function(){return d};this.getStartTime=function(){return f};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(b.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}b.AnimMgr.registerElement(this);return true};this.stop=function(n){if(!this.isAnimated()){return false}if(n){this.currentFrame=this.totalFrames;this._onTween.fire()}b.AnimMgr.stop(this)};var m=function(){this.onStart.fire();this.runtimeAttributes={};for(var n in this.attributes){this.setRuntimeAttribute(n)}d=true;h=0;f=new Date()};var l=function(){var p={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};p.toString=function(){return("duration: "+p.duration+", currentFrame: "+p.currentFrame)};this.onTween.fire(p);var o=this.runtimeAttributes;for(var n in o){this.setAttribute(n,this.doMethod(n,o[n].start,o[n].end),o[n].unit)}h+=1};var g=function(){var n=(new Date()-f)/1000;var o={duration:n,frames:h,fps:h/n};o.toString=function(){return("duration: "+o.duration+", frames: "+o.frames+", fps: "+o.fps)};d=false;h=0;this.onComplete.fire(o)};this._onStart=new b.CustomEvent("_start",this,true);this.onStart=new b.CustomEvent("start",this);this.onTween=new b.CustomEvent("tween",this);this._onTween=new b.CustomEvent("_tween",this,true);this.onComplete=new b.CustomEvent("complete",this);this._onComplete=new b.CustomEvent("_complete",this,true);this._onStart.subscribe(m);this._onTween.subscribe(l);this._onComplete.subscribe(g)}};b.Anim=a})();YAHOO.util.AnimMgr=new function(){var c=null;var b=[];var a=0;this.fps=1000;this.delay=1;this.registerElement=function(f){b[b.length]=f;a+=1;f._onStart.fire();this.start()};this.unRegister=function(g,f){f=f||e(g);if(!g.isAnimated()||f==-1){return false}g._onComplete.fire();b.splice(f,1);a-=1;if(a<=0){this.stop()}return true};this.start=function(){if(c===null){c=setInterval(this.run,this.delay)}};this.stop=function(h){if(!h){clearInterval(c);for(var g=0,f=b.length;g<f;++g){this.unRegister(b[0],0)}b=[];c=null;a=0}else{this.unRegister(h)}};this.run=function(){for(var h=0,f=b.length;h<f;++h){var g=b[h];if(!g||!g.isAnimated()){continue}if(g.currentFrame<g.totalFrames||g.totalFrames===null){g.currentFrame+=1;if(g.useSeconds){d(g)}g._onTween.fire()}else{YAHOO.util.AnimMgr.stop(g,h)}}};var e=function(h){for(var g=0,f=b.length;g<f;++g){if(b[g]==h){return g}}return -1};var d=function(g){var k=g.totalFrames;var j=g.currentFrame;var h=(g.currentFrame*g.duration*1000/g.totalFrames);var f=(new Date()-g.getStartTime());var l=0;if(f<g.duration*1000){l=Math.round((f/h-1)*g.currentFrame)}else{l=k-(j+1)}if(l>0&&isFinite(l)){if(g.currentFrame+l>=k){l=k-(j+1)}g.currentFrame+=l}}};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b<f;++b){c[b]=[e[b][0],e[b][1]]}for(var a=1;a<f;++a){for(b=0;b<f-a;++b){c[b][0]=(1-d)*c[b][0]+d*c[parseInt(b+1,10)][0];c[b][1]=(1-d)*c[b][1]+d*c[parseInt(b+1,10)][1]}}return[c[0][0],c[0][1]]}};(function(){var a=function(f,e,g,h){a.superclass.constructor.call(this,f,e,g,h)};a.NAME="ColorAnim";a.DEFAULT_BGCOLOR="#fff";var c=YAHOO.util;YAHOO.extend(a,c.Anim);var d=a.superclass;var b=a.prototype;b.patterns.color=/color$/i;b.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;b.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;b.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;b.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;b.parseColor=function(e){if(e.length==3){return e}var f=this.patterns.hex.exec(e);if(f&&f.length==4){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}f=this.patterns.rgb.exec(e);if(f&&f.length==4){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}f=this.patterns.hex3.exec(e);if(f&&f.length==4){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}return null};b.getAttribute=function(e){var g=this.getEl();if(this.patterns.color.test(e)){var j=YAHOO.util.Dom.getStyle(g,e);var h=this;if(this.patterns.transparent.test(j)){var f=YAHOO.util.Dom.getAncestorBy(g,function(k){return !h.patterns.transparent.test(j)});if(f){j=c.Dom.getStyle(f,e)}else{j=a.DEFAULT_BGCOLOR}}}else{j=d.getAttribute.call(this,e)}return j};b.doMethod=function(f,k,g){var j;if(this.patterns.color.test(f)){j=[];for(var h=0,e=k.length;h<e;++h){j[h]=d.doMethod.call(this,f,k[h],g[h])}j="rgb("+Math.floor(j[0])+","+Math.floor(j[1])+","+Math.floor(j[2])+")"}else{j=d.doMethod.call(this,f,k,g)}return j};b.setRuntimeAttribute=function(f){d.setRuntimeAttribute.call(this,f);if(this.patterns.color.test(f)){var h=this.attributes;var k=this.parseColor(this.runtimeAttributes[f].start);var g=this.parseColor(this.runtimeAttributes[f].end);if(typeof h[f]["to"]==="undefined"&&typeof h[f]["by"]!=="undefined"){g=this.parseColor(h[f].by);for(var j=0,e=k.length;j<e;++j){g[j]=k[j]+g[j]}}this.runtimeAttributes[f].start=k;this.runtimeAttributes[f].end=g}};c.ColorAnim=a})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(e,a,g,f){return g*e/f+a},easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a},easeOutStrong:function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a}return -g/2*((e-=2)*e*e*e-2)+a},elasticIn:function(g,e,l,k,f,j){if(g==0){return e}if((g/=k)==1){return e+l}if(!j){j=k*0.3}if(!f||f<Math.abs(l)){f=l;var h=j/4}else{var h=j/(2*Math.PI)*Math.asin(l/f)}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*k-h)*(2*Math.PI)/j))+e},elasticOut:function(g,e,l,k,f,j){if(g==0){return e}if((g/=k)==1){return e+l}if(!j){j=k*0.3}if(!f||f<Math.abs(l)){f=l;var h=j/4}else{var h=j/(2*Math.PI)*Math.asin(l/f)}return f*Math.pow(2,-10*g)*Math.sin((g*k-h)*(2*Math.PI)/j)+l+e},elasticBoth:function(g,e,l,k,f,j){if(g==0){return e}if((g/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(!f||f<Math.abs(l)){f=l;var h=j/4}else{var h=j/(2*Math.PI)*Math.asin(l/f)}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*k-h)*(2*Math.PI)/j))+e}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*k-h)*(2*Math.PI)/j)*0.5+l+e},backIn:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*(e/=g)*e*((f+1)*e-f)+a},backOut:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*((e=e/g-1)*e*((f+1)*e+f)+1)+a},backBoth:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}if((e/=g/2)<1){return h/2*(e*e*(((f*=(1.525))+1)*e-f))+a}return h/2*((e-=2)*e*(((f*=(1.525))+1)*e+f)+2)+a},bounceIn:function(e,a,g,f){return g-YAHOO.util.Easing.bounceOut(f-e,0,g,f)+a},bounceOut:function(e,a,g,f){if((e/=f)<(1/2.75)){return g*(7.5625*e*e)+a}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}}}return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a},bounceBoth:function(e,a,g,f){if(e<f/2){return YAHOO.util.Easing.bounceIn(e*2,0,g,f)*0.5+a}return YAHOO.util.Easing.bounceOut(e*2-f,0,g,f)*0.5+g*0.5+a}};(function(){var a=function(h,g,j,k){if(h){a.superclass.constructor.call(this,h,g,j,k)}};a.NAME="Motion";var e=YAHOO.util;YAHOO.extend(a,e.ColorAnim);var f=a.superclass;var c=a.prototype;c.patterns.points=/^points$/i;c.setAttribute=function(g,j,h){if(this.patterns.points.test(g)){h=h||"px";f.setAttribute.call(this,"left",j[0],h);f.setAttribute.call(this,"top",j[1],h)}else{f.setAttribute.call(this,g,j,h)}};c.getAttribute=function(g){if(this.patterns.points.test(g)){var h=[f.getAttribute.call(this,"left"),f.getAttribute.call(this,"top")]}else{h=f.getAttribute.call(this,g)}return h};c.doMethod=function(g,l,h){var k=null;if(this.patterns.points.test(g)){var j=this.method(this.currentFrame,0,100,this.totalFrames)/100;k=e.Bezier.getPosition(this.runtimeAttributes[g],j)}else{k=f.doMethod.call(this,g,l,h)}return k};c.setRuntimeAttribute=function(q){if(this.patterns.points.test(q)){var h=this.getEl();var k=this.attributes;var g;var m=k.points["control"]||[];var j;var n,p;if(m.length>0&&!(m[0] instanceof Array)){m=[m]}else{var l=[];for(n=0,p=m.length;n<p;++n){l[n]=m[n]}m=l}if(e.Dom.getStyle(h,"position")=="static"){e.Dom.setStyle(h,"position","relative")}if(d(k.points["from"])){e.Dom.setXY(h,k.points["from"])}else{e.Dom.setXY(h,e.Dom.getXY(h))}g=this.getAttribute("points");if(d(k.points["to"])){j=b.call(this,k.points["to"],g);var o=e.Dom.getXY(this.getEl());for(n=0,p=m.length;n<p;++n){m[n]=b.call(this,m[n],g)}}else{if(d(k.points["by"])){j=[g[0]+k.points["by"][0],g[1]+k.points["by"][1]];for(n=0,p=m.length;n<p;++n){m[n]=[g[0]+m[n][0],g[1]+m[n][1]]}}}this.runtimeAttributes[q]=[g];if(m.length>0){this.runtimeAttributes[q]=this.runtimeAttributes[q].concat(m)}this.runtimeAttributes[q][this.runtimeAttributes[q].length]=j}else{f.setRuntimeAttribute.call(this,q)}};var b=function(g,j){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+j[0],g[1]-h[1]+j[1]];return g};var d=function(g){return(typeof g!=="undefined")};e.Motion=a})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h)}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)]}else{g=c.doMethod.call(this,e,h,f)}return g};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop]}else{g=c.getAttribute.call(this,e)}return g};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1]}else{c.setAttribute.call(this,e,h,g)}};b.Scroll=d})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var a=YAHOO.util.Event,b=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var c=document.createElement("div");c.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(c,document.body.firstChild)}else{document.body.appendChild(c)}c.style.display="none";c.style.backgroundColor="red";c.style.position="absolute";c.style.zIndex="99999";b.setStyle(c,"opacity","0");this._shim=c;a.on(c,"mouseup",this.handleMouseUp,this,true);a.on(c,"mousemove",this.handleMouseMove,this,true);a.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var c=this._shim;c.style.height=b.getDocumentHeight()+"px";c.style.width=b.getDocumentWidth()+"px";c.style.top="0";c.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var c=this._shim,d="0";if(this._debugShim){d=".5"}b.setStyle(c,"opacity",d);this._sizeShim();c.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(e,d){for(var f in this.ids){for(var c in this.ids[f]){var g=this.ids[f][c];if(!this.isTypeOfDD(g)){continue}g[e].apply(g,d)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(c){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(d,c){if(!this.initialized){this.init()}if(!this.ids[c]){this.ids[c]={}}this.ids[c][d.id]=d},removeDDFromGroup:function(e,c){if(!this.ids[c]){this.ids[c]={}}var d=this.ids[c];if(d&&d[e.id]){delete d[e.id]}},_remove:function(e){for(var d in e.groups){if(d){var c=this.ids[d];if(c&&c[e.id]){delete c[e.id]}}}delete this.handleIds[e.id]},regHandle:function(d,c){if(!this.handleIds[d]){this.handleIds[d]={}}this.handleIds[d][c]=c},isDragDrop:function(c){return(this.getDDById(c))?true:false},getRelated:function(h,d){var g=[];for(var f in h.groups){for(var e in this.ids[f]){var c=this.ids[f][e];if(!this.isTypeOfDD(c)){continue}if(!d||c.isTarget){g[g.length]=c}}}return g},isLegalTarget:function(g,f){var d=this.getRelated(g,true);for(var e=0,c=d.length;e<c;++e){if(d[e].id==f.id){return true}}return false},isTypeOfDD:function(c){return(c&&c.__ygDragDrop)},isHandle:function(d,c){return(this.handleIds[d]&&this.handleIds[d][c])},getDDById:function(d){for(var c in this.ids){if(this.ids[c][d]){return this.ids[c][d]}}return null},handleMouseDown:function(f,d){this.currentTarget=YAHOO.util.Event.getTarget(f);this.dragCurrent=d;var c=d.getEl();this.startX=YAHOO.util.Event.getPageX(f);this.startY=YAHOO.util.Event.getPageY(f);this.deltaX=this.startX-c.offsetLeft;this.deltaY=this.startY-c.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var e=YAHOO.util.DDM;e.startDrag(e.startX,e.startY);e.fromTimeout=true},this.clickTimeThresh)},startDrag:function(c,e){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var d=this.dragCurrent;if(d&&d.events.b4StartDrag){d.b4StartDrag(c,e);d.fireEvent("b4StartDragEvent",{x:c,y:e})}if(d&&d.events.startDrag){d.startDrag(c,e);d.fireEvent("startDragEvent",{x:c,y:e})}this.dragThreshMet=true},handleMouseUp:function(c){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(c)}this.fromTimeout=false;this.fireEvents(c,true)}else{}this.stopDrag(c);this.stopEvent(c)}},stopEvent:function(c){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(c)}if(this.preventDefault){YAHOO.util.Event.preventDefault(c)}},stopDrag:function(f,d){var c=this.dragCurrent;if(c&&!d){if(this.dragThreshMet){if(c.events.b4EndDrag){c.b4EndDrag(f);c.fireEvent("b4EndDragEvent",{e:f})}if(c.events.endDrag){c.endDrag(f);c.fireEvent("endDragEvent",{e:f})}}if(c.events.mouseUp){c.onMouseUp(f);c.fireEvent("mouseUpEvent",{e:f})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(g){var c=this.dragCurrent;if(c){if(YAHOO.util.Event.isIE&&!g.button){this.stopEvent(g);return this.handleMouseUp(g)}else{if(g.clientX<0||g.clientY<0){}}if(!this.dragThreshMet){var f=Math.abs(this.startX-YAHOO.util.Event.getPageX(g));var d=Math.abs(this.startY-YAHOO.util.Event.getPageY(g));if(f>this.clickPixelThresh||d>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(c&&c.events.b4Drag){c.b4Drag(g);c.fireEvent("b4DragEvent",{e:g})}if(c&&c.events.drag){c.onDrag(g);c.fireEvent("dragEvent",{e:g})}if(c){this.fireEvents(g,false)}}this.stopEvent(g)}},fireEvents:function(z,n){var E=this.dragCurrent;if(!E||E.isLocked()||E.dragOnly){return}var p=YAHOO.util.Event.getPageX(z),o=YAHOO.util.Event.getPageY(z),r=new YAHOO.util.Point(p,o),m=E.getTargetCoord(r.x,r.y),g=E.getDragEl(),f=["out","over","drop","enter"],w=new YAHOO.util.Region(m.y,m.x+g.offsetWidth,m.y+g.offsetHeight,m.x),k=[],d={},s=[],F={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var u in this.dragOvers){var G=this.dragOvers[u];if(!this.isTypeOfDD(G)){continue}if(!this.isOverTarget(r,G,this.mode,w)){F.outEvts.push(G)}k[u]=true;delete this.dragOvers[u]}for(var t in E.groups){if("string"!=typeof t){continue}for(u in this.ids[t]){var h=this.ids[t][u];if(!this.isTypeOfDD(h)){continue}if(h.isTarget&&!h.isLocked()&&h!=E){if(this.isOverTarget(r,h,this.mode,w)){d[t]=true;if(n){F.dropEvts.push(h)}else{if(!k[h.id]){F.enterEvts.push(h)}else{F.overEvts.push(h)}this.dragOvers[h.id]=h}}}}}this.interactionInfo={out:F.outEvts,enter:F.enterEvts,over:F.overEvts,drop:F.dropEvts,point:r,draggedRegion:w,sourceRegion:this.locationCache[E.id],validDrop:n};for(var c in d){s.push(c)}if(n&&!F.dropEvts.length){this.interactionInfo.validDrop=false;if(E.events.invalidDrop){E.onInvalidDrop(z);E.fireEvent("invalidDropEvent",{e:z})}}for(u=0;u<f.length;u++){var C=null;if(F[f[u]+"Evts"]){C=F[f[u]+"Evts"]}if(C&&C.length){var j=f[u].charAt(0).toUpperCase()+f[u].substr(1),B="onDrag"+j,l="b4Drag"+j,q="drag"+j+"Event",A="drag"+j;if(this.mode){if(E.events[l]){E[l](z,C,s);E.fireEvent(l+"Event",{event:z,info:C,group:s})}if(E.events[A]){E[B](z,C,s);E.fireEvent(q,{event:z,info:C,group:s})}}else{for(var D=0,v=C.length;D<v;++D){if(E.events[l]){E[l](z,C[D].id,s[0]);E.fireEvent(l+"Event",{event:z,info:C[D].id,group:s[0]})}if(E.events[A]){E[B](z,C[D].id,s[0]);E.fireEvent(q,{event:z,info:C[D].id,group:s[0]})}}}}}},getBestMatch:function(e){var g=null;var d=e.length;if(d==1){g=e[0]}else{for(var f=0;f<d;++f){var c=e[f];if(this.mode==this.INTERSECT&&c.cursorIsOver){g=c;break}else{if(!g||!g.overlap||(c.overlap&&g.overlap.getArea()<c.overlap.getArea())){g=c}}}}return g},refreshCache:function(d){var f=d||this.ids;for(var c in f){if("string"!=typeof c){continue}for(var e in this.ids[c]){var h=this.ids[c][e];if(this.isTypeOfDD(h)){var j=this.getLocation(h);if(j){this.locationCache[h.id]=j}else{delete this.locationCache[h.id]}}}}},verifyEl:function(d){try{if(d){var c=d.offsetParent;if(c){return true}}}catch(f){}return false},getLocation:function(j){if(!this.isTypeOfDD(j)){return null}var g=j.getEl(),n,f,d,p,o,q,c,m,h;try{n=YAHOO.util.Dom.getXY(g)}catch(k){}if(!n){return null}f=n[0];d=f+g.offsetWidth;p=n[1];o=p+g.offsetHeight;q=p-j.padding[0];c=d+j.padding[1];m=o+j.padding[2];h=f-j.padding[3];return new YAHOO.util.Region(q,c,m,h)},isOverTarget:function(l,c,e,f){var g=this.locationCache[c.id];if(!g||!this.useCache){g=this.getLocation(c);this.locationCache[c.id]=g}if(!g){return false}c.cursorIsOver=g.contains(l);var k=this.dragCurrent;if(!k||(!e&&!k.constrainX&&!k.constrainY)){return c.cursorIsOver}c.overlap=null;if(!f){var h=k.getTargetCoord(l.x,l.y);var d=k.getDragEl();f=new YAHOO.util.Region(h.y,h.x+d.offsetWidth,h.y+d.offsetHeight,h.x)}var j=f.intersect(g);if(j){c.overlap=j;return(e)?true:c.cursorIsOver}else{return false}},_onUnload:function(d,c){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(d){var c=this.elementCache[d];if(!c||!c.el){c=this.elementCache[d]=new this.ElementWrapper(YAHOO.util.Dom.get(d))}return c},getElement:function(c){return YAHOO.util.Dom.get(c)},getCss:function(d){var c=YAHOO.util.Dom.get(d);return(c)?c.style:null},ElementWrapper:function(c){this.el=c||null;this.id=this.el&&c.id;this.css=this.el&&c.style},getPosX:function(c){return YAHOO.util.Dom.getX(c)},getPosY:function(c){return YAHOO.util.Dom.getY(c)},swapNode:function(e,c){if(e.swapNode){e.swapNode(c)}else{var f=c.parentNode;var d=c.nextSibling;if(d==e){f.insertBefore(e,c)}else{if(c==e.nextSibling){f.insertBefore(c,e)}else{e.parentNode.replaceChild(c,e);f.insertBefore(e,d)}}}},getScroll:function(){var e,c,f=document.documentElement,d=document.body;if(f&&(f.scrollTop||f.scrollLeft)){e=f.scrollTop;c=f.scrollLeft}else{if(d){e=d.scrollTop;c=d.scrollLeft}else{}}return{top:e,left:c}},getStyle:function(d,c){return YAHOO.util.Dom.getStyle(d,c)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(c,e){var d=YAHOO.util.Dom.getXY(e);YAHOO.util.Dom.setXY(c,d)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){var c=YAHOO.util.DDM;if(YAHOO.util.Event&&document){c._onLoad()}else{if(c._timeoutCount>2000){}else{setTimeout(c._addListeners,10);if(document&&document.body){c._timeoutCount+=1}}}},handleWasClicked:function(c,e){if(this.isHandle(e,c.id)){return true}else{var d=c.parentNode;while(d){if(this.isHandle(e,d.id)){return true}else{d=d.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var a=YAHOO.util.Event;var b=YAHOO.util.Dom;YAHOO.util.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=b.get(this.id)}return this._domRef},getDragEl:function(){return b.get(this.dragElId)},init:function(f,c,d){this.initTarget(f,c,d);a.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var e in this.events){this.createEvent(e+"Event")}},initTarget:function(e,c,d){this.config=d||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof e!=="string"){this._domRef=e;e=b.generateId(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;a.onAvailable(e,this.handleOnAvailable,this,true);this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var c in this.config.events){if(this.config.events[c]===false){this.events[c]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,f,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!f&&0!==f){this.padding=[e,c,e,c]}else{this.padding=[e,c,f,d]}}},setInitPosition:function(f,e){var g=this.getEl();if(!this.DDM.verifyEl(g)){if(g&&g.style&&(g.style.display=="none")){}else{}return}var d=f||0;var c=e||0;var h=b.getXY(g);this.initPageX=h[0]-d;this.initPageY=h[1]-c;this.lastPageX=h[0];this.lastPageY=h[1];this.setStartPosition(h)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=b.generateId(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=b.generateId(c)}a.on(c,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(l,k){var d=l.which||l.button;if(this.primaryButtonOnly&&d>1){return}if(this.isLocked()){return}var c=this.b4MouseDown(l),g=true;if(this.events.b4MouseDown){g=this.fireEvent("b4MouseDownEvent",l)}var f=this.onMouseDown(l),j=true;if(this.events.mouseDown){j=this.fireEvent("mouseDownEvent",l)}if((c===false)||(f===false)||(g===false)||(j===false)){return}this.DDM.refreshCache(this.groups);var h=new YAHOO.util.Point(a.getPageX(l),a.getPageY(l));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(h,this)){}else{if(this.clickValidator(l)){this.setStartPosition();this.DDM.handleMouseDown(l,this);this.DDM.stopEvent(l)}else{}}},clickValidator:function(d){var c=YAHOO.util.Event.getTarget(d);return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},getTargetCoord:function(e,d){var c=e-this.deltaX;var f=d-this.deltaY;if(this.constrainX){if(c<this.minX){c=this.minX}if(c>this.maxX){c=this.maxX}}if(this.constrainY){if(f<this.minY){f=this.minY}if(f>this.maxY){f=this.maxY}}c=this.getTick(c,this.xTicks);f=this.getTick(f,this.yTicks);return{x:c,y:f}},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=b.generateId(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=b.generateId(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e<c;++e){if(this.invalidHandleClasses[e]==d){delete this.invalidHandleClasses[e]}}},isValidHandleChild:function(g){var f=true;var j;try{j=g.nodeName.toUpperCase()}catch(h){j=g.nodeName}f=f&&!this.invalidHandleTypes[j];f=f&&!this.invalidHandleIds[g.id];for(var d=0,c=this.invalidHandleClasses.length;f&&d<c;++d){f=!b.hasClass(g,this.invalidHandleClasses[d])}return f},setXTicks:function(f,c){this.xTicks=[];this.xTickSize=c;var e={};for(var d=this.initPageX;d>=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(f,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=parseInt(e,10);this.rightConstraint=parseInt(d,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=parseInt(c,10);this.bottomConstraint=parseInt(e,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,f){if(!f){return j}else{if(f[0]>=j){return f[0]}else{for(var d=0,c=f.length;d<c;++d){var e=d+1;if(f[e]&&f[e]>=j){var h=j-f[d];var g=f[e]-j;return(g>h)?f[d]:f[e]}}return f[f.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(c,a,b){if(c){this.init(c,a,b)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,g,f){var e=this.getTargetCoord(g,f);if(!this.deltaSetXY){var h=[e.x,e.y];YAHOO.util.Dom.setXY(c,h);var d=parseInt(YAHOO.util.Dom.getStyle(c,"left"),10);var b=parseInt(YAHOO.util.Dom.getStyle(c,"top"),10);this.deltaSetXY=[d-e.x,b-e.y]}else{YAHOO.util.Dom.setStyle(c,"left",(e.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(c,"top",(e.y+this.deltaSetXY[1])+"px")}this.cachePosition(e.x,e.y);var a=this;setTimeout(function(){a.autoScroll.call(a,e.x,e.y,c.offsetHeight,c.offsetWidth)},0)},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=this.DDM.getClientHeight();var b=this.DDM.getClientWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var g=(n+p-k-this.deltaY);var f=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&g<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&f<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(a),YAHOO.util.Event.getPageY(a))},b4Drag:function(a){this.setDragElPos(YAHOO.util.Event.getPageX(a),YAHOO.util.Event.getPageY(a))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var f=this.getDragEl(),e=YAHOO.util.Dom;if(!f){f=document.createElement("div");f.id=this.dragElId;var d=f.style;d.position="absolute";d.visibility="hidden";d.cursor="move";d.border="2px solid #aaa";d.zIndex=999;d.height="25px";d.width="25px";var c=document.createElement("div");e.setStyle(c,"height","100%");e.setStyle(c,"width","100%");e.setStyle(c,"background-color","#ccc");e.setStyle(c,"opacity","0");f.appendChild(c);a.insertBefore(f,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);YAHOO.util.Dom.setStyle(a,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var h=YAHOO.util.Dom;var b=this.getEl();var c=this.getDragEl();var g=parseInt(h.getStyle(c,"borderTopWidth"),10);var j=parseInt(h.getStyle(c,"borderRightWidth"),10);var f=parseInt(h.getStyle(c,"borderBottomWidth"),10);var d=parseInt(h.getStyle(c,"borderLeftWidth"),10);if(isNaN(g)){g=0}if(isNaN(j)){j=0}if(isNaN(f)){f=0}if(isNaN(d)){d=0}var e=Math.max(0,b.offsetWidth-j-d);var a=Math.max(0,b.offsetHeight-g-f);h.setStyle(c,"width",e+"px");h.setStyle(c,"height",a+"px")}},b4MouseDown:function(b){this.setStartPosition();var a=YAHOO.util.Event.getPageX(b);var c=YAHOO.util.Event.getPageY(b);this.autoOffset(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(d){var c=YAHOO.util.Dom;var b=this.getEl();var a=this.getDragEl();c.setStyle(a,"visibility","");c.setStyle(b,"visibility","hidden");YAHOO.util.DDM.moveToEl(b,a);c.setStyle(a,"visibility","hidden");c.setStyle(b,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;this.configure(b,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var a=this.value;if(this.getter){a=this.getter.call(this.owner,this.name)}return a},setValue:function(f,b){var e,a=this.owner,c=this.name;var d={type:c,prevValue:this.getValue(),newValue:f};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(a,f)){return false}if(!b){e=a.fireBeforeChangeEvent(d);if(e===false){return false}}if(this.setter){f=this.setter.call(a,f,this.name);if(f===undefined){}}if(this.method){this.method.call(a,f,this.name)}this.value=f;this._written=true;d.type=c;if(!b){this.owner.fireChangeEvent(d)}return true},configure:function(b,c){b=b||{};if(c){this._written=false}this._initialConfig=this._initialConfig||{};for(var a in b){if(b.hasOwnProperty(a)){this[a]=b[a];if(c){this._initialConfig[a]=b[a]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(a){this.setValue(this.value,a)}};(function(){var a=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(c){this._configs=this._configs||{};var b=this._configs[c];if(!b||!this._configs.hasOwnProperty(c)){return null}return b.getValue()},set:function(d,e,b){this._configs=this._configs||{};var c=this._configs[d];if(!c){return false}return c.setValue(e,b)},getAttributeKeys:function(){this._configs=this._configs;var c=[],b;for(b in this._configs){if(a.hasOwnProperty(this._configs,b)&&!a.isUndefined(this._configs[b])){c[c.length]=b}}return c},setAttributes:function(d,b){for(var c in d){if(a.hasOwnProperty(d,c)){this.set(c,d[c],b)}}},resetValue:function(c,b){this._configs=this._configs||{};if(this._configs[c]){this.set(c,this._configs[c]._initialConfig.value,b);return true}return false},refresh:function(e,c){this._configs=this._configs||{};var f=this._configs;e=((a.isString(e))?[e]:e)||this.getAttributeKeys();for(var d=0,b=e.length;d<b;++d){if(f.hasOwnProperty(e[d])){this._configs[e[d]].refresh(c)}}},register:function(b,c){this.setAttributeConfig(b,c)},getAttributeConfig:function(c){this._configs=this._configs||{};var b=this._configs[c]||{};var d={};for(c in b){if(a.hasOwnProperty(b,c)){d[c]=b[c]}}return d},setAttributeConfig:function(b,c,d){this._configs=this._configs||{};c=c||{};if(!this._configs[b]){c.name=b;this._configs[b]=this.createAttribute(c)}else{this._configs[b].configure(c,d)}},configureAttribute:function(b,c,d){this.setAttributeConfig(b,c,d)},resetAttributeConfig:function(b){this._configs=this._configs||{};this._configs[b].resetConfig()},subscribe:function(b,c){this._events=this._events||{};if(!(b in this._events)){this._events[b]=this.createEvent(b)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(c){var b="before";b+=c.type.charAt(0).toUpperCase()+c.type.substr(1)+"Change";c.type=b;return this.fireEvent(c.type,c)},fireChangeEvent:function(b){b.type+="Change";return this.fireEvent(b.type,b)},createAttribute:function(b){return new YAHOO.util.Attribute(b,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var b=YAHOO.util.Dom,c=YAHOO.util.AttributeProvider;var a=function(d,e){this.init.apply(this,arguments)};a.DOM_EVENTS={click:true,dblclick:true,keydown:true,keypress:true,keyup:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,focus:true,blur:true,submit:true,change:true};a.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(f,d){var e=this.get("element");if(e){e[d]=f}},DEFAULT_HTML_GETTER:function(d){var e=this.get("element"),f;if(e){f=e[d]}return f},appendChild:function(d){d=d.get?d.get("element"):d;return this.get("element").appendChild(d)},getElementsByTagName:function(d){return this.get("element").getElementsByTagName(d)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(d,e){d=d.get?d.get("element"):d;e=(e&&e.get)?e.get("element"):e;return this.get("element").insertBefore(d,e)},removeChild:function(d){d=d.get?d.get("element"):d;return this.get("element").removeChild(d)},replaceChild:function(d,e){d=d.get?d.get("element"):d;e=e.get?e.get("element"):e;return this.get("element").replaceChild(d,e)},initAttributes:function(d){},addListener:function(h,g,j,f){var e=this.get("element")||this.get("id");f=f||this;var d=this;if(!this._events[h]){if(e&&this.DOM_EVENTS[h]){YAHOO.util.Event.addListener(e,h,function(k){if(k.srcElement&&!k.target){k.target=k.srcElement}d.fireEvent(h,k)},j,f)}this.createEvent(h,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(e,d){return this.unsubscribe.apply(this,arguments)},addClass:function(d){b.addClass(this.get("element"),d)},getElementsByClassName:function(e,d){return b.getElementsByClassName(e,d,this.get("element"))},hasClass:function(d){return b.hasClass(this.get("element"),d)},removeClass:function(d){return b.removeClass(this.get("element"),d)},replaceClass:function(e,d){return b.replaceClass(this.get("element"),e,d)},setStyle:function(e,d){return b.setStyle(this.get("element"),e,d)},getStyle:function(d){return b.getStyle(this.get("element"),d)},fireQueue:function(){var e=this._queue;for(var f=0,d=e.length;f<d;++f){this[e[f][0]].apply(this,e[f][1])}},appendTo:function(e,f){e=(e.get)?e.get("element"):b.get(e);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:e});f=(f&&f.get)?f.get("element"):b.get(f);var d=this.get("element");if(!d){return false}if(!e){return false}if(d.parent!=e){if(f){e.insertBefore(d,f)}else{e.appendChild(d)}}this.fireEvent("appendTo",{type:"appendTo",target:e});return d},get:function(d){var f=this._configs||{},e=f.element;if(e&&!f[d]&&!YAHOO.lang.isUndefined(e.value[d])){this._setHTMLAttrConfig(d)}return c.prototype.get.call(this,d)},setAttributes:function(k,g){var e={},h=this._configOrder;for(var j=0,d=h.length;j<d;++j){if(k[h[j]]!==undefined){e[h[j]]=true;this.set(h[j],k[h[j]],g)}}for(var f in k){if(k.hasOwnProperty(f)&&!e[f]){this.set(f,k[f],g)}}},set:function(e,g,d){var f=this.get("element");if(!f){this._queue[this._queue.length]=["set",arguments];if(this._configs[e]){this._configs[e].value=g}return}if(!this._configs[e]&&!YAHOO.lang.isUndefined(f[e])){this._setHTMLAttrConfig(e)}return c.prototype.set.apply(this,arguments)},setAttributeConfig:function(d,e,f){this._configOrder.push(d);c.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(e,d){this._events[e]=true;return c.prototype.createEvent.apply(this,arguments)},init:function(e,d){this._initElement(e,d)},destroy:function(){var d=this.get("element");YAHOO.util.Event.purgeElement(d,true);this.unsubscribeAll();if(d&&d.parentNode){d.parentNode.removeChild(d)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(f,e){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];e=e||{};e.element=e.element||f||null;var h=false;var d=a.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var g in d){if(d.hasOwnProperty(g)){this.DOM_EVENTS[g]=d[g]}}if(typeof e.element==="string"){this._setHTMLAttrConfig("id",{value:e.element})}if(b.get(e.element)){h=true;this._initHTMLElement(e);this._initContent(e)}YAHOO.util.Event.onAvailable(e.element,function(){if(!h){this._initHTMLElement(e)}this.fireEvent("available",{type:"available",target:b.get(e.element)})},this,true);YAHOO.util.Event.onContentReady(e.element,function(){if(!h){this._initContent(e)}this.fireEvent("contentReady",{type:"contentReady",target:b.get(e.element)})},this,true)},_initHTMLElement:function(d){this.setAttributeConfig("element",{value:b.get(d.element),readOnly:true})},_initContent:function(d){this.initAttributes(d);this.setAttributes(d,true);this.fireQueue()},_setHTMLAttrConfig:function(d,f){var e=this.get("element");f=f||{};f.name=d;f.setter=f.setter||this.DEFAULT_HTML_SETTER;f.getter=f.getter||this.DEFAULT_HTML_GETTER;f.value=f.value||e[d];this._configs[d]=new YAHOO.util.Attribute(f,this)}};YAHOO.augment(a,c);YAHOO.util.Element=a})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});(function(){var b=YAHOO.util,c=b.Dom,h=b.Event,f=window.document,k="active",d="activeIndex",e="activeTab",a="contentEl",g="element",j=function(m,l){l=l||{};if(arguments.length==1&&!YAHOO.lang.isString(m)&&!m.nodeName){l=m;m=l.element||null}if(!m&&!l.element){m=this._createTabViewElement(l)}j.superclass.constructor.call(this,m,l)};YAHOO.extend(j,b.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(q,m){var o=this.get("tabs"),r=this.getTab(m),s=this._tabParent,l=this._contentParent,n=q.get(g),p=q.get(a);if(!o){this._queue[this._queue.length]=["addTab",arguments];return false}m=(m===undefined)?o.length:m;if(r){s.insertBefore(n,r.get(g))}else{s.appendChild(n)}if(p&&!c.isAncestor(l,p)){l.appendChild(p)}if(!q.get(k)){q.set("contentVisible",false,true)}else{this.set(e,q,true)}this._initTabEvents(q);o.splice(m,0,q)},_initTabEvents:function(l){l.addListener(l.get("activationEvent"),l._onActivate,this,l);l.addListener("activationEventChange",function(m){if(m.prevValue!=m.newValue){l.removeListener(m.prevValue,l._onActivate);l.addListener(m.newValue,l._onActivate,this,l)}})},DOMEventHandler:function(q){var r=h.getTarget(q),t=this._tabParent,s=this.get("tabs"),n,m,l;if(c.isAncestor(t,r)){for(var o=0,p=s.length;o<p;o++){m=s[o].get(g);l=s[o].get(a);if(r==m||c.isAncestor(m,r)){n=s[o];break}}if(n){n.fireEvent(q.type,q)}}},getTab:function(l){return this.get("tabs")[l]},getTabIndex:function(p){var m=null,o=this.get("tabs");for(var n=0,l=o.length;n<l;++n){if(p==o[n]){m=n;break}}return m},removeTab:function(n){var m=this.get("tabs").length,l=this.getTabIndex(n);if(n===this.get(e)){if(m>1){if(l+1===m){this.set(d,l-1)}else{this.set(d,l+1)}}else{this.set(e,null)}}this._tabParent.removeChild(n.get(g));this._contentParent.removeChild(n.get(a));this._configs.tabs.value.splice(l,1);n.fireEvent("remove",{type:"remove",tabview:this})},toString:function(){var l=this.get("id")||this.get("tagName");return"TabView "+l},contentTransition:function(m,l){if(m){m.set("contentVisible",true)}if(l){l.set("contentVisible",false)}},initAttributes:function(l){j.superclass.initAttributes.call(this,l);if(!l.orientation){l.orientation="top"}var n=this.get(g);if(!c.hasClass(n,this.CLASSNAME)){c.addClass(n,this.CLASSNAME)}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||this._createTabParent();this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||this._createContentParent();this.setAttributeConfig("orientation",{value:l.orientation,method:function(o){var p=this.get("orientation");this.addClass("yui-navset-"+o);if(p!=o){this.removeClass("yui-navset-"+p)}if(o==="bottom"){this.appendChild(this._tabParent)}}});this.setAttributeConfig(d,{value:l.activeIndex,method:function(o){},validator:function(p){var o=true;if(p&&this.getTab(p).get("disabled")){o=false}return o}});this.setAttributeConfig(e,{value:l.activeTab,method:function(p){var o=this.get(e);if(p){p.set(k,true)}if(o&&o!==p){o.set(k,false)}if(o&&p!==o){this.contentTransition(p,o)}else{if(p){p.set("contentVisible",true)}}},validator:function(p){var o=true;if(p&&p.get("disabled")){o=false}return o}});this.on("activeTabChange",this._onActiveTabChange);this.on("activeIndexChange",this._onActiveIndexChange);if(this._tabParent){this._initTabs()}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var m in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,m)){this.addListener.call(this,m,this.DOMEventHandler)}}},deselectTab:function(l){if(this.getTab(l)===this.get("activeTab")){this.set("activeTab",null)}},selectTab:function(l){this.set("activeTab",this.getTab(l))},_onActiveTabChange:function(n){var l=this.get(d),m=this.getTabIndex(n.newValue);if(l!==m){if(!(this.set(d,m))){this.set(e,n.prevValue)}}},_onActiveIndexChange:function(l){if(l.newValue!==this.getTabIndex(this.get(e))){if(!(this.set(e,this.getTab(l.newValue)))){this.set(d,l.prevValue)}}},_initTabs:function(){var q=c.getChildren(this._tabParent),o=c.getChildren(this._contentParent),n=this.get(d),r,m,s;for(var p=0,l=q.length;p<l;++p){m={};if(o[p]){m.contentEl=o[p]}r=new YAHOO.widget.Tab(q[p],m);this.addTab(r);if(r.hasClass(r.ACTIVE_CLASSNAME)){s=r}}if(n){this.set(e,this.getTab(n))}else{this._configs.activeTab.value=s;this._configs.activeIndex.value=this.getTabIndex(s)}},_createTabViewElement:function(l){var m=f.createElement("div");if(this.CLASSNAME){m.className=this.CLASSNAME}return m},_createTabParent:function(l){var m=f.createElement("ul");if(this.TAB_PARENT_CLASSNAME){m.className=this.TAB_PARENT_CLASSNAME}this.get(g).appendChild(m);return m},_createContentParent:function(l){var m=f.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){m.className=this.CONTENT_PARENT_CLASSNAME}this.get(g).appendChild(m);return m}});YAHOO.widget.TabView=j})();(function(){var d=YAHOO.util,j=d.Dom,m=YAHOO.lang,n="activeTab",k="label",g="labelEl",r="content",c="contentEl",p="element",q="cacheData",b="dataSrc",h="dataLoaded",a="dataTimeout",o="loadMethod",f="postData",l="disabled",e=function(t,s){s=s||{};if(arguments.length==1&&!m.isString(t)&&!t.nodeName){s=t;t=s.element}if(!t&&!s.element){t=this._createTabElement(s)}this.loadHandler={success:function(u){this.set(r,u.responseText)},failure:function(u){}};e.superclass.constructor.call(this,t,s);this.DOM_EVENTS={}};YAHOO.extend(e,YAHOO.util.Element,{LABEL_TAGNAME:"em",ACTIVE_CLASSNAME:"selected",HIDDEN_CLASSNAME:"yui-hidden",ACTIVE_TITLE:"active",DISABLED_CLASSNAME:l,LOADING_CLASSNAME:"loading",dataConnection:null,loadHandler:null,_loading:false,toString:function(){var s=this.get(p),t=s.id||s.tagName;return"Tab "+t},initAttributes:function(s){s=s||{};e.superclass.initAttributes.call(this,s);this.setAttributeConfig("activationEvent",{value:s.activationEvent||"click"});this.setAttributeConfig(g,{value:s[g]||this._getLabelEl(),method:function(t){t=j.get(t);var u=this.get(g);if(u){if(u==t){return false}u.parentNode.replaceChild(t,u);this.set(k,t.innerHTML)}}});this.setAttributeConfig(k,{value:s.label||this._getLabel(),method:function(u){var t=this.get(g);if(!t){this.set(g,this._createLabelEl())}t.innerHTML=u}});this.setAttributeConfig(c,{value:s[c]||document.createElement("div"),method:function(t){t=j.get(t);var u=this.get(c);if(u){if(u===t){return false}if(!this.get("selected")){j.addClass(t,"yui-hidden")}u.parentNode.replaceChild(t,u);this.set(r,t.innerHTML)}}});this.setAttributeConfig(r,{value:s[r],method:function(t){this.get(c).innerHTML=t}});this.setAttributeConfig(b,{value:s.dataSrc});this.setAttributeConfig(q,{value:s.cacheData||false,validator:m.isBoolean});this.setAttributeConfig(o,{value:s.loadMethod||"GET",validator:m.isString});this.setAttributeConfig(h,{value:false,validator:m.isBoolean,writeOnce:true});this.setAttributeConfig(a,{value:s.dataTimeout||null,validator:m.isNumber});this.setAttributeConfig(f,{value:s.postData||null});this.setAttributeConfig("active",{value:s.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(t){if(t===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE)}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","")}},validator:function(t){return m.isBoolean(t)&&!this.get(l)}});this.setAttributeConfig(l,{value:s.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(t){if(t===true){j.addClass(this.get(p),this.DISABLED_CLASSNAME)}else{j.removeClass(this.get(p),this.DISABLED_CLASSNAME)}},validator:m.isBoolean});this.setAttributeConfig("href",{value:s.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(t){this.getElementsByTagName("a")[0].href=t},validator:m.isString});this.setAttributeConfig("contentVisible",{value:s.contentVisible,method:function(t){if(t){j.removeClass(this.get(c),this.HIDDEN_CLASSNAME);if(this.get(b)){if(!this._loading&&!(this.get(h)&&this.get(q))){this._dataConnect()}}}else{j.addClass(this.get(c),this.HIDDEN_CLASSNAME)}},validator:m.isBoolean})},_dataConnect:function(){if(!d.Connect){return false}j.addClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=d.Connect.asyncRequest(this.get(o),this.get(b),{success:function(s){this.loadHandler.success.call(this,s);this.set(h,true);this.dataConnection=null;j.removeClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=false},failure:function(s){this.loadHandler.failure.call(this,s);this.dataConnection=null;j.removeClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=false},scope:this,timeout:this.get(a)},this.get(f))},_createTabElement:function(s){var w=document.createElement("li"),t=document.createElement("a"),v=s.label||null,u=s.labelEl||null;t.href=s.href||"#";w.appendChild(t);if(u){if(!v){v=this._getLabel()}}else{u=this._createLabelEl()}t.appendChild(u);return w},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0]},_createLabelEl:function(){var s=document.createElement(this.LABEL_TAGNAME);return s},_getLabel:function(){var s=this.get(g);if(!s){return undefined}return s.innerHTML},_onActivate:function(v,u){var t=this,s=false;d.Event.preventDefault(v);if(t===u.get(n)){s=true}u.set(n,t,s)}});YAHOO.widget.Tab=e})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(d){if(d){this.init(d)}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE)},checkNumber:function(d){return(!isNaN(d))},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f)}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner)}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value)}},getConfig:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value}}}return d},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value}else{return undefined}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(this.initialConfig[d]&&!b.isUndefined(this.initialConfig[d])){this.setProperty(d,this.initialConfig[d]);return true}}else{return false}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g])}return true}}else{return false}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false}else{if(!b.isUndefined(r)){u.value=r}else{r=u.value}l=false;k=this.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r])}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,d]);this.eventQueue[e]=null;break}}}}}return true}else{return false}},refireEvent:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event&&!b.isUndefined(e.value)){if(this.queueInProgress){this.queueProperty(d)}else{this.fireEvent(d,e.value)}}},applyConfig:function(d,g){var f,e;if(g){e={};for(f in d){if(b.hasOwnProperty(d,f)){e[f.toLowerCase()]=d[f]}}this.initialConfig=e}for(f in d){if(b.hasOwnProperty(d,f)){this.queueProperty(f,d[f])}}},refresh:function(){var d;for(d in this.config){if(b.hasOwnProperty(this.config,d)){this.refireEvent(d)}}},fireQueue:function(){var e,h,d,g,f;this.queueInProgress=true;for(e=0;e<this.eventQueue.length;e++){h=this.eventQueue[e];if(h){d=h[0];g=h[1];f=this.config[d];f.value=g;this.eventQueue[e]=null;this.fireEvent(d,g)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(e,f,h,d){var g=this.config[e.toLowerCase()];if(g&&g.event){if(!a.alreadySubscribed(g.event,f,h)){g.event.subscribe(f,h,d)}return true}else{return false}},unsubscribeFromConfigEvent:function(d,e,g){var f=this.config[d.toLowerCase()];if(f&&f.event){return f.event.unsubscribe(e,g)}else{return false}},toString:function(){var d="Config";if(this.owner){d+=" ["+this.owner.toString()+"]"}return d},outputEventQueue:function(){var d="",g,e,f=this.eventQueue.length;for(e=0;e<f;e++){g=this.eventQueue[e];if(g){d+=g[0]+"="+g[1]+", "}}return d},destroy:function(){var e=this.config,d,f;for(d in e){if(b.hasOwnProperty(e,d)){f=e[d];f.event.unsubscribeAll();f.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};a.alreadySubscribed=function(e,h,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true}}while(g--)}return false};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(s,r){if(s){this.init(s,r)}else{}};var f=YAHOO.util.Dom,d=YAHOO.util.Config,o=YAHOO.util.Event,n=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,j=YAHOO.env.ua,h,q,p,e,a={BEFORE_INIT:"beforeInit",INIT:"init",APPEND:"append",BEFORE_RENDER:"beforeRender",RENDER:"render",CHANGE_HEADER:"changeHeader",CHANGE_BODY:"changeBody",CHANGE_FOOTER:"changeFooter",CHANGE_CONTENT:"changeContent",DESTORY:"destroy",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE:"beforeHide",HIDE:"hide"},k={VISIBLE:{key:"visible",value:true,validator:YAHOO.lang.isBoolean},EFFECT:{key:"effect",suppressEvent:true,supercedes:["visible"]},MONITOR_RESIZE:{key:"monitorresize",value:true},APPEND_TO_DOCUMENT_BODY:{key:"appendtodocumentbody",value:false}};g.IMG_ROOT=null;g.IMG_ROOT_SSL=null;g.CSS_MODULE="yui-module";g.CSS_HEADER="hd";g.CSS_BODY="bd";g.CSS_FOOTER="ft";g.RESIZE_MONITOR_SECURE_URL="javascript:false;";g.RESIZE_MONITOR_BUFFER=1;g.textResizeEvent=new n("textResize");g.forceDocumentRedraw=function(){var r=document.documentElement;if(r){r.className+=" ";r.className=YAHOO.lang.trim(r.className)}};function m(){if(!h){h=document.createElement("div");h.innerHTML=('<div class="'+g.CSS_HEADER+'"></div><div class="'+g.CSS_BODY+'"></div><div class="'+g.CSS_FOOTER+'"></div>');q=h.firstChild;p=q.nextSibling;e=p.nextSibling}return h}function l(){if(!q){m()}return(q.cloneNode(false))}function b(){if(!p){m()}return(p.cloneNode(false))}function c(){if(!e){m()}return(e.cloneNode(false))}g.prototype={constructor:g,element:null,header:null,body:null,footer:null,id:null,imageRoot:g.IMG_ROOT,initEvents:function(){var r=n.LIST;this.beforeInitEvent=this.createEvent(a.BEFORE_INIT);this.beforeInitEvent.signature=r;this.initEvent=this.createEvent(a.INIT);this.initEvent.signature=r;this.appendEvent=this.createEvent(a.APPEND);this.appendEvent.signature=r;this.beforeRenderEvent=this.createEvent(a.BEFORE_RENDER);this.beforeRenderEvent.signature=r;this.renderEvent=this.createEvent(a.RENDER);this.renderEvent.signature=r;this.changeHeaderEvent=this.createEvent(a.CHANGE_HEADER);this.changeHeaderEvent.signature=r;this.changeBodyEvent=this.createEvent(a.CHANGE_BODY);this.changeBodyEvent.signature=r;this.changeFooterEvent=this.createEvent(a.CHANGE_FOOTER);this.changeFooterEvent.signature=r;this.changeContentEvent=this.createEvent(a.CHANGE_CONTENT);this.changeContentEvent.signature=r;this.destroyEvent=this.createEvent(a.DESTORY);this.destroyEvent.signature=r;this.beforeShowEvent=this.createEvent(a.BEFORE_SHOW);this.beforeShowEvent.signature=r;this.showEvent=this.createEvent(a.SHOW);this.showEvent.signature=r;this.beforeHideEvent=this.createEvent(a.BEFORE_HIDE);this.beforeHideEvent.signature=r;this.hideEvent=this.createEvent(a.HIDE);this.hideEvent.signature=r},platform:function(){var r=navigator.userAgent.toLowerCase();if(r.indexOf("windows")!=-1||r.indexOf("win32")!=-1){return"windows"}else{if(r.indexOf("macintosh")!=-1){return"mac"}else{return false}}}(),browser:function(){var r=navigator.userAgent.toLowerCase();if(r.indexOf("opera")!=-1){return"opera"}else{if(r.indexOf("msie 7")!=-1){return"ie7"}else{if(r.indexOf("msie")!=-1){return"ie"}else{if(r.indexOf("safari")!=-1){return"safari"}else{if(r.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(k.VISIBLE.key,{handler:this.configVisible,value:k.VISIBLE.value,validator:k.VISIBLE.validator});this.cfg.addProperty(k.EFFECT.key,{suppressEvent:k.EFFECT.suppressEvent,supercedes:k.EFFECT.supercedes});this.cfg.addProperty(k.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:k.MONITOR_RESIZE.value});this.cfg.addProperty(k.APPEND_TO_DOCUMENT_BODY.key,{value:k.APPEND_TO_DOCUMENT_BODY.value})},init:function(w,v){var t,x;this.initEvents();this.beforeInitEvent.fire(g);this.cfg=new d(this);if(this.isSecure){this.imageRoot=g.IMG_ROOT_SSL}if(typeof w=="string"){t=w;w=document.getElementById(w);if(!w){w=(m()).cloneNode(false);w.id=t}}this.id=f.generateId(w);this.element=w;x=this.element.firstChild;if(x){var s=false,r=false,u=false;do{if(1==x.nodeType){if(!s&&f.hasClass(x,g.CSS_HEADER)){this.header=x;s=true}else{if(!r&&f.hasClass(x,g.CSS_BODY)){this.body=x;r=true}else{if(!u&&f.hasClass(x,g.CSS_FOOTER)){this.footer=x;u=true}}}}}while((x=x.nextSibling))}this.initDefaultConfig();f.addClass(this.element,g.CSS_MODULE);if(v){this.cfg.applyConfig(v,true)}if(!d.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(g)},initResizeMonitor:function(){var s=(j.gecko&&this.platform=="windows");if(s){var r=this;setTimeout(function(){r._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var r,t,v;function x(){g.textResizeEvent.fire()}if(!j.opera){t=f.get("_yuiResizeMonitor");var w=this._supportsCWResize();if(!t){t=document.createElement("iframe");if(this.isSecure&&g.RESIZE_MONITOR_SECURE_URL&&j.ie){t.src=g.RESIZE_MONITOR_SECURE_URL}if(!w){v=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");t.src="data:text/html;charset=utf-8,"+encodeURIComponent(v)}t.id="_yuiResizeMonitor";t.title="Text Resize Monitor";t.style.position="absolute";t.style.visibility="hidden";var s=document.body,u=s.firstChild;if(u){s.insertBefore(t,u)}else{s.appendChild(t)}t.style.width="2em";t.style.height="2em";t.style.top=(-1*(t.offsetHeight+g.RESIZE_MONITOR_BUFFER))+"px";t.style.left="0";t.style.borderWidth="0";t.style.visibility="visible";if(j.webkit){r=t.contentWindow.document;r.open();r.close()}}if(t&&t.contentWindow){g.textResizeEvent.subscribe(this.onDomResize,this,true);if(!g.textResizeInitialized){if(w){if(!o.on(t.contentWindow,"resize",x)){o.on(t,"resize",x)}}g.textResizeInitialized=true}this.resizeMonitor=t}}},_supportsCWResize:function(){var r=true;if(j.gecko&&j.gecko<=1.8){r=false}return r},onDomResize:function(t,s){var r=-1*(this.resizeMonitor.offsetHeight+g.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=r+"px";this.resizeMonitor.style.left="0"},setHeader:function(s){var r=this.header||(this.header=l());if(s.nodeName){r.innerHTML="";r.appendChild(s)}else{r.innerHTML=s}this.changeHeaderEvent.fire(s);this.changeContentEvent.fire()},appendToHeader:function(s){var r=this.header||(this.header=l());r.appendChild(s);this.changeHeaderEvent.fire(s);this.changeContentEvent.fire()},setBody:function(s){var r=this.body||(this.body=b());if(s.nodeName){r.innerHTML="";r.appendChild(s)}else{r.innerHTML=s}this.changeBodyEvent.fire(s);this.changeContentEvent.fire()},appendToBody:function(s){var r=this.body||(this.body=b());r.appendChild(s);this.changeBodyEvent.fire(s);this.changeContentEvent.fire()},setFooter:function(s){var r=this.footer||(this.footer=c());if(s.nodeName){r.innerHTML="";r.appendChild(s)}else{r.innerHTML=s}this.changeFooterEvent.fire(s);this.changeContentEvent.fire()},appendToFooter:function(s){var r=this.footer||(this.footer=c());r.appendChild(s);this.changeFooterEvent.fire(s);this.changeContentEvent.fire()},render:function(t,r){var u=this,v;function s(w){if(typeof w=="string"){w=document.getElementById(w)}if(w){u._addToParent(w,u.element);u.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!r){r=this.element}if(t){s(t)}else{if(!f.inDocument(this.element)){return false}}if(this.header&&!f.inDocument(this.header)){v=r.firstChild;if(v){r.insertBefore(this.header,v)}else{r.appendChild(this.header)}}if(this.body&&!f.inDocument(this.body)){if(this.footer&&f.isAncestor(this.moduleElement,this.footer)){r.insertBefore(this.body,this.footer)}else{r.appendChild(this.body)}}if(this.footer&&!f.inDocument(this.footer)){r.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var r;if(this.element){o.purgeElement(this.element,true);r=this.element.parentNode}if(r){r.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;g.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(s,r,t){var u=r[0];if(u){this.beforeShowEvent.fire();f.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();f.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(t,s,u){var r=s[0];if(r){this.initResizeMonitor()}else{g.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(r,s){if(!this.cfg.getProperty("appendtodocumentbody")&&r===document.body&&r.firstChild){r.insertBefore(s,r.firstChild)}else{r.appendChild(s)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(g,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(q,p){YAHOO.widget.Overlay.superclass.constructor.call(this,q,p)};var j=YAHOO.lang,n=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,o=YAHOO.util.Event,f=YAHOO.util.Dom,d=YAHOO.util.Config,l=YAHOO.env.ua,b=YAHOO.widget.Overlay,h="subscribe",e="unsubscribe",c="contained",k,a={BEFORE_MOVE:"beforeMove",MOVE:"move"},m={X:{key:"x",validator:j.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:j.isNumber,suppressEvent:true,supercedes:["iframe"]},XY:{key:"xy",suppressEvent:true,supercedes:["iframe"]},CONTEXT:{key:"context",suppressEvent:true,supercedes:["iframe"]},FIXED_CENTER:{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},AUTO_FILL_HEIGHT:{key:"autofillheight",supercedes:["height"],value:"body"},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:j.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(l.ie==6?true:false),validator:j.isBoolean,supercedes:["zindex"]},PREVENT_CONTEXT_OVERLAP:{key:"preventcontextoverlap",value:false,validator:j.isBoolean,supercedes:["constraintoviewport"]}};b.IFRAME_SRC="javascript:false;";b.IFRAME_OFFSET=3;b.VIEWPORT_OFFSET=10;b.TOP_LEFT="tl";b.TOP_RIGHT="tr";b.BOTTOM_LEFT="bl";b.BOTTOM_RIGHT="br";b.CSS_OVERLAY="yui-overlay";b.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;b.windowScrollEvent=new n("windowScroll");b.windowResizeEvent=new n("windowResize");b.windowScrollHandler=function(q){var p=o.getTarget(q);if(!p||p===window||p===window.document){if(l.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){b.windowScrollEvent.fire()},1)}else{b.windowScrollEvent.fire()}}};b.windowResizeHandler=function(p){if(l.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){b.windowResizeEvent.fire()},100)}else{b.windowResizeEvent.fire()}};b._initialized=null;if(b._initialized===null){o.on(window,"scroll",b.windowScrollHandler);o.on(window,"resize",b.windowResizeHandler);b._initialized=true}b._TRIGGER_MAP={windowScroll:b.windowScrollEvent,windowResize:b.windowResizeEvent,textResize:g.textResizeEvent};YAHOO.extend(b,g,{CONTEXT_TRIGGERS:[],init:function(q,p){b.superclass.init.call(this,q);this.beforeInitEvent.fire(b);f.addClass(this.element,b.CSS_OVERLAY);if(p){this.cfg.applyConfig(p,true)}if(this.platform=="mac"&&l.gecko){if(!d.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!d.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(b)},initEvents:function(){b.superclass.initEvents.call(this);var p=n.LIST;this.beforeMoveEvent=this.createEvent(a.BEFORE_MOVE);this.beforeMoveEvent.signature=p;this.moveEvent=this.createEvent(a.MOVE);this.moveEvent.signature=p},initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);var p=this.cfg;p.addProperty(m.X.key,{handler:this.configX,validator:m.X.validator,suppressEvent:m.X.suppressEvent,supercedes:m.X.supercedes});p.addProperty(m.Y.key,{handler:this.configY,validator:m.Y.validator,suppressEvent:m.Y.suppressEvent,supercedes:m.Y.supercedes});p.addProperty(m.XY.key,{handler:this.configXY,suppressEvent:m.XY.suppressEvent,supercedes:m.XY.supercedes});p.addProperty(m.CONTEXT.key,{handler:this.configContext,suppressEvent:m.CONTEXT.suppressEvent,supercedes:m.CONTEXT.supercedes});p.addProperty(m.FIXED_CENTER.key,{handler:this.configFixedCenter,value:m.FIXED_CENTER.value,validator:m.FIXED_CENTER.validator,supercedes:m.FIXED_CENTER.supercedes});p.addProperty(m.WIDTH.key,{handler:this.configWidth,suppressEvent:m.WIDTH.suppressEvent,supercedes:m.WIDTH.supercedes});p.addProperty(m.HEIGHT.key,{handler:this.configHeight,suppressEvent:m.HEIGHT.suppressEvent,supercedes:m.HEIGHT.supercedes});p.addProperty(m.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:m.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:m.AUTO_FILL_HEIGHT.supercedes});p.addProperty(m.ZINDEX.key,{handler:this.configzIndex,value:m.ZINDEX.value});p.addProperty(m.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:m.CONSTRAIN_TO_VIEWPORT.value,validator:m.CONSTRAIN_TO_VIEWPORT.validator,supercedes:m.CONSTRAIN_TO_VIEWPORT.supercedes});p.addProperty(m.IFRAME.key,{handler:this.configIframe,value:m.IFRAME.value,validator:m.IFRAME.validator,supercedes:m.IFRAME.supercedes});p.addProperty(m.PREVENT_CONTEXT_OVERLAP.key,{value:m.PREVENT_CONTEXT_OVERLAP.value,validator:m.PREVENT_CONTEXT_OVERLAP.validator,supercedes:m.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(p,q){this.cfg.setProperty("xy",[p,q])},hideMacGeckoScrollbars:function(){f.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){f.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(p){f.setStyle(this.element,"visibility",(p)?"visible":"hidden");if(p){f.removeClass(this.element,"yui-overlay-hidden")}else{f.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(s,p,y){var r=p[0],t=f.getStyle(this.element,"visibility"),z=this.cfg.getProperty("effect"),w=[],v=(this.platform=="mac"&&l.gecko),G=d.alreadySubscribed,x,q,F,D,C,B,E,A,u;if(t=="inherit"){F=this.element.parentNode;while(F.nodeType!=9&&F.nodeType!=11){t=f.getStyle(F,"visibility");if(t!="inherit"){break}F=F.parentNode}if(t=="inherit"){t="visible"}}if(z){if(z instanceof Array){A=z.length;for(D=0;D<A;D++){x=z[D];w[w.length]=x.effect(this,x.duration)}}else{w[w.length]=z.effect(this,z.duration)}}if(r){if(v){this.showMacGeckoScrollbars()}if(z){if(r){if(t!="visible"||t===""){this.beforeShowEvent.fire();u=w.length;for(C=0;C<u;C++){q=w[C];if(C===0&&!G(q.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){q.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}q.animateIn()}}}}else{if(t!="visible"||t===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(v){this.hideMacGeckoScrollbars()}if(z){if(t=="visible"){this.beforeHideEvent.fire();u=w.length;for(B=0;B<u;B++){E=w[B];if(B===0&&!G(E.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){E.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}E.animateOut()}}else{if(t===""){this._setDomVisibility(false)}}}else{if(t=="visible"||t===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var p=this.cfg,q=p.getProperty("fixedcenter");if(p.getProperty("visible")){if(q&&(q!==c||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var t=b.VIEWPORT_OFFSET,r=this.element,u=r.offsetWidth,s=r.offsetHeight,p=f.getViewportWidth(),q=f.getViewportHeight();return((u+t<p)&&(s+t<q))},configFixedCenter:function(t,r,u){var v=r[0],q=d.alreadySubscribed,s=b.windowResizeEvent,p=b.windowScrollEvent;if(v){this.center();if(!q(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!q(s,this.doCenterOnDOMEvent,this)){s.subscribe(this.doCenterOnDOMEvent,this,true)}if(!q(p,this.doCenterOnDOMEvent,this)){p.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);s.unsubscribe(this.doCenterOnDOMEvent,this);p.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(s,q,t){var p=q[0],r=this.element;f.setStyle(r,"height",p);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(u,t,q){var w=t[0],r=this.cfg,v="autofillheight",x="height",s=r.getProperty(v),p=this._autoFillOnHeightChange;r.unsubscribeFromConfigEvent(x,p);g.textResizeEvent.unsubscribe(p);this.changeContentEvent.unsubscribe(p);if(s&&w!==s&&this[s]){f.setStyle(this[s],x,"")}if(w){w=j.trim(w.toLowerCase());r.subscribeToConfigEvent(x,p,this[w],this);g.textResizeEvent.subscribe(p,this[w],this);this.changeContentEvent.subscribe(p,this[w],this);r.setProperty(v,w,true)}},configWidth:function(s,p,t){var r=p[0],q=this.element;f.setStyle(q,"width",r);this.cfg.refireEvent("iframe")},configzIndex:function(r,p,s){var t=p[0],q=this.element;if(!t){t=f.getStyle(q,"zIndex");if(!t||isNaN(t)){t=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(t<=0){t=1}}f.setStyle(q,"zIndex",t);this.cfg.setProperty("zIndex",t,true);if(this.iframe){this.stackIframe()}},configXY:function(r,q,s){var u=q[0],p=u[0],t=u[1];this.cfg.setProperty("x",p);this.cfg.setProperty("y",t);this.beforeMoveEvent.fire([p,t]);p=this.cfg.getProperty("x");t=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([p,t])},configX:function(r,q,s){var p=q[0],t=this.cfg.getProperty("y");this.cfg.setProperty("x",p,true);this.cfg.setProperty("y",t,true);this.beforeMoveEvent.fire([p,t]);p=this.cfg.getProperty("x");t=this.cfg.getProperty("y");f.setX(this.element,p,true);this.cfg.setProperty("xy",[p,t],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([p,t])},configY:function(r,q,s){var p=this.cfg.getProperty("x"),t=q[0];this.cfg.setProperty("x",p,true);this.cfg.setProperty("y",t,true);this.beforeMoveEvent.fire([p,t]);p=this.cfg.getProperty("x");t=this.cfg.getProperty("y");f.setY(this.element,t,true);this.cfg.setProperty("xy",[p,t],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([p,t])},showIframe:function(){var q=this.iframe,p;if(q){p=this.element.parentNode;if(p!=q.parentNode){this._addToParent(p,q)}q.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var p=this.iframe,r=this.element,t=b.IFRAME_OFFSET,q=(t*2),s;if(p){p.style.width=(r.offsetWidth+q+"px");p.style.height=(r.offsetHeight+q+"px");s=this.cfg.getProperty("xy");if(!j.isArray(s)||(isNaN(s[0])||isNaN(s[1]))){this.syncPosition();s=this.cfg.getProperty("xy")}f.setXY(p,[(s[0]-t),(s[1]-t)])}},stackIframe:function(){if(this.iframe){var p=f.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(p)&&!isNaN(p)){f.setStyle(this.iframe,"zIndex",(p-1))}}},configIframe:function(s,r,t){var p=r[0];function u(){var w=this.iframe,x=this.element,y;if(!w){if(!k){k=document.createElement("iframe");if(this.isSecure){k.src=b.IFRAME_SRC}if(l.ie){k.style.filter="alpha(opacity=0)";k.frameBorder=0}else{k.style.opacity="0"}k.style.position="absolute";k.style.border="none";k.style.margin="0";k.style.padding="0";k.style.display="none";k.tabIndex=-1}w=k.cloneNode(false);y=x.parentNode;var v=y||document.body;this._addToParent(v,w);this.iframe=w}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function q(){u.call(this);this.beforeShowEvent.unsubscribe(q);this._iframeDeferred=false}if(p){if(this.cfg.getProperty("visible")){u.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(q);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(q,p,r){var s=p[0];if(s){if(!d.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!d.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(u,t,q){var x=t[0],r,p,v,s,w=this.CONTEXT_TRIGGERS;if(x){r=x[0];p=x[1];v=x[2];s=x[3];if(w&&w.length>0){s=(s||[]).concat(w)}if(r){if(typeof r=="string"){this.cfg.setProperty("context",[document.getElementById(r),p,v,s],true)}if(p&&v){this.align(p,v)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger)}if(s){this._processTriggers(s,h,this._alignOnTrigger);this._contextTriggers=s}}}},_alignOnTrigger:function(q,p){this.align()},_findTriggerCE:function(p){var q=null;if(p instanceof n){q=p}else{if(b._TRIGGER_MAP[p]){q=b._TRIGGER_MAP[p]}}return q},_processTriggers:function(u,w,s){var r,v;for(var q=0,p=u.length;q<p;++q){r=u[q];v=this._findTriggerCE(r);if(v){v[w](s,this,true)}else{this[w](r,s)}}},align:function(q,p){var v=this.cfg.getProperty("context"),u=this,t,s,w;function r(x,y){switch(q){case b.TOP_LEFT:u.moveTo(y,x);break;case b.TOP_RIGHT:u.moveTo((y-s.offsetWidth),x);break;case b.BOTTOM_LEFT:u.moveTo(y,(x-s.offsetHeight));break;case b.BOTTOM_RIGHT:u.moveTo((y-s.offsetWidth),(x-s.offsetHeight));break}}if(v){t=v[0];s=this.element;u=this;if(!q){q=v[1]}if(!p){p=v[2]}if(s&&t){w=f.getRegion(t);switch(p){case b.TOP_LEFT:r(w.top,w.left);break;case b.TOP_RIGHT:r(w.top,w.right);break;case b.BOTTOM_LEFT:r(w.bottom,w.left);break;case b.BOTTOM_RIGHT:r(w.bottom,w.right);break}}}},enforceConstraints:function(q,p,r){var t=p[0];var s=this.getConstrainedXY(t[0],t[1]);this.cfg.setProperty("x",s[0],true);this.cfg.setProperty("y",s[1],true);this.cfg.setProperty("xy",s,true)},getConstrainedX:function(w){var t=this,p=t.element,G=p.offsetWidth,E=b.VIEWPORT_OFFSET,J=f.getViewportWidth(),F=f.getDocumentScrollLeft(),A=(G+E<J),D=this.cfg.getProperty("context"),r,z,L,u=false,H,y,I=F+E,q=F+J-G-E,K=w,v={tltr:true,blbr:true,brbl:true,trtl:true};var B=function(){var x;if((t.cfg.getProperty("x")-F)>z){x=(z-G)}else{x=(z+L)}t.cfg.setProperty("x",(x+F),true);return x};var s=function(){if((t.cfg.getProperty("x")-F)>z){return(y-E)}else{return(H-E)}};var C=function(){var x=s(),M;if(G>x){if(u){B()}else{B();u=true;M=C()}}return M};if(w<I||w>q){if(A){if(this.cfg.getProperty("preventcontextoverlap")&&D&&v[(D[1]+D[2])]){r=D[0];z=f.getX(r)-F;L=r.offsetWidth;H=z;y=(J-(z+L));C();K=this.cfg.getProperty("x")}else{if(w<I){K=I}else{if(w>q){K=q}}}}else{K=E+F}}return K},getConstrainedY:function(B){var x=this,q=x.element,K=q.offsetHeight,J=b.VIEWPORT_OFFSET,F=f.getViewportHeight(),I=f.getDocumentScrollTop(),G=(K+J<F),H=this.cfg.getProperty("context"),v,C,D,z=false,w,r,E=I+J,t=I+F-K-J,p=B,A={trbr:true,tlbl:true,bltl:true,brtr:true};var u=function(){var y;if((x.cfg.getProperty("y")-I)>C){y=(C-K)}else{y=(C+D)}x.cfg.setProperty("y",(y+I),true);return y};var s=function(){if((x.cfg.getProperty("y")-I)>C){return(r-J)}else{return(w-J)}};var L=function(){var M=s(),y;if(K>M){if(z){u()}else{u();z=true;y=L()}}return y};if(B<E||B>t){if(G){if(this.cfg.getProperty("preventcontextoverlap")&&H&&A[(H[1]+H[2])]){v=H[0];D=v.offsetHeight;C=(f.getY(v)-I);w=C;r=(F-(C+D));L();p=x.cfg.getProperty("y")}else{if(B<E){p=E}else{if(B>t){p=t}}}}else{p=J+I}}return p},getConstrainedXY:function(p,q){return[this.getConstrainedX(p),this.getConstrainedY(q)]},center:function(){var s=b.VIEWPORT_OFFSET,t=this.element.offsetWidth,r=this.element.offsetHeight,q=f.getViewportWidth(),u=f.getViewportHeight(),p,v;if(t<q){p=(q/2)-(t/2)+f.getDocumentScrollLeft()}else{p=s+f.getDocumentScrollLeft()}if(r<u){v=(u/2)-(r/2)+f.getDocumentScrollTop()}else{v=s+f.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(p,10),parseInt(v,10)]);this.cfg.refireEvent("iframe");if(l.webkit){this.forceContainerRedraw()}},syncPosition:function(){var p=f.getXY(this.element);this.cfg.setProperty("x",p[0],true);this.cfg.setProperty("y",p[1],true);this.cfg.setProperty("xy",p,true)},onDomResize:function(r,q){var p=this;b.superclass.onDomResize.call(this,r,q);setTimeout(function(){p.syncPosition();p.cfg.refireEvent("iframe");p.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(q){var p=null;if(q.ownerDocument&&q.ownerDocument.defaultView){var r=q.ownerDocument.defaultView.getComputedStyle(q,"");if(r){p=parseInt(r.height,10)}}return(j.isNumber(p))?p:null}}else{return function(q){var p=null;if(q.style.pixelHeight){p=q.style.pixelHeight}return(j.isNumber(p))?p:null}}})(),_validateAutoFillHeight:function(p){return(!p)||(j.isString(p)&&b.STD_MOD_RE.test(p))},_autoFillOnHeightChange:function(s,q,r){var p=this.cfg.getProperty("height");if((p&&p!=="auto")||(p===0)){this.fillHeight(r)}},_getPreciseHeight:function(q){var p=q.offsetHeight;if(q.getBoundingClientRect){var r=q.getBoundingClientRect();p=r.bottom-r.top}return p},fillHeight:function(s){if(s){var q=this.innerElement||this.element,p=[this.header,this.body,this.footer],w,x=0,y=0,u=0,r=false;for(var v=0,t=p.length;v<t;v++){w=p[v];if(w){if(s!==w){y+=this._getPreciseHeight(w)}else{r=true}}}if(r){if(l.ie||l.opera){f.setStyle(s,"height",0+"px")}x=this._getComputedHeight(q);if(x===null){f.addClass(q,"yui-override-padding");x=q.clientHeight;f.removeClass(q,"yui-override-padding")}u=Math.max(x-y,0);f.setStyle(s,"height",u+"px");if(s.offsetHeight!=u){u=Math.max(u-(s.offsetHeight-u),0)}f.setStyle(s,"height",u+"px")}}},bringToTop:function(){var t=[],s=this.element;function w(A,z){var C=f.getStyle(A,"zIndex"),B=f.getStyle(z,"zIndex"),y=(!C||isNaN(C))?0:parseInt(C,10),x=(!B||isNaN(B))?0:parseInt(B,10);if(y>x){return -1}else{if(y<x){return 1}else{return 0}}}function r(z){var y=f.hasClass(z,b.CSS_OVERLAY),x=YAHOO.widget.Panel;if(y&&!f.isAncestor(s,z)){if(x&&f.hasClass(z,x.CSS_PANEL)){t[t.length]=z.parentNode}else{t[t.length]=z}}}f.getElementsBy(r,"DIV",document.body);t.sort(w);var p=t[0],v;if(p){v=f.getStyle(p,"zIndex");if(!isNaN(v)){var u=false;if(p!=s){u=true}else{if(t.length>1){var q=f.getStyle(t[1],"zIndex");if(!isNaN(q)&&(v==q)){u=true}}}if(u){this.cfg.setProperty("zindex",(parseInt(v,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;b.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);b.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);g.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);b.superclass.destroy.call(this)},forceContainerRedraw:function(){var p=this;f.addClass(p.element,"yui-force-redraw");setTimeout(function(){f.removeClass(p.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(g){this.init(g)};var d=YAHOO.widget.Overlay,c=YAHOO.util.Event,e=YAHOO.util.Dom,b=YAHOO.util.Config,f=YAHOO.util.CustomEvent,a=YAHOO.widget.OverlayManager;a.CSS_FOCUSED="focused";a.prototype={constructor:a,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(j){this.cfg=new b(this);this.initDefaultConfig();if(j){this.cfg.applyConfig(j,true)}this.cfg.fireQueue();var h=null;this.getActive=function(){return h};this.focus=function(k){var l=this.find(k);if(l){l.focus()}};this.remove=function(l){var n=this.find(l),k;if(n){if(h==n){h=null}var m=(n.element===null&&n.cfg===null)?true:false;if(!m){k=e.getStyle(n.element,"zIndex");n.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));n.hideEvent.unsubscribe(n.blur);n.destroyEvent.unsubscribe(this._onOverlayDestroy,n);n.focusEvent.unsubscribe(this._onOverlayFocusHandler,n);n.blurEvent.unsubscribe(this._onOverlayBlurHandler,n);if(!m){c.removeListener(n.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);n.cfg.setProperty("zIndex",k,true);n.cfg.setProperty("manager",null)}if(n.focusEvent._managed){n.focusEvent=null}if(n.blurEvent._managed){n.blurEvent=null}if(n.focus._managed){n.focus=null}if(n.blur._managed){n.blur=null}}};this.blurAll=function(){var l=this.overlays.length,k;if(l>0){k=l-1;do{this.overlays[k].blur()}while(k--)}};this._manageBlur=function(k){var l=false;if(h==k){e.removeClass(h.element,a.CSS_FOCUSED);h=null;l=true}return l};this._manageFocus=function(k){var l=false;if(h!=k){if(h){h.blur()}h=k;this.bringToTop(h);e.addClass(h.element,a.CSS_FOCUSED);l=true}return l};var g=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(g){this.register(g);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(j){var g=c.getTarget(j),h=this.close;if(h&&(g==h||e.isAncestor(h,g))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(h,g,j){this.remove(j)},_onOverlayFocusHandler:function(h,g,j){this._manageFocus(j)},_onOverlayBlurHandler:function(h,g,j){this._manageBlur(j)},_bindFocus:function(g){var h=this;if(!g.focusEvent){g.focusEvent=g.createEvent("focus");g.focusEvent.signature=f.LIST;g.focusEvent._managed=true}else{g.focusEvent.subscribe(h._onOverlayFocusHandler,g,h)}if(!g.focus){c.on(g.element,h.cfg.getProperty("focusevent"),h._onOverlayElementFocus,null,g);g.focus=function(){if(h._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};g.focus._managed=true}},_bindBlur:function(g){var h=this;if(!g.blurEvent){g.blurEvent=g.createEvent("blur");g.blurEvent.signature=f.LIST;g.focusEvent._managed=true}else{g.blurEvent.subscribe(h._onOverlayBlurHandler,g,h)}if(!g.blur){g.blur=function(){if(h._manageBlur(this)){this.blurEvent.fire()}};g.blur._managed=true}g.hideEvent.subscribe(g.blur)},_bindDestroy:function(g){var h=this;g.destroyEvent.subscribe(h._onOverlayDestroy,g,h)},_syncZIndex:function(g){var h=e.getStyle(g.element,"zIndex");if(!isNaN(h)){g.cfg.setProperty("zIndex",parseInt(h,10))}else{g.cfg.setProperty("zIndex",0)}},register:function(g){var k=false,h,j;if(g instanceof d){g.cfg.addProperty("manager",{value:this});this._bindFocus(g);this._bindBlur(g);this._bindDestroy(g);this._syncZIndex(g);this.overlays.push(g);this.bringToTop(g);k=true}else{if(g instanceof Array){for(h=0,j=g.length;h<j;h++){k=this.register(g[h])||k}}}return k},bringToTop:function(n){var j=this.find(n),m,g,k;if(j){k=this.overlays;k.sort(this.compareZIndexDesc);g=k[0];if(g){m=e.getStyle(g.element,"zIndex");if(!isNaN(m)){var l=false;if(g!==j){l=true}else{if(k.length>1){var h=e.getStyle(k[1].element,"zIndex");if(!isNaN(h)&&(m==h)){l=true}}}if(l){j.cfg.setProperty("zindex",(parseInt(m,10)+2))}}k.sort(this.compareZIndexDesc)}}},find:function(g){var l=g instanceof d,j=this.overlays,p=j.length,k=null,m,h;if(l||typeof g=="string"){for(h=p-1;h>=0;h--){m=j[h];if((l&&(m===g))||(m.id==g)){k=m;break}}}return k},compareZIndexDesc:function(k,j){var h=(k.cfg)?k.cfg.getProperty("zIndex"):null,g=(j.cfg)?j.cfg.getProperty("zIndex"):null;if(h===null&&g===null){return 0}else{if(h===null){return 1}else{if(g===null){return -1}else{if(h>g){return -1}else{if(h<g){return 1}else{return 0}}}}}},showAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].show()}},hideAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(q,p){YAHOO.widget.Tooltip.superclass.constructor.call(this,q,p)};var e=YAHOO.lang,o=YAHOO.util.Event,n=YAHOO.util.CustomEvent,c=YAHOO.util.Dom,k=YAHOO.widget.Tooltip,h=YAHOO.env.ua,g=(h.ie&&(h.ie<=6||document.compatMode=="BackCompat")),f,j={PREVENT_OVERLAP:{key:"preventoverlap",value:true,validator:e.isBoolean,supercedes:["x","y","xy"]},SHOW_DELAY:{key:"showdelay",value:200,validator:e.isNumber},AUTO_DISMISS_DELAY:{key:"autodismissdelay",value:5000,validator:e.isNumber},HIDE_DELAY:{key:"hidedelay",value:250,validator:e.isNumber},TEXT:{key:"text",suppressEvent:true},CONTAINER:{key:"container"},DISABLED:{key:"disabled",value:false,suppressEvent:true}},a={CONTEXT_MOUSE_OVER:"contextMouseOver",CONTEXT_MOUSE_OUT:"contextMouseOut",CONTEXT_TRIGGER:"contextTrigger"};k.CSS_TOOLTIP="yui-tt";function l(r,p){var q=this.cfg,s=q.getProperty("width");if(s==p){q.setProperty("width",r)}}function d(q,p){if("_originalWidth" in this){l.call(this,this._originalWidth,this._forcedWidth)}var r=document.body,v=this.cfg,u=v.getProperty("width"),s,t;if((!u||u=="auto")&&(v.getProperty("container")!=r||v.getProperty("x")>=c.getViewportWidth()||v.getProperty("y")>=c.getViewportHeight())){t=this.element.cloneNode(true);t.style.visibility="hidden";t.style.top="0px";t.style.left="0px";r.appendChild(t);s=(t.offsetWidth+"px");r.removeChild(t);t=null;v.setProperty("width",s);v.refireEvent("xy");this._originalWidth=u||"";this._forcedWidth=s}}function b(q,p,r){this.render(r)}function m(){o.onDOMReady(b,this.cfg.getProperty("container"),this)}YAHOO.extend(k,YAHOO.widget.Overlay,{init:function(q,p){k.superclass.init.call(this,q);this.beforeInitEvent.fire(k);c.addClass(this.element,k.CSS_TOOLTIP);if(p){this.cfg.applyConfig(p,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",d);this.subscribe("init",m);this.subscribe("render",this.onRender);this.initEvent.fire(k)},initEvents:function(){k.superclass.initEvents.call(this);var p=n.LIST;this.contextMouseOverEvent=this.createEvent(a.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=p;this.contextMouseOutEvent=this.createEvent(a.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=p;this.contextTriggerEvent=this.createEvent(a.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=p},initDefaultConfig:function(){k.superclass.initDefaultConfig.call(this);this.cfg.addProperty(j.PREVENT_OVERLAP.key,{value:j.PREVENT_OVERLAP.value,validator:j.PREVENT_OVERLAP.validator,supercedes:j.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(j.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:j.SHOW_DELAY.validator});this.cfg.addProperty(j.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:j.AUTO_DISMISS_DELAY.value,validator:j.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(j.HIDE_DELAY.key,{handler:this.configHideDelay,value:j.HIDE_DELAY.value,validator:j.HIDE_DELAY.validator});this.cfg.addProperty(j.TEXT.key,{handler:this.configText,suppressEvent:j.TEXT.suppressEvent});this.cfg.addProperty(j.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(j.DISABLED.key,{handler:this.configContainer,value:j.DISABLED.value,supressEvent:j.DISABLED.suppressEvent})},configText:function(q,p,r){var s=p[0];if(s){this.setBody(s)}},configContainer:function(r,q,s){var p=q[0];if(typeof p=="string"){this.cfg.setProperty("container",document.getElementById(p),true)}},_removeEventListeners:function(){var s=this._context,p,r,q;if(s){p=s.length;if(p>0){q=p-1;do{r=s[q];o.removeListener(r,"mouseover",this.onContextMouseOver);o.removeListener(r,"mousemove",this.onContextMouseMove);o.removeListener(r,"mouseout",this.onContextMouseOut)}while(q--)}}},configContext:function(u,q,v){var t=q[0],w,p,s,r;if(t){if(!(t instanceof Array)){if(typeof t=="string"){this.cfg.setProperty("context",[document.getElementById(t)],true)}else{this.cfg.setProperty("context",[t],true)}t=this.cfg.getProperty("context")}this._removeEventListeners();this._context=t;w=this._context;if(w){p=w.length;if(p>0){r=p-1;do{s=w[r];o.on(s,"mouseover",this.onContextMouseOver,this);o.on(s,"mousemove",this.onContextMouseMove,this);o.on(s,"mouseout",this.onContextMouseOut,this)}while(r--)}}}},onContextMouseMove:function(q,p){p.pageX=o.getPageX(q);p.pageY=o.getPageY(q)},onContextMouseOver:function(r,q){var p=this;if(p.title){q._tempTitle=p.title;p.title=""}if(q.fireEvent("contextMouseOver",p,r)!==false&&!q.cfg.getProperty("disabled")){if(q.hideProcId){clearTimeout(q.hideProcId);q.hideProcId=null}o.on(p,"mousemove",q.onContextMouseMove,q);q.showProcId=q.doShow(r,p)}},onContextMouseOut:function(r,q){var p=this;if(q._tempTitle){p.title=q._tempTitle;q._tempTitle=null}if(q.showProcId){clearTimeout(q.showProcId);q.showProcId=null}if(q.hideProcId){clearTimeout(q.hideProcId);q.hideProcId=null}q.fireEvent("contextMouseOut",p,r);q.hideProcId=setTimeout(function(){q.hide()},q.cfg.getProperty("hidedelay"))},doShow:function(r,p){var s=25,q=this;if(h.opera&&p.tagName&&p.tagName.toUpperCase()=="A"){s+=12}return setTimeout(function(){var t=q.cfg.getProperty("text");if(q._tempTitle&&(t===""||YAHOO.lang.isUndefined(t)||YAHOO.lang.isNull(t))){q.setBody(q._tempTitle)}else{q.cfg.refireEvent("text")}q.moveTo(q.pageX,q.pageY+s);if(q.cfg.getProperty("preventoverlap")){q.preventOverlap(q.pageX,q.pageY)}o.removeListener(p,"mousemove",q.onContextMouseMove);q.contextTriggerEvent.fire(p);q.show();q.hideProcId=q.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var p=this;return setTimeout(function(){p.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(t,s){var p=this.element.offsetHeight,r=new YAHOO.util.Point(t,s),q=c.getRegion(this.element);q.top-=5;q.left-=5;q.right+=5;q.bottom+=5;if(q.contains(r)){this.cfg.setProperty("y",(s-p-5))}},onRender:function(t,s){function u(){var x=this.element,w=this.underlay;if(w){w.style.width=(x.offsetWidth+6)+"px";w.style.height=(x.offsetHeight+1)+"px"}}function q(){c.addClass(this.underlay,"yui-tt-shadow-visible");if(h.ie){this.forceUnderlayRedraw()}}function p(){c.removeClass(this.underlay,"yui-tt-shadow-visible")}function v(){var y=this.underlay,x,w,A,z;if(!y){x=this.element;w=YAHOO.widget.Module;A=h.ie;z=this;if(!f){f=document.createElement("div");f.className="yui-tt-shadow"}y=f.cloneNode(false);x.appendChild(y);this.underlay=y;this._shadow=this.underlay;q.call(this);this.subscribe("beforeShow",q);this.subscribe("hide",p);if(g){window.setTimeout(function(){u.call(z)},0);this.cfg.subscribeToConfigEvent("width",u);this.cfg.subscribeToConfigEvent("height",u);this.subscribe("changeContent",u);w.textResizeEvent.subscribe(u,this,true);this.subscribe("destroy",function(){w.textResizeEvent.unsubscribe(u,this)})}}}function r(){v.call(this);this.unsubscribe("beforeShow",r)}if(this.cfg.getProperty("visible")){v.call(this)}else{this.subscribe("beforeShow",r)}},forceUnderlayRedraw:function(){var p=this;c.addClass(p.underlay,"yui-force-redraw");setTimeout(function(){c.removeClass(p.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();k.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(w,v){YAHOO.widget.Panel.superclass.constructor.call(this,w,v)};var t=null;var e=YAHOO.lang,f=YAHOO.util,a=f.Dom,u=f.Event,n=f.CustomEvent,l=YAHOO.util.KeyListener,j=f.Config,h=YAHOO.widget.Overlay,p=YAHOO.widget.Panel,m=YAHOO.env.ua,q=(m.ie&&(m.ie<=6||document.compatMode=="BackCompat")),g,r,c,d={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},o={CLOSE:{key:"close",value:true,validator:e.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(f.DD?true:false),validator:e.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:e.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:e.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},STRINGS:{key:"strings",supercedes:["close"],validator:e.isObject,value:{close:"Close"}}};p.CSS_PANEL="yui-panel";p.CSS_PANEL_CONTAINER="yui-panel-container";p.FOCUSABLE=["a","button","select","textarea","input","iframe"];function k(w,v){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function s(w,v,x){var A=x[0],y=x[1],z=this.cfg,B=z.getProperty("width");if(B==y){z.setProperty("width",A)}this.unsubscribe("hide",s,x)}function b(w,v){var z,y,x;if(q){z=this.cfg;y=z.getProperty("width");if(!y||y=="auto"){x=(this.element.offsetWidth+"px");z.setProperty("width",x);this.subscribe("hide",s,[(y||""),x])}}}YAHOO.extend(p,h,{init:function(w,v){p.superclass.init.call(this,w);this.beforeInitEvent.fire(p);a.addClass(this.element,p.CSS_PANEL);this.buildWrapper();if(v){this.cfg.applyConfig(v,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",k);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(p)},_onElementFocus:function(A){if(t===this){var z=u.getTarget(A),y=document.documentElement,w=(z!==y&&z!==window);if(w&&z!==this.element&&z!==this.mask&&!a.isAncestor(this.element,z)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(x){try{if(w&&z!==document.body){z.blur()}}catch(v){}}}}},_addFocusHandlers:function(w,v){if(!this.firstElement){if(m.webkit||m.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);u.onFocus(document.documentElement,this._onElementFocus,this,true);t=this},_createHiddenFocusElement:function(){var v=document.createElement("button");v.style.height="1px";v.style.width="1px";v.style.position="absolute";v.style.left="-10000em";v.style.opacity=0;v.tabIndex=-1;this.innerElement.appendChild(v);this._modalFocus=v},_removeFocusHandlers:function(w,v){u.removeFocusListener(document.documentElement,this._onElementFocus,this);if(t==this){t=null}},focusFirst:function(x,v,z){var w=this.firstElement;if(v&&v[1]){u.stopEvent(v[1])}if(w){try{w.focus()}catch(y){}}},focusLast:function(x,v,z){var w=this.lastElement;if(v&&v[1]){u.stopEvent(v[1])}if(w){try{w.focus()}catch(y){}}},setTabLoop:function(y,A){var w=this.preventBackTab,x=this.preventTabOut,v=this.showEvent,z=this.hideEvent;if(w){w.disable();v.unsubscribe(w.enable,w);z.unsubscribe(w.disable,w);w=this.preventBackTab=null}if(x){x.disable();v.unsubscribe(x.enable,x);z.unsubscribe(x.disable,x);x=this.preventTabOut=null}if(y){this.preventBackTab=new l(y,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});w=this.preventBackTab;v.subscribe(w.enable,w,true);z.subscribe(w.disable,w,true)}if(A){this.preventTabOut=new l(A,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});x=this.preventTabOut;v.subscribe(x.enable,x,true);z.subscribe(x.disable,x,true)}},getFocusableElements:function(v){v=v||this.innerElement;var y={};for(var x=0;x<p.FOCUSABLE.length;x++){y[p.FOCUSABLE[x]]=true}function w(z){if(z.focus&&z.type!=="hidden"&&!z.disabled&&y[z.tagName.toLowerCase()]){return true}return false}return a.getElementsBy(w,null,v)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var v=this.getFocusableElements();this.focusableElements=v;if(v.length>0){this.firstElement=v[0];this.lastElement=v[v.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){p.superclass.initEvents.call(this);var v=n.LIST;this.showMaskEvent=this.createEvent(d.SHOW_MASK);this.showMaskEvent.signature=v;this.hideMaskEvent=this.createEvent(d.HIDE_MASK);this.hideMaskEvent.signature=v;this.dragEvent=this.createEvent(d.DRAG);this.dragEvent.signature=v},initDefaultConfig:function(){p.superclass.initDefaultConfig.call(this);this.cfg.addProperty(o.CLOSE.key,{handler:this.configClose,value:o.CLOSE.value,validator:o.CLOSE.validator,supercedes:o.CLOSE.supercedes});this.cfg.addProperty(o.DRAGGABLE.key,{handler:this.configDraggable,value:(f.DD)?true:false,validator:o.DRAGGABLE.validator,supercedes:o.DRAGGABLE.supercedes});this.cfg.addProperty(o.DRAG_ONLY.key,{value:o.DRAG_ONLY.value,validator:o.DRAG_ONLY.validator,supercedes:o.DRAG_ONLY.supercedes});this.cfg.addProperty(o.UNDERLAY.key,{handler:this.configUnderlay,value:o.UNDERLAY.value,supercedes:o.UNDERLAY.supercedes});this.cfg.addProperty(o.MODAL.key,{handler:this.configModal,value:o.MODAL.value,validator:o.MODAL.validator,supercedes:o.MODAL.supercedes});this.cfg.addProperty(o.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:o.KEY_LISTENERS.suppressEvent,supercedes:o.KEY_LISTENERS.supercedes});this.cfg.addProperty(o.STRINGS.key,{value:o.STRINGS.value,handler:this.configStrings,validator:o.STRINGS.validator,supercedes:o.STRINGS.supercedes})},configClose:function(y,w,z){var A=w[0],x=this.close,v=this.cfg.getProperty("strings");if(A){if(!x){if(!c){c=document.createElement("a");c.className="container-close";c.href="#"}x=c.cloneNode(true);this.innerElement.appendChild(x);x.innerHTML=(v&&v.close)?v.close:"&#160;";u.on(x,"click",this._doClose,this,true);this.close=x}else{x.style.display="block"}}else{if(x){x.style.display="none"}}},_doClose:function(v){u.preventDefault(v);this.hide()},configDraggable:function(w,v,x){var y=v[0];if(y){if(!f.DD){this.cfg.setProperty("draggable",false);return}if(this.header){a.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",b)}else{if(this.dd){this.dd.unreg()}if(this.header){a.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",b)}},configUnderlay:function(E,D,A){var C=(this.platform=="mac"&&m.gecko),F=D[0].toLowerCase(),w=this.underlay,x=this.element;function y(){var G=false;if(!w){if(!r){r=document.createElement("div");r.className="underlay"}w=r.cloneNode(false);this.element.appendChild(w);this.underlay=w;if(q){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(m.webkit&&m.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}G=true}}function B(){var G=y.call(this);if(!G&&q){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(B)}function z(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(B);this._underlayDeferred=false}if(w){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(w);this.underlay=null}}switch(F){case"shadow":a.removeClass(x,"matte");a.addClass(x,"shadow");break;case"matte":if(!C){z.call(this)}a.removeClass(x,"shadow");a.addClass(x,"matte");break;default:if(!C){z.call(this)}a.removeClass(x,"shadow");a.removeClass(x,"matte");break}if((F=="shadow")||(C&&!w)){if(this.cfg.getProperty("visible")){var v=y.call(this);if(!v&&q){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(B);this._underlayDeferred=true}}}},configModal:function(w,v,y){var x=v[0];if(x){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);h.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);h.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var w=this.mask,v;if(w){this.hideMask();v=w.parentNode;if(v){v.removeChild(w)}this.mask=null}},configKeyListeners:function(y,v,B){var x=v[0],A,z,w;if(x){if(x instanceof Array){z=x.length;for(w=0;w<z;w++){A=x[w];if(!j.alreadySubscribed(this.showEvent,A.enable,A)){this.showEvent.subscribe(A.enable,A,true)}if(!j.alreadySubscribed(this.hideEvent,A.disable,A)){this.hideEvent.subscribe(A.disable,A,true);this.destroyEvent.subscribe(A.disable,A,true)}}}else{if(!j.alreadySubscribed(this.showEvent,x.enable,x)){this.showEvent.subscribe(x.enable,x,true)}if(!j.alreadySubscribed(this.hideEvent,x.disable,x)){this.hideEvent.subscribe(x.disable,x,true);this.destroyEvent.subscribe(x.disable,x,true)}}}},configStrings:function(w,v,x){var y=e.merge(o.STRINGS.value,v[0]);this.cfg.setProperty(o.STRINGS.key,y,true)},configHeight:function(y,w,z){var v=w[0],x=this.innerElement;a.setStyle(x,"height",v);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(y,w,x){p.superclass._autoFillOnHeightChange.apply(this,arguments);if(q){var v=this;setTimeout(function(){v.sizeUnderlay()},0)}},configWidth:function(y,v,z){var x=v[0],w=this.innerElement;a.setStyle(w,"width",x);this.cfg.refireEvent("iframe")},configzIndex:function(w,v,y){p.superclass.configzIndex.call(this,w,v,y);if(this.mask||this.cfg.getProperty("modal")===true){var x=a.getStyle(this.element,"zIndex");if(!x||isNaN(x)){x=0}if(x===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var x=this.element.parentNode,v=this.element,w=document.createElement("div");w.className=p.CSS_PANEL_CONTAINER;w.id=v.id+"_c";if(x){x.insertBefore(w,v)}w.appendChild(v);this.element=w;this.innerElement=v;a.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var w=this.underlay,v;if(w){v=this.element;w.style.width=v.offsetWidth+"px";w.style.height=v.offsetHeight+"px"}},registerDragDrop:function(){var w=this;if(this.header){if(!f.DD){return}var v=(this.cfg.getProperty("dragonly")===true);this.dd=new f.DD(this.element.id,this.id,{dragOnly:v});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var y,A,x,D,C,B;if(YAHOO.env.ua.ie==6){a.addClass(w.element,"drag")}if(w.cfg.getProperty("constraintoviewport")){var z=h.VIEWPORT_OFFSET;y=w.element.offsetHeight;A=w.element.offsetWidth;x=a.getViewportWidth();D=a.getViewportHeight();C=a.getDocumentScrollLeft();B=a.getDocumentScrollTop();if(y+z<D){this.minY=B+z;this.maxY=B+D-y-z}else{this.minY=B+z;this.maxY=B+z}if(A+z<x){this.minX=C+z;this.maxX=C+x-A-z}else{this.minX=C+z;this.maxX=C+z}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}w.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){w.syncPosition();w.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}w.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){a.removeClass(w.element,"drag")}w.dragEvent.fire("endDrag",arguments);w.moveEvent.fire(w.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var v=this.mask;if(!v){if(!g){g=document.createElement("div");g.className="mask";g.innerHTML="&#160;"}v=g.cloneNode(true);v.id=this.id+"_mask";document.body.insertBefore(v,document.body.firstChild);this.mask=v;if(YAHOO.env.ua.gecko&&this.platform=="mac"){a.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";a.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){a.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var w=this.mask,x=a.getViewportWidth(),v=a.getViewportHeight();if(w.offsetHeight>v){w.style.height=v+"px"}if(w.offsetWidth>x){w.style.width=x+"px"}w.style.height=a.getDocumentHeight()+"px";w.style.width=a.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var v=a.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(v)&&!isNaN(v)){a.setStyle(this.mask,"zIndex",v-1)}}},render:function(v){return p.superclass.render.call(this,v,this.innerElement)},destroy:function(){h.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){u.purgeElement(this.close)}p.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var v=this.underlay;a.addClass(v,"yui-force-redraw");setTimeout(function(){a.removeClass(v,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(k,j){YAHOO.widget.Dialog.superclass.constructor.call(this,k,j)};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},c={POST_METHOD:{key:"postmethod",value:"async"},POST_DATA:{key:"postdata",value:null},BUTTONS:{key:"buttons",value:"none",supercedes:["visible"]},HIDEAFTERSUBMIT:{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy()}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false)}}}while(j--)}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(j){if(j!="form"&&j!="async"&&j!="none"&&j!="manual"){return false}else{return true}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes})},initEvents:function(){a.superclass.initEvents.call(this);var j=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=j;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=j;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=j;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=j;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=j;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=j},init:function(k,j){a.superclass.init.call(this,k);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(j){this.cfg.applyConfig(j,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a)},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break}}while(m--)}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(l){var j={method:null,action:null};if(l){if(l.getAttributeNode){var k=l.getAttributeNode("action");var m=l.getAttributeNode("method");if(k){j.action=k.value}if(m){j.method=m.value}}else{j.action=l.getAttribute("action");j.method=l.getAttribute("method")}}j.method=(f.isString(j.method)?j.method:"POST").toUpperCase();j.action=f.isString(j.action)?j.action:"";return j},registerForm:function(){var j=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==j&&e.isAncestor(this.element,this.form)){return}else{b.purgeElement(this.form);this.form=null}}if(!j){j=document.createElement("form");j.name="frm_"+this.id;this.body.appendChild(j)}if(j){this.form=j;b.on(j,"submit",this._submitHandler,this,true)}},_submitHandler:function(j){b.stopEvent(j);this.submit();this.form.blur()},setTabLoop:function(j,k){j=j||this.firstButton;k=this.lastButton||k;a.superclass.setTabLoop.call(this,j,k)},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break}}}},configClose:function(k,j,l){a.superclass.configClose.apply(this,arguments)},_doClose:function(j){b.preventDefault(j);this.cancel()},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this})}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)})}}this._aButtons[this._aButtons.length]=k}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true)}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this))}}p.appendChild(q);this._aButtons[this._aButtons.length]=q}u.htmlButton=q;if(m===0){this.firstButton=q}if(m==(r-1)){this.lastButton=q}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j)}this.buttonSpan=p}else{p=this.buttonSpan;j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(l,j,n){var k=this.firstFormElement;if(j&&j[1]){b.stopEvent(j[1])}if(k){try{k.focus()}catch(m){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(l,j,n){var o=this.cfg.getProperty("buttons"),k=this.lastFormElement;if(j&&j[1]){b.stopEvent(j[1])}if(o&&f.isArray(o)){this.focusLastButton()}else{if(k){try{k.focus()}catch(m){}}}},_getButton:function(k){var j=YAHOO.widget.Button;if(j&&k&&k.nodeName&&k.id){k=j.getButton(k.id)||k}return k},focusDefaultButton:function(){var j=this._getButton(this.defaultHtmlButton);if(j){try{j.focus()}catch(k){}}},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur()}catch(m){}}}}while(j--)}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),l,j;if(m&&f.isArray(m)){l=m[0];if(l){j=this._getButton(l.htmlButton);if(j){try{j.focus()}catch(k){}}}}},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),k,m,j;if(n&&f.isArray(n)){k=n.length;if(k>0){m=n[(k-1)];if(m){j=this._getButton(m.htmlButton);if(j){try{j.focus()}catch(l){}}}}}},configPostMethod:function(k,j,l){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var A=this.form,l,t,w,o,u,r,q,k,x,m,y,B,j,p,C,z,v;function s(D){var n=D.tagName.toUpperCase();return((n=="INPUT"||n=="TEXTAREA"||n=="SELECT")&&D.name==o)}if(A){l=A.elements;t=l.length;w={};for(z=0;z<t;z++){o=l[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;k=u.tagName.toUpperCase();switch(k){case"INPUT":if(q=="checkbox"){w[o]=u.checked}else{if(q!="radio"){w[o]=u.value}}break;case"TEXTAREA":w[o]=u.value;break;case"SELECT":x=u.options;m=x.length;y=[];for(v=0;v<m;v++){B=x[v];if(B.selected){j=B.value;if(!j||j===""){j=B.text}y[y.length]=j}}w[o]=y;break}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[o]=p.value;break}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value}}w[o]=y;break}}}}}return w},destroy:function(){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k)}this.form=null}}a.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d)};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={ICON:{key:"icon",value:"none",suppressEvent:true},TEXT:{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes})},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(b)},registerForm:function(){b.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'},configIcon:function(f,e,k){var l=e[0],d=this.body,j=b.ICON_CSS_CLASSNAME,h,g;if(l&&l!="none"){h=c.getElementsByClassName(j,"*",d);if(h){g=h.parentNode;if(g){g.removeChild(h);h=null}}if(l.indexOf(".")==-1){h=document.createElement("span");h.className=(j+" "+l);h.innerHTML="&#160;"}else{h=document.createElement("img");h.src=(this.imageRoot+l);h.className=j}if(h){d.insertBefore(h,d.firstChild)}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,j={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,j,e,d.element);h.handleUnderlayStart=function(){var l=this.overlay.underlay;if(l&&YAHOO.env.ua.ie){var k=(l.filters&&l.filters.length>0);if(k){b.addClass(d.element,"yui-effect-fade")}}};h.handleUnderlayComplete=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade")}};h.handleStartAnimateIn=function(l,k,m){b.addClass(m.overlay.element,"hide-select");if(!m.overlay.underlay){m.overlay.cfg.refireEvent("underlay")}m.handleUnderlayStart();m.overlay._setDomVisibility(true);b.setStyle(m.overlay.element,"opacity",0)};h.handleCompleteAnimateIn=function(l,k,m){b.removeClass(m.overlay.element,"hide-select");if(m.overlay.element.style.filter){m.overlay.element.style.filter=null}m.handleUnderlayComplete();m.overlay.cfg.refireEvent("iframe");m.animateInCompleteEvent.fire()};h.handleStartAnimateOut=function(l,k,m){b.addClass(m.overlay.element,"hide-select");m.handleUnderlayStart()};h.handleCompleteAnimateOut=function(l,k,m){b.removeClass(m.overlay.element,"hide-select");if(m.overlay.element.style.filter){m.overlay.element.style.filter=null}m.overlay._setDomVisibility(false);b.setStyle(m.overlay.element,"opacity",1);m.handleUnderlayComplete();m.overlay.cfg.refireEvent("iframe");m.animateOutCompleteEvent.fire()};h.init();return h};a.SLIDE=function(f,d){var j=YAHOO.util.Easing,m=f.cfg.getProperty("x")||b.getX(f.element),l=f.cfg.getProperty("y")||b.getY(f.element),n=b.getClientWidth(),h=f.element.offsetWidth,k={attributes:{points:{to:[m,l]}},duration:d,method:j.easeIn},e={attributes:{points:{to:[(n+25),l]}},duration:d,method:j.easeOut},g=new a(f,k,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(p,o,q){q.overlay.element.style.left=((-25)-h)+"px";q.overlay.element.style.top=l+"px"};g.handleTweenAnimateIn=function(r,q,s){var t=b.getXY(s.overlay.element),p=t[0],o=t[1];if(b.getStyle(s.overlay.element,"visibility")=="hidden"&&p<m){s.overlay._setDomVisibility(true)}s.overlay.cfg.setProperty("xy",[p,o],true);s.overlay.cfg.refireEvent("iframe")};g.handleCompleteAnimateIn=function(p,o,q){q.overlay.cfg.setProperty("xy",[m,l],true);q.startX=m;q.startY=l;q.overlay.cfg.refireEvent("iframe");q.animateInCompleteEvent.fire()};g.handleStartAnimateOut=function(p,o,s){var q=b.getViewportWidth(),t=b.getXY(s.overlay.element),r=t[1];s.animOut.attributes.points.to=[(q+25),r]};g.handleTweenAnimateOut=function(q,p,r){var t=b.getXY(r.overlay.element),o=t[0],s=t[1];r.overlay.cfg.setProperty("xy",[o,s],true);r.overlay.cfg.refireEvent("iframe")};g.handleCompleteAnimateOut=function(p,o,q){q.overlay._setDomVisibility(false);q.overlay.cfg.setProperty("xy",[m,l]);q.animateOutCompleteEvent.fire()};g.init();return g};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]"}return d}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});(function(){var t="DIV",p="hd",l="bd",o="ft",y="LI",a="disabled",d="mouseover",f="mouseout",v="mousedown",g="mouseup",s=YAHOO.env.ua.ie?"focusin":"focus",w="click",b="keydown",n="keyup",j="keypress",m="clicktohide",u="position",q="dynamic",z="showdelay",k="selected",e="visible",x="UL",r="MenuManager",c=YAHOO.util.Dom,A=YAHOO.util.Event,h=YAHOO.lang;YAHOO.widget.MenuManager=function(){var B=false,D={},S={},E={},O={click:"clickEvent",mousedown:"mouseDownEvent",mouseup:"mouseUpEvent",mouseover:"mouseOverEvent",mouseout:"mouseOutEvent",keydown:"keyDownEvent",keyup:"keyUpEvent",keypress:"keyPressEvent",focus:"focusEvent",focusin:"focusEvent",blur:"blurEvent",focusout:"blurEvent"},N=null,L=null;function P(V){var T,U;if(V&&V.tagName){switch(V.tagName.toUpperCase()){case t:T=V.parentNode;if((c.hasClass(V,p)||c.hasClass(V,l)||c.hasClass(V,o))&&T&&T.tagName&&T.tagName.toUpperCase()==t){U=T}else{U=V}break;case y:U=V;break;default:T=V.parentNode;if(T){U=P(T)}break}}return U}function R(X){var T=A.getTarget(X),U=P(T),Z,V,W,ab,aa;if(U){V=U.tagName.toUpperCase();if(V==y){W=U.id;if(W&&E[W]){ab=E[W];aa=ab.parent}}else{if(V==t){if(U.id){aa=D[U.id]}}}}if(aa){Z=O[X.type];if(ab&&!ab.cfg.getProperty(a)){ab[Z].fire(X)}aa[Z].fire(X,ab)}else{if(X.type==v){for(var Y in S){if(h.hasOwnProperty(S,Y)){aa=S[Y];if(aa.cfg.getProperty(m)&&!(aa instanceof YAHOO.widget.MenuBar)&&aa.cfg.getProperty(u)==q){aa.hide()}else{if(aa.cfg.getProperty(z)>0){aa._cancelShowDelay()}if(aa.activeItem){aa.activeItem.blur();aa.activeItem.cfg.setProperty(k,false);aa.activeItem=null}}}}}else{if(X.type==s){N=T}}}}function G(U,T,V){if(D[V.id]){this.removeMenu(V)}}function K(U,T){var V=T[1];if(V){L=V}}function J(U,T){L=null}function C(U,T,W){if(W&&W.focus){try{W.focus()}catch(V){}}this.hideEvent.unsubscribe(C,W)}function M(U,T){if(this===this.getRoot()&&this.cfg.getProperty(u)===q){this.hideEvent.subscribe(C,N);this.focus()}}function H(V,U){var T=U[0],W=this.id;if(T){S[W]=this}else{if(S[W]){delete S[W]}}}function I(U,T){Q(this)}function Q(U){var T=U.id;if(T&&E[T]){if(L==U){L=null}delete E[T];U.destroyEvent.unsubscribe(I)}}function F(U,T){var W=T[0],V;if(W instanceof YAHOO.widget.MenuItem){V=W.id;if(!E[V]){E[V]=W;W.destroyEvent.subscribe(I)}}}return{addMenu:function(U){var T;if(U instanceof YAHOO.widget.Menu&&U.id&&!D[U.id]){D[U.id]=U;if(!B){T=document;A.on(T,d,R,this,true);A.on(T,f,R,this,true);A.on(T,v,R,this,true);A.on(T,g,R,this,true);A.on(T,w,R,this,true);A.on(T,b,R,this,true);A.on(T,n,R,this,true);A.on(T,j,R,this,true);A.onFocus(T,R,this,true);A.onBlur(T,R,this,true);B=true}U.cfg.subscribeToConfigEvent(e,H);U.destroyEvent.subscribe(G,U,this);U.itemAddedEvent.subscribe(F);U.focusEvent.subscribe(K);U.blurEvent.subscribe(J);U.showEvent.subscribe(M)}},removeMenu:function(W){var U,T,V;if(W){U=W.id;if((U in D)&&(D[U]==W)){T=W.getItems();if(T&&T.length>0){V=T.length-1;do{Q(T[V])}while(V--)}delete D[U];if((U in S)&&(S[U]==W)){delete S[U]}if(W.cfg){W.cfg.unsubscribeFromConfigEvent(e,H)}W.destroyEvent.unsubscribe(G,W);W.itemAddedEvent.unsubscribe(F);W.focusEvent.unsubscribe(K);W.blurEvent.unsubscribe(J)}}},hideVisible:function(){var T;for(var U in S){if(h.hasOwnProperty(S,U)){T=S[U];if(!(T instanceof YAHOO.widget.MenuBar)&&T.cfg.getProperty(u)==q){T.hide()}}}},getVisible:function(){return S},getMenus:function(){return D},getMenu:function(U){var T;if(U in D){T=D[U]}return T},getMenuItem:function(U){var T;if(U in E){T=E[U]}return T},getMenuItemGroup:function(X){var U=c.get(X),T,Z,Y,V,W;if(U&&U.tagName&&U.tagName.toUpperCase()==x){Z=U.firstChild;if(Z){T=[];do{V=Z.id;if(V){Y=this.getMenuItem(V);if(Y){T[T.length]=Y}}}while((Z=Z.nextSibling));if(T.length>0){W=T}}}return W},getFocusedMenuItem:function(){return L},getFocusedMenu:function(){var T;if(L){T=L.parent.getRoot()}return T},toString:function(){return r}}}()})();(function(){var ao=YAHOO.lang,aQ="Menu",h="DIV",l="div",aM="id",aj="SELECT",G="xy",s="y",aX="UL",m="ul",al="first-of-type",M="LI",J="OPTGROUP",aZ="OPTION",aH="disabled",aA="none",aa="selected",aT="groupindex",K="index",p="submenu",aU="visible",az="hidedelay",aD="position",af="dynamic",c="static",aN=af+","+c,z="windows",r="url",n="#",w="target",aw="maxheight",u="topscrollbar",Z="bottomscrollbar",F="_",q=u+F+aH,e=Z+F+aH,D="mousemove",aV="showdelay",E="submenuhidedelay",ah="iframe",Y="constraintoviewport",a4="preventcontextoverlap",aq="submenualignment",B="autosubmenudisplay",ae="clicktohide",I="container",L="scrollincrement",aJ="minscrollheight",a2="classname",aG="shadow",aR="keepopen",a0="hd",d="hastitle",R="context",W="",aK="mousedown",aE="keydown",aO="height",v="width",at="px",aY="effect",ag="monitorresize",ay="display",ax="block",k="visibility",ab="absolute",av="zindex",N="yui-menu-body-scrolled",am="&#32;",a1=" ",aI="mouseover",g="mouseout",au="itemAdded",P="itemRemoved",an="hidden",U="yui-menu-shadow",ai=U+"-visible",O=U+a1+ai;YAHOO.widget.Menu=function(a6,a5){if(a5){this.parent=a5.parent;this.lazyLoad=a5.lazyLoad||a5.lazyload;this.itemData=a5.itemData||a5.itemdata}YAHOO.widget.Menu.superclass.constructor.call(this,a6,a5)};function b(a6){var a5=false;if(ao.isString(a6)){a5=(aN.indexOf((a6.toLowerCase()))!=-1)}return a5}var H=YAHOO.util.Dom,ac=YAHOO.util.Event,aW=YAHOO.widget.Module,ad=YAHOO.widget.Overlay,T=YAHOO.widget.Menu,a3=YAHOO.widget.MenuManager,f=YAHOO.util.CustomEvent,aS=YAHOO.env.ua,aP,aC=[["mouseOverEvent",aI],["mouseOutEvent",g],["mouseDownEvent",aK],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",aE],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",au],["itemRemovedEvent",P]],aB={key:aU,value:false,validator:ao.isBoolean},ar={key:Y,value:true,validator:ao.isBoolean,supercedes:[ah,"x",s,G]},ak={key:a4,value:true,validator:ao.isBoolean,supercedes:[Y]},t={key:aD,value:af,validator:b,supercedes:[aU,ah]},a={key:aq,value:["tl","tr"]},V={key:B,value:true,validator:ao.isBoolean,suppressEvent:true},A={key:aV,value:250,validator:ao.isNumber,suppressEvent:true},S={key:az,value:0,validator:ao.isNumber,suppressEvent:true},X={key:E,value:250,validator:ao.isNumber,suppressEvent:true},Q={key:ae,value:true,validator:ao.isBoolean,suppressEvent:true},ap={key:I,suppressEvent:true},aF={key:L,value:1,validator:ao.isNumber,supercedes:[aw],suppressEvent:true},o={key:aJ,value:90,validator:ao.isNumber,supercedes:[aw],suppressEvent:true},y={key:aw,value:0,validator:ao.isNumber,supercedes:[ah],suppressEvent:true},x={key:a2,value:null,validator:ao.isString,suppressEvent:true},C={key:aH,value:false,validator:ao.isBoolean,suppressEvent:true},j={key:aG,value:true,validator:ao.isBoolean,suppressEvent:true,supercedes:[aU]},aL={key:aR,value:false,validator:ao.isBoolean};YAHOO.lang.extend(T,ad,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_useHideDelay:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(a7,a6){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem}var a5;if(ao.isString(a7)){a5=H.get(a7)}else{if(a7.tagName){a5=a7}}if(a5&&a5.tagName){switch(a5.tagName.toUpperCase()){case h:this.srcElement=a5;if(!a5.id){a5.setAttribute(aM,H.generateId())}T.superclass.init.call(this,a5);this.beforeInitEvent.fire(T);break;case aj:this.srcElement=a5;T.superclass.init.call(this,H.generateId());this.beforeInitEvent.fire(T);break}}else{T.superclass.init.call(this,a7);this.beforeInitEvent.fire(T)}if(this.element){H.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if((aS.gecko&&aS.gecko<1.9)||aS.webkit){this.cfg.subscribeToConfigEvent(s,this._onYChange)}if(a6){this.cfg.applyConfig(a6,true)}a3.addMenu(this);this.initEvent.fire(T)}},_initSubTree:function(){var a6=this.srcElement,a5,a8,bb,bc,ba,a9,a7;if(a6){a5=(a6.tagName&&a6.tagName.toUpperCase());if(a5==h){bc=this.body.firstChild;if(bc){a8=0;bb=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(bc&&bc.tagName){switch(bc.tagName.toUpperCase()){case bb:this._aGroupTitleElements[a8]=bc;break;case aX:this._aListElements[a8]=bc;this._aItemGroups[a8]=[];a8++;break}}}while((bc=bc.nextSibling));if(this._aListElements[0]){H.addClass(this._aListElements[0],al)}}}bc=null;if(a5){switch(a5){case h:ba=this._aListElements;a9=ba.length;if(a9>0){a7=a9-1;do{bc=ba[a7].firstChild;if(bc){do{if(bc&&bc.tagName&&bc.tagName.toUpperCase()==M){this.addItem(new this.ITEM_TYPE(bc,{parent:this}),a7)}}while((bc=bc.nextSibling))}}while(a7--)}break;case aj:bc=a6.firstChild;do{if(bc&&bc.tagName){switch(bc.tagName.toUpperCase()){case J:case aZ:this.addItem(new this.ITEM_TYPE(bc,{parent:this}));break}}}while((bc=bc.nextSibling));break}}}},_getFirstEnabledItem:function(){var a5=this.getItems(),a9=a5.length,a8,a7;for(var a6=0;a6<a9;a6++){a8=a5[a6];if(a8&&!a8.cfg.getProperty(aH)&&a8.element.style.display!=aA){a7=a8;break}}return a7},_addItemToGroup:function(ba,bb,bf){var bd,bg,a8,be,a9,a6,a7,bc;function a5(bh,bi){return(bh[bi]||a5(bh,(bi+1)))}if(bb instanceof this.ITEM_TYPE){bd=bb;bd.parent=this}else{if(ao.isString(bb)){bd=new this.ITEM_TYPE(bb,{parent:this})}else{if(ao.isObject(bb)){bb.parent=this;bd=new this.ITEM_TYPE(bb.text,bb)}}}if(bd){if(bd.cfg.getProperty(aa)){this.activeItem=bd}bg=ao.isNumber(ba)?ba:0;a8=this._getItemGroup(bg);if(!a8){a8=this._createItemGroup(bg)}if(ao.isNumber(bf)){a9=(bf>=a8.length);if(a8[bf]){a8.splice(bf,0,bd)}else{a8[bf]=bd}be=a8[bf];if(be){if(a9&&(!be.element.parentNode||be.element.parentNode.nodeType==11)){this._aListElements[bg].appendChild(be.element)}else{a6=a5(a8,(bf+1));if(a6&&(!be.element.parentNode||be.element.parentNode.nodeType==11)){this._aListElements[bg].insertBefore(be.element,a6.element)}}be.parent=this;this._subscribeToItemEvents(be);this._configureSubmenu(be);this._updateItemProperties(bg);this.itemAddedEvent.fire(be);this.changeContentEvent.fire();bc=be}}else{a7=a8.length;a8[a7]=bd;be=a8[a7];if(be){if(!H.isAncestor(this._aListElements[bg],be.element)){this._aListElements[bg].appendChild(be.element)}be.element.setAttribute(aT,bg);be.element.setAttribute(K,a7);be.parent=this;be.index=a7;be.groupIndex=bg;this._subscribeToItemEvents(be);this._configureSubmenu(be);if(a7===0){H.addClass(be.element,al)}this.itemAddedEvent.fire(be);this.changeContentEvent.fire();bc=be}}}return bc},_removeItemFromGroupByIndex:function(a8,a6){var a7=ao.isNumber(a8)?a8:0,a9=this._getItemGroup(a7),bb,ba,a5;if(a9){bb=a9.splice(a6,1);ba=bb[0];if(ba){this._updateItemProperties(a7);if(a9.length===0){a5=this._aListElements[a7];if(this.body&&a5){this.body.removeChild(a5)}this._aItemGroups.splice(a7,1);this._aListElements.splice(a7,1);a5=this._aListElements[0];if(a5){H.addClass(a5,al)}}this.itemRemovedEvent.fire(ba);this.changeContentEvent.fire()}}return ba},_removeItemFromGroupByValue:function(a8,a5){var ba=this._getItemGroup(a8),bb,a9,a7,a6;if(ba){bb=ba.length;a9=-1;if(bb>0){a6=bb-1;do{if(ba[a6]==a5){a9=a6;break}}while(a6--);if(a9>-1){a7=this._removeItemFromGroupByIndex(a8,a9)}}}return a7},_updateItemProperties:function(a6){var a7=this._getItemGroup(a6),ba=a7.length,a9,a8,a5;if(ba>0){a5=ba-1;do{a9=a7[a5];if(a9){a8=a9.element;a9.index=a5;a9.groupIndex=a6;a8.setAttribute(aT,a6);a8.setAttribute(K,a5);H.removeClass(a8,al)}}while(a5--);if(a8){H.addClass(a8,al)}}},_createItemGroup:function(a7){var a5,a6;if(!this._aItemGroups[a7]){this._aItemGroups[a7]=[];a5=document.createElement(m);this._aListElements[a7]=a5;a6=this._aItemGroups[a7]}return a6},_getItemGroup:function(a7){var a5=ao.isNumber(a7)?a7:0,a8=this._aItemGroups,a6;if(a5 in a8){a6=a8[a5]}return a6},_configureSubmenu:function(a5){var a6=a5.cfg.getProperty(p);if(a6){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,a6,true);this.renderEvent.subscribe(this._onParentMenuRender,a6,true)}},_subscribeToItemEvents:function(a5){a5.destroyEvent.subscribe(this._onMenuItemDestroy,a5,this);a5.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,a5,this)},_onVisibleChange:function(a7,a6){var a5=a6[0];if(a5){H.addClass(this.element,aU)}else{H.removeClass(this.element,aU)}},_cancelHideDelay:function(){var a5=this.getRoot()._hideDelayTimer;if(a5){a5.cancel()}},_execHideDelay:function(){this._cancelHideDelay();var a5=this.getRoot();a5._hideDelayTimer=ao.later(a5.cfg.getProperty(az),this,function(){if(a5.activeItem){if(a5.hasFocus()){a5.activeItem.focus()}a5.clearActiveItem()}if(a5==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(aD)==af){this.hide()}})},_cancelShowDelay:function(){var a5=this.getRoot()._showDelayTimer;if(a5){a5.cancel()}},_execSubmenuHideDelay:function(a7,a6,a5){a7._submenuHideDelayTimer=ao.later(50,this,function(){if(this._nCurrentMouseX>(a6+10)){a7._submenuHideDelayTimer=ao.later(a5,a7,function(){this.hide()})}else{a7.hide()}})},_disableScrollHeader:function(){if(!this._bHeaderDisabled){H.addClass(this.header,q);this._bHeaderDisabled=true}},_disableScrollFooter:function(){if(!this._bFooterDisabled){H.addClass(this.footer,e);this._bFooterDisabled=true}},_enableScrollHeader:function(){if(this._bHeaderDisabled){H.removeClass(this.header,q);this._bHeaderDisabled=false}},_enableScrollFooter:function(){if(this._bFooterDisabled){H.removeClass(this.footer,e);this._bFooterDisabled=false}},_onMouseOver:function(bh,ba){var bi=ba[0],be=ba[1],a5=ac.getTarget(bi),a9=this.getRoot(),bg=this._submenuHideDelayTimer,a6,a8,bd,a7,bc,bb;var bf=function(){if(this.parent.cfg.getProperty(aa)){this.show()}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(a5==this.element||H.isAncestor(this.element,a5))){if(this._useHideDelay){this._cancelHideDelay()}this._nCurrentMouseX=0;ac.on(this.element,D,this._onMouseMove,this,true);if(!(be&&H.isAncestor(be.element,ac.getRelatedTarget(bi)))){this.clearActiveItem()}if(this.parent&&bg){bg.cancel();this.parent.cfg.setProperty(aa,true);a6=this.parent.parent;a6._bHandledMouseOutEvent=true;a6._bHandledMouseOverEvent=false}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false}if(be&&!be.handledMouseOverEvent&&!be.cfg.getProperty(aH)&&(a5==be.element||H.isAncestor(be.element,a5))){a8=this.cfg.getProperty(aV);bd=(a8>0);if(bd){this._cancelShowDelay()}a7=this.activeItem;if(a7){a7.cfg.setProperty(aa,false)}bc=be.cfg;bc.setProperty(aa,true);if(this.hasFocus()||a9._hasFocus){be.focus();a9._hasFocus=false}if(this.cfg.getProperty(B)){bb=bc.getProperty(p);if(bb){if(bd){a9._showDelayTimer=ao.later(a9.cfg.getProperty(aV),bb,bf)}else{bb.show()}}}be.handledMouseOverEvent=true;be.handledMouseOutEvent=false}}},_onMouseOut:function(bd,a7){var be=a7[0],bb=a7[1],a8=ac.getRelatedTarget(be),bc=false,ba,a9,a5,a6;if(!this._bStopMouseEventHandlers){if(bb&&!bb.cfg.getProperty(aH)){ba=bb.cfg;a9=ba.getProperty(p);if(a9&&(a8==a9.element||H.isAncestor(a9.element,a8))){bc=true}if(!bb.handledMouseOutEvent&&((a8!=bb.element&&!H.isAncestor(bb.element,a8))||bc)){if(!bc){bb.cfg.setProperty(aa,false);if(a9){a5=this.cfg.getProperty(E);a6=this.cfg.getProperty(aV);if(!(this instanceof YAHOO.widget.MenuBar)&&a5>0&&a6>=a5){this._execSubmenuHideDelay(a9,ac.getPageX(be),a5)}else{a9.hide()}}}bb.handledMouseOutEvent=true;bb.handledMouseOverEvent=false}}if(!this._bHandledMouseOutEvent&&((a8!=this.element&&!H.isAncestor(this.element,a8))||bc)){if(this._useHideDelay){this._execHideDelay()}ac.removeListener(this.element,D,this._onMouseMove);this._nCurrentMouseX=ac.getPageX(be);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false}}},_onMouseMove:function(a6,a5){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=ac.getPageX(a6)}},_onClick:function(bg,a7){var bh=a7[0],bb=a7[1],bd=false,a9,be,a6,a5,ba,bc,bf;var a8=function(){if(!((aS.gecko&&this.platform==z)&&bh.button>0)){a6=this.getRoot();if(a6 instanceof YAHOO.widget.MenuBar||a6.cfg.getProperty(aD)==c){a6.clearActiveItem()}else{a6.hide()}}};if(bb){if(bb.cfg.getProperty(aH)){ac.preventDefault(bh);a8.call(this)}else{a9=bb.cfg.getProperty(p);ba=bb.cfg.getProperty(r);if(ba){bc=ba.indexOf(n);bf=ba.length;if(bc!=-1){ba=ba.substr(bc,bf);bf=ba.length;if(bf>1){a5=ba.substr(1,bf);be=YAHOO.widget.MenuManager.getMenu(a5);if(be){bd=(this.getRoot()===be.getRoot())}}else{if(bf===1){bd=true}}}}if(bd&&!bb.cfg.getProperty(w)){ac.preventDefault(bh);if(aS.webkit){bb.focus()}else{bb.focusEvent.fire()}}if(!a9&&!this.cfg.getProperty(aR)){a8.call(this)}}}},_onKeyDown:function(bj,bd){var bg=bd[0],bf=bd[1],bc,bh,a6,ba,bk,a5,bm,a9,bi,a8,be,bl,bb;if(this._useHideDelay){this._cancelHideDelay()}function a7(){this._bStopMouseEventHandlers=true;ao.later(10,this,function(){this._bStopMouseEventHandlers=false})}if(bf&&!bf.cfg.getProperty(aH)){bh=bf.cfg;a6=this.parent;switch(bg.keyCode){case 38:case 40:bk=(bg.keyCode==38)?bf.getPreviousEnabledSibling():bf.getNextEnabledSibling();if(bk){this.clearActiveItem();bk.cfg.setProperty(aa,true);bk.focus();if(this.cfg.getProperty(aw)>0){a5=this.body;bm=a5.scrollTop;a9=a5.offsetHeight;bi=this.getItems();a8=bi.length-1;be=bk.element.offsetTop;if(bg.keyCode==40){if(be>=(a9+bm)){a5.scrollTop=be-a9}else{if(be<=bm){a5.scrollTop=0}}if(bk==bi[a8]){a5.scrollTop=bk.element.offsetTop}}else{if(be<=bm){a5.scrollTop=be-bk.element.offsetHeight}else{if(be>=(bm+a9)){a5.scrollTop=be}}if(bk==bi[0]){a5.scrollTop=0}}bm=a5.scrollTop;bl=a5.scrollHeight-a5.offsetHeight;if(bm===0){this._disableScrollHeader();this._enableScrollFooter()}else{if(bm==bl){this._enableScrollHeader();this._disableScrollFooter()}else{this._enableScrollHeader();this._enableScrollFooter()}}}}ac.preventDefault(bg);a7();break;case 39:bc=bh.getProperty(p);if(bc){if(!bh.getProperty(aa)){bh.setProperty(aa,true)}bc.show();bc.setInitialFocus();bc.setInitialSelection()}else{ba=this.getRoot();if(ba instanceof YAHOO.widget.MenuBar){bk=ba.activeItem.getNextEnabledSibling();if(bk){ba.clearActiveItem();bk.cfg.setProperty(aa,true);bc=bk.cfg.getProperty(p);if(bc){bc.show();bc.setInitialFocus()}else{bk.focus()}}}}ac.preventDefault(bg);a7();break;case 37:if(a6){bb=a6.parent;if(bb instanceof YAHOO.widget.MenuBar){bk=bb.activeItem.getPreviousEnabledSibling();if(bk){bb.clearActiveItem();bk.cfg.setProperty(aa,true);bc=bk.cfg.getProperty(p);if(bc){bc.show();bc.setInitialFocus()}else{bk.focus()}}}else{this.hide();a6.focus()}}ac.preventDefault(bg);a7();break}}if(bg.keyCode==27){if(this.cfg.getProperty(aD)==af){this.hide();if(this.parent){this.parent.focus()}}else{if(this.activeItem){bc=this.activeItem.cfg.getProperty(p);if(bc&&bc.cfg.getProperty(aU)){bc.hide();this.activeItem.focus()}else{this.activeItem.blur();this.activeItem.cfg.setProperty(aa,false)}}}ac.preventDefault(bg)}},_onKeyPress:function(a7,a6){var a5=a6[0];if(a5.keyCode==40||a5.keyCode==38){ac.preventDefault(a5)}},_onBlur:function(a6,a5){if(this._hasFocus){this._hasFocus=false}},_onYChange:function(a6,a5){var a8=this.parent,ba,a7,a9;if(a8){ba=a8.parent.body.scrollTop;if(ba>0){a9=(this.cfg.getProperty(s)-ba);H.setY(this.element,a9);a7=this.iframe;if(a7){H.setY(a7,a9)}this.cfg.setProperty(s,a9,true)}}},_onScrollTargetMouseOver:function(bb,be){var bd=this._bodyScrollTimer;if(bd){bd.cancel()}this._cancelHideDelay();var a7=ac.getTarget(bb),a9=this.body,a8=this.cfg.getProperty(L),a5,a6;function bc(){var bf=a9.scrollTop;if(bf<a5){a9.scrollTop=(bf+a8);this._enableScrollHeader()}else{a9.scrollTop=a5;this._bodyScrollTimer.cancel();this._disableScrollFooter()}}function ba(){var bf=a9.scrollTop;if(bf>0){a9.scrollTop=(bf-a8);this._enableScrollFooter()}else{a9.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader()}}if(H.hasClass(a7,a0)){a6=ba}else{a5=a9.scrollHeight-a9.offsetHeight;a6=bc}this._bodyScrollTimer=ao.later(10,this,a6,null,true)},_onScrollTargetMouseOut:function(a7,a5){var a6=this._bodyScrollTimer;if(a6){a6.cancel()}this._cancelHideDelay()},_onInit:function(a6,a5){this.cfg.subscribeToConfigEvent(aU,this._onVisibleChange);var a7=!this.parent,a8=this.lazyLoad;if(((a7&&!a8)||(a7&&(this.cfg.getProperty(aU)||this.cfg.getProperty(aD)==c))||(!a7&&!a8))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree()}if(this.itemData){this.addItems(this.itemData)}}else{if(a8){this.cfg.fireQueue()}}},_onBeforeRender:function(a8,a7){var a9=this.element,bc=this._aListElements.length,a6=true,bb=0,a5,ba;if(bc>0){do{a5=this._aListElements[bb];if(a5){if(a6){H.addClass(a5,al);a6=false}if(!H.isAncestor(a9,a5)){this.appendToBody(a5)}ba=this._aGroupTitleElements[bb];if(ba){if(!H.isAncestor(a9,ba)){a5.parentNode.insertBefore(ba,a5)}H.addClass(a5,d)}}bb++}while(bb<bc)}},_onRender:function(a6,a5){if(this.cfg.getProperty(aD)==af){if(!this.cfg.getProperty(aU)){this.positionOffScreen()}}},_onBeforeShow:function(a7,a6){var a9,bc,a8,ba=this.cfg.getProperty(I);if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree()}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()==aj){a9=this.itemData.length;for(bc=0;bc<a9;bc++){if(this.itemData[bc].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[bc])))}}}else{this.addItems(this.itemData)}}a8=this.srcElement;if(a8){if(a8.tagName.toUpperCase()==aj){if(H.inDocument(a8)){this.render(a8.parentNode)}else{this.render(ba)}}else{this.render()}}else{if(this.parent){this.render(this.parent.element)}else{this.render(ba)}}}var bb=this.parent,a5;if(!bb&&this.cfg.getProperty(aD)==af){this.cfg.refireEvent(G)}if(bb){a5=bb.parent.cfg.getProperty(aq);this.cfg.setProperty(R,[bb.element,a5[0],a5[1]]);this.align()}},getConstrainedY:function(bh){var bs=this,bo=bs.cfg.getProperty(R),bv=bs.cfg.getProperty(aw),br,bg={trbr:true,tlbl:true,bltl:true,brtr:true},ba=(bo&&bg[bo[1]+bo[2]]),bc=bs.element,bw=bc.offsetHeight,bq=ad.VIEWPORT_OFFSET,bl=H.getViewportHeight(),bp=H.getDocumentScrollTop(),bm=(bs.cfg.getProperty(aJ)+bq<bl),bu,bd,bj,bk,bf=false,be,a7,bi=bp+bq,a9=bp+bl-bw-bq,a5=bh;var bb=function(){var bx;if((bs.cfg.getProperty(s)-bp)>bj){bx=(bj-bw)}else{bx=(bj+bk)}bs.cfg.setProperty(s,(bx+bp),true);return bx};var a8=function(){if((bs.cfg.getProperty(s)-bp)>bj){return(a7-bq)}else{return(be-bq)}};var bn=function(){var bx;if((bs.cfg.getProperty(s)-bp)>bj){bx=(bj+bk)}else{bx=(bj-bc.offsetHeight)}bs.cfg.setProperty(s,(bx+bp),true)};var a6=function(){bs._setScrollHeight(this.cfg.getProperty(aw));bs.hideEvent.unsubscribe(a6)};var bt=function(){var bA=a8(),bx=(bs.getItems().length>0),bz,by;if(bw>bA){bz=bx?bs.cfg.getProperty(aJ):bw;if((bA>bz)&&bx){br=bA}else{br=bv}bs._setScrollHeight(br);bs.hideEvent.subscribe(a6);bn();if(bA<bz){if(bf){bb()}else{bb();bf=true;by=bt()}}}else{if(br&&(br!==bv)){bs._setScrollHeight(bv);bs.hideEvent.subscribe(a6);bn()}}return by};if(bh<bi||bh>a9){if(bm){if(bs.cfg.getProperty(a4)&&ba){bd=bo[0];bk=bd.offsetHeight;bj=(H.getY(bd)-bp);be=bj;a7=(bl-(bj+bk));bt();a5=bs.cfg.getProperty(s)}else{if(!(bs instanceof YAHOO.widget.MenuBar)&&bw>=bl){bu=(bl-(bq*2));if(bu>bs.cfg.getProperty(aJ)){bs._setScrollHeight(bu);bs.hideEvent.subscribe(a6);bn();a5=bs.cfg.getProperty(s)}}else{if(bh<bi){a5=bi}else{if(bh>a9){a5=a9}}}}}else{a5=bq+bp}}return a5},_onHide:function(a6,a5){if(this.cfg.getProperty(aD)===af){this.positionOffScreen()}},_onShow:function(bd,bb){var a5=this.parent,a7,a8,ba,a6;function a9(bf){var be;if(bf.type==aK||(bf.type==aE&&bf.keyCode==27)){be=ac.getTarget(bf);if(be!=a7.element||!H.isAncestor(a7.element,be)){a7.cfg.setProperty(B,false);ac.removeListener(document,aK,a9);ac.removeListener(document,aE,a9)}}}function bc(bf,be,bg){this.cfg.setProperty(v,W);this.hideEvent.unsubscribe(bc,bg)}if(a5){a7=a5.parent;if(!a7.cfg.getProperty(B)&&(a7 instanceof YAHOO.widget.MenuBar||a7.cfg.getProperty(aD)==c)){a7.cfg.setProperty(B,true);ac.on(document,aK,a9);ac.on(document,aE,a9)}if((this.cfg.getProperty("x")<a7.cfg.getProperty("x"))&&(aS.gecko&&aS.gecko<1.9)&&!this.cfg.getProperty(v)){a8=this.element;ba=a8.offsetWidth;a8.style.width=ba+at;a6=(ba-(a8.offsetWidth-ba))+at;this.cfg.setProperty(v,a6);this.hideEvent.subscribe(bc,a6)}}},_onBeforeHide:function(a7,a6){var a5=this.activeItem,a9=this.getRoot(),ba,a8;if(a5){ba=a5.cfg;ba.setProperty(aa,false);a8=ba.getProperty(p);if(a8){a8.hide()}}if(aS.ie&&this.cfg.getProperty(aD)===af&&this.parent){a9._hasFocus=this.hasFocus()}if(a9==this){a9.blur()}},_onParentMenuConfigChange:function(a6,a5,a9){var a7=a5[0][0],a8=a5[0][1];switch(a7){case ah:case Y:case az:case aV:case E:case ae:case aY:case a2:case L:case aw:case aJ:case ag:case aG:case a4:a9.cfg.setProperty(a7,a8);break;case aq:if(!(this.parent.parent instanceof YAHOO.widget.MenuBar)){a9.cfg.setProperty(a7,a8)}break}},_onParentMenuRender:function(a6,a5,bb){var a8=bb.parent.parent,a7=a8.cfg,a9={constraintoviewport:a7.getProperty(Y),xy:[0,0],clicktohide:a7.getProperty(ae),effect:a7.getProperty(aY),showdelay:a7.getProperty(aV),hidedelay:a7.getProperty(az),submenuhidedelay:a7.getProperty(E),classname:a7.getProperty(a2),scrollincrement:a7.getProperty(L),maxheight:a7.getProperty(aw),minscrollheight:a7.getProperty(aJ),iframe:a7.getProperty(ah),shadow:a7.getProperty(aG),preventcontextoverlap:a7.getProperty(a4),monitorresize:a7.getProperty(ag)},ba;if(!(a8 instanceof YAHOO.widget.MenuBar)){a9[aq]=a7.getProperty(aq)}bb.cfg.applyConfig(a9);if(!this.lazyLoad){ba=this.parent.element;if(this.element.parentNode==ba){this.render()}else{this.render(ba)}}},_onMenuItemDestroy:function(a7,a6,a5){this._removeItemFromGroupByValue(a5.groupIndex,a5)},_onMenuItemConfigChange:function(a7,a6,a5){var a9=a6[0][0],ba=a6[0][1],a8;switch(a9){case aa:if(ba===true){this.activeItem=a5}break;case p:a8=a6[0][1];if(a8){this._configureSubmenu(a5)}break}},configVisible:function(a7,a6,a8){var a5,a9;if(this.cfg.getProperty(aD)==af){T.superclass.configVisible.call(this,a7,a6,a8)}else{a5=a6[0];a9=H.getStyle(this.element,ay);H.setStyle(this.element,k,aU);if(a5){if(a9!=ax){this.beforeShowEvent.fire();H.setStyle(this.element,ay,ax);this.showEvent.fire()}}else{if(a9==ax){this.beforeHideEvent.fire();H.setStyle(this.element,ay,aA);this.hideEvent.fire()}}}},configPosition:function(a7,a6,ba){var a9=this.element,a8=a6[0]==c?c:ab,bb=this.cfg,a5;H.setStyle(a9,aD,a8);if(a8==c){H.setStyle(a9,ay,ax);bb.setProperty(aU,true)}else{H.setStyle(a9,k,an)}if(a8==ab){a5=bb.getProperty(av);if(!a5||a5===0){bb.setProperty(av,1)}}},configIframe:function(a6,a5,a7){if(this.cfg.getProperty(aD)==af){T.superclass.configIframe.call(this,a6,a5,a7)}},configHideDelay:function(a6,a5,a7){var a8=a5[0];this._useHideDelay=(a8>0)},configContainer:function(a6,a5,a8){var a7=a5[0];if(ao.isString(a7)){this.cfg.setProperty(I,H.get(a7),true)}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(v,this._clearSetWidthFlag)},_setScrollHeight:function(bg){var bc=bg,bb=false,bh=false,a8,a9,bf,a6,be,bi,a5,bd,ba,a7;if(this.getItems().length>0){a8=this.element;a9=this.body;bf=this.header;a6=this.footer;be=this._onScrollTargetMouseOver;bi=this._onScrollTargetMouseOut;a5=this.cfg.getProperty(aJ);if(bc>0&&bc<a5){bc=a5}H.setStyle(a9,aO,W);H.removeClass(a9,N);a9.scrollTop=0;bh=((aS.gecko&&aS.gecko<1.9)||aS.ie);if(bc>0&&bh&&!this.cfg.getProperty(v)){ba=a8.offsetWidth;a8.style.width=ba+at;a7=(ba-(a8.offsetWidth-ba))+at;this.cfg.unsubscribeFromConfigEvent(v,this._clearSetWidthFlag);this.cfg.setProperty(v,a7);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(v,this._clearSetWidthFlag)}if(bc>0&&(!bf&&!a6)){this.setHeader(am);this.setFooter(am);bf=this.header;a6=this.footer;H.addClass(bf,u);H.addClass(a6,Z);a8.insertBefore(bf,a9);a8.appendChild(a6)}bd=bc;if(bf&&a6){bd=(bd-(bf.offsetHeight+a6.offsetHeight))}if((bd>0)&&(a9.offsetHeight>bc)){H.addClass(a9,N);H.setStyle(a9,aO,(bd+at));if(!this._hasScrollEventHandlers){ac.on(bf,aI,be,this,true);ac.on(bf,g,bi,this,true);ac.on(a6,aI,be,this,true);ac.on(a6,g,bi,this,true);this._hasScrollEventHandlers=true}this._disableScrollHeader();this._enableScrollFooter();bb=true}else{if(bf&&a6){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(v,this._clearSetWidthFlag);this.cfg.setProperty(v,W)}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){ac.removeListener(bf,aI,be);ac.removeListener(bf,g,bi);ac.removeListener(a6,aI,be);ac.removeListener(a6,g,bi);this._hasScrollEventHandlers=false}a8.removeChild(bf);a8.removeChild(a6);this.header=null;this.footer=null;bb=true}}if(bb){this.cfg.refireEvent(ah);this.cfg.refireEvent(aG)}}},_setMaxHeight:function(a6,a5,a7){this._setScrollHeight(a7);this.renderEvent.unsubscribe(this._setMaxHeight)},configMaxHeight:function(a6,a5,a7){var a8=a5[0];if(this.lazyLoad&&!this.body&&a8>0){this.renderEvent.subscribe(this._setMaxHeight,a8,this)}else{this._setScrollHeight(a8)}},configClassName:function(a7,a6,a8){var a5=a6[0];if(this._sClassName){H.removeClass(this.element,this._sClassName)}H.addClass(this.element,a5);this._sClassName=a5},_onItemAdded:function(a6,a5){var a7=a5[0];if(a7){a7.cfg.setProperty(aH,true)}},configDisabled:function(a7,a6,ba){var a9=a6[0],a5=this.getItems(),bb,a8;if(ao.isArray(a5)){bb=a5.length;if(bb>0){a8=bb-1;do{a5[a8].cfg.setProperty(aH,a9)}while(a8--)}if(a9){this.clearActiveItem(true);H.addClass(this.element,aH);this.itemAddedEvent.subscribe(this._onItemAdded)}else{H.removeClass(this.element,aH);this.itemAddedEvent.unsubscribe(this._onItemAdded)}}},configShadow:function(bd,a7,bc){var bb=function(){var bg=this.element,bf=this._shadow;if(bf&&bg){if(bf.style.width&&bf.style.height){bf.style.width=W;bf.style.height=W}bf.style.width=(bg.offsetWidth+6)+at;bf.style.height=(bg.offsetHeight+1)+at}};var be=function(){this.element.appendChild(this._shadow)};var a9=function(){H.addClass(this._shadow,ai)};var ba=function(){H.removeClass(this._shadow,ai)};var a6=function(){var bg=this._shadow,bf;if(!bg){bf=this.element;if(!aP){aP=document.createElement(l);aP.className=O}bg=aP.cloneNode(false);bf.appendChild(bg);this._shadow=bg;this.beforeShowEvent.subscribe(a9);this.beforeHideEvent.subscribe(ba);if(aS.ie){ao.later(0,this,function(){bb.call(this);this.syncIframe()});this.cfg.subscribeToConfigEvent(v,bb);this.cfg.subscribeToConfigEvent(aO,bb);this.cfg.subscribeToConfigEvent(aw,bb);this.changeContentEvent.subscribe(bb);aW.textResizeEvent.subscribe(bb,this,true);this.destroyEvent.subscribe(function(){aW.textResizeEvent.unsubscribe(bb,this)})}this.cfg.subscribeToConfigEvent(aw,be)}};var a8=function(){if(this._shadow){be.call(this);if(aS.ie){bb.call(this)}}else{a6.call(this)}this.beforeShowEvent.unsubscribe(a8)};var a5=a7[0];if(a5&&this.cfg.getProperty(aD)==af){if(this.cfg.getProperty(aU)){if(this._shadow){be.call(this);if(aS.ie){bb.call(this)}}else{a6.call(this)}}else{this.beforeShowEvent.subscribe(a8)}}},initEvents:function(){T.superclass.initEvents.call(this);var a6=aC.length-1,a7,a5;do{a7=aC[a6];a5=this.createEvent(a7[1]);a5.signature=f.LIST;this[a7[0]]=a5}while(a6--)},positionOffScreen:function(){var a6=this.iframe,a7=this.element,a5=this.OFF_SCREEN_POSITION;a7.style.top=W;a7.style.left=W;if(a6){a6.style.top=a5;a6.style.left=a5}},getRoot:function(){var a7=this.parent,a6,a5;if(a7){a6=a7.parent;a5=a6?a6.getRoot():this}else{a5=this}return a5},toString:function(){var a6=aQ,a5=this.id;if(a5){a6+=(a1+a5)}return a6},setItemGroupTitle:function(ba,a9){var a8,a7,a6,a5;if(ao.isString(ba)&&ba.length>0){a8=ao.isNumber(a9)?a9:0;a7=this._aGroupTitleElements[a8];if(a7){a7.innerHTML=ba}else{a7=document.createElement(this.GROUP_TITLE_TAG_NAME);a7.innerHTML=ba;this._aGroupTitleElements[a8]=a7}a6=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[a6]){H.removeClass(this._aGroupTitleElements[a6],al);a5=a6}}while(a6--);if(a5!==null){H.addClass(this._aGroupTitleElements[a5],al)}this.changeContentEvent.fire()}},addItem:function(a5,a6){return this._addItemToGroup(a6,a5)},addItems:function(a9,a8){var bb,a5,ba,a6,a7;if(ao.isArray(a9)){bb=a9.length;a5=[];for(a6=0;a6<bb;a6++){ba=a9[a6];if(ba){if(ao.isArray(ba)){a5[a5.length]=this.addItems(ba,a6)}else{a5[a5.length]=this._addItemToGroup(a8,ba)}}}if(a5.length){a7=a5}}return a7},insertItem:function(a5,a6,a7){return this._addItemToGroup(a7,a5,a6)},removeItem:function(a5,a7){var a8,a6;if(!ao.isUndefined(a5)){if(a5 instanceof YAHOO.widget.MenuItem){a8=this._removeItemFromGroupByValue(a7,a5)}else{if(ao.isNumber(a5)){a8=this._removeItemFromGroupByIndex(a7,a5)}}if(a8){a8.destroy();a6=a8}}return a6},getItems:function(){var a8=this._aItemGroups,a6,a7,a5=[];if(ao.isArray(a8)){a6=a8.length;a7=((a6==1)?a8[0]:(Array.prototype.concat.apply(a5,a8)))}return a7},getItemGroups:function(){return this._aItemGroups},getItem:function(a6,a7){var a8,a5;if(ao.isNumber(a6)){a8=this._getItemGroup(a7);if(a8){a5=a8[a6]}}return a5},getSubmenus:function(){var a6=this.getItems(),ba=a6.length,a5,a7,a9,a8;if(ba>0){a5=[];for(a8=0;a8<ba;a8++){a9=a6[a8];if(a9){a7=a9.cfg.getProperty(p);if(a7){a5[a5.length]=a7}}}}return a5},clearContent:function(){var a9=this.getItems(),a6=a9.length,a7=this.element,a8=this.body,bd=this.header,a5=this.footer,bc,bb,ba;if(a6>0){ba=a6-1;do{bc=a9[ba];if(bc){bb=bc.cfg.getProperty(p);if(bb){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,bb);this.renderEvent.unsubscribe(this._onParentMenuRender,bb)}this.removeItem(bc,bc.groupIndex)}}while(ba--)}if(bd){ac.purgeElement(bd);a7.removeChild(bd)}if(a5){ac.purgeElement(a5);a7.removeChild(a5)}if(a8){ac.purgeElement(a8);a8.innerHTML=W}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(v,null)},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;T.superclass.destroy.call(this)},setInitialFocus:function(){var a5=this._getFirstEnabledItem();if(a5){a5.focus()}},setInitialSelection:function(){var a5=this._getFirstEnabledItem();if(a5){a5.cfg.setProperty(aa,true)}},clearActiveItem:function(a7){if(this.cfg.getProperty(aV)>0){this._cancelShowDelay()}var a5=this.activeItem,a8,a6;if(a5){a8=a5.cfg;if(a7){a5.blur();this.getRoot()._hasFocus=true}a8.setProperty(aa,false);a6=a8.getProperty(p);if(a6){a6.hide()}this.activeItem=null}},focus:function(){if(!this.hasFocus()){this.setInitialFocus()}},blur:function(){var a5;if(this.hasFocus()){a5=a3.getFocusedMenuItem();if(a5){a5.blur()}}},hasFocus:function(){return(a3.getFocusedMenu()==this.getRoot())},subscribe:function(){function a8(bd,bc,bf){var bg=bc[0],be=bg.cfg.getProperty(p);if(be){be.subscribe.apply(be,bf)}}function bb(bd,bc,bf){var be=this.cfg.getProperty(p);if(be){be.subscribe.apply(be,bf)}}T.superclass.subscribe.apply(this,arguments);T.superclass.subscribe.call(this,au,a8,arguments);var a5=this.getItems(),ba,a9,a6,a7;if(a5){ba=a5.length;if(ba>0){a7=ba-1;do{a9=a5[a7];a6=a9.cfg.getProperty(p);if(a6){a6.subscribe.apply(a6,arguments)}else{a9.cfg.subscribeToConfigEvent(p,bb,arguments)}}while(a7--)}}},initDefaultConfig:function(){T.superclass.initDefaultConfig.call(this);var a5=this.cfg;a5.addProperty(aB.key,{handler:this.configVisible,value:aB.value,validator:aB.validator});a5.addProperty(ar.key,{handler:this.configConstrainToViewport,value:ar.value,validator:ar.validator,supercedes:ar.supercedes});a5.addProperty(ak.key,{value:ak.value,validator:ak.validator,supercedes:ak.supercedes});a5.addProperty(t.key,{handler:this.configPosition,value:t.value,validator:t.validator,supercedes:t.supercedes});a5.addProperty(a.key,{value:a.value,suppressEvent:a.suppressEvent});a5.addProperty(V.key,{value:V.value,validator:V.validator,suppressEvent:V.suppressEvent});a5.addProperty(A.key,{value:A.value,validator:A.validator,suppressEvent:A.suppressEvent});a5.addProperty(S.key,{handler:this.configHideDelay,value:S.value,validator:S.validator,suppressEvent:S.suppressEvent});a5.addProperty(X.key,{value:X.value,validator:X.validator,suppressEvent:X.suppressEvent});a5.addProperty(Q.key,{value:Q.value,validator:Q.validator,suppressEvent:Q.suppressEvent});a5.addProperty(ap.key,{handler:this.configContainer,value:document.body,suppressEvent:ap.suppressEvent});a5.addProperty(aF.key,{value:aF.value,validator:aF.validator,supercedes:aF.supercedes,suppressEvent:aF.suppressEvent});a5.addProperty(o.key,{value:o.value,validator:o.validator,supercedes:o.supercedes,suppressEvent:o.suppressEvent});a5.addProperty(y.key,{handler:this.configMaxHeight,value:y.value,validator:y.validator,suppressEvent:y.suppressEvent,supercedes:y.supercedes});a5.addProperty(x.key,{handler:this.configClassName,value:x.value,validator:x.validator,supercedes:x.supercedes});a5.addProperty(C.key,{handler:this.configDisabled,value:C.value,validator:C.validator,suppressEvent:C.suppressEvent});a5.addProperty(j.key,{handler:this.configShadow,value:j.value,validator:j.validator});a5.addProperty(aL.key,{value:aL.value,validator:aL.validator})}})})();(function(){YAHOO.widget.MenuItem=function(au,at){if(au){if(at){this.parent=at.parent;this.value=at.value;this.id=at.id}this.init(au,at)}};var Y=YAHOO.util.Dom,K=YAHOO.widget.Module,ac=YAHOO.widget.Menu,D=YAHOO.widget.MenuItem,al=YAHOO.util.CustomEvent,L=YAHOO.env.ua,ar=YAHOO.lang,am="text",p="#",r="-",m="helptext",O="url",ai="target",a="emphasis",o="strongemphasis",C="checked",X="submenu",h="disabled",b="selected",q="hassubmenu",v="checked-disabled",aj="hassubmenu-disabled",ae="hassubmenu-selected",u="checked-selected",R="onclick",k="classname",ak="",J="OPTION",W="OPTGROUP",l="LI",af="href",S="SELECT",y="DIV",ao='<em class="helptext">',B="<em>",j="</em>",x="<strong>",Z="</strong>",z="preventcontextoverlap",I="obj",ah="scope",U="none",w="visible",e=" ",N="MenuItem",ab="click",d="show",n="hide",t="li",ag='<a href="#"></a>',Q=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",ab],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],P={key:am,value:ak,validator:ar.isString,suppressEvent:true},T={key:m,supercedes:[am],suppressEvent:true},g={key:O,value:p,suppressEvent:true},ap={key:ai,suppressEvent:true},aq={key:a,value:false,validator:ar.isBoolean,suppressEvent:true,supercedes:[am]},E={key:o,value:false,validator:ar.isBoolean,suppressEvent:true,supercedes:[am]},M={key:C,value:false,validator:ar.isBoolean,suppressEvent:true,supercedes:[h,b]},f={key:X,suppressEvent:true,supercedes:[h,b]},an={key:h,value:false,validator:ar.isBoolean,suppressEvent:true,supercedes:[am,b]},G={key:b,value:false,validator:ar.isBoolean,suppressEvent:true},V={key:R,suppressEvent:true},ad={key:k,value:null,validator:ar.isString,suppressEvent:true},aa={key:"keylistener",value:null,suppressEvent:true},c=null,F={};var A=function(aw,av){var at=F[aw];if(!at){F[aw]={};at=F[aw]}var au=at[av];if(!au){au=aw+r+av;at[av]=au}return au};var H=function(at){Y.addClass(this.element,A(this.CSS_CLASS_NAME,at));Y.addClass(this._oAnchor,A(this.CSS_LABEL_CLASS_NAME,at))};var s=function(at){Y.removeClass(this.element,A(this.CSS_CLASS_NAME,at));Y.removeClass(this._oAnchor,A(this.CSS_LABEL_CLASS_NAME,at))};D.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:D,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:K.prototype.browser,id:null,init:function(at,aD){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=ac}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var az=this.cfg,aA=p,av,aC,aB,au,ax,aw,ay;if(ar.isString(at)){this._createRootNodeStructure();az.queueProperty(am,at)}else{if(at&&at.tagName){switch(at.tagName.toUpperCase()){case J:this._createRootNodeStructure();az.queueProperty(am,at.text);az.queueProperty(h,at.disabled);this.value=at.value;this.srcElement=at;break;case W:this._createRootNodeStructure();az.queueProperty(am,at.label);az.queueProperty(h,at.disabled);this.srcElement=at;this._initSubTree();break;case l:aB=Y.getFirstChild(at);if(aB){aA=aB.getAttribute(af,2);au=aB.getAttribute(ai);ax=aB.innerHTML}this.srcElement=at;this.element=at;this._oAnchor=aB;az.setProperty(am,ax,true);az.setProperty(O,aA,true);az.setProperty(ai,au,true);this._initSubTree();break}}}if(this.element){aw=(this.srcElement||this.element).id;if(!aw){aw=this.id||Y.generateId();this.element.id=aw}this.id=aw;Y.addClass(this.element,this.CSS_CLASS_NAME);Y.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);ay=Q.length-1;do{aC=Q[ay];av=this.createEvent(aC[1]);av.signature=al.LIST;this[aC[0]]=av}while(ay--);if(aD){az.applyConfig(aD)}az.fireQueue()}},_createRootNodeStructure:function(){var at,au;if(!c){c=document.createElement(t);c.innerHTML=ag}at=c.cloneNode(true);at.className=this.CSS_CLASS_NAME;au=at.firstChild;au.className=this.CSS_LABEL_CLASS_NAME;this.element=at;this._oAnchor=au},_initSubTree:function(){var az=this.srcElement,av=this.cfg,ax,aw,au,at,ay;if(az.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==S){av.setProperty(X,{id:Y.generateId(),itemdata:az.childNodes})}else{ax=az.firstChild;aw=[];do{if(ax&&ax.tagName){switch(ax.tagName.toUpperCase()){case y:av.setProperty(X,ax);break;case J:aw[aw.length]=ax;break}}}while((ax=ax.nextSibling));au=aw.length;if(au>0){at=new this.SUBMENU_TYPE(Y.generateId());av.setProperty(X,at);for(ay=0;ay<au;ay++){at.addItem((new at.ITEM_TYPE(aw[ay])))}}}}},configText:function(aC,av,ax){var au=av[0],aw=this.cfg,aA=this._oAnchor,at=aw.getProperty(m),aB=ak,ay=ak,az=ak;if(au){if(at){aB=ao+at+j}if(aw.getProperty(a)){ay=B;az=j}if(aw.getProperty(o)){ay=x;az=Z}aA.innerHTML=(ay+au+az+aB)}},configHelpText:function(av,au,at){this.cfg.refireEvent(am)},configURL:function(av,au,at){var ax=au[0];if(!ax){ax=p}var aw=this._oAnchor;if(L.opera){aw.removeAttribute(af)}aw.setAttribute(af,ax)},configTarget:function(aw,av,au){var at=av[0],ax=this._oAnchor;if(at&&at.length>0){ax.setAttribute(ai,at)}else{ax.removeAttribute(ai)}},configEmphasis:function(av,au,at){var ax=au[0],aw=this.cfg;if(ax&&aw.getProperty(o)){aw.setProperty(o,false)}aw.refireEvent(am)},configStrongEmphasis:function(aw,av,au){var at=av[0],ax=this.cfg;if(at&&ax.getProperty(a)){ax.setProperty(a,false)}ax.refireEvent(am)},configChecked:function(av,au,at){var ax=au[0],aw=this.cfg;if(ax){H.call(this,C)}else{s.call(this,C)}aw.refireEvent(am);if(aw.getProperty(h)){aw.refireEvent(h)}if(aw.getProperty(b)){aw.refireEvent(b)}},configDisabled:function(av,au,at){var ax=au[0],ay=this.cfg,aw=ay.getProperty(X),az=ay.getProperty(C);if(ax){if(ay.getProperty(b)){ay.setProperty(b,false)}H.call(this,h);if(aw){H.call(this,aj)}if(az){H.call(this,v)}}else{s.call(this,h);if(aw){s.call(this,aj)}if(az){s.call(this,v)}}},configSelected:function(av,au,at){var az=this.cfg,ay=this._oAnchor,ax=au[0],aA=az.getProperty(C),aw=az.getProperty(X);if(L.opera){ay.blur()}if(ax&&!az.getProperty(h)){H.call(this,b);if(aw){H.call(this,ae)}if(aA){H.call(this,u)}}else{s.call(this,b);if(aw){s.call(this,ae)}if(aA){s.call(this,u)}}if(this.hasFocus()&&L.opera){ay.focus()}},_onSubmenuBeforeHide:function(aw,av){var ax=this.parent,at;function au(){ax._oAnchor.blur();at.beforeHideEvent.unsubscribe(au)}if(ax.hasFocus()){at=ax.parent;at.beforeHideEvent.subscribe(au)}},configSubmenu:function(aA,av,ay){var ax=av[0],aw=this.cfg,au=this.parent&&this.parent.lazyLoad,az,aB,at;if(ax){if(ax instanceof ac){az=ax;az.parent=this;az.lazyLoad=au}else{if(ar.isObject(ax)&&ax.id&&!ax.nodeType){aB=ax.id;at=ax;at.lazyload=au;at.parent=this;az=new this.SUBMENU_TYPE(aB,at);aw.setProperty(X,az,true)}else{az=new this.SUBMENU_TYPE(ax,{lazyload:au,parent:this});aw.setProperty(X,az,true)}}if(az){az.cfg.setProperty(z,true);H.call(this,q);if(aw.getProperty(O)===p){aw.setProperty(O,(p+az.id))}this._oSubmenu=az;if(L.opera){az.beforeHideEvent.subscribe(this._onSubmenuBeforeHide)}}}else{s.call(this,q);if(this._oSubmenu){this._oSubmenu.destroy()}}if(aw.getProperty(h)){aw.refireEvent(h)}if(aw.getProperty(b)){aw.refireEvent(b)}},configOnClick:function(av,au,at){var aw=au[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=aw)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null}if(!this._oOnclickAttributeValue&&ar.isObject(aw)&&ar.isFunction(aw.fn)){this.clickEvent.subscribe(aw.fn,((I in aw)?aw.obj:this),((ah in aw)?aw.scope:null));this._oOnclickAttributeValue=aw}},configClassName:function(aw,av,au){var at=av[0];if(this._sClassName){Y.removeClass(this.element,this._sClassName)}Y.addClass(this.element,at);this._sClassName=at},_dispatchClickEvent:function(){var av=this,au,at;if(!av.cfg.getProperty(h)){au=Y.getFirstChild(av.element);if(L.ie){au.fireEvent(R)}else{if((L.gecko&&L.gecko>=1.9)||L.opera||L.webkit){at=document.createEvent("HTMLEvents");at.initEvent(ab,true,true)}else{at=document.createEvent("MouseEvents");at.initMouseEvent(ab,true,true,window,0,0,0,0,0,false,false,false,false,0,null)}au.dispatchEvent(at)}}},_createKeyListener:function(aw,av,ay){var ax=this,au=ax.parent;var at=new YAHOO.util.KeyListener(au.element.ownerDocument,ay,{fn:ax._dispatchClickEvent,scope:ax,correctScope:true});if(au.cfg.getProperty(w)){at.enable()}au.subscribe(d,at.enable,null,at);au.subscribe(n,at.disable,null,at);ax._keyListener=at;au.unsubscribe(d,ax._createKeyListener,ay)},configKeyListener:function(av,au){var ax=au[0],aw=this,at=aw.parent;if(aw._keyData){at.unsubscribe(d,aw._createKeyListener,aw._keyData);aw._keyData=null}if(aw._keyListener){at.unsubscribe(d,aw._keyListener.enable);at.unsubscribe(n,aw._keyListener.disable);aw._keyListener.disable();aw._keyListener=null}if(ax){aw._keyData=ax;at.subscribe(d,aw._createKeyListener,ax,aw)}},initDefaultConfig:function(){var at=this.cfg;at.addProperty(P.key,{handler:this.configText,value:P.value,validator:P.validator,suppressEvent:P.suppressEvent});at.addProperty(T.key,{handler:this.configHelpText,supercedes:T.supercedes,suppressEvent:T.suppressEvent});at.addProperty(g.key,{handler:this.configURL,value:g.value,suppressEvent:g.suppressEvent});at.addProperty(ap.key,{handler:this.configTarget,suppressEvent:ap.suppressEvent});at.addProperty(aq.key,{handler:this.configEmphasis,value:aq.value,validator:aq.validator,suppressEvent:aq.suppressEvent,supercedes:aq.supercedes});at.addProperty(E.key,{handler:this.configStrongEmphasis,value:E.value,validator:E.validator,suppressEvent:E.suppressEvent,supercedes:E.supercedes});at.addProperty(M.key,{handler:this.configChecked,value:M.value,validator:M.validator,suppressEvent:M.suppressEvent,supercedes:M.supercedes});at.addProperty(an.key,{handler:this.configDisabled,value:an.value,validator:an.validator,suppressEvent:an.suppressEvent});at.addProperty(G.key,{handler:this.configSelected,value:G.value,validator:G.validator,suppressEvent:G.suppressEvent});at.addProperty(f.key,{handler:this.configSubmenu,supercedes:f.supercedes,suppressEvent:f.suppressEvent});at.addProperty(V.key,{handler:this.configOnClick,suppressEvent:V.suppressEvent});at.addProperty(ad.key,{handler:this.configClassName,value:ad.value,validator:ad.validator,suppressEvent:ad.suppressEvent});at.addProperty(aa.key,{handler:this.configKeyListener,value:aa.value,suppressEvent:aa.suppressEvent})},getNextEnabledSibling:function(){var aw,az,at,ay,ax,au;function av(aA,aB){return aA[aB]||av(aA,(aB+1))}if(this.parent instanceof ac){aw=this.groupIndex;az=this.parent.getItemGroups();if(this.index<(az[aw].length-1)){at=av(az[aw],(this.index+1))}else{if(aw<(az.length-1)){ay=aw+1}else{ay=0}ax=av(az,ay);at=av(ax,0)}au=(at.cfg.getProperty(h)||at.element.style.display==U)?at.getNextEnabledSibling():at}return au},getPreviousEnabledSibling:function(){var ay,aA,au,at,ax,aw;function az(aB,aC){return aB[aC]||az(aB,(aC-1))}function av(aB,aC){return aB[aC]?aC:av(aB,(aC+1))}if(this.parent instanceof ac){ay=this.groupIndex;aA=this.parent.getItemGroups();if(this.index>av(aA[ay],0)){au=az(aA[ay],(this.index-1))}else{if(ay>av(aA,0)){at=ay-1}else{at=aA.length-1}ax=az(aA,at);au=az(ax,(ax.length-1))}aw=(au.cfg.getProperty(h)||au.element.style.display==U)?au.getPreviousEnabledSibling():au}return aw},focus:function(){var aw=this.parent,av=this._oAnchor,at=aw.activeItem;function au(){try{if(!(L.ie&&!document.hasFocus())){if(at){at.blurEvent.fire()}av.focus();this.focusEvent.fire()}}catch(ax){}}if(!this.cfg.getProperty(h)&&aw&&aw.cfg.getProperty(w)&&this.element.style.display!=U){ar.later(0,this,au)}},blur:function(){var at=this.parent;if(!this.cfg.getProperty(h)&&at&&at.cfg.getProperty(w)){ar.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire()}catch(au){}},0)}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this)},destroy:function(){var av=this.element,au,at,ax,aw;if(av){au=this.cfg.getProperty(X);if(au){au.destroy()}at=av.parentNode;if(at){at.removeChild(av);this.destroyEvent.fire()}aw=Q.length-1;do{ax=Q[aw];this[ax[0]].unsubscribeAll()}while(aw--);this.cfg.configChangedEvent.unsubscribeAll()}},toString:function(){var au=N,at=this.id;if(at){au+=(e+at)}return au}};ar.augmentProto(D,YAHOO.util.EventProvider)})();(function(){var b="xy",c="mousedown",f="ContextMenu",k=" ";YAHOO.widget.ContextMenu=function(m,l){YAHOO.widget.ContextMenu.superclass.constructor.call(this,m,l)};var j=YAHOO.util.Event,e=YAHOO.env.ua,g=YAHOO.widget.ContextMenu,a={TRIGGER_CONTEXT_MENU:"triggerContextMenu",CONTEXT_MENU:(e.opera?c:"contextmenu"),CLICK:"click"},h={key:"trigger",suppressEvent:true};function d(m,l,n){this.cfg.setProperty(b,n);this.beforeShowEvent.unsubscribe(d,n)}YAHOO.lang.extend(g,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(m,l){g.superclass.init.call(this,m);this.beforeInitEvent.fire(g);if(l){this.cfg.applyConfig(l,true)}this.initEvent.fire(g)},initEvents:function(){g.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(a.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST},cancel:function(){this._bCancelled=true},_removeEventHandlers:function(){var l=this._oTrigger;if(l){j.removeListener(l,a.CONTEXT_MENU,this._onTriggerContextMenu);if(e.opera){j.removeListener(l,a.CLICK,this._onTriggerClick)}}},_onTriggerClick:function(m,l){if(m.ctrlKey){j.stopEvent(m)}},_onTriggerContextMenu:function(n,l){var m;if(!(n.type==c&&!n.ctrlKey)){this.contextEventTarget=j.getTarget(n);this.triggerContextMenuEvent.fire(n);if(!this._bCancelled){j.stopEvent(n);YAHOO.widget.MenuManager.hideVisible();m=j.getXY(n);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(d,m)}else{this.cfg.setProperty(b,m)}this.show()}this._bCancelled=false}},toString:function(){var m=f,l=this.id;if(l){m+=(k+l)}return m},initDefaultConfig:function(){g.superclass.initDefaultConfig.call(this);this.cfg.addProperty(h.key,{handler:this.configTrigger,suppressEvent:h.suppressEvent})},destroy:function(){this._removeEventHandlers();g.superclass.destroy.call(this)},configTrigger:function(m,l,o){var n=l[0];if(n){if(this._oTrigger){this._removeEventHandlers()}this._oTrigger=n;j.on(n,a.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(e.opera){j.on(n,a.CLICK,this._onTriggerClick,this,true)}}else{this._removeEventHandlers()}}})}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var d=YAHOO.lang,o="static",n="dynamic,"+o,a="disabled",f="selected",b="autosubmenudisplay",g="submenu",c="visible",r=" ",h="submenutoggleregion",q="MenuBar";YAHOO.widget.MenuBar=function(u,t){YAHOO.widget.MenuBar.superclass.constructor.call(this,u,t)};function p(u){var t=false;if(d.isString(u)){t=(n.indexOf((u.toLowerCase()))!=-1)}return t}var s=YAHOO.util.Event,m=YAHOO.widget.MenuBar,l={key:"position",value:o,validator:p,supercedes:[c]},e={key:"submenualignment",value:["tl","bl"]},k={key:b,value:false,validator:d.isBoolean,suppressEvent:true},j={key:h,value:false,validator:d.isBoolean};d.extend(m,YAHOO.widget.Menu,{init:function(u,t){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem}m.superclass.init.call(this,u);this.beforeInitEvent.fire(m);if(t){this.cfg.applyConfig(t,true)}this.initEvent.fire(m)},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(v,u,z){var t=u[0],A=u[1],x,y,w;if(A&&!A.cfg.getProperty(a)){y=A.cfg;switch(t.keyCode){case 37:case 39:if(A==this.activeItem&&!y.getProperty(f)){y.setProperty(f,true)}else{w=(t.keyCode==37)?A.getPreviousEnabledSibling():A.getNextEnabledSibling();if(w){this.clearActiveItem();w.cfg.setProperty(f,true);x=w.cfg.getProperty(g);if(x){x.show();x.setInitialFocus()}else{w.focus()}}}s.preventDefault(t);break;case 40:if(this.activeItem!=A){this.clearActiveItem();y.setProperty(f,true);A.focus()}x=y.getProperty(g);if(x){if(x.cfg.getProperty(c)){x.setInitialSelection();x.setInitialFocus()}else{x.show();x.setInitialFocus()}}s.preventDefault(t);break}}if(t.keyCode==27&&this.activeItem){x=this.activeItem.cfg.getProperty(g);if(x&&x.cfg.getProperty(c)){x.hide();this.activeItem.focus()}else{this.activeItem.cfg.setProperty(f,false);this.activeItem.blur()}s.preventDefault(t)}},_onClick:function(F,z,C){m.superclass._onClick.call(this,F,z,C);var E=z[1],u=true,t,G,v,x,A,B,D,w;var y=function(){if(B.cfg.getProperty(c)){B.hide()}else{B.show()}};if(E&&!E.cfg.getProperty(a)){G=z[0];v=s.getTarget(G);x=this.activeItem;A=this.cfg;if(x&&x!=E){this.clearActiveItem()}E.cfg.setProperty(f,true);B=E.cfg.getProperty(g);if(B){t=E.element;D=YAHOO.util.Dom.getX(t);w=D+(t.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(A.getProperty(h)){if(s.getPageX(G)>w){y();s.preventDefault(G);u=false}}else{y()}}}return u},configSubmenuToggle:function(v,u){var t=u[0];if(t){this.cfg.setProperty(b,false)}},toString:function(){var u=q,t=this.id;if(t){u+=(r+t)}return u},initDefaultConfig:function(){m.superclass.initDefaultConfig.call(this);var t=this.cfg;t.addProperty(l.key,{handler:this.configPosition,value:l.value,validator:l.validator,supercedes:l.supercedes});t.addProperty(e.key,{value:e.value,suppressEvent:e.suppressEvent});t.addProperty(k.key,{value:k.value,validator:k.validator,suppressEvent:k.suppressEvent});t.addProperty(j.key,{value:j.value,validator:j.validator,handler:this.configSubmenuToggle})}})}());YAHOO.widget.MenuBarItem=function(b,a){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(b,a){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu}YAHOO.widget.MenuBarItem.superclass.init.call(this,b);var c=this.cfg;if(a){c.applyConfig(a,true)}c.fireQueue()},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var a="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){a+=(": "+this.cfg.getProperty("text"))}return a}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});(function(){var g=YAHOO.util.Dom,n=YAHOO.util.Event,j=YAHOO.lang,m=YAHOO.env.ua,b=YAHOO.widget.Overlay,k=YAHOO.widget.Menu,d={},l=null,e=null,c=null;function f(p,o,s,q){var t,r;if(j.isString(p)&&j.isString(o)){if(m.ie){r='<input type="'+p+'" name="'+o+'"';if(q){r+=" checked"}r+=">";t=document.createElement(r)}else{t=document.createElement("input");t.name=o;t.type=p;if(q){t.checked=true}}t.value=s}return t}function h(p,v){var o=p.nodeName.toUpperCase(),t=this,u,q,r;function w(x){if(!(x in v)){u=p.getAttributeNode(x);if(u&&("value" in u)){v[x]=u.value}}}function s(){w("type");if(v.type=="button"){v.type="push"}if(!("disabled" in v)){v.disabled=p.disabled}w("name");w("value");w("title")}switch(o){case"A":v.type="link";w("href");w("target");break;case"INPUT":s();if(!("checked" in v)){v.checked=p.checked}break;case"BUTTON":s();q=p.parentNode.parentNode;if(g.hasClass(q,this.CSS_CLASS_NAME+"-checked")){v.checked=true}if(g.hasClass(q,this.CSS_CLASS_NAME+"-disabled")){v.disabled=true}p.removeAttribute("value");p.setAttribute("type","button");break}p.removeAttribute("id");p.removeAttribute("name");if(!("tabindex" in v)){v.tabindex=p.tabIndex}if(!("label" in v)){r=o=="INPUT"?p.value:p.innerHTML;if(r&&r.length>0){v.label=r}}}function a(q){var p=q.attributes,o=p.srcelement,s=o.nodeName.toUpperCase(),r=this;if(s==this.NODE_NAME){q.element=o;q.id=o.id;g.getElementsBy(function(t){switch(t.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":h.call(r,t,p);break}},"*",o)}else{switch(s){case"BUTTON":case"A":case"INPUT":h.call(this,o,p);break}}}YAHOO.widget.Button=function(s,p){if(!b&&YAHOO.widget.Overlay){b=YAHOO.widget.Overlay}if(!k&&YAHOO.widget.Menu){k=YAHOO.widget.Menu}var r=YAHOO.widget.Button.superclass.constructor,q,o;if(arguments.length==1&&!j.isString(s)&&!s.nodeName){if(!s.id){s.id=g.generateId()}r.call(this,(this.createButtonElement(s.type)),s)}else{q={element:null,attributes:(p||{})};if(j.isString(s)){o=g.get(s);if(o){if(!q.attributes.id){q.attributes.id=s}q.attributes.srcelement=o;a.call(this,q);if(!q.element){q.element=this.createButtonElement(q.attributes.type)}r.call(this,q.element,q.attributes)}}else{if(s.nodeName){if(!q.attributes.id){if(s.id){q.attributes.id=s.id}else{q.attributes.id=g.generateId()}}q.attributes.srcelement=s;a.call(this,q);if(!q.element){q.element=this.createButtonElement(q.attributes.type)}r.call(this,q.element,q.attributes)}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press down arrow key to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(o){if(o=="split"){this.on("option",this._onOption)}},_setLabel:function(p){this._button.innerHTML=p;var q,o=m.gecko;if(o&&o<1.9&&g.inDocument(this.get("element"))){q=this.CSS_CLASS_NAME;this.removeClass(q);j.later(0,this,this.addClass,q)}},_setTabIndex:function(o){this._button.tabIndex=o},_setTitle:function(p){var o=p;if(this.get("type")!="link"){if(!o){switch(this.get("type")){case"radio":o=this.RADIO_DEFAULT_TITLE;break;case"checkbox":o=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":o=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":o=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":o=this.SUBMIT_TITLE;break}}this._button.title=o}},_setDisabled:function(o){if(this.get("type")!="link"){if(o){if(this._menu){this._menu.hide()}if(this.hasFocus()){this.blur()}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus")}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled")}}},_setHref:function(o){if(this.get("type")=="link"){this._button.href=o}},_setTarget:function(o){if(this.get("type")=="link"){this._button.setAttribute("target",o)}},_setChecked:function(p){var q=this.get("type"),o;if(q=="checkbox"||q=="radio"){if(p){this.addStateCSSClasses("checked");o=(q=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{this.removeStateCSSClasses("checked");o=(q=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}if(!this._hasDefaultTitle){this.set("title",o)}}},_setMenu:function(v){var q=this.get("lazyloadmenu"),s=this.get("element"),o,x=false,y,p,r;function w(){y.render(s.parentNode);this.removeListener("appendTo",w)}function u(){y.cfg.queueProperty("container",s.parentNode);this.removeListener("appendTo",u)}function t(){var z;if(y){g.addClass(y.element,this.get("menuclassname"));g.addClass(y.element,"yui-"+this.get("type")+"-button-menu");y.showEvent.subscribe(this._onMenuShow,null,this);y.hideEvent.subscribe(this._onMenuHide,null,this);y.renderEvent.subscribe(this._onMenuRender,null,this);if(k&&y instanceof k){if(q){z=this.get("container");if(z){y.cfg.queueProperty("container",z)}else{this.on("appendTo",u)}}y.cfg.queueProperty("clicktohide",false);y.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);y.subscribe("click",this._onMenuClick,this,true);this.on("selectedMenuItemChange",this._onSelectedMenuItemChange);r=y.srcElement;if(r&&r.nodeName.toUpperCase()=="SELECT"){r.style.display="none";r.parentNode.removeChild(r)}}else{if(b&&y instanceof b){if(!l){l=new YAHOO.widget.OverlayManager()}l.register(y)}}this._menu=y;if(!x&&!q){if(g.inDocument(s)){y.render(s.parentNode)}else{this.on("appendTo",w)}}}}if(b){if(k){o=k.prototype.CSS_CLASS_NAME}if(v&&k&&(v instanceof k)){y=v;x=true;t.call(this)}else{if(b&&v&&(v instanceof b)){y=v;x=true;y.cfg.queueProperty("visible",false);t.call(this)}else{if(k&&j.isArray(v)){y=new k(g.generateId(),{lazyload:q,itemdata:v});this._menu=y;this.on("appendTo",t)}else{if(j.isString(v)){p=g.get(v);if(p){if(k&&g.hasClass(p,o)||p.nodeName.toUpperCase()=="SELECT"){y=new k(v,{lazyload:q});t.call(this)}else{if(b){y=new b(v,{visible:false});t.call(this)}}}}else{if(v&&v.nodeName){if(k&&g.hasClass(v,o)||v.nodeName.toUpperCase()=="SELECT"){y=new k(v,{lazyload:q});t.call(this)}else{if(b){if(!v.id){g.generateId(v)}y=new b(v,{visible:false});t.call(this)}}}}}}}}},_setOnClick:function(o){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=o)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null}if(!this._onclickAttributeValue&&j.isObject(o)&&j.isFunction(o.fn)){this.on("click",o.fn,o.obj,o.scope);this._onclickAttributeValue=o}},_isActivationKey:function(o){var t=this.get("type"),p=(t=="checkbox"||t=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,r=p.length,s=false,q;if(r>0){q=r-1;do{if(o==p[q]){s=true;break}}while(q--)}return s},_isSplitButtonOptionKey:function(q){var p=(n.getCharCode(q)==40);var o=function(r){n.preventDefault(r);this.removeListener("keypress",o)};if(p){if(m.opera){this.on("keypress",o)}n.preventDefault(q)}return p},_addListenersToForm:function(){var u=this.getForm(),t=YAHOO.widget.Button.onFormKeyPress,s,o,r,q,p;if(u){n.on(u,"reset",this._onFormReset,null,this);n.on(u,"submit",this._onFormSubmit,null,this);o=this.get("srcelement");if(this.get("type")=="submit"||(o&&o.type=="submit")){r=n.getListeners(u,"keypress");s=false;if(r){q=r.length;if(q>0){p=q-1;do{if(r[p].fn==t){s=true;break}}while(p--)}}if(!s){n.on(u,"keypress",t)}}}},_showMenu:function(s){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible()}if(l){l.hideAll()}var o=this._menu,r=this.get("menualignment"),q=this.get("focusmenu"),p;if(this._renderedMenu){o.cfg.setProperty("context",[this.get("element"),r[0],r[1]]);o.cfg.setProperty("preventcontextoverlap",true);o.cfg.setProperty("constraintoviewport",true)}else{o.cfg.queueProperty("context",[this.get("element"),r[0],r[1]]);o.cfg.queueProperty("preventcontextoverlap",true);o.cfg.queueProperty("constraintoviewport",true)}this.focus();if(k&&o&&(o instanceof k)){p=o.focus;o.focus=function(){};if(this._renderedMenu){o.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));o.cfg.setProperty("maxheight",this.get("menumaxheight"))}else{o.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));o.cfg.queueProperty("maxheight",this.get("menumaxheight"))}o.show();o.focus=p;o.align();if(s.type=="mousedown"){n.stopPropagation(s)}if(q){o.focus()}}else{if(b&&o&&(o instanceof b)){if(!this._renderedMenu){o.render(this.get("element").parentNode)}o.show();o.align()}}},_hideMenu:function(){var o=this._menu;if(o){o.hide()}},_onMouseOver:function(p){var r=this.get("type"),o,q;if(r==="split"){o=this.get("element");q=(g.getX(o)+(o.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=q}if(!this._hasMouseEventHandlers){if(r==="split"){this.on("mousemove",this._onMouseMove)}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true}this.addStateCSSClasses("hover");if(r==="split"&&(n.getPageX(p)>q)){this.addStateCSSClasses("hoveroption")}if(this._activationButtonPressed){this.addStateCSSClasses("active")}if(this._bOptionPressed){this.addStateCSSClasses("activeoption")}if(this._activationButtonPressed||this._bOptionPressed){n.removeListener(document,"mouseup",this._onDocumentMouseUp)}},_onMouseMove:function(o){var p=this._nOptionRegionX;if(p){if(n.getPageX(o)>p){this.addStateCSSClasses("hoveroption")}else{this.removeStateCSSClasses("hoveroption")}}},_onMouseOut:function(o){var p=this.get("type");this.removeStateCSSClasses("hover");if(p!="menu"){this.removeStateCSSClasses("active")}if(this._activationButtonPressed||this._bOptionPressed){n.on(document,"mouseup",this._onDocumentMouseUp,null,this)}if(p==="split"&&(n.getPageX(o)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption")}},_onDocumentMouseUp:function(q){this._activationButtonPressed=false;this._bOptionPressed=false;var r=this.get("type"),o,p;if(r=="menu"||r=="split"){o=n.getTarget(q);p=this._menu.element;if(o!=p&&!g.isAncestor(p,o)){this.removeStateCSSClasses((r=="menu"?"active":"activeoption"));this._hideMenu()}}n.removeListener(document,"mouseup",this._onDocumentMouseUp)},_onMouseDown:function(q){var r,p=true;function o(){this._hideMenu();this.removeListener("mouseup",o)}if((q.which||q.button)==1){if(!this.hasFocus()){this.focus()}r=this.get("type");if(r=="split"){if(n.getPageX(q)>this._nOptionRegionX){this.fireEvent("option",q);p=false}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}else{if(r=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false}else{this._showMenu(q);this._activationButtonPressed=true}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}if(r=="split"||r=="menu"){this._hideMenuTimer=j.later(250,this,this.on,["mouseup",o])}}return p},_onMouseUp:function(q){var r=this.get("type"),o=this._hideMenuTimer,p=true;if(o){o.cancel()}if(r=="checkbox"||r=="radio"){this.set("checked",!(this.get("checked")))}this._activationButtonPressed=false;if(r!="menu"){this.removeStateCSSClasses("active")}if(r=="split"&&n.getPageX(q)>this._nOptionRegionX){p=false}return p},_onFocus:function(p){var o;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active")}c=this;if(!this._hasKeyEventHandlers){o=this._button;n.on(o,"blur",this._onBlur,null,this);n.on(o,"keydown",this._onKeyDown,null,this);n.on(o,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true}this.fireEvent("focus",p)},_onBlur:function(o){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}if(this._activationKeyPressed){n.on(document,"keyup",this._onDocumentKeyUp,null,this)}c=null;this.fireEvent("blur",o)},_onDocumentKeyUp:function(o){if(this._isActivationKey(n.getCharCode(o))){this._activationKeyPressed=false;n.removeListener(document,"keyup",this._onDocumentKeyUp)}},_onKeyDown:function(p){var o=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(p)){this.fireEvent("option",p)}else{if(this._isActivationKey(n.getCharCode(p))){if(this.get("type")=="menu"){this._showMenu(p)}else{this._activationKeyPressed=true;this.addStateCSSClasses("active")}}}if(o&&o.cfg.getProperty("visible")&&n.getCharCode(p)==27){o.hide();this.focus()}},_onKeyUp:function(o){var p;if(this._isActivationKey(n.getCharCode(o))){p=this.get("type");if(p=="checkbox"||p=="radio"){this.set("checked",!(this.get("checked")))}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}}},_onClick:function(r){var t=this.get("type"),o,s,p,q;switch(t){case"radio":case"checkbox":if(!this._hasDefaultTitle){if(this.get("checked")){o=(t=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{o=(t=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}this.set("title",o)}break;case"submit":if(r.returnValue!==false){this.submitForm()}break;case"reset":s=this.getForm();if(s){s.reset()}break;case"menu":o=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",o);break;case"split":if(this._nOptionRegionX>0&&(n.getPageX(r)>this._nOptionRegionX)){q=false}else{this._hideMenu();p=this.get("srcelement");if(p&&p.type=="submit"&&r.returnValue!==false){this.submitForm()}}o=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",o);break}return q},_onDblClick:function(p){var o=true;if(this.get("type")=="split"&&n.getPageX(p)>this._nOptionRegionX){o=false}return o},_onAppendTo:function(o){j.later(0,this,this._addListenersToForm)},_onFormReset:function(p){var q=this.get("type"),o=this._menu;if(q=="checkbox"||q=="radio"){this.resetValue("checked")}if(k&&o&&(o instanceof k)){this.resetValue("selectedMenuItem")}},_onFormSubmit:function(o){this.createHiddenFields()},_onDocumentMouseDown:function(r){var o=n.getTarget(r),q=this.get("element"),p=this._menu.element;if(o!=q&&!g.isAncestor(q,o)&&o!=p&&!g.isAncestor(p,o)){this._hideMenu();n.removeListener(document,"mousedown",this._onDocumentMouseDown)}},_onOption:function(o){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false}else{this._showMenu(o);this._bOptionPressed=true}},_onMenuShow:function(p){n.on(document,"mousedown",this._onDocumentMouseDown,null,this);var o,q;if(this.get("type")=="split"){o=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;q="activeoption"}else{o=this.MENUBUTTON_MENU_VISIBLE_TITLE;q="active"}this.addStateCSSClasses(q);this.set("title",o)},_onMenuHide:function(q){var p=this._menu,o,r;if(this.get("type")=="split"){o=this.SPLITBUTTON_DEFAULT_TITLE;r="activeoption"}else{o=this.MENUBUTTON_DEFAULT_TITLE;r="active"}this.removeStateCSSClasses(r);this.set("title",o);if(this.get("type")=="split"){this._bOptionPressed=false}},_onMenuKeyDown:function(q,p){var o=p[0];if(n.getCharCode(o)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false}}},_onMenuRender:function(q){var t=this.get("element"),p=t.parentNode,o=this._menu,s=o.element,r=o.srcElement;if(p!=s.parentNode){p.appendChild(s)}this._renderedMenu=true;if(r&&r.nodeName.toLowerCase()==="select"&&r.value){this.set("selectedMenuItem",o.getItem(r.selectedIndex))}},_onMenuClick:function(p,o){var r=o[1],q;if(r){this.set("selectedMenuItem",r);q=this.get("srcelement");if(q&&q.type=="submit"){this.submitForm()}this._hideMenu()}},_onSelectedMenuItemChange:function(o){var p=o.prevValue,q=o.newValue;if(p){g.removeClass(p.element,"yui-button-selectedmenuitem")}if(q){g.addClass(q.element,"yui-button-selectedmenuitem")}},createButtonElement:function(o){var q=this.NODE_NAME,p=document.createElement(q);p.innerHTML="<"+q+' class="first-child">'+(o=="link"?"<a></a>":'<button type="button"></button>')+"</"+q+">";return p},addStateCSSClasses:function(o){var p=this.get("type");if(j.isString(o)){if(o!="activeoption"&&o!="hoveroption"){this.addClass(this.CSS_CLASS_NAME+("-"+o))}this.addClass("yui-"+p+("-button-"+o))}},removeStateCSSClasses:function(o){var p=this.get("type");if(j.isString(o)){this.removeClass(this.CSS_CLASS_NAME+("-"+o));this.removeClass("yui-"+p+("-button-"+o))}},createHiddenFields:function(){this.removeHiddenFields();var w=this.getForm(),A,p,t,y,z,u,v,o,s,x,q,r=false;if(w&&!this.get("disabled")){p=this.get("type");t=(p=="checkbox"||p=="radio");if((t&&this.get("checked"))||(e==this)){A=f((t?p:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(A){if(t){A.style.display="none"}w.appendChild(A)}}y=this._menu;if(k&&y&&(y instanceof k)){z=this.get("selectedMenuItem");q=y.srcElement;r=(q&&q.nodeName.toUpperCase()=="SELECT");if(z){v=(z.value===null||z.value==="")?z.cfg.getProperty("text"):z.value;u=this.get("name");if(r){x=q.name}else{if(u){x=(u+"_options")}}if(v&&x){o=f("hidden",x,v);w.appendChild(o)}}else{if(r){w.appendChild(q)}}}if(A&&o){this._hiddenFields=[A,o]}else{if(!A&&o){this._hiddenFields=o}else{if(A&&!o){this._hiddenFields=A}}}s=this._hiddenFields}return s},removeHiddenFields:function(){var r=this._hiddenFields,p,q;function o(s){if(g.inDocument(s)){s.parentNode.removeChild(s)}}if(r){if(j.isArray(r)){p=r.length;if(p>0){q=p-1;do{o(r[q])}while(q--)}}else{o(r)}this._hiddenFields=null}},submitForm:function(){var r=this.getForm(),q=this.get("srcelement"),p=false,o;if(r){if(this.get("type")=="submit"||(q&&q.type=="submit")){e=this}if(m.ie){p=r.fireEvent("onsubmit")}else{o=document.createEvent("HTMLEvents");o.initEvent("submit",true,true);p=r.dispatchEvent(o)}if((m.ie||m.webkit)&&p){r.submit()}}return p},init:function(p,B){var r=B.type=="link"?"a":"button",w=B.srcelement,A=p.getElementsByTagName(r)[0],y;if(!A){y=p.getElementsByTagName("input")[0];if(y){A=document.createElement("button");A.setAttribute("type","button");y.parentNode.replaceChild(A,y)}}this._button=A;this._hasDefaultTitle=(B.title&&B.title.length>0);YAHOO.widget.Button.superclass.init.call(this,p,B);var u=this.get("id"),o=u+"-button";A.id=o;var v,x;var E=function(F){return(F.htmlFor===u)};var t=function(){x.setAttribute((m.ie?"htmlFor":"for"),o)};if(w&&this.get("type")!="link"){v=g.getElementsBy(E,"label");if(j.isArray(v)&&v.length>0){x=v[0]}}d[u]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");n.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var z=this.get("onclick");this.set("onclick",null);this.set("onclick",z);this.on("dblclick",this._onDblClick);if(x){this.on("appendTo",t)}this.on("appendTo",this._onAppendTo);var D=this.get("container"),q=this.get("element"),C=g.inDocument(q),s;if(D){if(w&&w!=q){s=w.parentNode;if(s){s.removeChild(w)}}if(j.isString(D)){n.onContentReady(D,this.appendTo,D,this)}else{this.on("init",function(){j.later(0,this,this.appendTo,D)})}}else{if(!C&&w&&w!=q){s=w.parentNode;if(s){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:s});s.replaceChild(q,w);this.fireEvent("appendTo",{type:"appendTo",target:s})}}else{if(this.get("type")!="link"&&C&&w&&w==q){this._addListenersToForm()}}}this.fireEvent("init",{type:"init",target:this})},initAttributes:function(p){var o=p||{};YAHOO.widget.Button.superclass.initAttributes.call(this,o);this.setAttributeConfig("type",{value:(o.type||"push"),validator:j.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:o.label,validator:j.isString,method:this._setLabel});this.setAttributeConfig("value",{value:o.value});this.setAttributeConfig("name",{value:o.name,validator:j.isString});this.setAttributeConfig("tabindex",{value:o.tabindex,validator:j.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:o.title,validator:j.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(o.disabled||false),validator:j.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:o.href,validator:j.isString,method:this._setHref});this.setAttributeConfig("target",{value:o.target,validator:j.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(o.checked||false),validator:j.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:o.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:o.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(o.lazyloadmenu===false?false:true),validator:j.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(o.menuclassname||"yui-button-menu"),validator:j.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(o.menuminscrollheight||90),validator:j.isNumber});this.setAttributeConfig("menumaxheight",{value:(o.menumaxheight||0),validator:j.isNumber});this.setAttributeConfig("menualignment",{value:(o.menualignment||["tl","bl"]),validator:j.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:o.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(o.focusmenu===false?false:true),validator:j.isBoolean})},focus:function(){if(!this.get("disabled")){this._button.focus()}},blur:function(){if(!this.get("disabled")){this._button.blur()}},hasFocus:function(){return(c==this)},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active")},getMenu:function(){return this._menu},getForm:function(){var o=this._button,p;if(o){p=o.form}return p},getHiddenFields:function(){return this._hiddenFields},destroy:function(){var q=this.get("element"),p=q.parentNode,o=this._menu,s;if(o){if(l&&l.find(o)){l.remove(o)}o.destroy()}n.purgeElement(q);n.purgeElement(this._button);n.removeListener(document,"mouseup",this._onDocumentMouseUp);n.removeListener(document,"keyup",this._onDocumentKeyUp);n.removeListener(document,"mousedown",this._onDocumentMouseDown);var r=this.getForm();if(r){n.removeListener(r,"reset",this._onFormReset);n.removeListener(r,"submit",this._onFormSubmit)}this.unsubscribeAll();if(p){p.removeChild(q)}delete d[this.get("id")];s=g.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,r);if(j.isArray(s)&&s.length===0){n.removeListener(r,"keypress",YAHOO.widget.Button.onFormKeyPress)}},fireEvent:function(p,o){var q=arguments[0];if(this.DOM_EVENTS[q]&&this.get("disabled")){return false}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments)},toString:function(){return("Button "+this.get("id"))}});YAHOO.widget.Button.onFormKeyPress=function(s){var q=n.getTarget(s),t=n.getCharCode(s),r=q.nodeName&&q.nodeName.toUpperCase(),o=q.type,u=false,w,y,p,x;function v(B){var A,z;switch(B.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(B.type=="submit"&&!B.disabled){if(!u&&!p){p=B}}break;default:A=B.id;if(A){w=d[A];if(w){u=true;if(!w.get("disabled")){z=w.get("srcelement");if(!y&&(w.get("type")=="submit"||(z&&z.type=="submit"))){y=w}}}}break}}if(t==13&&((r=="INPUT"&&(o=="text"||o=="password"||o=="checkbox"||o=="radio"||o=="file"))||r=="SELECT")){g.getElementsBy(v,"*",this);if(p){p.focus()}else{if(!p&&y){n.preventDefault(s);if(m.ie){y.get("element").fireEvent("onclick")}else{x=document.createEvent("HTMLEvents");x.initEvent("click",true,true);if(m.gecko<1.9){y.fireEvent("click",x)}else{y.get("element").dispatchEvent(x)}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(o){var t=g.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",o),r=t.length,s,p,q;if(r>0){for(q=0;q<r;q++){p=t[q].id;if(p){s=d[p];if(s){s.createHiddenFields()}}}}};YAHOO.widget.Button.getButton=function(o){return d[o]}})();(function(){var c=YAHOO.util.Dom,b=YAHOO.util.Event,d=YAHOO.lang,a=YAHOO.widget.Button,e={};YAHOO.widget.ButtonGroup=function(k,h){var j=YAHOO.widget.ButtonGroup.superclass.constructor,l,g,f;if(arguments.length==1&&!d.isString(k)&&!k.nodeName){if(!k.id){f=c.generateId();k.id=f}j.call(this,(this._createGroupElement()),k)}else{if(d.isString(k)){g=c.get(k);if(g){if(g.nodeName.toUpperCase()==this.NODE_NAME){j.call(this,g,h)}}}else{l=k.nodeName.toUpperCase();if(l&&l==this.NODE_NAME){if(!k.id){k.id=c.generateId()}j.call(this,k,h)}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var f=document.createElement(this.NODE_NAME);return f},_setDisabled:function(g){var h=this.getCount(),f;if(h>0){f=h-1;do{this._buttons[f].set("disabled",g)}while(f--)}},_onKeyDown:function(l){var g=b.getTarget(l),j=b.getCharCode(l),h=g.parentNode.parentNode.id,k=e[h],f=-1;if(j==37||j==38){f=(k.index===0)?(this._buttons.length-1):(k.index-1)}else{if(j==39||j==40){f=(k.index===(this._buttons.length-1))?0:(k.index+1)}}if(f>-1){this.check(f);this.getButton(f).focus()}},_onAppendTo:function(h){var j=this._buttons,g=j.length,f;for(f=0;f<g;f++){j[f].appendTo(this.get("element"))}},_onButtonCheckedChange:function(g,f){var j=g.newValue,h=this.get("checkedButton");if(j&&h!=f){if(h){h.set("checked",false,true)}this.set("checkedButton",f);this.set("value",f.get("value"))}else{if(h&&!h.set("checked")){h.set("checked",true,true)}}},init:function(j,h){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,j,h);this.addClass(this.CSS_CLASS_NAME);var k=this.getElementsByClassName("yui-radio-button");if(k.length>0){this.addButtons(k)}function f(l){return(l.type=="radio")}k=c.getElementsBy(f,"input",this.get("element"));if(k.length>0){this.addButtons(k)}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var g=this.get("container");if(g){if(d.isString(g)){b.onContentReady(g,function(){this.appendTo(g)},null,this)}else{this.appendTo(g)}}},initAttributes:function(g){var f=g||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,f);this.setAttributeConfig("name",{value:f.name,validator:d.isString});this.setAttributeConfig("disabled",{value:(f.disabled||false),validator:d.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:f.value});this.setAttributeConfig("container",{value:f.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null})},addButton:function(k){var m,l,g,f,h,j;if(k instanceof a&&k.get("type")=="radio"){m=k}else{if(!d.isString(k)&&!k.nodeName){k.type="radio";m=new a(k)}else{m=new a(k,{type:"radio"})}}if(m){f=this._buttons.length;h=m.get("name");j=this.get("name");m.index=f;this._buttons[f]=m;e[m.get("id")]=m;if(h!=j){m.set("name",j)}if(this.get("disabled")){m.set("disabled",true)}if(m.get("checked")){this.set("checkedButton",m)}l=m.get("element");g=this.get("element");if(l.parentNode!=g){g.appendChild(l)}m.on("checkedChange",this._onButtonCheckedChange,m,this)}return m},addButtons:function(g){var h,j,k,f;if(d.isArray(g)){h=g.length;k=[];if(h>0){for(f=0;f<h;f++){j=this.addButton(g[f]);if(j){k[k.length]=j}}}}return k},removeButton:function(h){var j=this.getButton(h),g,f;if(j){this._buttons.splice(h,1);delete e[j.get("id")];j.removeListener("checkedChange",this._onButtonCheckedChange);j.destroy();g=this._buttons.length;if(g>0){f=this._buttons.length-1;do{this._buttons[f].index=f}while(f--)}}},getButton:function(f){return this._buttons[f]},getButtons:function(){return this._buttons},getCount:function(){return this._buttons.length},focus:function(h){var j,g,f;if(d.isNumber(h)){j=this._buttons[h];if(j){j.focus()}}else{g=this.getCount();for(f=0;f<g;f++){j=this._buttons[f];if(!j.get("disabled")){j.focus();break}}}},check:function(f){var g=this.getButton(f);if(g){g.set("checked",true)}},destroy:function(){var j=this._buttons.length,h=this.get("element"),f=h.parentNode,g;if(j>0){g=this._buttons.length-1;do{this._buttons[g].destroy()}while(g--)}b.purgeElement(h);f.removeChild(h)},toString:function(){return("ButtonGroup "+this.get("id"))}})})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});(function(){var d=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;var b=function(f,e){var g={element:f,attributes:e||{}};b.superclass.constructor.call(this,g.element,g.attributes)};b._instances={};b.getResizeById=function(e){if(b._instances[e]){return b._instances[e]}return false};YAHOO.extend(b,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){d.addClass(this._wrap,"yui-resize-textarea")}d.setStyle(this._wrap,"width",this.get("width")+"px");d.setStyle(this._wrap,"height",this.get("height")+"px");d.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var f=d.getStyle(this.get("element"),"position");d.setStyle(this._wrap,"position",((f=="static")?"relative":f));d.setStyle(this._wrap,"top",d.getStyle(this.get("element"),"top"));d.setStyle(this._wrap,"left",d.getStyle(this.get("element"),"left"));if(d.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;d.setStyle(this.get("element"),"position","relative");d.setStyle(this.get("element"),"top","0");d.setStyle(this.get("element"),"left","0")}var e=this.get("element").parentNode;e.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(d.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){d.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){d.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){d.addClass(this._wrap,this.CSS_HIDDEN)}d.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){d.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var g=this.get("handles");for(var f=0;f<g.length;f++){this._handles[g[f]]=document.createElement("div");this._handles[g[f]].id=d.generateId(this._handles[g[f]]);this._handles[g[f]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+g[f];var e=document.createElement("div");e.className=this.CSS_HANDLE+"-inner-"+g[f];this._handles[g[f]].appendChild(e);this._wrap.appendChild(this._handles[g[f]]);a.on(this._handles[g[f]],"mouseover",this._handleMouseOver,this,true);a.on(this._handles[g[f]],"mouseout",this._handleMouseOut,this,true);this._dds[g[f]]=new YAHOO.util.DragDrop(this._handles[g[f]],this.get("id")+"-handle-"+g,{useShim:this.get("useShim")});this._dds[g[f]].setPadding(15,15,15,15);this._dds[g[f]].on("startDragEvent",this._handleStartDrag,this._dds[g[f]],this);this._dds[g[f]].on("mouseDownEvent",this._handleMouseDown,this._dds[g[f]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(e){if(this.get("autoRatio")){if(e&&e.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(e){if(this._locked){return false}if(d.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(e){this._setAutoRatio(e)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(g){if(this._locked){return false}d.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){d.removeClass(this._wrap,this.CSS_HOVER)}var e=a.getTarget(g);if(!d.hasClass(e,this.CSS_HANDLE)){e=e.parentNode}if(d.hasClass(e,this.CSS_HANDLE)&&!this._active){d.addClass(e,this.CSS_HANDLE+"-active");for(var f in this._handles){if(c.hasOwnProperty(this._handles,f)){if(this._handles[f]==e){d.addClass(e,this.CSS_HANDLE+"-"+f+"-active");break}}}}d.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(g){d.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){d.addClass(this._wrap,this.CSS_HOVER)}var e=a.getTarget(g);if(!d.hasClass(e,this.CSS_HANDLE)){e=e.parentNode}if(d.hasClass(e,this.CSS_HANDLE)&&!this._active){d.removeClass(e,this.CSS_HANDLE+"-active");for(var f in this._handles){if(c.hasOwnProperty(this._handles,f)){if(this._handles[f]==e){d.removeClass(e,this.CSS_HANDLE+"-"+f+"-active");break}}}}d.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(g,f){var e=f.getDragEl();if(d.hasClass(e,this.CSS_HANDLE)){if(d.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=f;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var h in this._handles){if(c.hasOwnProperty(this._handles,h)){if(this._handles[h]==e){this._currentHandle=h;var j="_handle_for_"+h;d.addClass(e,this.CSS_HANDLE+"-"+h+"-active");f.on("dragEvent",this[j],this,true);f.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}d.addClass(e,this.CSS_HANDLE+"-active");if(this.get("proxy")){var k=d.getXY(this.get("element"));d.setXY(this._proxy,k);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}d.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=d.getXY(this._wrap);d.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(f){this._active=false;var g="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[g],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(f,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){d.addClass(this._wrap,this.CSS_HOVER)}if(this._status){d.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){d.removeClass(this._wrap,this.CSS_RESIZE)}for(var e in this._handles){if(c.hasOwnProperty(this._handles,e)){d.removeClass(this._handles[e],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){d.addClass(this._wrap,this.CSS_HOVER)}d.removeClass(this._wrap,this.CSS_RESIZING);d.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");d.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){d.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(n,q,u,k){var r=n,g=q;if(this.get("ratio")){var s=this._cache.height,j=this._cache.width,f=parseInt(this.get("height"),10),o=parseInt(this.get("width"),10),p=this.get("maxHeight"),v=this.get("minHeight"),e=this.get("maxWidth"),m=this.get("minWidth");switch(this._currentHandle){case"l":n=f*(q/o);n=Math.min(Math.max(v,n),p);q=o*(n/f);u=(this._cache.start.top-(-((f-n)/2)));k=(this._cache.start.left-(-((o-q))));break;case"r":n=f*(q/o);n=Math.min(Math.max(v,n),p);q=o*(n/f);u=(this._cache.start.top-(-((f-n)/2)));break;case"t":q=o*(n/f);n=f*(q/o);k=(this._cache.start.left-(-((o-q)/2)));u=(this._cache.start.top-(-((f-n))));break;case"b":q=o*(n/f);n=f*(q/o);k=(this._cache.start.left-(-((o-q)/2)));break;case"bl":n=f*(q/o);q=o*(n/f);k=(this._cache.start.left-(-((o-q))));break;case"br":n=f*(q/o);q=o*(n/f);break;case"tl":n=f*(q/o);q=o*(n/f);k=(this._cache.start.left-(-((o-q))));u=(this._cache.start.top-(-((f-n))));break;case"tr":n=f*(q/o);q=o*(n/f);k=(this._cache.start.left);u=(this._cache.start.top-(-((f-n))));break}r=this._checkHeight(n);g=this._checkWidth(q);if((r!=n)||(g!=q)){u=0;k=0;if(r!=n){g=this._cache.width}if(g!=q){r=this._cache.height}}}return[r,g,u,k]},_updateStatus:function(n,g,m,f){if(this._resizeEvent&&(!c.isString(this._resizeEvent))){n=((n===0)?this._cache.start.height:n);g=((g===0)?this._cache.start.width:g);var k=parseInt(this.get("height"),10),e=parseInt(this.get("width"),10);if(isNaN(k)){k=parseInt(n,10)}if(isNaN(e)){e=parseInt(g,10)}var o=(parseInt(n,10)-k);var j=(parseInt(g,10)-e);this._cache.offsetHeight=o;this._cache.offsetWidth=j;if(this.get("status")){d.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(n,10)+" x "+parseInt(g,10)+"</strong><em>"+((o>0)?"+":"")+o+" x "+((j>0)?"+":"")+j+"</em>";d.setXY(this._status,[a.getPageX(this._resizeEvent)+12,a.getPageY(this._resizeEvent)+12])}}},lock:function(e){this._locked=true;if(e&&this.dd){d.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(e){this._locked=false;if(e&&this.dd){d.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(p,m,s,u,j,f,n){if(this._locked){return false}this._resizeEvent=p;var g=this._wrap,k=this.get("animate"),r=true;if(this._proxy&&!f){g=this._proxy;k=false}this._setAutoRatio(p);if(this._positioned){if(this._proxy){u=this._cache.top-u;j=this._cache.left-j}}var o=this._setRatio(m,s,u,j);m=parseInt(o[0],10);s=parseInt(o[1],10);u=parseInt(o[2],10);j=parseInt(o[3],10);if(u==0){u=d.getY(g)}if(j==0){j=d.getX(g)}if(this._positioned){if(this._proxy&&f){if(!k){g.style.top=this._proxy.style.top;g.style.left=this._proxy.style.left}else{u=this._proxy.style.top;j=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){u=this._cache.top+-(u);j=this._cache.left+-(j)}if(u){if(this.get("minY")){if(u<this.get("minY")){u=this.get("minY")}}if(this.get("maxY")){if(u>this.get("maxY")){u=this.get("maxY")}}}if(j){if(this.get("minX")){if(j<this.get("minX")){j=this.get("minX")}}if(this.get("maxX")){if((j+s)>this.get("maxX")){j=(this.get("maxX")-s)}}}}}if(!n){var q=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:m,width:s,top:u,left:j});if(q===false){return false}}this._updateStatus(m,s,u,j);if(this._positioned){if(this._proxy&&f){}else{if(u){d.setY(g,u);this._cache.top=u}if(j){d.setX(g,j);this._cache.left=j}}}if(m){if(!k){r=true;if(this._proxy&&f){if(!this.get("setSize")){r=false}}if(r){g.style.height=m+"px"}if((this._proxy&&f)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=m+"px"}}}this._cache.height=m}if(s){this._cache.width=s;if(!k){r=true;if(this._proxy&&f){if(!this.get("setSize")){r=false}}if(r){g.style.width=s+"px"}if((this._proxy&&f)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=s+"px"}}}}if(k){if(YAHOO.util.Anim){var e=new YAHOO.util.Anim(g,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(u){e.attributes.top={to:parseInt(u,10)}}if(j){e.attributes.left={to:parseInt(j,10)}}}if(this._wrap!=this.get("element")){e.onTween.subscribe(function(){this.get("element").style.height=g.style.height;this.get("element").style.width=g.style.width},this,true)}e.onComplete.subscribe(function(){this.set("height",m);this.set("width",s);this.fireEvent("resize",{ev:"resize",target:this,height:m,width:s,top:u,left:j})},this,true);e.animate()}}else{if(this._proxy&&!f){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:m,width:s,top:u,left:j})}else{this.fireEvent("resize",{ev:"resize",target:this,height:m,width:s,top:u,left:j})}}return this},_handle_for_br:function(f){var g=this._setWidth(f.e);var e=this._setHeight(f.e);this.resize(f.e,e,g,0,0)},_handle_for_bl:function(g){var h=this._setWidth(g.e,true);var f=this._setHeight(g.e);var e=(h-this._cache.width);this.resize(g.e,f,h,0,e)},_handle_for_tl:function(g){var j=this._setWidth(g.e,true);var f=this._setHeight(g.e,true);var h=(f-this._cache.height);var e=(j-this._cache.width);this.resize(g.e,f,j,h,e)},_handle_for_tr:function(f){var h=this._setWidth(f.e);var e=this._setHeight(f.e,true);var g=(e-this._cache.height);this.resize(f.e,e,h,g,0)},_handle_for_r:function(e){this._dds.r.setYConstraint(0,0);var f=this._setWidth(e.e);this.resize(e.e,0,f,0,0)},_handle_for_l:function(f){this._dds.l.setYConstraint(0,0);var g=this._setWidth(f.e,true);var e=(g-this._cache.width);this.resize(f.e,0,g,0,e)},_handle_for_b:function(f){this._dds.b.setXConstraint(0,0);var e=this._setHeight(f.e);this.resize(f.e,e,0,0,0)},_handle_for_t:function(f){this._dds.t.setXConstraint(0,0);var e=this._setHeight(f.e,true);var g=(e-this._cache.height);this.resize(f.e,e,0,g,0)},_setWidth:function(h,k){var j=this._cache.xy[0],g=this._cache.width,e=a.getPageX(h),f=(e-j);if(k){f=(j-e)+parseInt(this.get("width"),10)}f=this._snapTick(f,this.get("xTicks"));f=this._checkWidth(f);return f},_checkWidth:function(e){if(this.get("minWidth")){if(e<=this.get("minWidth")){e=this.get("minWidth")}}if(this.get("maxWidth")){if(e>=this.get("maxWidth")){e=this.get("maxWidth")}}return e},_checkHeight:function(e){if(this.get("minHeight")){if(e<=this.get("minHeight")){e=this.get("minHeight")}}if(this.get("maxHeight")){if(e>=this.get("maxHeight")){e=this.get("maxHeight")}}return e},_setHeight:function(g,k){var j=this._cache.xy[1],f=this._cache.height,l=a.getPageY(g),e=(l-j);if(k){e=(j-l)+parseInt(this.get("height"),10)}e=this._snapTick(e,this.get("yTicks"));e=this._checkHeight(e);return e},_snapTick:function(g,f){if(!g||!f){return g}var h=g;var e=g%f;if(e>0){if(e>(f/2)){h=g+(f-e)}else{h=g-e}}return h},init:function(j,f){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};b.superclass.init.call(this,j,f);this.set("setSize",this.get("setSize"));if(f.height){this.set("height",parseInt(f.height,10))}else{var g=this.getStyle("height");if(g=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(f.width){this.set("width",parseInt(f.width,10))}else{var e=this.getStyle("width");if(e=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var k=j;if(!c.isString(k)){k=d.generateId(k)}b._instances[k]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(e){b.superclass.initAttributes.call(this,e);this.setAttributeConfig("useShim",{value:((e.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(f){for(var g in this._dds){if(c.hasOwnProperty(this._dds,g)){this._dds[g].useShim=f}}if(this.dd){this.dd.useShim=f}}});this.setAttributeConfig("setSize",{value:((e.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:e.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:e.handles||["r","b","br"],validator:function(f){if(c.isString(f)&&f.toLowerCase()=="all"){f=["t","b","r","l","bl","br","tl","tr"]}if(!c.isArray(f)){f=f.replace(/, /g,",");f=f.split(",")}this._configs.handles.value=f}});this.setAttributeConfig("width",{value:e.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(f){f=parseInt(f,10);if(f>0){if(this.get("setSize")){this.setStyle("width",f+"px")}this._cache.width=f;this._configs.width.value=f}}});this.setAttributeConfig("height",{value:e.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(f){f=parseInt(f,10);if(f>0){if(this.get("setSize")){this.setStyle("height",f+"px")}this._cache.height=f;this._configs.height.value=f}}});this.setAttributeConfig("minWidth",{value:e.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:e.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:e.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:e.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:e.minY||false});this.setAttributeConfig("minX",{value:e.minX||false});this.setAttributeConfig("maxY",{value:e.maxY||false});this.setAttributeConfig("maxX",{value:e.maxX||false});this.setAttributeConfig("animate",{value:e.animate||false,validator:function(g){var f=true;if(!YAHOO.util.Anim){f=false}return f}});this.setAttributeConfig("animateEasing",{value:e.animateEasing||function(){var f=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){f=YAHOO.util.Easing.easeOut}return f}()});this.setAttributeConfig("animateDuration",{value:e.animateDuration||0.5});this.setAttributeConfig("proxy",{value:e.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:e.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:e.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:e.draggable||false,validator:YAHOO.lang.isBoolean,method:function(f){if(f&&this._wrap){this._setupDragDrop()}else{if(this.dd){d.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}});this.setAttributeConfig("hover",{value:e.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:e.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:e.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:e.xTicks||false});this.setAttributeConfig("yTicks",{value:e.yTicks||false});this.setAttributeConfig("status",{value:e.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:e.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var f in this._handles){if(c.hasOwnProperty(this._handles,f)){a.purgeElement(this._handles[f]);this._handles[f].parentNode.removeChild(this._handles[f])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();d.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var e in this){if(c.hasOwnProperty(this,e)){this[e]=null;delete this[e]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=b})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.7.0",build:"1799"});if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c)}else{return false}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]}}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c)}if(f){f.VERSION=j;f.BUILD=h}else{YAHOO.log("mainClass is undefined for module "+a,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var c={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},b=navigator.userAgent,a;if((/KHTML/).test(b)){c.webkit=1}a=b.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){c.webkit=parseFloat(a[1]);if(/ Mobile\//.test(b)){c.mobile="Apple"}else{a=b.match(/NokiaN[^\/]*/);if(a){c.mobile=a[0]}}a=b.match(/AdobeAIR\/([^\s]*)/);if(a){c.air=a[0]}}if(!c.webkit){a=b.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){c.opera=parseFloat(a[1]);a=b.match(/Opera Mini[^;]*/);if(a){c.mobile=a[0]}}else{a=b.match(/MSIE\s([^;]*)/);if(a&&a[1]){c.ie=parseFloat(a[1])}else{a=b.match(/Gecko\/([^\s]*)/);if(a){c.gecko=1;a=b.match(/rv:([^\s\)]*)/);if(a&&a[1]){c.gecko=parseFloat(a[1])}}}}}a=b.match(/Caja\/([^\s]*)/);if(a&&a[1]){c.caja=parseFloat(a[1])}return c}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c=c+1){if(a[c]==b){d=false;break}}if(d){a.push(b)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var b=YAHOO.lang,f="[object Array]",c="[object Function]",a=Object.prototype,e=["toString","valueOf"],d={isArray:function(g){return a.toString.apply(g)===f},isBoolean:function(g){return typeof g==="boolean"},isFunction:function(g){return a.toString.apply(g)===c},isNull:function(g){return g===null},isNumber:function(g){return typeof g==="number"&&isFinite(g)},isObject:function(g){return(g&&(typeof g==="object"||b.isFunction(g)))||false},isString:function(g){return typeof g==="string"},isUndefined:function(g){return typeof g==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(j,h){var g,l,k;for(g=0;g<e.length;g=g+1){l=e[g];k=h[l];if(b.isFunction(k)&&k!=a[l]){j[l]=k}}}:function(){},extend:function(k,l,j){if(!l||!k){throw new Error("extend failed, please check that all dependencies are included.")}var h=function(){},g;h.prototype=l.prototype;k.prototype=new h();k.prototype.constructor=k;k.superclass=l.prototype;if(l.prototype.constructor==a.constructor){l.prototype.constructor=l}if(j){for(g in j){if(b.hasOwnProperty(j,g)){k.prototype[g]=j[g]}}b._IEEnumFix(k.prototype,j)}},augmentObject:function(l,k){if(!k||!l){throw new Error("Absorb failed, verify dependencies.")}var g=arguments,j,m,h=g[2];if(h&&h!==true){for(j=2;j<g.length;j=j+1){l[g[j]]=k[g[j]]}}else{for(m in k){if(h||!(m in l)){l[m]=k[m]}}b._IEEnumFix(l,k)}},augmentProto:function(k,j){if(!j||!k){throw new Error("Augment failed, verify dependencies.")}var g=[k.prototype,j.prototype],h;for(h=2;h<arguments.length;h=h+1){g.push(arguments[h])}b.augmentObject.apply(this,g)},dump:function(g,m){var j,l,p=[],q="{...}",h="f(){...}",n=", ",k=" => ";if(!b.isObject(g)){return g+""}else{if(g instanceof Date||("nodeType" in g&&"tagName" in g)){return g}else{if(b.isFunction(g)){return h}}}m=(b.isNumber(m))?m:3;if(b.isArray(g)){p.push("[");for(j=0,l=g.length;j<l;j=j+1){if(b.isObject(g[j])){p.push((m>0)?b.dump(g[j],m-1):q)}else{p.push(g[j])}p.push(n)}if(p.length>1){p.pop()}p.push("]")}else{p.push("{");for(j in g){if(b.hasOwnProperty(g,j)){p.push(j+k);if(b.isObject(g[j])){p.push((m>0)?b.dump(g[j],m-1):q)}else{p.push(g[j])}p.push(n)}}if(p.length>1){p.pop()}p.push("}")}return p.join("")},substitute:function(B,h,t){var p,n,m,x,y,A,w=[],l,q="dump",u=" ",g="{",z="}",r;for(;;){p=B.lastIndexOf(g);if(p<0){break}n=B.indexOf(z,p);if(p+1>=n){break}l=B.substring(p+1,n);x=l;A=null;m=x.indexOf(u);if(m>-1){A=x.substring(m+1);x=x.substring(0,m)}y=h[x];if(t){y=t(x,y,A)}if(b.isObject(y)){if(b.isArray(y)){y=b.dump(y,parseInt(A,10))}else{A=A||"";r=A.indexOf(q);if(r>-1){A=A.substring(4)}if(y.toString===a.toString||r>-1){y=b.dump(y,parseInt(A,10))}else{y=y.toString()}}}else{if(!b.isString(y)&&!b.isNumber(y)){y="~-"+w.length+"-~";w[w.length]=l}}B=B.substring(0,p)+y+B.substring(n+1)}for(p=w.length-1;p>=0;p=p-1){B=B.replace(new RegExp("~-"+p+"-~"),"{"+w[p]+"}","g")}return B},trim:function(g){try{return g.replace(/^\s+|\s+$/g,"")}catch(h){return g}},merge:function(){var k={},h=arguments,g=h.length,j;for(j=0;j<g;j=j+1){b.augmentObject(k,h[j],true)}return k},later:function(q,h,s,k,l){q=q||0;h=h||{};var j=s,p=k,n,g;if(b.isString(s)){j=h[s]}if(!j){throw new TypeError("method undefined")}if(!b.isArray(p)){p=[k]}n=function(){j.apply(h,p)};g=(l)?setInterval(n,q):setTimeout(n,q);return{interval:l,cancel:function(){if(this.interval){clearInterval(g)}else{clearTimeout(g)}}}},isValue:function(g){return(b.isObject(g)||b.isString(g)||b.isNumber(g)||b.isBoolean(g))}};b.hasOwnProperty=(a.hasOwnProperty)?function(g,h){return g&&g.hasOwnProperty(h)}:function(g,h){return !b.isUndefined(g[h])&&g.constructor.prototype[h]!==g[h]};d.augmentObject(b,d,true);YAHOO.util.Lang=b;b.augment=b.augmentProto;YAHOO.augment=b.augmentProto;YAHOO.extend=b.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var n={},m=0,s=0,e=false,o=YAHOO.env.ua,t=YAHOO.lang;var k=function(y,u,z){var v=z||window,A=v.document,B=A.createElement(y);for(var x in u){if(u[x]&&YAHOO.lang.hasOwnProperty(u,x)){B.setAttribute(x,u[x])}}return B};var j=function(u,v,x){var w=x||"utf-8";return k("link",{id:"yui__dyn_"+(s++),type:"text/css",charset:w,rel:"stylesheet",href:u},v)};var q=function(u,v,x){var w=x||"utf-8";return k("script",{id:"yui__dyn_"+(s++),type:"text/javascript",charset:w,src:u},v)};var a=function(u,v){return{tId:u.tId,win:u.win,data:u.data,nodes:u.nodes,msg:v,purge:function(){d(this.tId)}}};var b=function(u,x){var v=n[x],w=(t.isString(u))?v.win.document.getElementById(u):u;if(!w){r(x,"target node not found: "+u)}return w};var r=function(x,w){var u=n[x];if(u.onFailure){var v=u.scope||u.win;u.onFailure.call(v,a(u,w))}};var c=function(x){var u=n[x];u.finished=true;if(u.aborted){var w="transaction "+x+" was aborted";r(x,w);return}if(u.onSuccess){var v=u.scope||u.win;u.onSuccess.call(v,a(u))}};var p=function(w){var u=n[w];if(u.onTimeout){var v=u.scope||u;u.onTimeout.call(v,a(u))}};var g=function(x,B){var v=n[x];if(v.timer){v.timer.cancel()}if(v.aborted){var z="transaction "+x+" was aborted";r(x,z);return}if(B){v.url.shift();if(v.varName){v.varName.shift()}}else{v.url=(t.isString(v.url))?[v.url]:v.url;if(v.varName){v.varName=(t.isString(v.varName))?[v.varName]:v.varName}}var E=v.win,D=E.document,C=D.getElementsByTagName("head")[0],y;if(v.url.length===0){if(v.type==="script"&&o.webkit&&o.webkit<420&&!v.finalpass&&!v.varName){var A=q(null,v.win,v.charset);A.innerHTML='YAHOO.util.Get._finalize("'+x+'");';v.nodes.push(A);C.appendChild(A)}else{c(x)}return}var u=v.url[0];if(!u){v.url.shift();return g(x)}if(v.timeout){v.timer=t.later(v.timeout,v,p,x)}if(v.type==="script"){y=q(u,E,v.charset)}else{y=j(u,E,v.charset)}f(v.type,y,x,u,E,v.url.length);v.nodes.push(y);if(v.insertBefore){var F=b(v.insertBefore,x);if(F){F.parentNode.insertBefore(y,F)}}else{C.appendChild(y)}if((o.webkit||o.gecko)&&v.type==="css"){g(x,u)}};var l=function(){if(e){return}e=true;for(var u in n){var v=n[u];if(v.autopurge&&v.finished){d(v.tId);delete n[u]}}e=false};var d=function(B){var y=n[B];if(y){var A=y.nodes,u=A.length,z=y.win.document,x=z.getElementsByTagName("head")[0];if(y.insertBefore){var w=b(y.insertBefore,B);if(w){x=w.parentNode}}for(var v=0;v<u;v=v+1){x.removeChild(A[v])}y.nodes=[]}};var h=function(v,u,w){var y="q"+(m++);w=w||{};if(m%YAHOO.util.Get.PURGE_THRESH===0){l()}n[y]=t.merge(w,{tId:y,type:v,url:u,finished:false,aborted:false,nodes:[]});var x=n[y];x.win=x.win||window;x.scope=x.scope||x.win;x.autopurge=("autopurge" in x)?x.autopurge:(v==="script")?true:false;t.later(0,x,g,y);return{tId:y}};var f=function(D,y,x,v,z,A,C){var B=C||g;if(o.ie){y.onreadystatechange=function(){var E=this.readyState;if("loaded"===E||"complete"===E){y.onreadystatechange=null;B(x,v)}}}else{if(o.webkit){if(D==="script"){if(o.webkit>=420){y.addEventListener("load",function(){B(x,v)})}else{var u=n[x];if(u.varName){var w=YAHOO.util.Get.POLL_FREQ;u.maxattempts=YAHOO.util.Get.TIMEOUT/w;u.attempts=0;u._cache=u.varName[0].split(".");u.timer=t.later(w,u,function(J){var G=this._cache,F=G.length,E=this.win,H;for(H=0;H<F;H=H+1){E=E[G[H]];if(!E){this.attempts++;if(this.attempts++>this.maxattempts){var I="Over retry limit, giving up";u.timer.cancel();r(x,I)}else{}return}}u.timer.cancel();B(x,v)},null,true)}else{t.later(YAHOO.util.Get.POLL_FREQ,null,B,[x,v])}}}}else{y.onload=function(){B(x,v)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(u){t.later(0,null,c,u)},abort:function(v){var w=(t.isString(v))?v:v.tId;var u=n[w];if(u){u.aborted=true}},script:function(u,v){return h("script",u,v)},css:function(u,v){return h("css",u,v)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{yahoo:true,get:true},info:{root:"2.7.0/build/",base:"http://yui.yahooapis.com/2.7.0/build/",comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["reset","fonts","grids","base"],rollup:3},dupsAllowed:["yahoo","get"],moduleInfo:{animation:{type:"js",path:"animation/animation-min.js",requires:["dom","event"]},autocomplete:{type:"js",path:"autocomplete/autocomplete-min.js",requires:["dom","event","datasource"],optional:["connection","animation"],skinnable:true},base:{type:"css",path:"base/base-min.css",after:["reset","fonts","grids"]},button:{type:"js",path:"button/button-min.js",requires:["element"],optional:["menu"],skinnable:true},calendar:{type:"js",path:"calendar/calendar-min.js",requires:["event","dom"],skinnable:true},carousel:{type:"js",path:"carousel/carousel-min.js",requires:["element"],optional:["animation"],skinnable:true},charts:{type:"js",path:"charts/charts-min.js",requires:["element","json","datasource"]},colorpicker:{type:"js",path:"colorpicker/colorpicker-min.js",requires:["slider","element"],optional:["animation"],skinnable:true},connection:{type:"js",path:"connection/connection-min.js",requires:["event"]},container:{type:"js",path:"container/container-min.js",requires:["dom","event"],optional:["dragdrop","animation","connection"],supersedes:["containercore"],skinnable:true},containercore:{type:"js",path:"container/container_core-min.js",requires:["dom","event"],pkg:"container"},cookie:{type:"js",path:"cookie/cookie-min.js",requires:["yahoo"]},datasource:{type:"js",path:"datasource/datasource-min.js",requires:["event"],optional:["connection"]},datatable:{type:"js",path:"datatable/datatable-min.js",requires:["element","datasource"],optional:["calendar","dragdrop","paginator"],skinnable:true},dom:{type:"js",path:"dom/dom-min.js",requires:["yahoo"]},dragdrop:{type:"js",path:"dragdrop/dragdrop-min.js",requires:["dom","event"]},editor:{type:"js",path:"editor/editor-min.js",requires:["menu","element","button"],optional:["animation","dragdrop"],supersedes:["simpleeditor"],skinnable:true},element:{type:"js",path:"element/element-min.js",requires:["dom","event"]},event:{type:"js",path:"event/event-min.js",requires:["yahoo"]},fonts:{type:"css",path:"fonts/fonts-min.css"},get:{type:"js",path:"get/get-min.js",requires:["yahoo"]},grids:{type:"css",path:"grids/grids-min.css",requires:["fonts"],optional:["reset"]},history:{type:"js",path:"history/history-min.js",requires:["event"]},imagecropper:{type:"js",path:"imagecropper/imagecropper-min.js",requires:["dom","event","dragdrop","element","resize"],skinnable:true},imageloader:{type:"js",path:"imageloader/imageloader-min.js",requires:["event","dom"]},json:{type:"js",path:"json/json-min.js",requires:["yahoo"]},layout:{type:"js",path:"layout/layout-min.js",requires:["dom","event","element"],optional:["animation","dragdrop","resize","selector"],skinnable:true},logger:{type:"js",path:"logger/logger-min.js",requires:["event","dom"],optional:["dragdrop"],skinnable:true},menu:{type:"js",path:"menu/menu-min.js",requires:["containercore"],skinnable:true},paginator:{type:"js",path:"paginator/paginator-min.js",requires:["element"],skinnable:true},profiler:{type:"js",path:"profiler/profiler-min.js",requires:["yahoo"]},profilerviewer:{type:"js",path:"profilerviewer/profilerviewer-min.js",requires:["profiler","yuiloader","element"],skinnable:true},reset:{type:"css",path:"reset/reset-min.css"},"reset-fonts-grids":{type:"css",path:"reset-fonts-grids/reset-fonts-grids.css",supersedes:["reset","fonts","grids","reset-fonts"],rollup:4},"reset-fonts":{type:"css",path:"reset-fonts/reset-fonts.css",supersedes:["reset","fonts"],rollup:2},resize:{type:"js",path:"resize/resize-min.js",requires:["dom","event","dragdrop","element"],optional:["animation"],skinnable:true},selector:{type:"js",path:"selector/selector-min.js",requires:["yahoo","dom"]},simpleeditor:{type:"js",path:"editor/simpleeditor-min.js",requires:["element"],optional:["containercore","menu","button","animation","dragdrop"],skinnable:true,pkg:"editor"},slider:{type:"js",path:"slider/slider-min.js",requires:["dragdrop"],optional:["animation"],skinnable:true},stylesheet:{type:"js",path:"stylesheet/stylesheet-min.js",requires:["yahoo"]},tabview:{type:"js",path:"tabview/tabview-min.js",requires:["element"],optional:["connection"],skinnable:true},treeview:{type:"js",path:"treeview/treeview-min.js",requires:["event","dom"],optional:["json"],skinnable:true},uploader:{type:"js",path:"uploader/uploader.js",requires:["element"]},utilities:{type:"js",path:"utilities/utilities.js",supersedes:["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],rollup:8},yahoo:{type:"js",path:"yahoo/yahoo-min.js"},"yahoo-dom-event":{type:"js",path:"yahoo-dom-event/yahoo-dom-event.js",supersedes:["yahoo","event","dom"],rollup:3},yuiloader:{type:"js",path:"yuiloader/yuiloader-min.js",supersedes:["yahoo","get"]},"yuiloader-dom-event":{type:"js",path:"yuiloader-dom-event/yuiloader-dom-event.js",supersedes:["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],rollup:5},yuitest:{type:"js",path:"yuitest/yuitest-min.js",requires:["logger"],skinnable:true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return -1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({name:name,type:"css",path:sinf.base+skin+"/"+sinf.path,after:sinf.after,rollup:sinf.rollup,ext:ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({name:name,type:"css",after:sinf.after,path:pkg+"/"+sinf.base+skin+"/"+mod+".css",ext:ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});YAHOO.namespace("IP.control");YAHOO.namespace("IP.event");YAHOO.namespace("IP.net");YAHOO.namespace("IP.util");YAHOO.namespace("IP.widget");var IP=YAHOO.IP;var $D=YAHOO.util.Dom;var $=function(a){if(YAHOO.lang.isString(a)){a=document.getElementById(a)}return a};var $E=YAHOO.util.Event;var log=YAHOO.log;if(typeof console==="undefined"&&!window.console){console={log:function(){},debug:function(){},warn:function(){}}}document.getElementByHandle=function(c,a,b){return document.getElementByClassName("_"+c,a,b)};document.getElementsByHandle=function(c,a,b){return document.getElementsByClassName("_"+c,a,b)};document._getElementsByClassName=(function(){var c=(navigator.userAgent.indexOf("AppleWebKit")>-1);var b;if(false&&document.getElementsByClassName){var a=document.getElementsByClassName;b=function(g,f,d,e){d=$(d);var h;if(!d){console.warn("The parentElement was not specified for document._getElementsByClassName");h=a.call(document,f)}else{h=d.getElementsByClassName(f)}if(h&&g){return h[0]}else{return h}}}else{if(document.evaluate&&!c){b=function(k,j,d,h){h=h||"*";var g=" "+j+" ";d=$(d);if(!d){console.warn("The parentElement was not specified for document._getElementsByClassName");d=document}var f=document.evaluate(".//"+h+"[contains(concat(' ', @class, ' '), '"+g+"')]",d,null,0,null);var e=f.iterateNext();if(k){return e}else{var l=[];while(e){l.push(e);e=f.iterateNext()}return l}}}else{b=function(r,o,q,h){h=h||"*";var k=" "+o+" ";q=$(q);if(!q){console.warn("The parentElement was not specified for document._getElementsByClassName");q=document.body}var f=q.getElementsByTagName(h);var j=f.length;var d=[];for(var l=0;l<j;l++){var e=f[l];var g=e.className;var m=false;if(g==o){m=true}else{var p=" "+g+" ";var n=p.indexOf(k);if(n>-1){m=true}}if(m){if(r){return e}else{d.push(e)}}}if(r){return null}else{return d}}}}return b})();document.getElementByClassName=function(c,a,b){return document._getElementsByClassName(true,c,a,b)};document.getElementsByClassName=function(c,a,b){return document._getElementsByClassName(false,c,a,b)};YAHOO.util.Event.on(window,"unload",function(){document.getElementsByClassName=null;document.getElementByClassName=null;document._getElementsByClassName=null;document.getElementsByHandle=null;document.getElementByHandle=null});if(!window.Element){Element=new Object()}Element.show=function(a){a=$(a);a.style.display=""};Element.hide=function(a){a=$(a);a.style.display="none"};Element.isVisible=function(a){a=$(a);return(a.style.display!="none")};Element.remove=function(a){var b=document.getElementById("element_garbage_bin");if(!b){b=document.createElement("DIV");b.id="element_garbage_bin";b.style.display="none";document.body.appendChild(b)}b.appendChild(a);b.innerHTML=""};if(!YAHOO.lang.hasOwnProperty(Function,"bind")){Function.prototype.bind=function(c,b){var a=this;return function(){var d=b||arguments;return a.apply(c||window,d)}}}if(!YAHOO.lang.hasOwnProperty(Function,"bindAsEventListener")){Function.prototype.bindAsEventListener=function(c,b){var a=this;return function(d){return a.apply(c,[(d||window.event)].concat(b).concat(arguments))}}}if(!YAHOO.lang.hasOwnProperty(Array,"indexOf")){Array.prototype.indexOf=function(c){var b=this.length;for(var a=0;a<b;a++){if(this[a]==c){return a}}return -1}}if(!YAHOO.lang.hasOwnProperty(Array,"insert")){Array.prototype.insert=function(d,c){if(d>=0){var a=this.slice();var b=a.splice(d);a[d]=c;return a.concat(b)}}}if(!YAHOO.lang.hasOwnProperty(Array,"remove")){Array.prototype.remove=function(b){var a=this.indexOf(b);if(a>-1){this.splice(a,1)}}}if(!YAHOO.lang.hasOwnProperty(String,"trim")){String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")}}if(!YAHOO.lang.hasOwnProperty(String,"pad")){String.prototype.pad=function(a,d,b){d=d||" ";var c;a-=this.length;if(a>0){d=new Array(Math.ceil(a/d.length)+1).join(d);c=d.substr(0,b=!b?a:b==1?0:Math.ceil(a/2))+this+d.substr(0,a-b)}else{c=this}return c}}if(!YAHOO.lang.hasOwnProperty(String,"stripTags")){String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,"")}}if(!YAHOO.lang.hasOwnProperty(String,"escapeHTML")){String.prototype.escapeHTML=function(){var b=document.createElement("div");var a=document.createTextNode(this);b.appendChild(a);return b.innerHTML}}if(!YAHOO.lang.hasOwnProperty(String,"unescapeHTML")){String.prototype.unescapeHTML=function(){var b=document.createElement("div");var a=this.stripTags();b.innerHTML=a;return b.childNodes[0]?b.childNodes[0].nodeValue:a}}if(!YAHOO.lang.hasOwnProperty(String,"truncate")){String.prototype.truncate=function(b,a){b=b||30;a=a===undefined?"...":a;return this.length>b?this.slice(0,b-a.length)+a:this}}YAHOO.util.Event.getEl=function(a){return $D.get(a)};YAHOO.util.Event.getFocusEventName=function(){if(IP.Util.usingIE()){return"focusin"}else{return"focus"}};YAHOO.util.Event.getBlurEventName=function(){if(IP.Util.usingIE()){return"focusout"}else{return"blur"}};IP.Util=(function(){return{usingFirefox:function(){if(this._usingGecko==undefined){this._usingGecko=(navigator.userAgent.indexOf("Gecko")>-1)&&(navigator.userAgent.indexOf("KHTML")==-1)}return this._usingGecko},usingFirefox2:function(){if(this._usingFirefox2==undefined){this._usingFirefox2=this.usingFirefox()&&(navigator.userAgent.indexOf("Firefox/2")>-1)}return this._usingFirefox2},usingFirefox3:function(){if(this._usingFirefox3==undefined){this._usingFirefox3=this.usingFirefox()&&(navigator.userAgent.indexOf("Firefox/3")>-1)}return this._usingFirefox3},usingSafari:function(){if(this._usingSafari==undefined){this._usingSafari=(navigator.userAgent.indexOf("AppleWebKit")>-1)}return this._usingSafari},usingSafari2:function(){if(this._usingSafari2==undefined){this._usingSafari2=(/Safari\/4\d\d(\.\d+)?/).test(navigator.userAgent)}return this._usingSafari2},usingIE:function(){if(this._usingIE==undefined){this._usingIE=(navigator.userAgent.indexOf("MSIE")>-1)}return this._usingIE},usingIE6:function(){if(this._usingIE6==undefined){this._usingIE6=((navigator.userAgent.indexOf("MSIE 6")>-1)&&(navigator.userAgent.indexOf("Trident/")==-1))}return this._usingIE6},usingIE7:function(){if(this._usingIE7==undefined){this._usingIE7=((navigator.userAgent.indexOf("MSIE 7")>-1)&&(navigator.userAgent.indexOf("Trident/")==-1))}return this._usingIE7},usingIE8:function(){if(this._usingIE8==undefined){this._usingIE8=(navigator.userAgent.indexOf("Trident/")>-1)}return this._usingIE8},isInteger:function(a){var b=false;if((a||(a===0))&&!isNaN(a)&&isFinite(a)&&(new String(a).indexOf(".")==-1)&&(parseInt(a)==a)){b=true}return b},isFloat:function(b){var a=false;if((b||(b===0))&&!isNaN(b)&&isFinite(b)&&(parseFloat(b)==b)){a=true}return a},isHexColor:function(b){var a=/^#[A-F0-9]{3}([A-F0-9]{3})?$/i;return a.test(b)},deferExecution:function(a){setTimeout(a,50)},deferExecutionOverArray:function(g,c,e,d){var f=g.length;var a=e;if(YAHOO.lang.isUndefined(a)){a=0}if(YAHOO.lang.isUndefined(d)){d=f}var b=function(){if((a>=d)||(a>=f)){return}c(g[a]);a++;IP.Util.deferExecution(b)};IP.Util.deferExecution(b)},trimTrailing:function(a){try{return a.replace(/\s+$/g,"")}catch(b){return a}},scrubHTML:function(a){a=new String(a);a=a.replace(/\son\w+\s*=\s*(["|']).*?\1/img,"");if(IP.Util.usingIE()){a=a.replace(/<br(\s)*(\/)?>/gi,"&lt;br$1/&gt;");a=a.replace(/\r\n/g,"<br />");a=a.escapeHTML();a=a.replace(/&lt;br \/&gt;/gi,"\r\n");a=a.replace(/&amp;lt;br(\s)*\/&amp;gt;/gi,"&lt;br$1/&gt;")}else{a=a.escapeHTML()}a=a.replace(/&lt;a(\s.*href=.*?)&gt;(.*?)&lt;\/a&gt;/img,"<a$1>$2</a>");a=a.replace(/&lt;b&gt;/gi,"<b>");a=a.replace(/&lt;\/b&gt;/gi,"</b>");a=a.replace(/&lt;i&gt;/gi,"<i>");a=a.replace(/&lt;\/i&gt;/gi,"</i>");a=a.replace(/&lt;u&gt;/gi,"<u>");a=a.replace(/&lt;\/u&gt;/gi,"</u>");return a},stripEventHandlers:function(a){a=new String(a);a=a.replace(/\son\w+\s*=\s*(["|']).*?\1/img,"");return a},unscrubHTML:function(a){a=new String(a);a=a.replace(/<a(\s.*href=.*?)>(.*?)<\/a>/img,"&lt;a$1&gt;$2&lt;/a&gt;");a=a.replace(/<b>/gi,"&lt;b&gt;");a=a.replace(/<\/b>/gi,"&lt;/b&gt;");a=a.replace(/<i>/gi,"&lt;i&gt;");a=a.replace(/<\/i>/gi,"&lt;/i&gt;");a=a.replace(/<u>/gi,"&lt;u&gt;");a=a.replace(/<\/u>/gi,"&lt;/u&gt;");if(IP.Util.usingIE()){a=a.replace(/&lt;br(\s)*\/&gt;/gi,"&amp;lt;br$1/&amp;gt;");a=a.replace(/\r\n/g,"&lt;br /&gt;");a=a.unescapeHTML();a=a.replace(/<br \/>/gi,"\r\n");a=a.replace(/&lt;br(\s)*\/&gt;/gi,"<br$1/>")}else{a=a.unescapeHTML()}return a},newLinesToBreakTags:function(a){a=new String(a);if(a){a=a.replace(/(\r)?\n/g,"<br />");a=a.replace(/\u2028/g,"<br />");a=a.replace(/\u2029/g,"<br />")}return a},breakTagsToNewLines:function(b,a){b=new String(b);if(b){if(!IP.Util.usingIE()||a){b=b.replace(/<br(\s)*(\/)?>/gi,"\n")}else{b=b.replace(/<br(\s)*(\/)?>/gi,"\r\n")}}return b},spacesToNonbreakingSpaces:function(a){a=new String(a);if(a){a=a.replace(/(\r)? (?!(\/)?(>|&gt;))/g,"&nbsp;");a=a.replace(/(\r)?((&nbsp;)+)&nbsp;(?!(\/)?(>|&gt;))/g," $2")}return a},truncateFloatingNumber:function(c,a){a=a||0;var b=new String(c);if(b.indexOf(".")>-1){var d=Math.pow(10,parseInt(a));c=Math.round(c*d)/d}return c},getErrorString:function(b){var a="";if(b.name){a+=b.name+": "+b.message;try{if(b.number){a+=", #"+(b.number&65535)}if(b.description){a+=": "+b.description}}catch(c){}try{if(b.fileName){a+=" in "+b.fileName}if(b.lineNumber){a+=" at line "+b.lineNumber}}catch(c){}a+=". "+b}else{a+=b}return a},getDateFromPerlString:function(b){var a=null;try{b=b.replace(/-/g,"/");a=new Date(b)}catch(c){}return a},getDateFromPerlTimestamp:function(b){try{var a=new Date(b.substring(0,4),(parseInt(b.substring(5,7))-1),b.substring(8,10),b.substring(11,13),b.substring(14,16),b.substring(17,19),b.substring(20,26))}catch(c){}return a},formatDateMMDDYY:function(b){var d=new String(b.getMonth()+1);var a=new String(b.getDate());var e=new String(b.getFullYear());var c=d.pad(2,"0",0);c+="-";c+=a.pad(2,"0",0);c+="-";c+=e.substr(2,2);return c},getCurrentTimestamp:function(){var a=new Date().getTime();return a},getQueryStringParameter:function(a){var h=window.location.search.substring(1);var c="&";if(h.indexOf("&amp;")>-1){c="&amp;"}var e=h.split(c);var b=e.length;var f=null;for(var d=0;d<b;d++){var g=e[d].split("=");if(g[0]==a){f=g[1];break}}return f},millisecondsToTime:function(a){var d=Math.floor(a/1000);var b=Math.floor(d/60);d=d%60;var h=new String(d);var j=h.pad(2,"0",0);var f=Math.floor(b/60);b=b%60;var g=new String(b);j=g.pad(2,"0",0)+":"+j;var e=Math.floor(f/60);f=f%60;var c=new String(f);j=c.pad(2,"0",0)+":"+j;return j},getRelativeCoordinates:function(c,b){var d={};var a=$D.getRegion(b);d.x=$E.getPageX(c);d.y=$E.getPageY(c);if(b){d.x=parseInt(d.x-a.left);d.y=parseInt(d.y-a.top)}return d},getViewportCoordinates:function(d){var a=0,c=0;var b=d;while(b){a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(b.style.position=="absolute"){break}}b=b.offsetParent}b=d;while(b){if(!window.opera||b.tagName=="BODY"){a-=b.scrollTop||0;c-=b.scrollLeft||0}b=b.parentNode}return{x:c,y:a}},getDocumentScrollTop:function(){var a=null;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}return a},hasFixedAncestry:function(c){var b=false;var a=(c.tagName?c.tagName.toLowerCase():c.nodeName.toLowerCase());if(a=="body"||a=="html"){b=false}else{var d=YAHOO.util.Dom.getStyle(c,"position");if(d&&d.toLowerCase()=="fixed"){b=true}else{b=IP.Util.hasFixedAncestry(c.parentNode)}}return b},getFunctionInfo:function(d){var a=d.toString().replace(/\s/g," ");var c;var b=a.match(/^function (\w*)/);if((b===null)||(b[1]===null)||(b[1].length===0)){c="anonymous"}else{c=b[1]}return[c,a]},stackTrace:function(e){var b=new Array();if(e){e=e.caller}else{e=IP.Util.stackTrace.caller}var d=0;for(var c=e;c!==null;c=c.caller){b.push(IP.Util.getFunctionInfo(c));if(c.caller==c){break}else{if(d>=20){b.push(["...","..."]);break}}d++}return b},openWindow:function(b,d,a){var c=window.open(b,d,a);if(c){c.focus()}return c},insertAtCursor:function(d,c){if(document.selection){d.focus();sel=document.selection.createRange();sel.text=c}else{if(d.selectionStart||d.selectionStart=="0"){var b=d.selectionStart;var a=d.selectionEnd;d.value=d.value.substring(0,b)+c+d.value.substring(a,d.value.length);d.selectionStart=a+c.length;d.selectionEnd=a+c.length}else{d.value+=c}}},placeCursorAtEnd:function(c){if(document.selection){var a=c.createTextRange();a.collapse(false);a.select()}else{if(c.selectionStart||c.selectionStart=="0"){var b=c.value.length;c.selectionStart=b;c.selectionEnd=b}}},getMouseWheelEventName:function(){var a="mousewheel";if(IP.Util.usingFirefox()){a="DOMMouseScroll"}return a},setInnerHTML:function(c,b,d){var a=function(e){var f=e.responseText;c.innerHTML=f;d(c)};YAHOO.util.Connect.asyncRequest("GET",b,{success:a})},downloadFile:function(a){if(IP.Util.usingIE()){var b=window.open("","download","menubar=0,resizable=0,width=350,height=100,location=0");if(b){b.location=a;b.focus()}else{return false}}else{var c=document.createElement("iframe");c.style.display="none";c.src=a;document.body.appendChild(c)}return true},fixedAncestryCache:[],hasFixedAncestry:function(b){if(!b||(b.nodeType==11)){return false}var a=(b.tagName?b.tagName.toLowerCase():b.nodeName.toLowerCase());if(b.id&&this.fixedAncestryCache[b.id]!=undefined){return this.fixedAncestryCache[b.id]}if(a=="body"||a=="html"){if(b.id){this.fixedAncestryCache[b.id]=false}return false}else{if(YAHOO.util.Dom.getStyle(b,"position").toLowerCase()=="fixed"){if(b.id){this.fixedAncestryCache[b.id]=true}return true}else{return this.hasFixedAncestry(b.parentNode)}}}}})();IP.util.PeriodicalExecuter=function(b,a){this.callback=b;this.interval=a;this._currentlyExecuting=false;this.restart()};IP.util.PeriodicalExecuter.prototype={restart:function(){this.stop();this._timer=setInterval(this._timerEventHandler.bind(this),this.interval)},stop:function(){if(!this._timer){return}clearInterval(this._timer);this._timer=null},_timerEventHandler:function(){if(!this._currentlyExecuting){try{this._currentlyExecuting=true;this.callback(this)}finally{this._currentlyExecuting=false}}}};IP.util.Logger=function(){return{INFO:0,ERROR:1,DEBUG:2,_logArray:new Array(),_shouldSendLog:false,_log:function(d,b){var a=new Date();d=new String(d).replace(/\n/g,"<br/>");var c=[a,d,b];this._logArray.push(c);this._addLogEntryToLoggingPane(c)},logError:function(d,b,a){if(!a){console.error(d,b)}if(b){d="ERROR. "+d+" - "+b.name+": "+b.message+"; Location: "+b.fileName+" at line "+b.lineNumber}var c=this._getStackTraceText(b);d+="<br/><b>Stack trace:</b><br/>"+c;this._log(d,IP.util.Logger.ERROR);this._shouldSendLog=true},logInfo:function(a){console.info(a);this._log(a,IP.util.Logger.INFO)},logDebug:function(b,a){this._log(b,IP.util.Logger.DEBUG);this._shouldSendLog=this._shouldSendLog||a},_getStackTraceText:function(b){var d=IP.util.Logger.logError;var g=IP.Util.stackTrace(d,b);var j="";var c=g.length;for(var e=0;e<c;e++){var h=g[e];var f=h[0];var a=h[1];j+="<b><i>"+f+"</i></b>: "+a.escapeHTML()+"<br>"}return j},shouldSendLog:function(){return this._shouldSendLog},getDataPackage:function(){var d=new Array();var b=this._logArray.length;for(var c=0;c<b;c++){var e=this._logArray[c];var f=e[0]+", "+e[1];var a=this.getEntryColor(e);if(a){f="<font color='"+a+"'>"+f+"</font>"}d.push(f)}return d},getEntryColor:function(c){var b=c[2];var a=null;if(b==IP.util.Logger.ERROR){a="red"}else{if(b==IP.util.Logger.DEBUG){a="green"}}return a},showLogWindow:function(){var a=function(){for(var b=0;b<this._logArray.length;b++){this._addLogEntryToLoggingPane(this._logArray[b])}};this.loggingPane=window.open("log.html","","width=800,height=300,location=no,menubar=no,resizable=yes,scrollbars=yes,titlebar=no,toolbar=no,status=no",false);$E.on(this.loggingPane,"load",a,this,true)},_addLogEntryToLoggingPane:function(g){if(this.loggingPane){var b=["black","red","green"];var c=g[0];var h=g[1];var e=g[2];var d=this.loggingPane.document.getElementById("messages");var f=this.loggingPane.document.createElement("li");f.innerHTML="<b>"+c+":</b> "+h;f.style.color=b[e];var a=this.getEntryColor(g);if(a){f.style.color=a}d.appendChild(f)}}}}();IP.util.BinarySort={insert:function(d,c,a){var b=IP.util.BinarySort.search(d,c,a);if(b<0){d.splice(Math.abs(b)-1,0,c)}else{d.splice(b,0,c)}},search:function(f,d,a){a=a||IP.util.BinarySort.defaultComparator;var e=-1;var c=f.length;var b;while(c-e>1){b=(e+c)>>>1;if(a.call(this,d,f[b])>0){e=b}else{c=b}}if(f[c]!=d){return -(c+1)}return c},defaultComparator:function(d,c){if(d<c){return -1}else{if(d>c){return 1}else{return 0}}}};IP.util.SortedSet=function(a){this._init(a)};IP.util.SortedSet.prototype={_data:null,_sortedData:null,_init:function(b){this._data={};this._sortedData=new Array();if(b&&b.length>0){var c=b.length;for(var a=0;a<=c;a++){this.add(b[a])}}},toString:function(){var a="SortedSet: {";a+=" size: "+this.size();a+=" }";return a},add:function(a){if(this.idInUse(a.getSetItemId())){throw new Error("Duplicate id violation when adding item with id: "+a.getSetItemId()+".")}this._data[a.getSetItemId()]=a;IP.util.BinarySort.insert(this._sortedData,a,this._sortingFunction)},idInUse:function(a){return this.getItemById(a)!==undefined},remove:function(a){return this.removeItemById(a.getSetItemId())},removeItemById:function(b){var a=this._data[b];if(a){this._sortedData.remove(a);delete this._data[b]}return a},removeAll:function(){this._data={};this._sortedData=[]},replace:function(b,c){var a=this.indexOf(c);this._sortedData.splice(a,1,b);delete this._data[c.getSetItemId()];this._data[b.getSetItemId()]=b},getItemById:function(a){return this._data[a]},updateItemId:function(a,b){if(this.idInUse(a)){throw new Error("Duplicate id violation when updating item. Old id: "+b+", new id: "+a+".")}this._data[a]=this._data[b];delete this._data[b]},getItemByIndex:function(a){return this.getSortedData()[a]},indexOf:function(a){return this.getSortedData().indexOf(a)},firstItem:function(){return this.getItemByIndex(0)},lastItem:function(){return this.getItemByIndex(this.size()-1)},getSortedData:function(){return this._sortedData},size:function(){return this._sortedData.length},isEmpty:function(){return this.size()===0},_sortingFunction:function(d,c){if(parseInt(d.getSetItemId())<parseInt(c.getSetItemId())){return -1}if(parseInt(d.getSetItemId())>parseInt(c.getSetItemId())){return 1}if(parseInt(d.getSetItemId())==parseInt(c.getSetItemId())){return 0}},setSortingFunction:function(a){if(YAHOO.lang.isFunction(a)){this._sortingFunction=a;this.sort()}else{throw new Error("Not a valid function.")}},sort:function(){this._sortedData.sort(this._sortingFunction)}};IP.util.SetItem=function(a){this.id=a};IP.util.SetItem.prototype={id:null,getSetItemId:function(){var c=this.id;if(YAHOO.lang.isFunction(c)){if(!c.setItemId){var b=IP.Util.getCurrentTimestamp();var a=new String(Math.floor(Math.random()*100));c.setItemId=c.toString()+b+a.pad(3,"0",0)}c=c.setItemId}return c}};IP.util.FactorySet=function(a){IP.util.FactorySet.superclass.constructor.call(this,a)};YAHOO.lang.extend(IP.util.FactorySet,IP.util.SortedSet,{_init:function(a){this._nextId=1;IP.util.FactorySet.superclass._init.call(this,a);this._itemOrder=[];this.setSortingFunction(this.defaultSortingFunction.bind(this))},add:function(a){if(this.idInUse(a.getSetItemId())){throw new Error("Duplicate id violation when adding item with id: "+a.getSetItemId()+".")}this._itemOrder[this._itemOrder.length]=a.getSetItemId();IP.util.FactorySet.superclass.add.call(this,a);var b=a.getSetItemId();if(b>=this._nextId){this._nextId=b+1}},removeItemById:function(b){var a=IP.util.FactorySet.superclass.removeItemById.call(this,b);this._itemOrder.remove(b);return a},removeAll:function(){IP.util.FactorySet.superclass.removeAll.call(this);this._itemOrder=[];this._nextId=1},replace:function(b,c){var a=this._itemOrder.indexOf(c.getSetItemId());this._itemOrder.splice(a,1,b.getSetItemId());IP.util.FactorySet.superclass.replace.call(this,b,c)},updateItemId:function(b,c){IP.util.FactorySet.superclass.updateItemId.call(this,b,c);if(b>=this._nextId){this._nextId=b+1}var a=this._itemOrder.indexOf(c);if(a>-1){this._itemOrder.splice(a,1,b)}},setIndex:function(c,b){var d=c.getSetItemId();var a=this._itemOrder.indexOf(d);this._itemOrder.splice(a,1);this._itemOrder.splice(b,0,d);this._sortedData.splice(a,1);this._sortedData.splice(b,0,c)},getNextId:function(){return this._nextId},setNextId:function(a){if(YAHOO.lang.isNumber(a)){this._nextId=a}},defaultSortingFunction:function(d,c){var b=this._itemOrder.indexOf(d.getSetItemId());var a=this._itemOrder.indexOf(c.getSetItemId());return(IP.util.BinarySort.defaultComparator(b,a))}});IP.util.Config=function(a){IP.util.Config.superclass.constructor.call(this,a)};YAHOO.extend(IP.util.Config,YAHOO.util.Config,{setProperty:function(b,c,a){var d=IP.util.Config.superclass.setProperty.call(this,b,c,a);if(!d){throw new Error('Error setting the "'+b+'" property with the value "'+c+'".')}},queuProperty:function(a,b){var c=IP.util.Config.superclass.queuProperty.call(this,a,b);if(!c){throw new Error('Error queuing the "'+a+'" property with the value "'+b+'".')}},applyConfig:function(d,f,c){var a={};if(c){for(prop in this.config){var e=this.config[prop];if(e&&e.validator){a[prop]=e.validator;delete e.validator}}}IP.util.Config.superclass.applyConfig.call(this,d,f);if(c&&a){for(prop in a){var b=a[prop];if(b){this.config[prop].validator=b}}}}});IP.util.ElementTemplate=function(a){this._init(a)};IP.util.ElementTemplate.prototype={_init:function(g){this._templateContainerTextareaElement=$(g);var h=this._templateContainerTextareaElement.value;this._templateStringArray=[];this._expressionIndexMap={};var a=0;var c=h.indexOf("{",a);var e=-1;while(c>-1){e=h.indexOf("}",c);var b=h.substring(a,c);var f=h.substring(c+1,e);this._templateStringArray.push(b);this._templateStringArray.push(null);this._expressionIndexMap[f]=this._templateStringArray.length-1;a=e+1;c=h.indexOf("{",a)}var d=h.substring(e+1);this._templateStringArray.push(d)},apply:function(c){for(var d in c){var b=this._expressionIndexMap[d];if(b>-1){this._templateStringArray[b]=c[d]}}var a=this._templateStringArray.join("");return a}};IP.util.PermissionManager=function(b,a){if(!b||!YAHOO.lang.isArray(b)){throw new TypeError("roles is not an array.")}this.config=a||{};this.createRolePermissions(b);this.initPermissions()};IP.util.PermissionManager.prototype={_rolePermissions:null,getRoles:function(){var a=[];for(var b in this._rolePermissions){a.push(b)}return a},createRolePermissions:function(c){this._rolePermissions={};var a=c.length;for(var b=0;b<a;b++){var e=c[b];if(!e){throw Error("The "+b+'th role is not valid: "'+e+'".')}var d={};this._rolePermissions[e]=d}},initPermissions:function(){},addActionPermissions:function(c,a){if(!c){throw new Error("action is not valid.")}if(!a){throw new Error("permissions is not valid.")}for(var d in this._rolePermissions){var b=a[d];if(YAHOO.lang.isUndefined(b)){b=false}if(!YAHOO.lang.isBoolean(b)){throw new TypeError('The permission for role "'+d+'" is not a boolean: "'+b+'".')}this._setRolePermission(d,c,b)}},_setRolePermission:function(d,c,b){var a=this._rolePermissions[d];a[c]=b},checkRolePermission:function(d,c){if(!d){throw new Error("role is not valid.")}if(!c){throw new Error("action is not valid.")}var b=this._rolePermissions[d];if(!b){throw new Error('There are no permissions information for role "'+d+'".')}var a=b[c];if(!YAHOO.lang.isBoolean(a)){throw new Error('Invalid permission for role "'+d+'" and action "'+c+'": '+a)}return a}};IP.util.KeyListenerManager={visibleModalExists:function(){return IP.widget.Panel.visibleModalExists()},add:function(a,f,b,d){var e=function(h,g){if(!this.visibleModalExists()){b.fn.call(b.scope,h,g)}};var c=new YAHOO.util.KeyListener(a,f,{fn:e,scope:this,correctScope:true},d);c.enable();return c}};IP.event.EventProvider=function(){};IP.event.EventProvider.prototype={_eventTypeListenerListsSets:null,initEventProvider:function(){this._eventTypeListenerListsSets={}},_getEventTypeListenerListsSet:function(a){var b=this._eventTypeListenerListsSets[a];if(!b){b=new IP.util.FactorySet();this._eventTypeListenerListsSets[a]=b}return b},_getEventListenerList:function(b,c){var d=this._getEventTypeListenerListsSet(b);var a=d.getItemById(c);if(!a){a=new IP.event.EventListenerList(c);d.add(a)}return a},add:function(c,a){if(!(a instanceof IP.event.EventListener)){throw new Error('eventListener is not of type "IP.event.EventListener"')}var b=this._getEventListenerList(c,a.getSetItemId());var d=b.listeners;d[d.length]=a},addListener:function(a,c,b){var d=new IP.event.EventListener(c,b);this.add(a,d)},removeListener:function(d,g,e){var c=this._getEventListenerList(d,g.setItemId);var h=c.listeners;var f=h.length;for(var b=0;b<f;b++){var a=h[b];if(e==a.scope){h.remove(a);break}}},fire:function(a){this._notifyListeners(a)},_notifyListeners:function(f){var g=this._getEventTypeListenerListsSet(f.type);var c=g.getSortedData();var a=c.length;if(a==1){this._notifyListListeners(f,c[0])}else{if(a>0){var b=c.concat();for(var e=0;(e<a)&&!f.isCanceled();e++){var d=b[e];this._notifyListListeners(f,d)}}}},_notifyListListeners:function(d,c){var g=c.listeners;var f=g.length;if(f==1){g[0].call(d)}else{if(f>0){var e=g.concat();for(var b=0;(b<f)&&!d.isCanceled();b++){var a=e[b];a.call(d)}}}},fireEvent:function(c,a,b){this.fire(new IP.event.Event(c,a,b))},removeAllListeners:function(){delete this._eventTypeListenerListsSets;this._eventTypeListenerListsSets={}}};IP.event.BubblingEventProvider=function(){IP.event.BubblingEventProvider.superclass.constructor.call(this)};YAHOO.lang.extend(IP.event.BubblingEventProvider,IP.event.EventProvider,{_bubblingParent:null,initBubblingEventProvider:function(a){this.initEventProvider.call(this);if(a){this.setBubblingParent(a)}},setBubblingParent:function(a){if(YAHOO.lang.isObject(a)||a===null){this._bubblingParent=a}else{throw new Error("Provided parent is not an object or null.")}},_notifyListeners:function(a){IP.event.BubblingEventProvider.superclass._notifyListeners.call(this,a);if(!a.isCanceled()&&this._bubblingParent!==null){this._bubblingParent.fire(a)}}});IP.event.EventListener=function(b,a){if(!b){throw new Error("The callback is not specified.")}else{if(!a){throw new Error("The scope is not specified.")}}this.callback=b;this.scope=a;IP.event.EventListener.superclass.constructor.call(this,this.callback)};YAHOO.lang.extend(IP.event.EventListener,IP.util.SetItem,{call:function(a){if(this.scope){return this.callback.call(this.scope,a)}else{return this.callback(a)}}});IP.event.Event=function(c,a,b){this.target=c;this.type=a;this.data=b;this._isCanceled=false};IP.event.Event.prototype={cancel:function(){this._isCanceled=true},isCanceled:function(){return this._isCanceled}};IP.event.EventListenerList=function(a){this.id=a;this.listeners=[]};YAHOO.lang.augment(IP.event.EventListenerList,IP.util.SetItem);YAHOO.util.DragDrop.prototype.constrainTo=function(b){var c=YAHOO.util.Dom.getRegion(b);var a=YAHOO.util.Dom.getRegion(this.getEl());this.resetConstraints();this.setXConstraint(a.left-c.left,c.right-a.right);this.setYConstraint(a.top-c.top,c.bottom-a.bottom)};YAHOO.util.DD.prototype.autoScrollOld=YAHOO.util.DD.prototype.autoScroll;YAHOO.util.DD.prototype.autoScroll=function(a,e,d,b){var c=this.getEl();if(!YAHOO.util.DragDropMgr.hasFixedAncestry(c)){YAHOO.util.DD.prototype.autoScrollOld.call(this,a,e,d,b)}};YAHOO.util.DragDropMgr.fixedAncestryCache=[];YAHOO.util.DragDropMgr.hasFixedAncestry=function(b){if(!b||(b.nodeType==11)){return false}var a=(b.tagName?b.tagName.toLowerCase():b.nodeName.toLowerCase());if(b.id&&this.fixedAncestryCache[b.id]!=undefined){return this.fixedAncestryCache[b.id]}if(a=="body"||a=="html"){if(b.id){this.fixedAncestryCache[b.id]=false}return false}else{var c=YAHOO.util.Dom.getStyle(b,"position");if(c&&c.toLowerCase()=="fixed"){if(b.id){this.fixedAncestryCache[b.id]=true}return true}else{return this.hasFixedAncestry(b.parentNode)}}};YAHOO.util.DragDropMgr.getLocationOld=YAHOO.util.DragDropMgr.getLocation;YAHOO.util.DragDropMgr.getLocation=function(a){var b=YAHOO.util.DragDropMgr.getLocationOld.call(this,a);if(this.hasFixedAncestry(a.getEl())){this.scrollLeft=$D.getDocumentScrollLeft();this.scrollTop=$D.getDocumentScrollTop();b.left+=this.scrollLeft;b.right+=this.scrollLeft;b.top+=this.scrollTop;b.bottom+=this.scrollTop}return b};YAHOO.util.DragDropMgr.startDragOld=YAHOO.util.DragDropMgr.startDrag;YAHOO.util.DragDropMgr.startDrag=function(a,e){YAHOO.util.DragDropMgr.startDragOld.call(this,a,e);if(this.dragCurrent){var b=this.dragCurrent.getEl();if(this.hasFixedAncestry(b)){if(this.dragCurrent.minX||this.dragCurrent.maxX){var d=$D.getDocumentScrollLeft();if(this.dragCurrent.minX&&(this.dragCurrent.minX>d)){this.dragCurrent.minX-=d}if(this.dragCurrent.maxX&&(this.dragCurrent.maxX>d)){this.dragCurrent.maxX-=d}}if(this.dragCurrent.minY||this.dragCurrent.maxY){var c=$D.getDocumentScrollTop();if(this.dragCurrent.minY&&(this.dragCurrent.minY>c)){this.dragCurrent.minY-=c}if(this.dragCurrent.maxY&&(this.dragCurrent.maxY>c)){this.dragCurrent.maxY-=c}}}}};IP.util.Resize=function(e,d,a,c,b){if(e){this.init(e,a,b);this._constrainToElement=b.constrainToElement;d=d||{};if(d.se){this.handleSEId=d.se;this.setHandleElId(this.handleSEId);$E.addListener(this.handleSEId,"mousedown",this._setCurrentDragHandle,this,true)}if(d.sw){this.handleSWId=d.sw;this.setHandleElId(this.handleSWId);$E.addListener(this.handleSWId,"mousedown",this._setCurrentDragHandle,this,true)}this._heightRestriction=c}};YAHOO.extend(IP.util.Resize,YAHOO.util.DragDrop);IP.util.Resize.prototype.onMouseDown=function(b){var a=this.getEl();this.startLeft=parseInt(a.style.left);this.startWidth=parseInt(a.style.width||a.offsetWidth);this.startHeight=parseInt(a.style.height||a.offsetHeight);this.startPos=[YAHOO.util.Event.getPageX(b),YAHOO.util.Event.getPageY(b)]};IP.util.Resize.prototype.onDrag=function(h){var d=[YAHOO.util.Event.getPageX(h),YAHOO.util.Event.getPageY(h)];var a=d[0]-this.startPos[0];var j=d[1]-this.startPos[1];var c=this.getEl();var g,b;if(this._currentDragHandle==this.handleSWId){g=Math.max(this.startWidth-a,10);b=Math.max(this.startHeight+j,10);c.style.height=(this._heightRestriction?this._heightRestriction:b)+"px";if(this.startWidth-a>10){c.style.left=Math.max(this.startLeft+a,10)+"px";if(parseInt(c.style.left)!=10){c.style.width=g+"px"}}}else{if(this._currentDragHandle==this.handleSEId){g=Math.max(this.startWidth+a,10);b=Math.max(this.startHeight+j,10);var f=this._constrainToElement.offsetWidth-20-parseInt(c.style.left);if(g<f){c.style.width=g+"px"}c.style.height=(this._heightRestriction?this._heightRestriction:b)+"px"}}};IP.util.Resize.prototype._setCurrentDragHandle=function(a){this._currentDragHandle=$E.getTarget(a)};IP.util.UserPreferences=function(a){this._init(a)};IP.util.UserPreferences.TYPE="user_preferences";IP.util.UserPreferences.prototype={type:IP.util.UserPreferences.TYPE,_generalPreferences:null,_showingRubricBuilderWelcomePage:null,_init:function(a){if(a){this._loadData(a)}},_loadData:function(a){this._generalPreferences=a.general||{}},generateDataPackage:function(){var a={};a.type=this.type;a.general=this._generalPreferences;return a},get:function(a){return this._generalPreferences[a]},set:function(b,c){var a=this.get(b);if(c!=a){this._generalPreferences[b]=c}}};IP.widget.Widget=function(b,a){this.init(b,a)};IP.widget.Widget.fetchElement=function(c,b,a){var d;if(YAHOO.lang.isString(c)){d=c;c=$(d)}if(!c){c=IP.widget.Widget.createFromTemplate(b,a);if(d){c.id=d}}return c};IP.widget.Widget.createFromTemplate=function(c,a){a=a||"element";var b=c[a];var e=null;if(b){var d=$(b);if(d){e=d.cloneNode(true);e.id=""}else{throw new Error("The template ID "+b+" cannot be found.")}}return e};IP.widget.Widget.prototype={id:null,element:null,init:function(b,a){b=IP.widget.Widget.fetchElement(b,this._templateIds);this.element=b;if(b.id){this.id=b.id}this._locateElements();this._initEvents()},render:function(b,a){if(b){if(typeof b=="string"){b=$(b)}if(b){if(a){b.insertBefore(this.element,$(a))}else{b.appendChild(this.element)}}}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false}}return true},show:function(){Element.show(this.element)},hide:function(){Element.hide(this.element)},isVisible:function(){return Element.isVisible(this.element)},_locateElements:function(){},_initEvents:function(){},_createFromTemplate:function(a){var b=IP.widget.Widget.createFromTemplate(this._templateIds,a);return b},destroy:function(){var a;if(this.element){$E.purgeElement(this.element,true);a=this.element.parentNode}if(a){Element.remove(this.element)}this.element=null}};IP.widget.Panel=function(b,a){a=a||{};a.dragOnly=a.dragOnly===undefined?true:a.dragOnly;IP.widget.Panel.superclass.constructor.call(this,b,a)};IP.widget.Panel.visibleModals=[];IP.widget.Panel.visibleModalExists=function(){if(IP.widget.Panel.visibleModals.length>0){return true}return false};YAHOO.extend(IP.widget.Panel,YAHOO.widget.Panel,{configVisible:function(d,a,f){IP.widget.Panel.superclass.configVisible.call(this,d,a,f);var g=a[0];var e=false;var c=IP.widget.Panel.visibleModals;var b=c.length;if(this.cfg.getProperty("modal")){if(g){if(c.indexOf(this)==-1){c[c.length]=this}}else{c.remove(this)}}if(this._hasBeenVisible){if(g){Element.show(this.element)}else{Element.hide(this.element)}}this._hasBeenVisible=this._hasBeenVisible||g},buildMask:function(){IP.widget.Panel.superclass.buildMask.call(this);var b=this.cfg.getProperty("zIndex");if(b&&(b>0)){$D.setStyle(this.mask,"zIndex",(b-1))}var a=IP.Util.getMouseWheelEventName();$E.addListener(this.mask,a,this._mouseWheelHandler,this,true)},removeMask:function(){var a=IP.Util.getMouseWheelEventName();$E.removeListener(this.mask,a,this._mouseWheelHandler);IP.widget.Panel.superclass.removeMask.call(this)},_mouseWheelHandler:function(a){$E.stopEvent(a)}});IP.widget.MenuBar=function(b,a){IP.widget.MenuBar.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.MenuBar,YAHOO.widget.MenuBar,{init:function(b,a){this.ITEM_TYPE=IP.widget.MenuBarItem;IP.widget.MenuBar.superclass.init.call(this,b,a)},hasFixedAncestry:function(){if(this._hasFixedAncestry===undefined){this._hasFixedAncestry=IP.Util.hasFixedAncestry(this.element)}return !!this._hasFixedAncestry}});IP.widget.MenuBarItem=function(b,a){IP.widget.MenuBarItem.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.MenuBarItem,YAHOO.widget.MenuBarItem,{init:function(b,a){this.SUBMENU_TYPE=IP.widget.Menu;IP.widget.MenuBarItem.superclass.init.call(this,b,a)}});IP.widget.Menu=function(b,a){IP.widget.Menu.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.Menu,YAHOO.widget.Menu,{init:function(b,a){this.ITEM_TYPE=IP.widget.MenuItem;IP.widget.Menu.superclass.init.call(this,b,a)},configVisible:function(b,a,c){var d=a[0];if(d){Element.show(this.element);IP.widget.Menu.superclass.configVisible.call(this,b,a,c)}else{IP.widget.Menu.superclass.configVisible.call(this,b,a,c);IP.Util.deferExecution(function(){Element.hide(this.element)}.bind(this))}},_getOffsetWidth:function(){var a=Element.isVisible(this.element);if(!a){Element.show(this.element)}var b=IP.widget.Menu.superclass._getOffsetWidth.call(this);if(!a){Element.hide(this.element)}return b},align:function(b,a){var c=Element.isVisible(this.element);if(!c){Element.show(this.element)}IP.widget.Menu.superclass.align.call(this,b,a);if(!c){Element.hide(this.element)}},getItemByHandle:function(f){f="_"+f;var h=null;var a=this.getItems();var g=a.length;for(var c=0;c<g;c++){var e=a[c];var b=e.element;var d=b.getAttribute("class");if($D.hasClass(b,f)){h=e;break}}return h},_hasFixedAncestry:function(){if(this._hasFixedAncestry===undefined){if(this.parent&&(this.parent.parent instanceof IP.widget.MenuBar)&&this.parent.parent.hasFixedAncestry()){this._hasFixedAncestry=true}else{if((this.parentButton instanceof IP.widget.SelectionButton)&&this.parentButton.hasFixedAncestry()){this._hasFixedAncestry=true}}}return !!this._hasFixedAncestry},getConstrainedXY:function(m,k){if(this._hasFixedAncestry()){var d=YAHOO.widget.Overlay.VIEWPORT_OFFSET,l=$D.getViewportWidth(),f=$D.getViewportHeight(),c=this.element.offsetHeight,j=this.element.offsetWidth;var g=m;var b=k;if(j+d<l){var h=d;var n=l-j-d;if(m<h){g=h}else{if(m>n){g=n}}}else{g=d}if(c+d<f){var e=d;var a=f-c-d;if(k<e){b=e}else{if(k>a){b=a}}}else{b=d}return[g,b]}else{return IP.widget.Menu.superclass.getConstrainedXY.call(this,m,k)}},_onBeforeShow:function(b,a){this._isInOnBeforeShow=true;IP.widget.Menu.superclass._onBeforeShow.call(this,b,a);this._isInOnBeforeShow=false},configMaxHeight:function(d,c,h){var e=c[0];if(this._isInOnBeforeShow&&(e!==0)&&this.parent&&this.parent.parent instanceof IP.widget.MenuBar&&this.parent.parent.hasFixedAncestry()){var b=this.parent.element;var f=b.offsetHeight+b.offsetTop;var g=$D.getViewportHeight()-f;if(this.element.offsetHeight>=g){var a=(g-(YAHOO.widget.Overlay.VIEWPORT_OFFSET*2));if(a>e){c[0]=a}}else{return}}IP.widget.Menu.superclass.configMaxHeight.call(this,d,c,h)},_onClick:function(c,a){IP.widget.Menu.superclass._onClick.call(this,c,a);var b=a[1];if(b&&b.cfg.getProperty("disabled")){var d=b.parent;d.hide()}}});IP.widget.MenuItem=function(b,a){IP.widget.MenuItem.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.MenuItem,YAHOO.widget.MenuItem,{configOnClick:function(d,c,e){var a=c[0];if(this._onClickObject&&(this._onClickObject!=a)){this.clickEvent.unsubscribe(this._onClickObject.wrappedFunction,this._onClickObject.obj);this._onClickObject=null}if(!this._onClickObject&&a&&YAHOO.lang.isFunction(a.fn)){var b=a.obj||this;var f=function(j,h,k){var g=function(){a.fn.call(this,j,h,k)};IP.Util.deferExecution(g.bind(this))};this.clickEvent.subscribe(f,b,a.scope);this._onClickObject=a;this._onClickObject.obj=b;this._onClickObject.wrappedFunction=f}}});IP.widget.Button=function(b,a){IP.widget.Button.superclass.constructor.apply(this,arguments)};YAHOO.lang.extend(IP.widget.Button,YAHOO.widget.Button,{_showMenu:function(a){IP.widget.Button.superclass._showMenu.call(this,a);this._menu.align("tl","bl")},isClickOnSplitButtonMenuArea:function(b){var d=false;var e=this.get("type");if(e=="split"){var c=this.get("element");var a=$E.getPageX(b)-$D.getX(c);if((c.offsetWidth-this.OPTION_AREA_WIDTH)<a){d=true}}return d}});IP.widget.ApplicationHeader=function(a,b){b=b||{};IP.widget.ApplicationHeader.superclass.constructor.call(this,a,b)};YAHOO.extend(IP.widget.ApplicationHeader,IP.widget.Widget,{_templateIds:{element:"template_application_header"}});IP.widget.ApplicationHeader.prototype.init=function(a,b){IP.widget.ApplicationHeader.superclass.init.call(this,a,b);this.headerResizeEvent=new YAHOO.util.CustomEvent("headerResize");this.maxMinButton=new IP.widget.Button({id:"header_max_min_button",type:"button",title:"Minimize",container:this.buttonContainerElement,onclick:{fn:this._maxMinButtonClicked.bind(this)}});if(b.title){this.changeTitle(b.title)}this.maximize()};IP.widget.ApplicationHeader.prototype._locateElements=function(){this.topElement=document.getElementByHandle("header_top",this.element,"div");this.mastheadElement=document.getElementByHandle("header_masthead",this.element,"div");this.noticeElement=document.getElementByHandle("header_notice",this.element,"div");this.mainToolbarElement=document.getElementByHandle("header_main_toolbar",this.element,"div");this.buttonContainerElement=document.getElementByHandle("header_buttons",this.element,"div");this.topTextElement=document.getElementByHandle("header_top_text",this.topElement,"h1")};IP.widget.ApplicationHeader.prototype.render=function(b,a){IP.widget.ApplicationHeader.superclass.render.call(this,b,a);this.fireHeaderResizeEvent()};IP.widget.ApplicationHeader.prototype.changeTitle=function(a){this.topTextElement.innerHTML=a};IP.widget.ApplicationHeader.prototype.minimize=function(){if(this.maxMinButton.hasClass("minimize")){this.maxMinButton.replaceClass("minimize","maximize")}else{this.maxMinButton.addClass("maximize")}this.mastheadElement.style.display="none";this.maxMinButton.set("title","Maximize");this.fireHeaderResizeEvent()};IP.widget.ApplicationHeader.prototype.maximize=function(){if(this.maxMinButton.hasClass("maximize")){this.maxMinButton.replaceClass("maximize","minimize")}else{this.maxMinButton.addClass("minimize")}this.mastheadElement.style.display="block";this.maxMinButton.set("title","Minimize");this.fireHeaderResizeEvent()};IP.widget.ApplicationHeader.prototype.fireHeaderResizeEvent=function(){var a=this.element.offsetHeight;this.headerResizeEvent.fire({height:a})};IP.widget.ApplicationHeader.prototype._maxMinButtonClicked=function(b){var a=this.mastheadElement.style.display;if(a=="block"){this.minimize()}else{if(a=="none"){this.maximize()}}};IP.widget.ContentPanel=function(b,a){a=a||{};if(arguments.length==1&&!YAHOO.lang.isString(b)&&!b.nodeName){a=b;b=a.element||null}IP.widget.ContentPanel.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.ContentPanel,YAHOO.widget.TabView,{_templateIds:{element:"template_content_panel"}});IP.widget.ContentPanel.prototype.CLASSNAME="yui-navset yui-navset-top";IP.widget.ContentPanel.prototype.panelVisibilityChangeEvent=new YAHOO.util.CustomEvent("panelVisibilityChange");IP.widget.ContentPanel.prototype.beforeHidePanelEvent=new YAHOO.util.CustomEvent("beforeHidePanel");IP.widget.ContentPanel.prototype.contentParent=function(){return this._contentParent};IP.widget.ContentPanel.prototype.tabParent=function(){return this._tabParent};IP.widget.ContentPanel.prototype.init=function(b,a){b=IP.widget.Widget.fetchElement(b,this._templateIds);IP.widget.ContentPanel.superclass.init.call(this,b,a);this.element=b;if(a.content_height){this.changeContentHeight(a.content_height)}this.closeButton=new IP.widget.Button(document.getElementByHandle("close_button",this.element,"span"),{type:"button",title:"Close",label:"Close",onclick:{fn:this.hide.bind(this)}})};IP.widget.ContentPanel.prototype._closeButtonClickHandler=function(){this.hide.bind(this);this.changeContentHeight(0)};IP.widget.ContentPanel.prototype.hide=function(c,a){var b=true;if(!a){b=this.beforeHidePanelEvent.fire()}if(b){this.element.style.display="none";this.panelVisibilityChangeEvent.fire("hide")}};IP.widget.ContentPanel.prototype.show=function(){var a=this.get("element");a.style.display="block";this.panelVisibilityChangeEvent.fire("show")};IP.widget.ContentPanel.prototype.isVisible=function(){return(this.get("element").style.display=="block")};IP.widget.ContentPanel.prototype.changeContentHeight=function(a){this._contentParent.style.height=a+"px"};IP.widget.ContentPanel.prototype.render=function(a){if(a){a.appendChild(this.element)}else{document.body.appendChild(this.element)}};IP.widget.StatusToolbar=function(b,a){a=a||{};if(arguments.length==1&&!YAHOO.lang.isString(b)&&!b.nodeName){a=b;b=a.element||null}IP.widget.StatusToolbar.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.StatusToolbar,YAHOO.util.Element,{_templateIds:{element:"template_status_bar",status_button:"template_status_button",status_message:"template_status_message"}});IP.widget.StatusToolbar.ALERT_MESSAGE_INDEX=0;IP.widget.StatusToolbar.SAVING_MESSAGE_INDEX=1;IP.widget.StatusToolbar.STATUS_MESSAGE_INDEX=2;IP.widget.StatusToolbar.STATUS_LABEL="Status: ";IP.widget.StatusToolbar.prototype.init=function(b,h){b=IP.widget.Widget.fetchElement(b,this._templateIds);IP.widget.StatusToolbar.superclass.init.call(this,b,h);this.element=this.get("element");this.statusLabelElement=document.getElementByHandle("status_bar_label",this.element,"h2");this.buttonContainerEl=document.getElementByHandle("button_container",this.element,"div");this.buttons=[];var k=this.buttonContainerEl.childNodes;var j=k.length;if(j>0){for(i=0;i<j;i++){var c=k[i].tagName;if(c&&k[i].tagName.toUpperCase()=="SPAN"){var g=k[i].id;var d=k[i].getAttribute("title")||g;this.addButton(g,{label:d})}}}this.buttonClickEvent=new YAHOO.util.CustomEvent("onStatusToolbarButtonClick");var a=document.getElementByHandle("alert_message",this.element,"span");var f=document.getElementByHandle("saving_message",this.element,"span");var e=document.getElementByHandle("status_message",this.element,"span");this.status=[a,f,e];this.activeMessageIndex=IP.widget.StatusToolbar.STATUS_MESSAGE_INDEX;this.showStatusMessage()};IP.widget.StatusToolbar.prototype.addButton=function(c,a){a=a||{};if(!$(c)){c=IP.widget.Widget.fetchElement(c,this._templateIds,"status_button");this.buttonContainerEl.appendChild(c)}var b=function(e){this.buttonClickEvent.fire(d)};a.onclick={fn:b.bind(this)};var d=new IP.widget.Button(c,a);this.buttons.push(d)};IP.widget.StatusToolbar.prototype.removeButton=function(a){this.buttons[a].destroy()};IP.widget.StatusToolbar.prototype.addStatusMessage=function(d,c,b){var a=IP.widget.Widget.fetchElement("status_message"+this.status.length,this._templateIds,"status_message");a.innerHTML=d;this.status.push(a);this.insertBefore(a,this.buttonContainerEl);if(c){this.statusLabelElement.innerHTML=IP.widget.StatusToolbar.STATUS_LABEL;this.showStatusMessage(this.status.length-1,b)}return this.status.indexOf(a)};IP.widget.StatusToolbar.prototype.showStatusMessage=function(b,c,a){b=(b>=0)?b:this.activeMessageIndex;if(this.activeMessageIndex>=0){this.hideStatusMessage(this.activeMessageIndex)}var e=this.status[b];e.style.display="block";this.activeMessageIndex=b;if(c){var d=this;if(!a||(typeof(a)!=="function")){a=function(){d.hideStatusMessage(b)}}setTimeout(a,c*1000)}};IP.widget.StatusToolbar.prototype.hideStatusMessage=function(a){var b=this.status[a];if(b&&b.style.display!="none"){b.style.display="none"}if(this.activeMessageIndex==a){this.activeMessageIndex=null}};IP.widget.StatusToolbar.prototype.render=function(a){if(a){a.appendChild(this.element)}else{document.body.appendChild(this.element)}};IP.widget.StatusToolbar.prototype.showAlertMessage=function(){this.statusLabelElement.innerHTML=IP.widget.StatusToolbar.STATUS_LABEL;this.showStatusMessage(IP.widget.StatusToolbar.ALERT_MESSAGE_INDEX)};IP.widget.StatusToolbar.prototype.showSavingMessage=function(){this.statusLabelElement.innerHTML=IP.widget.StatusToolbar.STATUS_LABEL;this.showStatusMessage(IP.widget.StatusToolbar.SAVING_MESSAGE_INDEX)};IP.widget.StatusToolbar.prototype.updateStatusMessage=function(a,d,c,e){var b=this.status[IP.widget.StatusToolbar.STATUS_MESSAGE_INDEX];b.innerHTML=a;if(e){this.statusLabelElement.innerHTML=e}if(d){this.showStatusMessage(IP.widget.StatusToolbar.STATUS_MESSAGE_INDEX,c)}};IP.widget.ApplicationFooter=function(a,b){b=b||{};IP.widget.ApplicationFooter.superclass.constructor.call(this,a,b)};YAHOO.extend(IP.widget.ApplicationFooter,IP.widget.Widget,{_templateIds:{element:"template_application_footer"}});IP.widget.ApplicationFooter.prototype.CONTENT_PANEL_DEFAULT_HEIGHT=168;IP.widget.ApplicationFooter.prototype.FOOTER_DEFAULT_HEIGHT=202;IP.widget.ApplicationFooter.prototype.init=function(a,b){IP.widget.ApplicationFooter.superclass.init.call(this,a,b);if(!this._dragHandleElement.id){this._dragHandleElement.id=$D.generateId(null,"application_footer_drag_handle_")}this.resizer=new YAHOO.util.Resize("content_panel",{proxy:true,handles:["t"],hiddenHandles:true,minHeight:this.FOOTER_DEFAULT_HEIGHT});this.resizeEvent=new YAHOO.util.CustomEvent("resize");this.resizer.subscribe("resize",this._resizerResizeHandler.bind(this));this.contentPanel=new IP.widget.ContentPanel("content_panel",{containerEl:this._contentElement,content_height:this.CONTENT_PANEL_DEFAULT_HEIGHT});this.statusToolbar=new IP.widget.StatusToolbar("status_toolbar",{containerEl:this.element});this._contentPanelYPadding=IP.widget.ApplicationFooter.prototype.FOOTER_DEFAULT_HEIGHT-IP.widget.ApplicationFooter.prototype.CONTENT_PANEL_DEFAULT_HEIGHT;this.statusToolbar.buttonClickEvent.subscribe(this._statusToolbarButtonClickHandler.bind(this));this.contentPanel.closeButton.addListener("click",this._contentPanelCloseHandler,this,this);this.contentPanel.hide();this._contentPanelCloseHandler()};IP.widget.ApplicationFooter.prototype._resizerResizeHandler=function(a){var b=a.height-this.startingHeight;this.startingHeight=a.height;this.contentPanel.changeContentHeight(parseInt(this.contentPanel.contentParent().style.height)+b);this.resizeEvent.fire({height:a.height,offsetY:b})};IP.widget.ApplicationFooter.prototype._locateElements=function(){this._contentElement=document.getElementByHandle("content_element",this.element,"div");this._dragHandleElement=document.getElementByHandle("drag_handle",this._contentElement,"div")};IP.widget.ApplicationFooter.prototype.addPanel=function(a){var b=new YAHOO.widget.Tab(a);this.contentPanel.addTab(b);this.statusToolbar.addButton(a.label,{label:a.label,className:a.statusButtonClassName})};IP.widget.ApplicationFooter.prototype.render=function(a){if(this.contentPanel.parentNode!=this._contentElement){this.contentPanel.render(this._contentElement)}if(this._contentElement.parentNode!=this.element){this.element.appendChild(this._contentElement)}if(this.statusToolbar.parentNode!=this.element){this.statusToolbar.render(this.element)}if(a){a.appendChild(this.element)}this._fireResizeEvent()};IP.widget.ApplicationFooter.prototype._statusToolbarButtonClickHandler=function(c,a){var b=a[0];var d=this.statusToolbar.buttons.indexOf(b);this._openContentPanel(d)};IP.widget.ApplicationFooter.prototype._openContentPanel=function(a){this.contentPanel.set("activeIndex",a);this.contentPanel.show();this._dragHandleElement.style.display="block";if(!this.startingHeight){this.startingHeight=this.FOOTER_DEFAULT_HEIGHT}else{this.startingHeight=this.resizer.height}this._fireResizeEvent()};IP.widget.ApplicationFooter.prototype._contentPanelCloseHandler=function(){this._dragHandleElement.style.display="none";this._fireResizeEvent()};IP.widget.ApplicationFooter.prototype._fireResizeEvent=function(){var a=this.element.offsetHeight||0;if(a===0){a=(this.contentPanel.element.offsetHeight||0)+(this.statusToolbar.element.offsetHeight||0)+(this._dragHandleElement.offsetHeight||0)}this.resizeEvent.fire({height:a})};IP.widget.ApplicationFooter.prototype.removePanel=function(a){this.contentPanel.removeTab(this.contentPanel.getTab(a));this.statusToolbar.removeButton(a);this.contentPanel.hide()};IP.widget.ApplicationLayout=function(a){IP.widget.ApplicationLayout.superclass.constructor.call(this,a)};YAHOO.lang.extend(IP.widget.ApplicationLayout,IP.widget.Widget,{_templateIds:{applicationLayoutHd:"template_application_layout_hd",applicationLayoutWrapper:"template_application_layout_wrapper",applicationLayoutFt:"template_application_layout_ft"},_paddingTop:0,_paddingBottom:0});IP.widget.ApplicationLayout.prototype.init=function(b,a){IP.widget.ApplicationLayout.superclass.init.call(this,document.body);this.headerElement=IP.widget.Widget.fetchElement("application_layout_hd",this._templateIds,"applicationLayoutHd");this.wrapperElement=IP.widget.Widget.fetchElement("application_layout_wrapper",this._templateIds,"applicationLayoutWrapper");this.footerElement=IP.widget.Widget.fetchElement("application_layout_ft",this._templateIds,"applicationLayoutFt");this.bodyContentElement=document.getElementByHandle("application_layout_bd",this.wrapperElement,"div");$E.addListener(window,"resize",this._onWindowResize,this,true);this.renderEvent=new YAHOO.util.CustomEvent("onRender",this)};IP.widget.ApplicationLayout.prototype.render=function(a){if(a){a.appendChild(this.headerElement);a.appendChild(this.wrapperElement);a.appendChild(this.footerElement)}this.renderEvent.fire()};IP.widget.ApplicationLayout.prototype.attachAppLayoutHeader=function(b,c,d){if(b.element){this.headerElement=b.element}else{this.headerElement=b}this.headerResizeEvent=c;c.subscribe(this._onHeaderResize,this,true);var a=d;if(!a){a=this._calculateOffsetHeight(this.headerElement)}this._setBodyPaddingTop(a)};IP.widget.ApplicationLayout.prototype.setBody=function(a){if(typeof a=="string"){this.bodyContentElement.innerHTML=a}else{this.bodyContentElement.innerHTML="";this.bodyContentElement.appendChild(a)}};IP.widget.ApplicationLayout.prototype.attachAppLayoutFooter=function(c,a,d){if(c.element){this.footerElement=c.element}else{this.footerElement=c}this.footerResizeEvent=a;a.subscribe(this._onFooterResize,this,true);var b=d;if(!b){b=this._calculateOffsetHeight(this.footerElement)}this._setBodyPaddingBottom(b)};IP.widget.ApplicationLayout.prototype.destroy=function(){if(this.footerResizeEvent){this.footerResizeEvent.unsubscribe()}if(this.headerResizeEvent){this.headerResizeEvent.unsubscribe()}IP.widget.ApplicationLayout.superclass.destroy.call(this)};IP.widget.ApplicationLayout.prototype._onWindowResize=function(c){$E.stopPropagation(c);var a=this._calculateOffsetHeight(this.headerElement);this._setBodyPaddingTop(a);var b=this._calculateOffsetHeight(this.footerElement);this._setBodyPaddingBottom(b)};IP.widget.ApplicationLayout.prototype._calculateOffsetHeight=function(d){var b=d.offsetHeight;if(!b){var e=d.childNodes;var a=e.length;for(var c=0;c<a;c++){b=b+e[c].offsetHeight}}return b};IP.widget.ApplicationLayout.prototype._onHeaderResize=function(b,a){$E.stopPropagation(b);this._setBodyPaddingTop(a[0].height)};IP.widget.ApplicationLayout.prototype._onFooterResize=function(b,a){$E.stopPropagation(b);this._setBodyPaddingBottom(a[0].height)};IP.widget.ApplicationLayout.prototype._setBodyPaddingTop=function(b){if(isNaN(b)){return}if(b==this._paddingTop){return}var a=b+"px";$D.setStyle(document.getElementById("application"),"padding-top",a);this._paddingTop=b};IP.widget.ApplicationLayout.prototype._setBodyPaddingBottom=function(b){if(isNaN(b)){return}if(b==this._paddingBottom){return}var a=b+"px";$D.setStyle(document.getElementById("application"),"padding-bottom",a);this._paddingBottom=b};IP.widget.ApplicationToolbar=function(b,a){IP.widget.ApplicationToolbar.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.ApplicationToolbar,IP.widget.Widget,{_templateIds:{element:"template_application_toolbar",separator:"template_application_toolbar_separator"},element:null,id:null,_menuBarElement:null,_itemsElement:null,_lastSeparator:null,menuBar:null,items:null});IP.widget.ApplicationToolbar.prototype.init=function(c,l){IP.widget.ApplicationToolbar.superclass.init.call(this,c);l=l||{};this.items=[];var d=l.menu||[];var f=d[0];var h=d[1];this.menuBar=new IP.widget.MenuBar(f,h);this.menuBar.render(this._menuBarElement);var k=this._itemsElement.childNodes;var o=k.length;for(var g=0;g<o;g++){var b=k[g];var m=this._createItemsFromElement(b);var a=m.length;for(var e=0;e<a;e++){var n=m[e];this.addItem(n)}}};IP.widget.ApplicationToolbar.prototype._locateElements=function(){this._menuBarElement=document.getElementByHandle("menu_container",this.element,"div");this._itemsElement=document.getElementByHandle("items",this.element,"div")};IP.widget.ApplicationToolbar.prototype._createItemsFromElement=function(g){var l=[];if(g&&g.tagName){var c=g.tagName.toUpperCase();var n=null;var a=null;var f=null;var h=null;if($D.hasClass(g,"selection_button")){a={id:g.id,title:g.title||g.value};f=this._getButtonMenuElement(g);a.menu=f;h=new IP.widget.SelectionButton(g,a);h.addClass(g.className);n=new IP.widget.ApplicationToolbarItem(h);l.push(n)}else{if($D.hasClass(g,YAHOO.widget.Button.prototype.CSS_CLASS_NAME)||((c=="INPUT")&&(g.type.toUpperCase()=="BUTTON"))){a={id:g.id,title:g.title||g.value};if($D.hasClass(g,"yui-menu-button")){a.type="menu";f=this._getButtonMenuElement(g);a.menu=f}h=new IP.widget.Button(g,a);h.addClass(g.className);n=new IP.widget.ApplicationToolbarItem(h);l.push(n)}else{if($D.hasClass(g,YAHOO.widget.ButtonGroup.prototype.CSS_CLASS_NAME)){var j=new YAHOO.widget.ButtonGroup(g);n=new IP.widget.ApplicationToolbarItem(j);l.push(n)}else{if(IP.widget.ApplicationToolbarItem.isValidElement(g)){n=new IP.widget.ApplicationToolbarItem(g);l.push(n)}else{if($D.hasClass(g,"container")){this._lastSeparator=g;var k=g.childNodes;var m=k.length;for(var e=0;e<m;e++){var b=k[e];var d=this._createItemsFromElement(b);l=l.concat(d)}}}}}}}return l};IP.widget.ApplicationToolbar.prototype._getButtonMenuElement=function(b){var a=b.nextSibling;while(a){if(a.tagName&&((a.tagName.toUpperCase()=="SELECT")||$D.hasClass(a,"yuimenu"))){break}else{a=a.nextSibling}}return a};IP.widget.ApplicationToolbar.prototype.getItems=function(){return this.items};IP.widget.ApplicationToolbar.prototype.getMenuBar=function(){return this.menuBar};IP.widget.ApplicationToolbar.prototype.addItem=function(a){if(!(a instanceof IP.widget.ApplicationToolbarItem)){throw new Error("Adding an object of invalid type.")}this.items.push(a);var b=this._lastSeparator||this._itemsElement;if(a.element.parentNode!=b){b.appendChild(document.createTextNode(" "));a.appendTo(b)}};IP.widget.ApplicationToolbar.prototype.insertItemBefore=function(b,c){if(!(b instanceof IP.widget.ApplicationToolbarItem)){throw new Error("Adding an object of invalid type.")}if(!(c instanceof IP.widget.ApplicationToolbarItem)){throw new Error("The reference toolbar item is not a valid object.")}var a=this.items.indexOf(c);this.items=this.items.insert(a,b);var e=c.element;var d=e.parentNode;if(b.element.parentNode!=d){d.insertBefore(document.createTextNode(" "),e);b.appendTo(d,e)}};IP.widget.ApplicationToolbar.prototype.addSeparator=function(){var a=this._createFromTemplate("separator");this._itemsElement.appendChild(a);this._lastSeparator=a};IP.widget.ApplicationToolbarItem=function(a){this.init(a)};IP.widget.ApplicationToolbarItem.isValidObject=function(a){var b=false;if((a instanceof YAHOO.widget.Button)||(a instanceof YAHOO.widget.ButtonGroup)||(IP.widget.ApplicationToolbarItem.isValidElement(a))){b=true}return b};IP.widget.ApplicationToolbarItem.isValidElement=function(a){var b=false;if(a&&a.tagName){switch(a.tagName.toUpperCase()){case"P":case"INPUT":case"A":case"LABEL":b=true;break;default:break}}return b};IP.widget.ApplicationToolbarItem.prototype={init:function(a){this.object=a;if(this.object&&IP.widget.ApplicationToolbarItem.isValidObject(this.object)){if(this.object.tagName){if(IP.widget.ApplicationToolbarItem.isValidElement(this.object)){this.element=this.object}else{throw new Error("Invalid object type specified.")}}else{this.element=this.object.get("element")}}else{throw new Error("No object specified.")}},appendTo:function(b,a){if(this.object.appendTo){this.object.appendTo(b,a)}else{if(a){b.insertBefore(this.element,a)}else{b.appendChild(this.element)}}}};IP.widget.SelectionButton=function(c,d){c=IP.widget.Widget.fetchElement(c,this._templateIds);$D.addClass(c,"selection_button");d=d||{};var k=d.menu;if(!d.menu){d.menu=new IP.widget.Menu()}else{var l=true;if(d.lazyloadmenu===false){l=false}var g=false;var b=d.menu;if(YAHOO.lang.isArray(d.menu)){if(d.menu.length==1){g=true}else{b=new IP.widget.Menu($D.generateId(),{lazyload:l,itemdata:d.menu})}}else{if(YAHOO.lang.isString(d.menu)||(d.menu&&d.menu.tagName)){var j=$(d.menu);if(j){var f=j.getElementsByTagName("li");var e=f.length;for(var h=0;h<e;h++){var a=f[h];if($D.hasClass(a,"yuimenuitem")){d.itemClassName=this._trimMenuItemClass(a.className);break}}if(e==1){g=true}}b=new IP.widget.Menu(d.menu,{lazyload:l})}}b.parentButton=this;d.menu=b}if(g){d.type="button";if(YAHOO.lang.isString(k)||(k&&k.tagName)){var j=$(k);if(j){Element.remove(j);delete d.menu}}}else{d.type="menu"}IP.widget.SelectionButton.superclass.constructor.call(this,c,d);this.selectionChangedEvent=new YAHOO.util.CustomEvent("selectionChanged")};YAHOO.extend(IP.widget.SelectionButton,IP.widget.Button,{_templateIds:{element:"template_selection_button"}});IP.widget.SelectionButton.prototype.initAttributes=function(a){IP.widget.SelectionButton.superclass.initAttributes.call(this,a);this.setAttributeConfig("itemClassName",{value:"",validator:YAHOO.lang.isString,method:this._updateClassname})};IP.widget.SelectionButton.prototype.setItemClassName=function(a){this.set("itemClassName",a)};IP.widget.SelectionButton.prototype.getItemClassName=function(){return this.get("itemClassName")};IP.widget.SelectionButton.prototype._onMenuClick=function(d,a,e){IP.widget.SelectionButton.superclass._onMenuClick.call(this,d,a,e);var c=a[1];var b=c.cfg.getProperty("classname");if(!b){b=c.element.className;b=this._trimMenuItemClass(c.element.className)}if(b){this.setItemClassName(b)}this.selectionChangedEvent.fire(b)};IP.widget.SelectionButton.prototype._updateClassname=function(a){var b=this.get("element");if(this._menuItemClass!=a){if(this._menuItemClass){$D.removeClass(b,this._menuItemClass)}$D.addClass(b,a)}this._menuItemClass=a};IP.widget.SelectionButton.prototype._trimMenuItemClass=function(a){a=a.replace(/\byui[^\s\b]+/g,"");a=a.replace("first-of-type","");a=a.trim();return a};IP.widget.SelectionButton.prototype.hasFixedAncestry=function(){if(this._hasFixedAncestry===undefined){this._hasFixedAncestry=IP.Util.hasFixedAncestry(this.get("element"))}return !!this._hasFixedAncestry};IP.widget.SimilarityScoreButton=function(b,a){b=IP.widget.Widget.fetchElement(b,this._templateIds);a=a||{};IP.widget.SimilarityScoreButton.superclass.constructor.call(this,b,{id:b.id,type:"button",title:"Originality Report",container:a.container});this.buttonElement=document.getElementByHandle("sim_score_button",b,"button");$E.on(b,"click",this._onSsButtonClicked,this,true);this.ssButtonClickedEvent=new YAHOO.util.CustomEvent("ssButtonClicked");if(a.score){this.setLabel(a.score)}};YAHOO.lang.extend(IP.widget.SimilarityScoreButton,IP.widget.Button,{_templateIds:{element:"template_sim_score_button"}});IP.widget.SimilarityScoreButton.prototype.setLabel=function(d){if(this.score==d){return}this._validateSSInput(d);var a=this.get("element");if(this.score){var c=this._getSSButtonColor(this.score).colorClass;$D.removeClass(a,c)}var b=this._getSSButtonColor(d);$D.addClass(a,b.colorClass);this.score=d;this.buttonElement.innerHTML=b.label};IP.widget.SimilarityScoreButton.prototype.updateForNewReport=function(a){this.status=a.status;this.message=a.message;this.url=a.url;this.percentage=a.percentage;if(this.status=="not_available"){this.setLabel("na")}else{if(this.status=="pending"){this.setLabel("wait")}else{this.setLabel(parseInt(this.percentage))}}};IP.widget.SimilarityScoreButton.prototype._onSsButtonClicked=function(){if(this.status=="available"&&this.url){IP.Util.openWindow(this.url,"rview","height=768,width=1024,location=no,menubar=no,resizable=yes,scrollbars=yes,titlebar=no,toolbar=no,status=no")}else{if(this.status=="pending"&&this.message){window.alert(this.message)}}this.ssButtonClickedEvent.fire()};IP.widget.SimilarityScoreButton.prototype._validateSSInput=function(a){if((a<0||a>100)&&a!="wait"&&a!="na"){throw new Error('Similarity Score input invalid. Must be a string 0-100 or "na" or "wait".')}};IP.widget.SimilarityScoreButton.prototype._getSSButtonColor=function(b){var a={};if(parseInt(b)===0){a.colorClass="or_blue";a.label=b+"%"}else{if(parseInt(b)>0&&parseInt(b)<25){a.colorClass="or_green";a.label=b+"%"}else{if(parseInt(b)>=25&&parseInt(b)<50){a.colorClass="or_yellow";a.label=b+"%"}else{if(parseInt(b)>=50&&parseInt(b)<75){a.colorClass="or_orange";a.label=b+"%"}else{if(parseInt(b)>=75){a.colorClass="or_red";a.label=b+"%"}else{if(b=="na"){a.colorClass="or_text";a.label="N/A"}else{if(b=="wait"){a.colorClass="or_text";a.label="Wait"}}}}}}}return a};IP.widget.InformationBox=function(b,a){IP.widget.InformationBox.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.InformationBox,IP.widget.Widget,{_templateIds:{element:"template_info_box",ul:"template_info_box_ul",li:"template_info_box_li"},element:null,id:null,ibContent:null,ibColumns:null});IP.widget.InformationBox.prototype.init=function(b,a){IP.widget.InformationBox.superclass.init.call(this,b);a=a||{};this.ibContent={};this.ibColumns=[]};IP.widget.InformationBox.prototype._locateElements=function(){this._ibLists=document.getElementByHandle("info_box_lists",this.element,"div")};IP.widget.InformationBox.prototype._addIbLi=function(a,c){var b=this._createFromTemplate("li");b.id=$D.generateId(null,"info_box_li");var d=a.key;this.ibContent[d]={label:a.label,value:a.value,labelElement:document.getElementByHandle("info_box_label",b,"em"),valueElement:document.getElementByHandle("info_box_value",b,"span"),element:b,display:a.display};if(a.label){this._setOrAppend(this.ibContent[d].labelElement,a.label)}if(a.value){this._setOrAppend(this.ibContent[d].valueElement,a.value)}if(a.display){this.ibContent[d].element.style.display=a.display}c.appendChild(b)};IP.widget.InformationBox.prototype._showRow=function(b){var a=this.ibContent[b];if(a){Element.show(a.element)}};IP.widget.InformationBox.prototype._hideRow=function(b){var a=this.ibContent[b];if(a){Element.hide(a.element)}};IP.widget.InformationBox.prototype.addDataColumn=function(d){var e=this._createFromTemplate("ul");e.id=$D.generateId(null,"info_box_ul");this._ibLists.appendChild(e);this.ibColumns.push(e);var b=d.length;for(var c=0;c<b;c++){this._addIbLi(d[c],e)}};IP.widget.InformationBox.prototype.addDataRow=function(a,b){var c=this.ibColumns[b-1];this._addIbLi(a,c)};IP.widget.InformationBox.prototype.changeValue=function(a){var b=this.ibContent[a.key].valueElement;this._setOrAppend(b,a.value);this.ibContent[a.key].value=a.value};IP.widget.InformationBox.prototype.changeLabel=function(b){var a=this.ibContent[b.key].labelElement;this._setOrAppend(a,b.label);this.ibContent[b.key].label=b.label};IP.widget.InformationBox.prototype._setOrAppend=function(b,a){if(typeof a=="string"||typeof a=="number"){b.innerHTML=a}else{b.innerHTML="";b.appendChild(a)}};IP.widget.InformationBox.prototype.getItemElement=function(a){if(this.ibContent[a]){return this.ibContent[a].element}else{return null}};IP.widget.InlineNotifier=function(a){IP.widget.InlineNotifier.superclass.constructor.call(this,a)};YAHOO.extend(IP.widget.InlineNotifier,IP.widget.Widget,{notificationDisplayedEvent:null,notificationHiddenEvent:null,infoMousedownEvent:null,undoMousedownEvent:null,linkMousedownEvent:null,_notificationDiv:null,_messageSpan:null,_undoLink:null,_infoLink:null,_link:null,_linkLabel:null,_undoCallback:null,_infoCallback:null,_linkCallback:null,_templateIds:{element:"template_inline_notification"}});IP.widget.InlineNotifier.prototype.init=function(a){IP.widget.InlineNotifier.superclass.init.call(this,a);this._messageSpan=document.getElementByHandle("inline_message",this.element,"span");this._undoLink=document.getElementByHandle("inline_action",this.element,"span");this._infoLink=document.getElementByHandle("inline_info",this.element,"span");this._link=document.getElementByHandle("inline_link",this.element,"span");this._linkLabel=document.getElementByHandle("inline_link_label",this.element,"a");this.notificationDisplayedEvent=new YAHOO.util.CustomEvent("notificationDisplayedEvent");this.notificationHiddenEvent=new YAHOO.util.CustomEvent("notificationHiddenEvent");this.infoMousedownEvent=new YAHOO.util.CustomEvent("infoMousedownEvent");this.undoMousedownEvent=new YAHOO.util.CustomEvent("undoMousedownEvent");this.linkMousedownEvent=new YAHOO.util.CustomEvent("linkMousedownEvent");$E.on(this._undoLink,"mousedown",function(b){$E.stopEvent(b);if(typeof this._undoCallback=="function"){this._undoCallback();this.undoMousedownEvent.fire()}this.element.style.display="none"},this,true);$E.on(this._undoLink,"click",function(b){$E.stopEvent(b)},this,true);$E.on(this._infoLink,"mousedown",function(b){$E.stopEvent(b);if(typeof this._infoCallback=="function"){this._infoCallback();this.infoMousedownEvent.fire()}},this,true);$E.on(this._link,"mousedown",function(b){$E.stopEvent(b);if(typeof this._linkCallback=="function"){this._linkCallback();this.linkMousedownEvent.fire()}},this,true)};IP.widget.InlineNotifier.prototype.show=function(a){if(this.element){if(a.message&&a.message!==""){this._messageSpan.innerHTML=a.message}else{return}if(a.info_callback_function&&typeof(a.info_callback_function)=="function"){this._infoCallback=a.info_callback_function;this._infoLink.style.display=""}else{this._infoLink.style.display="none"}if(a.undo_callback_function&&typeof(a.undo_callback_function)=="function"){this._undoCallback=a.undo_callback_function;this._undoLink.style.display=""}else{this._undoLink.style.display="none"}if(a.link_callback_function&&typeof(a.link_callback_function)=="function"){this._linkCallback=a.link_callback_function;this._linkLabel.innerHTML=a.linkLabel;this._link.style.display=""}else{this._link.style.display="none";this._linkLabel.innerHTML=""}if(a.duration&&parseInt(a.duration,10)>0){var b=function(){if(this._messageSpan.innerHTML==a.message){this.hide()}}.bind(this);setTimeout(b,parseInt(a.duration,10)||3000)}IP.widget.InlineNotifier.superclass.show.call(this);this.notificationDisplayedEvent.fire()}};IP.widget.InlineNotifier.prototype.hide=function(){if(this.element){IP.widget.InlineNotifier.superclass.hide.call(this);this._undoCallback=null;this._messageSpan.innerHTML=null;this._infoCallback=null;this.notificationHiddenEvent.fire()}};IP.widget.JumpMenu=function(b,a){IP.widget.JumpMenu.superclass.constructor.call(this,b,a)};YAHOO.lang.extend(IP.widget.JumpMenu,IP.widget.Widget,{_templateIds:{element:"template_jump_menu"}});IP.widget.JumpMenu.prototype.EVENT_ITEM_CLICKED="itemClicked";IP.widget.JumpMenu.prototype.EVENT_FIRST_ITEM_CLICKED="firstItemClicked";IP.widget.JumpMenu.prototype.EVENT_PREVIOUS_ITEM_CLICKED="previousItemClicked";IP.widget.JumpMenu.prototype.EVENT_NEXT_ITEM_CLICKED="nextItemClicked";IP.widget.JumpMenu.prototype.EVENT_LAST_ITEM_CLICKED="lastItemClicked";IP.widget.JumpMenu.prototype.init=function(b,a){this._checkCurrent=this._checkCurrent.bind(this);this._checkTotal=this._checkTotal.bind(this);IP.widget.JumpMenu.superclass.init.call(this,b);a=a||{};if(a.current&&a.total&&a.current>a.total){throw new Error("Invalid: Current item is greater than total items.")}else{this.cfg=new IP.util.Config(this);this._initDefaultConfig();this.cfg.applyConfig(a,true);this.cfg.fireQueue()}this._doGoToFirstItem=this._doGoToFirstItem.bind(this);this._doGoToPreviousItem=this._doGoToPreviousItem.bind(this);this._doGoToNextItem=this._doGoToNextItem.bind(this);this._doGoToLastItem=this._doGoToLastItem.bind(this)};IP.widget.JumpMenu.prototype._locateElements=function(){this._currentItemElement=document.getElementByHandle("current_item",this.element,"span");this._totalItemsElement=document.getElementByHandle("total_items",this.element,"span");this._itemTypeElement=document.getElementByHandle("item_type",this.element,"span");this._firstItemElement=document.getElementByHandle("first_item",this.element,"span");this._prevItemElement=document.getElementByHandle("prev_item",this.element,"span");this._nextItemElement=document.getElementByHandle("next_item",this.element,"span");this._lastItemElement=document.getElementByHandle("last_item",this.element,"span")};IP.widget.JumpMenu.prototype._initEvents=function(){this.firstItemButton=new IP.widget.Button(this._firstItemElement,{type:"button",onclick:{fn:this._goToFirstItemClickHandler.bind(this)}});this.prevItemButton=new IP.widget.Button(this._prevItemElement,{type:"button",onclick:{fn:this._goToPreviousItemClickHandler.bind(this)}});this.nextItemButton=new IP.widget.Button(this._nextItemElement,{type:"button",onclick:{fn:this._goToNextItemClickHandler.bind(this)}});this.lastItemButton=new IP.widget.Button(this._lastItemElement,{type:"button",onclick:{fn:this._goToLastItemClickHandler.bind(this)}});this.itemClickedEvent=new YAHOO.util.CustomEvent(this.EVENT_ITEM_CLICKED);this.firstItemClickedEvent=new YAHOO.util.CustomEvent(this.EVENT_FIRST_ITEM_CLICKED);this.previousItemClickedEvent=new YAHOO.util.CustomEvent(this.EVENT_PREVIOUS_ITEM_CLICKED);this.nextItemClickedEvent=new YAHOO.util.CustomEvent(this.EVENT_NEXT_ITEM_CLICKED);this.lastItemClickedEvent=new YAHOO.util.CustomEvent(this.EVENT_LAST_ITEM_CLICKED)};IP.widget.JumpMenu.prototype._goToFirstItemClickHandler=function(a){$E.stopEvent(a);if(this._beforeGoToItemHandler){this._beforeGoToItemHandler(this._doGoToFirstItem)}else{this._doGoToFirstItem(true)}};IP.widget.JumpMenu.prototype._doGoToFirstItem=function(a){if(a){if(this._current!=1){this.cfg.setProperty("current",1);this._fireEvents(this.firstItemClickedEvent)}}};IP.widget.JumpMenu.prototype._goToPreviousItemClickHandler=function(a){$E.stopEvent(a);if(this._beforeGoToItemHandler){this._beforeGoToItemHandler(this._doGoToPreviousItem)}else{this._doGoToPreviousItem(true)}};IP.widget.JumpMenu.prototype._doGoToPreviousItem=function(a){if(a){if(this._current!=1){this.cfg.setProperty("current",this._current-1);this._fireEvents(this.previousItemClickedEvent)}else{if(this.cfg.getProperty("wrapIndicator")){this.cfg.setProperty("current",this._total);this._fireEvents(this.previousItemClickedEvent)}}}};IP.widget.JumpMenu.prototype._goToNextItemClickHandler=function(a){$E.stopEvent(a);if(this._beforeGoToItemHandler){this._beforeGoToItemHandler(this._doGoToNextItem)}else{this._doGoToNextItem(true)}};IP.widget.JumpMenu.prototype._doGoToNextItem=function(a){if(a){if(this._current!=this._total){this.cfg.setProperty("current",this._current+1);this._fireEvents(this.nextItemClickedEvent)}else{if(this.cfg.getProperty("wrapIndicator")){this.cfg.setProperty("current",1);this._fireEvents(this.nextItemClickedEvent)}}}};IP.widget.JumpMenu.prototype._goToLastItemClickHandler=function(a){$E.stopEvent(a);if(this._beforeGoToItemHandler){this._beforeGoToItemHandler(this._doGoToLastItem)}else{this._doGoToLastItem(true)}};IP.widget.JumpMenu.prototype._doGoToLastItem=function(a){if(a){if(this._current!=this._total){this.cfg.setProperty("current",this._total);this._fireEvents(this.lastItemClickedEvent)}}};IP.widget.JumpMenu.prototype._fireEvents=function(b){var a=this.cfg.getProperty("current");b.fire(a);this.itemClickedEvent.fire(a)};IP.widget.JumpMenu.prototype.setItemType=function(a){this._itemTypeElement.innerHTML=a};IP.widget.JumpMenu.prototype._initDefaultConfig=function(){this.cfg.addProperty("total",{value:1,handler:this._configSetTotalCount,validator:this._checkTotal});this.cfg.addProperty("current",{value:1,handler:this._configSetCurrentIndex,validator:this._checkCurrent});this.cfg.addProperty("wrapIndicator",{value:false,validator:YAHOO.util.Config.checkBoolean})};IP.widget.JumpMenu.prototype._configSetCurrentIndex=function(b,a,c){this._currentItemElement.innerHTML=a[0];this._current=a[0]};IP.widget.JumpMenu.prototype._configSetTotalCount=function(b,a,c){this._totalItemsElement.innerHTML=a[0];this._total=a[0]};IP.widget.JumpMenu.prototype._configSetWrapIndicator=function(b,a,c){};IP.widget.JumpMenu.prototype._checkInteger=function(a){if(isNaN(a)||((a*10)%10!==0)){return false}else{return true}};IP.widget.JumpMenu.prototype._checkCurrent=function(b){var a=this.cfg.getProperty("total");return(this._checkInteger(b)&&(YAHOO.lang.isUndefined(a)||(b<=a)))};IP.widget.JumpMenu.prototype._checkTotal=function(b){var a=this.cfg.getProperty("current");return(this._checkInteger(b)&&(YAHOO.lang.isUndefined(a)||(b>=a)))};IP.widget.JumpMenu.prototype.setCurrent=function(a){this.cfg.setProperty("current",a)};IP.widget.JumpMenu.prototype.getCurrent=function(){return this.cfg.getProperty("current")};IP.widget.JumpMenu.prototype.setTotal=function(a){this.cfg.setProperty("total",a)};IP.widget.JumpMenu.prototype.getTotal=function(){return this.cfg.getProperty("total")};IP.widget.JumpMenu.prototype.setBeforeGoToItemHandler=function(a){if(YAHOO.lang.isFunction(a)){this._beforeGoToItemHandler=a}else{throw new TypeError('Error. "beforeGoToItemHandler" is not a valid function.')}};IP.widget.JumpMenu.prototype.getBeforeGoToItemHandler=function(){return this._beforeGoToItemHandler};IP.widget.JumpMenu.prototype.enable=function(){this.firstItemButton.set("disabled",false);this.prevItemButton.set("disabled",false);this.nextItemButton.set("disabled",false);this.lastItemButton.set("disabled",false)};IP.widget.JumpMenu.prototype.disable=function(){this.firstItemButton.set("disabled",true);this.prevItemButton.set("disabled",true);this.nextItemButton.set("disabled",true);this.lastItemButton.set("disabled",true)};IP.widget.HoverBubble=function(b,a){IP.widget.HoverBubble.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.HoverBubble,IP.widget.Panel,{_templateIds:{element:"template_hover_bubble"}});IP.widget.HoverBubble.TOP_CENTER="tc";IP.widget.HoverBubble.BOTTOM_CENTER="bc";IP.widget.HoverBubble.prototype.init=function(b,a){b=IP.widget.Widget.fetchElement(b,this._templateIds);IP.widget.HoverBubble.superclass.init.call(this,b);this.beforeInitEvent.fire(IP.widget.HoverBubble);$E.addListener(this.element,"mouseover",this._elementMouseOverHandler,this,true);$E.addListener(this.element,"mouseout",this._elementMouseOutHandler,this,true);$E.addListener(this.element,"click",this._elementClickHandler,this,true);this._topArrowElement=document.getElementByHandle("top_arrow",this.element,"div");this._bottomArrowElement=document.getElementByHandle("bottom_arrow",this.element,"div");this._bodyContentTextElement=document.getElementByHandle("content_text",this.body,"div");if(a){this.cfg.applyConfig(a,true)}this.cfg.queueProperty("underlay","none");this.cfg.queueProperty("draggable",false);this.cfg.queueProperty("constraintoviewport","false");this.cfg.queueProperty("width","275");this.cfg.subscribeToConfigEvent("visible",this._visibleChangedHandler,this,true);this.setText("");this.initEvent.fire(IP.widget.HoverBubble)};IP.widget.HoverBubble.prototype.initDefaultConfig=function(){IP.widget.HoverBubble.superclass.initDefaultConfig.call(this);this.cfg.addProperty("arrowVisible",{value:true,handler:this.configArrowVisible,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("bubbleOnTop",{value:true,handler:this.configBubbleOnTop,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("autoDisplaying",{value:true,handler:this.configAutoDisplaying,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("autoUpdatingContents",{value:false,handler:this.configAutoUpdatingContents,validator:this.cfg.checkBoolean})};IP.widget.HoverBubble.prototype.destroy=function(){this.cfg.unsubscribeFromConfigEvent("visible",this._visibleChangedHandler,this);if(this.element){$E.removeListener(this.element,"mouseover",this._elementMouseOverHandler);$E.removeListener(this.element,"mouseout",this._elementMouseOutHandler);$E.removeListener(this.element,"click",this._elementClickHandler)}if(this._context){$E.removeListener(this._context,"mouseover",this._contextElementMouseOverHandler);$E.removeListener(this._context,"mouseout",this._contextElementMouseOutHandler)}if(this.close){$E.removeListener(this.close,"click",this._closeElementClickHandler)}IP.widget.HoverBubble.superclass.destroy.call(this)};IP.widget.HoverBubble.prototype.configArrowVisible=function(b,a,c){this._updateArrowVisibility()};IP.widget.HoverBubble.prototype.configBubbleOnTop=function(b,a,c){this._updateArrowVisibility()};IP.widget.HoverBubble.prototype._updateArrowVisibility=function(){var b=this.cfg.getProperty("arrowVisible");if(b){var a=this.cfg.getProperty("bubbleOnTop");if(a){if(this._bottomArrowElement){Element.show(this._bottomArrowElement)}if(this._topArrowElement){Element.hide(this._topArrowElement)}}else{if(this._bottomArrowElement){Element.hide(this._bottomArrowElement)}if(this._topArrowElement){Element.show(this._topArrowElement)}}}else{if(this._bottomArrowElement){Element.hide(this._bottomArrowElement)}if(this._topArrowElement){Element.hide(this._topArrowElement)}}this._realign()};IP.widget.HoverBubble.prototype.configAutoDisplaying=function(c,a,f){var e=a[0];var d=this.cfg.getProperty("close");if(e){if(d){this.cfg.setProperty("close",false)}var b=this.cfg.getProperty("visible");if(b){this.cfg.setProperty("visible",false)}}else{if(!d){this.cfg.setProperty("close",true)}if(this._hideProcId){clearTimeout(this._hideProcId);this._hideProcId=null}}};IP.widget.HoverBubble.prototype.configAutoUpdatingContents=function(b,a,c){var e=a[0];if(e&&this.cfg.getProperty("visible")&&this._contentUpdater){var d=this._contentUpdater(this,this.cfg.getProperty("context"));this.setText(d)}};IP.widget.HoverBubble.prototype.configContext=function(c,a,d){var b=a[0];if(b){if(typeof b=="string"){this.cfg.setProperty("context",$(b),true)}b=this.cfg.getProperty("context");this._realign();if(this._context){$E.removeListener(this._context,"mouseover",this._contextElementMouseOverHandler);$E.removeListener(this._context,"mouseout",this._contextElementMouseOutHandler)}this._context=b;$E.addListener(this._context,"mouseover",this._contextElementMouseOverHandler,this,true);$E.addListener(this._context,"mouseout",this._contextElementMouseOutHandler,this,true)}};IP.widget.HoverBubble.prototype.configClose=function(b,a,e){var d=!!this.close;IP.widget.HoverBubble.superclass.configClose.call(this,b,a,e);var c=!!this.close;if(!d&&c){$E.addListener(this.close,"click",this._closeElementClickHandler,this,true)}};IP.widget.HoverBubble.prototype._closeElementClickHandler=function(a){$E.stopEvent(a)};IP.widget.HoverBubble.prototype._elementClickHandler=function(a){$E.stopPropagation(a)};IP.widget.HoverBubble.prototype._elementMouseOverHandler=function(b){var a=this.cfg.getProperty("autoDisplaying");if(!a){return}this._doShow()};IP.widget.HoverBubble.prototype._elementMouseOutHandler=function(b){var a=this.cfg.getProperty("autoDisplaying");if(!a){return}this._doHide()};IP.widget.HoverBubble.prototype._contextElementMouseOverHandler=function(b){var a=this.cfg.getProperty("autoDisplaying");if(!a){return}this._doShow()};IP.widget.HoverBubble.prototype._contextElementMouseOutHandler=function(b){var a=this.cfg.getProperty("autoDisplaying");if(!a){return}this._doHide()};IP.widget.HoverBubble.prototype._visibleChangedHandler=function(e,b){var g=b[0];if(g&&!this._previouslyVisible){var a=this.cfg.getProperty("autoUpdatingContents");if(a&&this._contentUpdater){var f=this._contentUpdater(this,this.cfg.getProperty("context"));this.setText(f)}else{var h=this._context;var d=this._context.offsetLeft;var c=this._context.offsetTop;if((h!=this._oldContext)||(d!=this._oldContextLeft)||(c!=this._oldContextTop)){this._realign();this._oldContext=h;this._oldContextLeft=d;this._oldContextTop=c}}}this._previouslyVisible=g};IP.widget.HoverBubble.prototype.align=function(b,a){var c=this.cfg.getProperty("context");if(c&&this.element){var d=YAHOO.util.Dom.getRegion(c);switch(a){case YAHOO.widget.Overlay.TOP_LEFT:this._alignTo(b,d.left,d.top);break;case IP.widget.HoverBubble.TOP_CENTER:this._alignTo(b,0.5*(d.left+d.right),d.top);break;case YAHOO.widget.Overlay.TOP_RIGHT:this._alignTo(b,d.right,d.top);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:this._alignTo(b,d.left,d.bottom);break;case IP.widget.HoverBubble.BOTTOM_CENTER:this._alignTo(b,0.5*(d.left+d.right),d.bottom);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:this._alignTo(b,d.right,d.bottom);break;default:break}}};IP.widget.HoverBubble.prototype._alignTo=function(b,f,d){var g=this.cfg.getProperty("arrowVisible");if(g){var a=this.cfg.getProperty("bubbleOnTop");if((b.indexOf("b")>-1)&&a){var e=$D.getRegion(this._bottomArrowElement);d-=(e.bottom-e.top)}else{if((b.indexOf("t")>-1)&&!a){var c=$D.getRegion(this._topArrowElement);d+=(c.bottom-c.top)}}}switch(b){case YAHOO.widget.Overlay.TOP_LEFT:this.moveTo(f,d);break;case IP.widget.HoverBubble.TOP_CENTER:this.moveTo(f-(0.5*this.element.offsetWidth),d);break;case YAHOO.widget.Overlay.TOP_RIGHT:this.moveTo((f-this.element.offsetWidth),d);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:this.moveTo(f,(d-this.element.offsetHeight));break;case IP.widget.HoverBubble.BOTTOM_CENTER:this.moveTo(f-(0.5*this.element.offsetWidth),(d-this.element.offsetHeight));break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:this.moveTo((f-this.element.offsetWidth),(d-this.element.offsetHeight));break;default:break}};IP.widget.HoverBubble.prototype.moveTo=function(a,c){if(a<0){a=0}else{var b=$D.getViewportWidth();if((a+this.element.offsetWidth)>b){a=b-this.element.offsetWidth}}IP.widget.HoverBubble.superclass.moveTo.call(this,a,c)};IP.widget.HoverBubble.prototype._realign=function(){var a=this.cfg.getProperty("bubbleOnTop");var c;var b;if(a){c="bc";b="tc"}else{c="tc";b="bc"}this.align(c,b)};IP.widget.HoverBubble.prototype.setText=function(a){this._text=a;this._bodyContentTextElement.innerHTML=a;if(IP.Util.usingIE()){this._enforceMaxBodyHeight()}this._realign()};IP.widget.HoverBubble.prototype.getText=function(){return this._text};IP.widget.HoverBubble.prototype.getHeight=function(){var d=this.element.offsetHeight;var c=this._topArrowElement.offsetHeight;var b=this._bottomArrowElement.offsetHeight;var a=d+c+b;return a};IP.widget.HoverBubble.prototype.setContentUpdater=function(a){if(YAHOO.lang.isFunction(a)){this._contentUpdater=a}else{throw new Error("Argument to setContentUpdater is not a valid function")}};IP.widget.HoverBubble.prototype._doShow=function(){if(this._hideProcId){clearTimeout(this._hideProcId);this._hideProcId=null}this.show()};IP.widget.HoverBubble.prototype._doHide=function(){if(this._hideProcId){clearTimeout(this._hideProcId);this._hideProcId=null}var a=function(){this.hide()}.bind(this);this._hideProcId=setTimeout(a,100)};IP.widget.HoverBubble.prototype._enforceMaxBodyHeight=function(){var c=150;var a=$D.getRegion(this.body);var b=a.bottom-a.top;if(b>c){$D.setStyle(this.body,"height",c+"px")}else{$D.setStyle(this.body,"height","")}};IP.widget.ResizePanel=function(b,a){IP.widget.ResizePanel.superclass.constructor.call(this,b,a)};IP.widget.ResizePanel.CSS_PANEL_RESIZE="resize_panel";YAHOO.extend(IP.widget.ResizePanel,IP.widget.Panel,{_templateIds:{element:"template_resizable_panel",resizeHandle:"template_resize_handle"}});IP.widget.ResizePanel.prototype.init=function(b,a){this._initTemplateNames();b=IP.widget.Widget.fetchElement(b,this._templateIds);IP.widget.ResizePanel.superclass.init.call(this,b);this.beforeInitEvent.fire(IP.widget.ResizePanel);if(a){this.cfg.applyConfig(a,true)}var c=$D.getStyle(b,"z-index");this.cfg.queueProperty("zIndex",c);this.cfg.queueProperty("draggable",false);this._locateElements();this._initComponents();this.resizeEvent=new YAHOO.util.CustomEvent("resizePanelResize",this);this.initEvent.fire(IP.widget.ResizePanel)};IP.widget.ResizePanel.prototype._locateElements=function(){return};IP.widget.ResizePanel.prototype._initComponents=function(){$D.addClass(this.innerElement,IP.widget.ResizePanel.CSS_PANEL_RESIZE);var a=IP.widget.Widget.fetchElement(b,this._templateIds,"resizeHandle");var b=$D.generateId(a,"resize_handle_");this.resizeHandleElement=a;this.innerElement.appendChild(this.resizeHandleElement);this.subscribe("beforeRender",this.onBeforeRender)};IP.widget.ResizePanel.prototype._initTemplateNames=function(){};IP.widget.ResizePanel.prototype.initResizeFunctionality=function(){this.ddResize=new YAHOO.util.Resize(this.id,{handles:["br"],hiddenHandles:true,proxy:true});this.ddResize.on("resize",function(b){var d=7;var c=b.height;var a=this.header.offsetHeight;var f=(c-a);var e=(IP.Util.usingIE())?f:f-d;YAHOO.util.Dom.setStyle(this.body,"height",e+"px");if(IP.Util.usingIE()){this.sizeUnderlay();this.syncIframe()}},this,true)};IP.widget.ResizePanel.prototype.onBeforeShow=function(){this.initResizeFunctionality.call(this);this.unsubscribe("beforeShow",this.onBeforeShow)};IP.widget.ResizePanel.prototype.onBeforeRender=function(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){this.initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",this.onBeforeShow)}this.unsubscribe("beforeRender",this.onBeforeRender)};IP.widget.Modal=function(b,a){IP.widget.Modal.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.Modal,IP.widget.Panel,{_templateIds:{element:"template_modal",cancelButton:"template_modal_cancel_button",button:"template_modal_button"}});IP.widget.Modal.prototype.init=function(b,a){b=IP.widget.Widget.fetchElement(b,this._templateIds);IP.widget.Modal.superclass.init.call(this,b);this.cfg.queueProperty("width","35.8em");this.cfg.queueProperty("zIndex",5000);this.cfg.queueProperty("fixedcenter",true);this.cfg.queueProperty("constrainttoviewport",false);this.cfg.queueProperty("underlay","shadow");this.cfg.queueProperty("close",false);this.cfg.queueProperty("draggable",true);this.cfg.queueProperty("modal",true);this.cfg.queueProperty("visible",false);if(a){this.cfg.applyConfig(a,true)}this._buttonContainer=document.getElementByHandle("button_container",this.body,"div");this._messageContainer=document.getElementByHandle("message_content",this.body,"p");this._rememberGroupElement=document.getElementByHandle("remember_group",this.body,"div");this._rememberCheckboxElement=document.getElementByHandle("remember_checkbox",this.body,"input");this._rememberTextElement=document.getElementByHandle("remember_text",this.body,"span");this.cfg.subscribeToConfigEvent("visible",this._visibleChangedHandler,this,true)};IP.widget.Modal.prototype.destroy=function(){this.cfg.unsubscribeFromConfigEvent("visible",this._visibleChangedHandler,this);IP.widget.Modal.superclass.destroy.call(this)};IP.widget.Modal.prototype._addButton=function(a){var c=IP.widget.Widget.fetchElement(a.id,this._templateIds,"button");a.type="button";var b=new IP.widget.Button(c,a);if(this.cancelButton){b.appendTo(this._buttonContainer,this.cancelButton.get("element"))}else{b.appendTo(this._buttonContainer)}return b};IP.widget.Modal.prototype._addCancelButton=function(b){var a=IP.widget.Widget.fetchElement(null,this._templateIds,"cancelButton");this.cancelButton=new IP.widget.Button(a,{type:"button",title:b||"Cancel",label:b||"Cancel",onclick:{fn:this._cancelButtonClickHandler.bind(this)}});this.cancelButton.appendTo(this._buttonContainer)};IP.widget.Modal.prototype._cancelButtonClickHandler=function(a){if(this._cancelFunction){IP.Util.deferExecution(this._cancelFunction)}this.hide()};IP.widget.Modal.prototype._resetCancelButton=function(a){a=a||"Cancel";this.cancelButton.set("label",a);this.cancelButton.set("title",a)};IP.widget.Modal.prototype._setHeader=function(a){this._header=document.getElementByHandle("title_content",this.header,"h2");this._header.innerHTML=a};IP.widget.Modal.prototype._setMessage=function(a){if(a&&a.tagName){this._messageContainer.innerHTML="";this._messageContainer.appendChild(a)}else{this._messageContainer.innerHTML=a}};IP.widget.Modal.prototype._setRememberOption=function(b,a){if(b){Element.show(this._rememberGroupElement);if(a){this._rememberTextElement.innerHTML=a}}else{Element.hide(this._rememberGroupElement)}};IP.widget.Modal.prototype._setIcon=function(a){$D.addClass(document.getElementByHandle("title_content",this.header,"h2"),a)};IP.widget.Modal.prototype._setCancelFunction=function(a){if(a){this._cancelFunction=function(){a({remember:this._rememberCheckboxElement.checked})}.bind(this)}};IP.widget.Modal.prototype._setPostShowFunction=function(a){if(a){this._postShowFunction=function(){a(this)}.bind(this)}};IP.widget.Modal.prototype.isRememberOptionChecked=function(){return this._rememberCheckboxElement.checked};IP.widget.Modal.prototype._reset=function(a){var c=a.header||"Modal";this._setHeader(c);var b=a.message||"";this._setMessage(b);this._setCancelFunction(a.cancelFunction);this._setPostShowFunction(a.postShowFunction);this._setRememberOption(a.remember,a.rememberText)};IP.widget.Modal.prototype.show=function(a){a=a||{};this._reset(a);IP.widget.Modal.superclass.show.call(this)};IP.widget.Modal.prototype._visibleChangedHandler=function(b,a){var c=a[0];if(c&&!this._previouslyVisible){if(this._postShowFunction){IP.Util.deferExecution(this._postShowFunction)}}this._previouslyVisible=c};IP.widget.ConfirmModal=function(b,a){IP.widget.ConfirmModal.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.ConfirmModal,IP.widget.Modal);IP.widget.ConfirmModal.show=function(a){if(!IP.widget.ConfirmModal._singleton){IP.widget.ConfirmModal._singleton=new IP.widget.ConfirmModal("confirm_modal",a);IP.widget.ConfirmModal._singleton.render(document.body)}IP.widget.ConfirmModal._singleton.show(a)};IP.widget.ConfirmModal.prototype.init=function(d,c){IP.widget.ConfirmModal.superclass.init.call(this,d,c);this._setIcon("confirm_logo");var a=c.okLabel||"Ok";var b=c.cancelLabel;this.okButton=this._addButton({label:a,title:a,onclick:{fn:this._okButtonClickHandler.bind(this)}});this._addCancelButton(b)};IP.widget.ConfirmModal.prototype._okButtonClickHandler=function(a){if(this.okFunction){IP.Util.deferExecution(function(){var b=false;if(this._rememberCheckboxElement){b=this._rememberCheckboxElement.checked}this.okFunction({remember:b})}.bind(this))}this.hide()};IP.widget.ConfirmModal.prototype._reset=function(d){d.header=d.header||"Confirmation";if(!d.message){var e="Are you sure you want to take this action?";var a=d.optionMessages||[];var f=a.length;if(a){for(var c=0;c<f;c++){e+="<br><br>";e+=a[c]}}e+="<br><br>Press Ok to continue, or Cancel to abort.";d.message=e}var b=d.okLabel||"Ok";this.okButton.set("label",b);this.okButton.set("title",b);this.okFunction=d.okFunction;this._resetCancelButton(d.cancelLabel);IP.widget.ConfirmModal.superclass._reset.call(this,d)};IP.widget.AlertModal=function(b,a){IP.widget.AlertModal.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.AlertModal,IP.widget.Modal);IP.widget.AlertModal.show=function(a){if(!IP.widget.AlertModal._singleton){IP.widget.AlertModal._singleton=new IP.widget.AlertModal("alert_modal",a);IP.widget.AlertModal._singleton.render(document.body)}IP.widget.AlertModal._singleton.show(a)};IP.widget.AlertModal.prototype.init=function(b,a){IP.widget.AlertModal.superclass.init.call(this,b,a);this.cfg.setProperty("zIndex",5000);this._setIcon("alert_logo");this.okButton=this._addButton({label:"Ok",title:"Ok",onclick:{fn:this._onOkButtonClick.bind(this)}})};IP.widget.AlertModal.prototype._onOkButtonClick=function(a){if(this.okFunction){IP.Util.deferExecution(this.okFunction)}this.hide()};IP.widget.AlertModal.prototype._reset=function(a){a.header=a.header||"Alert";var b=a.okLabel||"Ok";this.okButton.set("label",b);this.okFunction=a.okFunction;IP.widget.AlertModal.superclass._reset.call(this,a)};IP.widget.InputModal=function(b,a){IP.widget.InputModal.superclass.constructor.call(this,b,a)};YAHOO.extend(IP.widget.InputModal,IP.widget.Modal,{_templateIds:{element:"template_modal",cancelButton:"template_modal_cancel_button",button:"template_modal_button",inputTextField:"template_modal_input_field"}});IP.widget.InputModal.show=function(a){if(!IP.widget.InputModal._singleton){IP.widget.InputModal._singleton=new IP.widget.InputModal("input_modal",a);IP.widget.InputModal._singleton.render(document.body)}IP.widget.InputModal._singleton.show(a)};IP.widget.InputModal.prototype.init=function(b,a){a=a||{};IP.widget.InputModal.superclass.init.call(this,b,a);this._addInputField();this.okButton=this._addButton({label:"Ok",title:"Ok",onclick:{fn:this._okButtonClickHandler.bind(this)}});this._addCancelButton()};IP.widget.InputModal.prototype._okButtonClickHandler=function(){if(this.okFunction){IP.Util.deferExecution(function(){this.okFunction(this.inputField.value)}.bind(this))}this.hide()};IP.widget.InputModal.prototype._addInputField=function(){this.inputFieldContainer=IP.widget.Widget.fetchElement(null,this._templateIds,"inputTextField");this.inputFieldContainer.id=$D.generateId(this.inputFieldContainer,"input_field_container_");this.inputField=document.getElementByHandle("input_field",this.inputFieldContainer,"input");this.inputField.id=$D.generateId(this.inputFieldContainer,"input_field_");this.inputLabel=document.getElementByHandle("input_label",this.inputFieldContainer,"label");this.inputLabel.setAttribute("for",this.inputField.id);this.body.insertBefore(this.inputFieldContainer,this._buttonContainer)};IP.widget.InputModal.prototype._setInputLabel=function(a){this.inputLabel.innerHTML=a};IP.widget.InputModal.prototype._setInputFieldDefault=function(a){this.inputField.value=a};IP.widget.InputModal.prototype._reset=function(d){d.header=d.header||"Input";var b=d.label||"";this._setInputLabel(b);var c=d.inputFieldDefault||"";this._setInputFieldDefault(c);this.okFunction=d.okFunction;var a=d.inputFieldMaxLength||"";this.inputField.setAttribute("maxlength",a);IP.widget.InputModal.superclass._reset.call(this,d)};IP.widget.YesNoModal=function(b,a){IP.widget.YesNoModal.superclass.constructor.call(this,b,a)};IP.widget.YesNoModal.show=function(a){if(!IP.widget.YesNoModal._singleton){IP.widget.YesNoModal._singleton=new IP.widget.YesNoModal("yes_no_modal",a);IP.widget.YesNoModal._singleton.render(document.body)}IP.widget.YesNoModal._singleton.show(a)};YAHOO.extend(IP.widget.YesNoModal,IP.widget.Modal,{init:function(b,a){IP.widget.YesNoModal.superclass.init.call(this,b,a);this._setIcon("confirm_logo");this.yesButton=this._addButton({label:"Yes",title:"Yes",onclick:{fn:this._yesButtonClickHandler.bind(this)}});this.noButton=this._addButton({label:"No",title:"No",onclick:{fn:this._noButtonClickHandler.bind(this)}});this._addCancelButton()},_yesButtonClickHandler:function(a){if(this.yesFunction){IP.Util.deferExecution(this.yesFunction)}this.hide()},_noButtonClickHandler:function(a){if(this.noFunction){IP.Util.deferExecution(this.noFunction)}this.hide()},_reset:function(c){c.header=c.header||"Choice";var b=c.yesLabel||"Yes";this.yesButton.set("label",b);var a=c.noLabel||"No";this.noButton.set("label",a);this.yesFunction=c.yesFunction;this.noFunction=c.noFunction;IP.widget.YesNoModal.superclass._reset.call(this,c)}});IP.net.Message=function(c,b,a,d){this.action=c;this.data=b;this.successCallback=a;this.failureCallback=d};IP.net.Message.prototype={action:null,data:null,successCallback:null,failureCallback:null,getDataJSONString:function(){var a=null;if(this.data){a=YAHOO.lang.JSON.stringify(this.data)}return a}};IP.net.Message.prototype.toString=function(){var a="Message: { action:"+this.action+", data:"+this.getDataJSONString();if(this.successCallback){a+=", has successCallback"}if(this.failureCallback){a+=", has failureCallback"}a+=" }";return a};IP.net.Messenger=function(c,b,a){if(!(b instanceof IP.net.Message)){throw new TypeError("The message is not an instance of IP.net.Message")}this.id=c;this.message=b;this.url=a;this.attempts=0;this._requests={};this._completed=false;this.resend=this.resend.bind(this);this._checkRequestTimeouts=this._checkRequestTimeouts.bind(this);this._checkRequestTimeoutsExecuter=new IP.util.PeriodicalExecuter(this._checkRequestTimeouts,IP.net.Messenger.TIMEOUT_CHECK_PERIOD);YAHOO.util.Connect.resetDefaultHeaders();YAHOO.util.Connect.setDefaultPostHeader(false);YAHOO.util.Connect.initHeader("Content-Type","application/x-www-form-urlencoded",true)};IP.net.Messenger.TIMEOUT_CHECK_PERIOD=5000;IP.net.Messenger.RETRY_SEND_REQUEST_DELAY=3000;IP.net.Messenger.UNRESPONSIVE_REQUEST_TIMEOUT=20000;IP.net.Messenger.BAD_CONNECTION_STATUS={0:true,404:true,408:true,502:true,503:true,504:true};IP.net.Messenger.prototype={id:null,message:null,url:null,attempts:null,_requests:null,startTime:null,lastReattemptTime:null,toString:function(){var a=[];a.push("Messenger: { ");a.push("id: "+this.id);a.push(', action: "'+this.message.action+'"');a.push(', data: "'+decodeURIComponent(this.message.data)+'"');a.push(" }");return a.join("")},_sendNewRequest:function(){var c="id="+this.id+"&action="+this.message.action+"&data="+this.message.data;this.lastReattemptTime=IP.Util.getCurrentTimestamp();this.attempts+=1;var a={attempt:this.attempts,startTime:this.lastReattemptTime};var d={success:this._requestSuccessHandler,failure:this._requestFailureHandler,scope:this,argument:a};var b=YAHOO.util.Connect.asyncRequest("POST",this.url,d,c);this._requests[b.tId]=b},_processResponseInfo:function(responseInfo){if(responseInfo.processed){return}responseInfo.processed=true;responseInfo.message=this.message;var statusString=new String(responseInfo.status);responseInfo.status=new String(statusString);responseInfo.badConnection=IP.net.Messenger.BAD_CONNECTION_STATUS[statusString]||statusString.match(/^12(\d){3}$/);if(!responseInfo.badConnection){try{var responseData=eval("("+responseInfo.responseText+")");responseInfo.responseData=responseData;responseInfo.id=responseData.id;responseInfo.sessionStatus=responseData.session;responseInfo.messageStatus=new String(responseData.status);responseInfo.data=responseData.data;if(typeof responseInfo.data=="string"){responseInfo.data=new String(responseInfo.data)}}catch(e){var responseText;try{responseText=responseInfo.responseText}catch(e){}var errorMessage="Error: processing the responseInfo. Response status: "+statusString+". ";if(responseText){errorMessage+="ResponseText: "+responseText+". "}else{errorMessage+="ResponseText is not available"}IP.util.Logger.logError(errorMessage+this,e);if(statusString==200&&YAHOO.lang.isString(responseText)&&(YAHOO.lang.trim(responseText)=="")){IP.util.Logger.logDebug("Since the response text is an empty string, try resending the request.");responseInfo.badConnection=true}}}},_checkRequestTimeouts:function(){var b=IP.Util.getCurrentTimestamp();var a=b-this.lastReattemptTime;if(a>=IP.net.Messenger.UNRESPONSIVE_REQUEST_TIMEOUT){this.resendAfterDelay()}},send:function(){this.startTime=IP.Util.getCurrentTimestamp();this._sendNewRequest()},resend:function(){this._sendNewRequest()},resendAfterDelay:function(){setTimeout(this.resend,IP.net.Messenger.RETRY_SEND_REQUEST_DELAY)},_removeTransaction:function(a){delete this._requests[a]},_abortAndRemoveTransactionsExcept:function(a){for(var c in this._requests){if(c==a){continue}var b=this._requests[c];if(YAHOO.util.Connect.isCallInProgress(b)){YAHOO.util.Connect.abort(b)}this._removeTransaction(c)}},isAborted:function(){return this._aborted},abort:function(){this._aborted=true;this._checkRequestTimeoutsExecuter.stop();for(var b in this._requests){var a=this._requests[b];if(YAHOO.util.Connect.isCallInProgress(a)){YAHOO.util.Connect.abort(a)}this._removeTransaction(b)}},isCompleted:function(){return this._completed},complete:function(){this._completed=true;this._checkRequestTimeoutsExecuter.stop()},getRequestSuccessCallback:function(){return this._requestSuccessCallback},setRequestSuccessCallback:function(a){this._requestSuccessCallback=a},getRequestFailureCallback:function(){return this._requestFailureCallback},setRequestFailureCallback:function(a){this._requestFailureCallback=a},getRequestExceptionCallback:function(){return this._requestExceptionCallback},setRequestExceptionCallback:function(a){this._requestExceptionCallback=a},gsetSessionLoggedOutCallback:function(){return this._sessionLoggedOutCallback},setSessionLoggedOutCallback:function(a){this._sessionLoggedOutCallback=a},getRequestServerErrorCallback:function(){return this._requestServerErrorCallback},setRequestServerErrorCallback:function(a){this._requestServerErrorCallback=a},_requestSuccessHandler:function(c){try{if(c.status==-1){return}this._processResponseInfo(c);var a=c.messageStatus;var b=c.sessionStatus;if(!a){this._requestFailureHandler(c);return}else{if(a.indexOf("completed")!==0){this._removeTransaction(c.tId);return}else{if(b&&(b=="logged_out")){this._removeTransaction(c.tId);if(this._sessionLoggedOutCallback){this._sessionLoggedOutCallback(this,c)}IP.util.Logger.logDebug('The user has been logged out! <br>Response text: "'+c.responseText+'"<br>'+this);return}}}if(this.isCompleted()||this.isAborted()){this._removeTransaction(c.tId);return}else{this.complete();this._abortAndRemoveTransactionsExcept(c.tId)}if(c.data&&c.data.error){if(this._requestServerErrorCallback){this._requestServerErrorCallback(this,c)}IP.util.Logger.logDebug('There was a server side error. <br>Response text: "'+c.responseText+'"<br>'+this);return}if(this._requestSuccessCallback){try{this._requestSuccessCallback(this,c)}catch(d){IP.util.Logger.logError('The requestSuccessCallback had errors. Response text: "'+c.responseText+'"'+this,d)}}if(this.message.successCallback){try{this.message.successCallback(c,this)}catch(d){IP.util.Logger.logError('The message successCallback method had errors. Response text: "'+c.responseText+'"'+this,d)}}this._removeTransaction(c.tId)}catch(d){this._requestExceptionHandler(c,d)}},_requestFailureHandler:function(b){try{this._processResponseInfo(b);if(this.isCompleted()){if(this.attempts>1){IP.util.Logger.logError("<b>onFailure</b> on attempt "+b.argument.attempt+"--already completed. "+this)}this._removeTransaction(b.tId);return}else{if(this.isAborted()){this._removeTransaction(b.tId);return}}var d=b.statusText;var a=b.badConnection;if(a){this.resendAfterDelay()}else{if(this.attempts>1){IP.util.Logger.logError("<b>onFailure</b>--completed on attempt "+b.argument.attempt+". "+this)}this.complete();this._abortAndRemoveTransactionsExcept(b.tId);if(this._requestFailureCallback){try{this._requestFailureCallback(this,b)}catch(c){IP.util.Logger.logError('The messageFailureEvent firing had errors. Response text: "'+b.responseText+'"'+this,c)}}if(this.message.failureCallback){try{this.message.failureCallback(b,this)}catch(c){IP.util.Logger.logError('The message failureCallback method had errors. Response text: "'+b.responseText+'"'+this,c)}}this._removeTransaction(b.tId)}}catch(c){this._requestExceptionHandler(b,c)}},_requestExceptionHandler:function(b,a){IP.util.Logger.logError("<b>Request exception:</b> "+this);this._processResponseInfo(b);if(a){IP.util.Logger.logError("Exception: ",a)}if(this.isCompleted()){if(this.attempts>1){IP.util.Logger.logError("onException--already completed. "+this)}return}else{if(this.isAborted()){this._removeTransaction(b.tId);return}}if(this._requestExceptionCallback){try{this._requestExceptionCallback(this,b,a)}catch(c){IP.util.Logger.logError("The Messenger.onException had errors. ",c)}}}};IP.net.MessageCenter=function(a,c,b){this._state=IP.net.MessageCenter.NORMAL_CONNECTION_STATE;this.url=a;this.sessionId=c;this.disableRandomizingURL=b;this._checkMessengerTimeouts=this._checkMessengerTimeouts.bind(this);this._messengerExceptionHandler=this._messengerExceptionHandler.bind(this);this._messengerFailureHandler=this._messengerFailureHandler.bind(this);this._messengerSuccessHandler=this._messengerSuccessHandler.bind(this);this._messengerSessionLoggedOutHandler=this._messengerSessionLoggedOutHandler.bind(this);this._messengerServerErrorHandler=this._messengerServerErrorHandler.bind(this);this.connectionStateChangeEvent=new YAHOO.util.CustomEvent("connectionStateChange",this);this.messageFailedEvent=new YAHOO.util.CustomEvent("messageFailed",this);this._messengers={};this._checkMessengerTimeoutsExecuter=new IP.util.PeriodicalExecuter(this._checkMessengerTimeouts,IP.net.MessageCenter.TIMEOUT_CHECK_PERIOD)};IP.net.MessageCenter.TIMEOUT_CHECK_PERIOD=5000;IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_TIMEOUT=80000;IP.net.MessageCenter.FAILED_CONNECTION_TIMEOUT=120000;IP.net.MessageCenter.NORMAL_CONNECTION_STATE=0;IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_STATE=1;IP.net.MessageCenter.FAILED_CONNECTION_STATE=2;IP.net.MessageCenter.USER_LOGGED_OUT_STATE=3;IP.net.MessageCenter.SERVER_ERROR_STATE=4;IP.net.MessageCenter.prototype={_state:null,messengers:null,url:null,message:null,send:function(c){if(this.isStopped()){return}if(!(c instanceof IP.net.Message)){throw new TypeError("The message is not an instance of IP.net.Message")}c.data=encodeURIComponent(c.getDataJSONString());if((this._state==IP.net.MessageCenter.USER_LOGGED_OUT_STATE)&&(c.action!="report_js_errors")){return}var b=IP.Util.getCurrentTimestamp();var a=new String(Math.floor(Math.random()*100));var e=b+a.pad(3,"0",0);var d=this._createMessenger(e,c);this._messengers[e]=d;d.send()},getDefaultMessengerURL:function(){var a=this.url;if(a.indexOf("?")>-1){a+="&session-id="+this.sessionId}else{a+="?session-id="+this.sessionId}if(!this.disableRandomizingURL){a+="&r="+(Math.random()*100)}return a},_createMessenger:function(d,b){var a=this.getDefaultMessengerURL();var c=new IP.net.Messenger(d,b,a);c.setRequestSuccessCallback(this._messengerSuccessHandler);c.setRequestFailureCallback(this._messengerFailureHandler);c.setRequestExceptionCallback(this._messengerExceptionHandler);c.setSessionLoggedOutCallback(this._messengerSessionLoggedOutHandler);c.setRequestServerErrorCallback(this._messengerServerErrorHandler);return c},_removeMessenger:function(a){if(this._messengers[a.id]){delete this._messengers[a.id]}},_checkMessengerTimeouts:function(){var b=IP.Util.getCurrentTimestamp();for(var g in this._messengers){var c=this._messengers[g];if(c){var a=c.startTime;var f=b-a;if((this._state==IP.net.MessageCenter.NORMAL_CONNECTION_STATE)&&(f>IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_TIMEOUT)){IP.util.Logger.logDebug("Entering UNRESPONSIVE CONNECTION STATE. Request "+g+" has not responded for "+f+" ms. "+c);try{this._setCurrentState(IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_STATE)}catch(d){IP.util.Logger.logError("The MessageCenter.connectionStateChangeEvent firing had errors when changing to unresponsive connection state. ",d)}if(this._sessionChecker){this._sessionChecker.setSessionExists(true)}}else{if((this._state==IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_STATE)&&(f>IP.net.MessageCenter.FAILED_CONNECTION_TIMEOUT)){IP.util.Logger.logDebug("Entering FAILED CONNECTION STATE. Request "+g+" has not responded for "+f+" ms. "+c);try{this._setCurrentState(IP.net.MessageCenter.FAILED_CONNECTION_STATE)}catch(d){IP.util.Logger.logError("The MessageCenter.connectionStateChangeEvent firing had errors when changing to failed connection state. ",d)}}}}}},_messengerSuccessHandler:function(b,a){this._removeMessenger(b);if(a.responseData.session=="logged_out"){this._setCurrentState(IP.net.MessageCenter.USER_LOGGED_OUT_STATE);if(this._sessionChecker){this._sessionChecker.setSessionExists(false)}return}if(this._state!=IP.net.MessageCenter.NORMAL_CONNECTION_STATE){IP.util.Logger.logDebug("Entering NORMAL CONNECTION STATE. Request "+b.id+" succeeded.");try{this._setCurrentState(IP.net.MessageCenter.NORMAL_CONNECTION_STATE)}catch(c){IP.util.Logger.logError("The MessageCenter.connectionStateChangeEvent firing had errors when changing to normal state. ",c)}if(this._sessionChecker){this._sessionChecker.setSessionExists(true)}}},_messengerFailureHandler:function(b,a){try{this.messageFailedEvent.fire(b,a)}catch(c){IP.util.Logger.logError("The messageFailedEvent firing had errors. ",c)}this._removeMessenger(b)},_messengerExceptionHandler:function(c,b,a){c.resendAfterDelay()},_messengerSessionLoggedOutHandler:function(b,a){if(this._sessionChecker){this.checkConnection()}},_messengerServerErrorHandler:function(b,a){this.stop();this._setCurrentState(IP.net.MessageCenter.SERVER_ERROR_STATE)},_setCurrentState:function(a){this._state=a;this.connectionStateChangeEvent.fire(this._state)},getCurrentState:function(){return this._state},isOffline:function(){if(this._state==IP.net.MessageCenter.FAILED_CONNECTION_STATE||this._state==IP.net.MessageCenter.USER_LOGGED_OUT_STATE||this._state==IP.net.MessageCenter.SERVER_ERROR_STATE){return true}else{return false}},beginSessionStatusMonitoring:function(a){this._sessionChecker=new IP.net.SessionChecker(a);this._sessionChecker.sessionStateChangedEvent.subscribe(function(b,c){if(c==IP.net.SessionChecker.LOGGED_OUT_STATE){this._setCurrentState(IP.net.MessageCenter.USER_LOGGED_OUT_STATE)}else{this._setCurrentState(IP.net.MessageCenter.NORMAL_CONNECTION_STATE)}}.bind(this));this._sessionChecker.start()},checkConnection:function(){if(this._sessionChecker){this._sessionChecker.checkNow()}},updateSessionId:function(b){this.sessionId=b;if(this._sessionChecker){this._sessionChecker.updateSessionId(b)}for(var c in this._messengers){var a=this._messengers[c];if(a instanceof IP.net.Messenger){a.url=this.getDefaultMessengerURL()}}},isStopped:function(){return this._stopped},stop:function(){this._stopped=true;this._checkMessengerTimeoutsExecuter.stop();for(var b in this._messengers){var a=this._messengers[b];if(a instanceof IP.net.Messenger){a.abort()}}}};IP.net.QueuedMessageCenter=function(a,c,b){IP.net.QueuedMessageCenter.superclass.constructor.call(this,a,c,b);this._messageQueue=[];this._messageQueueReady=true;this.flushMessageQueue=this.flushMessageQueue.bind(this);this._flushRequestSuccessHandler=this._flushRequestSuccessHandler.bind(this);this._flushRequestFailureHandler=this._flushRequestFailureHandler.bind(this);this.messageQueuedEvent=new YAHOO.util.CustomEvent("messageQueued",this);this.flushStartEvent=new YAHOO.util.CustomEvent("flushStart",this);this.flushSuccessEvent=new YAHOO.util.CustomEvent("flushSuccess",this);this.flushFailureEvent=new YAHOO.util.CustomEvent("flushFailure",this);this.flushPartialSuccessEvent=new YAHOO.util.CustomEvent("flushPartialSuccess",this);this._flushMessageQueueExecuter=new IP.util.PeriodicalExecuter(this.flushMessageQueue,20000)};YAHOO.lang.extend(IP.net.QueuedMessageCenter,IP.net.MessageCenter,{messageQueue:null,_flushMessageQueueExecuter:null,_lastSentMessages:null,_messageQueueReady:null,stop:function(){this._flushMessageQueueExecuter.stop();this._messageQueue.splice(0,this._messageQueue.length);IP.net.QueuedMessageCenter.superclass.stop.call(this)},queueMessage:function(a){if(this.isStopped()){return}if(!(a instanceof IP.net.Message)){throw new TypeError("The message is not an instance of IP.net.Message")}this._messageQueue.push(a);this.messageQueuedEvent.fire(a)},flushMessageQueue:function(){if(this._messageQueueReady&&(this._messageQueue.length>0)){this._messageQueueReady=false;this.flushStartEvent.fire(this._messageQueue.concat());this._lastSentMessages=this._messageQueue.concat();this._messageQueue.splice(0,this._messageQueue.length);var a=new IP.net.Message("flush_queue",this._lastSentMessages,this._flushRequestSuccessHandler,this._flushRequestFailureHandler);this.send(a)}},hasMoreToSend:function(){return(this._messageQueue.length>0)},_flushRequestSuccessHandler:function(h,e){this._messageQueueReady=true;var b=h.data||[];var c=[];var a=[];var j=this._lastSentMessages.length;for(var d=0;d<j;d++){var k=this._lastSentMessages[d];var g=b[d];var f={partOfQueue:true,text:null,data:g};YAHOO.lang.augmentObject(f,h);if(g.error){if(g.type=="server_error"){this._messengerServerErrorHandler(e,f)}if(k.failureCallback){k.failureCallback(h,e)}c.push(f)}else{a.push(k);if(k.successCallback){k.successCallback(f,e)}}}if(c.length){this.flushPartialSuccessEvent.fire(c,a)}else{this.flushSuccessEvent.fire(a,b)}this._lastSentMessages=null},_flushRequestFailureHandler:function(f,g){this._messageQueueReady=true;var c=f.data;var b=this._lastSentMessages.length;for(var a=0;a<b;a++){var e=this._lastSentMessages[a];var d=c[a];if(e.failureCallback){e.failureCallback(f,g)}}this.flushFailureEvent.fire(this._lastSentMessages,c);this._lastSentMessages=null},_messengerFailureHandler:function(f,d){IP.util.Logger.logInfo("failing");var a="Not available";var e="None";a=d.status;e=d.responseText.escapeHTML();var c=d.message;var b="<b>SERVER ERROR. Status:</b> "+a+". <b>Parameters:</b> action="+c.action+", data="+decodeURIComponent(c.data)+". <b>Response:</b> "+e+". <b>Attempt #"+d.argument.attempt+"</b>.";IP.util.Logger.logError(b);IP.net.QueuedMessageCenter.superclass._messengerFailureHandler.call(this,f,d)}});YAHOO.namespace("Tii.grademark");var Tii=YAHOO.Tii;Tii.grademark.Application=function(a,b){this.config=a;this.initialAssignmentData=b;this.init()};Tii.grademark.Application.EVENT_ASSIGNMENT_CREATED="assignmentCreated";Tii.grademark.Application.EVENT_HEADER_CREATED="headerCreated";Tii.grademark.Application.EVENT_RUBRIC_LIBRARY_CREATED="rubricLibraryCreated";Tii.grademark.Application.EVENT_CLIPBOARD_LIBRARY_CREATED="clipboardLibraryCreated";Tii.grademark.Application.EVENT_SECONDARY_JS_LOADED="secondaryJSLoaded";Tii.grademark.Application.EVENT_USER_PREF_CHANGED="user_pref_changed";Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED="optional_module_loaded";Tii.grademark.Application.PREFERENCE_VIEWED_INTEGRATION_SETS_UNIFICATION_MESSAGE="viewed_integrations_sets_unification";Tii.grademark.Application.prototype={init:function(){this.initBubblingEventProvider(null);this._initCloseHandling();this._initLogging();console.log("Starting up GradeMark");this.addListener(Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,this._handleOptionalModuleLoading,this);this.addListener(Tii.grademark.Application.EVENT_ASSIGNMENT_CREATED,this._initAssignmentDependentItems,this);this.addListener(Tii.grademark.Application.EVENT_HEADER_CREATED,this._initToolManager,this);Tii.grademark.ApplicationServices.getMessageCenter().connectionStateChangeEvent.subscribe(this._connectionStateChangeHandler,this,this);IP.Util.deferExecution(function(){this._initApplicationLayout()}.bind(this));IP.Util.deferExecution(function(){var a=$("loading_modal");this.loadingModal=new Tii.grademark.LoadingModal(a,{},this)}.bind(this));IP.Util.deferExecution(function(){this._initHistoryManager()}.bind(this));IP.Util.deferExecution(function(){if(Tii.grademark.CommentDialog){this._initCommentDialog()}}.bind(this));IP.Util.deferExecution(function(){this._manageParentSession()}.bind(this));this.addListener(Tii.grademark.Application.EVENT_USER_PREF_CHANGED,this._defaultChangedEventHandler,this);this.addListener(Tii.grademark.Application.EVENT_SECONDARY_JS_LOADED,this._secondaryJSLoadedEventHandler,this)},_initAssignment:function(c,b){this.assignment=new Tii.grademark.Assignment(initialAssignmentData,this.layout.bodyContentElement);this.assignment.render();this.fireEvent(this,Tii.grademark.Application.EVENT_ASSIGNMENT_CREATED);this.assignment.addListener(Tii.grademark.Paper.EVENT_IMAGE_READ_READY,this._loadDeferredFiles,this);var a=Tii.grademark.ApplicationServices.getPermissionManager();if(!a.checkUserPermission(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS)){this.assignment.disablePreloadingPapers()}IP.util.Logger.logInfo("Assignment initialized.")},_initAssignmentDependentItems:function(){this._initFooter();this._initHeader();this._initPrinter()},_initPrinter:function(){this.printer=new Tii.grademark.Printer(this);IP.util.Logger.logInfo("Printer initialized.")},_initApplicationLayout:function(){this.layout=new IP.widget.ApplicationLayout("application");this.layout.renderEvent.subscribe(this._initAssignment,this,true);this.layout.render();IP.util.Logger.logInfo("Application Layout initialized.")},_initHeader:function(){this.header=new Tii.grademark.ApplicationHeader("application_layout_hd",this);this.layout.attachAppLayoutHeader(this.header,this.header.headerResizeEvent);this.fireEvent(this,Tii.grademark.Application.EVENT_HEADER_CREATED);IP.util.Logger.logInfo("Header initialized.")},_initFooter:function(){this.footer=new Tii.grademark.ApplicationFooter("application_layout_ft",this);this.footer.render();this.footer.initForStudentUser();this.layout.attachAppLayoutFooter(this.footer,this.footer.resizeEvent);IP.util.Logger.logInfo("Footer initialized.")},_initToolManager:function(){this.toolManager=new Tii.grademark.ApplicationToolManager(this);IP.util.Logger.logInfo("Tool Manager initialized.")},_initHistoryManager:function(){var a=Tii.grademark.ApplicationServices.getPermissionManager();if(a.checkUserPermission(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS)){this.historyManager=new Tii.grademark.HistoryManager(this)}},_initCommentDialog:function(){var a={width:"25em"};YAHOO.lang.augmentObject(a,this.config);this._commentDialog=new Tii.grademark.ClipboardCommentDialog(this,a);this.toolManager.setCommentDialog(this._commentDialog);this._initClipboardPalette();IP.util.Logger.logInfo("Comment Dialog initialized.")},_initClipboardPalette:function(){this._clipboardPalette=new Tii.grademark.ClipboardPalette(this,this.config);IP.util.Logger.logInfo("Clipboard Palette initialized.")},getCommentDialog:function(){if(!this._commentDialog){this._initCommentDialog()}return this._commentDialog},isCommentDialogCreated:function(){return(!!this._commentDialog)},getClipboardPalette:function(){if(!this._clipboardPalette){this._initClipboardPalette()}return this._clipboardPalette},getClipboardLibrary:function(b){var a=function(){this._clipboardLibrary=new Tii.grademark.ClipboardLibrary(this);this._clipboardLibrary.render(document.body);this.fireEvent(this,Tii.grademark.Application.EVENT_CLIPBOARD_LIBRARY_CREATED);if(YAHOO.lang.isFunction(b)){b(this._clipboardLibrary)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"clipboard_library"})}.bind(this);if(!this._clipboardLibrary){Tii.grademark.ApplicationServices.loadModule("clipboard_library",a)}else{if(YAHOO.lang.isFunction(b)){b(this._clipboardLibrary)}}},getQuickMarkLibrary:function(b){var a=function(){this._quickMarkLibrary=new Tii.grademark.QuickMarkLibrary();this._quickMarkLibrary.initBubblingEventProvider(this);this._quickMarkLibrary.hideEvent.subscribe(function(){var c=function(d){d.show()};this.getQuickMarkPalette(c)},this,true);this._quickMarkLibrary.render(document.body);if(YAHOO.lang.isFunction(b)){b(this._quickMarkLibrary)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"quickmark_library"})}.bind(this);if(!this._quickMarkLibrary){Tii.grademark.ApplicationServices.loadModule("quickmark_library",a)}else{if(YAHOO.lang.isFunction(b)){b(this._quickMarkLibrary)}}},getRubricLibrary:function(b){var a=function(){this._rubricLibrary=new Tii.grademark.RubricLibrary(this.assignment);this._rubricLibrary.render(document.body);this.fireEvent(this,Tii.grademark.Application.EVENT_RUBRIC_LIBRARY_CREATED);if(YAHOO.lang.isFunction(b)){b(this._rubricLibrary)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"rubric_library"})}.bind(this);if(!this._rubricLibrary){Tii.grademark.ApplicationServices.loadModule("rubric_library",a)}else{if(YAHOO.lang.isFunction(b)){b(this._rubricLibrary)}}},isRubricLibraryCreated:function(){return(!!this._rubricLibrary)},isClipboardLibraryCreated:function(){return(!!this._clipboardLibrary)},getStatsWindow:function(b){var a=function(){this._statsWindow=new Tii.grademark.StatsWindow(this);this._statsWindow.render(document.body);if(YAHOO.lang.isFunction(b)){b(this._statsWindow)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"stats_window"})}.bind(this);if(!this._statsWindow){Tii.grademark.ApplicationServices.loadModule("stats_window",a)}else{if(YAHOO.lang.isFunction(b)){b(this._statsWindow)}}return this._statsWindow},getPaperSelectionWindow:function(b){var a=function(){this._paperSelectionWindow=new Tii.grademark.PaperSelectionWindow(this);this._paperSelectionWindow.render(document.body);if(YAHOO.lang.isFunction(b)){b(this._paperSelectionWindow)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"paper_selection_window"})}.bind(this);if(!this._paperSelectionWindow){Tii.grademark.ApplicationServices.loadModule("paper_selection_window",a)}else{if(YAHOO.lang.isFunction(b)){b(this._paperSelectionWindow)}}},getQuickMarkPalette:function(b){var a=function(){this._quickMarkPalette=new Tii.grademark.QuickMarkPalette(this,{coordinates:Tii.grademark.User.getPreferences().get(Tii.grademark.UserPreferences.QUICKMARK_PALETTE_COORDINATES),width:Tii.grademark.User.getPreferences().get(Tii.grademark.UserPreferences.QUICKMARK_PALETTE_WIDTH),openedSets:Tii.grademark.User.getPreferences().get(Tii.grademark.UserPreferences.QUICKMARK_PALETTE_OPENED_SETS)});this._quickMarkPalette.showEvent.subscribe(function(){this.fireEvent(this,Tii.grademark.Application.EVENT_USER_PREF_CHANGED,{key:"default_qm_palette_visibile",value:1,forceSave:true})}.bind(this));this._quickMarkPalette.hideEvent.subscribe(function(){this.fireEvent(this,Tii.grademark.Application.EVENT_USER_PREF_CHANGED,{key:"default_qm_palette_visibile",value:0,forceSave:true})}.bind(this));if(YAHOO.lang.isFunction(b)){b(this._quickMarkPalette)}this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"quickmark_palette"})}.bind(this);if(!this._quickMarkPalette){Tii.grademark.ApplicationServices.loadModule("quickmark_palette",a)}else{if(YAHOO.lang.isFunction(b)){b(this._quickMarkPalette)}}},isQuickMarkPaletteCreated:function(){return(!!this._quickMarkPalette)},getAnnouncementsWindow:function(){if(!this._announcementsWindow){this._announcementsWindow=new Tii.grademark.AnnouncementsWindow(this.config);this._announcementsWindow.render(document.body)}return this._announcementsWindow},getConnectionInfoWindow:function(){if(!this._connectionInfoWindow){this._connectionInfoWindow=new Tii.grademark.ConnectionInfoWindow();this._connectionInfoWindow.render(document.body)}return this._connectionInfoWindow},_initLogging:function(){var a=function(e,c,b){var d={};d.message=e;d.lineNumber=b;d.fileName=c;IP.util.Logger.logError("Javascript Error",d,true)};window.onerror=a},_manageParentSession:function(){function a(){try{if(window.opener&&window.opener.stopTimer){window.opener.application_open=true;window.opener.stopTimer();console.log("Parent session timer stopped")}}catch(b){}}a();setInterval(a,this.config.sessionTimeout/2)},_restartParentSession:function(){try{if(window.opener&&window.opener.restartTimer){window.opener.application_open=false;window.opener.restartTimer()}}catch(a){}},_initCloseHandling:function(){var a=function(f){var c=Tii.grademark.ApplicationServices.getMessageCenter();var d=IP.util.Logger;if(d.shouldSendLog()){d.logInfo("Sending error email.");var b={};b.context=this.config.context;b.userID=this.config.user.id;b.userType=this.config.user.role;b.userAgent=navigator.userAgent;b.firstPaperID=this.initialAssignmentData.firstPaperId;b.firstReadID=this.initialAssignmentData.firstReadId;b.errors=d.getDataPackage().join("<br>");var g=new IP.net.Message("report_js_errors",b);c.send(g)}var e=null;if(c.hasMoreToSend()){c.flushMessageQueue();e="You have unsaved changes. Closing GradeMark now may result in loss of data."}if(e){if(IP.Util.usingSafari()){return e}else{f.returnValue=e}}};$E.on(window,"beforeunload",a,this,true)},_connectionStateChangeHandler:function(b,a){var c=a[0];if(c===IP.net.MessageCenter.USER_LOGGED_OUT_STATE){window.opener.location.href="/logout.asp"}},_secondaryJSLoadedEventHandler:function(){var b=Tii.grademark.User.getPreferences();var a=Tii.grademark.ApplicationServices.getPermissionManager();if(a.checkUserPermission(Tii.grademark.PermissionManager.EDIT_MARKUP)){if(b.get("default_qm_palette_visibile")===1){var c=function(d){d.show()};this.getQuickMarkPalette(c)}}},_loadDeferredFiles:function(){this.assignment.removeListener(Tii.grademark.Paper.EVENT_IMAGE_READ_READY,this._loadDeferredFiles,this);var b=function(){this.secondaryJSLoaded=true;this.fireEvent(this,Tii.grademark.Application.EVENT_SECONDARY_JS_LOADED)}.bind(this);var a=function(){var c=$("template_container");var d=document.createElement("div");c.appendChild(d);IP.Util.setInnerHTML(d,this.config.deferredIncludes,b)}.bind(this);setTimeout(a,2500)},_handleOptionalModuleLoading:function(f){var c=f.data;var a=Tii.grademark.User.getPreferences();var b=a.get("module_history")||{};var d=b[c.module]||[];d.push(1);b[c.module]=d.slice(d.length-2,d.length);Tii.grademark.User.getPreferences().set("module_history",b,true)},_defaultChangedEventHandler:function(b){var a=b.data;Tii.grademark.User.getPreferences().set(a.key,a.value,a.forceSave)},relogin:function(userPassword,reloginCallback){var callback={success:function(o){var response=eval("("+o.responseText+")");var errorMessage=response.error_message;if(response.success){var newSessionId=response.session_id;IP.util.Logger.logInfo('Relogin successful. New session ID: "'+newSessionId+'".');Tii.grademark.ApplicationServices.updateSessionId(newSessionId);var messageCenter=Tii.grademark.ApplicationServices.getMessageCenter();messageCenter.checkConnection()}else{IP.util.Logger.logInfo('Relogin failure. Error message: "'+errorMessage+'".')}reloginCallback(!!response.success,errorMessage)}.bind(this)};var postData=this.prepareReloginRequestData(userPassword);var url=postData.url;var postString=postData.postString;YAHOO.util.Connect.asyncRequest("POST",url,callback,postString)},integrationsRelogin:function(){Tii.grademark.ApplicationServices.updateSessionId(window.opener.Tii.cms.global.sessionID);var callback={success:function(o){var response=eval("("+o.responseText+")");var errorMessage=response.error_message;if(response.success){console.log("the integrations relogin was successful")}else{IP.util.Logger.logInfo('Integrations relogin failure. Error message: "'+errorMessage+'".')}var messageCenter=Tii.grademark.ApplicationServices.getMessageCenter();messageCenter.checkConnection()}.bind(this)};var postData=this.prepareReloginRequestData(null,"/grademark3/integrations_relogin.asp");var url=postData.url;var postString=postData.postString;YAHOO.util.Connect.asyncRequest("POST",url,callback,postString)},prepareReloginRequestData:function(e,c){var a={};YAHOO.lang.augmentObject(a,window.reloginInfo);if(e){a.user_password=e}var d="";for(var b in a){if(d!==""){d+="&"}d+=b+"="+a[b]}var f=IP.Util.getQueryStringParameter("svr");var h=Tii.grademark.ApplicationServices.getSessionId();var g=IP.Util.getQueryStringParameter("lang");c=c||"/grademark3/relogin.asp";c+="?svr="+f+"&session-id="+h+"&lang="+g;IP.util.Logger.logInfo('Relogin attempt. Post string: "'+d+'", sessionId: "'+h+'", URL: "'+c+'".');return{url:c,postString:d}},isReloginSupported:function(){var b={instructor:1,master_instructor:1};var a=!!b[Tii.grademark.User.role];return a}};YAHOO.lang.augment(Tii.grademark.Application,IP.event.BubblingEventProvider);Tii.grademark.User=(function(){return{id:null,role:null,_preferences:null,init:function(a){a=a||window.config;if(!a){return}var b=a.user;this.id=b.id;this.role=b.role;this._preferences=new Tii.grademark.UserPreferences(b.preferences);this.firstName=b.firstName;this.lastName=b.lastName},getPreferences:function(){return this._preferences}}})();Tii.grademark.UserPreferences=function(a){this._qmSetsAdded=[];Tii.grademark.UserPreferences.superclass.constructor.call(this,a)};Tii.grademark.UserPreferences.QUICKMARK_PALETTE_OPENED_SETS="default_qm_open_sets";Tii.grademark.UserPreferences.QUICKMARK_PALETTE_WIDTH="default_qm_palette_width";Tii.grademark.UserPreferences.QUICKMARK_PALETTE_COORDINATES="default_qm_palette_coordinates";Tii.grademark.UserPreferences.DONT_DISPLAY_DONE_EDITING_CLIPBOARD_LIBRARY_ITEM_CONFIRMATION_MODAL="dont_display_done_editing_clipboard_library_item_confirmation_modal";Tii.grademark.UserPreferences.DONT_DISPLAY_DONE_EDITING_QUICKMARK_LIBRARY_ITEM_CONFIRMATION_MODAL="dont_display_done_editing_quickmark_library_item_confirmation_modal";Tii.grademark.UserPreferences.DONT_DISPLAY_DONE_EDITING_RUBRIC_LIBRARY_ITEM_CONFIRMATION_MODAL="dont_display_done_editing_rubric_library_item_confirmation_modal";Tii.grademark.UserPreferences.DONT_DISPLAY_CLIPBOARD_LIBRARY_SPEED_UP_AID_PANEL="dont_display_clipboard_library_speed_up_aid_panel";Tii.grademark.UserPreferences.DONT_DISPLAY_QUICKMARK_LIBRARY_SPEED_UP_AID_PANEL="dont_display_quickmark_library_speed_up_aid_panel";Tii.grademark.UserPreferences.DONT_DISPLAY_RUBRIC_LIBRARY_SPEED_UP_AID_PANEL="dont_display_rubric_library_speed_up_aid_panel";YAHOO.extend(Tii.grademark.UserPreferences,IP.util.UserPreferences,{_qmSetsAdded:null,_showingRubricBuilderWelcomePage:null,_saveTimeout:null,_init:function(b){Tii.grademark.UserPreferences.superclass._init.call(this,b);if(!b){this._sendGetPreferencesMessage()}else{if(!b.skip_increment_module_usage){var a=function(){if(!Tii.grademark.ApplicationServices.getPermissionManager().isStudentUser()){this._incrementModuleUsage()}}.bind(this);IP.Util.deferExecution(a)}}},_loadData:function(a){Tii.grademark.UserPreferences.superclass._loadData.call(this,a);this._qmSetsAdded=a.qm_sets_added||[];this._highlightsVisible=true;this._viewingCommentsInMargin=false;this._showingRubricBuilderWelcomePage=true},save:function(){if(this._saveTimeout){clearTimeout(this._saveTimeout)}this._sendSavePreferencesMessage()},lazySave:function(){if(this._saveTimeout){clearTimeout(this._saveTimeout)}this._saveTimeout=setTimeout(function(){this.save()}.bind(this),20000)},_sendGetPreferencesMessage:function(){var a=new IP.net.Message("get_user_prefs",null,this._processPreferenceDataFromServer.bind(this));Tii.grademark.ApplicationServices.getMessageCenter().send(a)},_sendSavePreferencesMessage:function(){var a=new IP.net.Message("save",this.generateDataPackage());Tii.grademark.ApplicationServices.getMessageCenter().send(a)},_processPreferenceDataFromServer:function(a){var b=a.data;if(b){this._loadData(b)}},generateDataPackage:function(){var a=Tii.grademark.UserPreferences.superclass.generateDataPackage.call(this);a.qm_sets_added=this._qmSetsAdded;a.clipboard_state=1;a.clipboard_x=0;a.clipboard_y=0;a.quickmark_state=1;a.quickmark_x=0;a.quickmark_y=0;a.qm_sets_opened=[];return a},isQuickMarkTemplateSetInPalette:function(a){return(this._qmSetsAdded.indexOf(a)!=-1)},isQuickMarkTemplateSetOpen:function(b){var a=this.get(Tii.grademark.UserPreferences.QUICKMARK_PALETTE_OPENED_SETS);return(a&&a.indexOf(b)!=-1)},addQuickMarkTemplateSetToPalette:function(a){if(!this.isQuickMarkTemplateSetInPalette(a)){this._qmSetsAdded.push(a)}this.save()},removeQuickMarkTemplateSetFromPalette:function(a){if(this.isQuickMarkTemplateSetInPalette(a)){this._qmSetsAdded.remove(a);if(this.isQuickMarkTemplateSetOpen(a)){var b=thi.grademark.UserPreferences.QUICKMARK_PALETTE_OPENED_SETSs.get();b.remove(a);this.set(Tii.grademark.UserPreferences.QUICKMARK_PALETTE_OPENED_SETS,b)}}this.save()},getQuickMarkPaletteSetIds:function(){return this._qmSetsAdded},isViewingCommentInMargin:function(){return this._viewingCommentsInMargin},setViewingCommentInMargin:function(a){this._viewingCommentsInMargin=a},isHighlightsVisible:function(){return this._highlightsVisible},setHighlightsVisible:function(a){this._highlightsVisible=a},isShowingRubricBuilderWelcomePage:function(){return this._showingRubricBuilderWelcomePage},setShowingRubricBuilderWelcomePage:function(a){this._showingRubricBuilderWelcomePage=a},set:function(a,c,b){var d=(this.get(a)!=c);Tii.grademark.UserPreferences.superclass.set.call(this,a,c);if(b){this.save()}else{if(d){this.lazySave()}}},_incrementModuleUsage:function(){var b=this.get("module_history");for(var a in b){var c=b[a];c.push(0);b[a]=c.slice(c.length-2,c.length)}this.set("module_history",b);this.lazySave()}});Tii.grademark.ApplicationServices=(function(){return{_modeManager:null,_permissionManager:null,_messageCenter:null,init:function(a){this.config=a||window.config||{};this._sessionId=this.config.sessionId;this._initMessageCenter();this._initModeManager();this._initPermissionManager();this._initLoader();if(this._permissionManager.checkPermission(Tii.grademark.PermissionManager.EDIT_MARKUP)){this._initSessionMonitoring()}},_initModeManager:function(){if(YAHOO.lang.isFunction(this.config.createModeManager)){this._modeManager=this.config.createModeManager(this)}else{this._modeManager=new Tii.grademark.ModeManager(this._messageCenter)}},_initPermissionManager:function(){if(YAHOO.lang.isFunction(this.config.createPermissionManager)){this._permissionManager=this.config.createPermissionManager(this)}else{this._permissionManager=new Tii.grademark.PermissionManager(this._modeManager.getMode(),this.config)}},_initMessageCenter:function(){var b=IP.Util.getQueryStringParameter("svr");var d=IP.Util.getQueryStringParameter("lang");var c=this.getSessionId();var a=this.config.messageCenterUrl||"/grademark3/handle-data.asp";if(a.indexOf("?")==-1){a+="?svr="+b+"&lang="+d}else{a+="&svr="+b+"&lang="+d}this._messageCenter=new IP.net.QueuedMessageCenter(a,c)},_initSessionMonitoring:function(){var a=IP.Util.getQueryStringParameter("svr");var b=this.getSessionId();this._messageCenter.beginSessionStatusMonitoring({interval:300000,url:"/grademark3/test_session.asp",session_id:b,server_id:a,current_session_state:IP.net.SessionChecker.LOGGED_IN_STATE})},_initLoader:function(){this._loader=new YAHOO.util.YUILoader();var b=this.config.moduleDefinitions;if(b){for(var a in b){this._loader.addModule(b[a])}}},loadModule:function(a,b){this._loader.require(a);if(YAHOO.lang.isFunction(b)){this._loader.onSuccess=b}this._loader.insert()},getModeManager:function(){return this._modeManager},getPermissionManager:function(){return this._permissionManager},getMessageCenter:function(){return this._messageCenter},getLoader:function(){return this._loader},getSessionId:function(){return this._sessionId},updateSessionId:function(b){this._sessionId=b;var a=Tii.grademark.ApplicationServices.getMessageCenter();a.updateSessionId(b)},usingIntegration:function(){var a=false;if(this.config.integrationData){a=this.config.integrationData.usingIntegration}return a}}})();Tii.grademark.ModeManager=function(){this._mode=Tii.grademark.ModeManager.MODE_DEFAULT;this.modeChangedEvent=new YAHOO.util.CustomEvent(Tii.grademark.ModeManager.EVENT_MODE_CHANGED,this)};Tii.grademark.ModeManager.MODE_DEFAULT="default";Tii.grademark.ModeManager.MODE_STUDENT="student";Tii.grademark.ModeManager.MODE_PAPER="paper";Tii.grademark.ModeManager.EVENT_MODE_CHANGED="modeChanged";Tii.grademark.ModeManager.prototype={_mode:null,modeChangedEvent:null,toString:function(){return'ModeManager: { currentMode: "'+this.getModeString()+'"}'},isInDefaultMode:function(){return(this._mode==Tii.grademark.ModeManager.MODE_DEFAULT)},isInStudentMode:function(){return(this._mode==Tii.grademark.ModeManager.MODE_STUDENT)},isInPaperMode:function(){return(this._mode==Tii.grademark.ModeManager.MODE_PAPER)},getMode:function(){return this._mode},getModeString:function(){var a=this._mode;a=a.replace("_"," ");a=a.replace(/\b(\w)/g,function(b){return b.toUpperCase()});return a},changeMode:function(a){this._changeMode(a)},enterDefaultMode:function(){this._changeMode(Tii.grademark.ModeManager.MODE_DEFAULT)},enterStudentMode:function(){this._changeMode(Tii.grademark.ModeManager.MODE_STUDENT)},enterPaperMode:function(){this._changeMode(Tii.grademark.ModeManager.MODE_PAPER)},_changeMode:function(c){var a=this._mode;this._mode=c;var b=Tii.grademark.ApplicationServices.getPermissionManager();b.setMode(c);this.modeChangedEvent.fire(c,a)}};Tii.grademark.PermissionManager=function(d,c){var b=Tii.grademark.User;var a=[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR,Tii.grademark.PermissionManager.ROLE_INSTRUCTOR,Tii.grademark.PermissionManager.ROLE_STUDENT_MODE,Tii.grademark.PermissionManager.ROLE_PAPER_MODE,Tii.grademark.PermissionManager.ROLE_STUDENT,Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE,Tii.grademark.PermissionManager.ROLE_READER,Tii.grademark.PermissionManager.ROLE_VIEWING_READER,Tii.grademark.PermissionManager.ROLE_SUPERVISOR,Tii.grademark.PermissionManager.ROLE_LIBRARY_ADMINISTRATOR];this._userRole=b.role;this._mode=d;Tii.grademark.PermissionManager.superclass.constructor.call(this,a,c)};Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR="master_instructor";Tii.grademark.PermissionManager.ROLE_INSTRUCTOR="instructor";Tii.grademark.PermissionManager.ROLE_STUDENT_MODE="student_mode";Tii.grademark.PermissionManager.ROLE_PAPER_MODE="paper_mode";Tii.grademark.PermissionManager.ROLE_STUDENT="student";Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE="student_paper_mode";Tii.grademark.PermissionManager.ROLE_READER="reader";Tii.grademark.PermissionManager.ROLE_VIEWING_READER="viewing_reader";Tii.grademark.PermissionManager.ROLE_SUPERVISOR="supervisor";Tii.grademark.PermissionManager.ROLE_LIBRARY_ADMINISTRATOR="administrator";Tii.grademark.PermissionManager.CHANGED_TO_TRUE="toTrue";Tii.grademark.PermissionManager.CHANGED_TO_FALSE="toFalse";Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS="openOtherPapers";Tii.grademark.PermissionManager.VIEW_INSTRUCTOR_MODE="viewInstructorMode";Tii.grademark.PermissionManager.VIEW_TOOLS_MENU="viewToolsMenu";Tii.grademark.PermissionManager.VIEW_STATISTICS="viewStatistics";Tii.grademark.PermissionManager.EDIT_RUBRIC="editRubric";Tii.grademark.PermissionManager.VIEW_HELP_MENU="viewHelpMenu";Tii.grademark.PermissionManager.OPEN_INSTRUCTOR_GUIDE="openInstructorGuide";Tii.grademark.PermissionManager.SAVE_PAPER="savePaper";Tii.grademark.PermissionManager.DELETE_PAPER="deletePaper";Tii.grademark.PermissionManager.OUTPUT_PAPER="outputPaper";Tii.grademark.PermissionManager.VIEW_AUTHOR_INFO="viewAuthorInfo";Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE="viewLastSavedDate";Tii.grademark.PermissionManager.VIEW_TIME_SPENT="viewTimeSpent";Tii.grademark.PermissionManager.VIEW_MARKUP="viewMarkup";Tii.grademark.PermissionManager.VIEW_PAPER_MODE_INSTRUCTIONS="viewPaperModeInstructions";Tii.grademark.PermissionManager.OPEN_ORIGINALITY_REPORT="openOriginalityReport";Tii.grademark.PermissionManager.EDIT_MARKUP="editMarkup";Tii.grademark.PermissionManager.WRITE_GENERAL_COMMENTS="writeGeneralComments";Tii.grademark.PermissionManager.ASSIGN_GRADE="assignGrade";Tii.grademark.PermissionManager.SHARE_LIBRARY_SETS_MASTER_CLASS="shareLibrarySetsMasterClass";Tii.grademark.PermissionManager.SHARE_LIBRARY_SETS_ACCOUNT="shareLibrarySetsAccount";Tii.grademark.PermissionManager.SWITCH_READS="switchReads";Tii.grademark.PermissionManager.MARK_READ_DONE="markReadDone";YAHOO.lang.extend(Tii.grademark.PermissionManager,IP.util.PermissionManager,{_userRole:null,_mode:null});Tii.grademark.PermissionManager.prototype.initPermissions=function(){Tii.grademark.PermissionManager.superclass.initPermissions.call(this);var r={};if(!this.config.disablePaperNavigation){r[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;r[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;r[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;r[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;r[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true}this.addActionPermissions(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS,r);var q={};q[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;q[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;q[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;q[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;q[Tii.grademark.PermissionManager.ROLE_READER]=true;q[Tii.grademark.PermissionManager.ROLE_VIEWING_READER]=true;q[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_INSTRUCTOR_MODE,q);var d={};d[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;d[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;d[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_TOOLS_MENU,d);var v={};v[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;v[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_STATISTICS,v);var b={};b[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;b[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;b[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;this.addActionPermissions(Tii.grademark.PermissionManager.EDIT_RUBRIC,b);var h={};h[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.SHARE_LIBRARY_SETS_MASTER_CLASS,h);var x={};x[Tii.grademark.PermissionManager.ROLE_LIBRARY_ADMINISTRATOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.SHARE_LIBRARY_SETS_ACCOUNT,x);var w={};w[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;w[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;w[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;w[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;w[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;w[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;w[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_HELP_MENU,w);var o={};o[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;o[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;o[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;o[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;o[Tii.grademark.PermissionManager.ROLE_READER]=true;o[Tii.grademark.PermissionManager.ROLE_LIBRARY_ADMINISTRATOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.OPEN_INSTRUCTOR_GUIDE,o);var t={};t[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;t[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;t[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;t[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.SAVE_PAPER,t);var p={};p[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;p[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;p[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;p[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.DELETE_PAPER,p);var m={};m[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;m[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;m[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;m[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;m[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;m[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;m[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.OUTPUT_PAPER,m);var n={};n[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;n[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;n[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;n[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;n[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;n[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;n[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_AUTHOR_INFO,n);var s={};s[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;s[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;s[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;s[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;s[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE,s);var c={};c[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;c[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;c[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;c[Tii.grademark.PermissionManager.ROLE_READER]=true;c[Tii.grademark.PermissionManager.ROLE_VIEWING_READER]=true;c[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_TIME_SPENT,c);var l={};l[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;l[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;l[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;l[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;l[Tii.grademark.PermissionManager.ROLE_READER]=true;l[Tii.grademark.PermissionManager.ROLE_VIEWING_READER]=true;l[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_MARKUP,l);var g={};g[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;g[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;this.addActionPermissions(Tii.grademark.PermissionManager.VIEW_PAPER_MODE_INSTRUCTIONS,g);var f={};f[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;f[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;f[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;f[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;f[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;f[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;f[Tii.grademark.PermissionManager.ROLE_READER]=true;f[Tii.grademark.PermissionManager.ROLE_VIEWING_READER]=true;f[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;this.addActionPermissions(Tii.grademark.PermissionManager.OPEN_ORIGINALITY_REPORT,f);var j={};j[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;j[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;j[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.EDIT_MARKUP,j);var u={};u[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;u[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;u[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;u[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.WRITE_GENERAL_COMMENTS,u);var a={};a[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;a[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;a[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;a[Tii.grademark.PermissionManager.ROLE_READER]=true;this.addActionPermissions(Tii.grademark.PermissionManager.ASSIGN_GRADE,a);var e={};var k={};if(this.config.usingDistributedGrading){e[Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR]=true;e[Tii.grademark.PermissionManager.ROLE_INSTRUCTOR]=true;e[Tii.grademark.PermissionManager.ROLE_STUDENT_MODE]=true;e[Tii.grademark.PermissionManager.ROLE_PAPER_MODE]=true;e[Tii.grademark.PermissionManager.ROLE_STUDENT]=true;e[Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE]=true;e[Tii.grademark.PermissionManager.ROLE_READER]=true;e[Tii.grademark.PermissionManager.ROLE_VIEWING_READER]=true;e[Tii.grademark.PermissionManager.ROLE_SUPERVISOR]=true;k[Tii.grademark.PermissionManager.ROLE_READER]=true}this.addActionPermissions(Tii.grademark.PermissionManager.SWITCH_READS,e);this.addActionPermissions(Tii.grademark.PermissionManager.MARK_READ_DONE,k)};Tii.grademark.PermissionManager.prototype.checkPermission=function(b){var c=this._userRole;if(this._mode!=Tii.grademark.ModeManager.MODE_DEFAULT){c=this._getModeRole()}var a=this.checkRolePermission(c,b);return a};Tii.grademark.PermissionManager.prototype.checkPermissionChange=function(e,a){var f=this._userRole;var b=this._userRole;if(this._mode!=Tii.grademark.ModeManager.MODE_DEFAULT){f=this._getModeRole()}if(a!=Tii.grademark.ModeManager.MODE_DEFAULT){b=this._getModeRole(a)}var g=this.checkRolePermission(f,e);var c=this.checkRolePermission(b,e);var d=null;if(g!=c){if(g){d=Tii.grademark.PermissionManager.CHANGED_TO_TRUE}else{d=Tii.grademark.PermissionManager.CHANGED_TO_FALSE}}return d};Tii.grademark.PermissionManager.prototype.checkUserPermission=function(b){var a=this.checkRolePermission(this._userRole,b);return a};Tii.grademark.PermissionManager.prototype.isStudentUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_STUDENT)};Tii.grademark.PermissionManager.prototype.isInstructorUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_INSTRUCTOR)};Tii.grademark.PermissionManager.prototype.isMasterInstructorUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_MASTER_INSTRUCTOR)};Tii.grademark.PermissionManager.prototype.isLibraryAdministratorUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_LIBRARY_ADMINISTRATOR)};Tii.grademark.PermissionManager.prototype.isReaderUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_READER)};Tii.grademark.PermissionManager.prototype.isViewingReaderUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_VIEWING_READER)};Tii.grademark.PermissionManager.prototype.isSupervisorUser=function(){return(this._userRole==Tii.grademark.PermissionManager.ROLE_SUPERVISOR)};Tii.grademark.PermissionManager.prototype.getUserRoleString=function(){var a=this._userRole;a=a.replace("_"," ");a=a.replace(/\b(\w)/g,function(b){return b.toUpperCase()});return a};Tii.grademark.PermissionManager.prototype.setMode=function(a){this._mode=a};Tii.grademark.PermissionManager.prototype._getModeRole=function(b){var c=null;var a=b||this._mode;if(a==Tii.grademark.ModeManager.MODE_STUDENT){c=Tii.grademark.PermissionManager.ROLE_STUDENT_MODE}else{if(a==Tii.grademark.ModeManager.MODE_PAPER){if(this.isStudentUser()){c=Tii.grademark.PermissionManager.ROLE_STUDENT_PAPER_MODE}else{c=Tii.grademark.PermissionManager.ROLE_PAPER_MODE}}}return c};Tii.grademark.ApplicationHeader=function(b,a){var c={};this.application=a;Tii.grademark.ApplicationHeader.superclass.constructor.call(this,b,c)};YAHOO.lang.extend(Tii.grademark.ApplicationHeader,IP.widget.ApplicationHeader,{notificationLine:null,toolbar:null,assignment:null,paperJumpMenu:null,paperInformationBox:null,_firstPaper:true,mainToolbarElement:null,paperJumpMenuElement:null,paperInfoBoxElement:null,notificationLineElement:null,paperTitleSmallGroupElement:null,paperTitleSmallElement:null,paperAuthorSmallElement:null,paperTitleGroupElement:null,paperTitleElement:null,paperAuthorElement:null,anonymousMarking:null});Tii.grademark.ApplicationHeader.prototype.init=function(a,c){Tii.grademark.ApplicationHeader.superclass.init.call(this,a,c);this.permissionManager=Tii.grademark.ApplicationServices.getPermissionManager();this.modeManager=Tii.grademark.ApplicationServices.getModeManager();this.application.assignment.addListener(Tii.grademark.Assignment.EVENT_PAPER_ACTIVATED,this._paperActivatedHandler,this);this.application.assignment.addListener(Tii.grademark.Paper.EVENT_PAPER_DATA_LOADED,this._paperDataLoadedHandler,this);this.application.assignment.addListener(Tii.grademark.Paper.EVENT_READ_ACTIVATED,this._readActivatedHandler,this);this.application.assignment.addListener(Tii.grademark.Read.EVENT_SCORE_CLEARED,this._readClearedHandler,this);this.application.assignment.addListener(Tii.grademark.Mark.EVENT_MARK_CREATED,this._markCreatedHandler,this);this.application.assignment.addListener(Tii.grademark.Mark.EVENT_MARK_DESTROYED,this._markDestroyedHandler,this);this.modeManager.modeChangedEvent.subscribe(this._modeChangedHandler,this,this);Tii.grademark.ApplicationServices.getMessageCenter().connectionStateChangeEvent.subscribe(this._connectionStateChangeHandler,this,this);this.application.assignment.addListener(Tii.grademark.Assignment.EVENT_PAPER_DELETED,this._paperDeletedHandler,this);this._initAnnouncementsBars();this._initTop();this._initMasthead();this._initNotice();this._initToolbar();this._initAnonymousMarking();var b=this.application.assignment.getActivePaper();if(b.dataLoaded){this._populatePaperData(b);var d=b.getActiveRead();if(d){this._populateReadData(d)}}if(config.readOnly){this.notificationLine.show({message:"Marks on this paper cannot be edited because either the class has expired or the GradeMark product has become read only."})}$E.addListener("app_logo","click",function(f){if(f.shiftKey){IP.util.Logger.showLogWindow()}},this,true)};Tii.grademark.ApplicationHeader.prototype.destroy=function(){this.application.assignment.removeListener(Tii.grademark.Assignment.EVENT_PAPER_ACTIVATED,this._paperActivatedHandler,this);this.application.assignment.removeListener(Tii.grademark.Paper.EVENT_PAPER_DATA_LOADED,this._paperDataLoadedHandler,this);this.application.assignment.removeListener(Tii.grademark.Assignment.EVENT_PAPER_DELETED,this._paperDeletedHandler,this);this.application.assignment.removeListener(Tii.grademark.Paper.EVENT_READ_ACTIVATED,this._readActivatedHandler,this);this.application.assignment.removeListener(Tii.grademark.Read.EVENT_READ_GRADE_SAVED,this._readGradeSavedHandler,this);this.application.assignment.removeListener(Tii.grademark.Read.EVENT_SCORE_CLEARED,this._readClearedHandler,this);this.application.assignment.removeListener(Tii.grademark.Mark.EVENT_MARK_CREATED,this._markCreatedHandler,this);this.application.assignment.removeListener(Tii.grademark.Mark.EVENT_MARK_DESTROYED,this._markDestroyedHandler,this);this.modeManager.modeChangedEvent.unsubscribe();this.paperJumpMenu.firstItemClickedEvent.unsubscribe();this.paperJumpMenu.previousItemClickedEvent.unsubscribe();this.paperJumpMenu.nextItemClickedEvent.unsubscribe();this.paperJumpMenu.lastItemClickedEvent.unsubscribe();Tii.grademark.ApplicationHeader.superclass.destroy.call(this)};Tii.grademark.ApplicationHeader.prototype._locateElements=function(){Tii.grademark.ApplicationHeader.superclass._locateElements.call(this);this.wrapperElement=document.getElementByHandle("app_header_wrapper",this.element,"div");this.announcementsBarElement=document.getElementByHandle("application_announcements",this.element,"div");this.connectionStateBarElement=document.getElementByHandle("connection_state_announcements",this.element,"div");this.paperJumpMenuElement=document.getElementByHandle("paper_jump_menu",this.topElement,"div");this.paperInfoBoxElement=document.getElementByHandle("paper_info_box",this.mastheadElement,"div");this.notificationLineElement=document.getElementByHandle("application_notification_line",this.noticeElement,"div");this.paperTitleSmallGroupElement=document.getElementByHandle("paper_title_small_group",this.topElement,"h2");this.paperTitleSmallElement=document.getElementByHandle("paper_title_small",this.topElement,"span");this.paperAuthorSmallGroupElement=document.getElementByHandle("paper_author_small_group",this.topElement,"span");this.paperAuthorSmallElement=document.getElementByHandle("paper_author_small",this.topElement,"a");this.paperAuthorNonenrolledSmallElement=document.getElementByHandle("paper_author_nonenrolled_small",this.topElement,"a");this.paperTitleGroupElement=document.getElementByHandle("paper_title_group",this.mastheadElement,"h2");this.paperTitleElement=document.getElementByHandle("paper_title",this.mastheadElement,"strong");this.paperAuthorGroupElement=document.getElementByHandle("paper_author_group",this.mastheadElement,"span");this.paperAuthorElement=document.getElementByHandle("paper_author",this.mastheadElement,"a");this.paperAuthorNonenrolledElement=document.getElementByHandle("paper_author_nonenrolled",this.mastheadElement,"a")};Tii.grademark.ApplicationHeader.prototype._initAnnouncementsBars=function(){var c=function(){this.application.getConnectionInfoWindow().show()};this.connectionStateBar=new Tii.grademark.AnnouncementsBar(this,this.connectionStateBarElement,{fireEvents:true});var d=function(){this.application.getAnnouncementsWindow().show()};this.announcementsBar=new Tii.grademark.AnnouncementsBar(this,this.announcementsBarElement,{moreInfoFn:d.bind(this),fireEvents:false,listenOnBar:this.connectionStateBar});var b=Tii.grademark.User.getPreferences();var a=this.application.config.announcement_version;if(b.get("last_viewed_announcement")!=a){this.announcementsBar.onDismiss=function(){b.set("last_viewed_announcement",a);this.announcementsBar.onDismiss=null}.bind(this);this.announcementsBar.show(this.application.config.announcement_title+" <sup>New!</sup>")}};Tii.grademark.ApplicationHeader.prototype._initTop=function(){if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS)){this.paperJumpMenu=new IP.widget.JumpMenu(this.paperJumpMenuElement,{wrapIndicator:true});this.paperJumpMenu.setTotal(this.application.assignment.getPapers().size());this.paperJumpMenu.firstItemClickedEvent.subscribe(this._firstItemClickedHandler,null,this);this.paperJumpMenu.previousItemClickedEvent.subscribe(this._previousItemClickedHandler,null,this);this.paperJumpMenu.nextItemClickedEvent.subscribe(this._nextItemClickedHandler,null,this);this.paperJumpMenu.lastItemClickedEvent.subscribe(this._lastItemClickedHandler,null,this);this.paperJumpMenu.setBeforeGoToItemHandler(this._beforeGoToPaperFunction.bind(this))}};Tii.grademark.ApplicationHeader.prototype._initMasthead=function(){this.paperInformationBox=new Tii.grademark.InformationBox(this.paperInfoBoxElement,this.application)};Tii.grademark.ApplicationHeader.prototype._initNotice=function(){this.notificationLine=new IP.widget.InlineNotifier(this.notificationLineElement)};Tii.grademark.ApplicationHeader.prototype._initToolbar=function(){this.toolbar=new Tii.grademark.ApplicationToolbar(this.mainToolbarElement,this.application)};Tii.grademark.ApplicationHeader.prototype._populatePaperData=function(c){var a,b;if(c.anonymousMarking){b="";Element.hide(this.paperAuthorGroupElement);Element.hide(this.paperAuthorSmallGroupElement);this.anonymousMarking.show()}else{a=c.author.firstName;a+=" ";a+=c.author.lastName;b="mailto: ";b+=c.author.email;Element.show(this.paperAuthorGroupElement);Element.show(this.paperAuthorSmallGroupElement);this.anonymousMarking.hide()}this.paperTitleSmallElement.innerHTML=c.title+((c.anonymousMarking)?"":",");this.paperTitleElement.innerHTML=c.title;if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_AUTHOR_INFO)){if(c.author.id>=1){this.paperAuthorSmallElement.innerHTML=a;this.paperAuthorSmallElement.href=b;this.paperAuthorElement.innerHTML=a;this.paperAuthorElement.href=b;Element.show(this.paperAuthorElement);Element.show(this.paperAuthorSmallElement);Element.hide(this.paperAuthorNonenrolledElement);Element.hide(this.paperAuthorNonenrolledSmallElement);this.paperAuthorNonenrolledElement.innerHTML="";this.paperAuthorNonenrolledSmallElement.innerHTML=""}else{this.paperAuthorNonenrolledElement.innerHTML=a;this.paperAuthorNonenrolledSmallElement.innerHTML=a;Element.show(this.paperAuthorNonenrolledElement);Element.show(this.paperAuthorNonenrolledSmallElement);Element.hide(this.paperAuthorElement);Element.hide(this.paperAuthorSmallElement);this.paperAuthorSmallElement.innerHTML="";this.paperAuthorSmallElement.href="";this.paperAuthorElement.innerHTML="";this.paperAuthorElement.href=""}}else{Element.remove(this.paperAuthorSmallGroupElement);Element.remove(this.paperAuthorGroupElement)}if(this.paperJumpMenu){this.paperJumpMenu.setCurrent(this.application.assignment.getPapers().indexOf(c)+1)}this.paperInformationBox.updatePaperInfo({id:c.id,submitDate:c.submittedDate,wordCount:c.wordCount,report:c.report});this._populateReadData();if(this._firstPaper){Element.show(this.paperInfoBoxElement);Element.show(this.paperTitleGroupElement);if(this.paperJumpMenu){Element.show(this.paperJumpMenuElement)}this._firstPaper=false}};Tii.grademark.ApplicationHeader.prototype._populateReadData=function(){var b=this.application.assignment.getActiveRead();var a=b.getMarkSet().getMarks().size();this.toolbar.initDefaultReadsMenu(b.type);this.toolbar.initPrevNextMarkButtons(a);this.toolbar.populateGrade(b.grade)};Tii.grademark.ApplicationHeader.prototype._assignmentCreatedHandler=function(a){this.application.assignment=$E.getTarget(a).assignment;this._populateAssignmentData()};Tii.grademark.ApplicationHeader.prototype._paperActivatedHandler=function(b){var a=$E.getTarget(b).getActivePaper();if(a.dataLoaded){this._populatePaperData(a)}};Tii.grademark.ApplicationHeader.prototype._paperDataLoadedHandler=function(a){var b=$E.getTarget(a);this._populatePaperData(b)};Tii.grademark.ApplicationHeader.prototype._paperDeletedHandler=function(b){this._initTop();var a=this.application.assignment.getActivePaper();this.paperJumpMenu.setCurrent(this.application.assignment.getPapers().indexOf(a)+1)};Tii.grademark.ApplicationHeader.prototype._readActivatedHandler=function(a){var b=$E.getTarget(a).getActiveRead();this._populateReadData(b)};Tii.grademark.ApplicationHeader.prototype._readClearedHandler=function(a){this.toolbar.clearGradeField()};Tii.grademark.ApplicationHeader.prototype._markCreatedHandler=function(c){var b=this.application.assignment.getActiveRead().getMarkSet();var a=b.getMarks().size()+1;if(a===1){this.toolbar.enablePrevNextMarkButtons()}};Tii.grademark.ApplicationHeader.prototype._markDestroyedHandler=function(c){if(c.data){if($E.getTarget(c).type=="inline"){this.notificationLine.show({message:"Your comment has been deleted.",undo_callback_function:c.data})}else{this.notificationLine.show({message:"Your ",undo_callback_function:c.data})}}var b=this.application.assignment.getActiveRead().getMarkSet();var a=b.getMarks().size();if(a===0){this.toolbar.disablePrevNextMarkButtons()}};Tii.grademark.ApplicationHeader.prototype._beforeGoToPaperFunction=function(b){this.continueFunction=b;if(this.application.footer.generalComments){if(this.application.footer.generalComments.isChanged()){var a=Tii.grademark.User.getPreferences().get("bypassGenComEditStateExitWarning");if(!a){this.application.footer.confirmModalConfig.okFunction=function(c){this.application.footer.generalComments.save();this.continueFunction(true);Tii.grademark.User.getPreferences().set("bypassGenComEditStateExitWarning",c.remember,true)}.bind(this);IP.widget.ConfirmModal.show(this.application.footer.confirmModalConfig)}else{this.application.footer.generalComments.save();this.continueFunction(true)}}else{this.application.footer.generalComments.enterReadState();this.continueFunction(true)}}else{this.continueFunction(true)}};Tii.grademark.ApplicationHeader.prototype._firstItemClickedHandler=function(a){this.toolbar.clearGradeField();this.activateFirstPaper()};Tii.grademark.ApplicationHeader.prototype._previousItemClickedHandler=function(a){this.toolbar.clearGradeField();this.activatePreviousPaper()};Tii.grademark.ApplicationHeader.prototype._nextItemClickedHandler=function(a){this.toolbar.clearGradeField();this.activateNextPaper()};Tii.grademark.ApplicationHeader.prototype._lastItemClickedHandler=function(a){this.toolbar.clearGradeField();this.activateLastPaper()};Tii.grademark.ApplicationHeader.prototype._maxMinButtonClicked=function(b){var a=this.mastheadElement.style.display;if(a=="block"){this.minimize();Element.show(this.topTextElement);Element.show(this.paperTitleSmallGroupElement)}else{if(a=="none"){this.maximize();Element.hide(this.topTextElement);Element.hide(this.paperTitleSmallGroupElement)}}};Tii.grademark.ApplicationHeader.prototype._connectionStateBarDisplayChangedHandler=function(c,a){var b=a[0];if(b=="show"){this.announcementsBar.hide()}else{if(b=="hide"){this.announcementsBar.show()}}};Tii.grademark.ApplicationHeader.prototype._modeChangedHandler=function(b,a){this._changeModeDisplay(a[1])};Tii.grademark.ApplicationHeader.prototype._changeModeDisplay=function(a){if(this.paperJumpMenu){var b=this.permissionManager.checkPermissionChange(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS,a);if(b==Tii.grademark.PermissionManager.CHANGED_TO_TRUE){Element.show(this.paperJumpMenuElement)}else{if(b==Tii.grademark.PermissionManager.CHANGED_TO_FALSE){Element.hide(this.paperJumpMenuElement)}}}};Tii.grademark.ApplicationHeader.prototype._connectionStateChangeHandler=function(c,a){var e=a[0];if(Tii.grademark.ApplicationServices.getMessageCenter().isOffline()){if(this.paperJumpMenu){this.paperJumpMenu.disable()}if(e===IP.net.MessageCenter.FAILED_CONNECTION_STATE){this.connectionStateBar.show("Unable to reach www.turnitin.com. GradeMark has been changed to read-only mode.");IP.util.Logger.logDebug("Unable to reach www.turnitin.com. GradeMark has been changed to read-only mode.")}else{if(e===IP.net.MessageCenter.USER_LOGGED_OUT_STATE&&Tii.grademark.ApplicationServices.usingIntegration()){this.connectionStateBar.show("Signed off! To keep grading, close this window and refresh your assignment (Windows: control-R and Mac: command-R).")}else{if(e===IP.net.MessageCenter.USER_LOGGED_OUT_STATE){var d=this.application.isReloginSupported();this.connectionStateBar.show("Sorry, you have been signed off. Please sign in to to continue grading.",0,d);IP.util.Logger.logDebug("Sorry, you have been signed off. Please sign in to to continue grading.")}else{if(e===IP.net.MessageCenter.SERVER_ERROR_STATE){IP.util.Logger.logDebug("Server error.");var b={header:"Error",message:"We're sorry, but GradeMark is experiencing an error and some of your changes may not have been saved. If you reload your paper, GradeMark should be back to normal. Thanks for your patience.",okLabel:"Reload GradeMark",okFunction:function(){var g=(new Date).getTime();var f=window.location.href;f.replace(/([&\?]r)=\d+(\.?\d+)/,"$1="+g);window.location.href=f},cancelLabel:"Continue in read-only mode",cancelFunction:function(){this.connectionStateBar.show("We're sorry, but GradeMark is experiencing an error. Please reload GradeMark.")}.bind(this)};IP.widget.ConfirmModal.show(b)}}}}}else{if(e===IP.net.MessageCenter.NORMAL_CONNECTION_STATE){if(this.paperJumpMenu){this.paperJumpMenu.enable()}this.connectionStateBar.show("Connection successful! You can now continue grading.",{timeout:15000});IP.util.Logger.logDebug("Connection successful! You can now continue grading.")}}};Tii.grademark.ApplicationHeader.prototype.activateNextPaper=function(){var c=this.application.assignment.getPapers();var b=c.getItemByIndex(this.application.assignment.getNextPaperIndex());var a=b.id;this._setActivePaper(a)};Tii.grademark.ApplicationHeader.prototype.activatePreviousPaper=function(){var c=this.application.assignment.getPapers();var b=c.getItemByIndex(this.application.assignment.getPreviousPaperIndex());var a=b.id;this._setActivePaper(a)};Tii.grademark.ApplicationHeader.prototype.activateFirstPaper=function(){var c=this.application.assignment.getPapers();var b=c.getItemByIndex(0);var a=b.id;this._setActivePaper(a)};Tii.grademark.ApplicationHeader.prototype.activateLastPaper=function(){var c=this.application.assignment.getPapers();var b=c.getItemByIndex(c.size()-1);var a=b.id;this._setActivePaper(a)};Tii.grademark.ApplicationHeader.prototype._setActivePaper=function(a){if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS)){this.application.historyManager.setActivePaper(a)}else{this.application.assignment.setActivePaper(a,false)}};Tii.grademark.ApplicationHeader.prototype._initAnonymousMarking=function(){this.anonymousMarking=new Tii.grademark.AnonymousMarking($("disable_anonymous_marking"),this.application,this)};Tii.grademark.ApplicationFooter=function(b,a,c){c=c||{};this.assignment=a.assignment;this.application=a;Tii.grademark.ApplicationFooter.superclass.constructor.call(this,b,c);this._initContentPanelPadding=56};YAHOO.lang.extend(Tii.grademark.ApplicationFooter,IP.widget.ApplicationFooter);Tii.grademark.ApplicationFooter.prototype.init=function(a,b){this.initBubblingEventProvider(this.application);Tii.grademark.ApplicationFooter.superclass.init.call(this,a,b);this.permissionManager=Tii.grademark.ApplicationServices.getPermissionManager();this.modeManager=Tii.grademark.ApplicationServices.getModeManager();this._statusToolbarLabelElement=document.getElementByHandle("status_bar_label",this.statusToolbar.element,"h2");this.application.addListener(Tii.grademark.Application.EVENT_SECONDARY_JS_LOADED,function(){this._enableButtons()},this);this._disableButtons();this._setTabPreloaders();this._initPermissions();this.resizeEvent.subscribe(this._resizeEventHandler,this,this);this.assignment.addListener(Tii.grademark.Assignment.EVENT_PAPER_ACTIVATED,this._paperActivatedHandler,this);this.assignment.addListener(Tii.grademark.Paper.EVENT_PAPER_DATA_LOADED,this._paperDataLoadedHandler,this);this.assignment.addListener(Tii.grademark.Paper.EVENT_READ_ACTIVATED,this._readActivatedHandler,this);this.assignment.addListener(Tii.grademark.Read.EVENT_READ_SAVED,this._readSavedHandler,this);this.contentPanel.panelVisibilityChangeEvent.subscribe(this._panelVisibilityChangeHandler,this,this);this.contentPanel.beforeHidePanelEvent.subscribe(this._beforeHidePanelHandler,this,this);this.modeManager.modeChangedEvent.subscribe(this._modeChangedHandler,this,this);this.assignment.addListener(Tii.grademark.Assignment.EVENT_RUBRIC_ATTACHED,this._rubricAttachedHandler,this);this.assignment.addListener(Tii.grademark.Assignment.EVENT_RUBRIC_UPDATED,this._rubricUpdatedHandler,this);Tii.grademark.ApplicationServices.getMessageCenter().flushStartEvent.subscribe(this._flushStartHandler,this,this);Tii.grademark.ApplicationServices.getMessageCenter().flushSuccessEvent.subscribe(this._flushSuccessHandler,this,this);Tii.grademark.ApplicationServices.getMessageCenter().flushPartialSuccessEvent.subscribe(this._flushPartialSuccessHandler,this,this);Tii.grademark.ApplicationServices.getMessageCenter().connectionStateChangeEvent.subscribe(this._connectionStateChangeHandler,this,this);this.UNRESPONSIVE_CONNECTION_MESSAGE_INDEX=this.statusToolbar.addStatusMessage("trying to reach www.turnitin.com...",false);this.FAILED_CONNECTION_MESSAGE_INDEX=this.statusToolbar.addStatusMessage("unable to reach www.turnitin.com",false);this.NORMAL_CONNECTION_MESSAGE_INDEX=this.statusToolbar.addStatusMessage("connection successful!",false);var c=this.assignment.getActiveRead();if(c){this._populateReadData()}this.confirmModalConfig={title:"Warning",message:"You have unsaved changes in the General Comments. Would you like to save them before moving on? Cancel will return you to the edit panel.",remember:true,rememberText:"Remember this?",cancelFunction:function(d){Tii.grademark.User.getPreferences().set("bypassGenComEditStateExitWarning",d.remember,true)}}};Tii.grademark.ApplicationFooter.prototype._disableButtons=function(){var b=this.statusToolbar.buttons.length;for(var a=0;a<b;a++){this.statusToolbar.buttons[a].set("disabled",true)}};Tii.grademark.ApplicationFooter.prototype._enableButtons=function(){var b=this.statusToolbar.buttons.length;for(var a=0;a<b;a++){this.statusToolbar.buttons[a].set("disabled",false)}};Tii.grademark.ApplicationFooter.prototype._setTabPreloaders=function(){this.statusToolbar.buttons[0].addListener("click",this.loadCommentList,this,this);$E.addListener(this.contentPanel.getTab(0).get("labelEl"),"click",this.loadCommentList,this,true);this.statusToolbar.buttons[1].addListener("click",this.loadGeneralComments,this,this);$E.addListener(this.contentPanel.getTab(1).get("labelEl"),"click",this.loadGeneralComments,this,true);this.statusToolbar.buttons[2].addListener("click",this.loadScorecard,this,this);$E.addListener(this.contentPanel.getTab(2).get("labelEl"),"click",this.loadScorecard,this,true);this.contentPanel.addListener("beforeActiveTabChange",this._activeTabChangeHandler,this,this)};Tii.grademark.ApplicationFooter.prototype.loadCommentList=function(){this.statusToolbar.buttons[0].removeListener("click",this.loadCommentList);$E.removeListener(this.contentPanel.getTab(0).get("labelEl"),"click",this.loadCommentList);if(!this._commentList){var a=function(){Element.hide("comment_list_loading");$D.setStyle("comment_list_container","overflow","hidden");this._commentList=new Tii.grademark.CommentList(this.assignment);this.resizeEvent.unsubscribe(this._resizeEventHandler);this.resizeEvent.subscribe(this._resizeEventHandler,this,this);var c=this.contentPanel.getTab(0);var b=function(d){if(d.newValue===true){$("content_panel_body").style.overflow="visible"}else{$("content_panel_body").style.overflow="auto"}};c.subscribe("beforeContentVisibleChange",b);this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"comment_list"})}.bind(this);Tii.grademark.ApplicationServices.loadModule("comment_list",a)}};Tii.grademark.ApplicationFooter.prototype.loadGeneralComments=function(){this.statusToolbar.buttons[1].removeListener("click",this.loadGeneralComments);$E.removeListener(this.contentPanel.getTab(1).get("labelEl"),"click",this.loadGeneralComments);if(!this.generalComments){var a=function(){Element.hide("general_comments_loading");var b=document.getElementByHandle("general_comments",this._contentElement,"div");this.generalComments=new Tii.grademark.GeneralComments(b,this.assignment);this.generalComments.setYPadding(this.FOOTER_DEFAULT_HEIGHT);this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"general_comments"})}.bind(this);Tii.grademark.ApplicationServices.loadModule("general_comments",a)}};Tii.grademark.ApplicationFooter.prototype.loadScorecard=function(){this.statusToolbar.buttons[2].removeListener("click",this.loadScorecard);$E.removeListener(this.contentPanel.getTab(2).get("labelEl"),"click",this.loadScorecard);if(!this.scorecard){this.noRubricInstructorElement=document.getElementByHandle("no_rubric_instructor",this._contentElement,"div");this.noRubricStudentElement=document.getElementByHandle("no_rubric_student",this._contentElement,"div");this.openRubricLibraryLink=document.getElementByHandle("open_rubric_library_link",this._contentElement,"a");if(this.assignment.getRubric()){this.createScorecard();this.resizeEvent.unsubscribe(this._resizeEventHandler);this.resizeEvent.subscribe(this._resizeEventHandler,this,this);this.fireEvent(this,Tii.grademark.Application.EVENT_OPTIONAL_MODULE_LOADED,{module:"scorecard"})}else{Element.hide("rubric_scorecard_loading");if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.EDIT_RUBRIC)){Element.hide(this.noRubricStudentElement);Element.show(this.noRubricInstructorElement);if(Tii.grademark.ApplicationServices.getMessageCenter().isOffline()){this.openRubricLibraryLink.style.disabled=true}else{$E.addListener(this.openRubricLibraryLink,"click",this._openRubricLibraryLinkClickHandler,this,true)}}else{Element.hide(this.noRubricInstructorElement);Element.show(this.noRubricStudentElement)}}}};Tii.grademark.ApplicationFooter.prototype._openRubricLibraryLinkClickHandler=function(b){$E.stopEvent(b);var a=function(c){c.show()};this.application.getRubricLibrary(a)};Tii.grademark.ApplicationFooter.prototype.loadErrorList=function(){if(!this._errorList){this._errorList=new Tii.grademark.ErrorList(this,this._lostObjects);this._errorList.panelActiveChangeEvent.subscribe(this._errorListPanelActiveChangeHandler,this,this);this._errorList.errorListEmptyEvent.subscribe(this._errorListEmptyHandler,this,this)}else{this._errorList.addMarks(this._lostObjects)}if(!this.contentPanel.isVisible()||(this.contentPanel.get("activeIndex")!=3)){this.assignment.getActiveRead().getMarkSet().hideInvalidMarks()}};Tii.grademark.ApplicationFooter.prototype._errorListPanelActiveChangeHandler=function(b,a){if(a[0]=="errorListPanelActivated"){this.assignment.getActiveRead().getMarkSet().showInvalidMarks()}else{if(a[0]=="errorListPanelDeactivated"){this.assignment.getActiveRead().getMarkSet().hideInvalidMarks()}}};Tii.grademark.ApplicationFooter.prototype._panelVisibilityChangeHandler=function(b,a){if(this.contentPanel.get("activeIndex")==3){if(a[0]=="show"){this.assignment.getActiveRead().getMarkSet().showInvalidMarks()}else{if(a[0]=="hide"){this.assignment.getActiveRead().getMarkSet().hideInvalidMarks()}}}};Tii.grademark.ApplicationFooter.prototype._beforeHidePanelHandler=function(c,b){if(this.generalComments){if(this.generalComments.isChanged()){var a=Tii.grademark.User.getPreferences().get("bypassGenComEditStateExitWarning");if(!a){this.confirmModalConfig.okFunction=function(d){this.generalComments.save();this.contentPanel.hide("okClick",true);Tii.grademark.User.getPreferences().set("bypassGenComEditStateExitWarning",d.remember,true)}.bind(this);IP.widget.ConfirmModal.show(this.confirmModalConfig);return false}else{this.generalComments.save()}}else{this.generalComments.enterReadState()}}return true};Tii.grademark.ApplicationFooter.prototype._activeTabChangeHandler=function(b){var c=b.prevValue;var d=b.newValue;if((c!=d)&&(c.get("label")=="general comments")){if(this.generalComments.isChanged()){var a=Tii.grademark.User.getPreferences().get("bypassGenComEditStateExitWarning");if(!a){this.confirmModalConfig.okFunction=function(e){this.generalComments.save();this.contentPanel.set("activeTab",d,true);Tii.grademark.User.getPreferences().set("bypassGenComEditStateExitWarning",e.remember,true)}.bind(this);IP.widget.ConfirmModal.show(this.confirmModalConfig);return false}else{this.generalComments.save()}}else{this.generalComments.enterReadState()}}return true};Tii.grademark.ApplicationFooter.prototype._errorListEmptyHandler=function(b,a){this.removePanel(3)};Tii.grademark.ApplicationFooter.prototype._resizeEventHandler=function(c,b){var a=b[0].height;var e=b[0].offsetY;if(this.contentPanel.isVisible()){if(this.generalComments){this.generalComments.setHeights(a)}var d=a-this._initContentPanelPadding;if(this._commentList){this._commentList.setListHeight(d)}}};Tii.grademark.ApplicationFooter.prototype._initPermissions=function(){if(!this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){Element.remove(this._statusToolbarLabelElement)}};Tii.grademark.ApplicationFooter.prototype._paperActivatedHandler=function(b){var a=b.target.getActivePaper();if(a.dataLoaded){this._populateReadData()}};Tii.grademark.ApplicationFooter.prototype._paperDataLoadedHandler=function(a){this._populateReadData()};Tii.grademark.ApplicationFooter.prototype._readActivatedHandler=function(a){this._populateReadData()};Tii.grademark.ApplicationFooter.prototype._readSavedHandler=function(a){var b=this.assignment.getActiveRead();if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){this._displayLastSaved(b.lastSavedFull)}};Tii.grademark.ApplicationFooter.prototype._flushStartHandler=function(a){this.statusToolbar.showSavingMessage()};Tii.grademark.ApplicationFooter.prototype._flushSuccessHandler=function(a){};Tii.grademark.ApplicationFooter.prototype._flushPartialSuccessHandler=function(a,f){var c=f[0];var g=c.length;this._lostObjects=[];for(var e=0;e<g;e++){var d=c[e].data;var h=d.type;if((type==Tii.grademark.Comment.TYPE)||(type==Tii.grademark.QuickMark.TYPE)||(type==Tii.grademark.InlineComment.TYPE)){this._lostObjects.push(d)}}if(this._lostObjects.length>0){var b=function(){this.loadErrorList()}.bind(this);var j="There were errors in saving some of your marks. See the 'error list' below in the footer.";IP.widget.AlertModal.show({message:j,okFunction:b})}};Tii.grademark.ApplicationFooter.prototype._populateReadData=function(){var a=this.assignment.getActiveRead();if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){this._displayLastSaved(a.lastSavedFull)}};Tii.grademark.ApplicationFooter.prototype.initForStudentUser=function(){var a=this.assignment.getActiveRead();if(this.permissionManager.isStudentUser()){if(a.summary&&a.summary.length>0&&a.summary!=="null"&&a.summary!==""){this.loadGeneralComments();IP.Util.deferExecution(function(){this._openContentPanel(1)}.bind(this))}}};Tii.grademark.ApplicationFooter.prototype._displayLastSaved=function(a){this.statusToolbar.updateStatusMessage(a,true,null," Last saved: ")};Tii.grademark.ApplicationFooter.prototype._modeChangedHandler=function(b,a){this._changeModeDisplay(a[1])};Tii.grademark.ApplicationFooter.prototype._changeModeDisplay=function(a){var b=2;var c=this.permissionManager.checkPermissionChange(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE,a);if(c==Tii.grademark.PermissionManager.CHANGED_TO_TRUE){Element.show(this._statusToolbarLabelElement);this.statusToolbar.showStatusMessage(b)}else{if(c==Tii.grademark.PermissionManager.CHANGED_TO_FALSE){Element.hide(this._statusToolbarLabelElement);b=this.statusToolbar.activeMessageIndex;this.statusToolbar.hideStatusMessage(this.statusToolbar.activeMessageIndex)}}var d=this.permissionManager.checkPermissionChange(Tii.grademark.PermissionManager.EDIT_RUBRIC,a);if(d==Tii.grademark.PermissionManager.CHANGED_TO_TRUE){Element.hide(this.noRubricStudentElement);Element.show(this.noRubricInstructorElement)}else{if(d==Tii.grademark.PermissionManager.CHANGED_TO_FALSE){Element.hide(this.noRubricInstructorElement);Element.show(this.noRubricStudentElement)}}};Tii.grademark.ApplicationFooter.prototype._rubricAttachedHandler=function(b){var a=b.data;if(a&&!this.scorecard){this.loadScorecard()}};Tii.grademark.ApplicationFooter.prototype._rubricUpdatedHandler=function(b){var a=b.data;if(a&&!this.scorecard){this.loadScorecard()}};Tii.grademark.ApplicationFooter.prototype.createScorecard=function(){var a=function(){Element.hide("rubric_scorecard_loading");var c=document.getElementByHandle("scorecard",this.element,"div");this.scorecard=new Tii.grademark.Scorecard(c,this.application)}.bind(this);var b=function(){$E.onAvailable("rubric_datagrid_templates",a)};Tii.grademark.ApplicationServices.loadModule("scorecard",b)};Tii.grademark.ApplicationFooter.prototype._connectionStateChangeHandler=function(c,a){var d=a[0];if(d===IP.net.MessageCenter.UNRESPONSIVE_CONNECTION_STATE){this.statusToolbar.showStatusMessage(this.UNRESPONSIVE_CONNECTION_MESSAGE_INDEX)}else{if(d===IP.net.MessageCenter.FAILED_CONNECTION_STATE||d===IP.net.MessageCenter.USER_LOGGED_OUT_STATE){this.statusToolbar.showStatusMessage(this.FAILED_CONNECTION_MESSAGE_INDEX);if(this.openRubricLibraryLink){this.openRubricLibraryLink.disabled=true;$E.removeListener(this.openRubricLibraryLink,"click",this._openRubricLibraryLinkClickHandler)}}else{if(d===IP.net.MessageCenter.NORMAL_CONNECTION_STATE){var b=null;if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){b=function(){this._displayLastSaved(this.assignment.getActiveRead().lastSavedFull)}.bind(this)}this.statusToolbar.showStatusMessage(this.NORMAL_CONNECTION_MESSAGE_INDEX,5,b);if(this.openRubricLibraryLink){$E.addListener(this.openRubricLibraryLink,"click",this._openRubricLibraryLinkClickHandler,this,true);this.openRubricLibraryLink.disabled=false}}}}};Tii.grademark.ApplicationFooter.prototype.printPreviewHandler=function(a){this._commentList.printPreviewHandler(a)};Tii.grademark.ApplicationFooter.prototype.getCommentList=function(){return this._commentList};YAHOO.lang.augment(Tii.grademark.ApplicationFooter,IP.event.BubblingEventProvider);Tii.grademark.InformationBox=function(c,b,a){this.application=b;this.permissionManager=Tii.grademark.ApplicationServices.getPermissionManager();Tii.grademark.InformationBox.superclass.constructor.call(this,c,a)};YAHOO.lang.extend(Tii.grademark.InformationBox,IP.widget.InformationBox);Tii.grademark.InformationBox.KEY_ID="id";Tii.grademark.InformationBox.KEY_DATE_SUBMITTED="dateSubmitted";Tii.grademark.InformationBox.KEY_SIMILARITY="similarity";Tii.grademark.InformationBox.KEY_WORD_COUNT="wordCount";Tii.grademark.InformationBox.KEY_LAST_SAVED="lastSaved";Tii.grademark.InformationBox.KEY_TOTAL_MARKS="totalMarks";Tii.grademark.InformationBox.KEY_TIME_SPENT="timeSpent";Tii.grademark.InformationBox.KEY_STATUS="status";Tii.grademark.InformationBox.prototype.init=function(b,a){Tii.grademark.InformationBox.superclass.init.call(this,b,a);this._initDisplay();this._moreInfoButtonElement=$("expanded_info");this._moreInfoButton=new IP.widget.Button(this._moreInfoButtonElement,{type:"button",onclick:{fn:this._moreInfoButtonClickHandler.bind(this)}})};Tii.grademark.InformationBox.prototype._initDisplay=function(){var a=[{key:Tii.grademark.InformationBox.KEY_ID,label:"Id#"},{key:Tii.grademark.InformationBox.KEY_DATE_SUBMITTED,label:"Date Submitted"},{key:Tii.grademark.InformationBox.KEY_WORD_COUNT,label:"Word Count"},{key:Tii.grademark.InformationBox.KEY_SIMILARITY,label:"Similarity"}];this.addDataColumn(a);if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){this.addDataRow({key:Tii.grademark.InformationBox.KEY_LAST_SAVED,label:"Last Saved",display:"none"},1)}this.addDataRow({key:Tii.grademark.InformationBox.KEY_TOTAL_MARKS,label:"Total Marks",display:"none"},1);if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_TIME_SPENT)){this.addDataRow({key:Tii.grademark.InformationBox.KEY_TIME_SPENT,label:"Time Spent",display:"none"},1)}this.addDataRow({key:Tii.grademark.InformationBox.KEY_STATUS,label:"Status",display:"none"},1)};Tii.grademark.InformationBox.prototype._initSimilarityScoreButton=function(){this.similarityScoreButton=new IP.widget.SimilarityScoreButton("paper_sim_score_button",{score:"wait"});this.similarityScoreButtonElement=this.similarityScoreButton.get("element");this._replaceValueNode({key:Tii.grademark.InformationBox.KEY_SIMILARITY,value:this.similarityScoreButtonElement})};Tii.grademark.InformationBox.prototype.updatePaperInfo=function(a){if(a.id){this.changeValue({key:Tii.grademark.InformationBox.KEY_ID,value:a.id})}if(a.submitDate){this.changeValue({key:Tii.grademark.InformationBox.KEY_DATE_SUBMITTED,value:a.submitDate})}if(a.wordCount){this.changeValue({key:Tii.grademark.InformationBox.KEY_WORD_COUNT,value:a.wordCount})}if(a.report&&a.report.percentage){if(!this.similarityScoreButton){this._initSimilarityScoreButton()}this.similarityScoreButton.updateForNewReport(a.report)}else{this._hideRow(Tii.grademark.InformationBox.KEY_SIMILARITY)}};Tii.grademark.InformationBox.prototype.updateHiddenValuesForPrinting=function(){var a=this.application.assignment.getActivePaper();var b=a.getActiveRead();if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){this.changeValue({key:Tii.grademark.InformationBox.KEY_LAST_SAVED,value:b.lastSavedDate})}this.changeValue({key:Tii.grademark.InformationBox.KEY_TOTAL_MARKS,value:b.getMarkSet().getMarks().size()});if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_TIME_SPENT)){this.changeValue({key:Tii.grademark.InformationBox.KEY_TIME_SPENT,value:IP.Util.millisecondsToTime(b.gradingDuration)})}if(a.overwriteFlag){this.changeValue({key:Tii.grademark.InformationBox.KEY_STATUS,value:"draft"})}else{if(!a.overwriteFlag){this.changeValue({key:Tii.grademark.InformationBox.KEY_STATUS,value:"final"})}}};Tii.grademark.InformationBox.prototype.showRowsForPrinting=function(){this._showRow(Tii.grademark.InformationBox.KEY_LAST_SAVED);this._showRow(Tii.grademark.InformationBox.KEY_TOTAL_MARKS);this._showRow(Tii.grademark.InformationBox.KEY_TIME_SPENT);this._showRow(Tii.grademark.InformationBox.KEY_STATUS)};Tii.grademark.InformationBox.prototype.hideRowsForPrinting=function(){this._hideRow(Tii.grademark.InformationBox.KEY_LAST_SAVED);this._hideRow(Tii.grademark.InformationBox.KEY_TOTAL_MARKS);this._hideRow(Tii.grademark.InformationBox.KEY_TIME_SPENT);this._hideRow(Tii.grademark.InformationBox.KEY_STATUS)};Tii.grademark.InformationBox.prototype._moreInfoButtonMouseoverHandler=function(){this._extendedInfoWindow.updateValues()};Tii.grademark.InformationBox.prototype._moreInfoButtonClickHandler=function(){if(!this._extendedInfoWindow){this.createExtendedInformationWindow();$E.on(this._moreInfoButtonElement,"mouseover",this._moreInfoButtonMouseoverHandler,this,true)}this._extendedInfoWindow.show()};Tii.grademark.InformationBox.prototype.createExtendedInformationWindow=function(){this._extendedInfoWindow=new Tii.grademark.ExtendedInformationWindow(this.application);this._extendedInfoWindow.render(document.body)};Tii.grademark.InformationBox.prototype._replaceValueNode=function(a){var c=this.ibContent[a.key].valueElement;var b=c.parentNode;b.replaceChild(a.value,c);this.ibContent[a.key].value=a.value};Tii.grademark.ExtendedInformationWindow=function(b){this.application=b;var c="extended_information_window";var a={width:"30em",fixedcenter:true,constraintoviewport:true,underlay:"shadow",close:true,visible:false,draggable:true,modal:true};Tii.grademark.ExtendedInformationWindow.superclass.constructor.call(this,c,a)};YAHOO.extend(Tii.grademark.ExtendedInformationWindow,IP.widget.ResizePanel);Tii.grademark.ExtendedInformationWindow.prototype.init=function(b,a){Tii.grademark.ExtendedInformationWindow.superclass.init.call(this,b,a);this.cfg.queueProperty("draggable",true);this.permissionManager=Tii.grademark.ApplicationServices.getPermissionManager();this.prevPaperId=null;this._initPermissions();this.updateValues();$D.addClass(this.element,"library_container")};Tii.grademark.ExtendedInformationWindow.prototype._locateElements=function(){var a=document.getElementByHandle("extended_info_window_ul",this.element,"ul");this.similarityLiElement=document.getElementByHandle("similarity_li",a,"li");this.idValueElement=document.getElementByHandle("id_value",a,"span");this.dateSubmittedValueElement=document.getElementByHandle("date_submitted_value",a,"span");this.wordCountValueElement=document.getElementByHandle("word_count_value",a,"span");this.similarityValueElement=document.getElementByHandle("similarity_value",this.similarityLiElement,"span");this.lastSavedValueElement=document.getElementByHandle("last_saved_value",a,"span");this.totalMarksValueElement=document.getElementByHandle("total_marks_value",a,"span");this.timeSpentValueElement=document.getElementByHandle("time_spent_value",a,"span");this.statusValueElement=document.getElementByHandle("status_value",a,"span")};Tii.grademark.ExtendedInformationWindow.prototype._initPermissions=function(){if(!this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_LAST_SAVED_DATE)){Element.remove(this.lastSavedValueElement.parentNode)}if(!this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.VIEW_TIME_SPENT)){Element.remove(this.timeSpentValueElement.parentNode)}};Tii.grademark.ExtendedInformationWindow.prototype.updateValues=function(){var b=this.application.assignment.getActivePaper();var a=b.getActiveRead();if(b.id!==this.prevPaperId){this.idValueElement.innerHTML=b.id;this.dateSubmittedValueElement.innerHTML=b.submittedDate;this.wordCountValueElement.innerHTML=b.wordCount;if(b.overwriteFlag){this.statusValueElement.innerHTML="draft"}else{if(!b.overwriteFlag){this.statusValueElement.innerHTML="final"}}if(b.report&&b.report.percentage){if(!this.similarityScoreButton){this.similarityScoreButton=new IP.widget.SimilarityScoreButton("extended_info_sim_score_button",{score:"wait"});this.similarityScoreButtonElement=this.similarityScoreButton.get("element");this.similarityLiElement.replaceChild(this.similarityScoreButtonElement,this.similarityValueElement)}this.similarityScoreButton.updateForNewReport(b.report)}else{Element.remove(this.similarityValueElement.parentNode)}}if(this.lastSavedValueElement){this.lastSavedValueElement.innerHTML=a.lastSavedDate}this.totalMarksValueElement.innerHTML=a.getMarkSet().getMarks().size();if(this.timeSpentValueElement){this.timeSpentValueElement.innerHTML=IP.Util.millisecondsToTime(a.gradingDuration)}this.prevPaperId=b.id};Tii.grademark.ApplicationToolbar=function(d,c){this.application=c;this.permissionManager=Tii.grademark.ApplicationServices.getPermissionManager();this.messageCenter=Tii.grademark.ApplicationServices.getMessageCenter();this.modeManager=Tii.grademark.ApplicationServices.getModeManager();var b=this._initApplicationMenuItemData();var a={menu:["menu",{lazyload:false,itemdata:b}]};Tii.grademark.ApplicationToolbar.superclass.constructor.call(this,d,a)};YAHOO.extend(Tii.grademark.ApplicationToolbar,IP.widget.ApplicationToolbar);Tii.grademark.ApplicationToolbar.prototype.init=function(b,a){Tii.grademark.ApplicationToolbar.superclass.init.call(this,b,a);this._initToolbarItems();this._locateMenuItems();this._initToolbarPreferences();this.application.addListener(Tii.grademark.Application.EVENT_SECONDARY_JS_LOADED,this._secondaryJSLoadedHandler,this);this.application.assignment.addListener(Tii.grademark.Read.EVENT_READ_GRADE_SAVED,this._readGradeSavedHandler,this);this.application.assignment.addListener(Tii.grademark.Assignment.EVENT_RUBRIC_ATTACHED,this._updateMaxPoints,this);this.application.assignment.addListener(Tii.grademark.Assignment.EVENT_RUBRIC_UPDATED,this._updateMaxPoints,this);this.modeManager.modeChangedEvent.subscribe(this._modeChangedHandler,this,this);this.messageCenter.connectionStateChangeEvent.subscribe(this._connectionStateChangeHandler,this,this);if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.SAVE_PAPER)){this.messageCenter.messageQueuedEvent.subscribe(this._messageCenterMessageQueuedHandler,this,this);this.messageCenter.flushStartEvent.subscribe(this._messageCenterFlushStartHandler,this,this)}};Tii.grademark.ApplicationToolbar.prototype._enableSecondaryActions=function(){if(this.fileOpenItem){this.fileOpenItem.cfg.setProperty("disabled",false)}if(this.toolsStatisticsItem){this.toolsStatisticsItem.cfg.setProperty("disabled",this.application.assignment.anonymousMarkingEnabled)}if(this.toolsRubricLibraryItem){this.toolsRubricLibraryItem.cfg.setProperty("disabled",false)}if(this.toolsClipboardLibraryItem){this.toolsClipboardLibraryItem.cfg.setProperty("disabled",false)}if(this.toolsQuickMarkLibraryItem){this.toolsQuickMarkLibraryItem.cfg.setProperty("disabled",false);this.toolsQuickMarkPaletteItem.cfg.setProperty("disabled",false)}};Tii.grademark.ApplicationToolbar.prototype._initApplicationMenuItemData=function(){var q=[];var k=[];if(this.application.assignment.anonymousMarkingEnabled){k=[{text:'Close <em class="helptext">Ctrl + Q</em>',onclick:{fn:this._fileCloseClickHandler,scope:this}},{text:"Previous Paper",onclick:{fn:this._filePreviousPaperClickHandler,scope:this}},{text:"Next Paper",onclick:{fn:this._fileNextPaperClickHandler,scope:this}}];this.fileCloseShortcut=IP.util.KeyListenerManager.add(document,{ctrl:true,keys:81},{fn:this._fileCloseClickHandler,scope:this,correctScope:true})}else{if(this.permissionManager.checkUserPermission(Tii.grademark.PermissionManager.OPEN_OTHER_PAPERS)){k=[{text:'Open <em class="helptext">Ctrl + O</em>',classname:"open",disabled:true,onclick:{fn:this._fileOpenClickHandler,scope:this}},{text:'Close <em class="helptext">Ctrl + Q</em>',onclick:{fn:this._fileCloseClickHandler,scope:this}},{text:"Previous Paper",onclick:{fn:this._filePreviousPaperClickHandler,scope:this}},{text:"Next Paper",onclick:{fn:this._fileNextPaperClickHandler,scope:this}}];this.fileOpenShortcut=IP.util.KeyListenerManager.add(document,{ctrl:true,keys:79},{fn:this._fileOpenClickHandler,scope:this,correctScope:true});this.fileCloseShortcut=IP.util.KeyListenerManager.add(document,{ctrl:true,keys:81},{fn:this._fileCloseClickHandler,scope:this,correctScope:true})}else{k=[{text:'Close <em class="helptext">Ctrl + Q</em>',onclick:{fn:this._fileCloseClickHandler,scope:this}}];this