;function aj(a){if(a in qe){return qe[a]}return qe[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var qe={};function fj(a,b){if(a==null||a.className==null)return false;if(a.className==b){return true}var c=a.className.split(" ");for(var d=0;d<c.length;d++){if(c[d]==b){return true}}return false}function xd(a,b){if(fj(a,b))return;a.className+=" "+b}var yk={Ep:function(a){return a.document.body.clientWidth},Fp:function(a){return a.document.documentElement.clientWidth},j:function(a){return a.innerWidth}};
function ej(a,b){try{if(!window.opera&&"compatMode"in a.document&&a.document.compatMode=="CSS1Compat"){return b.Fp(a)}else if(aj("msie")&&!window.opera){return b.Ep(a)}}catch(c){}return b.j(a)}function gj(a){if(!a)return"";return a.replace(/&#(\d+);/g,function(b,c){return String.fromCharCode(parseInt(c,10))}).replace(/&#x([a-f0-9]+);/gi,function(b,c){return String.fromCharCode(parseInt(c,16))}).replace(/&(\w+);/g,function(b,c){c=c.toLowerCase();return c in ig?ig[c]:"?"})}var ig={lt:"<",gt:">",quot:'"',
nbsp:" ",amp:"&",apos:"'"};function yd(a){return encodeURIComponent(a)}function dk(a){return document.getElementById(a)}function ek(a){return document.all[a]}var ck=document.getElementById?dk:ek;function ti(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=ck("log");if(c){var d="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=d+c.innerHTML}else{window.status=a}};;var pg;function uj(){var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);pg=c;break}catch(d){}}if(!pg){throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");}}}uj();if("undefined"==typeof ti){ti=function(){}};var Ae=Ae||{},u=this;var wl=function(a,b){var c=a.split("."),d=u,e;while(e=c.shift()){if(!c.length&&ga(b)){d[e]=b}else if(d[e]){d=d[e]}else{d=(d[e]={})}}},be=function(a){var b=a.split("."),c=u;for(var d;d=b.shift();){if(c[d]){c=c[d]}else{return null}}return c};var um=function(){};var ga=function(a){return typeof a!="undefined"};var G=function(a){return a instanceof Array||Sa(a)&&typeof a.join=="function"&&typeof a.reverse=="function"},ic=function(a){return Sa(a)&&typeof a.length=="number"};var V=
function(a){return typeof a=="string"};var kd=function(a){return typeof a=="number"},Bb=function(a){return typeof a=="function"||!(!(a&&a.call))},Sa=function(a){return a!=null&&typeof a=="object"},ka=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(Wc)){return a[Wc]}if(!a[Wc]){a[Wc]=++lm}return a[Wc]};var Wc="closure_hashCode_",lm=0,Nk=function(a){if(Sa(a)){if(a.clone){return a.clone()}var b=G(a)?[]:{};for(var c in a){b[c]=Nk(a[c])}return b}return a},v=function(a,b){var c=a.Mg;if(arguments.length>
2){var d=Array.prototype.slice.call(arguments,2);if(c){d.unshift.apply(d,c)}c=d}b=a.df||b;a=a.cf||a;var e,f=b||u;if(c){e=function(){var g=Array.prototype.slice.call(arguments);g.unshift.apply(g,c);return a.apply(f,g)}}else{e=function(){return a.apply(f,arguments)}}e.Mg=c;e.df=b;e.cf=a;return e};var qm=function(a,b){for(var c in b){a[c]=b[c]}},Ha=function(){return(new Date).getTime()};var Kc=function(a,b){var c=b||{};for(var d in c){a=a.replace(new RegExp("\\{\\$"+d+"\\}","gi"),c[d])}return a},cc=
function(a,b){wl(a,b)},bc=function(a,b,c){a[b]=c};if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,e;if(!a)a=u;if(!b)b=[];for(var f=0;f<b.length;f++){c[f]="args["+f+"]"}e="oScope.__applyTemp__.peek().("+c.join(",")+");";if(!a.__applyTemp__){a.__applyTemp__=[]}a.__applyTemp__.push(this);d=eval(e);a.__applyTemp__.pop();return d}}Function.prototype.bind=function(a){if(arguments.length>1){var b=Array.prototype.slice.call(arguments,1);b.unshift(this,a);return v.apply(null,
b)}else{return v(this,a)}};Function.prototype.inherits=function(a){mm(this,a)};var mm=function(a,b){function c(){}c.prototype=b.prototype;a.U=b.prototype;a.prototype=new c;a.prototype.constructor=a};Function.prototype.mixin=function(a){qm(this.prototype,a)};var Va=function(){};Va.prototype.rf=false;Va.prototype.ma=function(){return this.rf};Va.prototype.dispose=function(){if(!this.rf){this.rf=true}};var aa=function(a,b){this.type=a;this.target=b;this.currentTarget=this.target};aa.inherits(Va);aa.prototype.zb=false;aa.prototype.Ec=true;aa.prototype.stopPropagation=function(){this.zb=true};aa.prototype.preventDefault=function(){this.Ec=false};var sa=function(a,b){return a.indexOf(b)==0},ha=function(a,b){var c=a.length-b.length;return c>=0&&a.lastIndexOf(b,c)==c};var Xh=function(a){return/^\s*$/.test(a)};var Ia=function(a){return a.replace(/^\s+|\s+$/g,"")};var Bm=/^[a-zA-Z0-9\-_.!~*'()]*$/,Ef=function(a){a=String(a);if(!Bm.test(a)){return encodeURIComponent(a)}return a},Df=function(a){return decodeURIComponent(a.replace(/\+/g," "))},Cf=function(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>")},Ta=function(a,b){if(b){return a.replace(Rh,
Sh).replace(Yh,Zh).replace(Vh,Wh).replace($h,ai)}else{if(!ym.test(a))return a;if(a.indexOf(zm)!=-1){a=a.replace(Rh,Sh)}if(a.indexOf(Em)!=-1){a=a.replace(Yh,Zh)}if(a.indexOf(Dm)!=-1){a=a.replace(Vh,Wh)}if(a.indexOf(Gm)!=-1){a=a.replace($h,ai)}return a}},zm="&",Em="<",Dm=">",Gm='"',Sh="&amp;",Zh="&lt;",Wh="&gt;",ai="&quot;",Rh=/&/g,Yh=/</g,Vh=/>/g,$h=/\"/g,ym=/[&<>\"]/,Jm=function(a){if(Th(a,"&")){if("document"in u&&!Th(a,"<")){var b=u.document.createElement("a");b.innerHTML=a;if(b.normalize){b.normalize()}a=
b.firstChild.nodeValue;b.innerHTML=""}else{return a.replace(/&([^;]+);/g,function(c,d){switch(d){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if(d.charAt(0)=="#"){var e=Number("0"+d.substr(1));if(!isNaN(e)){return String.fromCharCode(e)}}return c}})}}return a},Ff=function(a,b){return Cf(a.replace(/  /g," &#160;"),b)};var Bf={"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\x0B",'"':'\\"',"'":"\\'","\\":"\\\\"},Hm=function(a){a=
String(a);if(a.quote){return a.quote()}else{var b='"';for(var c=0;c<a.length;c++){b+=Cm(a.charAt(c))}return b+'"'}},Cm=function(a){if(a in Bf){return Bf[a]}var b=a,c=a.charCodeAt(0);if(c>31&&c<127){b=a}else{if(c<256){b="\\x";if(c<16||c>256){b+="0"}}else{b="\\u";if(c<4096){b+="0"}}b+=c.toString(16).toUpperCase()}return Bf[a]=b},Im=function(a){var b={};for(var c=0;c<a.length;c++){b[a.charAt(c)]=true}return b},xm=Im("()[]{}+-?*.$^|,:#<!\\"),Th=function(a,b){return a.indexOf(b)!=-1},de=function(a){a=
String(a);var b="",c;for(var d=0;d<a.length;d++){c=a.charAt(d);if(c=="\u0008"){c="\\x08"}else if(c in xm){c="\\"+c}b+=c}return b};var Fm=function(a){return a==null?"":String(a)};var Uh=function(){return Math.floor(Math.random()*2147483648).toString(36)+(Math.floor(Math.random()*2147483648)^(new Date).getTime()).toString(36)},Am=function(a,b){var c=0,d=String(a).split("."),e=String(b).split("."),f=Math.max(d.length,e.length);for(var g=0;c==0&&g<f;g++){var h=d[g]||"",j=e[g]||"",k=new RegExp("(\\d*)(\\D*)",
"g"),l=new RegExp("(\\d*)(\\D*)","g");do{var n=k.exec(h)||["","",""],m=l.exec(j)||["","",""];if(n[0].length==0&&m[0].length==0){break}var y=n[1].length==0?0:parseInt(n[1],10),A=m[1].length==0?0:parseInt(m[1],10);c=Af(y,A)||Af(n[2].length==0,m[2].length==0)||Af(n[2],m[2])}while(c==0)}return c},Af=function(a,b){if(a<b){return-1}else if(a>b){return 1}return 0};var Fb,M,Ba,hi,Xm,ta,Wm,Rf,Zm,Pf,$m,Ym,Qf;(function(){var a=false,b=false,c=false,d=false,e=false,f=false,g=false,h=false,j=false,k=false,l=false,n="";if(u.navigator){var m=navigator.userAgent;a=typeof opera!="undefined";b=!a&&m.indexOf("MSIE")!=-1;c=!a&&m.indexOf("WebKit")!=-1;l=c&&m.indexOf("Mobile")!=-1;d=!a&&navigator.product=="Gecko"&&!c;e=d&&navigator.vendor=="Camino";f=!a&&m.indexOf("Konqueror")!=-1;g=f||c;var y,A;if(a){y=opera.version()}else{if(d){A=/rv\:([^\);]+)(\)|;)/}else if(b){A=/MSIE\s+([^\);]+)(\)|;)/}else if(c){A=
/WebKit\/(\S+)/}else if(f){A=/Konqueror\/([^\);]+)(\)|;)/}if(A){A.test(m);y=RegExp.$1}}n=navigator.platform;h=n.indexOf("Mac")!=-1;j=n.indexOf("Win")!=-1;k=n.indexOf("Linux")!=-1}Fb=a;M=b;Ba=d;hi=e;Xm=f;ta=c;Wm=g;Rf=y;Zm=n;Pf=h;$m=j;Ym=k;Qf=l})();var ii=function(a,b){return Am(a,b)},ie=function(a){return ii(Rf,a)>=0};var L=function(a,b){if(a){this.init(a,b)}};L.inherits(aa);L.prototype.type=null;L.prototype.target=null;L.prototype.currentTarget=null;L.prototype.relatedTarget=null;L.prototype.offsetX=0;L.prototype.offsetY=0;L.prototype.clientX=0;L.prototype.clientY=0;L.prototype.screenX=0;L.prototype.screenY=0;L.prototype.button=0;L.prototype.keyCode=0;L.prototype.charCode=0;L.prototype.ctrlKey=false;L.prototype.altKey=false;L.prototype.shiftKey=false;L.prototype.metaKey=false;L.prototype.La=null;L.prototype.init=
function(a,b){this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;if(a.relatedTarget){this.relatedTarget=a.relatedTarget}else if(this.type==Ec){this.relatedTarget=a.fromElement}else if(this.type==Id){this.relatedTarget=a.toElement}else{this.relatedTarget=null}this.offsetX=typeof a.layerX=="number"?a.layerX:a.offsetX;this.offsetY=typeof a.layerY=="number"?a.layerY:a.offsetY;this.clientX=typeof a.clientX=="number"?a.clientX:a.pageX;this.clientY=typeof a.clientY=="number"?a.clientY:
a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(this.type==Cc?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.La=a;this.Ec=null;this.zb=null};L.prototype.stopPropagation=function(){this.zb=true;if(this.La.stopPropagation){this.La.stopPropagation()}else{this.La.cancelBubble=true}};L.prototype.preventDefault=function(){this.Ec=false;if(!this.La.preventDefault){this.La.returnValue=
false;try{this.La.keyCode=-1}catch(a){}}else{this.La.preventDefault()}};L.prototype.$k=function(){return this.La};L.prototype.dispose=function(){if(!this.ma()){aa.prototype.dispose.call(this);this.La=null}};var Na=function(){},ll=0;Na.prototype.Tf=null;Na.prototype.listener=null;Na.prototype.proxy=null;Na.prototype.src=null;Na.prototype.type=null;Na.prototype.capture=null;Na.prototype.handler=null;Na.prototype.key=0;Na.prototype.removed=false;Na.prototype.ff=false;Na.prototype.init=function(a,b,c,d,e,f){if(Bb(a)){this.Tf=true}else if(a&&a.F&&Bb(a.F)){this.Tf=false}else{throw Error("Invalid listener argument");}this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!(!e);this.handler=f;this.ff=
false;this.key=++ll;this.removed=false};Na.prototype.F=function(a){if(this.Tf){return this.listener.call(this.handler||this.src,a)}return this.listener.F.call(this.listener,a)};var De=function(a,b,c){if(a.indexOf){return a.indexOf(b,c)}if(Array.indexOf){return Array.indexOf(a,b,c)}if(c==null){c=0}else if(c<0){c=Math.max(0,a.length+c)}for(var d=c;d<a.length;d++){if(d in a&&a[d]===b)return d}return-1};var wb=function(a,b,c){if(a.forEach){a.forEach(b,c)}else if(Array.forEach){Array.forEach(a,b,c)}else{var d=a.length,e=V(a)?a.split(""):a;for(var f=0;f<d;f++){if(f in e){b.call(c,e[f],f,a)}}}};var Ik=function(a,b,c){if(a.filter){return a.filter(b,c)}if(Array.filter){return Array.filter(a,
b,c)}var d=a.length,e=[],f=V(a)?a.split(""):a;for(var g=0;g<d;g++){if(g in f){var h=f[g];if(b.call(c,h,g,a)){e.push(h)}}}return e},Kk=function(a,b,c){if(a.map){return a.map(b,c)}if(Array.map){return Array.map(a,b,c)}var d=a.length,e=[],f=V(a)?a.split(""):a;for(var g=0;g<d;g++){if(g in f){e.push(b.call(c,f[g],g,a))}}return e};var Lk=function(a,b,c){if(a.some){return a.some(b,c)}if(Array.some){return Array.some(a,b,c)}var d=a.length,e=V(a)?a.split(""):a;for(var f=0;f<d;f++){if(f in e&&b.call(c,e[f],
f,a)){return true}}return false};var Jb=function(a,b){if(a.contains){return a.contains(b)}return De(a,b)>-1};var Jk=function(a,b){if(!Jb(a,b)){a.push(b)}};var uc=function(a,b){var c=De(a,b),d;if(d=c!=-1){Array.prototype.splice.call(a,c,1).length==1}return d};var Mg=function(a){if(G(a)){return a.concat()}else{var b=[];for(var c=0,d=a.length;c<d;c++){b[c]=a[c]}return b}};var Hk=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(!G(d)){a.push(d)}else{a.push.apply(a,d)}}},Mk=function(a,
b,c,d){return Array.prototype.splice.apply(a,Cd(arguments,1))},Cd=function(a,b,c){if(arguments.length<=2){return Array.prototype.slice.call(a,b)}else{return Array.prototype.slice.call(a,b,c)}};var Qh=function(a,b,c){for(var d in a){b.call(c,a[d],d,a)}};var nd=function(a){var b=[];for(var c in a){b.push(a[c])}return b},zf=function(a){var b=[];for(var c in a){b.push(c)}return b};var ce=function(a,b){var c;if(c=b in a){delete a[b]}return c};var wm=function(a,b,c){if(b in a){return a[b]}return c};var Ph=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vm=function(a,b){var c,d;for(var e=1;e<arguments.length;e++){d=arguments[e];for(c in d){a[c]=
d[c]}for(var f=0;f<Ph.length;f++){c=Ph[f];if(Object.prototype.hasOwnProperty.call(d,c)){a[c]=d[c]}}}};var pa=function(a,b){Va.call(this);this.Pp=b;this.Rc=[];for(var c=0;c<a;c++){this.Ab(this.Vg())}};pa.inherits(Va);pa.prototype.nf=null;pa.prototype.qf=null;pa.prototype.pd=function(a){this.nf=a};pa.prototype.lj=function(a){this.qf=a};pa.prototype.gb=function(){if(this.Rc.length){return this.Rc.pop()}return this.Vg()};pa.prototype.Ab=function(a){if(this.Rc.length<this.Pp){this.Rc.push(a)}else{this.fh(a)}};pa.prototype.Vg=function(){if(this.nf){return this.nf()}else{return{}}};pa.prototype.fh=function(a){if(this.qf){this.qf(a)}else{if(Bb(a.dispose)){a.dispose()}else{for(var b in a){delete a[b]}}}};
pa.prototype.dispose=function(){if(!this.ma()){pa.U.dispose.call(this);var a=this.Rc;while(a.length){this.fh(a.pop())}this.Rc=null}};var ac={},xa={},Ab={},Fc=new pa(0,600);Fc.pd(function(){return{s:0}});Fc.lj(function(a){a.s=0});var $b=new pa(0,600);$b.pd(function(){return[]});$b.lj(function(a){a.length=0;delete a.oe;delete a.ti});var ih=new pa(0,600);ih.pd(function(){var a=function(b){return rl.call(a.src,a.key,b)};return a});var ol=function(){return new Na},Ve=new pa(0,600);Ve.pd(ol);var ml=function(){return new L},nl=function(){var a=null;if(M){a=new pa(0,600);a.pd(ml)}return a},fh=nl(),ul="on",We={};var p=function(a,b,c,d,
e){if(G(b)){for(var f=0;f<b.length;f++){p(a,b[f],c,d,e)}return null}var g=!(!d),h=xa;if(!(b in h)){h[b]=Fc.gb()}h=h[b];if(!(g in h)){h[g]=Fc.gb();h.s++}h=h[g];var j=ka(a),k,l;if(!h[j]){k=(h[j]=$b.gb());h.s++}else{k=h[j];for(var f=0;f<k.length;f++){l=k[f];if(l.listener==c&&l.handler==e){if(l.removed){break}return k[f].key}}}var n=ih.gb();n.src=a;l=Ve.gb();l.init(c,n,a,b,g,e);var m=l.key;n.key=m;k.push(l);ac[m]=l;if(!Ab[j]){Ab[j]=$b.gb()}Ab[j].push(l);if(a.addEventListener){if(a==u||!a.Yg){a.addEventListener(b,
n,g)}}else{a.attachEvent(hh(b),n)}return m},sl=function(a,b,c,d,e){if(G(b)){for(var f=0;f<b.length;f++){sl(a,b[f],c,d,e)}return null}var g=p(a,b,c,d,e),h=ac[g];h.ff=true;return g},Oa=function(a,b,c,d,e){if(G(b)){for(var f=0;f<b.length;f++){Oa(a,b[f],c,d,e)}return null}var g=!(!d),h=gh(a,b,g);if(!h){return false}for(var f=0;f<h.length;f++){if(h[f].listener==c&&h[f].capture==g&&h[f].handler==e){return ob(h[f].key)}}return false},ob=function(a){if(!ac[a]){return false}var b=ac[a];if(b.removed){return false}var c=
b.src,d=b.type,e=b.proxy,f=b.capture;if(c.removeEventListener){if(c==u||!c.Yg){c.removeEventListener(d,e,f)}}else if(c.detachEvent){c.detachEvent(hh(d),e)}var g=ka(c),h=xa[d][f][g];if(Ab[g]){var j=Ab[g];uc(j,b);if(j.length==0){delete Ab[g]}}b.removed=true;h.ti=true;eh(d,f,g,h);delete ac[a];return true},eh=function(a,b,c,d){if(!d.oe){if(d.ti){for(var e=0,f=0;e<d.length;e++){if(d[e].removed){Ve.Ab(d[e]);continue}if(e!=f){d[f]=d[e]}f++}d.length=f;d.ti=false;if(f==0){$b.Ab(d);delete xa[a][b][c];xa[a][b].s--;
if(xa[a][b].s==0){Fc.Ab(xa[a][b]);delete xa[a][b];xa[a].s--}if(xa[a].s==0){Fc.Ab(xa[a]);delete xa[a]}}}}},vl=function(a,b,c){var d=0,e=a==null,f=b==null,g=c==null;c=!(!c);if(!e){var h=ka(a);if(Ab[h]){var j=Ab[h];for(var k=j.length-1;k>=0;k--){var l=j[k];if((f||b==l.type)&&(g||c==l.capture)){ob(l.key);d++}}}}else{Qh(Ab,function(n){for(var m=n.length-1;m>=0;m--){var y=n[m];if((f||b==y.type)&&(g||c==y.capture)){ob(y.key);d++}}})}return d};var gh=function(a,b,c){var d=xa;if(b in d){d=d[b];if(c in d){d=
d[c];var e=ka(a);if(d[e]){return d[e]}}}return null},ql=function(a,b,c,d,e){var f=!(!d),g=gh(a,b,f);if(g){for(var h=0;h<g.length;h++){if(g[h].listener==c&&g[h].capture==f&&g[h].handler==e){return g[h]}}}return null};var wa="click",Dc="mousedown",Ec="mouseover",Id="mouseout",Cc="keypress",Bc="keydown",hh=function(a){if(a in We){return We[a]}return We[a]=ul+a},dd=function(a,b,c,d){var e=1,f=xa;if(b in f){f=f[b];if(c in f){f=f[c];var g=ka(a);if(f[g]){var h=f[g];if(!h.oe){h.oe=1}else{h.oe++}try{var j=
h.length;for(var k=0;k<j;k++){var l=h[k];if(l&&!l.removed){e&=Ue(l,d)!==false}}}finally{h.oe--;eh(b,c,g,h)}}}}return Boolean(e)},Ue=function(a,b){var c=a.F(b);if(a.ff){ob(a.key)}return c};var pl=function(a,b){if(V(b)){b=new aa(b,a)}else if(!(b instanceof aa)){var c=b;b=new aa(b.type,a);vm(b,c)}else{b.target=b.target||a}var d=1,e,f=b.type,g=xa;if(!(f in g)){return true}g=g[f];var h=true in g,j=false in g;if(h){e=[];for(var k=a;k;k=k.Xd()){e.push(k)}for(var l=e.length-1;!b.zb&&l>=0;l--){b.currentTarget=
e[l];d&=dd(e[l],b.type,true,b)&&b.Ec!=false}}if(j){if(h){for(var l=0;!b.zb&&l<e.length;l++){b.currentTarget=e[l];d&=dd(e[l],b.type,false,b)&&b.Ec!=false}}else{for(var n=a;!b.zb&&n;n=n.Xd()){b.currentTarget=n;d&=dd(n,b.type,false,b)&&b.Ec!=false}}}return Boolean(d)},rl=function(a,b){if(!ac[a]){return true}var c=ac[a],d=c.type,e=xa;if(!(d in e)){return true}e=e[d];var f;if(M){var g=b||be("window.event"),h=true in e;if(h){if(g.keyCode<0||g.returnValue!=undefined){return true}tl(g)}var j=ka(c.src),k=
fh.gb();k.init(g,this);f=true;try{if(h){var l=$b.gb();for(var n=k.currentTarget;n;n=n.parentNode){l.push(n)}for(var m=l.length-1;!k.zb&&m>=0;m--){k.currentTarget=l[m];f&=dd(l[m],d,true,k)}for(var m=0;!k.zb&&m<l.length;m++){k.currentTarget=l[m];f&=dd(l[m],d,false,k)}}else{f=Ue(c,k)}}finally{if(l){l.length=0;$b.Ab(l)}k.dispose();fh.Ab(k)}return f}var y=new L(b,this);try{f=Ue(c,y)}finally{y.dispose()}return f},tl=function(a){var b=false;if(a.keyCode==0){try{a.keyCode=-1;return}catch(c){b=true}}if(b||
a.returnValue==undefined){a.returnValue=true}};var W=function(a,b){this.width=ga(a)?Number(a):undefined;this.height=ga(b)?Number(b):undefined};W.equals=function(a,b){if(a==b){return true}if(!a||!b){return false}return a.width==b.width&&a.height==b.height};W.prototype.clone=function(){return new W(this.width,this.height)};W.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};W.prototype.area=function(){return this.width*this.height};W.prototype.Ca=function(){return!this.area()};W.prototype.ceil=function(){this.width=Math.ceil(this.width);
this.height=Math.ceil(this.height);return this};W.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};W.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};W.prototype.scale=function(a){this.width*=a;this.height*=a;return this};W=function(a,b){this.width=ga(a)?Number(a):undefined;this.height=ga(b)?Number(b):undefined};W.prototype.clone=function(){return new W(this.width,this.height)};W.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};W.equals=function(a,b){if(a==b){return true}if(!a||!b){return false}return a.width==b.width&&a.height==b.height};var Cb=function(a,b){this.x=ga(a)?Number(a):undefined;this.y=ga(b)?Number(b):undefined};Cb.prototype.clone=function(){return new Cb(this.x,this.y)};Cb.prototype.toString=
function(){return"("+this.x+", "+this.y+")"};var wf=function(a,b){a=Number(a);b=Number(b);this.start=a<b?a:b;this.end=a<b?b:a};wf.prototype.clone=function(){return new wf(this.start,this.end)};wf.prototype.toString=function(){return"["+this.start+", "+this.end+"]"};var kc=function(a,b,c,d){this.left=ga(a)?Number(a):undefined;this.top=ga(b)?Number(b):undefined;this.width=ga(c)?Number(c):undefined;this.height=ga(d)?Number(d):undefined};kc.prototype.clone=function(){return new kc(this.left,this.top,
this.width,this.height)};kc.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};var md=function(a,b,c,d){this.top=ga(a)?Number(a):undefined;this.right=ga(b)?Number(b):undefined;this.bottom=ga(c)?Number(c):undefined;this.left=ga(d)?Number(d):undefined};md.prototype.clone=function(){return new md(this.top,this.right,this.bottom,this.left)};md.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};
md.prototype.contains=function(a){return nm(this,a)};md.prototype.expand=function(a,b,c,d){if(Sa(a)){this.top-=a.top;this.right+=a.right;this.bottom+=a.bottom;this.left-=a.left}else{this.top-=a;this.right+=b;this.bottom+=c;this.left-=d}return this};var nm=function(a,b){if(!a||!b){return false}return b.x>=a.left&&b.x<=a.right&&b.y>=a.top&&b.y<=a.bottom};var Le;var xc=function(){if(!Le){Le=new va}return Le},yc=function(a){return a?new va(mb(a)):xc()},$g=function(){return xc().Ma()},Lb=function(a){return xc().Ud(a)},I=Lb,al=function(a,b,c){return xc().il(a,b,c)},Xk=al,gl=function(a,b){Qh(b,function(c,d){if(d=="style"){a.style.cssText=c}else if(d=="class"){a.className=c}else if(d=="for"){a.htmlFor=c}else if(d in Xg){a.setAttribute(Xg[d],c)}else{a[d]=c}})},Xg={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",
height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"},Ne=function(a){var b=a||u||window,c=b.document;if(ta&&!ie("500")&&!Qf){if(typeof b.innerHeight=="undefined"){b=window}var d=b.innerHeight,e=b.document.documentElement.scrollHeight;if(b==b.top){if(e<d){d-=15}}return new W(b.innerWidth,d)}var f=yc(c),g=f.al()=="CSS1Compat"&&(!Fb||Fb&&ie("9.50"))?c.documentElement:c.body;return new W(g.clientWidth,g.clientHeight)},bl=function(a){var b=a||u||window,c=b.document,d,e;if(!ta&&c.compatMode==
"CSS1Compat"){d=c.documentElement.scrollLeft;e=c.documentElement.scrollTop}else{d=c.body.scrollLeft;e=c.body.scrollTop}return new Cb(d,e)},Gd=function(a){if(ta&&!ie("500")&&!Qf){return null}else{return a.parentWindow||a.defaultView}},Xb=function(a,b){var c=xc();return c.v.apply(c,arguments)};var Zc=function(a){return xc().createElement(a)};var $k=function(a,b){a.appendChild(b)},dl=function(a){var b;while(b=a.firstChild){a.removeChild(b)}};var cl=function(a,b){if(b.parentNode){b.parentNode.insertBefore(a,
b.nextSibling)}},Mb=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};var Yk=ta&&ii(Rf,"521")<=0,Ke=function(a,b){if(typeof a.contains!="undefined"&&!Yk&&b.nodeType==1){return a==b||a.contains(b)}if(typeof a.compareDocumentPosition!="undefined"){return a==b||Boolean(a.compareDocumentPosition(b)&16)}while(b&&a!=b){b=b.parentNode}return b==a};var mb=function(a){return a.nodeType==9?a:a.ownerDocument||a.document};var hl=function(a,b){if("textContent"in a){a.textContent=b}else if(a.firstChild&&
a.firstChild.nodeType==3){while(a.lastChild!=a.firstChild){a.removeChild(a.lastChild)}a.firstChild.data=b}else{while(a.hasChildNodes()){a.removeChild(a.lastChild)}var c=mb(a);a.appendChild(c.createTextNode(b))}},$c=function(a,b){var c=[];Zg(a,b,c,true);return c.length?c[0]:undefined};var Zg=function(a,b,c,d){if(a!=null){for(var e=0,f;f=a.childNodes[e];e++){if(b(f)){c.push(f);if(d){return}}Zg(f,b,c,d)}}},Zk={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Yg={IMG:" ",BR:"\n"},Me=function(a){if(M&&"innerText"in
a){return a.innerText.replace(/(\r\n|\r|\n)/g,"\n")}var b=[];ah(a,b,true);var c=b.join("").replace(/ +/g," ");if(c!=" "){c=c.replace(/^\s*/,"")}return c};var ah=function(a,b,c){if(a.nodeName in Zk){}else if(a.nodeType==3){if(c){b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,""))}else{b.push(a.nodeValue)}}else if(a.nodeName in Yg){b.push(Yg[a.nodeName])}else{var d=a.firstChild;while(d){ah(d,b,c);d=d.nextSibling}}};var va=function(a){this.va=a||u.document||document};va.prototype.Ma=function(){return this.va};
va.prototype.Ud=function(a){if(V(a)){return this.va.getElementById(a)}else{return a}};va.prototype.il=function(a,b,c){var d=a||"*",e=c||this.va,f=e.getElementsByTagName(d);if(b){var g=[];for(var h=0,j;j=f[h];h++){var k=j.className;if(typeof k.split=="function"&&Jb(k.split(" "),b)){g.push(j)}}return g}else{return f}};va.prototype.v=function(a,b){if(M&&b&&b.name){a="<"+a+' name="'+Ta(b.name)+'">'}var c=this.createElement(a);if(b){gl(c,b)}if(arguments.length>2){function d(g){if(g){this.appendChild(c,
V(g)?this.createTextNode(g):g)}}for(var e=2;e<arguments.length;e++){var f=arguments[e];if((ic(f)||ta&&typeof f=="function"&&typeof f.length=="number")&&!(Sa(f)&&f.nodeType>0)){wb(G(f)?f:Mg(f),d,this)}else{d.call(this,f)}}}return c};va.prototype.createElement=function(a){return this.va.createElement(a)};va.prototype.createTextNode=function(a){return this.va.createTextNode(a)};va.prototype.al=function(){if(this.va.compatMode){return this.va.compatMode}if(ta){var a=this.v("div",{style:"position:absolute;width:0;height:0;width:1"}),
b=a.style.width=="1px"?"BackCompat":"CSS1Compat";return this.va.compatMode=b}return"BackCompat"};va.prototype.appendChild=$k;va.prototype.Jn=dl;va.prototype.removeNode=Mb;va.prototype.contains=Ke;var jb="complete";var Lh=function(){return Mh()};var Mh=null,Oh=null,xf=null,tm=function(a,b){Mh=a;Oh=b;xf=null},rm=function(){var a=Nh();if(a){return new ActiveXObject(a)}else{return new XMLHttpRequest}},sm=function(){var a=Nh(),b={};if(a){b[0]=true;b[1]=true}return b};tm(rm,sm);var yf=null,Nh=function(){if(!yf&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);
yf=c;return c}catch(d){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return yf};;var If=function(a){if(typeof a.T=="function"){return a.T()}if(V(a)){return a.split("")}if(ic(a)){var b=[],c=a.length;for(var d=0;d<c;d++){b.push(a[d])}return b}return nd(a)},ci=function(a){if(typeof a.oa=="function"){return a.oa()}if(typeof a.T=="function"){return undefined}if(ic(a)||V(a)){var b=[],c=a.length;for(var d=0;d<c;d++){b.push(d)}return b}return zf(a)};var Aa=function(a,b,c){if(typeof a.forEach=="function"){a.forEach(b,c)}else if(ic(a)||V(a)){wb(a,b,c)}else{var d=ci(a),e=If(a),f=e.length;
for(var g=0;g<f;g++){b.call(c,e[g],d&&d[g],a)}}};var Lm=function(a,b,c){if(typeof a.some=="function"){return a.some(b,c)}if(ic(a)||V(a)){return Lk(a,b,c)}var d=ci(a),e=If(a),f=e.length;for(var g=0;g<f;g++){if(b.call(c,e[g],d&&d[g],a)){return true}}return false};var X=function(a){this.l={};this.t=[];if(a){this.Fb(a)}},Gf=":",bi=Gf.charCodeAt(0);X.prototype.s=0;var ee=function(a){a=String(a);if(a in Object.prototype){return Gf+a}else if(a.charCodeAt(0)==bi){return Gf+a}else{return a}},Km=function(a){if(a.charCodeAt(0)==bi){return a.substring(1)}else{return a}};X.prototype.e=function(){return this.s};X.prototype.T=function(){this.jf();var a=[];for(var b=0;b<this.t.length;b++){var c=this.t[b];a.push(this.l[c])}return a};X.prototype.oa=function(){this.jf();var a=
[];for(var b=0;b<this.t.length;b++){var c=this.t[b];a.push(Km(c))}return a};X.prototype.fa=function(a){return ee(a)in this.l};X.prototype.Ca=function(){return this.s==0};X.prototype.clear=function(){this.l={};this.t.length=0;this.s=0};X.prototype.remove=function(a){var b=ee(a);if(ce(this.l,b)){this.s--;if(this.t.length>2*this.s){this.jf()}return true}return false};X.prototype.jf=function(){if(this.s!=this.t.length){var a=0,b=0;while(a<this.t.length){var c=this.t[a];if(c in this.l){this.t[b++]=c}a++}this.t.length=
b}if(this.s!=this.t.length){var d={},a=0,b=0;while(a<this.t.length){var c=this.t[a];if(!(c in d)){this.t[b++]=c;d[c]=1}a++}this.t.length=b}};X.prototype.get=function(a,b){var c=ee(a);if(c in this.l){return this.l[c]}return b};X.prototype.set=function(a,b){var c=ee(a);if(!(c in this.l)){this.s++;this.t.push(c)}this.l[c]=b};X.prototype.Fb=function(a){var b,c;if(a instanceof X){b=a.oa();c=a.T()}else{b=zf(a);c=nd(a)}for(var d=0;d<b.length;d++){this.set(b[d],c[d])}};X.prototype.clone=function(){return new X(this)};var sb=function(a){this.l=new X;if(a){this.Fb(a)}},Hf=function(a){var b=typeof a;if(b=="object"){return"o"+ka(a)}else{return b.substr(0,1)+a}};sb.prototype.e=function(){return this.l.e()};sb.prototype.add=function(a){this.l.set(Hf(a),a)};sb.prototype.Fb=function(a){var b=If(a),c=b.length;for(var d=0;d<c;d++){this.add(b[d])}};sb.prototype.remove=function(a){return this.l.remove(Hf(a))};sb.prototype.clear=function(){this.l.clear()};sb.prototype.Ca=function(){return this.l.Ca()};sb.prototype.contains=
function(a){return this.l.fa(Hf(a))};sb.prototype.T=function(){return this.l.T()};sb.prototype.clone=function(){return new sb(this)};var Sk=function(a){var b=[];for(var c=0;c<a.length;c++){if(G(a[c])){b.push(Sk(a[c]))}else{b.push(a[c])}}return"[ "+b.join(", ")+" ]"},Tk=function(a,b){try{var c=Wk(a),d="Message: "+Ta(c.message)+'\nUrl: <a href="view-source:'+c.fileName+'" target="_new">'+c.fileName+"</a>\nLine: "+c.lineNumber+"\n\nBrowser stack:\n"+Ta(c.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ta(Vk(b)+"-> ");return d}catch(e){return"Exception trying to expose exception! You win, we lose. "+e}},Wk=function(a){var b=be("document.location.href");
return typeof a=="string"?{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"}:(!a.lineNumber||!a.fileName||!a.stack?{message:a.message,name:a.name,lineNumber:"Not available",fileName:b,stack:"Not available"}:a)};var Vk=function(a){return Wg(a||arguments.callee.caller,[])},Wg=function(a,b){var c=[];if(Jb(b,a)){c.push("[...circular reference...]")}else if(a&&b.length<50){c.push(Vg(a)+"(");var d=a.arguments;for(var e=0;e<d.length;e++){if(e>0){c.push(", ")}var f,
g=d[e];switch(typeof g){case "object":f=g?"object":"null";break;case "string":f=g;break;case "number":f=String(g);break;case "boolean":f=g?"true":"false";break;case "function":f=Vg(g);f=f?f:"[fn]";break;case "undefined":default:f=typeof g;break}if(f.length>40){f=f.substr(0,40)+"..."}c.push(f)}b.push(a);c.push(")\n");try{c.push(Wg(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else if(a){c.push("[...long stack...]")}else{c.push("[end]")}return c.join("")},Vg=function(a){if(!Fd[a]){var b=
/function ([^\(]+)/.exec(String(a));if(b){var c=b[1],d=/^\$(.+)\$$/.exec(c);if(d){c=d[1].replace(/\${1,2}/g,".")}Fd[a]=c}else{Fd[a]="[Anonymous]"}}return Fd[a]},Uk=function(a,b,c,d){if(be("document.all")){return""}var e=b||u,f=c||"",g=d||0;if(e==a){return f}for(var h in e){if(h=="Packages"||h=="sun"||h=="netscape"||h=="java"){continue}if(e[h]==a){return f+h}if((typeof e[h]=="function"||typeof e[h]=="object")&&e[h]!=u&&e[h]!=be("document")&&e.hasOwnProperty(h)&&g<6){var j=Uk(a,e[h],f+h+".",g+1);if(j)return j}}return""},
Fd={};var Wa=function(a,b,c){this.Qq=Pk++;this.uq=Ha();this.lb=a;this.Sp=b;this.Op=c};Wa.prototype.oh=null;Wa.prototype.nh=null;var Pk=0;Wa.prototype.Gf=function(){return this.Op};Wa.prototype.jl=function(){return this.oh};Wa.prototype.oo=function(a){this.oh=a};Wa.prototype.kl=function(){return this.nh};Wa.prototype.po=function(a){this.nh=a};Wa.prototype.Uc=function(){return this.lb};Wa.prototype.og=function(a){this.lb=a};Wa.prototype.Fh=function(){return this.Sp};Wa.prototype.Gh=function(){return this.uq};var Z=function(a){this.Ua=a;this.p=null;this.ec={};this.tc=[]};Z.prototype.lb=null;var fb=function(a,b){this.name=a;this.value=b};fb.prototype.toString=function(){return this.name};var mp=new fb("OFF",Infinity),Ug=new fb("SHOUT",1200),Ge=new fb("SEVERE",1000),He=new fb("WARNING",900),Tg=new fb("INFO",800),Qk=new fb("CONFIG",700),Fe=new fb("FINE",500),lp=new fb("FINER",400),Rk=new fb("FINEST",300),kp=new fb("ALL",0);var Ed=function(a){return Qg(a)};Z.prototype.wa=function(){return this.Ua};Z.prototype.Gg=
function(a){this.tc.push(a)};Z.prototype.Ti=function(a){return uc(this.tc,a)};Z.prototype.qa=function(){return this.p};Z.prototype.og=function(a){this.lb=a};Z.prototype.Uc=function(){return this.lb};Z.prototype.gl=function(){if(this.lb){return this.lb}if(this.p){return this.p.gl()}return null};Z.prototype.ke=function(a){if(this.lb){return a.value>=this.lb.value}if(this.p){return this.p.ke(a)}return false};Z.prototype.log=function(a,b,c){if(!this.ke(a)){return}var d=new Wa(a,String(b),this.Ua);if(c){d.oo(c);
d.po(Tk(c,arguments.callee.caller))}this.Bm(d)};Z.prototype.severe=function(a,b){this.log(Ge,a,b)};Z.prototype.warning=function(a,b){this.log(He,a,b)};Z.prototype.info=function(a,b){this.log(Tg,a,b)};Z.prototype.fine=function(a,b){this.log(Fe,a,b)};Z.prototype.finest=function(a,b){this.log(Rk,a,b)};Z.prototype.Bm=function(a){if(!this.ke(a.Uc())){return}var b=this;while(b){b.dk(a);b=b.qa()}};Z.prototype.dk=function(a){for(var b=0;b<this.tc.length;b++){this.tc[b](a)}};Z.prototype.vo=function(a){this.p=
a};Z.prototype.Kj=function(a,b){this.ec[a]=b};var Dd={},Yc=null,Sg=function(){if(!Yc){Yc=new Z("");Dd[""]=Yc;Yc.og(Qk)}};var Rg=function(){Sg();return Yc},Qg=function(a){Sg();if(a in Dd){return Dd[a]}else{return Ok(a)}},Ok=function(a){var b=new Z(a),c=a.split("."),d=c[c.length-1];c.length=c.length-1;var e=c.join("."),f=Qg(e);f.Kj(d,b);b.vo(f);Dd[a]=b;return b};var Kb=function(a){this.fg=a||"";this.In=Ha()};Kb.prototype.qg=true;Kb.prototype.sj=true;Kb.prototype.rj=true;Kb.prototype.rc=function(a){throw Error("Must override formatRecord");};var Og=function(a){var b=new Date(a.Gh());return Vb(b.getFullYear()-2000)+Vb(b.getMonth()+1)+Vb(b.getDate())+" "+Vb(b.getHours())+":"+Vb(b.getMinutes())+":"+Vb(b.getSeconds())+"."+Vb(Math.floor(b.getMilliseconds()/10))},Vb=function(a){if(a<10){return"0"+a}return String(a)},Pg=function(a,b){var c=a.Gh()-b,d=c/1000,e=d.toFixed(3),
f=0;if(d<1){f=2}else{while(d<100){f++;d*=10}}while(f-- >0){e=" "+e}return e},Ee=function(a){Kb.call(this,a)};Ee.inherits(Kb);Ee.prototype.rc=function(a){var b;switch(a.Uc().value){case Ug.value:b="dbg-sh";break;case Ge.value:b="dbg-sev";break;case He.value:b="dbg-w";break;case Tg.value:b="dbg-i";break;case Fe.value:default:b="dbg-f";break}var c=[];c.push(this.fg," ");if(this.qg){c.push("[",Og(a),"] ")}if(this.sj){c.push("[",Ff(Pg(a,this.In)),"s] ")}if(this.rj){c.push("[",Ta(a.Gf()),"] ")}c.push('<span class="',
b,'">',Cf(Ff(Ta(a.Fh()))));if(a.jl()){c.push("<br>",Cf(Ff(a.kl())))}c.push("</span><br>");return c.join("")};var Ie=function(a){Kb.call(this,a)};Ie.inherits(Kb);Ie.prototype.rc=function(a){var b=[];b.push(this.fg," ");if(this.qg){b.push("[",Og(a),"] ")}if(this.sj){b.push("[",Pg(a,this.In),"s] ")}if(this.rj){b.push("[",a.Gf(),"] ")}b.push(a.Fh(),"\n");return b.join("")};var Db=function(){if(!Ba)return;this.gc={};this.Eg={};this.ug=[]};Db.prototype.Ta=Ed("goog.net.xhrMonitor");Db.prototype.Qi=function(a){if(!Ba)return;var b=this.pl(a);this.Ta.finest("Pushing context: "+a+" ("+b+")");this.ug.push(b)};Db.prototype.Mi=function(){if(!Ba)return;var a=this.ug.pop();this.Ta.finest("Popping context: "+a);this.Wo(a)};Db.prototype.Gm=function(a){if(!Ba)return;var b=ka(a);this.Ta.fine("Opening XHR : "+b);for(var c=0;c<this.ug.length;c++){var d=this.ug[c];this.xd(this.gc,d,b);
this.xd(this.Eg,b,d)}};Db.prototype.Fm=function(a){if(!Ba)return;var b=ka(a);this.Ta.fine("Closing XHR : "+b);delete this.Eg[b];for(var c in this.gc){uc(this.gc[c],b);if(this.gc[c].length==0){delete this.gc[c]}}};Db.prototype.Wo=function(a){var b=this.Eg[a],c=this.gc[a];if(b&&c){this.Ta.finest("Updating dependent contexts");wb(b,function(d){wb(c,function(e){this.xd(this.gc,d,e);this.xd(this.Eg,e,d)},this)},this)}};Db.prototype.pl=function(a){return V(a)?a:ka(a)};Db.prototype.xd=function(a,b,c){if(!a[b]){a[b]=
[]}if(!Jb(a[b],c)){a[b].push(c)}};var Lc=new Db;var K=function(){};K.inherits(Va);K.prototype.Xd=function(){return null};K.prototype.addEventListener=function(a,b,c,d){p(this,a,b,c,d)};K.prototype.removeEventListener=function(a,b,c,d){Oa(this,a,b,c,d)};K.prototype.dispatchEvent=function(a){return pl(this,a)};K.prototype.dispose=function(){if(!this.ma()){Va.prototype.dispose.call(this);vl(this)}};K.prototype.Yg=true;var Jh=function(a){return eval("("+a+")")};var ld=function(){};ld.prototype.hj=function(a,b){switch(typeof a){case "string":this.gj(a,b);break;case "number":this.jo(a,b);break;case "boolean":b.push(a);break;case "undefined":b.push("null");break;case "object":if(a==null){b.push("null");break}if(G(a)){this.io(a,b);break}this.ko(a,b);break;default:throw Error("Unknown type: "+typeof a);}};var vf={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"};
ld.prototype.gj=function(a,b){b.push('"',a.replace(/[\\\"\x00-\x1f\x80-\uffff]/g,function(c){if(c in vf){return vf[c]}var d=c.charCodeAt(0),e="\\u";if(d<16){e+="000"}else if(d<256){e+="00"}else if(d<4096){e+="0"}return vf[c]=e+d.toString(16)}),'"')};ld.prototype.jo=function(a,b){b.push(isFinite(a)&&!isNaN(a)?a:"null")};ld.prototype.io=function(a,b){var c=a.length;b.push("[");var d="";for(var e=0;e<c;e++){b.push(d);this.hj(a[e],b);d=","}b.push("]")};ld.prototype.ko=function(a,b){b.push("{");var c=
"";for(var d in a){b.push(c);this.gj(d,b);b.push(":");this.hj(a[d],b);c=","}b.push("}")};var lb=function(a,b){K.call(this);this.he=a||1;this.Ue=b||Ib;this.Ng=v(this.Oo,this);this.Ub=Ha()};lb.inherits(K);lb.prototype.enabled=false;var Ib=u.window,Bk=0.8;lb.prototype.Y=null;lb.prototype.setInterval=function(a){this.he=a;if(this.Y&&this.enabled){this.stop();this.start()}else if(this.Y){this.stop()}};lb.prototype.Oo=function(){if(this.enabled){var a=Ha()-this.Ub;if(a>0&&a<this.he*Bk){this.Y=this.Ue.setTimeout(this.Ng,this.he-a);return}this.Ik();if(this.enabled){this.Y=this.Ue.setTimeout(this.Ng,
this.he);this.Ub=Ha()}}};lb.prototype.Ik=function(){this.dispatchEvent("tick")};lb.prototype.start=function(){this.enabled=true;if(!this.Y){this.Y=this.Ue.setTimeout(this.Ng,this.he);this.Ub=Ha()}};lb.prototype.stop=function(){this.enabled=false;this.Ue.clearTimeout(this.Y);this.Y=null};lb.prototype.dispose=function(){if(!this.ma()){K.prototype.dispose.call(this);this.stop();this.Ue=null}};var D=function(){K.call(this);this.headers=new X};D.inherits(K);D.prototype.Ta=Ed("goog.net.XhrLite");D.prototype.Eb=false;D.prototype.w=null;D.prototype.Ye=null;D.prototype.hi="";D.prototype.fi="";D.prototype.dd=0;D.prototype.ed="";D.prototype.Te=0;D.prototype.$b=null;D.prototype.send=function(a,b,c,d){if(this.Eb){throw Error("[goog.net.XhrLite] Object is active with another request");}var e=b||"GET";this.hi=a;this.ed="";this.dd=0;this.fi=e;this.Eb=true;this.w=new Lh;this.Ye=xf||(xf=Oh());Lc.Gm(this.w);
this.w.onreadystatechange=v(this.se,this);try{this.ra("Opening Xhr");this.w.open(e,a,true)}catch(f){this.ra("Error opening Xhr: "+f.message);this.lh(5,f);return}var g=c?String(c):"",h=this.headers.clone();if(d){Aa(d,function(j,k){h.set(k,j)})}if(e=="POST"&&!h.fa("Content-Type")){h.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8")}Aa(h,function(j,k){this.w.setRequestHeader(k,j)},this);try{if(this.$b){Ib.clearTimeout(this.$b);this.$b=null}if(this.Te>0){this.ra("Will abort after "+
this.Te+"ms if incomplete");this.$b=Ib.setTimeout(v(this.Po,this),this.Te)}this.ra("Sending request");this.w.send(g)}catch(f){this.ra("Send error: "+f.message);this.lh(5,f)}};D.prototype.dispatchEvent=function(a){if(this.w){Lc.Qi(this.w);try{D.U.dispatchEvent.call(this,a)}finally{Lc.Mi()}}else{D.U.dispatchEvent.call(this,a)}};D.prototype.Po=function(){if(typeof Ae=="undefined"){}else if(this.w){this.ed="Timed out after "+this.Te+"ms, aborting";this.dd=8;this.ra(this.ed);this.dispatchEvent("timeout");
this.abort(8)}};D.prototype.lh=function(a,b){this.Eb=false;this.w.abort();this.ed=b;this.dd=a;this.dispatchEvent(jb);this.dispatchEvent("error");this.Ad()};D.prototype.abort=function(a){if(this.w){this.ra("Aborting");this.Eb=false;this.w.abort();this.dd=a||7;this.dispatchEvent(jb);this.dispatchEvent("abort");this.Ad()}};D.prototype.dispose=function(){if(!this.ma()){if(this.w){this.Eb=false;this.w.abort();this.Ad(true)}D.U.dispose.call(this)}};D.prototype.se=function(){if(!this.Eb){return}if(typeof Ae==
"undefined"){}else if(this.Ye[1]&&this.Zd()==4&&this.$d()==2){this.ra("Local request error detected and ignored")}else{this.dispatchEvent("readystatechange");if(this.ci()){this.ra("Request complete");this.Eb=false;if(this.Sb()){this.dispatchEvent(jb);this.dispatchEvent("success")}else{this.dd=6;this.ed=this.zl()+" ["+this.$d()+"]";this.dispatchEvent(jb);this.dispatchEvent("error")}this.Ad()}}};D.prototype.Ad=function(a){if(this.w){this.w.onreadystatechange=this.Ye[0]?um:null;var b=this.w;this.w=null;
this.Ye=null;if(this.$b){Ib.clearTimeout(this.$b);this.$b=null}if(!a){Lc.Qi(b);this.dispatchEvent("ready");Lc.Mi()}Lc.Fm(b)}};D.prototype.ci=function(){return this.Zd()==4};D.prototype.Sb=function(){switch(this.$d()){case 0:case 200:case 304:return true;default:return false}};D.prototype.Zd=function(){return this.w?this.w.readyState:0};D.prototype.$d=function(){try{return this.Zd()>2?this.w.status:-1}catch(a){this.Ta.warning("Can not get status: "+a.message);return-1}};D.prototype.zl=function(){try{return this.Zd()>
2?this.w.statusText:""}catch(a){this.Ta.fine("Can not get status: "+a.message);return""}};D.prototype.sc=function(){return this.w?this.w.responseText:""};D.prototype.getResponseHeader=function(a){return this.w&&this.ci()?this.w.getResponseHeader(a):undefined};D.prototype.ra=function(a){this.Ta.fine(a+" ["+this.fi+" "+this.hi+" "+this.$d()+"]")};var H=function(a){K.call(this);this.j=a||yc()};H.inherits(K);var Sm=0;var Of="Component already rendered",fi="Unable to set parent component";H.prototype.Qa=null;H.prototype.j=null;H.prototype.uc=false;H.prototype.a=null;H.prototype.Um=null;H.prototype.p=null;H.prototype.ec=null;H.prototype.zd=null;H.prototype.Aj=null;H.prototype.Na=function(){return this.Qa||(this.Qa=this.rl())};H.prototype.Ud=function(){return this.a};H.prototype.uo=function(a){if(this==a){throw Error(fi);}if(a&&this.p&&this.p.sh(this.Qa)){throw Error(fi);
}this.p=a};H.prototype.qa=function(){return this.p};H.prototype.Xd=function(){return this.p};H.prototype.bd=function(){return this.uc};H.prototype.v=function(){this.a=this.j.createElement("div")};H.prototype.render=function(a){this.Ce(a)};H.prototype.Ce=function(a,b){if(this.uc){throw Error(Of);}if(!this.a){this.v()}if(a){a.insertBefore(this.a,b||null)}else{this.j.Ma().body.appendChild(this.a)}if(!this.p||this.p.bd()){this.oc()}};H.prototype.decorate=function(a){if(this.uc){throw Error(Of);}else if(a&&
this.yd(a)){this.Aj=true;if(!this.j||this.j.Ma()!=mb(a)){this.j=yc(a)}this.of(a);this.oc()}else{throw Error("Invalid element to decorate");}};H.prototype.yd=function(a){return true};H.prototype.of=function(a){this.a=a};H.prototype.oc=function(){this.uc=true;this.Af(function(a){if(a.Ud()){a.oc()}})};H.prototype.qc=function(){this.Af(function(a){if(a.bd()){a.qc()}});this.uc=false};H.prototype.dispose=function(){if(!this.ma()){H.U.dispose.call(this);if(this.uc){this.qc()}this.Af(function(a){a.dispose()});
if(!this.Aj&&this.a){Mb(this.a)}this.ec=null;this.zd=null;this.a=null;this.Um=null;this.p=null}};H.prototype.rl=function(){return":"+Sm++};H.prototype.sh=function(a){return this.zd&&a?wm(this.zd,a)||null:null};H.prototype.Af=function(a,b){if(this.ec){wb(this.ec,a,b)}};H.prototype.removeChild=function(a,b){if(a){var c=V(a)?a:a.Na();a=this.sh(c);if(c&&a){ce(this.zd,c);uc(this.ec,a);if(b){a.qc();if(a.a){Mb(a.a)}}a.uo(null)}}if(!a){throw Error("Child is not in parent component");}return a};var Je=function(a){var b=a.className;return b&&typeof b.split=="function"?b.split(" "):[]},ma=function(a,b){var c=Je(a),d=Cd(arguments,1),e=1;for(var f=0;f<d.length;f++){if(!Jb(c,d[f])){c.push(d[f]);e&=1}else{e&=0}}a.className=c.join(" ");return Boolean(e)},Da=function(a,b){var c=Je(a),d=Cd(arguments,1),e=0;for(var f=0;f<c.length;f++){if(Jb(d,c[f])){Mk(c,f--,1);e++}}a.className=c.join(" ");return e==d.length};var wc=function(a,b){return Jb(Je(a),b)};var vc=function(a,b){if(Ba){a.setAttributeNS("http://www.w3.org/1999/xhtml","role","wairole:"+b);a.roleName=b}};var Wb=function(a,b,c){if(Ba){a.setAttributeNS("http://www.w3.org/2005/07/aaa",b,c)}};var za=function(a,b,c,d){K.call(this);if(!G(a)||!G(b)){throw Error("Start and end parameters must be arrays");return}if(a.length!=b.length){throw Error("Start and end points must be the same length");return}this.Yb=a;this.jh=b;this.tf=c;this.Ij=d;this.hc=[]};za.inherits(K);var Ra="begin",qb="animate",Jc=[],hc=null,Ch=function(){Ib.clearTimeout(hc);var a=Ha();wb(Jc,function(b){if(b){b.cycle(a)}});hc=Jc.length==0?null:Ib.setTimeout(Ch,20)},gm=function(a){if(!Jb(Jc,a)){Jc.push(a)}if(hc==null){hc=Ib.setInterval(Ch,
20)}},Zd=function(a){uc(Jc,a);if(Jc.length.length==0&&hc!=null){Ib.clearInterval(hc);hc=null}};za.prototype.Fa=0;za.prototype.rh=0;za.prototype.xa=0;za.prototype.Zb=null;za.prototype.kh=null;za.prototype.Wf=null;za.prototype.play=function(a){if(a||this.Fa==0){this.xa=0;this.hc=this.Yb}else if(this.Fa==1){return false}Zd(this);this.Zb=Ha();if(this.Fa==-1){this.Zb-=this.tf*this.xa}this.kh=this.Zb+this.tf;this.Wf=this.Zb;if(this.xa==0){this.bb(Ra)}this.bb("play");if(this.Fa==-1){this.bb("resume")}this.Fa=
1;gm(this);this.cycle(this.Zb);return true};za.prototype.stop=function(a){Zd(this);this.Fa=0;if(a)this.xa=1;this.xg(this.xa);this.bb("stop");this.bb("end")};za.prototype.pause=function(){if(this.Fa==1){Zd(this);this.Fa=-1;this.bb("pause")}};za.prototype.cycle=function(a){this.xa=(a-this.Zb)/(this.kh-this.Zb);if(this.xa>=1)this.xa=1;this.rh=1000/(a-this.Wf);this.Wf=a;if(Bb(this.Ij)){this.xg(this.Ij(this.xa))}else{this.xg(this.xa)}if(this.xa==1){this.Fa=0;this.bb("finish");this.bb("end");Zd(this)}else if(this.Fa==
1){this.bb(qb)}};za.prototype.xg=function(a){this.hc=new Array(this.Yb.length);for(var b=0;b<this.Yb.length;b++){this.hc[b]=(this.jh[b]-this.Yb[b])*a+this.Yb[b]}};za.prototype.bb=function(a){this.dispatchEvent(new tf(a,this))};var tf=function(a,b){aa.call(this,a);this.coords=b.hc;this.x=b.hc[0];this.y=b.hc[1];this.z=b.hc[2];this.duration=b.tf;this.progress=b.xa;this.fps=b.rh;this.state=b.Fa;this.anim=b};tf.inherits(aa);tf.prototype.Tg=function(){return Kk(this.coords,Math.round)};var rb=function(a,b,c){this.target=a;this.handle=b||a;this.Ja=true;this.Kd=false;this.limits=c||new kc;this.va=this.target.ownerDocument||this.target.document;this.screenX=0;this.screenY=0;this.deltaX=0;this.deltaY=0;p(this.handle,Dc,this.tj,false,this);p(this.va,"mousemove",this.si,false,this);p(this.va,"mouseup",this.ih,false,this)};rb.inherits(K);rb.prototype.Gc=function(a){this.Ja=a};rb.prototype.dispose=function(){if(this.ma())return;K.prototype.dispose.call(this);Oa(this.handle,Dc,this.tj,false,
this);Oa(this.va,"mousemove",this.si,false,this);Oa(this.va,"mouseup",this.ih,false,this);delete this.target;delete this.handle};rb.prototype.tj=function(a){if(this.Ja&&!this.Kd){var b=this.dispatchEvent(new jd("start",this,a.clientX,a.clientY,a));if(b!==false){this.screenX=a.screenX;this.screenY=a.screenY;this.deltaX=this.target.offsetLeft;this.deltaY=this.target.offsetTop;this.Kd=true;a.preventDefault()}}};rb.prototype.ih=function(a){if(this.Kd){this.Kd=false;var b=this.ji(this.deltaX),c=this.ki(this.deltaY);
this.dispatchEvent(new jd("end",this,a.clientX,a.clientY,a,b,c))}};rb.prototype.si=function(a){if(this.Kd&&this.Ja){var b=a.screenX-this.screenX,c=a.screenY-this.screenY;this.deltaX+=b;this.deltaY+=c;var d=this.ji(this.deltaX),e=this.ki(this.deltaY);this.screenX=a.screenX;this.screenY=a.screenY;var f=this.dispatchEvent(new jd("beforedrag",this,a.clientX,a.clientY,a,d,e));if(f!==false){this.Ck(d,e);this.dispatchEvent(new jd("drag",this,a.clientX,a.clientY,a,d,e));a.preventDefault()}}};rb.prototype.ji=
function(a){var b=this.limits,c=typeof b.left!="undefined"?b.left:null,d=typeof b.width!="undefined"?b.width:0,e=c!=null?c+d:Infinity,f=c!=null?c:-Infinity;return Math.min(e,Math.max(f,a))};rb.prototype.ki=function(a){var b=this.limits,c=typeof b.top!="undefined"?b.top:null,d=typeof b.height!="undefined"?b.height:0,e=c!=null?c+d:Infinity,f=c!=null?c:-Infinity;return Math.min(e,Math.max(f,a))};rb.prototype.Ck=function(a,b){this.target.style.left=a+"px";this.target.style.top=b+"px"};var jd=function(a,
b,c,d,e,f,g){aa.call(this,a);this.type=a;this.clientX=c;this.clientY=d;this.browserEvent=e;this.left=ga(f)?f:b.deltaX;this.top=ga(g)?g:b.deltaY;this.dragger=b};jd.inherits(aa);var Jf,Eb=function(a,b,c){a.style[Pm(b)]=c};var Mm=function(a,b){var c=mb(a);if(c.defaultView&&c.defaultView.getComputedStyle){var d=c.defaultView.getComputedStyle(a,"");if(d){return d[b]}}return null};var Kf=function(a,b){return Mm(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]};var Mf=function(a,b,c){var d,e;if(b instanceof Cb){d=b.x;e=b.y}else{d=b;e=c}a.style.left=typeof d=="number"?Math.round(d)+"px":d;a.style.top=typeof e=="number"?Math.round(e)+"px":e};var di=function(a){var b;if(a){if(a.nodeType==
9){b=a}else{b=mb(a)}}else{b=$g()}if(M&&b.compatMode!="CSS1Compat"){return b.body}return b.documentElement},lc=function(a){var b=mb(a),c=Ba&&b.getBoxObjectFor&&Kf(a,"position")=="absolute"&&(a.style.top==""||a.style.left=="");if(typeof Jf=="undefined"){Jf=hi&&!ie("1.8.0.11")}var d=new Cb(0,0),e=di(b);if(a==e){return d}var f=null,g;if(a.getBoundingClientRect){g=a.getBoundingClientRect();var h=e.scrollTop,j=e.scrollLeft;d.x=g.left+j;d.y=g.top+h}else if(b.getBoxObjectFor&&!c&&!Jf){g=b.getBoxObjectFor(a);
var k=b.getBoxObjectFor(e);d.x=g.screenX-k.screenX;d.y=g.screenY-k.screenY}else{d.x=a.offsetLeft;d.y=a.offsetTop;f=a.offsetParent;if(f!=a){while(f){d.x+=f.offsetLeft;d.y+=f.offsetTop;f=f.offsetParent}}if(Fb||ta&&Kf(a,"position")=="absolute"){d.y-=b.body.offsetTop}f=a.offsetParent;while(f&&f!=b.body){d.x-=f.scrollLeft;if(!Fb||f.tagName!="TR"){d.y-=f.scrollTop}f=f.offsetParent}}return d};var fe=function(a,b,c){var d=lc(a);if(b instanceof Cb){c=b.y;b=b.x}var e=b-d.x,f=c-d.y;Mf(a,a.offsetLeft+e,a.offsetTop+
f)},mc=function(a,b,c){var d;if(b instanceof W){d=b.height;b=b.width}else{d=c}a.style.width=typeof b=="number"?Math.round(b)+"px":b;a.style.height=typeof d=="number"?Math.round(d)+"px":d},la=function(a){if(Kf(a,"display")!="none"){return new W(a.offsetWidth,a.offsetHeight)}var b=a.style,c=b.visibility,d=b.position;b.visibility="hidden";b.position="absolute";b.display="";var e=a.offsetWidth,f=a.offsetHeight;b.display="none";b.position=d;b.visibility=c;return new W(e,f)};var Pm=function(a){return String(a).replace(/\-([a-z])/g,
function(b,c){return c.toUpperCase()})};var Lf=function(a,b){var c=a.style;if("opacity"in c){c.opacity=b}else if("MozOpacity"in c){c.MozOpacity=b}else if("KhtmlOpacity"in c){c.KhtmlOpacity=b}else if("filter"in c){c.filter="alpha(opacity="+b*100+")"}};var bb=function(a,b){a.style.display=b?"":"none"};var Nm=function(){if(Ba){return"MozUserSelect"}else if(ta){return"WebkitUserSelect"}return null};var Om=function(a,b){var c=a.getElementsByTagName("*");if(Ba||ta){var d=Nm(),e=b?"none":"";a.style[d]=e;
for(var f=0,g;g=c[f];f++){g.style[d]=e}}else if(M||Fb){var e=b?"on":"";a.setAttribute("unselectable",e);for(var f=0,g;g=c[f];f++){g.setAttribute("unselectable",e)}}};var x=function(a,b,c){H.call(this,c);this.aa=a||"modal-dialog";this.Ag=!(!b);this.Ga=gi};x.inherits(H);x.prototype.aa=null;x.prototype.Ag=false;x.prototype.ri=true;x.prototype.hh=true;x.prototype.kn=0.3;x.prototype.Ve="";x.prototype.fc="";x.prototype.Ga=null;x.prototype.lc=null;x.prototype.Z=false;x.prototype.P=null;x.prototype.Q=null;x.prototype.za=null;x.prototype.Db=null;x.prototype.vg=null;x.prototype.ac=null;x.prototype.ta=null;x.prototype.la=null;x.prototype.ng=function(a){this.fc=a;if(this.ta){this.ta.innerHTML=
a}};x.prototype.vh=function(){if(!this.bd()){this.render()}return this.ta};x.prototype.pk=function(){var a=new rb(this.a,this.za);ma(this.za,this.aa+"-title-draggable");return a};x.prototype.v=function(){this.oi();this.a=this.j.v("div",{className:this.aa,tabIndex:0},this.za=this.j.v("div",{className:this.aa+"-title",id:this.Na()},this.Db=this.j.v("span",{className:this.aa+"-title-text"},this.Ve),this.ac=this.j.v("span",{className:this.aa+"-title-close"})),this.ta=this.j.v("div",{className:this.aa+
"-content"}),this.la=this.j.v("div",{className:this.aa+"-buttons"}));this.vg=this.za.id;vc(this.a,"dialog");Wb(this.a,"labelledby",this.vg);if(this.fc){this.ta.innerHTML=this.fc}bb(this.a,false);if(this.Ga){this.Ga.af(this.la)}};x.prototype.oi=function(){if(this.Ag&&!this.Q){this.Q=this.j.v("iframe",{frameborder:0,style:"border: 0",className:this.aa+"-bg"});bb(this.Q,false);Lf(this.Q,0)}else if(!this.Ag&&this.Q){Mb(this.Q);this.Q=null}if(this.ri&&!this.P){this.P=this.j.v("div",{className:this.aa+
"-bg"});Lf(this.P,this.kn);bb(this.P,false)}else if(!this.ri&&this.P){Mb(this.P);this.P=null}};x.prototype.render=function(a){if(this.bd()){throw Error(Of);}if(!this.a){this.v()}var b=a||this.j.Ma().body;this.Vi(b);x.U.render.call(this,b)};x.prototype.Vi=function(a){if(this.Q){a.appendChild(this.Q)}if(this.P){a.appendChild(this.P)}};x.prototype.yd=function(a){return a&&a.tagName&&a.tagName=="DIV"&&x.U.yd.call(this,a)};x.prototype.of=function(a){this.a=a;ma(this.a,this.aa);var b=this.aa+"-content";
this.ta=$c(this.a,function(g){return g.nodeType==1&&wc(g,b)});if(this.ta){this.fc=this.ta.innerHTML}else{this.ta=this.j.v("div",{className:b});if(this.fc){this.ta.innerHTML=this.fc}this.a.appendChild(this.ta)}var c=this.aa+"-title",d=this.aa+"-title-text",e=this.aa+"-title-close";this.za=$c(this.a,function(g){return g.nodeType==1&&wc(g,c)});if(this.za){this.Db=$c(this.za,function(g){return g.nodeType==1&&wc(g,d)});this.ac=$c(this.za,function(g){return g.nodeType==1&&wc(g,e)})}else{this.za=this.j.v("div",
{className:c});this.a.insertBefore(this.za,this.ta)}if(this.Db){this.Ve=Me(this.Db)}else{this.Db=this.j.v("span",{className:d},this.Ve);this.za.appendChild(this.Db)}Wb(this.a,"labelledby",this.vg);if(!this.ac){this.ac=this.j.v("span",{className:e},this.Ve);this.za.appendChild(this.ac)}var f=this.aa+"-buttons";this.la=$c(this.a,function(g){return g.nodeType==1&&wc(g,f)});if(this.la){this.Ga=new qa(this.j);this.Ga.decorate(this.la)}else{this.la=this.j.v("div",{className:f});this.a.appendChild(this.la);
if(this.Ga){this.Ga.af(this.la)}}this.oi();this.Vi(mb(this.a).body)};x.prototype.oc=function(){x.U.oc.call(this);if(this.hh&&!this.lc){this.lc=this.pk()}p(this.ac,wa,this.Fi,false,this);p(this.la,wa,this.zi,false,this);vc(this.a,"dialog");if(this.Db.id!==""){Wb(this.a,"labelledby",this.Db.id)}};x.prototype.qc=function(){Oa(this.ac,wa,this.Fi,this);Oa(this.la,wa,this.zi,this);if(this.wc()){this.Ea(false)}if(this.lc){this.lc.dispose();this.lc=null}x.U.qc.call(this)};x.prototype.Ea=function(a){if(a==
this.Z){return}var b=this.j.Ma(),c=Gd(b)||window;if(!this.bd()){this.render(b.body)}if(a){this.aj();this.reposition();p(b,Bc,this.Ci,true,this);p(c,"resize",this.Di,true,this)}else{Oa(b,Bc,this.Ci,true,this);Oa(c,"resize",this.Di,true,this)}if(this.Q){bb(this.Q,a)}if(this.P){bb(this.P,a)}bb(this.a,a);if(a&&this.Tc().zh()){var d=this.la.getElementsByTagName("button");for(var e=0,f;f=d[e];e++){if(f.name==this.Tc().zh()){f.focus();break}}}this.Z=a};x.prototype.wc=function(){return this.Z};x.prototype.aj=
function(){if(this.Q){bb(this.Q,false)}if(this.P){bb(this.P,false)}var a=this.j.Ma(),b=Gd(a)||window,c=Ne(b),d=a.body.scrollWidth,e=Math.max(a.body.scrollHeight,c.height);if(this.Q){bb(this.Q,true);mc(this.Q,d,e)}if(this.P){bb(this.P,true);mc(this.P,d,e)}if(this.hh){var f=la(this.a);this.lc.limits=new kc(0,0,d-f.width,e-f.height)}};x.prototype.reposition=function(){var a=this.j.Ma(),b=Gd(a)||window,c=bl(b),d=c.x,e=c.y,f=la(this.a),g=Ne(b),h=Math.max(d+g.width/2-f.width/2,0),j=Math.max(e+g.height/
2-f.height/2,0);Mf(this.a,h,j)};x.prototype.Fi=function(a){var b=this.Tc(),c=b.Qd();if(c){var d=b.get(c);if(this.dispatchEvent(new he(c,d))){this.Ea(false)}}else{this.Ea(false)}};x.prototype.dispose=function(){if(!this.ma()){x.U.dispose.call(this);if(this.P){Mb(this.P);this.P=null}if(this.Q){Mb(this.Q);this.Q=null}}};x.prototype.ij=function(a){this.Ga=a;if(this.la){this.Ga.af(this.la)}};x.prototype.Tc=function(){return this.Ga};x.prototype.zi=function(a){if(a.target.tagName=="BUTTON"){var b=a.target.name,
c=this.Tc().get(b);if(this.dispatchEvent(new he(b,c))){this.Ea(false)}}};x.prototype.Ci=function(a){if(a.keyCode==27){var b=this.Tc();if(b.Qd()){var c=b.get(b.Qd());if(this.dispatchEvent(new he(b.Qd(),c))){this.Ea(false)}}else{this.Ea(false)}}};x.prototype.Di=function(a){this.aj()};var he=function(a,b){this.type="dialogselect";this.key=a;this.caption=b};he.inherits(aa);var qa=function(a){this.j=a||yc();X.call(this)},gi,Um,Vm,Tm;qa.inherits(X);qa.prototype.ah=null;qa.prototype.a=null;qa.prototype.Pg=
null;qa.prototype.set=function(a,b,c,d){X.prototype.set.call(this,a,b);if(c){this.ah=a}if(d){this.Pg=a}};qa.prototype.af=function(a){this.a=a;this.render()};qa.prototype.render=function(){if(this.a){this.a.innerHTML="";var a=yc(this.a);Aa(this,function(b,c){this.a.appendChild(a.v("button",{name:c},b))},this)}};qa.prototype.decorate=function(a){if(!a||a.nodeType!=1){return}this.a=a;var b=this.a.getElementsByTagName("button");for(var c=0,d,e,f;d=b[c];c++){e=d.name||d.id;f=Me(d)||d.value;if(e){this.set(e,
f,c==0,d.name=="cancel")}}};qa.prototype.zh=function(){return this.ah};qa.prototype.Qd=function(){return this.Pg};(function(){var a=Kc("OK"),b=Kc("Cancel"),c=Kc("Yes"),d=Kc("No"),e=Kc("Save"),f=Kc("Continue"),g=new qa;g.set("ok",a,true);g.set("cancel",b,false,true);gi=g;var h=new qa;h.set("yes",c,true);h.set("no",d,false,true);Um=h;var j=new qa;j.set("yes",c);j.set("no",d,true);j.set("cancel",b,false,true);Vm=j;var k=new qa;k.set("continue",f);k.set("save",e);k.set("cancel",b,true,true);Tm=k})();;;var fa=function(a,b,c,d,e){za.call(this,b,c,d,e);this.element=a};fa.inherits(za);var ae=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fxdhtml.Slide] Start and end points must be 2D";return}var f=[Ra,qb,"end"];p(this,f,this.Xm,false,this)};ae.inherits(fa);ae.prototype.Xm=function(a){this.element.style.left=Math.round(a.x)+"px";this.element.style.top=Math.round(a.y)+"px"};var Ih=function(a,b,c,d){var e=[a.offsetLeft,a.offsetTop];p(this,Ra,this.xo,false,this);
ae.call(this,a,e,b,c,d)};Ih.inherits(ae);Ih.prototype.xo=function(a){this.Yb=[this.element.offsetLeft,this.element.offsetTop]};var uf=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fxdhtml.Slide] Start and end points must be 2D";return}var f=[Ra,qb,"end"];p(this,f,this.De,false,this);this.Nm=Math.max(this.jh[0],this.Yb[0]);this.Lm=Math.max(this.jh[1],this.Yb[1])};uf.inherits(fa);uf.prototype.De=function(a){this.jk(Math.round(a.x),Math.round(a.y),this.Nm,this.Lm);
this.element.style.width=Math.round(a.x)+"px";this.element.style.marginLeft=Math.round(a.x)-this.Nm+"px";this.element.style.marginTop=Math.round(a.y)-this.Lm+"px"};uf.prototype.jk=function(a,b,c,d){this.element.style.clip="rect("+(d-b)+"px "+c+"px "+d+"px "+(c-a)+"px)"};var Hh=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fx.dom.Scroll] Start and end points must be 2D";return}var f=[Ra,qb,"end"];p(this,f,this.bo,false,this)};Hh.inherits(fa);Hh.prototype.bo=
function(a){this.element.scrollLeft=Math.round(a.x);this.element.scrollTop=Math.round(a.y)};var Fh=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fx.dom.Resize] Start and end points must be 2D";return}var f=[Ra,qb,"end"];p(this,f,this.De,false,this)};Fh.inherits(fa);Fh.prototype.De=function(a){this.element.style.width=Math.round(a.x)+"px";this.element.style.height=Math.round(a.y)+"px"};var Gh=function(a,b,c,d,e){fa.call(this,a,[b],[c],d,e);var f=[Ra,qb,"end"];
p(this,f,this.Vn,false,this)};Gh.inherits(fa);Gh.prototype.Vn=function(a){this.element.style.width=Math.round(a.x)+"px"};var $d=function(a,b,c,d,e){fa.call(this,a,[b],[c],d,e);var f=[Ra,qb,"end"];p(this,f,this.Un,false,this)};$d.inherits(fa);$d.prototype.Un=function(a){this.element.style.height=Math.round(a.x)+"px"};var ab=function(a,b,c,d,e){if(kd(b))b=[b];if(kd(c))c=[c];fa.call(this,a,b,c,d,e);if(b.length!=1||c.length!=1){throw"[goog.fx.dom.Fade] Start and end points must be 1D";return}var f=[Ra,
qb,"end"];p(this,f,this.Tk,false,this)};ab.inherits(fa);ab.prototype.Tk=function(a){Lf(this.element,a.x)};ab.prototype.show=function(a){this.element.style.display=""};ab.prototype.hide=function(a){this.element.style.display="none"};var jm=function(a,b,c){ab.call(this,a,1,0,b,c)};jm.inherits(ab);var hm=function(a,b,c){ab.call(this,a,0,1,b,c)};hm.inherits(ab);var km=function(a,b,c){ab.call(this,a,1,0,b,c);p(this,Ra,this.show,false,this);p(this,"end",this.hide,false,this)};km.inherits(ab);var im=function(a,
b,c){ab.call(this,a,0,1,b,c);p(this,Ra,this.show,false,this)};im.inherits(ab);var Dh=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=3||c.length!=3){throw"[goog.fx.dom.BgColorTransform] Start and end points must be 3D";return}var f=[Ra,qb,"end"];p(this,f,this.He,false,this)};Dh.inherits(fa);Dh.prototype.He=function(a){var b="rgb("+a.Tg().join(",")+")";this.element.style.backgroundColor=b};var Eh=function(a,b,c,d,e){fa.apply(this,arguments);if(b.length!=3||c.length!=3){throw"[goog.fx.dom.ColorTransform] Start and end points must be 3D";
return}var f=[Ra,qb,"end"];p(this,f,this.He,false,this)};Eh.inherits(fa);Eh.prototype.He=function(a){var b="rgb("+a.Tg().join(",")+")";this.element.style.color="rgb("+b+")"};var R=function(a){if(a){this.Da(a)}};R.prototype.Da=function(a,b,c,d){this.ha=a;if(!c&&!d){if(ha(a,"?")){this.ek=true;a=a.substring(0,a.length-1)}if(ha(a,"()")){if(ha(a,"name()")||ha(a,"count()")||ha(a,"position()")){var e=a.lastIndexOf("/");if(e!=-1){this.yf=a.substring(e+1);a=a.substring(0,e)}else{this.yf=a;a="."}if(this.yf=="count()"){this.Ip=true}}}}this.ga=b||a.split("/");this.X=this.ga.length;this.Ub=this.ga[this.X-1];this.i=this.ga[0];if(this.X==1){this.cj=this;this.ie=sa(a,"$")}else{this.cj=
Se(this.i,null,this,null);this.ie=this.cj.ie;this.i=this.cj.i}if(this.X==1&&!this.ie){this.pm=a=="."||a=="";this.sm=sa(a,"@");this.nm=a=="*|text()";this.mm=a=="@*";this.om=a=="*"}};R.prototype.Lb=function(){return this.ha};R.prototype.qa=function(){if(!this.Xp){if(this.X>1){this.Ii=Se(null,this.ga.slice(0,this.ga.length-1),this,null)}this.Xp=true}return this.Ii};R.prototype.Hh=function(){if(!this.Tp){if(this.X>1){this.vi=Se(null,this.ga.slice(1),null,this)}this.Tp=true}return this.vi};R.prototype.h=
function(a){if(a==null){a=q()}else if(this.ie){a=a.Rd?a.Rd():q()}if(this.Ip){var b=this.pa(a);return b.e()}if(this.X==1){return a.d(this.i)}else if(this.X==0){return a.get()}var c=a.b(this.i);if(c==null){return null}else{return this.Hh().h(c)}};R.prototype.pa=function(a,b){return this.Hf(a,false,b)};R.prototype.D=function(a,b){return this.Hf(a,true,b)};R.prototype.Hf=function(a,b,c){if(a==null){a=q()}else if(this.ie){a=a.Rd?a.Rd():q()}if(this.X==0&&b){return a}else if(this.X==0&&!b){return new P([a])}else if(this.X==
1){if(b){return a.b(this.i,c)}else{var d=a.b(this.i);if(d&&d.R()){return d.g()}else{return a.g(this.i)}}}else{var e=a.b(this.i,c);if(e==null&&b){return null}else if(e==null&&!b){return new La}return this.Hh().Hf(e,b,c)}};R.prototype.ek=false;R.prototype.ga=[];R.prototype.X=null;R.prototype.i=null;R.prototype.Ub=null;R.prototype.pm=false;R.prototype.sm=false;R.prototype.nm=false;R.prototype.mm=false;R.prototype.om=false;R.prototype.yf=null;R.prototype.Ii=null;R.prototype.vi=null;var o=function(a){var b=
Hd[a];if(b==null){b=new R(a);Hd[a]=b}return b},Se=function(a,b,c,d){var e=a||b.join("/"),f=Hd[e];if(f==null){f=new R;f.Da(e,b,c,d);Hd[e]=f}return f},Hd={};var rp=o("."),op=o("*|text()"),pp=o("*"),np=o("@*"),sp=o("name()"),qp=o("count()"),tp=o("position()");var Xa=function(){};Xa.prototype.get=function(){};Xa.prototype.set=function(a){};Xa.prototype.g=function(a){};Xa.prototype.b=function(a){};Xa.prototype.d=function(a){};Xa.prototype.o=function(a,b){};Xa.prototype.m=function(){};Xa.prototype.qb=function(a){};Xa.prototype.u=function(){};Xa.prototype.load=function(){};Xa.prototype.R=function(){};var ad="NOT_LOADED",yb=function(){};yb.prototype.set=function(a){};yb.prototype.g=function(a){return new La};yb.prototype.b=function(a,b){return null};yb.prototype.d=
function(a){return null};yb.prototype.u=function(){var a="",b=this.m();if(this.Vc&&this.Vc()){a=this.Vc().u()+(b.indexOf("[")!=-1?"":"/")}return a+b};yb.prototype.load=function(){};yb.prototype.Vc=null;var zc=function(){};zc.prototype.add=function(a){};zc.prototype.get=function(a){};zc.prototype.n=function(a){};zc.prototype.e=function(){};zc.prototype.rb=function(a,b){};zc.prototype.removeNode=function(a){};var P=function(a){this.l={};this.Sa=[];this.Qb={};if(a){for(var b=0,c;c=a[b];b++){this.add(c)}}};
P.prototype.add=function(a){this.Sa.push(a);var b=a.m();if(b!=null){this.l[b]=a;this.Qb[b]=this.Sa.length-1}};P.prototype.get=function(a){return this.l[a]||null};P.prototype.n=function(a){return this.Sa[a]||null};P.prototype.e=function(){return this.Sa.length};P.prototype.rb=function(a,b){if(b==null){this.removeNode(a)}else{var c=this.Qb[a];if(c!=null){this.l[a]=b;this.Sa[c]=b}else{this.add(b)}}};P.prototype.removeNode=function(a){var b=this.Qb[a];if(b!=null){this.Sa.splice(b,1);delete this.l[a];
delete this.Qb[a];for(var c in this.Qb){if(this.Qb[c]>b){this.Qb[c]--}}}return b!=null};P.prototype.indexOf=function(a){return this.Qb[a]};var La=function(){P.call(this)};La.inherits(P);La.prototype.add=function(a){throw Error("Can't add to EmptyNodeList");};var Q=Ed("goog.ds"),bd=function(a,b){var c=function(){};c.prototype=a;var d=new c;d.m=function(){return b};return d};var $=function(){this.Oc=new P;this.ak=new X;this.mi={};this.ne={};this.Kc={};this.tp=0;this.$h={}},Re=null;$.inherits(Xa);var q=function(){if(!Re){Re=new $}return Re};$.prototype.$=function(a,b,c){var d=!(!b),e=c||a.m();if(!sa(e,"$")){e="$"+e}a.qb(e);this.Oc.add(a);this.ak.set(e,d)};$.prototype.Tj=function(a,b){if(!this.Ig){this.Ig=v(this.wm,this)}if(this.Kc[a]){var c=this.Kc[a].Lb();this.Ui(this.Ig,c+"/...",a)}this.Kc[a]=o(b);this.O(this.Ig,b+"/...",a);this.k(a)};$.prototype.wm=function(a,b){var c=
this.Kc[b];if(c){var d=c.Lb();if(a.indexOf(d)==0){this.k(b+a.substring(d.length))}else{this.k(b)}}};$.prototype.Sd=function(a){if(this.Kc[a]){return this.Kc[a].D()}else{return this.Oc.get(a)}};$.prototype.get=function(){return this.Oc};$.prototype.set=function(a){throw Error("Can't set on DataManager");};$.prototype.g=function(a){if(a){return new P([this.b(a)])}else{return this.Oc}};$.prototype.b=function(a){return this.Sd(a)};$.prototype.d=function(a){var b=this.Sd(a);return b?b.get():null};$.prototype.m=
function(){return""};$.prototype.u=function(){return""};$.prototype.load=function(){var a=this.Oc.e();for(var b=0;b<a;b++){var c=this.Oc.n(b),d=this.ak.get(c.m());if(d){c.load()}}};$.prototype.R=function(){return false};$.prototype.O=function(a,b,c){var d=0;if(ha(b,"/...")){d=1000;b=b.substring(0,b.length-4)}else if(ha(b,"/*")){d=1;b=b.substring(0,b.length-2)}c=c||"";var e=b+":"+c+":"+ka(a),f={dataPath:b,id:c,fn:a},g=o(b),h=ka(a);if(!this.ne[h]){this.ne[h]={}}this.ne[h][e]={listener:f,items:[]};while(g){var j=
{listener:f,maxAncestors:d},k=this.mi[g.Lb()];if(k==null){k={};this.mi[g.Lb()]=k}k[e]=j;d=0;g=g.qa();this.ne[h][e].items.push({key:e,obj:k})}};$.prototype.Hg=function(a,b,c){var d=b.indexOf("*");if(d==-1){this.O(a,b,c);return}var e=b.substring(0,d)+"...",f="$";if(ha(b,"/...")){b=b.substring(0,b.length-4);f=""}var g=de(b),h=g.replace(/\\\*/g,"([^\\/]+)")+f,j=new RegExp(h),k=function(m,y){var A=j.exec(m);if(A){A.shift();a(m,c,A)}};this.O(k,e,c);var l=ka(a);if(!this.$h[l]){this.$h[l]={}}var n=b+":"+
c;this.$h[l][n]={listener:{dataPath:e,fn:k,id:c}}};$.prototype.Ui=function(a,b,c){if(b&&ha(b,"/...")){b=b.substring(0,b.length-4)}else if(b&&ha(b,"/*")){b=b.substring(0,b.length-2)}this.Mn(this.ne,false,a,b,c)};$.prototype.Mn=function(a,b,c,d,e){var f=ka(c),g=a[f];if(g!=null){for(var h in g){var j=g[h],k=j.listener;if((!d||d==k.dataPath)&&(!e||e==k.id)){if(b){this.Ui(k.fn,k.dataPath,k.id)}if(j.items){for(var l=0;l<j.items.length;l++){var n=j.items[l];delete n.obj[n.key]}}delete g[h]}}}};$.prototype.Xn=
function(a){if(this.bh){throw Error("Can not nest calls to runWithoutFiringDataChanges");}this.bh=true;try{a()}finally{this.bh=false}};$.prototype.k=function(a){if(this.bh){return}var b=o(a),c=0;while(b){var d=this.mi[b.Lb()];if(d){for(var e in d){var f=d[e],g=f.listener;if(c<=f.maxAncestors){g.fn(a,g.id)}}}c++;b=b.qa()}this.tp++};var B=function(a,b,c){this.p=c;this.ba=b;this.nj(a)};B.prototype.nj=function(a){this.i=a;this.M=null};B.prototype.get=function(){return!Sa(this.i)?this.i:this.g()};B.prototype.set=function(a){if(a&&Sa(this.i)){throw Error("Can't set group nodes to new values yet");}if(this.p){this.p.i[this.ba]=a}this.i=a;this.M=null;q().k(this.u())};B.prototype.g=function(a){if(!this.i){return new La}if(!a||a=="*"){this.ua(false);return this.M}else if(a.indexOf("*")==-1){if(this.i[a]!=null){return new P([this.b(a)])}else{return new La}}else{throw new Error("Selector not supported yet ("+
a+")");}};B.prototype.ua=function(a){if(this.M&&!a){return}if(!Sa(this.i)){this.M=new La;return}var b=new P;if(this.i!=null){var c;if(G(this.i)){var d=this.i.length;for(var e=0;e<d;e++){var f=this.i[e],g=f.id,h=g!=null?String(g):"["+e+"]";c=new B(f,h,this);b.add(c)}}else{for(var h in this.i){var j=this.i[h];if(j.m){b.add(j)}else if(!Bb(j)){c=new B(j,h,this);b.add(c)}}}}this.M=b};B.prototype.b=function(a,b){if(!this.i){return null}var c=this.g().get(a);if(!c&&b){var d={};if(G(this.i)){d.id=a;this.i.push(d)}else{this.i[a]=
d}c=new B(d,a,this);if(this.M){this.M.add(c)}}return c};B.prototype.d=function(a){if(this.M){var b=this.g().get(a);return b?b.get():null}else if(this.i){return this.i[a]}else{return null}};B.prototype.o=function(a,b){var c=null,d=null,e=false;if(b!=null){if(b.m){d=b;d.p=this}else{if(G(b)||Sa(b)){d=new B(b,a,this)}else{d=new Ac(this.i,a,this)}}}if(G(this.i)){this.ua();var f=this.M.indexOf(a);if(b==null){var g=this.M.get(a);if(g){c=g.u()}this.i.splice(f,1)}else{if(f){this.i[f]=b}else{this.i.push(b)}}if(f==
null){e=true}this.M.rb(a,d)}else if(Sa(this.i)){if(b==null){this.ua();var g=this.M.get(a);if(g){c=g.u()}delete this.i[a]}else{if(!this.i[a]){e=true}this.i[a]=b}if(this.M){this.M.rb(a,d)}}var h=q();if(d){h.k(d.u());if(e&&this.R()){h.k(this.u());h.k(this.u()+"/count()")}}else if(c){h.k(c);if(this.R()){h.k(this.u());h.k(this.u()+"/count()")}}return d};B.prototype.m=function(){return this.ba};B.prototype.qb=function(a){this.ba=a};B.prototype.u=function(){var a="";if(this.p){a=this.p.u()+"/"}return a+
this.ba};B.prototype.load=function(){};B.prototype.R=function(){return this.Kp!=null?this.Kp:G(this.i)};var Ac=function(a,b,c){yb.call(this);this.ba=b;this.p=a;this.Wp=c||this.p};Ac.inherits(yb);Ac.prototype.get=function(){return this.p[this.ba]};Ac.prototype.set=function(a){var b=this.p[this.ba];this.p[this.ba]=a;if(b!=a){q().k(this.u())}};Ac.prototype.m=function(){return this.ba};Ac.prototype.Vc=function(){return this.Wp};var r=function(a,b){var c;if(a instanceof r){this.Xb(b==null?a.nl():b);this.rd(a.Lf());this.Oe(a.Sh());this.Ie(a.Ah());this.Ne(a.Kf());this.Me(a.Jf());this.qd(a.Yd().clone());this.Je(a.Dh())}else if(a&&(c=String(a).match(Fk()))){this.Xb(!(!b));this.rd(c[1],true);this.Oe(c[2],true);this.Ie(c[3],true);this.Ne(c[4]);this.Me(c[5],true);this.qd(c[6]);this.Je(c[7],true)}else{this.Xb(!(!b));this.ca=new S(null,this,this.Ra)}};r.prototype.ya="";r.prototype.Ic="";r.prototype.db="";r.prototype.nb=null;r.prototype.Wa=
"";r.prototype.ca=null;r.prototype.fb="";r.prototype.tm=false;r.prototype.Ra=false;r.prototype.toString=function(){if(this.ea){return this.ea}var a=[];if(this.ya){a.push(Be(this.ya,Lg),":")}if(this.db){a.push("//");if(this.Ic){a.push(Be(this.Ic,Lg),"@")}a.push(Kg(this.db));if(this.nb!=null){a.push(":",String(this.Kf()))}}if(this.Wa){a.push(Be(this.Wa,Gk))}var b=String(this.ca);if(b){a.push("?",b)}if(this.fb){a.push("#",Kg(this.fb))}return this.ea=a.join("")};r.prototype.resolve=function(a){var b=
this.clone(),c=a.bm();if(c){b.rd(a.Lf())}else{c=a.cm()}if(c){b.Oe(a.Sh())}else{c=a.Xl()}if(c){b.Ie(a.Ah())}else{c=a.$l()}var d=a.Jf();if(c){b.Ne(a.Kf())}else{c=a.Zl();if(c){if(!/^\//.test(d)){d=b.Jf().replace(/\/?[^\/]*$/,"/"+d)}}}if(c){b.Me(d)}else{c=a.am()}if(c){b.qd(a.vl())}else{c=a.Yl()}if(c){b.Je(a.Dh())}return b};r.prototype.clone=function(){return new Ck(this.ya,this.Ic,this.db,this.nb,this.Wa,this.ca.clone(),this.fb,this.Ra)};r.prototype.Lf=function(){return this.ya};r.prototype.rd=function(a,
b){this.Ka();delete this.ea;this.ya=b?Xc(a):a;if(this.ya){this.ya=this.ya.replace(/:$/,"")}return this};r.prototype.bm=function(){return!(!this.ya)};r.prototype.Sh=function(){return this.Ic};r.prototype.Oe=function(a,b){this.Ka();delete this.ea;this.Ic=b?Xc(a):a;return this};r.prototype.cm=function(){return!(!this.Ic)};r.prototype.Ah=function(){return this.db};r.prototype.Ie=function(a,b){this.Ka();delete this.ea;this.db=b?Xc(a):a;return this};r.prototype.Xl=function(){return!(!this.db)};r.prototype.Kf=
function(){return this.nb};r.prototype.Ne=function(a){this.Ka();delete this.ea;if(a){a=Number(a);if(isNaN(a)||a<0){throw Error("Bad port number "+a);}this.nb=a}else{this.nb=null}return this};r.prototype.$l=function(){return this.nb!=null};r.prototype.Jf=function(){return this.Wa};r.prototype.Me=function(a,b){this.Ka();delete this.ea;this.Wa=b?Xc(a):a;return this};r.prototype.Zl=function(){return!(!this.Wa)};r.prototype.am=function(){return this.ca!==null&&this.ca.toString()!==""};r.prototype.qd=function(a){this.Ka();
delete this.ea;if(a instanceof S){this.ca=a;this.ca.B=this;this.ca.Xb(this.Ra)}else{this.ca=new S(a,this,this.Ra)}return this};r.prototype.vl=function(){return this.ca.toString()};r.prototype.Yd=function(){return this.ca};r.prototype.r=function(a,b){this.Ka();delete this.ea;this.ca.set(a,b);return this};r.prototype.Le=function(a,b){this.Ka();delete this.ea;if(!G(b)){b=[String(b)]}this.ca.Ao(a,b);return this};r.prototype.If=function(a){return this.ca.get(a)};r.prototype.Dh=function(){return this.fb};
r.prototype.Je=function(a,b){this.Ka();delete this.ea;this.fb=b?Xc(a):a;return this};r.prototype.Yl=function(){return!(!this.fb)};r.prototype.Dm=function(){this.Ka();this.r("zx",Uh());return this};r.prototype.Ka=function(){if(this.tm){throw Error("Tried to modify a read-only Uri");}};r.prototype.Xb=function(a){this.Ra=a;if(this.ca){this.ca.Xb(a)}};r.prototype.nl=function(){return this.Ra};var Ck=function(a,b,c,d,e,f,g,h){var j=new r(null,h);j.rd(a);j.Oe(b);j.Ie(c);j.Ne(d);j.Me(e);j.qd(f);j.Je(g);
return j};var Xc=function(a){return a?Df(a):""},Kg=function(a){if(V(a)){return encodeURIComponent(a)}return null},Ek=/^[a-zA-Z0-9\-_.!~*'():\/;?]*$/,Be=function(a,b){var c=null;if(V(a)){c=a;if(!Ek.test(c)){c=encodeURI(a)}if(c.search(b)>=0){c=c.replace(b,Dk)}}return c},Dk=function(a){var b=a.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)},Ce=null,Fk=function(){if(!Ce){Ce=/^(?:([^:\/?#]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/}return Ce},
Lg=/[#\/\?@]/g,Gk=/[\#\?]/g;var S=function(a,b,c){this.J=new X;this.B=b;this.Ra=!(!c);if(a){var d=a.split("&");for(var e=0;e<d.length;e++){var f=d[e].split("="),g=Df(f[0]);g=this.vb(g);this.add(g,f.length>1?Df(f[1]):"")}}};S.prototype.s=0;S.prototype.e=function(){return this.s};S.prototype.add=function(a,b){this.vc();a=this.vb(a);if(!this.fa(a)){this.J.set(a,b)}else{var c=this.J.get(a);if(G(c)){c.push(b)}else{this.J.set(a,[c,b])}}this.s++;return this};S.prototype.remove=function(a){a=this.vb(a);if(this.J.fa(a)){this.vc();
var b=this.J.get(a);if(G(b)){this.s-=b.length}else{this.s--}return this.J.remove(a)}return false};S.prototype.clear=function(){this.vc();this.J.clear();this.s=0};S.prototype.Ca=function(){return this.s==0};S.prototype.fa=function(a){a=this.vb(a);return this.J.fa(a)};S.prototype.oa=function(){var a=this.J.T(),b=this.J.oa(),c=[];for(var d=0;d<b.length;d++){var e=a[d];if(G(e)){for(var f=0;f<e.length;f++){c.push(b[d])}}else{c.push(b[d])}}return c};S.prototype.T=function(a){var b;if(a){var c=this.vb(a);
if(this.fa(c)){var d=this.J.get(c);if(G(d)){return d}else{b=[];b.push(d)}}else{b=[]}}else{var e=this.J.T();b=[];for(var f=0;f<e.length;f++){var g=e[f];if(G(g)){Hk(b,g)}else{b.push(g)}}}return b};S.prototype.set=function(a,b){this.vc();a=this.vb(a);if(this.fa(a)){var c=this.J.get(a);if(G(c)){this.s-=c.length}else{this.s--}}this.J.set(a,b);this.s++;return this};S.prototype.get=function(a,b){a=this.vb(a);if(this.fa(a)){var c=this.J.get(a);if(G(c)){return c[0]}else{return c}}else{return b}};S.prototype.Ao=
function(a,b){this.vc();a=this.vb(a);if(this.fa(a)){var c=this.J.get(a);if(G(c)){this.s-=c.length}else{this.s--}}if(b.length>0){this.J.set(a,b);this.s+=b.length}};S.prototype.toString=function(){if(this.ea){return this.ea}var a=[],b=0,c=this.J.oa();for(var d=0;d<c.length;d++){var e=c[d],f=Ef(e),g=this.J.get(e);if(G(g)){for(var h=0;h<g.length;h++){if(b>0){a.push("&")}a.push(f,"=",Ef(g[h]));b++}}else{if(b>0){a.push("&")}a.push(f,"=",Ef(g));b++}}return this.ea=a.join("")};S.prototype.vc=function(){delete this.ea;
if(this.B){delete this.B.ea}};S.prototype.clone=function(){var a=new S;a.J=this.J.clone();return a};S.prototype.vb=function(a){var b=String(a);if(this.Ra){b=b.toLowerCase()}return b};S.prototype.Xb=function(a){var b=a&&!this.Ra;if(b){this.vc();Aa(this.J,function(c,d,e){var f=d.toLowerCase();if(d!=f){this.remove(d);this.add(f,c)}},this)}this.Ra=a};S.prototype.extend=function(a){for(var b=0;b<arguments.length;b++){var c=arguments[b];Aa(c,function(d,e){this.add(e,d)},this)}};var Yb=function(a,b){B.call(this,null,b,null);if(a){this.B=new r(a)}else{this.B=null}};Yb.inherits(B);Yb.prototype.ja=ad;Yb.dataSources={};Yb.prototype.load=function(){if(this.B){Yb.dataSources[this.ba]=this;Q.info("Sending JS request for DataSource "+this.m()+" to "+this.B);this.ja="LOADING";var a=new r(this.B);a.Le("callback","JsonReceive."+this.ba);u.JsonReceive[this.ba]=v(this.Cn,this);var b=Zc("script");b.src=a;Xk("head")[0].appendChild(b)}else{this.i={};this.ja=ad}};Yb.prototype.Cn=function(a){this.nj(a);
this.ja="LOADED";q().k(this.m())};u.JsonReceive={};var xb=function(a,b){if(!a){throw Error("Cannot create a fast data node without a data name");}this.__dataName=a;this.__parent=b};xb.prototype.m=function(){return this.__dataName};xb.prototype.qb=function(a){this.__dataName=a};xb.prototype.u=function(){var a;if(this.__parent){a=this.__parent.u()+"/"}else{a=""}return a+this.m()};var T=function(a,b,c){xb.call(this,b,c);this.ph(a)};T.inherits(xb);T.prototype.ph=function(a){for(var b in a){this[b]=a[b]}};var gb=function(a,b,c){if(G(a)){return new ea(a,
b,c)}else if(Sa(a)){return new T(a,b,c)}else{return new nb(a,b,c)}},kl=new La;T.prototype.set=function(a){throw"Not implemented yet";};T.prototype.g=function(a){if(!a||a=="*"){return this}else if(a.indexOf("*")==-1){var b=this.b(a);return b?new ea([b],null):new La}else{throw Error("Unsupported selector: "+a);}};T.prototype.Cj=function(a){var b=this[a];if(b!=null&&!b.m){this[a]=gb(this[a],a,this)}};T.prototype.b=function(a,b){this.Cj(a);var c=this[a]||null;if(c==null&&b){c=new T({},a,this);this[a]=
c}return c};T.prototype.o=function(a,b){if(b!=null){this[a]=b}else{delete this[a]}q().k(this.u()+"/"+a)};T.prototype.d=function(a){var b=this[a];if(b!=null){return b.m?b.get():b}else{return null}};T.prototype.R=function(){return false};T.prototype.Oa=function(){var a={};for(var b in this){if(!sa(b,"__")&&!Bb(this[b])){a[b]=this[b].__dataName?this[b].Oa():this[b]}}return a};T.prototype.clone=function(){return gb(this.Oa(),this.m())};T.prototype.add=function(a){this.o(a.m(),a)};T.prototype.get=function(a){if(arguments.length==
0){return this}else{return this.b(a)}};T.prototype.n=function(a){var b=0;for(var c in this){if(!sa(c,"__")&&!Bb(this[c])){if(b==a){this.Cj(c);return this[c]}++b}}return null};T.prototype.e=function(){var a=0;for(var b in this){if(!sa(b,"__")&&!Bb(this[b])){++a}}return a};T.prototype.rb=function(a,b){this.o(a,b)};T.prototype.removeNode=function(a){delete this[a]};var nb=function(a,b,c){this.sa=a;xb.call(this,b,c)};nb.inherits(xb);nb.prototype.get=function(){return this.sa};nb.prototype.set=function(a){if(G(a)||
Sa(a)){throw"can only set PrimitiveFastDataNode to primitive values";}this.sa=a;q().k(this.u())};nb.prototype.g=function(){return kl};nb.prototype.b=function(a){return null};nb.prototype.d=function(a){return null};nb.prototype.o=function(a,b){throw Error("Cannot set a child node for a PrimitiveFastDataNode");};nb.prototype.R=function(){return false};nb.prototype.Oa=function(){return this.sa};var ea=function(a,b,c){this.H=[];for(var d=0;d<a.length;++d){var e=a[d].id||"["+d+"]";this.H.push(gb(a[d],
e,this));if(a[d].id){if(!this.l){this.l={}}this.l[a[d].id]=d}}xb.call(this,b,c)};ea.inherits(xb);ea.prototype.set=function(a){throw Error("Cannot set a FastListNode to a new value");};ea.prototype.g=function(){return this};ea.prototype.b=function(a,b){var c=this.Wd(a);if(c==null&&this.l){c=this.l[a]}if(c!=null&&this.H[c]){return this.H[c]}else if(b){this.o(a,{});return this.b(a)}else{return null}};ea.prototype.d=function(a){var b=this.b(a);return b?b.get():null};ea.prototype.Wd=function(a){if(a.charAt(0)==
"["&&a.charAt(a.length-1)=="]"){return Number(a.substring(1,a.length-1))}else{return null}};ea.prototype.o=function(a,b){var c=this.H.length;if(b!=null){if(!b.m){b=gb(b,a,this)}var d=this.Wd(a);if(d!=null){if(d<0||d>=this.H.length){throw Error("List index out of bounds: "+d);}this.H[a]=b}else{if(!this.l){this.l={}}this.H.push(b);this.l[a]=this.H.length-1}}else{this.removeNode(a)}var e=q();e.k(this.u()+"/"+a);if(this.H.length!=c){this.Yf()}};ea.prototype.Yf=function(){var a=q();a.k(this.u());a.k(this.u()+
"/count()")};ea.prototype.R=function(){return true};ea.prototype.Oa=function(){var a=[];for(var b=0;b<this.H.length;++b){a.push(this.H[b].Oa())}return a};ea.prototype.add=function(a){if(!a.m){a=gb(a,String(this.H.length),this)}this.H.push(a);var b=q();b.k(this.u()+"/["+(this.H.length-1)+"]");this.Yf()};ea.prototype.get=function(a){if(arguments.length==0){return this.H}else{return this.b(a)}};ea.prototype.n=function(a){var b=this.H[a];return b!=null?b:null};ea.prototype.e=function(){return this.H.length};
ea.prototype.rb=function(a,b){throw Error("Setting child nodes of a FastListNode is not implemented, yet");};ea.prototype.removeNode=function(a){var b=this.Wd(a);if(b==null&&this.l){b=this.l[a]}if(b!=null){this.H.splice(b,1);if(this.l){var c=null;for(var d in this.l){if(this.l[d]==b){c=d}else if(this.l[d]>b){--this.l[d]}}if(c){delete this.l[c]}}var e=q();e.k(this.u()+"/["+b+"]");this.Yf()}};ea.prototype.indexOf=function(a){var b=this.Wd(a);if(b==null&&this.l){b=this.l[a]}if(b==null){throw Error("Cannot determine index for: "+
a);}return b};var zb=function(a,b,c,d,e){T.call(this,{},b,null);if(a){this.B=new r(a);this.w=new D;this.yq=!(!e);p(this.w,jb,this.kk,false,this)}else{this.B=null}this.Re=c;this.wf=d};zb.inherits(T);zb.prototype.Re=null;zb.prototype.wf=null;zb.prototype.load=function(){Q.info("Sending JS request for DataSource "+this.m()+" to "+this.B);if(this.B){if(this.yq){var a=this.B.Yd(),b=this.B.clone();b.qd(null);this.w.send(b,"POST",a)}else{this.w.send(this.B)}}else{this.ja=ad}};zb.prototype.Se=function(){q().k(this.m())};
zb.prototype.kk=function(a){if(this.w.Sb()){Q.info("Got data for DataSource "+this.m());var b=this.w.sc();if(this.Re){var c=b.indexOf(this.Re);b=b.substring(c+this.Re.length)}if(this.wf){var d=b.lastIndexOf(this.wf);b=b.substring(0,d)}try{var e=eval("["+b+"][0]");this.ph(e);this.ja="LOADED"}catch(f){this.ja="FAILED";Q.severe("Failed to parse data: "+f.message)}u.setTimeout(v(this.Se,this),0)}else{Q.info("Data retrieve failed for DataSource "+this.m());this.ja="FAILED"}};var il=function(a,b){if(b&&!a){throw Error("Can't create document with namespace and no root tag");}if(document.implementation&&document.implementation.createDocument){return document.implementation.createDocument(b||"",a||"",null)}else if(typeof ActiveXObject!="undefined"){var c=new ActiveXObject("MSXML2.DOMDocument");if(c){if(a){c.appendChild(c.createNode(1,a,b||""))}return c}}throw Error("Your browser does not support creating new documents");},jl=function(a){if(typeof DOMParser!="undefined"){return(new DOMParser).parseFromString(a,
"application/xml")}else{var b=new ActiveXObject("MSXML2.DOMDocument");b.loadXML(a);return b}};var na=function(a,b,c){this.p=b;this.ba=c||(a?a.nodeName:null);this.so(a)};na.prototype.so=function(a){this.Va=a;if(a!=null){switch(a.nodeType){case 2:case 3:this.sa=a.nodeValue;break;case 1:if(a.childNodes.length==1&&a.firstChild.nodeType==3){this.sa=a.firstChild.nodeValue}}}};na.prototype.ua=function(){if(this.M){return}var a=new P;if(this.Va!=null){var b=this.Va.childNodes;for(var c=0,d;d=b[c];c++){if(d.nodeType!=3||!/^[\r\n\t ]*$/.test(d.nodeValue)){var e=new na(d,this,d.nodeName);a.add(e)}}}this.M=
a};na.prototype.mk=function(){if(this.Zj){return}var a=new P;if(this.Va!=null&&this.Va.attributes!=null){var b=this.Va.attributes;for(var c=0,d;d=b[c];c++){var e=new na(d,this,d.nodeName);a.add(e)}}this.Zj=a};na.prototype.get=function(){this.ua();return this.sa!=null?this.sa:this.M};na.prototype.set=function(a){throw Error("Can't set on XmlDataSource yet");};na.prototype.g=function(a){if(a&&a=="@*"){this.mk();return this.Zj}else if(a==null||a=="*"){this.ua();return this.M}else{throw new Error("Unsupported selector");
}};na.prototype.b=function(a){if(sa(a,"@")){var b=this.Va.getAttributeNode(a.substring(1));return b?new na(b,this):null}else{return this.g().get(a)}};na.prototype.d=function(a){if(sa(a,"@")){var b=this.Va.getAttributeNode(a.substring(1));return b?b.nodeValue:null}else{var b=this.b(a);return b?b.get():null}};na.prototype.m=function(){return this.ba};na.prototype.qb=function(a){this.ba=a};na.prototype.u=function(){var a="";if(this.p){a=this.p.u()+(this.ba.indexOf("[")!=-1?"":"/")}return a+this.ba};
na.prototype.load=function(){};var Te=function(){return il("nothing")},cd=function(a,b){na.call(this,null,null,b);if(a){this.B=new r(a)}else{this.B=null}};cd.inherits(na);cd.prototype.ja=ad;cd.prototype.load=function(){if(this.B){Q.info("Sending XML request for DataSource "+this.m()+" to "+this.B);this.ja="LOADING";this.Mp=new Zb(this.B,v(this.Se,this),v(this.Uk,this))}else{this.Va=Te();this.ja=ad}};cd.prototype.Se=function(){Q.info("Got data for DataSource "+this.m());var a=this.Mp.wl(),b=a.responseXML;
if(b&&!b.hasChildNodes()&&Sa(a.responseText)){b=jl(a.responseText)}if(!b||!b.hasChildNodes()){this.ja="FAILED";this.Va=Te()}else{this.ja="LOADED";this.Va=b.documentElement}if(this.m()){q().k(this.m())}};cd.prototype.Uk=function(){Q.info("Data retrieve failed for DataSource "+this.m());this.ja="FAILED";this.Va=Te();if(this.m()){q().k(this.m())}};var Zb=function(a,b,c){this.Dc=null;this.Up=b;this.cn=c||this.Ll;this.B=new r(a);this.zm()};Zb.prototype.zm=function(){this.Dc=new Lh;if(this.Dc){try{this.Dc.onreadystatechange=
v(this.se,this);this.Dc.open("GET",String(this.B),true);this.Dc.send(null)}catch(a){this.cn.call(this)}}};Zb.prototype.se=function(){var a=this.Dc,b=a.readyState;if(b==4){var c=a.status,d;if(c==200||c==0){d=v(this.gn,this)}else{d=v(this.en,this)}window.setTimeout(d,10)}};Zb.prototype.gn=function(){this.Up(this)};Zb.prototype.en=function(){this.cn(this)};Zb.prototype.Ll=function(){throw Error("Error fetching data from URL: "+this.B);};Zb.prototype.wl=function(){return this.Dc};var Ua=function(a){this.qi=a||100;this.Gb=[]};Ua.prototype.ld=0;Ua.prototype.add=function(a){this.Gb[this.ld]=a;this.ld=(this.ld+1)%this.qi};Ua.prototype.get=function(a){a=this.xi(a);return this.Gb[a]};Ua.prototype.set=function(a,b){a=this.xi(a);this.Gb[a]=b};Ua.prototype.e=function(){return this.Gb.length};Ua.prototype.Ca=function(){return this.Gb.length==0};Ua.prototype.clear=function(){this.Gb.length=0;this.ld=0};Ua.prototype.T=function(){return this.ql(this.e())};Ua.prototype.ql=function(a){var b=
this.e(),c=this.e()-a,d=[];for(var e=c;e<b;e++){d[e]=this.get(e)}return d};Ua.prototype.oa=function(){var a=[],b=this.e();for(var c=0;c<b;c++){a[c]=c}return a};Ua.prototype.fa=function(a){return a<this.e()};Ua.prototype.xi=function(a){if(a>=this.Gb.length){throw Error("Out of bounds exception");}if(this.Gb.length<this.qi){return a}return(this.ld+Number(a))%this.qi};var da=function(a,b){this.Qf=a||"";this.fg=b||"";this.Hi=[];this.ej=new Ua(500);this.ze=v(this.re,this);this.Bf=new Ee(this.fg);this.xp={};this.mg(true);this.Ja=this.wh("enabled")=="1";u.setInterval(v(this.Zn,this),7500)};da.prototype.bp="LOGGING";da.prototype.N=null;da.prototype.Cg=false;da.prototype.je=false;da.prototype.Og=null;da.prototype.ei=Ha();da.prototype.init=function(){if(this.Ja){this.dg()}};da.prototype.Gc=function(a){this.Ja=a;if(this.Ja){this.dg();if(this.N){this.Ej()}}this.kj("enabled",
a?1:0)};da.prototype.mg=function(a){if(a==this.je){return}this.je=a;var b=Rg();if(a){b.Gg(this.ze)}else{b.Ti(this.ze)}};da.prototype.re=function(a){if(this.xp[a.Gf()]){return}var b=this.Bf.rc(a);this.fp(b)};da.prototype.fp=function(a){if(this.Ja){this.dg();this.ej.add(a);this.Dg(a)}else{this.ej.add(a)}};da.prototype.Dg=function(a){this.Hi.push(a);u.clearTimeout(this.Og);if(Ha()-this.ei>750){this.Dj()}else{this.Og=u.setTimeout(v(this.Dj,this),250)}};da.prototype.Dj=function(){this.ei=Ha();if(this.N){var a=
this.N.document.body,b=a&&a.scrollHeight-(a.scrollTop+a.clientHeight)<=100;this.N.document.write(this.Hi.join(""));this.Hi.length=0;if(b){this.N.scrollTo(0,1000000)}}};da.prototype.ep=function(){var a=this.ej.T();for(var b=0;b<a.length;b++){this.Dg(a[b])}};da.prototype.dg=function(){if(this.N&&!this.N.closed||this.Cg){return}var a=this.wh("dbg","0,0,800,500").split(","),b=Number(a[0]),c=Number(a[1]),d=Number(a[2]),e=Number(a[3]);this.Cg=true;this.N=window.open("","dbg"+this.Qf,"width="+d+",height="+
e+",toolbar=no,resizable=yes,scrollbars=yes,left="+b+",top="+c+",status=no,screenx="+b+",screeny="+c);if(!this.N){if(!this.nq){alert("Logger popup was blocked");this.nq=true}}this.Cg=false;if(this.N){this.Ej()}};da.prototype.Ej=function(){if(!this.N){return}this.N.document.open();var a='<style>*{font:normal 14px monospace;}.dbg-sev{color:#F00}.dbg-w{color:#E92}.dbg-sh{font-weight:bold;color:#000}.dbg-i{color:#666}.dbg-f{color:#999}.dbg-ev{color:#0A0}.dbg-m{color:#990}</style><hr><div class="dbg-ev" style="text-align:center">'+
this.bp+"<br><small>Logger: "+this.Qf+"</small></div><hr>";this.Dg(a);this.ep()};da.prototype.kj=function(a,b){a+=this.Qf;document.cookie=a+"="+encodeURIComponent(b)+";expires="+(new Date(Ha()+2592000000)).toUTCString()};da.prototype.wh=function(a,b){a+=this.Qf;var c=String(document.cookie),d=c.indexOf(a+"=");if(d!=-1){var e=c.indexOf(";",d);return decodeURIComponent(c.substring(d+a.length+1,e==-1?c.length:e))}else{return b||""}};da.prototype.Zn=function(){if(!this.N||this.N.closed){return}var a=
this.N.screenX||this.N.screenLeft||0,b=this.N.screenY||this.N.screenTop||0,c=this.N.outerWidth||800,d=this.N.outerHeight||500;this.kj("dbg",a+","+b+","+c+","+d)};var Ng=function(){this.ze=v(this.re,this);this.Bf=new Ie;this.Bf.qg=false;this.je=false;this.Np=""};Ng.prototype.mg=function(a){if(a==this.je){return}var b=Rg();if(a){b.Gg(this.ze)}else{b.Ti(this.ze);this.logBuffer=""}};Ng.prototype.re=function(a){var b=this.Bf.rc(a);if(window.console&&window.console.firebug){switch(a.Uc()){case Ug:window.console.info(b);break;case Ge:window.console.error(b);break;case He:window.console.warn(b);break;default:window.console.debug(b);break}}else if(window.console){window.console.log(b)}else{this.Np+=
b}};var Nb=function(a){this.Wl=a};Nb.inherits(Va);var bh=new pa(0,100);Nb.prototype.listen=function(a,b,c,d,e){if(G(b)){for(var f=0;f<b.length;f++){this.listen(a,b[f],c,d,e)}return}var g=p(a,b,c||this,d||false,e||this.Wl||this);if(this.t){this.t[g]=true}else if(this.Tb){this.t=bh.gb();this.t[this.Tb]=true;this.Tb=null;this.t[g]=true}else{this.Tb=g}};Nb.prototype.unlisten=function(a,b,c,d,e){if(!this.Tb&&!this.t){return}if(G(b)){for(var f=0;f<b.length;f++){this.unlisten(a,b[f],c,d,e)}return}var g=ql(a,
b,c||this,d||false,e||this.Wl||this);if(g){var h=g.key;ob(h);if(this.t){ce(this.t,h)}else if(this.Tb==h){this.Tb=null}}};Nb.prototype.Si=function(){if(this.t){for(var a in this.t){ob(a);delete this.t[a]}bh.Ab(this.t);this.t=null}else if(this.Tb){ob(this.Tb)}};Nb.prototype.dispose=function(){if(!this.ma()){Va.prototype.dispose.call(this);this.Si()}};Nb.prototype.F=function(a){throw Error("EventHandler.handleEvent not implemented");};var Ma=function(a){K.call(this);if(a){this.attach(a)}};Ma.inherits(K);Ma.prototype.a=null;Ma.prototype.hd=null;Ma.prototype.cd=null;Ma.prototype.le=-1;Ma.prototype.gi=0;var dh={"3":13,"12":144,"63232":38,"63233":40,"63234":37,"63235":39,"63236":112,"63237":113,"63238":114,"63239":115,"63240":116,"63241":117,"63242":118,"63243":119,"63244":120,"63245":121,"63246":122,"63247":123,"63248":44,"63272":46,"63273":36,"63275":35,"63276":33,"63277":34,"63289":144,"63302":45};Ma.prototype.F=function(a){var b=
a.$k(),c=b.keyCode,d=b.which,e=c||d;if(d){if(d>=63232&&d in dh){e=dh[d]}else{if(d==25&&a.shiftKey){e=9}else{var f=d-32;if(String.fromCharCode(d)==String.fromCharCode(f).toLowerCase()){e=f}}}}var g=e==this.le;this.le=e;if(ta&&g){if(b.timeStamp-this.gi<10){return}this.gi=b.timeStamp}var h=new ch(e,g,b);try{this.dispatchEvent(h)}finally{h.dispose()}};Ma.prototype.Pl=function(a){this.le=-1};Ma.prototype.attach=function(a){if(this.cd&&this.hd){this.detach()}this.a=a;var b=M?Bc:Cc;this.hd=p(this.a,b,this);
this.cd=p(this.a,"keyup",this.Pl,false,this)};Ma.prototype.detach=function(){if(this.cd&&this.hd){ob(this.hd);ob(this.cd);this.hd=null;this.cd=null}this.a=null;this.le=-1};Ma.prototype.dispose=function(){if(!this.ma()){Ma.U.dispose.call(this);this.detach()}};var ch=function(a,b,c){L.call(this,c);this.type="key";this.keyCode=a;this.repeat=b};ch.inherits(L);;var le=function(){this.tc={};this.qq={};this.wp={}},$f=null,Mc=function(){if(!$f){$f=new le}return $f};le.prototype.fireEvent=function(a,b){var c=null;if(V(a)){c=new aa(a);var d=arguments[1];if(V(d)){var e=2,f=d;while(f){var g=arguments[e++];c[f]=g;f=arguments[e++]}}else{for(var h in d){c[h]=d[h]}}}else if(a instanceof aa){c=a}this.yn(c)};le.prototype.yn=function(a){var b=a.type,c=this.tc[b];if(c){var d=c(a),e;if(d){e=this.qq[b]||[]}else{e=this.wp[b]||[]}for(var f=0;f<e.length;f++){e[f](a)}}};le.prototype.F=
function(a,b){this.tc[a]=b};var jc=function(a,b){if(a instanceof jc){this.Ya=a.Qo()}else if(ic(a)&&pm(a)){this.Ya=Mg(a)}else if(a instanceof W){this.Ya=Kh(a.width,a.height)}else if(kd(a)&&kd(b)&&a>0&&b>0){this.Ya=Kh(a,b)}else{throw Error("Invalid argument(s) for Matrix contructor");}this.X=new W(this.Ya.length,this.Ya[0].length)};var Kh=function(a,b){var c=[];for(var d=0;d<a;d++){c[d]=[];for(var e=0;e<b;e++){c[d][e]=0}}return c},pm=function(a){var b=0;for(var c=0;c<a.length;c++){if(!ic(a[c])||b>0&&a[c].length!=b){return false}for(var d=
0;d<a[c].length;d++){if(!kd(a[c][d])){return false}}if(b==0){b=a[c].length}}return b!=0},om=function(a,b,c){for(var d=0;d<a.Nh().width;d++){for(var e=0;e<a.Nh().height;e++){b.call(c,a.Cl(d,e),d,e,a)}}};jc.prototype.Ya=null;jc.prototype.X=null;jc.prototype.Nh=function(){return this.X};jc.prototype.Cl=function(a,b){if(a<0||a>=this.X.width||b<0||b>this.X.height){return null}return this.Ya[a][b]};jc.prototype.Qo=function(){return this.Ya};jc.prototype.toString=function(){var a=0;om(this,function(c){var d=
String(c).length;if(d>a){a=d}});var b=[];wb(this.Ya,function(c,d){b.push("[ ");wb(c,function(e,f){e=String(e);b.push((new Array(a-e.length+1)).join(" ")+e+" ")});b.push("]\n")});return b.join("")};var Qb=function(a,b){this.x=Number(a)||0;this.y=Number(b)||0};Qb.inherits(Cb);Qb.prototype.clone=function(){return new Qb(this.x,this.y)};Qb.prototype.magnitude=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};Qb.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Qb.prototype.normalize=function(){return this.scale(1/this.magnitude())};Qb.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};Qb.prototype.equals=function(a){return this==a||!(!a)&&this.x==a.x&&this.y==a.y};var cb=function(a,b){var c=b||window;if(a==Ii){this.uj="ParentStub"+Number(new Date);this.Vb="ChildStub"}else{this.uj="ChildStub";this.Vb=this.tl();this.zc=c.opener||c.parent;if(this.Vb&&!this.zc[this.Vb]){var d=0;while(this.zc&&!this.zc[this.Vb]&&d<10){this.zc=this.zc.parent;d++}}c[bg]=this}c[this.uj]=this.Ko.bind(this);this.To=a};cb.inherits(K);var cg=function(a){var b=a||window;return b[bg]};cb.prototype.mo=function(a,b){this.zc=a;this.V=b};var Ii="Parent",Hi="Child",bg="__topLevelProxy__";cb.prototype.type=
null;cb.prototype.tl=function(){var a=new r(document.location.href);return a.If("eventCallback")};cb.prototype.Oh=function(){return this.uj};cb.prototype.kc=function(a){return this.An(a)};cb.prototype.An=function(a){var b=this.V?this.V.contentWindow:null,c=this.zc||b;if(this.Vb&&c&&c[this.Vb]){return c[this.Vb](a)}else{return true}};cb.prototype.Ko=function(a){var b=K.prototype.dispatchEvent.call(this,a);return b};var dg=function(){};dg.inherits(K);dg.prototype.mj=function(a){this.$p=a};dg.prototype.dispatchEvent=function(a){if(this.$p.kc(a)){K.prototype.dispatchEvent.call(this,a)}};var Ja=function(a){cb.call(this,Ii,a||window)};Ja.inherits(cb);var Ji=null,so=function(a){switch(a){case "NONE":return"0";case "THIN":return"1px solid black";case "OUTSET":return"2px outset black"}},vo=function(a,b,c){var d=b||{};d.border=d.border||"OUTSET";var e=new Nc(c);e.Ed(a,d,null);return e},uo=function(a,b,c,d){var e=b||{};e.border=e.border||"NONE";var f=Lb(c),g=new kb(d);g.Ed(a,e,f);return g};Ja.prototype.Ed=function(a,b,c){};Ja.prototype.show=function(){};Ja.prototype.hide=function(){};Ja.prototype.dispose=
function(){};var xo=function(a,b){var c=b.serverbased?"widgets":"ui",d=new r(wo()+"/"+c+"/"+a),e=new r(document.location.href);if(e.If("js")){d.r("js",e.If("js"))}else{d.r("js","RAW")}if(b){Aa(b,function(f,g){if(f!=null){d.r(g,f)}})}return d},wo=function(){if(Ji){return Ji}else if(u.manifest){return u.manifest.serverBase}else{return""}};var to=0;cc("createIframeComponent",uo);cc("createIframeDialogComponent",vo);var kb=function(a){Ja.call(this,a)};kb.inherits(Ja);var ro=function(a,b,c,d){var e="hosted-"+to++ +"-"+Number(new Date),f=I(e);if(!f){var g=new va(d?mb(d):document);f=g.v("iframe",{id:e});Eb(f,"display","block");Eb(f,"backgroundColor","#FFF");Eb(f,"border",so(c));Eb(f,"margin","0");Eb(f,"padding","0");Eb(f,"overflow","hidden");mc(f,a,b)}return f};kb.prototype.Ed=function(a,b,c){this.B=xo(a,b);this.lp=b.border;this.Z=!(b.hide=="true");this.Sm=b.mock;this.gp=b.x||20;this.Fq=b.y||20;this.Eq=b.width||
600;this.Ap=b.height||480;this.Qp=b.maximize=="true";this.Ni=b.position||"relative";this.kp=b.background;this.hp=b.zIndex;this.fm=b.hl;this.eg=c;var d=ro(this.Eq,this.Ap,this.lp,this.eg);d.style.position=this.Ni;if(this.hp){d.style.zIndex=this.hp}if(this.kp){d.allowtransparency=true;d.style.backgroundColor="transparent"}if(this.fm){this.B.r("hl",this.fm)}if(!this.Sm){this.B.r("eventCallback",this.Oh());this.B.r("js","RAW");this.B.Dm();d.src=this.B.toString();d.id=Uh()}this.xf(d);if(this.Sm){new cb(Hi,
d.contentWindow);d.contentWindow[bg].Vb=this.Oh()}this.mo(d.contentWindow,d)};kb.prototype.xf=function(a){this.V=a;if(this.eg){this.eg.appendChild(a);this.zg()}else{a.style.position="absolute";document.body.appendChild(a)}if(a.style.position=="absolute"){var b=this.Z?this.gp:this.gp-4000;fe(a,b,this.Fq)}else{this.zg();if(!this.Z){a.style.visibility="hidden"}}if(window.frames[a.id]){if(window.frames[a.id].location!=a.src){window.frames[a.id].location=a.src}}};kb.prototype.zg=function(){var a=this.Rq||
this.eg;if(a&&this.Qp){var b=la(a);mc(this.V,b);if(this.Ni=="absolute"){var c=lc(a);if(!this.Z){c.x-=4000}this.V.style.left=c.x+"px";this.V.style.top=c.y+"px"}}};kb.prototype.show=function(){this.Z=true;this.zg();this.kc("PRESHOW");var a=this;u.setTimeout(function(){a.V.style.display="block";a.V.style.visibility="visible";a.kc("SHOW")},5)};kb.prototype.hide=function(){this.Z=false;if(this.Ni=="absolute"){var a=lc(this.V);this.V.style.left=a.x-4000+"px";this.V.style.visibility="hidden"}else{this.V.style.display=
"none"}};kb.prototype.dispose=function(){if(this.V!=null){this.V.parentNode.removeChild(this.V);this.V=null}Ja.prototype.dispose.call(this)};var Nc=function(a){kb.call(this,a)};Nc.inherits(kb);Nc.prototype.xf=function(a){if(Ba){ma(document.body,"background")}var b=new x;b.vh().appendChild(a);b.ij(new qa);b.Ea(this.Z);this.pf=b;this.V=a};Nc.prototype.show=function(){this.pf.Ea(true)};Nc.prototype.hide=function(){this.pf.Ea(false)};Nc.prototype.dispose=function(){this.pf.dispose();Da(document.body,"background");this.pf=null;this.V=null;kb.prototype.dispose.call(this)};var Ca=function(){this.Xg={}};Ca.prototype.Xg=null;var ag=null,po=function(){if(!ag){ag=new Ca}return ag};Ca.prototype.xh=function(a){return this.Xg[a]};Ca.prototype.create=function(a,b,c){var d=this.xh(a);if(d){if(b){b=Lb(b)}return d(b,c,a)}};Ca.prototype.Ug=function(a){var b=this.xh(a);if(b){var c={},d=(new r(document.location.href)).Yd();Aa(d,function(g,h){c[h]=g});var e=new cb(Hi),f=b(document.body,c,a);if(f.mj){f.mj(e)}}};Ca.prototype.ef=function(a){var b=a||document.body,c=b.getAttribute("g:type");
if(c){var d={},e=b.attributes;for(var f=0;f<e.length;f++){var g=e[f].name;if(sa(g,"g:")){d[g.substring(2)]=e[f].value}}this.create(c,b,d)}var h=b.childNodes.length;for(var f=0;f<h;f++){var j=b.childNodes[f];if(j.nodeType==1){this.ef(j)}}};Ca.prototype.qh=function(a){var b=cg();if(b){if(V(a)){a=new aa(a)}return b.kc(a)}else{return true}};var qo=function(){cc("Xuit",po());bc(Ca.prototype,"buildUi",Ca.prototype.ef);bc(Ca.prototype,"create",Ca.prototype.create);bc(Ca.prototype,"createAsFullPage",Ca.prototype.Ug);bc(Ca.prototype,"fireHostedEvent",Ca.prototype.qh);bc(Ja.prototype,"hide",Ja.prototype.hide);bc(Ja.prototype,"show",Ja.prototype.show);bc(Ja.prototype,"dispose",Ja.prototype.dispose)};qo();var xl=function(){};xl.prototype.decorate=function(a,b){if(ta||Fb)return;var c=b||{},d=new ia,e=true,f=c.enabled;if(f){var g=new ya(f),h=g.S();for(var j=0;j<h.length;j++){q().O(yl.bind(null,d,g),h[j].Lb())}e=g.h()}var k=a.ownerDocument.createElement("div");while(a.childNodes.length>0){k.appendChild(a.firstChild)}d.to(b);d.Cm(a);d.ng(k);d.Gc(e);d.render(a);return d};var yl=function(a,b){a.Gc(b.h())},ia=function(){this.Za="#FCFCFC";this.$g="#F4F4F4";this.ka="#B5B5B5";this.jb="#9CBED8";this.ab="#B0B0B0";
this.Ja=true};ia.inherits(K);ia.prototype.render=function(a){this.c=a;p(a,wa,this.Yc,false,this);p(a,Ec,this.$c,false,this);p(a,Id,this.Ql,false,this);p(a,Dc,this.Zc,false,this);p(a,"mouseup",this.Rl,false,this)};ia.prototype.to=function(a){this.we=a||{};this.Za=this.we["background-color"]||this.Za;this.$g=this.we["down-background-color"]||this.$g;this.ka=this.we["border-color"]||this.ka;this.jb=this.we["hover-border-color"]||this.jb;this.ab=this.we["down-border-color"]||this.ab};ia.prototype.Cm=
function(a){this.c=a;this.Jd=new va(a.ownerDocument);ma(a,"goog-button");a.style.border="0";a.style.background="transparent";a.style.margin="0";a.style.padding="0";a=(this.bi=a.appendChild(this.Jd.v("div")));this.gg=this.jd(a,"l1","background-color:"+this.ka);this.Bc=this.jd(a,"l2","border-color: "+this.ka+";background-color: "+this.Za);this.jd(a,"l2","border-color: "+this.ka+";background-color: "+this.Za);this.W=a.appendChild(this.Jd.v("div",{"class":"mid",style:"border-color: "+this.ka+";background-color: "+
this.Za+";padding: 1px 1px;"}));this.Cc=this.jd(a,"l2","border-color: "+this.ka+";background-color: "+this.Za);this.hg=this.jd(a,"l1","background-color: "+this.ka)};ia.prototype.jd=function(a,b,c){var d=a.appendChild(this.Jd.v("div",{style:c,"class":b}));if(M){d.style.width="100%"}d.appendChild(this.Jd.v("img",{width:"1",height:"1",src:oa().Wc()+"/static/images/Transparent.gif"}));return d};ia.prototype.Yc=function(){this.dispatchEvent(wa)};ia.prototype.qj=function(){this.gg.style.backgroundColor=
this.ka;this.Bc.style.borderColor=this.ka;this.Bc.style.backgroundColor=this.Za;this.W.style.borderLeft="1px solid "+this.ka;this.W.style.borderRight="1px solid "+this.ka;this.W.style.padding="1px 1px";this.W.style.backgroundColor=this.Za;this.Cc.style.borderColor=this.ka;this.Cc.style.backgroundColor=this.Za;this.hg.style.backgroundColor=this.ka};ia.prototype.Do=function(){this.gg.style.backgroundColor=this.jb;this.Bc.style.borderColor=this.jb;this.Bc.style.backgroundColor=this.jb;this.W.style.borderLeft=
"2px solid "+this.jb;this.W.style.borderRight="2px solid "+this.jb;this.W.style.padding="1px 0px";this.W.style.backgroundColor=this.Za;this.Cc.style.borderColor=this.jb;this.Cc.style.backgroundColor=this.jb;this.hg.style.backgroundColor=this.jb};ia.prototype.Co=function(){this.gg.style.backgroundColor=this.ab;this.Bc.style.borderColor=this.ab;this.Bc.style.backgroundColor=this.ab;this.W.style.borderLeft="2px solid "+this.ab;this.W.style.borderRight="2px solid "+this.ab;this.W.style.padding="2px 0px";
this.W.style.backgroundColor=this.$g;this.Cc.style.borderColor=this.ab;this.Cc.style.backgroundColor=this.ab;this.hg.style.backgroundColor=this.ab};ia.prototype.$c=function(){this.Do()};ia.prototype.Ql=function(){this.qj()};ia.prototype.Zc=function(){this.Co()};ia.prototype.Rl=function(){this.qj()};ia.prototype.ng=function(a){a.style.cssFloat="left";while(a.childNodes.length>0){this.W.appendChild(a.firstChild)}if(M){this.c.style.visibility="hidden";u.setTimeout(this.rg.bind(this),0)}else{this.rg()}p(window,
"resize",this.rg.bind(this))};ia.prototype.rg=function(){var a,b=10,c=this.Jd.Ma().compatMode=="BackCompat",a=la(this.W).width;if(a<10){return}this.c.style.visibility="";if(M){this.bi.style.width="1px";this.c.style.overflow="visible";a=la(this.W).width;this.c.style.width=a+b+"px";if(!c){this.pe(this.gg,4);this.pe(this.Bc,6);this.pe(this.Cc,6);this.pe(this.hg,4)}this.bi.style.width=a+b+"px"}else{this.W.style.cssFloat="left";a=la(this.W).width;this.W.style.cssFloat="";if(Fb&&c){this.c.style.width=a+
2+"px"}this.bi.style.width=a+b+"px"}};ia.prototype.pe=function(a,b){a.style.width=la(a).width-b+"px"};ia.prototype.Gc=function(a){if(this.Ja!=a){if(a){Da(this.c,"disabled");this.c.disabled=false}else{ma(this.c,"disabled");this.c.disabled=true}this.Ja=a}};var ra=function(a,b){var c=window._Messages||[],d=a;for(var e=0;e<c.length;e++){if(c[e][a]){d=c[e][a];break}}var f=b||{},g=function(h,j){return j in f?f[j]:h};d=d.replace(new RegExp("\\{\\$(\\w+)\\}","g"),g);return d},Rl=function(a,b){document.write(ra(a,b))};cc("_cp_getMsg",ra);cc("_cp_writeMsg",Rl);var fl=function(a,b){if(Qe(a)){a.selectionStart=b}else if(M){var c=Oe(a),d=c[0],e=c[1];if(d.inRange(e)){var f=a.value,g=0,h=b;while(g!=-1&&g<h){g=f.indexOf("\r\n",g);if(g!=-1&&g<h){b--;g++}}d.collapse(true);d.move("character",b);d.select()}}},Pe=function(a){if(Qe(a)){return a.selectionStart}if(M){var b=Oe(a),c=b[0],d=b[1];if(c.inRange(d)){c.setEndPoint("EndToStart",d);return c.text.length}}return 0},el=function(a,b){if(Qe(a)){a.selectionEnd=b}else if(M){var c=Oe(a),d=c[0],e=c[1];if(d.inRange(e)){e.collapse();
e.moveEnd("character",b-Pe(a));e.select()}}};var Oe=function(a){var b=a.ownerDocument||a.document,c=b.selection.createRange(),d;if(a.type=="textarea"){d=c.duplicate();d.moveToElementText(a)}else{d=a.createTextRange()}return[d,c]},Qe=function(a){try{return typeof a.selectionStart=="number"}catch(b){return false}};var U=function(a,b,c){K.call(this);this.Jm=a;this.co=c;this.ob=b;p(b,["hilite","select",Nf,"dismiss"],this);this.sb=null;this.K=[];this.Ba=-1;this.eb=0;this.Bb=null;this.jc=null};U.inherits(K);U.prototype.Mm=10;U.prototype.$j=true;U.prototype.Vj=false;var Nf="canceldismiss";U.prototype.F=function(a){if(a.target==this.ob){switch(a.type){case "hilite":this.kb(a.row);break;case "select":this.od();break;case Nf:this.gf();break;case "dismiss":this.dh();break}}};U.prototype.zo=function(a,b){if(this.sb==
a){return}this.sb=a;this.Jm.jg(this.sb,this.Mm,v(this.Im,this),b);this.gf()};U.prototype.Al=function(){return this.Bb};U.prototype.yo=function(a){this.Bb=a};U.prototype.isOpen=function(){return this.ob.wc()};U.prototype.Xh=function(){if(this.Ba>=this.eb&&this.Ba<this.eb+this.K.length-1){this.kb(this.Ba+1);return true}else if(this.Ba==-1){this.kb(this.eb);return true}return false};U.prototype.Yh=function(){if(this.Ba>this.eb){this.kb(this.Ba-1);return true}else if(this.Vj&&this.Ba==this.eb){this.kb(-1)}return false};
U.prototype.kb=function(a){this.Ba=a;this.ob.kb(a);return this.Ff(a)!=-1};U.prototype.od=function(){var a=this.Ff(this.Ba);if(a!=-1){var b=this.K[a];this.co.Ge(b);this.dismiss();this.dispatchEvent({type:"update",row:b});return true}else{this.dismiss();this.dispatchEvent({type:"update",row:null});return false}};U.prototype.dismiss=function(){this.Ba=-1;this.sb=null;this.eb+=this.K.length;this.K.length=0;window.clearTimeout(this.jc);this.jc=null;this.ob.dismiss()};U.prototype.dh=function(){if(!this.jc){this.jc=
window.setTimeout(v(this.dismiss,this),50)}};U.prototype.gf=function(){window.setTimeout(v(function(){if(this.jc){window.clearTimeout(this.jc);this.jc=null}},this),10)};U.prototype.dispose=function(){if(!this.ma()){U.U.dispose.call(this);this.ob.dispose();this.co.dispose();this.Jm=null}};U.prototype.Im=function(a,b,c){if(this.sb!=a){return}var d=c?this.Ff(this.Ba):null;this.eb+=this.K.length;this.K=b;var e=[];for(var f=0;f<b.length;++f){e.push({id:this.Eh(f),data:b[f]})}this.ob.Qn(e,this.sb,this.Bb);
if(this.$j&&e.length!=0){var g=d!=null?this.Eh(d):this.eb;this.kb(g)}else{this.Ba=-1}};U.prototype.Ff=function(a){var b=a-this.eb;if(b<0||b>=this.K.length){return-1}return b};U.prototype.Eh=function(a){return this.eb+a};var F=function(a,b,c,d){Va.call(this);this.Fc=ga(a)&&!(a===null)?a:",;";this.xm=b||"";this.kd=c!=null?c:true;this.Y=new lb(d||150);this.rp=this.Fc.substring(0,1);this.vq=new RegExp("^[\\s"+this.Fc+"]+|[\\s"+this.Fc+"]+$","g");this.iq=new RegExp("\\s*["+this.Fc+"]$");this.ia=new Nb(this);this.wd=new Nb(this);this.Vf=new Ma};F.inherits(Va);F.prototype.cp=true;F.prototype.Xk=true;F.prototype.yj=false;F.prototype.L=null;F.prototype.gd="";F.prototype.bc=false;F.prototype.Kg=function(a){this.G=a};F.prototype.Yj=
function(a){vc(a,"select");Wb(a,"haspopup",true);this.ia.listen(a,"focus",this.xc);this.ia.listen(a,"blur",this.ag);if(!this.L){this.wd.listen(a,Bc,this.Bi)}};F.prototype.Gk=function(a){if(a==this.L){this.ag()}this.ia.unlisten(a,"focus",this.xc);this.ia.unlisten(a,"blur",this.ag);if(!this.L){this.wd.unlisten(a,Bc,this.Bi)}};F.prototype.Ze=function(){for(var a=0;a<arguments.length;a++){this.Yj(arguments[a])}};F.prototype.Hk=function(){for(var a=0;a<arguments.length;a++){this.Gk(arguments[a])}};F.prototype.Ge=
function(a,b){var c=this.G.Al();if(ga(b)?b:this.kd){var d=Pe(c),e=this.Ph(c.value,d),f=this.tg(c.value),g=a.toString();if(!this.iq.test(g)){g=g.replace(/\s+$/,"")+this.rp}if(this.cp){if(e!=0&&!Xh(f[e-1])){g=" "+g}if(e<f.length&&!Xh(f[e+1])){g=g+" "}}if(g!=f[e]){f[e]=g;c.value=f.join("");var h=0;for(var j=0;j<=e;j++){h+=f[j].length}c.focus();fl(c,h);el(c,h)}}else{c.value=a.toString()}};F.prototype.dispose=function(){if(!this.ma()){F.U.dispose.call(this);this.ia.dispose();this.ia=null;this.wd.dispose();
this.wd=null}};F.prototype.Nl=function(a){switch(a.keyCode){case 40:if(this.G.isOpen()){this.Wm();a.preventDefault();return true}else if(!this.kd){this.Hc(true);a.preventDefault();return true}break;case 38:if(this.G.isOpen()){this.Ym();a.preventDefault();return true}break;case 9:this.Hc();if(this.G.od()&&this.kd){a.preventDefault();return true}break;case 13:this.Hc();if(this.G.od()){a.preventDefault();return true}break;case 27:if(this.G.isOpen()){this.G.dismiss();return true}break;case 229:if(!this.bc){this.ia.listen(this.L,
"keyup",this.bg);this.bc=true;return true}break}if(this.kd&&a.charCode&&this.Fc.indexOf(String.fromCharCode(a.charCode))!=-1){this.Hc();if(this.G.od()){a.preventDefault();return true}}return false};F.prototype.Qj=function(){this.Vf.attach(this.L);this.ia.listen(this.Vf,"key",this.cg);if(M){this.ia.listen(this.L,Cc,this.Ai)}};F.prototype.Ln=function(){this.ia.unlisten(this.Vf,"key",this.cg);this.Vf.detach();if(M){this.ia.unlisten(this.L,Cc,this.Ai)}if(this.bc){this.ia.unlisten(this.L,"keyup",this.bg)}};
F.prototype.xc=function(a){this.wd.Si();if(this.G){this.G.gf()}this.L=a.target;this.Y.start();this.ia.listen(this.Y,"tick",this.Ei);this.gd=this.L.value;this.Qj()};F.prototype.ag=function(a){if(this.L){this.Ln();this.L=null;this.bc=false;this.Y.stop();this.ia.unlisten(this.Y,"tick",this.Ei);if(this.G){this.G.dh()}}};F.prototype.Ei=function(a){if(!this.bc){this.Hc()}};F.prototype.Bi=function(a){this.xc(a);if(M){this.cg(a)}};F.prototype.cg=function(a){if(this.G&&!this.bc){this.Nl(a)}};F.prototype.bg=
function(a){if(a.keyCode==13){this.bc=false;this.ia.unlisten(this.L,"keyup",this.bg)}};F.prototype.Ai=function(a){if(this.kd&&this.Fc.indexOf(String.fromCharCode(a.charCode))!=-1){this.Hc();if(this.G.od()){a.preventDefault()}}};F.prototype.Hc=function(a){if(a||this.L&&this.L.value!=this.gd){var b=this.mn();if(this.G){this.G.yo(this.L);this.G.zo(b,this.L.value)}this.gd=this.L.value}};F.prototype.Ym=function(){return this.yj?this.G.Xh():this.G.Yh()};F.prototype.Wm=function(){return this.yj?this.G.Yh():
this.G.Xh()};F.prototype.mn=function(){var a=Pe(this.L),b=this.L.value;return this.So(this.tg(b)[this.Ph(b,a)])};F.prototype.So=function(a){return String(a).replace(this.vq,"")};F.prototype.Ph=function(a,b){var c=this.tg(a);if(b==a.length)return c.length-1;var d=0;for(var e=0,f=0;e<c.length&&f<b;e++){f+=c[e].length;d=e}return d};F.prototype.tg=function(a){if(!this.kd){return[a]}var b=String(a).split(""),c=[],d=[];for(var e=0,f=false;e<b.length;e++){if(this.xm&&this.xm.indexOf(b[e])!=-1){if(this.Xk&&
!f){c.push(d.join(""));d.length=0}d.push(b[e]);f=!f}else if(!f&&this.Fc.indexOf(b[e])!=-1){d.push(b[e]);c.push(d.join(""));d.length=0}else{d.push(b[e])}}c.push(d.join(""));return c};var N=function(a,b,c,d){this.p=a||$g().body;this.j=yc(this.p);this.Sn=!a;this.a=null;this.sb="";this.K=[];this.Pf=-1;this.Jo=-1;this.Z=false;this.className="ac-renderer";this.rowClassName="ac-row";this.activeClassName="active";this.Nc=b;this.Aq=d!=null?d:true;this.eq=c!=null?c:false;this.di=null;this.wg=false};N.inherits(K);var ei=0;N.prototype.Lc=null;N.prototype.Qn=function(a,b,c){this.sb=b;this.K=a;this.Pf=0;this.Jo=Ha();this.Bb=c;this.Ee=[];this.redraw()};N.prototype.dismiss=function(){if(this.Z){this.Z=
false;bb(this.a,false)}};N.prototype.show=function(){if(!this.Z){this.Z=true;bb(this.a,true)}};N.prototype.wc=function(){return this.Z};N.prototype.Zh=function(a){this.em();this.Pf=a;if(a>=0&&a<this.a.childNodes.length){var b=this.Ee[a];ma(b,this.activeClassName);Wb(this.a,"activedescendant",b.id);hl(this.Lc,Me(b))}};N.prototype.em=function(){if(this.Pf>=0){Da(this.Ee[this.Pf],this.activeClassName)}};N.prototype.kb=function(a){if(a==-1){this.Zh(-1)}else{for(var b=0;b<this.K.length;b++){if(this.K[b].id==
a){this.Zh(b);return}}}};N.prototype.ro=function(a){ma(a,this.className)};N.prototype.redraw=function(){if(!this.a){this.Lc=this.j.v("div",{style:"display:none"});vc(this.Lc,"region");Wb(this.Lc,"live","rude");this.j.appendChild(this.p,this.Lc);this.a=this.j.v("div",{style:"display:none"});this.ro(this.a);vc(this.a,"menu");var a=this.a.id="goog-acr-"+ei++;Wb(this.Bb,"controls",a);this.j.appendChild(this.p,this.a);p(this.a,wa,this.Yc,false,this);p(this.a,Dc,this.Zc,false,this);p(this.j.Ma(),wa,this.Th,
false,this);p(this.a,Ec,this.$c,false,this)}if(this.wg){this.a.style.visibility="hidden"}this.Ee.length=0;this.j.Jn(this.a);if(this.Nc&&this.Nc.render){this.Nc.render(this,this.a,this.K,this.sb)}else{var b=null;Aa(this.K,function(g){var g=this.Pn(g,this.sb);if(this.wg){this.a.insertBefore(g,b)}else{this.j.appendChild(this.a,g)}b=g},this)}if(this.K.length==0){this.dismiss();return}else{this.show()}this.un(this.a);if(this.Bb&&this.Sn){var c=lc(this.Bb),d=la(this.Bb),e=la(di(this.Bb)),f=la(this.a);c.y=
this.wg?c.y-f.height:c.y+d.height;if((this.eq||c.x+f.width>e.width)&&this.di!="LEFT"){c.x=c.x+d.width-f.width;this.di="RIGHT"}else{this.di="LEFT"}fe(this.a,c);if(this.wg){this.a.style.visibility="visible"}}Om(this.a,true)};N.prototype.lo=function(a){this.Sn=a};N.prototype.dispose=function(){if(!this.ma()){N.U.dispose.call(this);if(this.a){Oa(this.a,wa,this.Yc,false,this);Oa(this.a,Dc,this.Zc,false,this);Oa(this.j.Ma(),wa,this.Th,false,this);Oa(this.a,Ec,this.$c,false,this);this.j.removeNode(this.a);
this.a=null;this.Z=false}this.p=null}};N.prototype.un=function(a){if(Ba&&Pf){a.style.width="";a.style.overflow="visible";a.style.width=a.offsetWidth;a.style.overflow="auto"}};N.prototype.On=function(a,b,c){c.innerHTML=Ta(a.data.toString())};N.prototype.Of=function(a,b){if(a.nodeType==3){var c,d=null;if(G(b)){c=b.length>0?b[0]:"";if(b.length>1){d=Cd(b,1)}}else{c=b}if(c.length==0)return;var e=a.nodeValue;c=de(c);var f=new RegExp("(.*?)(^|\\W+)("+c+")","gi"),g=[],h=0,j=f.exec(e);while(j){g.push(j[1]);
g.push(j[2]);g.push(j[3]);h=f.lastIndex;j=f.exec(e)}g.push(e.substring(h));if(g.length>1){a.nodeValue=g[0]+g[1];var k=this.j.createElement("b");this.j.appendChild(k,this.j.createTextNode(g[2]));k=a.parentNode.insertBefore(k,a.nextSibling);for(var l=g.length-1;l>=3;l--){a.parentNode.insertBefore(this.j.createTextNode(g[l]),k.nextSibling)}}else if(d){this.Of(a,d)}}else{var n=a.firstChild;while(n){var m=n.nextSibling;this.Of(n,b);n=m}}};N.prototype.Pn=function(a,b){var c=this.j.v("div",{className:this.rowClassName});
if(this.Nc&&this.Nc.Yi){this.Nc.Yi(a,b,c)}else{this.On(a,b,c)}if(b&&this.Aq){this.Of(c,b)}c.id="goog-acri-"+ei++;ma(c,this.rowClassName);vc(c,"menuitem");this.Ee.push(c);return c};N.prototype.Lh=function(a){while(a&&a!=this.a&&!wc(a,this.rowClassName)){a=a.parentNode}return a?De(this.Ee,a):-1};N.prototype.Yc=function(a){var b=this.Lh(a.target);if(b>=0){this.dispatchEvent({type:"select",row:this.K[b].id})}a.stopPropagation()};N.prototype.Zc=function(a){this.dispatchEvent(Nf);a.stopPropagation()};N.prototype.Th=
function(a){this.dispatchEvent("dismiss")};N.prototype.$c=function(a){var b=this.Lh(a.target);if(b>=0){if(Ha()-this.Jo<300){return}this.dispatchEvent({type:"hilite",row:this.K[b].id})}};var Rm=function(){};Rm.prototype.render=function(a,b,c,d){};var ge=function(a,b){this.K=a;this.zq=!b};ge.prototype.jg=function(a,b,c,d){var e=this.ul(a,b);if(e.length==0&&this.zq){e=this.yl(a,b)}c(a,e)};ge.prototype.ul=function(a,b){var c=[];if(a!=""){var d=de(a),e=new RegExp("(^|\\W+)"+d,"i");Lm(this.K,function(f){if(String(f).match(e)){c.push(f)}return c.length>=b})}return c};ge.prototype.yl=function(a,b){var c=[];Aa(this.K,function(f){var g=a.toLowerCase(),h=String(f).toLowerCase(),j=0;if(h.indexOf(g)!=-1){j=parseInt(h.indexOf(g)/4,10)}else{var k=g.split(""),
l=-1,j=0,n=10;for(var m=0,y;y=k[m];m++){var A=h.indexOf(y);if(A>l){var E=A-l-1;if(E>n-5){E=n-5}j+=E;l=A}else{j+=n;n+=5}}}if(j<g.length*6){c.push({str:f,score:j})}});c.sort(function(f,g){return f.score-g.score});var d=[];for(var e=0;e<b&&e<c.length;e++){d.push(c[e].str)}return d};var Qm=function(a,b,c,d){var e=new ge(a,!d),f=new N,g=new F(null,null,!(!c));U.call(this,e,f,g);g.Kg(this);g.Ze(b)};Qm.inherits(U);var ja=function(){this.Sf=false;this.Mc=[];this.Hq=[];this.wb=null;this.ad=[];this.Il=[];this.Sk={};this.G=null;this.ob=null;this.Fo=true;this.Ro={};this.qe=250};ja.prototype.tb=function(a,b,c){if(!a||V(a)){var d={id:c||""};if(a){d.Name=a}if(b){d.Emails=[{Address:b}]}a=gb(d,"$SomeContact")}var e=Gc(a);if(this.Fo&&!e){return}this.Mc.push(this.lf(a))};var Gc=function(a){return o("Emails/[0]/Address").h(a)||o("Email").h(a)},Kl=function(a,b){var c=new ja;if(!b.uri&&b.serverBase){b.uri=b.serverBase+"data/contacts"}c.create(a,
b);return c};u._EmailAc_create=Kl;ja.prototype.create=function(a,b){var c=Lb(a),d=new r(b.uri);if(b.max)this.pg(b.max);if(b.groups)d.r("groups","true");this.init(c,d.toString(),true,b.rightAlign,b.twoLine);this.Pi=b.progressive};ja.prototype.dispose=function(){this.wb.dispose();this.ob.dispose()};ja.prototype.nk=function(){return new U(this,this.ob,this.wb)};ja.prototype.pg=function(a){this.qe=a<0?10100:a};ja.prototype.init=function(a,b,c,d,e,f){if(this.Sf){Q.warning("Init already called");return}this.Sf=
true;this.B=b;this.ni("$Contacts",v(this.El,this),null,false);var g;if(G(a)){g=a[0].ownerDocument.body}else{g=a.ownerDocument.body}var h=e?new N(g,new Ah,d):new Md(g);h.lo(true);this.ob=h;this.wb=new Nd(",;",'"',f);this.G=this.nk();this.wb.Kg(this.G);this.Pi=false;if(a){this.Pj(a)}};ja.prototype.ni=function(a,b,c,d){var e=new r(this.B);e.r("out","js");if(c){e.r("tok",c);e.r("cl",false);e.r("psort","Name")}if(d){e.r("cd","true")}var f=c?10:this.qe;e.r("max",f);var g=new zb(e,a,"&&&START&&&","&&&END&&&"),
h=q();h.$(g,true);h.O(b,a);g.load()};ja.prototype.Pj=function(a){if(!this.Sf){Q.warning("Init should be called first");return}if(G(a)){this.ad=this.ad.concat(a);for(var b=0;b<a.length;b++){this.wb.Ze.call(this.wb,a[b])}}else{this.ad.push(a);this.wb.Ze.call(this.wb,a)}};ja.prototype.Kn=function(a){if(!this.Sf){Q.warning("Init should be called first");return}if(G(a)){wb(a,function(b){this.Kn(b)},this)}else{uc(this.ad,a);this.wb.Hk(a)}};ja.prototype.jg=function(a,b,c){this.zk=a;var d=[];if(a!=""){var e=
de(a),f=f=new RegExp('(^|<| |"|\\()'+e,"i"),g=this.Il;for(var h=0;h<g.length&&d.length<b;++h){var j=g[h];if(j.wa().match(f)){d.push(j)}}g=this.Mc;for(var h=0;h<g.length&&d.length<b;++h){var j=g[h];if(j.toString().match(f)){d.push(j)}}}if(this.Pi&&a){if(!this.Vh(a,b,true)){if(d.length<b){var k=d.concat([]);u.setTimeout(this.Yk.bind(this,k,b,a,c),500);d.push(new bf("MORE"))}}}c(a,d)};ja.prototype.Vh=function(a,b,c){var d=this.Ro[a];if(d&&(c||d.count<b)){return true}else if(a.length>1){return this.Vh(a.substring(0,
a.length-1),b,false)}else{return false}};var Ll=0;ja.prototype.Yk=function(a,b,c,d){if(c==this.zk&&c!=""){var e="$AdditionalContacts"+Ll++,f=this.Dl.bind(this,a,b,c,d);this.ni(e,f,c,true)}};ja.prototype.Dl=function(a,b,c,d,e){var f=[].concat(a);if(c==this.zk){var g=this.uh(e),h={};for(var j=0;j<a.length;j++){var k=Gc(a[j].contactData);h[k]=true}j=0;while(f.length<b&&j<g.e()){var l=g.n(j),k=Gc(l);if(!h[k]){var n=this.lf(l);f.push(n);this.Sk[k]=true;this.Mc.push(n)}j++}d(c,f,true);this.Ro[c]={count:f.length}}};
ja.prototype.uh=function(a){var b=q().Sd(a),c=b.b("Body",true).b("Contacts",true).g();return c};ja.prototype.El=function(a,b){var c=this.uh("$Contacts"),d=c.e();Q.info("Got "+d+" contacts");if(d>0){for(var e=0;e<this.ad.length;e++){this.ad[e].setAttribute("autocomplete","off")}}var f=new X;for(var e=0;e<d;e++){var g=c.n(e),h=Gc(g);if(!h&&this.Fo){continue}var j=g.d("Name"),k=g.d("Groups");if(k!=null){var l=k.length;for(var n=0;n<l;n++){var m=f.get(k[n].id);if(m==null){m=[];f.set(k[n].id,m)}m.push(lh(j,
k[n].value))}}var y=this.lf(g);this.Mc.push(y);this.Sk[h]=true}Q.info("Created contact array");var A=q().Sd("$Contacts"),E=A.b("Body").b("Groups");if(E!=null){var k=E.g();d=k.e();Q.info("Got "+d+" groups");for(var e=0;e<d;e++){var ua=k.n(e),ca=ua.d("id"),j=ua.d("Name");if(ca.charAt(0)!="^"){var Y=f.get(ca);if(Y!=null){this.Il.push(new Jd(j,Y))}}}}var db=A.b("Body").b("UserData");if(db){var re=db.b("Features",true).g();for(var e=0;e<re.e();e++){var hj=re.n(e).get();if(hj=="PROGRESSIVE_AC"){this.Pi=
true}}}};ja.prototype.lf=function(a){var b=a.d("Name"),c=Gc(a),d={};d.contactData=a;var e=lh(b,c);d.formattedValue=e;d.toString=function(){return this.formattedValue};return d};var Md=function(){N.apply(this,arguments)};Md.inherits(N);Md.prototype.redraw=function(){var a=false,b=this.K.length;if(b>0&&this.K[b-1].data.Qh&&this.K[b-1].data.Qh()=="MORE"){a=true}Md.U.redraw.call(this);if(a){var c=ra("SEARCHING_FOR_MATCHES");if(b>1){var d=this.j.createElement("div"),e=this.j.v("div",{style:"background-color: #A0B0FF; margin: 8px 0px"});
if(M){var f=this.j.v("img",{width:"1",height:"1"});e.appendChild(f)}else{e.style.height="1px"}d.appendChild(e);this.a.appendChild(d);c=ra("SEARCHING_FOR_MORE_MATCHES")}var g=this.j.v("div");g.innerHTML=c;this.a.appendChild(g)}};var bf=function(a){this.To=a};bf.prototype.toString=function(){return""};bf.prototype.Qh=function(){return this.To};var Ah=function(){};Ah.prototype.Yi=function(a,b,c){c.innerHTML=Ik([Ta(a.data.contactData.d("Name")),Ta(Gc(a.data.contactData))],function(d){return d}).join("<br/>")};
var _emailAutocomplete=u._emailAutocomplete=new ja;u._initEmailAutocomplete=v(u._emailAutocomplete.init,u._emailAutocomplete);var _initEmailAutocomplete=u._initEmailAutocomplete,lh=function(a,b){var c=a?'"'+a+'"':"",d=b?" <"+b+">":"";return c+d};var Nd=function(a,b,c){F.call(this,a,b,c)};Nd.inherits(F);Nd.prototype.Ge=function(a){if(a.th){a=a.th().join(", ")}Nd.U.Ge.call(this,a)};var Jd=function(a,b){this.Ua=a;this.Mc=b};Jd.prototype.toString=function(){return this.Ua+" (Group)"};Jd.prototype.wa=
function(){return this.Ua};Jd.prototype.th=function(){return this.Mc};var cm=function(a,b,c,d){var e=a.split("."),f=d||u,g=f,h=e.length;for(var j=0;j<h-1;j++){if(!g[e[j]]){g[e[j]]={}}g=g[e[j]]}g[e[h-1]]=b;if(c){f[c]=b}},dm=function(a,b){if(a.value==""||a.value==b||a.value==a.defaultText){a.defaulted=true;a.value=b;ma(a,"input-default")}a.defaultText=b;p(a,"focus",function(){if(a.defaulted){a.value="";Da(a,"input-default");a.defaulted=false}});p(a,"blur",bm.bind(null,a));p(document,Cc,function(c){if(c.target==a&&c.keyCode==27){c.stopPropagation()}},true)},bm=function(a){if(a.value==
""&&!a.defaulted){a.defaulted=true;a.value=a.defaultText;ma(a,"input-default")}};var Xd=function(a,b){b=b<0?0:b;a.style.height=b+"px";a.__lastHeight=b},Bh=function(a,b){b=b<0?0:b;a.style.width=b+"px";a.__lastWidth=b},Wd=function(a){return $a(a,"paddingLeft")+$a(a,"paddingRight")+$a(a,"marginLeft")+$a(a,"marginRight")+$a(a,"borderLeftWidth")+$a(a,"borderRightWidth")},of=function(a){return $a(a,"paddingTop")+$a(a,"paddingBottom")+$a(a,"marginTop")+$a(a,"marginBottom")+$a(a,"borderTopWidth")+$a(a,"borderBottomWidth")},
$a=function(a,b){var c=mb(a),d;if(c.defaultView&&c.defaultView.getComputedStyle){var e=c.defaultView.getComputedStyle(a,"");if(e){d=e[b]}}if(!d){d=a.currentStyle?a.currentStyle[b]:a.style[b]}if(ha(d,"px")){var d=Number(d.substring(0,d.length-2));if(d<-10){d=0}return d}else{return 0}};var ed=function(a,b){this.c=a;if(a==null){return}this.vf=b?Kd(b):null;if(this.vf){var c=v(this.vj,this);Aa(this.vf.S(),function(h){q().O(c,h.ha)});this.vj()}if(M){var d=la(a);a.style.width=String(d.width*0.77)+"px";var e=Number(a.currentStyle.paddingTop.split("px")[0]),f=Number(a.currentStyle.paddingBottom.split("px")[0]);a.style.paddingTop=String(e+2)+"px";var g=f>=2?f-2:0;a.style.paddingBottom=String(g)+"px"}p(a,Dc,v(this.sn,this));p(a,"mouseup",v(this.Oi,this));p(a,Id,v(this.Hm,this));p(a,Ec,v(this.Uo,
this));p(a,wa,v(this.Oi,this))};ed.prototype.sn=function(a){ma(a.target,"presubmit");a.target.tn=true};ed.prototype.Oi=function(a){Da(a.target,"presubmit");a.target.tn=false};ed.prototype.Hm=function(a){Da(a.target,"presubmit")};ed.prototype.Uo=function(a){if(a.target.tn){ma(a.target,"presubmit")}};ed.prototype.vj=function(){if(this.vf){this.c.disabled=!this.vf.h()}};var kh=function(a,b){this.c=Lb(a);this.Aa=o(b);q().O(v(this.Hb,this),b);p(this.c,wa,v(this.Kk,this),false,this);var c=this.Aa.h();if(c){this.c.checked=c}};kh.prototype.Hb=function(){if(!this.Pb){var a=this.Aa.h();this.Ob=true;this.c.checked=a!=0;this.Ob=false}};kh.prototype.Kk=function(){if(!this.Ob){var a=this.c.checked;this.Pb=true;Ya(this.Aa.ha,a);this.Pb=false}};var Od=function(a,b,c,d,e){this.c=Lb(a);this.Aa=o(b);this.Iq=c;this.Pc=d||this.c.getAttribute("defaultText");this.Km=e;if(this.Km){this.c.maxLength=this.Km}q().O(v(this.Hb,this),b);p(this.c,"change",this.nc,false,this);p(this.c,"keyup",this.nc,false,this);var f=this.Aa.h();if(f){this.c.value=f}if(this.Pc){p(this.c,"blur",this.hf,false,this);p(this.c,"focus",this.xc,false,this);this.hf()}};Od.prototype.Hb=function(){if(!this.Pb){var a=this.Aa.h();this.Ob=true;this.c.value=a?a:"";this.Ob=false;this.Fd=
false;if(this.Pc){this.hf()}}};Od.prototype.nc=function(){if(!this.Ob){var a=this.c.value||null;this.Pb=true;var b=this.Aa.qa().D(null,true);b.o(this.Aa.Ub,a);this.Pb=false}};Od.prototype.hf=function(){if(this.c.value==""&&!this.Fd){this.Fd=true;ma(this.c,"input-default");this.c.value=this.Pc}else{Da(this.c,"input-default");this.Fd=false}};Od.prototype.xc=function(){if(this.Fd){this.c.value="";Da(this.c,"input-default");this.Fd=false}};var Ql=function(a,b,c){if(a){this.Rb=a;this.jm=b||a.getAttribute("icon");if(this.jm){this.cb=Xb("div",{className:this.Rb.className});this.Rb.className="inner";this.Nb=Zc("img");this.Nb.src=this.jm;this.Nb.style.verticalAlign="bottom";this.cb.appendChild(this.Nb);if(this.Nb.readyState!="complete"){this.Nb.style.display="none";p(this.Nb,"load",this.im,false,this)}if(M){this.Nb.style.verticalAlign="top"}a.parentNode.replaceChild(this.cb,a);this.cb.appendChild(a);this.Rb.style.border="0px";this.Rb.style.padding=
"0px";this.Rb.style.paddingLeft="4px";this.cb.style.verticalAlign="top";this.Rb.style.whiteSpace="nowrap";this.Rb.style.width="80%";var d=la(this.cb).height;if(d>5){var e=M?0:of(this.cb)-2;this.cb.style.height=d-e+"px"}this.cb.style.overflow="hidden"}this.Pc=c||a.getAttribute("defaultText");if(this.Pc){dm(this.Rb,this.Pc)}}};Ql.prototype.im=function(){this.Nb.style.display="inline"};var dc=function(a){this.c=a;this.oq=200;this.Yp=1000;this.Vl=this.Uh.bind(this);p(a,["input","propertychange"],this.Uh,false,this);p(a,Cc,this.Ol,false,this);p(a,Bc,this.Ml,false,this);var b=["focus",wa,"blur"];p(a,b,this.Sl,false,this)};dc.mixin(K.prototype);dc.prototype.Ol=function(a){u.setTimeout(this.Vl,0);if(!this.dispatchEvent(a)){a.preventDefault()}};dc.prototype.Ml=function(a){var b=a.keyCode,c=null;if(b==40){c="DOWN_ARROW"}else if(b==38){c="UP_ARROW"}else if(b==13){c="ENTER"}else if(b==27){c=
"ESCAPE"}else if(b==9){c="TAB"}if(M&&(b==8||b==46)){u.setTimeout(this.Vl,0)}if(c){var d=this.dispatchEvent(c);if(!d){a.preventDefault()}}};dc.prototype.Sl=function(a){this.dispatchEvent(a)};dc.prototype.Uh=function(a){var b=this.c.defaulted?"":this.c.value;if(b!=this.gd){this.eh("VALUE",b);if(this.Io){u.clearTimeout(this.Io)}this.Io=u.setTimeout(this.Rg.bind(this,"STABLE_VALUE",b),this.oq);if(this.nn){u.clearTimeout(this.nn)}this.nn=u.setTimeout(this.Rg.bind(this,"PAUSED_VALUE",b),this.Yp);this.gd=
b}};dc.prototype.Rg=function(a,b){var c=this.c.defaulted?"":this.c.value;if(c==b){this.eh(a,b)}};dc.prototype.eh=function(a,b){var c=new aa(a);c.value=b;this.dispatchEvent(c)};var xh=function(a,b,c){this.c=Lb(a);this.Aa=o(b);var d=this.Aa.h();if(c){this.Jq=c;Aa(c.T(),function(g,h){var j=Zc("option");j.value=h;j.text=g;this.c.options[this.c.options.length++]=j})}for(var e=0;e<this.c.options.length;e++){var f=this.c.options[e];if(d==f.value){f.selected=true}}q().O(v(this.Hb,this),b);p(this.c,"change",this.nc,false,this);p(this.c,"keyup",this.nc,false,this)};xh.prototype.Hb=function(){if(!this.Pb){var a=this.Aa.h();this.Ob=true;this.c.value=a?a:"";this.Ob=false}};xh.prototype.nc=
function(){if(!this.Ob){var a=this.c.value||null;this.Pb=true;Ya(this.Aa.ha,a);this.Pb=false}};var Xl=function(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling){Xl(d,b,c)}if(a.nodeType==1&&a.getAttribute("maximize")=="true"){if(a.__lastWidth){Bh(a,a.__lastWidth+b)}if(a.__lastHeight){Xd(a,a.__lastHeight+c)}}},Wl=function(a){var b;if(a.nodeType==1&&a.getAttribute("maximize")=="true"&&a.nodeName!="TR"){var c,d;if(a.parentNode.nodeName=="BODY"){var e=Ne();c=e.width;d=e.height;a.parentNode.style.overflow="hidden"}else{var f=a.parentNode;c=a.parentNode.offsetWidth-Wd(f);if(Ba){c-=Wd(a)}var g=a.parentNode.offsetHeight;
if(ta&&a.parentNode.nodeName=="TD"&&a.parentNode.parentNode.__lastHeight){g=a.parentNode.parentNode.__lastHeight}d=g-of(f)}var h=Wd(a);if(a.nodeName!="TABLE"){Bh(a,c)}Xd(a,d);if(a.offsetHeight>d){Xd(a,2*d-a.offsetHeight)}if(a.nodeName=="TABLE"){var j=null,k=0,l;for(var l=0;l<a.rows.length;l++){var n=a.rows[l];if(n.getAttribute("maximize")=="true"){j=n;j.style.height="100%"}}if(j){for(var l=0;l<a.rows.length;l++){var n=a.rows[l];if(n!=j){var m=ta&&n.firstChild?n.firstChild.offsetHeight:n.offsetHeight;
k+=m}}Xd(j,d-k-2);j.style.width=""}}}for(b=a.firstChild;b;b=b.nextSibling){Wl(b)}};var pf=function(a,b){this.Qm=a;this.Zg=b||"$LastMessage";this.Rp=o(this.Zg+"/Message");this.wq=o(this.Zg+"/Level");q().O(v(this.km,this),this.Zg+"/...");this.xb=false};pf.prototype.km=function(){if(!this.xb){u.setTimeout(v(this.Ce,this),0)}this.xb=true};pf.prototype.Ce=function(){if(this.xb){var a=I(this.Qm);if(a){var b=this.Rp.h();if(b==null){Da(a,"error");Da(a,"info");a.innerHTML=""}else{var c=this.wq.h();if(c=="INFO"){ma(a,"info");Da(a,"error")}else{ma(a,"error");Da(a,"info")}ma(a,"hilite");if(b.length<
150){a.innerHTML=Ta(b)}else{var d=Xb("div",{style:"display:none; position:absolute; background-color:white;padding:8px; border:1px dashed #AAA;text-decoration: none"});d.innerHTML=Ta(b).replace(/\n/g,"<br/>");var e=Xb("a",{href:"#"});p(e,wa,function(){if(d.style.display=="block"){d.style.display="none"}else{d.style.display="block"}});e.innerHTML="Details";a.innerHTML="";a.appendChild(document.createTextNode("Operation failed. Please try again in a moment. "));a.appendChild(e);a.appendChild(d);var f=
lc(a),g=la(a),h=la(d);Mf(d,f.x+g.width-h.width,f.y+g.height)}u.setTimeout(v(this.rn,this),1000)}}this.xb=false}};pf.prototype.rn=function(){var a=I(this.Qm);if(a){Da(a,"hilite")}};var Ga=function(){this.ck="..";this.bj={};this.Bj={};this.vd={};this.ge={};this.Bp={};this.Bg={}},oa=function(){if(!nf){nf=new Ga}return nf},nf=null;Ga.prototype.wo=function(a,b,c){a=new r(a);if(b&&c){if(!this.vd[b]){this.vd[b]={}}this.vd[b][c]=a}else if(b){this.Bj[b]=a}else if(c){this.bj[c]=a}else{this.ck=a}};Ga.prototype.Wc=function(a,b){if(this.vd[a]&&this.vd[a][b]){return this.vd[a][b]}else if(this.Bj[a]){return this.Bj[a]}else if(this.bj[b]){return this.bj[b]}else{return this.ck}};Ga.prototype.Hn=
function(a){this.ge[a.Na()]=a};Ga.prototype.Lg=function(a,b,c){var d=this.ge[a];if(d&&d.attach){d.attach(b,c);return true}var e=this.Bp[a];if(e&&e.attach){e.attach(b,c);return true}return false};Ga.prototype.Gd=function(a,b,c){var d=this.ge[a];if(d&&d.Gd){d.Gd(b,c);return true}return false};Ga.prototype.Jb=function(a,b,c){var d=this.ge[a];if(d&&d.Jb){d.Jb(b,c);return true}return false};var am=0;Ga.prototype.qk=function(a,b,c,d){if(Pf&&Ba){ma(document.body,"background")}var e=this.rk(a,b),f=this.xk(a,
c,d);if(!M){e.src=f}var g=new x;g.vh().appendChild(e);g.ij(new qa);g.Ea(true);if(M){e.src=f}this.Bg[a]=g;return e.contentWindow};Ga.prototype.rk=function(a,b){var c=a+"-iframe",d=I(c);if(!d){d=Xb("iframe",{id:c});Eb(d,"display","block");Eb(d,"backgroundColor","#FFF");Eb(d,"border","1px solid #555");mc(d,b.width,b.height)}return d};Ga.prototype.xk=function(a,b,c){var d=new r(this.Wc()+"/ui/"+a);if(c){var e="UiWidgetCallback"+am++;u[e]=c;d.r("done",e)}d.r("js","RAW");d.r("pop","TRUE");if(b){Aa(b,function(f,
g){if(f!=null){d.r(g,f)}})}return d};Ga.prototype.Lk=function(a){var b=this.Bg[a];if(b){b.dispose();Da(document.body,"background")}delete this.Bg[a]};Ga.prototype.dm=function(a){var b=this.Bg[a];if(b){b.Ea(false)}};Ga.prototype.fj=function(a,b){var c=this.ge[a],d=I(c.Na()+"-iframe");if(d&&d.contentWindow.UI_receive){d.contentWindow.UI_receive(b)}};Ga.prototype.Jg=function(a){var b=a||document;for(var c=b.firstChild;c;c=c.nextSibling){this.Jg(c)}if(b.getAttribute){var d=b.getAttribute("gtype");if(d){var e=
{};for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f];e[g.name]=g.value}var h=this.Lg(d,b,e);if(!h){this.Gd(d,b,e)}}}};window.UI_setServerBase=function(a,b,c){oa().wo(a,b,c)};window.UI_getServerBase=function(a,b){oa().Wc(a,b)};window.UI_attachAndDisplayAllWidgets=function(a){oa().Jg(a)};window.UI_attachWidget=function(a,b,c){oa().Lg(a,b,c)};window.UI_displayInline=function(a,b,c){oa().Gd(a,b,c)};window.UI_displayIframe=function(a,b){oa().Jb(a,b)};var ya=function(a){this.Da(a)},jh={},Kd=function(a){var b=jh[a];if(b==null){b=new ya(a);jh[a]=b}return b};ya.prototype.Da=function(a){this.ha=a;this.Ia=[];if(this.wj("||")){this.pc=this.Rk}else if(this.wj("and")){this.pc=this.Mk}else if(this.Xe("!=")){this.pc=this.Qk}else if(this.Xe("=")){this.pc=this.Nk}else if(this.Xe("<")){this.pc=this.Pk}else if(this.Xe(">")){this.pc=this.Ok}else{this.vp=this.Xf(a);this.pc=this.Bl}};ya.prototype.Xe=function(a){var b=this.ha,c=b.indexOf(a);if(c!=-1){this.Vp=a;
this.Kb=this.Xf(Ia(b.substring(0,c)));this.Wb=this.Xf(Ia(b.substring(c+a.length)));return true}else{return false}};ya.prototype.wj=function(a){var b=this.ha,c=b.indexOf(a);if(c!=-1){this.Vp=a;this.Kb=Kd(Ia(b.substring(0,c)));this.Wb=Kd(Ia(b.substring(c+a.length)));this.Ia=this.Ia.concat(this.Kb.S());this.Ia=this.Ia.concat(this.Wb.S());return true}else{return false}};ya.prototype.Xf=function(a){var b=a.substring(0,1),c=a.toLowerCase();if("0123456789'\"".indexOf(b)==-1&&c!="true"&&c!="false"){var d=
o(a);this.Ia.push(d);return d}else{return Yl(a)}};ya.prototype.Bl=function(a){return this.vp.h(a)?true:false};ya.prototype.Nk=function(a){return this.Kb.h(a)==this.Wb.h(a)};ya.prototype.Qk=function(a){return this.Kb.h(a)!=this.Wb.h(a)};ya.prototype.Pk=function(a){return this.Kb.h(a)<this.Wb.h(a)};ya.prototype.Ok=function(a){return this.Kb.h(a)>this.Wb.h(a)};ya.prototype.Rk=function(a){return this.Kb.h(a)||this.Wb.h(a)};ya.prototype.Mk=function(a){return this.Kb.h(a)&&this.Wb.h(a)};ya.prototype.h=
function(a){return this.pc(a)};ya.prototype.S=function(){return this.Ia};var hd=function(a){if(a){this.Da(a)}},yh={},Yl=function(a){var b=yh[a];if(b==null){b=new hd(a);yh[a]=b}return b},Sd=function(a){var b=new hd;b.sa=a;return b};hd.prototype.Da=function(a){this.ha=a;if(a=="TRUE"||a=="true"){this.sa=true}else if(a=="FALSE"||a=="false"){this.sa=false}else if(sa(a,'"')&&ha(a,'"')){this.sa=a.substring(1,a.length-1)}else if(sa(a,"'")&&ha(a,"'")){this.sa=a.substring(1,a.length-1)}else if(!isNaN(a)){this.sa=Number(a)}else{throw Error("Invalid static expression: "+a);}};hd.prototype.h=
function(a){return this.sa};hd.prototype.S=function(){return[]};var Ea=function(a){this.clear();if(a){this.Fb(a)}};Ea.prototype.e=function(){return this.s};Ea.prototype.T=function(){return nd(this.H)};Ea.prototype.oa=function(){return nd(this.t)};Ea.prototype.fa=function(a){var b=ka(a);return b in this.t};Ea.prototype.Ca=function(){return this.s==0};Ea.prototype.clear=function(){this.t={};this.H={};this.s=0};Ea.prototype.remove=function(a){var b=ka(a);if(ce(this.t,b)){delete this.H[b];this.s--;return true}return false};Ea.prototype.get=function(a,b){var c=ka(a);
if(c in this.H){return this.H[c]}return b};Ea.prototype.set=function(a,b){var c=ka(a);if(!(c in this.t)){this.t[c]=a;this.s++}this.H[c]=b};Ea.prototype.Fb=function(a){var b,c;if(a instanceof Ea){b=a.oa();c=a.T()}else{b=zf(a);c=nd(a)}for(var d=0;d<b.length;d++){this.set(b[d],c[d])}};Ea.prototype.clone=function(){return new Ea(this)};var ec=function(){this.Ib=new Ea;this.Y=null;this.bq=v(this.Gn,this)};ec.prototype.Em=function(a,b,c,d){if(!Bb(c)){throw Error("not a function: "+c);}if(!a.Df){throw Error("Nodes for markDirty must support getDepth");}b=b||[];var e=b.join(","),f=this.Ib.get(a);if(!f){f={};this.Ib.set(a,f)}if(!f[e]){f[e]=[]}Jk(f[e],c);this.$n()};ec.prototype.pi=function(a,b){b=b||[];var c=this.Ib.get(a);if(c){if(b.length==0){this.Ib.remove(a)}else{var d=String(b);delete c[d];if(c.length==0){this.Ib.remove(a)}}}};ec.prototype.$n=
function(){if(!this.Y){this.Y=u.setTimeout(this.bq,50)}};ec.prototype.Gn=function(){delete this.Y;var a=this.Ib.oa();a.sort(function(d,e){return d.Df()-e.Df()});for(var b=0;b<a.length;b++){var c=a[b];this.Fn(c);this.Ib.remove(c)}};ec.prototype.Fn=function(a){while(true){var b=this.Ib.get(a),c=this.ll(b);if(c==null){return}var d=c==""?[]:c.split(","),e=b[c];for(var f=0;f<e.length;f++){var g=e[f];g.call(a,null,"",d)}delete b[c]}};ec.prototype.ll=function(a){if(a!=null){for(var b in a){return b}}return null};var z=function(a,b,c,d){this.wi=a.nodeName;this.ue=c;this.Ek=d;this.Bn(a);this.no(b);this.ua(a)},zh=Ed("goog.focus.TemplateNode"),mf=null,$l=0,lf=function(){if(!mf){mf=new ec}return mf};z.prototype.te=true;z.prototype.Df=function(){return this.Ek};z.prototype.dispose=function(){};z.prototype.Bn=function(a){this.dc={};var b=a.attributes;for(var c=0,d;d=b[c];++c){var e=d.nodeName,f=d.nodeValue;if(f!=null){if(e=="if"){this.Rf=Kd(f)}else if(e=="context"){this.lk=o(f)}else if(e=="repeat"){this.ig=o(f)}else if(e==
"id"){this.Qa=f;this.hm=Ud(this.Qa)}else{var g=sa(e,"on")||e=="g.oncreate";this.dc[e]=Ud(f,g?1:0)}}}};z.prototype.no=function(a){this.Wn=a;this.Ac=this.Wn;if(this.lk){this.Ac=this.Jh(this.lk,true)}if(this.ig){this.Ac=this.Jh(this.ig,true)}};z.prototype.Kh=function(a,b){var c=a.ha,d=b?this.Wn:this.Ac;if(c.indexOf("$")!=0&&d){c=d.ha+"/"+c}return c};z.prototype.Jh=function(a,b){return o(this.Kh(a,b))};z.prototype.init=function(){if(!this.Gp){this.Nj();if(!this.Qa){this.Qa="Node"+$l++;this.hm=Ud(this.Qa)}this.Gp=
true}};z.prototype.Nj=function(){if(this.Rf){var a=this.mf(this.fk);this.me(this.Rf,a,true)}if(this.ig){var b=this.mf(this.Zo);this.me(this.Ac.qa(),b,true)}var c=this.mf(this.Xo);for(var d=0;d<this.Ha.length;d++){var e=this.Ha[d];if(!e.Mb()){this.me(e,c,false)}}for(var f in this.dc){this.me(this.dc[f],c,false)}};z.prototype.mf=function(a){var b=this;return function(c,d,e){lf().Em(b,e,a,c)}};z.prototype.me=function(a,b,c){var d=q();if(a.S){var e=a.S();for(var f=0;f<e.length;f++){var g=this.Kh(e[f],
c);d.Hg(b,g)}}else{var g=a.ha;d.Hg(b,g)}};z.prototype.ua=function(a){if(!this.Ha){var b=this.wi=="script"?1:0;this.Ha=[];var c=a.childNodes;for(var d=0,e;e=c[d];++d){if(!(e.nodeType==3&&/^[\n\r\t ]*$/.test(e.nodeValue))){var f=em().wk(e,this.Ac,this.ue,this.Ek+1,b);this.Ha.push(f)}}}};z.prototype.Uf=function(){if(this.Rf){return this.Rf.h(this)}else{return true}};z.prototype.render=function(a,b){if(b&&b.b){b=o(b.u())}if(b){this.setDataContext(b);this.ua()}this.nd(a)};z.prototype.Ke=function(a){this.I=
a||[];this.mc=this.yh(this.I)};z.prototype.Sc=function(a,b){var c=[];for(var d in this.dc){if(!a||d!="style"){var e=this.dc[d].h(this)||"";c.push({name:d,value:e})}}var f=b||this.Vd();c.push({name:"id",value:f});if(a){var g=this.dc.style,h=(g?g.h(this)+"; ":"")+"display: none";c.push({name:"style",value:h})}return c};z.prototype.Pe=function(a,b,c){if(this.te){a.sd(b,c)}};z.prototype.Md=function(a,b){if(this.te){a.Qc(b)}};z.prototype.nd=function(a,b,c){lf().pi(this,this.I);var d=this.wi,e=this.Uf();
if(this.ig&&!b){this.Nn(a,c);this.cq=true}else if(e){var f=this.Sc();this.Pe(a,d,f);this.Wi(a);this.Md(a,d);this.cq=true}else if(d!="option"){var f=this.Sc(true);if(this.te){a.sd(d,f);a.Qc(d)}}};z.prototype.Nn=function(a,b){var c=o(this.Ef(this.I)).pa(),d=this.wi;for(var e=0;e<c.e();e++){var f=c.n(e);this.I.push(f.m());this.mc=this.yh(this.I);if(this.Uf()){var g=this.Sc();this.Pe(a,d,g);this.Wi(a);this.Md(a,d);this.Oj()}this.I.pop()}if(!b&&d!="option"){this.Zi=this.Vd()+"-R";var h=this.Sc(true,this.Zi);
this.Pe(a,d,h);this.Md(a,d)}};z.prototype.Oj=function(){if(!this.uf){this.uf={}}var a=this.uf;for(var b=0;b<this.I.length-1;b++){if(!a[this.I[b]]){a[this.I[b]]={}}a=a[this.I[b]]}a[String(this.I[this.I.length-1])]=this.Vd()};z.prototype.qn=function(a){var b=this.Uf(),c=a.style.display!="none";if(b!=c){if(b){this.Xi(a)}a.style.display=b?"":"none";if(!b){lf().pi(this,this.I);while(a.lastChild){a.removeChild(a.lastChild)}}}};z.prototype.Xi=function(a){var b=new Za(a,"REPLACE");this.ra("render in renderElement");
b.Qe();this.nd(b,true);b.Nd()};z.prototype.Wi=function(a){this.ua();for(var b=0;b<this.Ha.length;b++){var c=this.Ha[b];if(c.Be){c.Be(a,this)}else{c.init();c.Ke(this.I);c.render(a)}}};z.prototype.Vd=function(){var a=this.hm.h(this);if(this.I){for(var b=0;b<this.I.length;b++){a+="-"+this.I[b]}}return a};z.prototype.Bh=function(){return I(this.Vd())};z.prototype.yh=function(a){var b=this.Ef(a),c=o(b).D();return c};z.prototype.Ef=function(a){var b=this.Ac?this.Ac.ha:"";if(a){for(var c=0;c<a.length;c++){b=
b.replace(/\*/,a[c])}}return b};z.prototype.ra=function(a){var b=Fe;if(zh.ke(b)){var c=[a,"View=",this.ue.Qa," Node=",this.Qa];for(var d=1;d<arguments.length;d++){c.push(arguments[d])}zh.log(b,c.join(", "))}};z.prototype.Xo=function(a,b,c){this.Ke(c);var d=this.Bh();if(d){this.Xi(d)}};z.prototype.Zo=function(a,b,c){var d=I(this.Zi);if(d){c=c||[];var e=this.uf;for(var f=0;f<c.length;f++){e=this.uf[String(c[f])]}for(var g in e){var h=e[g],j=I(h);if(j){j.parentNode.removeChild(j)}}for(var g in e){delete e[g]}this.Ke(c);
var k=new Za(I(this.Zi),"INSERT_BEFORE");this.ra("render in updateRepeated");k.Qe();this.nd(k,null,true);k.Nd()}};z.prototype.fk=function(a,b,c){this.Ke(c);var d=this.Bh();if(d){this.qn(d)}};z.prototype.Mb=function(){return true};z.prototype.b=function(a){if(a=="$Context"){var b=this.Ef(this.I),c=o(b);if(c.D()){var d=c.D().m()}else if(this.I){d=this.I[this.I.length-1]}if(c&&c.qa()){var e=c.qa().D(),f=e.g().e()-1,g=e.g().indexOf(d)}if(b!=""){b=b+"/"}var h=this.I.length>0?"-"+this.I.join("-"):"",j=
this.ue?this.ue.Dq:"",k=new B({"@dataName":d,"@cid":h,"@vid":j,"@dataPath":b,"@last":f,"@index":g},"Context");return k}else if(a=="$View"){return this.ue.sq}else if(a.indexOf("$")==0){return q().b(a)}else{return this.mc?this.mc.b(a):null}};z.prototype.d=function(a){if(a=="$Context"){return new B({},"Context")}else if(a.indexOf("$")==0){return q().d(a)}else{return this.mc?this.mc.d(a):""}};z.prototype.g=function(a){return this.mc?this.mc.g(a):new La};z.prototype.Rd=function(){return this};var Vd=function(a,
b){this.Sq=a;this.Mo=Ud(a,b);this.Ia=this.Mo.S()};Vd.prototype.Be=function(a,b){a.chars(Fm(this.Mo.h(b)))};Vd.prototype.S=function(){return this.Ia};Vd.prototype.Mb=function(){return false};var kf=function(a,b,c,d){z.call(this,a,b,this,d);this.sq=c;this.Dq=Zl++;this.te=false};kf.inherits(z);var Zl=0,ef=function(a,b,c,d){z.call(this,a,b,c,d)};ef.inherits(z);ef.prototype.nd=function(a){var b="span";this.Pe(a,b,this.Sc());var c=this.dc.text.h(this);if(c){c=c.replace("\n\r","\n");var d=c.split(/[\n\r]/);
for(var e=0;e<d.length;e++){var f=d[e];if(e>0){a.sd("br",[]);a.Qc("br")}a.chars(f)}}this.Md(a,b)};var w=function(){this.pb=oa().Wc().toString();this.Bq=false;this.xq=false;this.Vk=null;this.qe=500;this.gh=false;this.rq=false;this.Zm=0;this.fq=50;this.dq=[];this.Cq=!sa(this.pb.toString(),"http");this.lg=new hf;this.Pq=new Rd;this.C=new fd;B.call(this,this.C,"Contacts");q().$(this);this.qp={};var a=new B(this.qp,"ContactData");q().$(a);this.vk()};w.inherits(B);var Xe=null,hb=function(){if(!Xe){Xe=new w}return Xe};w.prototype.bl=function(a){return this.g().get(a)};w.prototype.pg=function(a){this.qe=
a};w.prototype.g=function(a){if(!a||a=="*"){return this.C}else if(a.indexOf("*")==-1){var b=this.b(a);if(b){return new P([b])}else{return new La}}else{throw new Error("Selector not supported yet ("+a+")");}};w.prototype.d=function(a){var b=this.C.get(a);return b==null?null:b.get()};w.prototype.R=function(){return true};w.prototype.cl=function(a,b,c){var d=new r(this.pb+"/data/contacts"),e=d.Yd();e.set("thumb",this.Bq);e.set("groups",this.xq);if(this.Vk){e.set("show",this.Vk);e.set("enums","true")}e.set("psort",
"Name");e.set("max",a||this.qe);e.set("out","js");e.set("rf",this.dq.join(","));if(b){e.set("tok",b);if(this.Uj){e.set("cl","false")}if(this.gh){e.set("cd","true")}}if(c){e.set("ud","false")}return d};w.prototype.Bo=function(){if(!this.Lp){var a=q();new pb("Groups","$ContactReq/Body/Groups","$ContactReq/Body/Groups");new pb("Enums","$ContactReq/Body/Enums","$ContactReq");new pb("AuthToken","$ContactReq/Body/AuthToken","$ContactReq");new pb("ExtraData","$ContactReq/Body/ExtraData","$ContactReq");a.Tj("$UserData",
"$ContactReq/Body/UserData");this.Xc="$Groups";this.We=o("$AuthToken/Value");this.ce=o(this.Xc);a.O(v(this.Bk,this),"$ContactReq");a.O(v(this.Vm,this),"$ContactAppend");a.O(v(this.Hl,this),this.Xc);var b=this,c=Mc();c.F("ADD_SELECTED_CONTACTS_TO_GROUP",function(d){b.Rj(d.groupId)});c.F("ADD_EMAIL",function(){b.Jc(b.Pa(),"Emails","HOME")});c.F("REMOVE_EMAIL",function(d){b.md(b.Pa(),"Emails",d.dataName)});c.F("ADD_PHONE",function(){b.Jc(b.Pa(),"Phones","HOME")});c.F("REMOVE_PHONE",function(d){b.md(b.Pa(),
"Phones",d.dataName)});c.F("ADD_IM",function(){b.Jc(b.Pa(),"Ims")});c.F("REMOVE_IM",function(d){b.md(b.Pa(),"Ims",d.dataName)});c.F("ADD_ADDRESS",function(){b.Jc(b.Pa(),"Addresses","HOME")});c.F("REMOVE_ADDRESS",function(d){b.md(b.Pa(),"Addresses",d.dataName)});c.F("ADD_OTHER",function(){b.Jc(b.Pa(),"Others","HOME")});c.F("REMOVE_OTHER",function(d){b.md(b.Pa(),"Others",d.dataName)});c.F("PICTURE_ERROR",this.Tl.bind(this));this.Lp=true}};w.prototype.Zk=function(){if(!this.bk){var a=new r(o("$UserData/PhotoUrl").h()),
b=new r(window.location);a.rd(b.Lf());this.bk=a.toString()}return this.bk};w.prototype.Tl=function(a){var b=o("$Contacts/"+a.contactId).D();if(b){b.qo();var c=q();c.k("$Contacts/"+a.contactId+"/MaybeHasPicture")}};w.prototype.load=function(a,b,c){this.Bo();var d=a||1,e=d==4,f=d==3,g=c&&this.gh;if((f||e)&&this.Uj&&!g)return;if(!this.yp||d!=1){var h=e?"ContactAppend":"ContactReq";if(e){Ya("$ContactData/PendingLongRequest",true)}else{Ya("$ContactData/Loading",true)}var j=q(),k=this.cl(b,c,e);if(this.Cq){k.r("jsx",
"true");this.$i=new zb(k,h,"&&&START&&&","&&&END&&&")}else{this.$i=new Yb(k,h)}j.$(this.$i,true);this.$i.load();this.yp=true}};w.prototype.Bk=function(a){q().Xn(v(this.ym,this,a));var b=Ze("$ExtraData/NavLinks",true);if(I("additional-nav-links")&&b){I("additional-nav-links").innerHTML=b.get();var c=Ze("$ExtraData/BlInfo",true);I("additional-nav-links").title=c.get()}this.gh=this.rq&&o("$UserData/ShowDomainContacts").h();Ya("$ContactData/Loading",false);var d=o("$ContactReq/Body").D();if(d){d.o("Contacts",
null)}Q.info("About to fire data change");q().k("$Contacts");q().k("$Groups");q().k("$SelectedContactCount");Q.info("Done firing data change");Ya("$ContactData/Loaded",true)};w.prototype.Vm=function(a){var b=o("$ContactAppend/Body/Contacts").h();Q.info("Starting adding additional contacts");if(b){this.C=this.Pm(this.C,b)}Q.info("Ending adding additional contacts");q().k("$Contacts");Ya("$ContactData/PendingLongRequest",false)};w.prototype.ym=function(a){this.C.clear();Q.info("Starting contact add");
var b=o("$ContactReq/Body/Contacts").h()||[];Q.info("Starting contact updates");for(var c=0,d=b.length;c<d;c++){this.Mj(b[c])}Q.info("Ended contact add");this.Uj=b.length==Hl("$Groups/^All/Count");this.ui(a);if(this.Dd){this.xe(this.Dd,"^Temp")}};w.prototype.ui=function(a){var b=o(a+"/Body/Groups").D(),c=b?b.Oa():[],d=gb(c,"$Groups");q().$(d)};w.prototype.Hl=function(){Q.info("Starting groupsChanged");this.Lq=true;this.be={};var a=this.ce.D().g();for(var b=0;b<a.e();b++){var c=a.n(b);this.be[c.d("id")]=
c}this.Xj();Q.info("Ending groupsChanged")};w.prototype.Xj=function(){var a=this.C.e();for(var b=0;b<a;b++){var c=this.C.n(b);this.Wj(c)}};w.prototype.Wj=function(a){var b=a.b("Groups",true).g();for(var c=0;c<b.e();c++){var d=b.n(c);if(d.get()&&d.g().e()>0){var e=this.be[d.d("id")];if(e){var f=d.b("ref");if(f&&f.d("Name")!=d.d("Name")){d.g().rb("ref",null);f=null}if(!f||!f.get()){d.g().add(bd(e,"ref"))}}}}};w.prototype.Mj=function(a){this.C.update(new ba(a,this))};w.prototype.ud=function(a){var b=
a.Oa?a.Oa():(a.i?a.i:a),c=new ba(b,this),d=b.id,e=false,f=false,g=null,h=this.C.get(d);if(h){f=this.yb(h,"^Freq");e=this.yb(h,"^Temp");if(e){this.Fe(h,false)}g=h.d("RosterState")}var j=this.C.e();this.C.update(c);if(e){this.Fe(c,true)}if(f){this.jj(c,"^Freq",true)}if(g){a.o("RosterState",g)}if(h){if(d==o("$CurrentContactId").h()){u.setTimeout(function(){q().k("$CurrentContact")},5)}}q().k(c.u());if(this.C.e()!=j){q().k("$Contacts/count()")}return c};w.prototype.yi=function(a){if(a){var b=a.Na(),c=
a.Ch().join(","),d=a.wa();Mc().fireEvent("CONTACT_CHANGED","id",b,"emails",c,"name",d)}else{Mc().fireEvent("CONTACT_CHANGED")}};w.prototype.bn=function(){Mc().fireEvent("GROUP_CHANGED")};w.prototype.tb=function(a){this.Zm++;var b=String(-this.Zm);a.o("Id",b);a=this.ud(a);return a};w.prototype.vk=function(a){var b={},c=new B(b,"$TempGroup");q().$(c)};w.prototype.Yn=function(a,b,c){var d=new D,e=Ld({out:"js",tok:this.We.D().get(),cid:a,photo:b,crop:c,action:"SET"});p(d,jb,this.Ki,false,this);d.send(this.pb+
"/update/photos","POST",e)};w.prototype.gk=function(a){var b=new D,c=Ld({out:"js",tok:this.We.D().get(),cid:a,action:"SET_EVERGREEN"});p(b,jb,this.Ki,false,this);b.send(this.pb+"/update/photos","POST",c)};w.prototype.Dk=function(a){var b=new D,c=Ld({out:"js",tok:this.We.D().get(),cid:a,action:"DELETE"});p(b,jb,this.on,false,this);b.send(this.pb+"/update/photos","POST",c)};var Ye=function(a){var b=a.indexOf("&&&START&&&")+"&&&START&&&".length,c=a.lastIndexOf("&&&END&&&");return Jh(a.substring(b,c))};
w.prototype.Bd=function(){Qd()};w.prototype.Ki=function(a){var b=a.target,c=null;if(b.Sb()){c=Ye(b.sc())}if(c&&c.Success){Qa().add(ra("PICTURE_ADD_SUCCESS"),"INFO");this.xj(c.Body.Contact);if(c.Body.CanSuggest){oa().fj("photopicker.PhotoPicker",{type:"SHOW_SUGGEST",imageUrl:c.Body.Contact.Picture})}else{this.Bd()}}else{Qa().add(ra("PICTURE_ADD_ERROR"),Pb);this.Bd()}};w.prototype.on=function(a){var b=a.target,c=null;if(b.Sb()){c=Ye(b.sc())}if(c&&c.Success){this.xj(c.Body.Contact);Qa().add(ra("PICTURE_DELETE_SUCCESS"),
"INFO")}else{Qa().add(ra("PICTURE_DELETE_ERROR"),Pb)}this.Bd()};w.prototype.xj=function(a){var b=this.C.get(a.Id);if(b){b.o("Picture",a.Picture);b.Ri();var c=q();c.k("$CurrentContact/Picture");c.k("$CurrentContact/ForcedPicture");c.k("$CurrentContact/MaybeHasPicture")}};w.prototype.fo=function(a,b){var c=new D,d=Ld({out:"js",tok:this.We.D().get(),cid:a,msg:b,action:"SUGGEST"});p(c,jb,this.pn,false,this);c.send(this.pb+"/update/photos","POST",d)};w.prototype.pn=function(a){var b=a.target,c=null;if(b.Sb()){c=
Ye(b.sc())}if(c&&c.Success){Qa().add(ra("PICTURE_SUGGEST_SUCCESS"),"INFO")}else{Qa().add(ra("PICTURE_SUGGEST_ERROR"),Pb)}this.Bd()};var Ld=function(a){var b=new S;for(var c in a){b.add(c,a[c])}return b.toString()};w.prototype.Sg=function(a){this.C.removeNode(a);this.lg.o(a,null)};w.prototype.Rj=function(a){if(a){var b=this.ml(a),c=new gc(this,b,"ADD");c.send()}};w.prototype.ml=function(a){return o(this.Xc+"/"+a+"/Name").h()};w.prototype.yb=function(a,b){var c=a.b("Groups",true).b(b);return c!=null&&
c.d("id")!=null};w.prototype.jj=function(a,b,c){var d=this.yb(a,b);if(c&&!d){var e=a.b("Groups",true).b(b,true);e.o("value",a.na());e.o("id",b)}else if(!c&&d){a.b("Groups",true).o(b,null)}};w.prototype.Fe=function(a,b){a.o("SelectedCount",this.fq++);var c=a.m(),d=b!=null?b:!this.yb(a,"^Temp");this.jj(a,"^Temp",d);a.Fk();var e=!(!this.lg.b(c));if(d!=e){var f=d?bd(a,c):null;this.lg.o(c,f);Ya("$SelectedContactCount",this.lg.g().e())}};w.prototype.xe=function(a,b){var c={},d=this.g(),e=d.e();for(var f=
0;f<e;f++){var g=d.n(f);c[g.na()]=g}var h=a.split(/[;,]/);for(var f=0;f<h.length;f++){var j=h[f],k=null,l=null,n=j.indexOf("<");if(n==-1){k=Ia(j)}else{l=Ia(j.substring(0,n));k=Ia(j.substring(n+1,j.indexOf(">",n)))}if(k.length>0){var g=c[k];if(!g){var m={Emails:[{Address:k}]},y=gb(m,k);g=this.tb(y)}this.Fe(g,true)}}if(this.jp){this.Pd(-1,"");this.ye("")}};w.prototype.ye=function(a){this.Dd=a};w.prototype.Pd=function(a,b){var c=this.g().e(),d=false,e="";for(var f=0;f<c;f++){var g=this.g().n(f);if(this.yb(g,
a)){var h=g.d("Name"),j=g.na(),k=h&&b=="FULL"?h+" <"+j+">":j;if(d){e=e+", "}e=e+k;d=true}}return e};w.prototype.Jc=function(a,b,c){var d=String(Jl++),e=a.b(b);if(!e){e=gb([],b,a);a.o(b,e)}var f=gb({id:d},d,e);e.o(d,f);if(c){f.b("Type",true).o("Id",c)}};w.prototype.md=function(a,b,c){a.b(b,true).o(c,null)};w.prototype.Pa=function(){return o("$TempContact").D()};w.prototype.Pm=function(a,b){var c={},d=a.Sa;for(var e=0,f=d.length;e<f;++e){var g=d[e].Ch();if(g){for(var h=0;h<g.length;++h){c[g[h]]=d[e]}}}var j=
[];for(var e=0,f=b.length;e<f;++e){var g=b[e].Emails,k=null;if(g){for(var h=0;h<g.length;++h){var l=g[h].Address;if(c[l]){k=c[l];break}}}if(k){if(!k.wa()&&b[e].Name){k.o("Name",b[e].Name)}}else{var n=new ba(b[e],this);j.push(n);if(g){for(var h=0;h<g.length;++h){var l=g[h].Address;c[l]=n}}}}var m=this.Om(d,j),y=new fd;for(var e=0;e<m.length;++e){y.update(m[e])}return y};w.prototype.Om=function(a,b){var c=[],d=0;for(var e=0;e<a.length;e++){var f=a[e];while(d<b.length&&zl(f,b[d])>0){c.push(b[d++])}c.push(f)}while(d<
b.length){c.push(b[d++])}return c};var hf=function(){B.call(this,{},"$SelectedContacts");q().$(this);var a=new B(0,"SelectedContactCount");q().$(a)};hf.inherits(B);hf.prototype.R=function(){return true};var Rd=function(){B.call(this,{},"SelectedGroup");var a=q();a.$(this);a.O(this.Yo.bind(this),"$CurrentGroup/id");this.ae=null};Rd.inherits(B);Rd.prototype.R=function(){return true};Rd.prototype.Yo=function(){var a=o("$CurrentGroup/id").h()||"^Temp";if(this.ae!=a){this.M=new P;var b=hb(),c=b.g();for(var d=
0;d<c.e();d++){var e=c.n(d),f=e.d("id");if(b.yb(e,a)){this.o(f,bd(e,f))}}this.ae=a;q().k("$SelectedGroup")}};var fd=function(){P.call(this)};fd.inherits(P);fd.prototype.update=function(a){var b=a.d("Id"),c=this.l[b];if(c){this.l[b]=a;for(var d=0;d<this.Sa.length;d++){if(this.Sa[d].d("Id")==b){this.Sa[d]=a}}}else{this.add(a)}};fd.prototype.clear=function(){P.call(this)};var ba=function(a,b,c){var d=a.Id,e=c||d;a.id=d;if(a.Groups==null){a.Groups=[]}T.call(this,a,e,b)};ba.inherits(T);ba.prototype.d=
function(a){if(a=="UserGroupCount"){return this.Rh().g().e()}else{this.ai(a);return ba.U.d.call(this,a)}};ba.prototype.b=function(a,b){if(a=="UserGroups"){return this.Rh()}else{this.ai(a);return ba.U.b.call(this,a,b)}};ba.prototype.Rh=function(){var a=new B({},"UserGroups",this),b=this.b("Groups",true).g();for(var c=0;c<b.e();c++){var d=b.n(c),e=d.d("id");if(!sa(e,"^")){a.g().add(bd(d,e))}}return a};ba.prototype.ai=function(a){if((a=="ForcedPicture"||a=="MaybeHasPicture")&&!this.__PictureInitialized){this.__PictureInitialized=
true;this.Ri()}};ba.prototype.Ri=function(){var a=this.Ih();if(a){this.o("ForcedPicture",a);this.o("MaybeHasPicture",true)}else{this.o("MaybeHasPicture",false)}};ba.prototype.qo=function(){this.o("MaybeHasPicture",false)};ba.prototype.Ih=function(a){var b=this.na();if(b){var c=hb().Zk()+encodeURIComponent(b)+"?rp=1&pld=1&";if(a){c+="t=e&"}c+=Math.floor(Math.random()*2000000);return c}else{return null}};ba.prototype.toString=function(){var a=this.wa(),b=this.na();return a&&b?a+" <"+b+">":a||b};ba.prototype.wa=
function(){return this.d("Name")};ba.prototype.na=function(){var a=this.b("Emails");if(a){var b=a.g();if(b&&b.e()>0){return b.n(0).d("Address")}}return null};ba.prototype.Na=function(){return this.d("Id")};ba.prototype.Ch=function(){var a=[],b=this.b("Emails");if(b){var c=b.g();for(var d=0,e=c.e();d<e;++d){a.push(c.n(d).d("Address"))}}return a};ba.prototype.fl=function(){return this.wa()||this.na()||""};ba.prototype.qm=function(a){return a=="^All"||this.b("Groups").b(a)!=null};ba.prototype.Fk=function(){var a=
this.b("Emails");if(a){var b=o("$UserData/AspDomain").h(),c=o("$UserData/Email").h();for(var d=0;d<a.e();d++){var e=a.n(d),f=e.d("Address");if(ha(f,"@gmail.com")||ha(f,"@googlemail.com")||b&&ha(f,"@"+b)){e.o("CanChat",true)}if(f==c){this.o("Me",true)}}}};var zl=function(a,b){var c=Al(a,b);if(c!=0){return c}var d=a.wa()||a.na()||"zz",e=b.wa()||b.na()||"zz",f=d.toLowerCase(),g=e.toLowerCase();if(f==g){return 0}else if(f<g){return-1}else{return 1}};var Al=function(a,b){var c=a.d("DomainContact")?1:0,
d=b.d("DomainContact")?-1:0;return c+d},ib=function(a,b,c){this.Cd=a;this.Lo=b;this.zf=c},Dl=0;ib.prototype.Cf=function(a){var b=new r(hb().pb+"/update/"+a),c=hb().We.D().get();b.r("token",c);b.r("tok",c);b.r("out","js");return b};ib.prototype.ib=function(){throw new Error("getUpdateUri not implemented in "+this);};ib.prototype.send=function(){if(this.zj&&!this.zj()){if(this.zf){this.zf()}return}Ya("$ContactData/PendingRequest",true);var a=Dl++;this.Tn="ContactUpdate"+a;this.da="$ContactUpdate"+a;
var b=this.ib(),c=new zb(b,this.Tn,"&&&START&&&","&&&END&&&",true);this.aq=v(this.Dn,this);var d=q();d.$(c,this.Tn);d.O(this.aq,this.da);c.load();this.En=false;u.setTimeout(v(this.Eo,this),1000)};ib.prototype.Eo=function(){if(!this.En){Ya("$ContactData/PendingLongRequest",true)}};ib.prototype.Dn=function(){this.En=true;Ya("$ContactData/PendingRequest",false);Ya("$ContactData/PendingLongRequest",false);var a=o(this.da+"/Success");if(a.h()){var b;if(this.yc){b=this.yc()}if(this.Lo){this.Lo(b)}var c=
o(this.da+"/Messages/*");if(c.pa().e()>0){var d=o(this.da+"/Messages/[0]/Text").h();Qa().add(d,"INFO")}}else{var e=o(this.da+"/TryLogin").h();if(e){alert(ra("INFO_LOGGED_OUT"));return}var f=o(this.da+"/Errors/*");if(f.pa().e()>0){var g=o(this.da+"/Errors/[0]/Message").h(),h=o(this.da+"/Errors/[0]/Text").h(),j=g||h;Qa().add(ra("SAVE_DATA_ERROR",{msg:j}),Pb)}else{Qa().add(ra("SAVE_DATA_UNKNOWN_ERROR"),Pb)}if(this.zf){this.zf()}}};var fc=function(a,b,c,d){this.kf=b;ib.call(this,a,c,d);this.Hp=!b.d("Id")};
fc.inherits(ib);fc.prototype.ib=function(){var a=this.kf,b=this.Cf("contact"),c=a.d("Id");if(c){b.r("id",c);b.r("action","SET")}else{b.r("action","ADD")}this.Lj(b);return b};fc.prototype.Lj=function(a){var b=this.kf,c=o("Addresses/*").pa(b);for(var d=0;d<c.e();d++){var e=c.n(d),f=e.d("Source");if(!f){f="STRUCTURED";e.o("Source",f)}if(f=="UNSTRUCTURED"){e.o("Unstructured",e.d("Street"))}}this.Fg(a,b,["Name","Title","Company","Notes"]);this.cc(a,b,"Emails",["Address","Type/Id","Type/Label"]);this.cc(a,
b,"Others",["Value","Type/Id","Type/Label"]);this.cc(a,b,"Phones",["Number","Type/Id","Type/Label"]);this.cc(a,b,"Ims",["Name","Service/Id","Type/Id","Type/Label"]);this.cc(a,b,"Addresses",["Street","City","Region","Postal","Type/Id","Type/Label","Source","Unstructured"]);this.cc(a,b,"Groups",["id","value"]);return a};fc.prototype.Fg=function(a,b,c,d){var e=d||"";for(var f=0;f<c.length;f++){var g=c[f],h=o(g).h(b);if(!h){h=""}else if(V(h)){h=Ia(h)}a.r((e+g).replace("/","."),h)}};fc.prototype.cc=function(a,
b,c,d){var e=o(c).D(b);if(e){for(var f=0;f<e.g().e();f++){var g=e.g().n(f);this.Fg(a,g,d,c+"."+String(f)+".")}}};fc.prototype.zj=function(){var a=true,b=this.kf.b("Emails").g(),c=0,d=false;for(var e=0;e<b.e();e++){var f=b.n(e).d("Address");if(f&&Ia(f)!=""){c++;if(e==0){d=true}}if(f&&!Gl.test(Ia(f))){Qa().add(ra("ASK_VALID_EMAIL"),Pb);a=false}}var g=this.kf.d("Name");if(c==0&&(!g||Ia(g)=="")){Qa().add(ra("ASK_NAME_OR_EMAIL"),Pb);a=false}else if(c>0&&!d){Qa().add(ra("ASK_PRIMARY_EMAIL"),Pb);a=false}return a};
fc.prototype.yc=function(){var a=o(this.da+"/Body/Groups/*").pa();if(a.e()>0){var b=new pb("Groups",this.da+"/Body/Groups",this.da+"/Body/Groups");b.Mf()}var c=o(this.da+"/Body/Contact").D(),d=this.Cd.ud(c);this.Cd.yi(d);if(this.Hp){q().k("$Contacts")}return d};var af=function(a,b,c,d){ib.call(this,a,c,d);this.Dp=V(b)?[b]:b};af.inherits(ib);af.prototype.ib=function(){var a=this.Cf("contact");a.Le("ids",this.Dp);a.r("action","DELETE");return a};af.prototype.yc=function(){var a=o(this.da+"/Body/Contact/*").pa();
for(var b=0;b<a.e();b++){var c=a.n(b);this.Cd.Sg(c.d("Id"))}q().k("$Contacts");var d=new pb("Groups",this.da+"/Body/Groups",this.da+"/Body/Groups");d.Mf();Qa().add("Contact has been deleted.","INFO");this.Cd.yi()};var gc=function(a,b,c,d,e,f){this.Cd=a;this.ip=c||"ADD";this.$m=d;this.ae=b;ib.call(this,a,e,f)};gc.inherits(ib);gc.prototype.Mh=function(a,b){var c=this.Cf("groups");c.r("action",this.ip);if(this.ae!=null){c.r("id",this.ae)}if(this.$m!=null){c.r("name",this.$m)}if(a.length>0){c.Le("contactIds",
a)}if(b.length>0){c.Le("newContacts",b)}return c};gc.prototype.ib=function(){var a=o("$Contacts/*").pa(),b=a.e(),c=[],d=[];this.bf={};for(var e=0;e<b;e++){var f=a.n(e);if(hb().yb(f,"^Temp")){var g=parseInt(f.d("Id")||"",10);if(!isNaN(g)&&g>=0){c.push(g)}else{var h=f.na();if(h){var j=f.wa()||"";d.push(h+":"+j);if(!isNaN(g)){this.bf[h]=Number(g)}}}}}return this.Mh(c,d)};gc.prototype.yc=function(){var a=hb(),b=o(this.da+"/Body/Contacts/*").pa();for(var c=0;c<b.e();c++){var d=b.n(c),e=false;if(this.bf){var f=
d.Emails||{},g=f[0]||{},h=g.Address;if(h){var j=this.bf[h];if(j){delete this.bf[h];var k=a.bl(j);if(k){e=k.qm("^Temp");a.Sg(j)}}}}var l=a.ud(d);if(e){a.Fe(l,true)}}q().k("$Contacts");a.ui(this.da);q().k("$Groups");a.bn()};var wh=function(a,b,c,d,e,f,g){gc.call(this,a,c,d,e,f,g);this.op=b};wh.inherits(gc);wh.prototype.ib=function(){return this.Mh(this.op,[])};var Il=function(a,b){if(b=="^Temp"){var c=0;for(var d=0;d<a.e();d++){var e=a.n(d);if(hb().yb(e,b)){c++}}return c}else{var f=o("$Groups/"+b).D();return f?f.d("Count"):0}},Gl=/^[a-z0-9_\.\-\+=%]+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,6})$/i;var Hl=function(a,b){return o(a).h(b)},Ya=function(a,b,c){var d=o(a);if(d.qa()){return d.qa().D(c,true).o(d.Ub,b)}else{d.D(c).set(b)}},Ze=function(a,b){return o(a).D(b)};var Fl=function(a,b){var c=V(a)?Ze(a):a;b=b||0;if(b>20)return"";var d="                 ",e="";e=e+
d.substring(0,b)+c.m()+":";var f=c.g(),g=c.get();if(f.e()==0&&(!g||!g.e)){e=e+g}else{e=e+"{\n";for(var h=0;h<f.e();h++){e=e+Fl(f.n(h),b+1)+"\n"}e=e+d.substring(0,b)+"}"}return e};var Jl=100;var $e=function(a,b){var c=false,d=a.b("Groups");if(d){var e=d.b(b);if(e){c=e.d("id")!=null}}return c},El=function(a,b){if(!$e(a,b)){var c=a.b("Groups");if(!c.get()){c.set([])}c.b(b).set({id:b})}};var Pa=function(a,b,c){this.C=new P;B.call(this,this.C,"Contacts");this.xn=a;this.wn=b;this.gq=new jf(this);var d=
q();d.$(this);d.$(this.gq);d.O(v(this.Jj,this,a),b);this.hq=0;new pb("AuthToken","$ContactReq/Body/AuthToken","$ContactReq");this.Kq=o("$AuthToken/Value");this.Xc="$Groups";this.ce=o(this.Xc);d.O(v(this.Fl,this),this.Xc);this.Tq=c};Pa.inherits(B);Pa.prototype.Jj=function(a,b){if(b==this.wn){Q.info("Starting contact add");var c=o(a+"/*"),d=c.pa(),e=d.e();for(var f=0;f<e;f++){var g=d.n(f);this.tb(g)}if(this.Dd){this.xe(this.Dd,"^Temp")}Q.info("About to fire data change");q().k("$Contacts");Q.info("Ended contact add")}};
Pa.prototype.Fl=function(){this.be={};var a=this.ce.D().g();for(var b=0;b<a.e();b++){var c=a.n(b);this.be[c.d("id")]=c}this.vm()};Pa.prototype.g=function(a){if(!a||a=="*"){return this.C}else if(a.indexOf("*")==-1){var b=this.b(a);if(b){return new P([b])}else{return new La}}else{throw new Error("Selector not supported yet ("+a+")");}};Pa.prototype.d=function(a){var b=this.C.get(a);return b==null?null:b.get()};Pa.prototype.tb=function(a){var b=a.na();a.i.id=b;a.qb(b);this.C.add(a);a.p=this;q().k(a.u());
return a};Pa.prototype.ud=function(a,b){var c=null,d=a.na();a.b("id").set(d);a.qb(d);var e=this.C.Sa,f=false;for(var g=0;g<e.length;g++){if(e[g].na()==d){a.b("SelectedCount").set(e[g].d("SelectedCount"));if($e(e[g],"^Temp")){El(a,"^Temp")}e[g]=a;c=e[g];f=true}}if(f){this.C.l.set(d,a);this.li(a);a.p=this;q().k(a.u());return c}else if(b){return this.tb(a)}};Pa.prototype.xe=function(a,b){var c=a.split(/[;,]/);for(var d=0;d<c.length;d++){var e=c[d],f=null,g=null,h=e.indexOf("<");if(h==-1){f=Ia(e)}else{g=
Ia(e.substring(0,h));f=Ia(e.substring(h+1,e.indexOf(">",h)))}if(f.length>0){var j;if(!this.C.get(f)){var k={Name:g,Email:f,id:f};j=new B(k,k.Email);this.tb(j)}else{j=this.C.get(f)}j.b("SelectedCount").set(this.hq++);if(b){j.b("Groups");var l=j.b("Groups");if(!l.get()){l.set([])}l.b(b).set(b)}}}if(this.jp){this.Pd(-1,"");this.ye("")}};Pa.prototype.ye=function(a){this.Dd=a};Pa.prototype.Pd=function(a,b){var c=this.C.e(),d=false,e="";for(var f=0;f<c;f++){var g=this.C.n(f);if($e(g,a)){var h=g.d("Name"),
j=g.na(),k=h&&b=="FULL"?h+" <"+j+">":j;if(d){e=e+", "}e=e+k;d=true}}return e};Pa.prototype.xl=function(){this.eo=new P;var a,b=this.C.e(),c=[],d=[];for(a=0;a<b;a++){var e=this.C.n(a),f=e.d("SelectedCount");if(f!=null){c[Number(f)]=e}else{d.push(e)}}b=c.length;for(a=0;a<b;a++){if(c[a]){this.eo.add(c[a])}}return this.eo};Pa.prototype.vm=function(){var a=this.C.e();for(var b=0;b<a;b++){var c=this.C.n(b);this.li(c)}};Pa.prototype.li=function(a){if(a.b("Groups").get()==null){a.b("Groups").set([])}var b=
a.b("Groups").g();for(var c=0;c<b.e();c++){var d=b.n(c);if(d.get()&&d.g().e()>0){var e=this.be[d.d("id")];if(e){var f=d.M.get("ref");if(!f){d.M.add(bd(e,"ref"))}}}}};var jf=function(a){this.np=a;B.call(this,null,"SelectedContacts")};jf.inherits(B);jf.prototype.g=function(a){if(!a||a=="*"){return this.np.xl()}else if(a.indexOf("*")==-1){var b=this.b(a);if(b){return new P([b])}else{return new La}}else{throw new Error("Selector not supported yet ("+a+")");}};var pb=function(a,b,c){B.call(this,null,a);
this.Ua=a;this.xn=b;this.wn=c;this.Ha=new P;this.i=[];this.Am=false;var d=q();d.$(this);d.O(v(this.Mf,this),c)};pb.inherits(B);pb.prototype.Mf=function(){if(!this.Am){var a=this.xn,b=o(a+"/*");this.Ha=b.pa();for(var c=0;c<this.Ha.e();c++){this.i.push(this.Ha.n(c))}q().k("$"+this.Ua);this.Am=true}};pb.prototype.g=function(a){if(!a||a=="*"){return this.Ha}else{throw new Error("Selector not supported yet ("+a+")");}};var cf=function(a,b,c,d,e){this.xb=true;this.ce=o(b+"/*");if(c){this.pp=o(c+"/*")}this.lq=
d;this.mq=e;this.kg=a;this.pq=this.kg.options.length;var f=q();f.O(v(this.Gl,this),b+"/...")};cf.prototype.Gl=function(){this.invalidate()};cf.prototype.render=function(){if(this.xb){var a=this.ce.pa(),b=this.pq,c=this.kg.value;for(var d=0;d<a.e();d++){var e=a.n(d),f=e.d("id");if(!sa(f,"^")||this.mq){var g=e.d("Name");if(this.lq){var h=Il(this.pp.pa(),f);g=g+" ("+h+")"}var j=Zc("option");j.value=f;j.text=g;this.kg.options[b++]=j}}this.kg.value=c;this.xb=false}};cf.prototype.invalidate=function(){if(!this.xb){u.setTimeout(v(this.render,
this),5)}this.xb=true};var id=function(){this.Rm=[];this.fd={};q().$(new B(this.fd,"LastMessage"))},qf;id.prototype.add=function(a,b){var c=a.length<150,d=new aa("NOTIFY_USER");d.message=a;d.level=b;var e=true;if(c){e=cg().kc(d)}if(e){this.Jk(a,b)}};id.prototype.Jk=function(a,b){var c=b||"INFO",d={Message:a,Level:c};this.Rm.push(d);this.fd.Message=a;this.fd.Level=c;q().k("$LastMessage")};id.prototype.clear=function(){var a=new aa("CLEAR_NOTIFICATIONS");if(cg().kc(a)){this.ik()}};id.prototype.ik=function(){var a=
{Message:null};this.Rm.push(a);this.fd.Message=null;this.fd.Level=null;q().$(new B(this.fd,"LastMessage"));q().k("$LastMessage")};var Qa=function(){if(qf==null){qf=new id}return qf},Pb="ERROR";var Yd=function(){};Yd.prototype.render=function(a,b){};Yd.prototype.S=function(){};Yd.prototype.Mb=function(){};var Hc=function(){};Hc.inherits(Yd);Hc.prototype.render=function(a,b){};Hc.prototype.S=function(){return[]};Hc.prototype.Mb=function(){return true};Hc.prototype.Be=function(a,b){};var Ic=function(){};Ic.prototype.sd=function(a,b){};Ic.prototype.Qc=function(a){};Ic.prototype.chars=function(a){};Ic.prototype.Qe=function(){};Ic.prototype.Nd=function(){};var Za=function(a,b){this.c=a;this.Hd=a.ownerDocument;this.mb=[];this.fe=false;this.sg=null;this.Ho=null;this.Ld=[];this.$f=0;this.Tm=b||"SET_CONTENT";this.sk=this.Tm!="SET_CONTENT";this.Rn=this.Tm=="REPLACE";if(this.sk){var c=Ol[a.nodeName]||"DIV";this.gm=Zc(c);this.ic=this.gm}else{this.ic=a}this.Ld.push(this.ic)};Za.inherits(Ic);var Ol={TR:"TABLE",TD:"TR",OPTION:"SELECT"},oh={},nh={},mh={},Pl={style:true,script:true},Nl={option:true,tr:true,td:true,tbody:true,thead:true},Ml={br:true,img:true};Za.prototype.sd=
function(a,b){var c,d;if(this.$f==0&&Nl[a]){var e=this.Hd.createElement(a),f=b.length;for(var g=0;g<f;g++){var h=b[g];if(h.name=="id"){c=h.value}else if(h.name=="g.oncreate"){d=h.value;continue}e.setAttribute(h.name,h.value)}if(c&&d){this.Gi.push({id:c,script:d})}this.Ld.push(e);this.ic.appendChild(e);this.ic=e;this.$o=true;return}this.$f++;if(Pl[a]){return this.zn(a,b)}var j=oh[a];if(!j){j="<"+a;oh[a]=j}var k=j;if(b!=null){var f=b.length;for(var g=0;g<f;g++){var h=b[g],l=h.name,n=h.value;if(l=="id"){c=
n}else if(l=="g.oncreate"){d=n;continue}var m=mh[l];if(m==null){m=" "+l+'="';mh[l]=m}k=k+m+Ta(n)+'"'}if(c&&d){this.Gi.push({id:c,script:d})}}k=k+">";this.mb.push(k)};Za.prototype.Qc=function(a){if(this.$f>0){this.$f--}else{if(this.ic.childNodes.length==0){this.ic.innerHTML=this.mb.join("")}this.mb=[];this.Ld.pop();this.ic=this.Ld[this.Ld.length-1];return}if(this.fe==true){this.fe=false;return}if(!Ml[a]){var b=nh[a];if(b==null){b="</"+a+">";nh[a]=b}this.mb.push(b)}if(this.mb.length>1000){var c=this.mb.join("");
this.mb=[c]}};Za.prototype.chars=function(a){if(this.fe==true){return this.Go(a)}this.mb.push(Ta(a))};Za.prototype.Qe=function(){this.mb=[];this.ao=[];this.Gi=[]};Za.prototype.Nd=function(){var a=this.mb.join("");if(this.sk){var b=this.gm;if(!this.$o){b.innerHTML=a}if(b.childNodes.length==1&&this.Rn){this.c.parentNode.replaceChild(b.childNodes[0],this.c)}else{if(this.c.parentNode.nodeName=="SELECT"){var c=this.c.parentNode.value}var d;while(d=b.childNodes[0]){this.c.parentNode.insertBefore(d,this.c)}if(this.Rn){this.c.parentNode.removeChild(this.c)}if(c!=
null){this.c.parentNode.value=c}}}else{if(!this.$o){this.c.innerHTML=a}}Aa(this.ao,function(e){eval(e)});Aa(this.Gi,function(e){var f=Lb(e.id);(new Function(e.script)).call(f)})};Za.prototype.zn=function(a,b){if(a=="style"){var c;for(var d=0;d<b.length;d++){if(b[d].name=="id")c=b[d].value}this.sg="style";this.Ho=c+"_ss";this.fe=true}else if(a=="script"){this.sg="script";this.fe=true}else{throw Error("No handler for "+a);}};Za.prototype.Go=function(a){if(this.sg=="style"){this.Sj(this.Ho,a)}else if(this.sg==
"script"){this.ao.push(a)}};Za.prototype.uk=function(a){var b=null,c=I(a);if(c==null){c=this.Hd.createElement("style");c.setAttribute("type","text/css");c.setAttribute("id",a);this.Hd.body.appendChild(c)}for(var d=0;d<this.Hd.styleSheets.length;d++){var e=this.Hd.styleSheets[d],f=e.owningElement;if(f==null){f=e.ownerNode}if(f.id==a){b=e}}return b};Za.prototype.Sj=function(a,b){if(I(a)){return}var c=this.uk(a),d=b.split("}");if(c.insertRule){for(var e=0;e<d.length;e++){if(d[e]!=""){c.insertRule(d[e]+
"}",0)}}}else if(c.cssText!=null){for(var e=0;e<d.length;e++){if(d[e]!=""){var f=d[e].split("{"),g=f[0],h=f[1],j=g.split(",");for(var k=0;k<j.length;k++){if(j[k]!=""){c.addRule(j[k],h)}}}}}};var Td=function(a,b){this.Da(a,b)},Ud=function(a,b){if(a.indexOf("{{")==-1||a.indexOf("function(")!=-1){return Sd(a)}else if(sa(a,"{{")&&ha(a,"}}")){var c=o(a.substring(2,a.length-2));if(b==1){c=new R(c.Lb());c.rm=true}c.S=function(){return[c]};return c}else{return new Td(a,b)}};Td.prototype.Da=function(a,b){this.ha=a;this.ga=[];this.Ia=[];if(this.ha.indexOf("{{")==-1){this.ga.push(Sd(this.ha))}else{var c=this.ha.split("{{");for(var d=0;d<c.length;d++){var e=c[d];if(e.length>0){var f=e.indexOf("}}");
if(f==-1){this.ga.push(Sd(e))}else{var g=e.substring(0,f),h;if(b==1){h=new R(g);h.rm=true}else{h=o(g)}this.ga.push(h);this.Ia.push(h);if(f<e.length-1){var j=e.substring(f+2);this.ga.push(Sd(j))}}}}}};Td.prototype.h=function(a){var b=this.ga.length,c=[];for(var d=0;d<b;d++){var e=this.ga[d].h(a);if(this.ga[d].rm){if(e==null){e="null"}else if(V(e)){e=Hm(e)}}c.push(e==null?"":e)}return c.join("")};Td.prototype.S=function(){return this.Ia};var rf=function(){var a={};Aa(fm,function(b){a[b]=true});this.Cp=a;this.Uq={};this.ap={};this.Ak={}},sf,em=function(){if(sf==null){sf=new rf}return sf};rf.prototype.wk=function(a,b,c,d,e){d=d||0;var f=a.nodeName;if(f=="#text"){return new Vd(a.nodeValue,e)}else if(f=="#comment"){return new Hc}else if(f=="MultilineText"){return new ef(a,b,c,d)}else if(this.Cp[f]){return new z(a,b,c,d)}else if(f=="View"){return new kf(a,b,null,d)}else if(this.ap[f]){return new kf(this.ap[f],b,this.tk(a),d)}else if(this.Ak[f]){return this.Ak[f](a,
b,c)}else{throw Error("No view exists matching name: "+f);}};rf.prototype.tk=function(a){var b={},c=a.attributes.length;for(var d=0;d<c;++d){var e=a.attributes[d];b["@"+e.nodeName]=e.nodeValue}return gb(b,"$View")};var fm=["p","div","b","i","br","ul","li","a","hr","span","img","table","tr","select","option","td","th","tbody","#text","h1","h2","h3","dl","dt","input","iframe","form","textarea","col","#comment","strike","button","script","style","thead","link","em"];var df="/ui/",ph=function(a){df=a};u.HtmlUtil_setServerBase=ph;var Bl=function(a){var b=new r(df+"ContactManager"),c=a||"THREE";b.r("style",c);b.r("js","RAW");b.r("pop","TRUE");return b},Cl=function(a,b){var c=b=="TWO"?502:750,d=new kc(0,0,c,500),e="toolbar=no,location=no,menubar=no,scrollbars=no,resizable=yes,status=no,width="+d.width+",height="+d.height+",top="+d.top+",left="+d.left,f=Bl(b).toString();window.open(f,"_manager",e)};cm("goog.focus.ContactManagerLauncher.popManager",Cl);var Fa=function(a,b){this.c=a;this.dp=b;this.Li=b.exists=="true";this.Od=[];this.$e(a);if(!this.Li){this.Wg("Add a picture",false,true)}};Fa.prototype.dispose=function(){for(var a=0;a<this.Od.length;a++){ob(this.Od[a])}if(this.Cb&&this.Cb.parentNode){this.Cb.parentNode.removeChild(this.Cb)}if(this.$a&&this.Cb.$a){this.$a.parentNode.removeChild(this.Cb)}};Fa.prototype.$e=function(a){this.Od.push(p(a,Ec,this.jn,false,this));this.Od.push(p(a,Id,this.hn,false,this));this.Od.push(p(a,wa,this.ln,false,
this))};Fa.prototype.cb=null;Fa.prototype.ee=null;Fa.prototype.jn=function(a){if(this.$a){this.Qg();return}this.$a=this.ok();if(this.Li){this.Wg("Change picture",true)}};Fa.prototype.ok=function(){var a=la(this.c);a.width-=Wd(this.c);a.height-=of(this.c);if(M){a.width+=4;a.height+=4}a.width+=2;a.height+=2;var b=Xb("div");this.$e(b);b.style.position="absolute";b.style.zIndex=20;mc(b,a);b.style.border="2px solid blue";var c=lc(this.c);c.x-=3;c.y-=3;b=this.c.parentNode.insertBefore(b,this.c);fe(b,c);
return b};Fa.prototype.Wg=function(a,b,c){if(!this.c.parentNode){return}var d=Xb("div");this.$e(d);var e=b?"background-color: white;":"";d.innerHTML='<div style="text-align: center; '+e+'font-family: Arial; font-size: 12px; padding: 2px"><a href="javascript:void(0)">'+a+"</a></div>";d.style.position="relative";d.style.zIndex=20;cl(d,this.c);var f=(this.c.offsetHeight+d.offsetHeight)/2;d.style.top="-"+f+"px";this.Cb=d;this.Gq=c};Fa.prototype.hn=function(a){if(this.$a){var b=a.relatedTarget;if(!b||
b!=this.c&&!Ke(this.$a,b)){this.Nf(true)}}};Fa.prototype.sl=function(a){var b={dn:a.fl()},c=a.Ih(true);if(c){b.eUrl=c}qh(b);return b};var qh=function(a){var b=o("$UserData/IsPicasaUser").h(),c=o("$UserData/Email").h(),d=b&&c&&(ha(c,"gmail.com")||ha(c,"googlemail.com"));a.userId=d?c.substring(0,c.indexOf("@")):null;a.urlEnabled=1;a.extraUploadParams="out=hjs";a.suppressHide="1"};Fa.prototype.ln=function(){this.Nf(false);var a=o("$Contacts/"+this.dp.contactid).D(),b=this.sl(a);oa().Jb("photopicker.PhotoPicker",
b,this.de.bind(this))};Fa.prototype.Nf=function(a){this.Qg();if(a){var b=v(this.Nf,this,false);this.ee=u.setTimeout(b,20);return}if(this.c&&this.$a){this.$a.parentNode.removeChild(this.$a);this.$a=null;if(this.Li){this.Cb.parentNode.removeChild(this.Cb);this.Cb=null}}};Fa.prototype.Qg=function(){if(this.ee){u.clearTimeout(this.ee);this.ee=null}};Fa.prototype.de=function(a){var b=this.dp.contactid,c=a.type;if(c=="PHOTO_PICKED"){if(a.evergreen){hb().gk(b)}else if(a.noPhoto){hb().Dk(b)}else{hb().Yn(b,
a.imageUrl,a.cropString)}}else if(c=="SUGGEST_DONE"&&a.suggestMessage){hb().fo(b,a.suggestMessage)}else{Qd()}};var Pd=function(){},rh,gd={};Pd.prototype.Na=function(){return"photopicker.PhotoPicker"};var Sl=function(){if(!rh){var a=new Pd;oa().Hn(a);rh=true}},Qd=function(){oa().dm("photopicker.PhotoPicker");oa().fj("photopicker.PhotoPicker",{type:"CLOSE_NO_REMOVE"});oa().Lk("photopicker.PhotoPicker");Mc().fireEvent("ENABLE_WINDOW")};Pd.prototype.attach=function(a,b){for(var c in gd){var d=gd[c];if(!d.c||!Ke(document,d.c)){d.dispose();delete gd[c]}}if(a&&!gd[a.id]){var e=new Fa(a,b);gd[a.id]=e}};Pd.prototype.Jb=
function(a,b){var c=new W(545,332);if(M){c.height-=16}var d=oa().qk(this.Na(),c,a,b);Mc().fireEvent("DISABLE_WINDOW")};var ff,gf,sh=function(a,b){var c=307,d;if(a){d=lc(a);var e=la(a);d.y+=e.height}else{d=new Cb(0,0)}var f=e.width>c?e.width:c,g=554,h=313,j=600;if(b){d.x+=b.screenX-b.clientX;d.y+=b.screenY-b.clientY}if(d.x+h>screen.width){d.x=screen.width-h}if(d.y+j>screen.height){d.y=screen.height-j}var k=new kc(d.x,d.y,f,g);return k},vh=function(a,b){var c=new r(df.replace(/ui\/?$/,""));Tl(c,a,b)},Tl=function(a,b,c,d){var e;if(b){b=I(b);var e=b.getAttribute("id")}else{e=null}var f;if(!ta&&b){f=Gd(mb(b))||window}else{f=
window}var g=sh(b,c),h="toolbar=no,location=no,menubar=no,scrollbars=no,resizable=yes,status=no,width="+g.width+",height="+g.height+",top="+g.top+",left="+g.left,j=th(a,e,d);f.open(j.toString(),"_picker",h)},th=function(a,b,c){var d=a.resolve(new r("ui/ContactPicker"));if(b){d.r("inputId",b)}if(c){if(c.serviceName){d.r("service",c.serviceName)}}return d},Ul=function(a,b,c){if(ff){uh()}var d=sh(a,null),e=th(a,c);window.iframeDone=uh;e.r("done","iframeDone");var f=I("picker-iframe-div");if(f==null){var f=
Xb("div",{id:"picker-iframe-div",style:"position: absolute; background-color; #FFF",zIndex:10});document.body.appendChild(f);f.innerHTML='<iframe id="picker-iframe" style="display:none; background-color; #FFF; border: 0"></iframe>'}var g=I("picker-iframe");g.style.display="block";fe(f,d.left,d.top);mc(g,d.width,d.height);g.src=e;gf=f;ff=g},uh=function(){Mb(gf);gf=null;ff=null};cc("goog.focus.PickerLauncher.popPicker",vh);cc("goog.focus.PickerLauncher.popIframe",Ul);var Ob=function(a,b,c,d,e,f){this.sp=b;this.Zp=c;this.pb=a;this.mp=d;this.jq=!(!e);this.No=f||""};Ob.prototype.um=function(){if(!o("$UserData").D()){var a=new D;p(a,jb,this.Kl,false,this);a.send(this.pb+"/gastatus?out=js","GET")}else{this.ii()}};Ob.prototype.Kl=function(a){var b=a.target;if(b.Sb()){var c=this.Ji(b.sc());if(c.Body){var d=c.Body.UserData,e=new T(d,"UserData");q().$(e)}}this.ii()};Ob.prototype.ii=function(){var a={};a.dn=this.sp;a.profileMode="1";a.eUrl=this.Zp;if(this.No){a.theme=this.No}qh(a);
oa().Jb("photopicker.PhotoPicker",a,this.de.bind(this))};Ob.prototype.de=function(a){if(a.type=="PHOTO_PICKED"){this.ho(a)}else{Qd()}};Ob.prototype.ho=function(a){var b=new S;b.add("out","js");b.add("cid","p");b.add("tok",a.tok);if(a.evergreen){return}else if(a.noPhoto){b.add("action","DELETE")}else{b.add("action","SET");b.add("crop",a.cropString);b.add("photo",a.imageUrl)}if(this.jq){b.add("p","true")}var c=new D;p(c,jb,this.Ul,false,this);c.send(this.pb+"/update/photos","POST",b.toString())};Ob.prototype.Ul=
function(a){Qd();var b=a.target,c=null;if(b.Sb()){c=this.Ji(b.sc())}var d={};if(c&&c.Success){d.success=true;if(c.Body){d.newUrl=c.Body.NewUrl;d.newUrlF=c.Body.NewUrlF}}else{d.success=false}this.mp(d)};Ob.prototype.Ji=function(a){var b=a.indexOf("&&&START&&&")+"&&&START&&&".length,c=a.lastIndexOf("&&&END&&&");return Jh(a.substring(b,c))};var Vl=function(a,b,c,d,e){Sl();var f=new Ob(oa().Wc(),a,b,c,d,e);f.um()};window.launchProfilePhotoPicker=Vl;var zk=this;if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,e;if(!a)a=zk;var f=b||[];for(var g=0;g<f.length;g++){c[g]="args["+g+"]"}e="oScope.__applyTemp__.peek()("+c.join(",")+");";if(!a.__applyTemp__){a.__applyTemp__=[]}a.__applyTemp__.push(this);d=eval(e);a.__applyTemp__.pop();return d}}if(!Array.prototype.push){Array.prototype.push=function(a){for(var b=0;b<arguments.length;b++){this[this.length]=arguments[b]}return this.length}}if(!Array.prototype.pop){Array.prototype.pop=
function(){if(!this.length){return}var a=this[this.length-1];this.length--;return a}}Array.prototype.peek=function(){return this[this.length-1]};if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length==0){return}var a=this[0];for(var b=0;b<this.length-1;b++){this[b]=this[b+1]}this.length--;return a}}if(!Array.prototype.unshift){Array.prototype.unshift=function(a){var b=arguments.length;for(var c=this.length-1;c>=0;c--){this[c+b]=this[c]}for(var d=0;d<b;d++){this[d]=arguments[d]}return this.length}}if(!Array.prototype.forEach){Array.prototype.forEach=
function(a,b){for(var c=0;c<this.length;c++){a.call(b,this[c],c,this)}}}function Ej(a,b,c){var d=a.Mg||[];d=d.concat(Array.prototype.slice.call(arguments,2));if(typeof a.df!="undefined"){b=a.df}if(typeof a.cf!="undefined"){a=a.cf}var e=function(){var f=d.concat(Array.prototype.slice.call(arguments));return a.apply(b,f)};e.Mg=d;e.df=b;e.cf=a;return e}Function.prototype.bind=function(a){return Ej.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.inherits=function(a){var b=
function(){};b.prototype=a.prototype;this.U=a.prototype;this.prototype=new b};Function.prototype.mixin=function(a){for(var b in a){this.prototype[b]=a[b]}if(typeof a.toString=="function"&&a.toString!=this.prototype.toString){this.prototype.toString=a.toString}};function gg(a){var b=a.match(/^(?:([^:\/?#]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/);if(!b){return null}return new qc(pc(b[1]),pc(b[2]),pc(b[3]),pc(b[4]),pc(b[5]),pc(b[6]),pc(b[7]))}function gp(a,b){if("string"==typeof a){return encodeURI(a).replace(b,hp)}return null}function hp(a){var b=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function qc(a,b,c,d,e,f,g){this.ya=a;this.yk=b;this.db=c;this.nb=d;this.Wa=
e;this.Ae=f;this.fb=g;this.ve=null}qc.prototype.toString=function(){var a=[];if(null!==this.ya){a.push(this.ya,":")}if(null!==this.db){a.push("//");if(null!==this.yk){a.push(this.yk,"@")}a.push(this.db);if(null!==this.nb){a.push(":",this.nb.toString())}}if(null!==this.Wa){a.push(this.Wa)}if(null!==this.Ae){a.push("?",this.Ae)}if(null!==this.fb){a.push("#",this.fb)}return a.join("")};qc.prototype.Hj=function(a){this.Wa=gp(a,/[\#\?]/g);return this};qc.prototype.Gj=function(a){this.ve=null;var b=[],
c="";for(var d=0;d<a.length;){var e=a[d++],f=a[d++];b.push(c,encodeURIComponent(e.toString()));c="&";if(f){b.push("=",encodeURIComponent(f.toString()))}}this.Ae=b.join("");return this};qc.prototype.Fj=function(){if(!this.ve){if(!this.Ae){this.ve=[]}else{var a=this.Ae.split(/[&\?]/),b=[];for(var c=0;c<a.length;++c){var d=a[c].match(/^([^=]*)(?:=(.*))?$/);b.push(Wi(d[1]),Wi(d[2]||""))}this.ve=b}}};qc.prototype.Xa=function(a,b){if(typeof b==="string"){b=[b]}this.Fj();var c=0,d=this.ve,e=[];for(var f=
0;f<d.length;f+=2){if(a===d[f]){if(c<b.length){e.push(a,b[c++])}}else{e.push(d[f],d[f+1])}}while(c<b.length){e.push(a,b[c++])}this.Gj(e);return this};function Wi(a){return decodeURIComponent(a).replace(/\+/g," ")}function pc(a){return"string"==typeof a&&a.length>0?a:null};var Tc=[];Tc.HIDE_TIMEOUT=100;Tc.SHOW_TIMEOUT=100;var se="menu-normalsb",zd="menu-shim";function nj(){var a;if(self.innerWidth){a=self.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){a=document.documentElement.clientWidth}else if(document.body){a=document.body.clientWidth}return a}function mj(a,b){var c=b.id;if(!c){c=a.currentTarget.id}var d=window.setTimeout(kg(c),Tc.HIDE_TIMEOUT),e=document.getElementById(c);e.VideoTabHideTimer=d}function lg(a){var b=document.getElementById(a);
if(b===null){return}if(b.bt!==null){b.bt.className=se}if(b.style===null){return}b.style.display="none";var c=document.getElementById(zd);if(c!==null&&c.style!==null){c.style.display="none"}}function sj(a){var b=document.getElementById(a);if(b==null){return}if(b.bt!=null){if(b.bt.className==se){b.bt.className="menu-selectsb"}else{b.bt.className=se}}if(b.style!==null){if(b.style.display=="none"){b.style.display="block";var c=document.getElementById(zd);if(c!==null){c.style.display="block"}}else{b.style.display=
"none";var c=document.getElementById(zd);if(c!==null&&c.style!==null){c.style.display="none"}}}}function oj(a){window.clearTimeout(a.VideoTabHideTimer);a.VideoTabHideTimer=null}function lj(a,b,c){var d=a.VideoTabPopupTimer;if(d!==null){window.clearTimeout(d);a.VideoTabPopupTimer=null}var e=window.setTimeout(kg(a.id),Tc.HIDE_TIMEOUT);a.VideoTabHideTimer=e}function rj(a,b,c){if(a.VideoTabHideTimer){window.clearTimeout(a.VideoTabHideTimer);a.VideoTabHideTimer=null}var d=window.setTimeout(jj(a.id),Tc.SHOW_TIMEOUT);
a.VideoTabPopupTimer=d;a.bt=b}function qj(a){if(a===null||a.style===null){return}var b=a.bt,c=Zi(b),d=$i(b)+b.offsetHeight-1,e=c.toString()+"px",f=d.toString()+"px",g=nj();a.style.position="absolute";a.style.left="-500px";a.style.top=f;a.style.zIndex="2000";a.style.display="block";var h=c+a.offsetWidth;if(h<=g-5){a.style.left=e}else{var j=g-5-a.offsetWidth;a.style.left=j.toString()+"px"}b.className="menu-selectsb";var k=document.getElementById(zd);if(k!==null&&k.style!==null){k.style.top=a.style.top;
k.style.left=a.style.left;k.style.width=a.offsetWidth.toString()+"px";k.style.height=a.offsetHeight.toString()+"px";k.style.zIndex="1999";k.style.backgroundColor="#ffffff";k.style.display="block"}}function pj(a){if(a===null){return}a.className="menu-menuitem-sel"}function kj(a){if(a===null){return}a.className="menu-menuitem"}function kg(a){if(!a){return}return function(){lg(a)}}function jj(a){if(!a){return}return function(){qj(document.getElementById(a))}};function dj(a,b){if(a=="goFullscreen"||a=="donePlaying"){if(this[a]){var c=eval("["+b+"]");this[a].apply(this,c)}}else if(a=="clickVideo"){Rj()}}function Rj(){var a=i("thumbflashpreview");if(!a||typeof a=="undefined"){return}var b=a.parentNode.parentNode.childNodes;Ro();for(var c=0;c<b.length;c++){if(b[c].nodeName=="A"){var d=b[c].href;if(d.indexOf("http://")==0){var e=b[c].target;if(e==""){e="_self"}window.open(d,e);return}}}}function Ho(a,b){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie=
a+"="+b+"; expires="+c.toGMTString()}function eg(a,b){var c=new Date,d=eb(VP_vpref),e="";c.setSeconds(c.getSeconds()+VP_vprefAge);if(d){var f=d.split(/\s*:\s*/);for(var g=0;g<f.length;g++){var h=f[g].split("=");if(a!=h[0]){e+=h[0]+"="+h[1]+":"}}}e+=a+"="+b;document.cookie=VP_vpref+"="+e+"; expires="+c.toGMTString()}function Pc(a,b,c,d){var e=a+"="+encodeURIComponent(b);if(c){e+="; domain="+c}if(d){e+="; path="+d}document.cookie=e}function oc(a,b,c,d){var e=new Date;e.setYear(e.getFullYear()+1);var f=
a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString();if(c){f+="; domain="+c}if(d){f+="; path="+d}document.cookie=f}function Mj(a,b){var c=new Date;c.setYear(c.getFullYear()-1);var d=a+"=0; expires="+c.toGMTString();if(b){d+="; domain="+b}document.cookie=d}function eb(a){var b=document.cookie.split(/\s*;\s*/),c=null;for(var d=0;d<b.length;d++){var e=b[d].split("="),f=b[d].indexOf("=");if(a==b[d].substring(0,f)){c=decodeURIComponent(b[d].substring(f+1,b[d].length));break}}return c}function Go(a,
b,c){for(var d=0;d<a.childNodes.length;d++){if(a.childNodes[d].nodeName==b){Io(a.childNodes[d],c)}}}function Ro(){var a=i("thumbflashpreview");if(a&&typeof a!="undefined"){var b=a.parentNode.parentNode;eo(a.parentNode);Go(b,"A",true)}}var pd=navigator.appVersion.indexOf("MSIE")!=-1?true:false,Uf=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,ri=navigator.userAgent.indexOf("Opera")!=-1?true:false;function ak(a){if(!a&&pd&&Uf)return;for(var b=25;b>0;b--){var c;if(pd&&Uf&&!ri){c=VBGetSwfVer(b)}else{c=
navigator.plugins["Shockwave Flash"].description.substring(16,19)}if(c==-1){ue();return false}else if(c!=0){var d;if(pd&&Uf&&!ri){var e=c.split(" "),f=e[1];d=f.split(",")}else{d=c.split(".")}var g=d[0];if(g<7){ue();return false}else{return true}}}ue();return false}function ue(){if(confirm("You need Flash 7 or higher to watch videos.")){window.location="http://www.macromedia.com/go/getflashplayer"}}function i(a){if(document.getElementById&&document.getElementById(a)){return document.getElementById(a)}else if(document.all&&
document.all(a)){return document.all(a)}else if(document.layers&&document.layers[a]){return document.layers[a]}else{return false}}function s(a){a.style.display="none"}function t(a){a.style.display=""}function ap(a,b){sc=i(a);Si(sc,b)}function Si(a,b){var c=function(){s(a)};window.setTimeout(c,b)}function Io(a,b){if(b){t(a)}else{s(a)}}function dp(a){var b=i(a);if(!b){return true}else if(ug(b,"display","display")=="block"||ug(b,"display","display")=="inline"){b.className="invisible"}else{b.className=
"visible"}}function ug(a,b,c){if(a.currentStyle){return a.currentStyle[b]}else if(window.getComputedStyle){var d=window.getComputedStyle(a,"");return d.getPropertyValue(c)}}function eo(a){a.parentNode.removeChild(a)}function je(a){a=encodeURIComponent(a);var b=/(%20)+/g;return a.replace(b,"+")}function Tj(a){var b=a.options[a.selectedIndex].value;if(b)document.location.href=b}function Zn(a,b,c){var d=eb(b);if(d==null){d=a}else{var e=d.split(":");for(var f=0;f<e.length;++f){if(e[f]==a){return}}d=d+
":"+a}oc(b,d,c)}function tk(){var a,b=null;try{a=new ActiveXObject("Msxml2.XMLHTTP");b="Msxml2.XMLHTTP"}catch(c){a=false}if(!a){try{a=new ActiveXObject(b="Microsoft.XMLHTTP");b="Microsoft.XMLHTTP"}catch(c){a=false}}if(!a&&typeof XMLHttpRequest!="undefined"){try{a=new XMLHttpRequest}catch(c){a=false}}return b}var pi=tk();function Kj(){var a;if(pi){a=new ActiveXObject(pi)}else{a=new XMLHttpRequest}return a}function O(a,b,c,d,e){var f=Kj(),g="GET";if(c){g="POST";if(!e){e="application/x-www-form-urlencoded"}}f.open(g,
a,true);if(c&&e){f.setRequestHeader("Content-Type",e)}f.onreadystatechange=function(){if(f.readyState==4&&b!=null){b(f,f.status&&f.status==200,a,c,d);f.onreadystatechange=function(){}}};f.send(c)}function Hb(){var a;if(document.implementation&&document.implementation.createDocument){a=document.implementation.createDocument("","",null)}else if(window.ActiveXObject){var b;try{a=new ActiveXObject("Msxml2.DOMDocument.3.0")}catch(c){b=c.message;try{a=new ActiveXObject("MSXML2.DOMDocument")}catch(c){b=
c.message;try{a=new ActiveXObject("MSXML.DOMDocument")}catch(c){b=c.message}}}var d=a.createProcessingInstruction("xml","version='1.0' encoding='UTF-8'");a.appendChild(d)}else{throw"Browser is unable to create XML document: not supported bythis browser";}return a}function C(a,b,c,d){var e=a.createElement(c);if(d){e.appendChild(a.createTextNode(d))}b.appendChild(e);return e}function J(a,b){var c=a.getElementsByTagName(b);if(!c||c.length==0){return null}c=c[0].childNodes;if(!c||c.length==0){return null}return c[0].nodeValue}
var ng;function xk(){if(!eb("PREF")){var a=document.location.toString(),b=a.match(/https?:\/\/[\w\.\-]*(\.google(\.\w{2,5}){1,2})(:\d{1,5})?\/?/i);if(b){a="http://www"+b[1]+"/gen_204";ng=new Image;ng.src=a}}}function Ko(a,b){if(a.value.length>b){a.value=a.value.substring(0,b)}};function sc(a){return document.getElementById(a)}function ke(a){return Math.floor(a)+"px"}function Zi(a){var b=0;while(a){b+=a.offsetLeft;a=a.offsetParent}return b}function $i(a){var b=0;while(a){b+=a.offsetTop;a=a.offsetParent}return b}function hg(a,b){if(b){this.coord=[a.offsetLeft,a.offsetTop+1,a.offsetWidth-2,a.offsetHeight-2]}else{this.coord=[Zi(a),$i(a),a.offsetWidth,a.offsetHeight]}};hg.prototype.add=function(a){for(var b=0;b<this.coord.length;++b){this.coord[b]+=a[b]}};hg.prototype.apply=
function(a){a.style.left=ke(this.coord[0]);a.style.top=ke(this.coord[1]);a.style.width=ke(this.coord[2]);a.style.height=ke(this.coord[3])};function _handleShowAlertPanelClick(){if(nc("addalert")){od("addalert");i("zip").src="common/plus_sm.gif"}else{ne("addalert");i("zip").src="common/minus_sm.gif"}}function _sendCreateAlertRequest(a,b){i("msg-create-alert-status").innerHTML=MSG_CREATING_ALERT;ne("msg-create-alert-status");yg(i("createalertbutton"));od("msg-alert-create-bad-email");od("msg-alert-created");O(a,an,b)}function an(a,b,c,d,e){if(a.readyState==4){var f=a.responseText;if(f=="alertCreated"){od("msg-create-alert-status");ne("msg-alert-created");
i("email").value=""}else if(f=="alertCreatedUnverified"){i("msg-create-alert-status").innerHTML=MSG_CREATE_ALERT_UNVERIFIED;i("email").value=""}else if(f=="alertCreateBadEmail"){od("msg-create-alert-status");ne("msg-alert-create-bad-email")}else{i("msg-create-alert-status").innerHTML=MSG_CREATE_ALERT_ERROR}Bg(i("createalertbutton"))}}function ne(a){i(a).style.display=""}function od(a){i(a).style.display="none"};function Vn(a,b,c,d){var e=i("tag_error");if(!c||i("taginput").value==MSG_ADD_LABEL){vd(MSG_ERROR_TAG_MISSING,null);return}if(c.length>50){vd(MSG_ERROR_TAG_TOO_LONG,null);return}c=c.replace(/(^\s+)|(\s+$)/g,"");if(c!==""){me(MSG_ANNOTATION_SAVING,null);i("taginput").tagUploadState="uploading";pe(a,b,c,null,null,d)}else{i("taginput").value=""}}function pe(a,b,c,d,e,f){var g=Hb(),h=C(g,g,"tags");C(g,h,"docid",b);if(c){C(g,h,"name",c);C(g,h,"token",f);if(d){C(g,h,"mark",d);if(e){C(g,h,"id",e)}}}O(a+
"?frame=label"+VP_langParam,qn,g,null,'text/xml; charset="UTF-8"')}var Ri;function Oi(a,b,c){var d=i("tag_error");d.innerHTML=a;d.style.display="";window.clearTimeout(Ri);if(b!==null){Ri=setTimeout(vg,b)}if(!c||c=="info"){d.className="ratingsInfo"}else{d.className="ratingsError"}}function vd(a,b){Oi(a,b,"error")}function me(a,b){Oi(a,b,"info")}function Zf(a){a.innerHTML=""}function qn(a,b,c,d,e){vg();var f=i("common_tags_short"),g=i("common_tags_all"),h=i("remove_tags"),j=i("remove_tags_links");if(!b||
!a.responseXML){vd(MSG_UNKNOWN_ERROR,null)}else{var k=a.responseXML.documentElement;if(k.tagName=="error"){var l=J(k,"errormessage");vd(l,null)}else if(k.tagName!="tags"){vd(MSG_UNKNOWN_ERROR,null)}else{Zf(f);Zf(g);Zf(h);var n=k.getElementsByTagName("common_tag"),m,y;if(n.length>0){var A=document.createTextNode(MSG_BROWSE+" ");g.appendChild(A);f.appendChild(A.cloneNode(false));j.style.display="inline"}else{j.style.display="none"}for(y=0;y<n.length;++y){m=n.item(y);var E=document.createTextNode(", ");
if(y!==0){g.appendChild(E);if(y<3){f.appendChild(E.cloneNode(false))}h.appendChild(E.cloneNode(false))}if(y<3){f.appendChild(xe(m,null))}g.appendChild(xe(m,null));h.appendChild(xe(m,"delete"))}if(n.length>3){var ua=document.createElement("A");ua.className="taglink";ua.href="javascript:void(0)";g.appendChild(E.cloneNode(false));var ca=ua.cloneNode(true);ca.onclick=function(){Uc("common_tags","false");rd()};ca.innerHTML="<b>&laquo;</b>";g.appendChild(ca);f.appendChild(E.cloneNode(false));var Y=ua.cloneNode(true);
Y.onclick=function(){Uc("common_tags","true");rd()};Y.innerHTML="<b>"+MSG_MORE_TAGS+"&nbsp;&raquo;</b>";f.appendChild(Y)}var db=i("taginput");if(db&&db.tagUploadState=="uploading"){me(MSG_ANNOTATION_SAVED,5000);db.value="";db.tagUploadState=null}else if(i("tag_error").tagUploadState=="removing"){me(MSG_REMOVED_TAG,5000);i("tag_error").tagUploadState=null}}}}function xe(a,b){var c=document.createElement("A"),d=J(a,"name"),e=J(a,"raw_name"),f=J(a,"short_name"),g=J(a,"tag_mode"),h=J(a,"id");if(!b||b===
null||b=="click"){c.className="taglink";c.title=d;if(g=="user_tag"){c.title+=" ("+MSG_YOUR_TAG+")";c.style.fontWeight="bold"}var j=e.replace(/"/g,'\\"'),k='label:"'+j+'"';c.href="/videosearch?q="+encodeURIComponent(k);c.innerHTML="<nobr>"+f+"</nobr>"}if(b=="delete"){c.className="removetaglink";c.title=MSG_REMOVE_TAG_TITLE+": "+d;if(g=="user_tag"){c.title+=" ("+MSG_YOUR_TAG+")";c.style.fontWeight="bold"}c.href="javascript:void(0);";c.onclick=function(){go(TAG_DISPLAY_URI,did,e,h,VP_annotationsToken);
c.className="striketaglink"};c.innerHTML="<nobr>"+f+"&nbsp;";c.innerHTML+="</nobr>"}return c}function go(a,b,c,d,e){var f=i("tag_error");me(MSG_REMOVED_TAG,null);f.tagUploadState="removing";if(VP_isOps){pe(a,b,c,"OPS",d,e)}else{pe(a,b,c,"SPAM",d,e)}}function Uc(a,b){var c=i(a+"_all"),d=i(a+"_short");if(!c||!d){return}if(b=="true"){c.style.display="inline";d.style.display="none";VP_showMoreTags=true}else{c.style.display="none";d.style.display="inline";VP_showMoreTags=false}}function vg(){i("tag_error").innerHTML=
""}function $o(a){if(!a){a=window.event}var b=a.keyCode||a.which;if(b==13&&i("taginput").value!=MSG_ADD_LABEL){i("taginputbutton").onclick()}};function Fj(){var a=i("site"),b=true;i("username").focus();if(VP_siteIndex>=0&&VP_siteIndex<a.length){a.selectedIndex=VP_siteIndex;if(VP_siteIndex!=VP_cookieSiteIndex){b=false}}if(VP_cookieRememberMe&&b){i("username").value=decodeURIComponent(VP_cookieUsername);a.selectedIndex=VP_cookieSiteIndex;i("password").focus()}i("rememberc").checked=VP_cookieRememberMe}function ui(){if(ip()){Co()}return false}function ip(){tn();var a=true;if(i("username").value==""){a=false;t(i("username-error"))}if(i("password").value==
""){a=false;t(i("password-error"))}if(i("site").selectedIndex<=0){a=false;t(i("site-error"))}if(!Xi("login-")){a=false}return a}function tn(){s(i("username-error"));s(i("password-error"));s(i("site-error"));ni("login-");s(i("login-error"))}function To(){if(jp()){Fo()}return false}function jp(){var a=true;if(i("title").value==""){a=false;t(i("title-error"))}else{s(i("title-error"))}if(!Xi("submit-")){a=false}return a}function Co(){zg(true);var a=i("site"),b="req=login&name="+encodeURIComponent(i("username").value)+
"&pass="+encodeURIComponent(i("password").value)+"&site="+encodeURIComponent(a.options[a.selectedIndex].value);b+=Hg("login-");O(Gg(),en,b);t(i("loginstatus"))}function Gg(){var a=VP_securedBlogpostUrl,b=window.location.search,c=b.indexOf("hl=");if(c>=0){var d=b.indexOf("&",c+2);if(d<0){d=b.length}a+="?"+b.substring(c,d)}return a}function zg(a){i("loginbutton").disabled=a;i("username").disabled=a;i("password").disabled=a;i("site").disabled=a;Nj("login-",a);i("loginbutton").disabled=a;i("rememberc").disabled=
a}function en(a){if(a.readyState==4){s(i("loginstatus"));zg(false);var b=a.responseText.split("\t");if(b[0]-0==0){if(!xi("login-",b)){i("password").value="";i("password").blur();i("password").focus();Dn(b[1])}}else{En(b)}}}function Dn(a){i("login-error").innerHTML=a;t(i("login-error"))}function En(a){So();VP_supportFlash=""+a[1];Tn(a);if(a[0]==1){Ai()}else{s(i("logintablediv"));s(i("bloggersdiv"));t(i("blogselect"))}}function So(){var a=i("site").selectedIndex;if(i("rememberc").checked){a="1"+a+i("username").value}else{a=
"0"+a}var b=new Date;b.setYear(b.getFullYear()+1);document.cookie=VP_blogpostCookieName+"="+encodeURIComponent(a)+"; domain="+VP_cookieDomain+"; expires="+b.toGMTString()}function Tn(a){var b=i("blog");for(var c=2;c<a.length;c++){var d=new Option(a[c],c-2);b.options[c-2]=d}b.selectedIndex=0}function Ai(){Uj();i("player-big").checked=true;i("autoplay").checked=false;s(i("blogselect"));s(i("logindiv"));t(i("submitdiv"));s(i("finisheddiv"))}function Uj(){var a;if(VP_supportFlash=="true"){vj();a=document.createElement("div");
a.innerHTML=VP_flashPath}else{wj();a=document.createElement("img");a.id="playerImg";a.src=VP_thumbnailPath;a.width="320";a.height="240"}var b=i("playerplaceholder");if(b&&!b.hasChildNodes()){b.appendChild(a)}}function wj(){i("playercell").style.height="250px";i("autoplaydisplay").style.display="none";i("playersizelabel").style.display="none";i("thumbsizelabel").style.display="inline"}function vj(){i("playercell").style.height="330px";i("autoplaydisplay").style.display="inline";i("playersizelabel").style.display=
"inline";i("thumbsizelabel").style.display="none"}function Fo(){i("submitbutton").disabled=true;var a=i("site"),b=i("blog"),c=b.selectedIndex;if(c<0){c=0}var d=150,e=i("title").value;if(e.length>d){e=e.substring(0,d)}var f="req=submit&docid="+encodeURIComponent(VP_docid)+"&name="+encodeURIComponent(i("username").value)+"&pass="+encodeURIComponent(i("password").value)+"&title="+encodeURIComponent(e)+"&descr="+encodeURIComponent(i("description").value)+Jg()+"&size="+encodeURIComponent(VP_playersize)+
"&site="+encodeURIComponent(a.options[a.selectedIndex].value)+"&auto="+encodeURIComponent(i("autoplay").checked)+"&blog="+encodeURIComponent(b.options[c].value);f+=Hg("submit-");O(Gg(),pn,f);t(i("submitstatus"))}function pn(a){if(a.readyState==4){var b=a.responseText.split("\t"),c;if(b[0]-0==0){if(xi("submit-",b)){i("submitbutton").disabled=false;s(i("submitstatus"));return}else{Uo();c=b[1]}}else{Wo();c='<a href="javascript:void(0)" onclick="window.open(&quot;'+b[1]+'&quot;, &quot;_blank&quot;);">'+
b[1]+"</a>"}i("messagediv").innerHTML=c;t(i("messagediv"));s(i("submitstatus"));i("submitbutton").disabled=false}}function Uo(){t(i("faildiv"));s(i("logindiv"));s(i("submitdiv"));t(i("finisheddiv"))}function Wo(){t(i("successdiv"));t(i("refreshmsgdiv"));s(i("logindiv"));s(i("submitdiv"));t(i("finisheddiv"))}function io(a){if(a==1){VP_playerwidth="300px";VP_playerheight="243px";VP_playersize="small"}else{VP_playerwidth="400px";VP_playerheight="326px";VP_playersize="big"}if(VP_supportFlash=="true"){var b=
i("VideoPlayback").style;b.width=VP_playerwidth;b.height=VP_playerheight}else{if(a==1){i("playerImg").width="160";i("playerImg").height="120"}else{i("playerImg").width="320";i("playerImg").height="240"}}}function Dj(){i("password").value="";t(i("logintablediv"));t(i("bloggersdiv"));s(i("blogselect"));sn("login-");ni("login-");Ki("login-",false,"","")}function Hj(a){if(!a){a=window.event}var b=a.keyCode||a.which;if(b==13){ui()}}function Oo(a){i(a+"captcha-section").style.display=""}function sn(a){i(a+
"captcha-section").style.display="none"}function No(a){t(i(a+"captcha-error"))}function ni(a){s(i(a+"captcha-error"))}function Ki(a,b,c,d){i(a+"captcha-required").value=b;i(a+"captcha-image").src=c;i(a+"captcha-token").value=d}function Nj(a,b){i(a+"captcha-text").disabled=b}function Xi(a){if(i(a+"captcha-required").value=="true"&&i(a+"captcha-text").value==""){No(a);return false}return true}function Hg(a){var b="";if(i(a+"captcha-required").value=="true"){var c=i(a+"captcha-text").value;if(c!=""){b+=
"&captcha="+encodeURIComponent(c)}b+="&captchatoken="+encodeURIComponent(i(a+"captcha-token").value)}return b}function xi(a,b){if(b[1]=="captcha-required"){Ki(a,"true",b[2],b[3]);Oo(a);return true}return false};var Xf=[];function _addOnLoadAction(a){Xf.push(a)}function _runOnLoadActions(){for(var a=0;a<Xf.length;a++){Xf[a]()}}function Sc(a,b,c,d,e,f,g,h,j,k){this.sf=a;this.tq=b;this.kq=c;this.Nq=d;this.tf=e;this.lm=f;this.Jp=g;this.zp=h;this.Oq=k}var _ContentListItem=Sc;Sc.prototype.dl=function(a,b,c){var d={};d.add="/images/plus_off.gif";d.remove="/images/x_off.gif";d.up="/images/up_off.gif";d.down="/images/down_off.gif";d.noop="/images/noop.gif";var e=document.createElement("a");e.href="javascript:void(0)";
if(!c){e.style.cursor="default"}var f=document.createElement("img");f.src=c?d[b]:d.noop;f.style.border="0px";e.appendChild(f);var g=this;if(c){e.onclick=function(h){a.mh(b,g)}}return e};Sc.prototype.Td=function(a,b,c){var d=this.Wk(b);xd(d,"contentitemcore");var e=document.createElement("div");e.style.width="150px";xd(e,"contentitem");var f;if(this.lm){f=document.createTextNode("advertisement")}else{f=document.createTextNode(" ")}var g=document.createElement("div");g.appendChild(f);xd(g,"contentitemad");
e.appendChild(g);var h=document.createElement("div");for(var j=0;j<c.length;j++){h.appendChild(this.dl(a,c[j],this.Jp));h.appendChild(document.createElement("br"))}xd(h,"contentitemcontrols");e.appendChild(h);e.appendChild(d);e.id=b;return e};Sc.prototype.Wk=function(a){var b=document.createElement("div"),c=document.createElement("img");c.src=this.tq;c.alt="";c.border="1";c.width=100;c.height=75;if(this.zp){c.title="Click here to edit destination URL";c.style.cursor="pointer";var d=this;c.onclick=
function(){Qo(d.sf)}}var e=document.createTextNode(this.kq);b.appendChild(c);b.appendChild(document.createElement("br"));b.appendChild(e);b.style.width="110px";b.style.fontSize="smaller";return b};function _ContentListTimeline(a,b){this.Ua=a;this.sf=b;this.A=[]}_ContentListTimeline.prototype._getIds=function(){return this.A.join(",")};_ContentListTimeline.prototype.ub=function(a){return this.Ua+"_items_"+a};function _addItemToTimeline(a,b){b._addItem(a)}function _addItemHashToTimeline(a,b){var c=
new Sc(null,null,null,null,null,null,null,null,null,null);for(var d in a){c[d]=a[d]}b._addItem(c)}_ContentListTimeline.prototype._addItem=function(a){this.Mq+=a.duration;this.A.push(a);var b=a.Td(this,this.ub(this.A.length-1),oe),c=this,d=0;if(pd&&this.versionMajor==6){d=500}setTimeout(function(){c._finishAddItem(b)},d)};_ContentListTimeline.prototype._finishAddItem=function(a){var b=document.getElementById(this.Ua);b.appendChild(a);b.style.width=this.A.length*150+50+"px";if(a.clientHeight>b.clientHeight){b.style.height=
a.clientHeight+"px"}this.dj()};_ContentListTimeline.prototype.dj=function(){var a=document.getElementById("sessionfield"),b="[";for(var c=0;c<this.A.length;c++){b+=Mn(this.A[c]);if(c<this.A.length-1){b+=","}}b+="]";a.value=b};var oe=["remove","noop","up","down"];_ContentListTimeline.prototype.swap=function(a,b){var c=document.getElementById(this.ub(a)),d=document.getElementById(this.ub(b)),e=this.A[a];this.A[a]=this.A[b];this.A[b]=e;var f=this.A[a].Td(this,this.ub(a),oe),g=this.A[b].Td(this,this.ub(b),
oe),h=c.parentNode;h.replaceChild(f,c);h.replaceChild(g,d)};_ContentListTimeline.prototype.hk=function(){var a=this.A.length;for(var b=0;b<a;b++){this.mh("remove",this.A[0])}};function _clearAllItemsInTimeline(a){a.hk()}_ContentListTimeline.prototype.mh=function(a,b){var c=-1;for(var d=0;d<this.A.length;d++){if(this.A[d]==b){c=d}}if(a=="up"){if(c>0){this.swap(c,c-1)}}else if(a=="down"){if(c<this.A.length-1){this.swap(c,c+1)}}else if(a=="top"){if(c>0){this.swap(c,0)}}else if(a=="bottom"){if(c<this.A.length-
1){this.swap(c,this.A.length-1)}}else if(a=="remove"){for(var d=c;d<this.A.length-1;d++){this.swap(d,d+1)}this.A.splice(this.A.length-1,1);var e=document.getElementById(this.ub(this.A.length));e.parentNode.removeChild(e);document.getElementById(this.Ua).style.width=this.A.length*150+50+"px"}this.dj()};function _getTimelineIds(a){var b=[];for(var c=0;c<a.A.length;c++){b.push(a.A[c].sf)}return b.join(" ")}function Qo(a){document.getElementById("editvideometadiv").innerHTML="";document.getElementById("editvideometadiv").style.display=
"block";O("/videometaedit?docid="+a,Oj,null,null)}function Oj(a,b,c,d,e){if(a.readyState==4){document.getElementById("editvideometadiv").innerHTML=a.responseText}}function _hideVideoMetadata(){document.getElementById("editvideometadiv").style.display="none"}_ContentListTimeline.prototype.Vo=function(a,b){for(var c=0;c<this.A.length;c++){if(this.A[c].sf==a){this.A[c].lm=b;var d=document.getElementById(this.ub(c)),e=this.A[c].Td(this,this.ub(c),oe),f=d.parentNode;f.replaceChild(e,d)}}};function _saveVideoMetadata(a,
b,c,d,e){var f="/videometawrite?";f+="docid="+yd(b);f+="&url="+yd(c);f+="&urllabel="+yd(d);f+="&isad="+yd(e?"on":"off");O(f,null,null,null);_hideVideoMetadata();a.Vo(b,e)}Boolean.prototype.toJSONString=function(){return String(this)};Date.prototype.toJSONString=function(){function a(b){return b<10?"0"+b:b}return'"'+this.getFullYear()+"-"+a(this.getMonth()+1)+"-"+a(this.getDate())+"T"+a(this.getHours())+":"+a(this.getMinutes())+":"+a(this.getSeconds())+'"'};Number.prototype.toJSONString=function(){return isFinite(this)?
String(this):"null"};var Mn=function(a){var b=["{"],c,d,e;function f(g){if(c){b.push(",")}b.push(d.toJSONString(),":",g);c=true}for(d in a){if(a.hasOwnProperty(d)){e=a[d];switch(typeof e){case "undefined":case "function":case "unknown":break;case "object":f("null");break;default:f(e.toJSONString())}}}b.push("}");return b.join("")};(function(a){var b={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};a.parseJSON=function(c){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)){var d=
eval("("+this+")");if(typeof c==="function"){function e(g){if(g&&typeof g==="object"){for(var h in g){if(g.hasOwnProperty(h)){g[h]=e(g[h])}}}return c(g)}return e(d)}return d}}catch(f){}};a.toJSONString=function(){if(/["\\\x00-\x1f]/.test(this)){return'"'+this.replace(/([\x00-\x1f\\"])/g,function(c,d){var e=b[d];if(e){return e}e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"'}return'"'+this+'"'}})(String.prototype);var Xj=function(a){if(a&&a.childNodes.length>0){for(var b=0;b<a.childNodes.length;b++){if(a.childNodes[b].tagName=="A"){return a.childNodes[b]}}}return undefined},Dg=function(a,b,c,d,e,f){var g=document.createElement("img");g.onload=function(h){var j=document.getElementById(b);if(j){var k=Xj(j);if(k){k.appendChild(g)}else{j.appendChild(g)}}};g.src=a+"/favicon.ico";g.title=a;g.style.position="absolute";g.style.zIndex=1;g.style.width=c+"px";g.style.height=d+"px";g.style.top=e+"px";g.style.left=f+"px";
g.style.border=0;g.style.background="#ffffff"},_fh_insertFavicon=Dg;function _filterutils_adjustLines(a,b,c,d,e,f,g){var h=document.getElementById(a).getElementsByTagName("tbody")[0],j=h.getElementsByTagName("tr"),k=Math.min(j.length-d,c+b),l=1;for(var n=c;n<k;n++){j[n].getElementsByTagName("td")[e].innerHTML=l+f;if(g&&l%2!=0){j[n].className=j[n].className+" tr-shaded"}l++}};var gk=function(){var a=gg(document.URL);a.Hj("/accountheader");a.Xa("continueUrl",[document.URL]);a.Xa("frame",["1"]);O(a,fk)},fk=function(a,b,c,d,e){if(b){var f=i("guser");if(f){f.innerHTML=a.responseText}}},_gb_refreshGaiaBar=gk;var Vc,tc,Ka,ye="GenrePageState",kk=function(a,b,c){Vc=a;tc=b;Ka={};for(var d=0;d<c.length;d++){var e=c[d];if(e.numPages>0){Ka[e.sectionId]=e}}rk()},rk=function(){var a=eb(ye),b=Eg(a);for(var c in Ka){var d=Ka[c];if(!b||b.pageId!=Vc){d.initialVisibility=true}else if(b.seed!=tc){d.initialVisibility=false}else{d.initialVisibility=true;if(c in b.sectionIdToPageNumMap){var e=b.sectionIdToPageNumMap[c];if(e!=d.currentPage){d.initialVisibility=false}}}}},mk=function(){if(!qk()){Fg()}},Fg=function(){var a=
{};for(var b in Ka){var c=Ka[b];a[b]=c.currentPage}var d=new ze(Vc,tc,a);Pc(ye,d.el(),null,window.location.pathname)},qk=function(){var a=eb(ye),b=Eg(a);if(b==null){return false}if(b.pageId!=Vc){return false}var c=false;if(b.seed!=tc){tc=b.seed;c=true}var d=false;for(var e in Ka){var f=Ka[e],g=f.currentPage;if(e in b.sectionIdToPageNumMap){g=b.sectionIdToPageNumMap[e]}if(g>=f.numPages){g=f.numPages-1}if(g<0){g=0}if(c||g!=f.currentPage){f.Zf(g);d=true}}return d},nk=function(){var a=i("narrow-css"),
b=ej(window,yk);if(!isNaN(b)){a.disabled=b>=990}},ok=function(a){var b=Ka[a],c=i(b.hb()+"-contents"),d=(c.clientHeight-41)/2,e=i(b.hb()+"-prev-active"),f=i(b.hb()+"-prev-inactive");e.style.margin=d+"px 0";f.style.margin=d+"px 0";var g=i(b.hb()+"-next-active"),h=i(b.hb()+"-next-inactive");g.style.margin=d+"px 0";h.style.margin=d+"px 0"},lk=function(a){Ka[a].an()},pk=function(a){Ka[a].vn()},jk=function(a){return Ka[a].ol()},sk=function(a,b){Ka[a].oj(b)},ub=function(a,b,c){this.sectionId=a;this.numPages=
c;this.currentPage=b;this.initialVisibility=false;this.pendingRequest=false;this.prevAndNextButtonsAreInitialized=false};ub.prototype.hb=function(){return"gp-section-"+this.sectionId};ub.prototype.yg=function(){function a(c,d){switch(d){case "hidden":i(c+"-active").style.display="none";i(c+"-inactive").style.display="none";break;case "active":i(c+"-active").style.display="";i(c+"-inactive").style.display="none";break;case "inactive":i(c+"-active").style.display="none";i(c+"-inactive").style.display=
"";break;default:break}}var b=this.pendingRequest?"inactive":"active";a(this.hb()+"-prev",this.currentPage==0?"hidden":b);a(this.hb()+"-next",this.currentPage+1==this.numPages?"hidden":b)};ub.prototype.oj=function(a){var b=i(this.hb());if(a){this.yg();b.style.visibility="visible"}else{b.style.visibility="hidden"}};ub.prototype.ol=function(){return this.initialVisibility};ub.prototype.Zf=function(a){if(!this.pendingRequest){this.pendingRequest=true;this.yg();var b=this,c=gg(document.URL);c.Xa("output",
["AJAX"]);c.Xa("gpid",[Vc]);c.Xa("seed",[tc]);c.Xa("sectionid",[this.sectionId]);c.Xa("page",[a.toString()]);c.Xa("frame",["1"]);O(c,function(d,e,f,g,h){b.Jl(d,e,f,g,h)},null,{sectionId:this.sectionId,pageNum:a})}};ub.prototype.an=function(){this.Zf(this.currentPage+1)};ub.prototype.vn=function(){this.Zf(this.currentPage-1)};ub.prototype.Jl=function(a,b,c,d,e){if(b){var f=i(this.hb()+"-contents"),g=a.responseText,h=g.indexOf("\n");if(h>=0){var j=g.slice(0,h+1).split("\t"),k=parseInt(j[0],10),l=parseInt(j[1],
10),n=g.slice(h+1);if(k>=0&&l>=1&&n){f.innerHTML=n;this.currentPage=k;this.numPages=l;this.oj(true);Fg()}}}else{if(a.status&&a.status==410){window.location.reload(true)}}this.pendingRequest=false;this.yg()};var ze=function(a,b,c){this.pageId=a;this.seed=b;this.sectionIdToPageNumMap=c},Eg=function(a){if(!a){return null}var b=a.match(/^([a-zA-Z0-9_\-]+),(\-?\d+),(\d+:\d+(?:,\d+:\d+)+)$/);if(!b){return null}var c=b[1],d=parseInt(b[2],10),e=b[3].split(","),f={};for(var g=0;g<e.length;g++){var h=e[g],
j=h.split(":"),k=parseInt(j[0],10),l=parseInt(j[1],10);if(isNaN(k)||isNaN(l)){return null}f[k]=l}return new ze(c,d,f)};ze.prototype.el=function(){var a=this.pageId+","+this.seed;for(var b in this.sectionIdToPageNumMap){var c=this.sectionIdToPageNumMap[b];a+=","+b+":"+c}return a};var _gp_init=kk,_gp_onLoad=mk,_gp_onWindowResize=nk,_gp_positionArrows=ok,_gp_nextPage=lk,_gp_previousPage=pk,_gp_getInitialVisibility=jk,_gp_setVisibility=sk,_gp_PageableSection=ub;var Fn=function(){i("framed_video_data").style.display="none";i("collapse_link").style.display="none";i("expand_link").style.display="inline";Vf();eg(VP_collapsedFrameCookieName,1)},Gn=function(){i("framed_video_data").style.display="block";i("expand_link").style.display="none";i("collapse_link").style.display="inline";Vf();eg(VP_collapsedFrameCookieName,0)},wi=new Array("related-videos","flagtab","sendemail-form","labeltab"),In=function(a,b){for(var c=0;c<wi.length;c++){var d=wi[c];if((VP_displayFlagTab||
d!="flagtab")&&(VP_displayLabelTab||d!="labeltab")&&(VP_displayEmailTab||d!="sendemail-form")){if(d==a){i(d).style.display="inline";i(d+"-link").className="framemenu_active"}else{i(d).style.display="none";i(d+"-link").className="framemenu_inactive"}}eg(VP_tabFrameCookieName,b)}},vi=false,Hn=function(){if(VP_enableEmailAutocomplete&&!vi){_initEmailAutocomplete(i("to"),"/data/contacts?max=250",false);vi=true}},Vf=function(){var a=i("lpaf_framefull"),b=i("3rdPartyFrame"),c=window.innerHeight||document.documentElement.offsetHeight,
d=c-a.offsetHeight-(M?3:0);d=Math.max(0,d);b.style.height=d+"px";if(M||ta||Fb){var e=window.innerWidth||document.documentElement.clientWidth;e=Math.max(0,e-1);b.style.width=e+"px";b.width=e;e=window.innerWidth||document.documentElement.clientWidth;e=Math.max(0,e);b.style.width=e+"px";b.width=e}if(window.isGoogleHostedVideo){if(window.onIFrameResize){window.onIFrameResize()}}},_lpaf_expand=Gn,_lpaf_setActiveTab=In,_lpaf_collapse=Fn,_lpaf_onResize=Vf,_lpaf_initAutocomplete=Hn;var Bd=30,sg=8,rg=50;function ij(a,b,c,d){this.name=a;this.title=b;this.query=c;this.filter=d;this.total=-1;this.resultIndex=0;this.cached=new Array(Bd);this.cachedNo=0;this.visibleIndex=0;this.targetVisibleIndex=0;this.animating=false;this.cachingState=0}function jg(a,b,c,d,e,f,g,h){this.docid=a;this.thumbSrc=b;this.shortTitle=c;this.origTitle=d;this.duration=e;this.height=f;this.provider=g;this.playPageUrl=h}function wn(){for(var a in resultBoxes){vn(resultBoxes[a])}}function vn(a){var b="/videofeed?type=search&output=ajax&frame=morebox&docid="+
VP_docId+"&q="+a.query+"&filter="+a.filter+"&num="+Bd+"&start=0&msg=-1";b=vb(b);O(b,Sf,null,a.name)}function Sf(a,b,c,d,e){if(a.readyState==4){var f=a.responseText.replace(/\"/g,"'");Bi(encodeURIComponent(f),e)}}function tb(a,b){i(a+"active").style.display=b?"inline":"none";i(a+"inactive").style.display=b?"none":"inline"}function Qi(a,b){i(a+"_searching").style.display=b==1?"inline":"none";i(a+"_noresults").style.display=b==2?"inline":"none";i(a+"_links").style.display=b==4?"inline":"none";if(b==
4){i(a+"_items").style.height="19em";i(a+"_main").className="resultboxmainscroll"}i(a+"_main").style.display=b>=3?"inline":"none"}function Po(a){if(a.cachedNo==0){return}var b=ik(a);i(a.name+"_items").innerHTML=b;Ti(a);Ui(a);Qi(a.name,a.cachedNo>3?4:3)}function ik(a){var b='<table cellpadding="0" cellspacing="2" class="resultboxtable" id="'+a.name+'_table"><tbody>';for(var c=0;c<a.cachedNo;c++){b+=hk(a.cached[c],a.name+"_item_"+c)}b+="</tbody></table>";return b}function hk(a,b){var c='<tr class="itemrow"><td class="resultboxthumbcell"><a href="'+
a.playPageUrl+'" rel="nofollow"><img class="resultboxthumb" src="'+a.thumbSrc+'" title="'+a.origTitle+'" alt="" border="1"></a></td>';c+='<td id="'+b+'" class="resultboxcell" valign="top"> <a href="'+a.playPageUrl+'" title="'+a.origTitle+'" rel="nofollow"> '+a.shortTitle+"</a><br>";c+='<span class="meta"> ';if(a.provider!="."){c+=a.provider+"<br>"}c+=a.duration+"</span></td></tr>";return c}function Ui(a){if(a.total<=0){return}var b=a.resultIndex+a.visibleIndex+1,c=b+2;if(a.total<c){c=a.total}var d=
""+b;if(b<c){d+="-"+c}if(a.total>1000){d+=" "+MSG_OF_THOUSANDS}else if(a.total>200){d+=" "+MSG_OF_HUNDREDS}else{d+=" of "+a.total}i(a.name+"_linkstext").innerHTML=d}function Ti(a){if(a.total==0){tb(a.name+"_prev",false);tb(a.name+"_next",false);return}var b=a.resultIndex+a.visibleIndex+1;tb(a.name+"_prev",b>1?true:false);tb(a.name+"_next",a.visibleIndex+3<a.cachedNo?true:false)}function Bi(a,b){var c=resultBoxes[b];c.cachingState=2;if(c.animating){var d='processResponse("'+a+'","'+b+'")';setTimeout(d,
400);return}Gj(decodeURIComponent(a),c);if(c.total==0||c.cachedNo==0){tb(b+"_prev",false);tb(b+"_next",false);Qi(b,2)}else{Po(c);Bo(c)}c.cachingState=0}function Bo(a){var b=a.name+"_item_"+a.visibleIndex,c=i(b).offsetTop-2;i(a.name+"_items").scrollTop=c}function Gj(a,b){var c=a.split("\r\n"),d=c[0].split("\t"),e=1*d[0],f=1*d[1];Wj(d[2],b);if(e<0||e>Bd||f<0){return}var g=true;if(f<b.resultIndex){g=false}var h=Bd-e;if(h>b.cachedNo){h=b.cachedNo}var j=b.cachedNo-h;if(g){var k=b.cachedNo-h;for(var l=
0;l<h;l++){b.cached[l]=b.cached[k+l]}}else{for(var l=h-1;l>=0;l--){b.cached[e+l]=b.cached[l]}}if(g){for(var l=1;l<=e;l++){d=c[l].split("\t");b.cached[h+l-1]=new jg(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7])}}else{for(var l=1;l<=e;l++){d=c[l].split("\t");b.cached[l-1]=new jg(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7])}}b.cachedNo=h+e;if(g){b.resultIndex+=j;b.visibleIndex-=j;if(b.visibleIndex<0){b.visibleIndex=0}}else{b.resultIndex-=e;b.visibleIndex+=e;if(b.visibleIndex>=b.cachedNo){b.visibleIndex=b.cachedNo-
1}}}function Wj(a,b){if(b.total<0&&a){var c=1*a;if(c>=0){b.total=c}}}function jo(a){tb(a+"_prev",false);tb(a+"_next",false);var b=resultBoxes[a];if(b.cachingState==2){var c='resultBoxNextClicked("'+a+'")';setTimeout(c,100)}else{qg(true,a)}}function ko(a){tb(a+"_prev",false);tb(a+"_next",false);var b=resultBoxes[a];if(b.cachingState==2){var c='resultBoxPrevClicked("'+a+'")';setTimeout(c,100)}else{qg(false,a)}}function qg(a,b){var c=resultBoxes[b];c.animating=true;if(a){Yj(c);xj(c)}else{Zj(c);zj(c)}}
function Yj(a){var b=a.resultIndex+a.cachedNo;if(a.cachedNo-a.visibleIndex>7||a.cachingState>0||a.total>=0&&b>=a.total){return}var c=a.total-b;if(c<1||c>10){c=10}var d="/videofeed?type=search&output=ajax&frame=morebox&docid="+VP_docId+"&q="+a.query+"&num="+c+"&start="+b;d=vb(d);a.cachingState=1;O(d,Sf,null,a.name)}function Zj(a){if(a.visibleIndex>3||a.cachingState>0||a.resultIndex==0){return}var b=a.resultIndex;if(b>10){b=10}var c="/videofeed?type=search&output=ajax&frame=morebox&docid="+VP_docId+
"&q="+a.query+"&num="+b+"&start="+(a.resultIndex-b);c=vb(c);a.cachingState=1;O(c,Sf,null,a.name)}function xj(a){if(a.total==0||a.cachedNo<=0||a.visibleIndex+3>=a.cachedNo){return}var b=a.name+"_item_"+a.visibleIndex,c=i(b).offsetTop-2;a.targetVisibleIndex=a.visibleIndex+3;if(a.targetVisibleIndex>a.cachedNo-3){a.targetVisibleIndex=a.cachedNo-3}b=a.name+"_item_"+a.targetVisibleIndex;var d=i(b).offsetTop-2;te(a.name,c,d,sg,rg,true)}function zj(a){if(a.total==0||a.cachedNo<=0||a.visibleIndex<0){return}var b=
a.name+"_item_"+a.visibleIndex,c=i(b).offsetTop-2;a.targetVisibleIndex=a.visibleIndex-3;if(a.targetVisibleIndex<0){a.targetVisibleIndex=0}b=a.name+"_item_"+a.targetVisibleIndex;var d=i(b).offsetTop-2;te(a.name,c,d,sg,rg,false)}function te(a,b,c,d,e,f){var g;if(f){g=c-b}else{g=b-c}if(d<=0||g<=0){i(a+"_items").scrollTop=c;yj(a,f);return}var h=parseInt(g/d,10),j=f?b+h:b-h;i(a+"_items").scrollTop=j;var k="animate('"+a+"',"+j+","+c+","+(d-1)+","+e+","+f+")";setTimeout(k,e)}function yj(a,b){var c=resultBoxes[a];
c.visibleIndex=c.targetVisibleIndex;Ui(resultBoxes[a]);Ti(resultBoxes[a]);c.animating=false};var qd={},mo=function(a,b,c){qd[a]=new Sb(a,b,c)},no=function(a,b){for(var c in qd){qd[c].hide()}qd[a].show(b)},lo=function(a,b){qd[a].hide(b)},Sb=function(a,b,c){this.resultNum=a;this.previewContents=b;this.nonAnimateableElements=c?c:[];this.visible=false;this.animating=false};Sb.prototype.wc=function(){return this.visible};Sb.prototype.show=function(a){if(this.visible||this.animating){return}this.visible=true;var b=I("preview-zippy-"+this.resultNum),c=I("show-preview-text-"+this.resultNum),d=I("hide-preview-text-"+
this.resultNum);b.setAttribute("src","/images/zippy_minus_sm.gif");c.style.display="none";d.style.display="";if(a){O(a,null)}var e=I("preview-body-"+this.resultNum);e.innerHTML=this.previewContents;e.style.display="";var f=la(e).height,g=I("preview-curtain-"+this.resultNum);this.animation=new $d(g,0,f,250);p(this.animation,"end",Sb.prototype.pj.bind(this));this.animating=true;this.animation.play()};Sb.prototype.pj=function(){for(var a=0;a<this.nonAnimateableElements.length;++a){var b=I(this.nonAnimateableElements[a]);
if(b){b.style.display=""}}this.animating=false};Sb.prototype.hide=function(a){if(!this.visible||this.animating){return}this.visible=false;var b=I("preview-zippy-"+this.resultNum),c=I("show-preview-text-"+this.resultNum),d=I("hide-preview-text-"+this.resultNum);b.setAttribute("src","/images/zippy_plus_sm.gif");c.style.display="";d.style.display="none";if(a){O(a,null)}for(var e=0;e<this.nonAnimateableElements.length;++e){var f=I(this.nonAnimateableElements[e]);if(f){f.innerHTML=""}}var g=I("preview-body-"+
this.resultNum),h=la(g).height,j=I("preview-curtain-"+this.resultNum);this.animation=new $d(j,h,0,250);p(this.animation,"end",Sb.prototype.Wh.bind(this));this.animating=true;this.animation.play()};Sb.prototype.Wh=function(){var a=I("preview-body-"+this.resultNum);a.innerHTML="";a.style.display="none";this.animating=false};var _rl_registerPreview=mo,_rl_showPreview=no,_rl_hidePreview=lo;function bo(a){var b=gg(a.URL),c=a.getElementById("regionselect").value;b.Xa("cr",c);window.location=b}var _rs_regionSelectChanged=bo;function yg(a){if(document.all||document.getElementById){a.disabled=true}else if(a){a.oldonclick=a.onclick;a.onclick=null;a.oldvalue=a.value;a.value="DISABLED"}}function Bg(a){if(document.all||document.getElementById){a.disabled=false}else if(a){a.onclick=a.oldonclick;a.value=a.oldvalue}}function Eo(a,b){O(a,mn,b);var c=i("send-status");ho();Tb(c,"error",MSG_SENDING)}function mn(a){var b=i("send-status");if(a.readyState==4){var c=a.responseText;if(c==0){Tb(b,"error",MSG_SENT);i("to").value="";i("msg").value=
""}else{Tb(b,"","");if(c==1){Tb(i("from-comment"),"error",MSG_INVALID_EMAIL_ADDRESS)}else if(c==2){Tb(i("to-comment"),"error",MSG_INVALID_EMAIL_ADDRESS)}else{Tb(b,"error",MSG_UNKNOWN_ERROR)}}Bg(i("sendform").sendvideobutton)}}function ho(){Tb(i("from-comment"),"example",MSG_EG_EMAIL);Tb(i("to-comment"),"example",MSG_SEPARATE_EMAILS_W_COMMA)};function wk(a){if(document.cookie.length>0){var b=document.cookie.indexOf(a+"=");if(b!=-1){b+=a.length+1;var c=document.cookie.indexOf(";",b);if(c==-1){c=document.cookie.length}return decodeURIComponent(document.cookie.substring(b,c))}}return null}function Li(a,b,c){var d=new Date;d.setTime(d.getTime()+c*24*3600*1000);document.cookie=a+"="+encodeURIComponent(b)+(c===null?"":"; expires="+d.toGMTString())}var wg="VideoEmailFromList",xg="VideoEmailToList",ve="from",we="to",Cg=30;function Jo(){if(document.getElementById(ve)!==
null){Li(wg,document.getElementById(ve).value,Cg)}if(document.getElementById(we)!==null){Li(xg,document.getElementById(we).value,Cg)}}function si(a,b){var c=wk(b);if(c!==null&&document.getElementById(a)!==null){document.getElementById(a).value=c}}function Cn(){si(ve,wg);si(we,xg)};function cp(a){var b=Ig(a);if(a.checked){Ei(b,a);a.form.toggleAll.checked=yn(a.form)}else{Fi(b,a);a.form.toggleAll.checked=false}}function oo(a){var b=a.form;for(var c=0;c<b.elements.length;c++){var d=b.elements[c];if(Tf(d)&&d.checked!=a.checked){var e=Ig(d);if(a.checked){Ei(e,d)}else{Fi(e,d)}}}}function yn(a){for(var b=0;b<a.elements.length;b++){var c=a.elements[b];if(Tf(c)&&c.checked==false){return false}}return true}function zn(a){for(var b=0;b<a.elements.length;b++){var c=a.elements[b];if(Tf(c)&&
c.checked){return false}}return true}function Tf(a){return a.id.indexOf("box_")==0}function Ig(a){return i("tr_"+a.id.substr(4))}function Gi(a,b){if(b&&b.checked){a.style.backgroundColor="#ffffff"}else{a.style.backgroundColor="#f0f0f0"}}function Ei(a,b){b.checked=true;if(a){Gi(a,b)}}function Fi(a,b){b.checked=false;if(a){Gi(a,b)}};function fp(a,b){var c=document.getElementById("video_"+a+"_form"),d,e,f,g,h;for(var j=0;j<c.elements.length;++j){var k=c.elements[j];if(k.name=="contentId")d=k.value;if(k.name=="title")e=k.value;if(k.name=="description")f=k.value;if(k.name=="genre")g=k.value;if(k.name=="language")h=k.value}var l=Hb(),n=C(l,l,"uploadedvideos"),m=C(l,n,"update");m.setAttribute("contentId",d);C(l,m,"title",e);C(l,m,"description",f);var y=C(l,m,"genres");C(l,y,"genre",g);C(l,m,"language",h);var A="/uploadedvideos";if(b)A+=
b;O(A,rn,l,null,'text/xml; charset="utf-8"');var E=document.getElementById("title-"+a);E.innerHTML=e}function rn(a,b,c,d,e){};var ji="",Aj="";function fg(a){i("downloaddiv").innerHTML='    <iframe marginwidth="0" marginheight="0" src="'+a+'\t   " frameborder="0" width="1" height="1"></iframe>'}function bj(a,b){this.args=b;eval(a+"(this.args)")}function Jj(a){if(a.isInstalled=="true"){s(i("clientunknowndiv"));t(i("clientpresentdiv"));fg(ji)}else{s(i("clientunknowndiv"));t(i("clientmissingdiv"));fg(Aj);Pj("setVars=fetchOnInstallUrl="+ji.replace("&","%2526"))}}function Pj(a){a="container=videoPlayerSettings&"+a;qi("datastoreflashdiv",
"http://video.google.com/datastore.swf",a)};function Oc(a){if(a.indexOf("/videorelated?")==0){if(a.indexOf("topframe")>0){O(a,ln)}else{O(a,kn);wd("relatedvids",false)}}else if(a.indexOf("/videomorefrom?")==0){O(a,gn);wd("morefromvids",false)}else if(a.indexOf("/videostats?")==0){O(a,on)}else if(a.indexOf("/videoevents?")==0){O(a,null)}else{return}}function Do(){if(VP_next10DocId=="0"){wd("next10link",false);return}var a=window.location.search.split("docid=")[1].split("&")[0],b="",c=VP_myPlaylist.split(",");if(c.length>91){var d=c.length,e=
-1;for(var f=0;f<d;f++){if(a==c[f]){e=f;break}}var g=Math.max(0,e-40),h=Math.min(d,g+90);b=c.splice(g,h-g).join(",")}else{b=VP_myPlaylist}var j="/videoplaylistnext?docid="+VP_next10DocId+"&num=10&q="+b+"n"+a;Oc(vb(j))}function kn(a){if(a.readyState==4){zi("relatedvidsactive",a.responseText);wd("relatedvids",true)}}function ln(a){if(a.readyState==4){Rn("related-videos",a.responseText)}}function gn(a){if(a.readyState==4){zi("morefromvidsactive",a.responseText);wd("morefromvids",true)}}function on(a){}
function cn(a,b,c,d,e){var f=MSG_UNKNOWN_ERROR;if(a.readyState==4&&b){var g=a.responseXML.documentElement;if(g.tagName=="flag-response"){var h=J(g,"error-code"),j=J(g,"message");if(h){if(h.indexOf("ok")==0){s(i("flag-form"))}f=j}}}i("flag-message").innerHTML=f;t(i("flag-message"))}function dn(a,b,c,d,e){var f=MSG_UNKNOWN_ERROR;if(a.readyState==4&&b){var g=a.responseXML.documentElement;if(g.tagName=="label-response"){var h=J(g,"error-code"),j=J(g,"message");if(h){if(h.indexOf("ok")==0){s(i("label-form"))}f=
j}}}i("label-message").innerHTML=f;t(i("label-message"))}function vk(a){var b="";if(!a.length&&a.checked){b=a.value}else{for(var c=0;c<a.length;c++){if(a[c].checked){b=a[c].value;break}}}return b}function uk(a){var b=[],c=0;for(var d=0;d<a.length;d++){if(a.elements[d].type=="checkbox"&&a.elements[d].checked){b[c++]=a.elements[d].name}}return b}function $j(a,b,c,d){var e=Hb(),f=C(e,e,"flag-request");C(e,f,"docid",b);C(e,f,"cid",c);C(e,f,"flag",d);i("flag-submitting-feedback-message").innerHTML=MSG_SAVING_FEEDBACK;
t(i("flag-submitting-feedback-message"));O(a+"?frame=comment"+VP_langParam,cn,e,"flagorama",'text/xml; charset="UTF-8"')}function An(a,b,c,d,e){var f=Hb(),g=C(f,f,"label-request");C(f,g,"docid",b);C(f,g,"cid",c);for(var h=0;h<d.length;++h){C(f,g,"labels",d[h])}C(f,g,"annotations",e);i("label-submitting-feedback-message").innerHTML=MSG_SAVING_FEEDBACK;t(i("label-submitting-feedback-message"));O(a+"?frame=comment"+VP_langParam,dn,f,"labelorama",'text/xml; charset="UTF-8"')}function Cj(){Yn();Ci();ao();
Di("dmrcfp","p");Ni(false)}function Yn(){var a=eb(VP_playlistSettingsCookieName);if(!a){sd()}else{if(a.charAt(0)=="1"){VP_autoplayEnabled=true}else{VP_autoplayEnabled=false}if(a.charAt(1)=="0"){VP_collapseDescr=false}else{VP_collapseDescr=true}VP_visibleTab=a.charAt(2)}}function ao(){if(i("collapselink")){if(VP_collapseDescr){i("collapselink").onclick()}else{i("expandlink").onclick()}}}function Di(a,b){if(a!=null&&b!=null&&a.indexOf(VP_visibleTab)<0){VP_visibleTab=b}if(VP_visibleTab=="d"){i("ldetails").onclick()}else if(VP_visibleTab==
"m"){i("lmorefrom").onclick()}else if(VP_visibleTab=="r"){i("lrelated").onclick()}else if(VP_visibleTab=="c"&&i("lcomments")){i("lcomments").onclick()}else if(VP_visibleTab=="f"){i("lflag").onclick()}else{VP_visibleTab="p";if(i("lupnext")&&i("lupnext").onclick){i("lupnext").onclick()}}}function Mi(){Pc(VP_playlistCookieName,VP_myPlaylist,VP_cookieDomain);Pc(VP_playlistIndexCookieName,VP_myPlaylistIndex,VP_cookieDomain);Ni(true);sd()}function yo(a){var b=eb(VP_playlistSettingsCookieName);if(!b){sd();
return}oc(VP_playlistSettingsCookieName,(a?"1":"0")+b.substring(1,3),VP_cookieDomain)}function zo(a){VP_collapseDescr=a;var b=eb(VP_playlistSettingsCookieName);if(!b){sd();return}oc(VP_playlistSettingsCookieName,b.charAt(0)+(a?"1":"0")+b.charAt(2),VP_cookieDomain)}function Ao(a){VP_visibleTab=a;var b=eb(VP_playlistSettingsCookieName);if(!b){sd();return}oc(VP_playlistSettingsCookieName,b.substring(0,2)+a,VP_cookieDomain)}function sd(){oc(VP_playlistSettingsCookieName,(VP_autoplayEnabled?"1":"0")+(VP_collapseDescr?
"1":"0")+VP_visibleTab,VP_cookieDomain)}function Ni(a){if(a){Pc(VP_playlistParametersCookieName,"1",VP_cookieDomain)}else{Pc(VP_playlistParametersCookieName,"0",VP_cookieDomain)}}function bk(){VP_autoplayEnabled=!VP_autoplayEnabled;yo(VP_autoplayEnabled);Ci()}function td(a,b){var c=i(a);if(c&&c.style&&c.style){c.style.display=b}}function Ci(){if(VP_autoplayEnabled){td("autoplayon","inline");td("autoplayoff","none")}else{td("autoplayon","none");td("autoplayoff","inline")}}function wd(a,b){if(b){i(a+
"active").style.display="inline";i(a+"inactive").style.display="none"}else{i(a+"active").style.display="none";i(a+"inactive").style.display="inline"}}function zi(a,b){var c="",d=b.split("\r\n"),e,f="",g;if(d[0]=="0"){c+="<br/><font size=-1>"+MSG_NO_MATCHING_VIDEOS+"</font>"}else{for(var h=1;h<d.length-1;h++){e=d[h].split("\t");f+=e[0]+","}c+="<table cellpadding=0 cellspacing=3>";for(var h=1;h<d.length-1;h++){e=d[h].split("\t");if(h%2==1){c+="<tr>"}c+="<td align=center class='standardfont' valign=top><a href='"+
e[7]+"' onclick='setSessionCookie(VP_playlistCookieName, \""+f+'", VP_cookieDomain); setSessionCookie(VP_playlistIndexCookieName, -1, VP_cookieDomain);\' rel="nofollow"><img border=1 height='+e[5]+" width=100 alt=''title=\""+e[3]+"\" src='"+e[1]+"'></a><br><a href='"+e[7]+"' onclick='setSessionCookie(VP_playlistCookieName, \""+f+'", VP_cookieDomain); setSessionCookie(VP_playlistIndexCookieName, -1, VP_cookieDomain);\' title="'+e[3]+'" rel="nofollow">'+e[2]+"</a><br><font color=green>"+e[4]+"</font></td>";
if(h==1){g=e[0]}if(h%2==0){c+="</tr>";c+="<tr><td height=10></td></tr>"}}if(h%2==0){c+="<td></td></tr>"}c+="</table>"}i(a).innerHTML=c}function Rn(a,b){var c=b.split("\r\n"),d,e=i(a);if(!e){return}var f=0;for(var g=1;g<c.length-1;g++){if(c[g].replace(/\s+/g,"").length>0){f++}else{c[g]=""}}if(c[0]=="0"||f==0){e.innerHTML="<br/><font size=-1>"+MSG_NO_MATCHING_VIDEOS+"</font>";return}if(e.hasChildNodes()){while(e.childNodes.length>=1){e.removeChild(e.firstChild)}}var h=e.style.display;e.style.display=
"none";var j=document.createElement("DIV");e.appendChild(j);j.className="related_videos_more_div";var k=document.createElement("A");j.appendChild(k);k.innerHTML=MSG_MORE_RELATED+"&nbsp;&raquo;";k.href=VP_relatedResultsSearchLink;var l=document.createElement("DIV");e.appendChild(l);l.className="related_videos_thumbstrip_div";for(var g=1;g<c.length-1;g++){if(c[g].length==0){continue}d=c[g].split("\t");var n=Qn(d[0],d[1],d[2],d[3],d[5],gj(d[7]),d[8],VP_queryParam);l.appendChild(n)}e.style.display=h}
function Qn(a,b,c,d,e,f,g,h){var j=Jm(d),k=Ij(100,parseInt(e,10),80,60),l=document.createElement("DIV"),n=document.createElement("CENTER");l.appendChild(n);var m=document.createElement("TABLE");n.appendChild(m);m.cellPadding=0;m.cellSpacing=0;var y=document.createElement("TR");m.appendChild(y);var A=document.createElement("TD");y.appendChild(A);A.vAlign="bottom";A.align="center";A.height=62;var E=document.createElement("DIV");A.appendChild(E);var ua="favicon"+a;E.id=ua;E.style.position="relative";
E.style.width="80px";E.style.height="60px";E.style.backgroundColor="black";E.style.border="1px solid blue";var ca=document.createElement("A");E.appendChild(ca);ca.href=f;ca.rel="nofollow";var Y=document.createElement("IMG");Y.onload=function(re){Dg("http://"+g,ua,14,14,40,6)};ca.appendChild(Y);Y.style.border="none";Y.style.width=k[0]+"px";Y.style.height=k[1]+"px";Y.style.marginLeft=(80-k[0])/2+"px";Y.style.marginTop=(60-k[1])/2+"px";Y.title=j;Y.alt="title="+Y.title;Y.src=b;y=document.createElement("TR");
m.appendChild(y);A=document.createElement("TD");y.appendChild(A);A.vAlign="top";A.align="center";E=document.createElement("DIV");A.appendChild(E);ca=document.createElement("A");E.appendChild(ca);ca.href=f;ca.rel="nofollow";ca.title=j;ca.innerHTML=c;var db=document.createElement("DIV");db.innerHTML=l.innerHTML;db.className="related_video_thumb";return db}function Ij(a,b,c,d){if(b==0||d==0){return[c,0]}var e=a/b,f=c/d;if(e>f){return[c,Math.round(c/e)]}else{return[Math.round(d*e),d]}}function Tb(a,b,
c){a.className=b;a.innerHTML=c}function Yi(a){var b=i("VideoPlayback");b.SetVariable("seekTime",a/1000)}function Qj(){var a=i("VideoPlayback");a.SetVariable("doPlay",true)}function Ak(a,b,c,d,e){var f=/&begin=[0-9]+/i,g=a.replace(f,"&begin="+Math.floor(d*1000)),h=window.open("http://"+window.location.host+"/videopopup?q="+je(g)+"&docid="+je(b)+"&fscid="+je(c)+"&windowtitle="+je(window.document.title+" - "+MSG_FULL_SCREEN),"GoogleVideo","toolbar=no,status=no,resizable=yes,scrollbars=0");h.focus()}
function Vj(){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight)}function fo(){document.body.scroll="no"}function vb(a){return a+"&ms="+(new Date).getTime()}function Sj(){if(!VP_autoplayEnabled){return}if(VP_waitForSale){setTimeout(Pi,10000)}else{setTimeout(Pi,5000)}}function Pi(){if(!VP_autoplayEnabled||nc("send")||nc("embed")||nc("videopurchasediv")||i("playlistNext").href==null){return}Mi();window.location.href=i("hidden_playlistNextAuto").href}function nc(a){return i(a).style.display==
""}var rc=["upnext","details","morefrom","related","comments","flag"];function Xo(a){for(var b=0;b<rc.length;b++){var c=i(rc[b]);if(c){if(a==rc[b]){i("l"+rc[b]).className="nodecoration";t(c)}else{i("l"+rc[b]).className="decorated";s(c)}}}}var Ad,Ub,Gb,og,tj=2,mg=19;function ud(a,b){Mo(a,b,"px")}function Mo(a,b,c){sc=i(a);if(!sc||sc.style==null||b<0){return}var d=b.toString()+c;sc.style.height=d}function yi(){if(!(Ad=window.innerHeight)){if(!(Ad=document.documentElement.clientHeight)){Ad=document.body.clientHeight}}Ub=
Ad-i("playvideoblock").offsetTop;og=Ub-i("flashobjectplaceholder").offsetTop;ud("playvideoblock",Ub);ud("flashobjectplaceholder",og);ud("playrightblock",Ub);ud("summary",Ub-tj);Gb=Ub-i("abovecorner").offsetHeight-mg;ud("corner",Gb);if(this.onWindowResizeExtra){On()}}function xn(a,b){var c=document.createElement("div");i(b).appendChild(c);c.innerHTML=a}function mi(){var a=document.location.hash.substring(1),b=0,c;if(a.indexOf("h")!=-1){c=a.split("h");b=c[0]*60*60;a=c[1]}if(a.indexOf("m")!=-1){c=a.split("m");
b=c[0]*60+b;a=c[1]}if(a.indexOf("s")!=-1){c=a.split("s");b=c[0]*1+b}else{b=a*1+b}return b}function Ln(){var a=i("playvideoblock");if(a){if(VP_divOffset!=a.offsetTop||a.clientHeight<a.scrollHeight){VP_divOffset=a.offsetTop;yi()}}var b=mi();if(b!=VP_hashPos){VP_hashPos=b;Yi(VP_hashPos*1000)}}function Bn(a){var b=/(^|\D)((\d:[0-5]?\d:[0-5]\d)|([0-5]?\d:[0-5]\d))(\D|$)/,c="";for(var d=a.search(b);d!=-1;d=a.search(b)){var e=a.match(b),f=e[0];if(f.search(/^\D/)!=-1){f=f.substring(1);d=d+1}if(f.search(/\D$/)!=
-1){f=f.substring(0,f.length-1)}c=c+a.substring(0,d);a=a.substring(d+f.length);var g=f;if(f.substring(0,1)==":"){g=f.substring(1)}var h=g.split(":"),j=0,k=0,l=0;switch(h.length){case 2:k=h[0];l=h[1];break;case 3:j=h[0];k=h[1];l=h[2];break}var n=(3600*j+60*k+1*l)*1000;if(n<=0||n>VP_videoDurationMs){c=c+f}else{var m="vpseek("+n+");doPlay();return false;";c=c+'<a onclick="'+m+'" href="#'+j+"h"+k+"m"+l+'s">'+f+"</a>"}}return c+a}function Rb(a,b){if(typeof b=="string"){a.value=b}a.style.color="black";
a.style.fontStyle="normal";a.onfocus=null}function Vi(a,b,c,d,e,f,g){var h=Hb(),j=C(h,h,"review");C(h,j,"docid",b);if(f){C(h,j,"name",e?e:"");C(h,j,"text",f);C(h,j,"token",g)}else{i("commentlist").innerHTML="";i("gettingreviews").innerHTML=MSG_GETTING_REVIEWS;t(i("gettingreviews"))}C(h,j,"sort",c?"rating":"date");O(a+"?frame=comment"+VP_langParam,ki,h,d,'text/xml; charset="UTF-8"')}function ki(a,b,c,d,e){var f,g=i("summary"),h=true;i("gettingreviews").innerHTML="";s(i("gettingreviews"));i("reviewpublishstatus_top").innerHTML=
"";i("reviewpublishstatus_bottom").innerHTML="";if(!e||e!="top"&&e!="bottom"){f=i("commentlist")}else{f=i("reviewpublisherror_"+e)}if(!b||!a.responseXML){Rc(f,MSG_REVIEW_PUBLISH_ERROR,e)}else{var j=a.responseXML.documentElement;if(j.tagName=="error"){var k="errorin";k+=J(j,"errorsource");k+="_"+e;var l=J(j,"errormessage"),n=i(k);if(n){f=n}Rc(f,l,e)}else if(j.tagName!="reviews"){Rc(f,"Unknown error",e)}else{var m="";h=J(j,"value")=="true";var y=j.getElementsByTagName("review"),A;for(A=0;A<y.length;A++){var E=
y.item(A);m+='<div style="margin:2px 0pt .5em;" id="comment';m+=J(E,"id");m+='"><font size="-1"><b>';m+=J(E,"name");m+="</b>&nbsp;&nbsp;&nbsp;";if(VP_canUserDeleteComments){m+='<span align="right" class="markcomment" onclick="markComment(';m+=J(E,"id");m+=", 'OPS',";m+='MSG_MARKING);"';m+=' id="OPS'+J(E,"id")+'">';m+="<nobr>"+MSG_DELETE_COMMENT+"</nobr>";m+="</span>"}m+="<br/>";var ua=J(E,"rating");if(ua&&ua>0){m+=Lj(ua,ua!=null);m+="&nbsp;"}m+="<font color=green>";m+="<nobr>"+J(E,"textdate")+"</nobr>";
m+="</font>";m+="&nbsp;";m+='<span align="right" class="markcomment" ';if(h){m+='onclick="markComment(';m+=J(E,"id");m+=", 'SPAM', MSG_MARKING);\""}else{m+="onclick='this.innerHTML = \"<br/>";m+=J(j,"reason");m+='"; this.className="error"\''}m+=' id="SPAM'+J(E,"id")+'">';m+="<nobr>"+MSG_MARK_AS_SPAM+"</nobr>";m+="</span>";m+="<br/>";m+=Bn(J(E,"text"));m+="</font></div>"}i("commentlist").innerHTML=m;s(i("leavecomment_top"));s(i("topreviewshown"));t(i("topreviewhidden"));t(i("commentlist"));if(y.length==
0){t(i("nocomments"));s(i("sortit"))}else{s(i("nocomments"));t(i("sortit"))}if(e=="top"){i("reviewtext_top").value="";Rb(i("reviewtext_bottom"),"");Rb(i("reviewername_bottom"),i("reviewername_top").value)}else if(e=="bottom"){i("reviewtext_bottom").value="";Rb(i("reviewtext_top"),"");Rb(i("reviewername_top"),i("reviewername_bottom").value);g.scrollTop=0}}}if(h){s(i("reviewpublisherror_top"));s(i("reviewpublisherror_bottom"));i("publishreview_bottom").disabled=false;i("publishreview_top").disabled=
false}else{var ca=J(j,"reason");i("reviewpublisherror_top").innerHTML=ca;i("reviewpublisherror_bottom").innerHTML=ca;t(i("reviewpublisherror_top"));t(i("reviewpublisherror_bottom"))}var Y=i("leavecomment_bottom");t(Y);t(i("reviewboxandtext_bottom"));t(i("reviewblankdiv"));if(g.scrollHeight-Y.scrollHeight>g.clientHeight){t(i("reviewboxandtext_top"));s(i("reviewblankdiv"))}else{s(i("reviewboxandtext_top"));t(i("reviewblankdiv"))}}var Jn=[];function Kn(a,b,c){var d=Hb(),e=C(d,d,"review");C(d,e,"docid",
VP_docIdString);C(d,e,"mark",b);C(d,e,"id",a);if(b=="SPAM"){O(VP_commentsUrl+"?frame=markcomment"+VP_langParam,fn,d,null,'text/xml; charset="UTF-8"');i("SPAM"+a).innerHTML=MSG_MARKING;i("SPAM"+a).className="";i("SPAM"+a).style.color="#cd3700";Jn.push(setTimeout("hideEle(ele('comment"+a+"'))",250))}else{O(VP_commentsUrl+"?frame=markcomment"+VP_langParam,ki,d,null,'text/xml; charset="UTF-8"');i(b+a).innerHTML=c;i(b+a).style.textDecoration="none";i(b+a).style.color="#cd3700"}}function fn(){}function Rc(a,
b,c){a.innerHTML=b;t(a);if(c){var d=i("summary");if(c!="bottom"){d.scrollTop=0}else{d.scrollTop=d.scrollHeight-d.clientHeight}}}function Un(a,b,c,d,e,f){var g=i("reviewpublisherror_"+c);if(e&&e.length>0){e=e.replace(/(^\s+)|(\s+$)/g,"").replace(/ {2,}/g," ")}if(!e||e.length==0||i("reviewtext_"+c).style.color!="black"){Rc(g,MSG_EMPTY_REVIEW,c);return}if(e.length>512){Rc(g,MSG_REVIEW_TOO_LONG,c);return}if(d&&d.length>60){Rc(g,MSG_NAME_TOO_LONG,c);return}i("publishreview_"+c).disabled=true;var h=i("reviewername_"+
c);if(h.style.color!="black"){Rb(h,"");d=""}else{d=d.replace(/(^\s+)|(\s+$)/g,"");h.value=d}s(i("reviewpublisherror_"+c));s(i("errorinname_"+c));i("reviewpublishstatus_"+c).innerHTML=MSG_ANNOTATION_SAVING;VP_commentName=d;rd();Vi(a,b,nc("commentsbyrating"),c,d,e,f)}var tg=false;function nn(){var a=window.location.search.split("docid=")[1].split("&")[0];if(nc("sharelinks")){s(i("sharelinks"));s(i("send"));s(i("embed"));Oc(vb("/videostats?shareclick=close&docid="+a+"&frame=share"))}else{t(i("sharelinks"));
li();Oc(vb("/videostats?shareclick=open&docid="+a+"&frame=share"))}if(VP_enableEmailAutocomplete&&!tg){_initEmailAutocomplete(i("to"),"/data/contacts?max=250",false);tg=true}}function li(){var a=window.location.search.split("docid=")[1].split("&")[0];i("lsend").className="nodecoration";i("lembed").className="decorated";s(i("embed"));t(i("send"));i("sendform").from.focus();Oc(vb("/videostats?shareclick=send&docid="+a+"&frame=share"))}function bn(){var a=window.location.search.split("docid=")[1].split("&")[0];
i("lembed").className="nodecoration";i("lsend").className="decorated";s(i("send"));t(i("embed"));Oc(vb("/videostats?shareclick=embed&docid="+a+"&frame=share"))}function un(a){var b=i("to-label");if(VP_usePicker&&b){b.innerHTML='<a href="javascript:void(0)" onclick="handlePickerClick(event)">'+b.innerHTML+"</a>"}}function hn(a){ph(VP_contactsBaseUrl+"/ui/");vh("to",a)}var Yf=false,Wf=-1;function Lo(a,b,c,d,e){if(d=="top"){i("communityRating").style.display="none"}i("rating_info_"+d).innerHTML=MSG_ANNOTATION_SAVING;
i("rating_info_"+d).style.display="inline";Yf=true;Vo(a,b,c,d,e)}function Sn(a,b,c,d){Yf=false;d.style.cursor="pointer";if(b=="top"){i("communityRating").style.display="none"}i("1_"+b).src=VP_largeStarLeftOff;i("2_"+b).src=VP_largeStarMidOff;i("3_"+b).src=VP_largeStarMidOff;i("4_"+b).src=VP_largeStarMidOff;i("5_"+b).src=VP_largeStarRightOff;if(a>=1){i("1_"+b).src=VP_largeStarLeftOn}if(a>=2){i("2_"+b).src=VP_largeStarMidOn}if(a>=3){i("3_"+b).src=VP_largeStarMidOn}if(a>=4){i("4_"+b).src=VP_largeStarMidOn}if(a>=
5){i("5_"+b).src=VP_largeStarRightOn}}function Pn(a,b,c,d){d.style.cursor="default";if(!Yf){if(c!=0&&b=="top"){var e=i("noRatingsYet");if(e){e.style.display="none"}i("communityRating").style.display="inline"}if(Wf==-1){Qc(c,b)}else{Qc(Wf,b)}}}function Vo(a,b,c,d,e){var f=Hb(),g=C(f,f,"rating");C(f,g,"docid",b);C(f,g,"user_rating",c);C(f,g,"token",e);O(a+"?frame=rating"+VP_langParam,jn,f,d,'text/xml; charset="UTF-8"')}function jn(a,b,c,d,e){var f=i("rating_info_"+e);f.style.display="none";var g=i("noRatingsYet");
if(g){g.style.display="none"}var h=i("communityRating");if(h){h.style.display="inline"}f.innerHTML="";if(!b||!a.responseXML){f.innerHTML=MSG_UNKNOWN_ERROR}else{var j=a.responseXML.documentElement,k=parseInt(J(j,"user_rating"),10);if(j.tagName=="error"){var l=J(j,"errormessage");f.innerHTML=l;Qc(k,e)}else{var n=parseFloat(J(j,"community_rating")),m=parseInt(J(j,"num_raters"),10);if(window.VP_numVotes&&m<VP_numVotes){n=VP_numVotes*VP_communityRating+k;n/=VP_numVotes+1;m=VP_numVotes+1;if(VP_userHasRated){m=
VP_numVotes}}Qc(k,"top");Qc(k,"top_bottom");Qc(k,"bottom_bottom");if(e=="top"&&h){h.style.display="none"}f.innerHTML=MSG_ANNOTATION_SAVED;Wf=k;ep(n,m)}}f.style.display="inline";setTimeout("hideRatingsStatusMessage()",5000)}function oi(){var a=i("rating_info_top");if(a){a.style.display="none";a.innerHTML=""}var b=i("rating_info_top_bottom");if(b){b.style.display="none";b.innerHTML=""}var c=i("rating_info_bottom_bottom");if(c){c.style.display="none";c.innerHTML=""}var d=i("rating_info_top_frame");if(d){d.style.display=
"none";d.innerHTML=""}var e=i("noRatingsYet");if(e){e.style.display="none"}var f=i("communityRating");if(f){f.style.display="inline"}}function Qc(a,b){oi();var c={};for(var d=1;d<6;d++){c[d]=i(d+"_"+b)}if(c[1]){c[1].src=a>=1?VP_largeStarLeftOn:VP_largeStarLeftOff}if(c[2]){c[2].src=a>=2?VP_largeStarMidOn:VP_largeStarMidOff}if(c[3]){c[3].src=a>=3?VP_largeStarMidOn:VP_largeStarMidOff}if(c[4]){c[4].src=a>=4?VP_largeStarMidOn:VP_largeStarMidOff}if(c[5]){c[5].src=a>=5?VP_largeStarRightOn:VP_largeStarRightOff}}
function Lj(a,b){if(b&&a>0){var c="";for(var d=0;d<a;d++){c=c+"<img src="+VP_smallStar+">"}for(var e=a;e<5;e++){c=c+"<img src="+VP_smallStarEmpty+">"}return c}return" "}function Bj(){if(!VP_allowAnnotations){return}Xn();if(VP_commentName&&VP_commentName!=""){if(i("reviewername_bottom")){Rb(i("reviewername_bottom"),VP_commentName)}if(i("reviewername_top")){Rb(i("reviewername_top"),VP_commentName)}}if(VP_showMoreTags==true){Uc("common_tags","true")}else{Uc("common_tags","false")}}function Xn(){var a=
eb(VP_annotationsCookieName);if(!a){rd()}else{if(a.length>0&&a.charAt(0)=="1"){VP_showMoreTags=true}else{VP_showMoreTags=false}if(a.length>1){if(a.length>21&&a.charAt(1)=="."&&a.charAt(21)=="."){VP_commentName=a.substr(22)}else{VP_commentName=a.substr(1)}}else{VP_commentName=""}}}function rd(){var a=eb(VP_annotationsCookieName),b=VP_showMoreTags?"1":"0";if(a&&a.length>21&&a.charAt(1)=="."&&a.charAt(21)=="."){b+=a.substring(1,22)}b+=VP_commentName;oc(VP_annotationsCookieName,b,VP_cookieDomain)}function Ag(a){var b=
"targetId="+a+"&functionName=pause";qi("proxyflashdiv","/proxy.swf",b)}function qi(a,b,c){var d;if(pd){d='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'}else{d='data="'+b+'"'}i(a).innerHTML="<object "+d+' width="1" height="1" id="VideoDataStore" align="middle"><param name="movie" value="'+b+'" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="scale" value="noScale" /><param name="wmode" value="window" /><param name="salign" value="TL" /><param name="FlashVars" value="'+
c+'" /></object>'}function ep(a,b){for(var c=1;c<=5;c++){var d=i("star"+c);if(d){if(c-0.25<a){d.src=VP_smallStar}else if(c-0.75<=a){d.src=VP_smallStarHalf}else{d.src=VP_smallStarEmpty}}}if(i("numOfRaters")){i("numOfRaters").innerHTML=b}}function Jg(){if(!VP_subtitleEnabled){return""}else{return"&subtitle="+(VP_subtitleOn?"on":"off")}}function cj(a,b){if(a=="subtitleUpdate"){var c=b.split(",");VP_subtitleEnabled=c[0]=="true"?true:false;VP_subtitleOn=c[1]=="true"?true:false}}function co(a){try{if(top==
window){window.location.replace(a)}}catch(b){}};function On(){var a=i("videopurchasediv"),b=i("videopurchaseiframe");if(a&&b){a.style.height=Gb;b.style.height=Gb}}function Yo(){s(i("thumbsetc"));s(i("purchaseorthumbs"));t(i("videopurchasediv"));t(i("thumbsorpurchase"));Gb=Ub-i("abovecorner").offsetHeight-mg;i("corner").style.height=Gb;i("videopurchasediv").style.height=Gb;i("videopurchaseiframe").style.height=Gb}function Zo(){s(i("videopurchasediv"));s(i("thumbsorpurchase"));t(i("thumbsetc"));t(i("purchaseorthumbs"))}function Nn(a,b,c,d){t(i("directdownloaddiv"));
s(i("gvpdownloaddiv"));t(i("videodownloaddiv"));if(i("macdownloaddiv")){s(i("macdownloaddiv"))}if(i("ipoddownloaddiv")){s(i("ipoddownloaddiv"))}if(i("pspdownloaddiv")){s(i("pspdownloaddiv"))}t(i(d+"downloaddiv"));window.setTimeout(function(){fg(i(d+"downloadlink").href)},0);Ag(a)}function $n(a){window.parent._gb_refreshGaiaBar();window.location.href=a};function Wn(a){if(window.RegExp&&window.encodeURIComponent){var b=encodeURIComponent(document.f.q.value);if(a.href.indexOf("q=")!=-1){a.href=a.href.replace(/([&?])q=[^&$]*/,"$1q="+b)}else{a.href+="&q="+b}}}function bp(a,b){a.blur();_stopB(b);var c=document.getElementById("morenavtab");if(c===null){c=document.getElementById("morenavtabsmall")}var d="";if(c.style.display===""){d="none"}c.style.display=d;return false}function _stopB(a){if(!a){a=window.event}a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}}
;window.animate=te;window.timedHideEle=Si;window.timedHideEleById=ap;window.appendElement=C;window.applyAnnotationsSettings=Bj;window.applyPlaylistSettings=Cj;window.backLinkClicked=Dj;window.blogpostInitialize=Fj;window.checkEnterKey=Hj;window.contents=Jj;window.DataStoreHandler=bj;window.DoFSCommand=cj;window.deleteCookie=Mj;window.disableButton=yg;window.discloseTags=Uc;window.donePlaying=Sj;window.doPause=Ag;window.doPlay=Qj;window.dropdownNav=Tj;window.ele=i;window.expand=Vj;window.flagVideo=
$j;window.flash7OrHigher=ak;window.FlashRequest=dj;window.flipAutoplay=bk;window.getCheckedValue=vk;window.getCheckedLabels=uk;window.getElementValue=J;window.getNoCacheURL=vb;window.getPrefCookie=xk;window.getSubtitleArgForFlash=Jg;window.getXmlDocument=Hb;window.goFullscreen=Ak;window.handleEmbedHTMLClick=bn;window.handlePickerClick=hn;window.handleSendEmailLinkClick=li;window.handleSharePanelClick=nn;window.hashTextToTime=mi;window.hideEle=s;window.hideRatingsStatusMessage=oi;window.insertHtmlInEle=
xn;window.initializeResultBoxes=wn;window.initPicker=un;window.isNoneSelected=zn;window.isVisName="isVisible";window[window.isVisName]=nc;window.labelVideo=An;window.loadEmailCookieForFromAndTo=Cn;window.loginButtonClicked=ui;window.massageReviewInput=Rb;window.markComment=Kn;window.monitorDivOffset=Ln;window.onDownloadClick=Nn;window.onWindowResize=yi;window.outStars=Pn;window.overStars=Sn;window.proceedToSubmit=Ai;window.processResponse=Bi;window.publishComment=Un;window.publishTag=Vn;window.qs=
Wn;window.recordFlaggedVideo=Zn;window.redirectToPurchase=$n;window.refreshVisibleTab=Di;window.reloadWithFrameIfNeeded=co;window.removeScrollBars=fo;window.resizePlayer=io;window.ResultBox=ij;window.resultBoxNextClicked=jo;window.resultBoxPrevClicked=ko;window.rowToggleAll=oo;window.saveCollapseDescr=zo;window.saveAnnotationsSettings=rd;window.saveVisibleTab=Ao;window.sendAjaxRequest=O;window.sendPlaylistNextRequest=Do;window.sendRequest=Oc;window.sendSendLinkRequest=Eo;window.setCookie=Ho;window.setElementDisplay=
td;window.setEmailCookieForFromAndTo=Jo;window.setMaxLength=Ko;window.setMyPlaylist=Mi;window.setPermanentCookie=oc;window.setSessionCookie=Pc;window.setStars=Lo;window.showEle=t;window.submitButtonClicked=To;window.switchTab=Xo;window.switchToPurchase=Yo;window.switchToThumbs=Zo;window.tagInputFieldOnKeyDown=$o;window.togDisp=bp;window.toggleRow=cp;window.toggleVisibility=dp;window.updateReviews=Vi;window.updateTags=pe;window.uploadedVideoUpdateMetadata=fp;window.vpseek=Yi;window.VMT_deselectMenu=
kj;window.VMT_hideMenu=lg;window.VMT_hideMenuButtonFromTimeout=lj;window.VMT_hideMenuTimeout=mj;window.VMT_persistMenu=oj;window.VMT_selectMenu=pj;window.VMT_showMenuFromButtonTimeout=rj;window.VMT_toggleMenu=sj;window.VP_linksArray=rc;
