var te=te||{},s=this;var nl=function(a,b){var c=a.split("."),d=s,e;while(e=c.shift()){if(!c.length&&na(b)){d[e]=b}else if(d[e]){d=d[e]}else{d=(d[e]={})}}},Vd=function(a){var b=a.split("."),c=s;for(var d;d=b.shift();){if(c[d]){c=c[d]}else{return null}}return c};var lm=function(){};var na=function(a){return typeof a!="undefined"};var F=function(a){return a instanceof Array||Oa(a)&&typeof a.join=="function"&&typeof a.reverse=="function"},bc=function(a){return Oa(a)&&typeof a.length=="number"};var W=
function(a){return typeof a=="string"};var gd=function(a){return typeof a=="number"},xb=function(a){return typeof a=="function"||!(!(a&&a.call))},Oa=function(a){return a!=null&&typeof a=="object"},ya=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(Oc)){return a[Oc]}if(!a[Oc]){a[Oc]=++cm}return a[Oc]};var Oc="closure_hashCode_",cm=0,Fk=function(a){if(Oa(a)){if(a.clone){return a.clone()}var b=F(a)?[]:{};for(var c in a){b[c]=Fk(a[c])}return b}return a},v=function(a,b){var c=a.ug;if(arguments.length>
2){var d=Array.prototype.slice.call(arguments,2);if(c){d.unshift.apply(d,c)}c=d}b=a.Pe||b;a=a.Oe||a;var e,f=b||s;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.ug=c;e.Pe=b;e.Oe=a;return e};var hm=function(a,b){for(var c in b){a[c]=b[c]}},Ea=function(){return(new Date).getTime()};var Cc=function(a,b){var c=b||{};for(var d in c){a=a.replace(new RegExp("\\{\\$"+d+"\\}","gi"),c[d])}return a},Wb=
function(a,b){nl(a,b)},Vb=function(a,b,c){a[b]=c};if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,e;if(!a)a=s;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){dm(this,a)};var dm=function(a,b){function c(){}c.prototype=b.prototype;a.ca=b.prototype;a.prototype=new c;a.prototype.constructor=a};Function.prototype.mixin=function(a){hm(this.prototype,a)};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(){var a;if(this.length){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(){var a;if(this.length){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}};var rb=function(){};rb.prototype.cf=false;rb.prototype.xa=function(){return this.cf};rb.prototype.dispose=function(){if(!this.cf){this.cf=true}};var Z=function(a,b){this.type=a;this.target=b;this.currentTarget=this.target};Z.inherits(rb);Z.prototype.wb=false;Z.prototype.wc=true;Z.prototype.stopPropagation=function(){this.wb=true};Z.prototype.preventDefault=function(){this.wc=false};var ra=function(a,b){return a.indexOf(b)==0},fa=function(a,b){var c=a.length-b.length;return c>=0&&a.lastIndexOf(b,c)==c};var Oh=function(a){return/^\s*$/.test(a)};var Fa=function(a){return a.replace(/^\s+|\s+$/g,"")};var sm=/^[a-zA-Z0-9\-_.!~*'()]*$/,zf=function(a){a=String(a);if(!sm.test(a)){return encodeURIComponent(a)}return a},yf=function(a){return decodeURIComponent(a.replace(/\+/g," "))},xf=function(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>")},Pa=function(a,b){if(b){return a.replace(Ih,
Jh).replace(Ph,Qh).replace(Mh,Nh).replace(Rh,Sh)}else{if(!pm.test(a))return a;if(a.indexOf(qm)!=-1){a=a.replace(Ih,Jh)}if(a.indexOf(vm)!=-1){a=a.replace(Ph,Qh)}if(a.indexOf(um)!=-1){a=a.replace(Mh,Nh)}if(a.indexOf(xm)!=-1){a=a.replace(Rh,Sh)}return a}},qm="&",vm="<",um=">",xm='"',Jh="&amp;",Qh="&lt;",Nh="&gt;",Sh="&quot;",Ih=/&/g,Ph=/</g,Mh=/>/g,Rh=/\"/g,pm=/[&<>\"]/,Am=function(a){if(Kh(a,"&")){if("document"in s&&!Kh(a,"<")){var b=s.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},Af=function(a,b){return xf(a.replace(/  /g," &#160;"),b)};var wf={"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\x0B",'"':'\\"',"'":"\\'","\\":"\\\\"},ym=function(a){a=
String(a);if(a.quote){return a.quote()}else{var b='"';for(var c=0;c<a.length;c++){b+=tm(a.charAt(c))}return b+'"'}},tm=function(a){if(a in wf){return wf[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 wf[a]=b},zm=function(a){var b={};for(var c=0;c<a.length;c++){b[a.charAt(c)]=true}return b},om=zm("()[]{}+-?*.$^|,:#<!\\"),Kh=function(a,b){return a.indexOf(b)!=-1},Wd=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 om){c="\\"+c}b+=c}return b};var wm=function(a){return a==null?"":String(a)};var Lh=function(){return Math.floor(Math.random()*2147483648).toString(36)+(Math.floor(Math.random()*2147483648)^(new Date).getTime()).toString(36)},rm=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=vf(y,A)||vf(n[2].length==0,m[2].length==0)||vf(n[2],m[2])}while(c==0)}return c},vf=function(a,b){if(a<b){return-1}else if(a>b){return 1}return 0};var Hb,Q,gc,Zh,Mm,Ya,Lm,Lf,Om,ae,$h,Nm,Kf;(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(s.navigator){var m=navigator.userAgent;a=typeof opera!="undefined";b=!a&&m.indexOf("MSIE")!=-1;c=!a&&m.indexOf("WebKit")!=-1;l=m.indexOf("iPhone")!=-1||m.indexOf("iPod")!=-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}Hb=a;Q=b;gc=d;Zh=e;Mm=f;Ya=c;Lm=g;Lf=y;Om=n;ae=h;$h=j;Nm=k;Kf=l})();var ai=function(a,b){return rm(a,b)},be=function(a){return ai(Lf,a)>=0};var P=function(a,b){if(a){this.init(a,b)}};P.inherits(Z);P.prototype.type=null;P.prototype.target=null;P.prototype.currentTarget=null;P.prototype.relatedTarget=null;P.prototype.offsetX=0;P.prototype.offsetY=0;P.prototype.clientX=0;P.prototype.clientY=0;P.prototype.screenX=0;P.prototype.screenY=0;P.prototype.button=0;P.prototype.keyCode=0;P.prototype.charCode=0;P.prototype.ctrlKey=false;P.prototype.altKey=false;P.prototype.shiftKey=false;P.prototype.metaKey=false;P.prototype.$a=null;P.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==wc){this.relatedTarget=a.fromElement}else if(this.type==Cd){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==Yc?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.$a=a;this.wc=null;this.wb=null};P.prototype.stopPropagation=function(){this.wb=true;if(this.$a.stopPropagation){this.$a.stopPropagation()}else{this.$a.cancelBubble=true}};P.prototype.preventDefault=function(){this.wc=false;if(!this.$a.preventDefault){this.$a.returnValue=
false;try{this.$a.keyCode=-1}catch(a){}}else{this.$a.preventDefault()}};P.prototype.dispose=function(){if(!this.xa()){Z.prototype.dispose.call(this);this.$a=null}};var Ka=function(){},cl=0;Ka.prototype.Gf=null;Ka.prototype.listener=null;Ka.prototype.proxy=null;Ka.prototype.src=null;Ka.prototype.type=null;Ka.prototype.capture=null;Ka.prototype.handler=null;Ka.prototype.key=0;Ka.prototype.removed=false;Ka.prototype.Re=false;Ka.prototype.init=function(a,b,c,d,e,f){if(xb(a)){this.Gf=true}else if(a&&a.L&&xb(a.L)){this.Gf=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.Re=
false;this.key=++cl;this.removed=false};Ka.prototype.L=function(a){if(this.Gf){return this.listener.call(this.handler||this.src,a)}return this.listener.L.call(this.listener,a)};var we=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 Nb=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=W(a)?a.split(""):a;for(var f=0;f<d;f++){if(f in e){b.call(c,e[f],f,a)}}}};var Ak=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=W(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},Ck=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=W(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 Dk=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=W(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 Mb=function(a,b){if(a.contains){return a.contains(b)}return we(a,b)>-1};var Bk=function(a,b){if(!Mb(a,b)){a.push(b)}};var oc=function(a,b){var c=we(a,b),d;if(d=c!=-1){Array.prototype.splice.call(a,c,1).length==1}return d};var Gg=function(a){if(F(a)){return a.concat()}else{var b=[];for(var c=0,d=a.length;c<d;c++){b[c]=a[c]}return b}};var zk=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(!F(d)){a.push(d)}else{a.push.apply(a,d)}}},Ek=function(a,
b,c,d){return Array.prototype.splice.apply(a,yd(arguments,1))},yd=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 Hh=function(a,b,c){for(var d in a){b.call(c,a[d],d,a)}};var jd=function(a){var b=[];for(var c in a){b.push(a[c])}return b},tf=function(a){var b=[];for(var c in a){b.push(c)}return b};var uf=function(a,b){var c;if(c=b in a){delete a[b]}return c};var nm=function(a,b,c){if(b in a){return a[b]}return c};var Gh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mm=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<Gh.length;f++){c=Gh[f];if(Object.prototype.hasOwnProperty.call(d,c)){a[c]=d[c]}}}};var sa=function(a,b){rb.call(this);this.ip=b;this.Hc=[];for(var c=0;c<a;c++){this.Qb(this.Fg())}};sa.inherits(rb);sa.prototype.Ye=null;sa.prototype.bf=null;sa.prototype.bd=function(a){this.Ye=a};sa.prototype.Si=function(a){this.bf=a};sa.prototype.sb=function(){if(this.Hc.length){return this.Hc.pop()}return this.Fg()};sa.prototype.Qb=function(a){if(this.Hc.length<this.ip){this.Hc.push(a)}else{this.Qg(a)}};sa.prototype.Fg=function(){if(this.Ye){return this.Ye()}else{return{}}};sa.prototype.Qg=function(a){if(this.bf){this.bf(a)}else{if(xb(a.dispose)){a.dispose()}else{for(var b in a){delete a[b]}}}};
sa.prototype.dispose=function(){if(!this.xa()){sa.ca.dispose.call(this);var a=this.Hc;while(a.length){this.Qg(a.pop())}this.Hc=null}};var Ub={},va={},wb={},xc=new sa(0,600);xc.bd(function(){return{r:0}});xc.Si(function(a){a.r=0});var Tb=new sa(0,600);Tb.bd(function(){return[]});Tb.Si(function(a){a.length=0;delete a.Zd;delete a.gi});var $g=new sa(0,600);$g.bd(function(){var a=function(b){return il.call(a.src,a.key,b)};return a});var fl=function(){return new Ka},Oe=new sa(0,600);Oe.bd(fl);var dl=function(){return new P},el=function(){var a=null;if(Q){a=new sa(0,600);a.bd(dl)}return a},Yg=el(),ll="on",Pe={};var o=function(a,b,c,d,
e){if(F(b)){for(var f=0;f<b.length;f++){o(a,b[f],c,d,e)}return null}var g=!(!d),h=va;if(!(b in h)){h[b]=xc.sb()}h=h[b];if(!(g in h)){h[g]=xc.sb();h.r++}h=h[g];var j=ya(a),k,l;if(!h[j]){k=(h[j]=Tb.sb());h.r++}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=$g.sb();n.src=a;l=Oe.sb();l.init(c,n,a,b,g,e);var m=l.key;n.key=m;k.push(l);Ub[m]=l;if(!wb[j]){wb[j]=Tb.sb()}wb[j].push(l);if(a.addEventListener){if(a==s||!a.Ig){a.addEventListener(b,
n,g)}}else{a.attachEvent(Zg(b),n)}return m},jl=function(a,b,c,d,e){if(F(b)){for(var f=0;f<b.length;f++){jl(a,b[f],c,d,e)}return null}var g=o(a,b,c,d,e),h=Ub[g];h.Re=true;return g},ga=function(a,b,c,d,e){if(F(b)){for(var f=0;f<b.length;f++){ga(a,b[f],c,d,e)}return null}var g=!(!d),h=hl(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 $c(h[f].key)}}return false},$c=function(a){if(!Ub[a]){return false}var b=Ub[a];if(b.removed){return false}var c=
b.src,d=b.type,e=b.proxy,f=b.capture;if(c.removeEventListener){if(c==s||!c.Ig){c.removeEventListener(d,e,f)}}else if(c.detachEvent){c.detachEvent(Zg(d),e)}var g=ya(c),h=va[d][f][g];if(wb[g]){var j=wb[g];oc(j,b);if(j.length==0){delete wb[g]}}b.removed=true;h.gi=true;Xg(d,f,g,h);delete Ub[a];return true},Xg=function(a,b,c,d){if(!d.Zd){if(d.gi){for(var e=0,f=0;e<d.length;e++){if(d[e].removed){Oe.Qb(d[e]);continue}if(e!=f){d[f]=d[e]}f++}d.length=f;d.gi=false;if(f==0){Tb.Qb(d);delete va[a][b][c];va[a][b].r--;
if(va[a][b].r==0){xc.Qb(va[a][b]);delete va[a][b];va[a].r--}if(va[a].r==0){xc.Qb(va[a]);delete va[a]}}}}},ml=function(a,b,c){var d=0,e=a==null,f=b==null,g=c==null;c=!(!c);if(!e){var h=ya(a);if(wb[h]){var j=wb[h];for(var k=j.length-1;k>=0;k--){var l=j[k];if((f||b==l.type)&&(g||c==l.capture)){$c(l.key);d++}}}}else{Hh(wb,function(n){for(var m=n.length-1;m>=0;m--){var y=n[m];if((f||b==y.type)&&(g||c==y.capture)){$c(y.key);d++}}})}return d};var hl=function(a,b,c){var d=va;if(b in d){d=d[b];if(c in d){d=
d[c];var e=ya(a);if(d[e]){return d[e]}}}return null};var ka="click",vc="mousedown",wc="mouseover",Cd="mouseout",Yc="keypress",Xc="keydown",Zg=function(a){if(a in Pe){return Pe[a]}return Pe[a]=ll+a},Zc=function(a,b,c,d){var e=1,f=va;if(b in f){f=f[b];if(c in f){f=f[c];var g=ya(a);if(f[g]){var h=f[g];if(!h.Zd){h.Zd=1}else{h.Zd++}try{var j=h.length;for(var k=0;k<j;k++){var l=h[k];if(l&&!l.removed){e&=Ne(l,d)!==false;if(l.Re){$c(l.key)}}}}finally{h.Zd--;Xg(b,c,g,h)}}}}return Boolean(e)},Ne=function(a,
b){return a.L(b)};var gl=function(a,b){if(W(b)){b=new Z(b,a)}else if(!(b instanceof Z)){var c=b;b=new Z(b.type,a);mm(b,c)}else{b.target=b.target||a}var d=1,e,f=b.type,g=va;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.Hd()){e.push(k)}for(var l=e.length-1;!b.wb&&l>=0;l--){b.currentTarget=e[l];d&=Zc(e[l],b.type,true,b)&&b.wc!=false}}if(j){if(h){for(var l=0;!b.wb&&l<e.length;l++){b.currentTarget=e[l];d&=Zc(e[l],b.type,false,b)&&b.wc!=false}}else{for(var n=
a;!b.wb&&n;n=n.Hd()){b.currentTarget=n;d&=Zc(n,b.type,false,b)&&b.wc!=false}}}return Boolean(d)},il=function(a,b){if(!Ub[a]){return true}var c=Ub[a],d=c.type,e=va;if(!(d in e)){return true}e=e[d];var f;if(Q){var g=b||Vd("window.event"),h=true in e;if(h){if(g.keyCode<0||g.returnValue!=undefined){return true}kl(g)}var j=ya(c.src),k=Yg.sb();k.init(g,this);f=true;try{if(h){var l=Tb.sb();for(var n=k.currentTarget;n;n=n.parentNode){l.push(n)}for(var m=l.length-1;!k.wb&&m>=0;m--){k.currentTarget=l[m];f&=
Zc(l[m],d,true,k)}for(var m=0;!k.wb&&m<l.length;m++){k.currentTarget=l[m];f&=Zc(l[m],d,false,k)}}else{f=Ne(c,k)}}finally{if(l){l.length=0;Tb.Qb(l)}k.dispose();Yg.Qb(k)}return f}var y=new P(b,this);try{f=Ne(c,y)}finally{y.dispose()}return f},kl=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 fb=function(a,b){this.width=na(a)?Number(a):undefined;this.height=na(b)?Number(b):undefined};fb.prototype.clone=function(){return new fb(this.width,this.height)};fb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};var yb=function(a,b){this.x=na(a)?Number(a):undefined;this.y=na(b)?Number(b):undefined};yb.prototype.clone=function(){return new yb(this.x,this.y)};yb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};var qf=function(a,b){a=Number(a);b=Number(b);
this.start=a<b?a:b;this.end=a<b?b:a};qf.prototype.clone=function(){return new qf(this.start,this.end)};qf.prototype.toString=function(){return"["+this.start+", "+this.end+"]"};var dc=function(a,b,c,d){this.left=na(a)?Number(a):undefined;this.top=na(b)?Number(b):undefined;this.width=na(c)?Number(c):undefined;this.height=na(d)?Number(d):undefined};dc.prototype.clone=function(){return new dc(this.left,this.top,this.width,this.height)};dc.prototype.toString=function(){return"("+this.left+", "+this.top+
" - "+this.width+"w x "+this.height+"h)"};var id=function(a,b,c,d){this.top=na(a)?Number(a):undefined;this.right=na(b)?Number(b):undefined;this.bottom=na(c)?Number(c):undefined;this.left=na(d)?Number(d):undefined};id.prototype.clone=function(){return new id(this.top,this.right,this.bottom,this.left)};id.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};id.prototype.contains=function(a){return em(this,a)};id.prototype.expand=function(a,b,c,d){if(Oa(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 em=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 Ge;var rc=function(){if(!Ge){Ge=new ua}return Ge},Tc=function(a){return a?new ua(ib(a)):rc()},Ug=function(){return rc().Ia()},Eb=function(a){return rc().Ed(a)},H=Eb,Sk=function(a,b,c){return rc().Ik(a,b,c)},Ok=Sk,Yk=function(a,b){Hh(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 Rg){a.setAttribute(Rg[d],c)}else{a[d]=c}})},Rg={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",
height:"height",width:"width",frameborder:"frameBorder"},Ie=function(a){var b=a||s||window,c=b.document;if(Ya&&!be("500")&&!Kf){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 fb(b.innerWidth,d)}var f=Tc(c),g=f.Bk()=="CSS1Compat"&&(!Hb||Hb&&be("9.50"))?c.documentElement:c.body;return new fb(g.clientWidth,g.clientHeight)},Tk=function(a){var b=a||s||window,c=b.document,d,e;if(!Ya&&c.compatMode=="CSS1Compat"){d=
c.documentElement.scrollLeft;e=c.documentElement.scrollTop}else{d=c.body.scrollLeft;e=c.body.scrollTop}return new yb(d,e)},Ad=function(a){if(Ya&&!be("500")&&!Kf){return null}else{return a.parentWindow||a.defaultView}},Qb=function(a,b){var c=rc();return c.u.apply(c,arguments)};var Rc=function(a){return rc().createElement(a)};var Rk=function(a,b){a.appendChild(b)},Vk=function(a){var b;while(b=a.firstChild){a.removeChild(b)}};var Uk=function(a,b){if(b.parentNode){b.parentNode.insertBefore(a,b.nextSibling)}},
sc=function(a){return a.parentNode?a.parentNode.removeChild(a):null};var Pk=Ya&&ai(Lf,"521")<=0,Fe=function(a,b){if(typeof a.contains!="undefined"&&!Pk&&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 ib=function(a){return a.nodeType==9?a:a.ownerDocument||a.document};var Zk=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=ib(a);a.appendChild(c.createTextNode(b))}},Sc=function(a,b){var c=[];Tg(a,b,c,true);return c.length?c[0]:undefined};var Tg=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}}Tg(f,b,c,d)}}},Qk={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Sg={IMG:" ",BR:"\n"},He=function(a){if(Q&&"innerText"in a){return a.innerText.replace(/(\r\n|\r|\n)/g,
"\n")}var b=[];Vg(a,b,true);var c=b.join("").replace(/ +/g," ");if(c!=" "){c=c.replace(/^\s*/,"")}return c};var Vg=function(a,b,c){if(a.nodeName in Qk){}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 Sg){b.push(Sg[a.nodeName])}else{var d=a.firstChild;while(d){Vg(d,b,c);d=d.nextSibling}}};var ua=function(a){this.qa=a||s.document||document};ua.prototype.Ia=function(){return this.qa};ua.prototype.Ed=function(a){if(W(a)){return this.qa.getElementById(a)}else{return a}};
ua.prototype.Ik=function(a,b,c){var d=a||"*",e=c||this.qa,f=e.getElementsByTagName(d);if(b){var g=[];for(var h=0,j;j=f[h];h++){if(Mb(j.className.split(" "),b)){g.push(j)}}return g}else{return f}};ua.prototype.u=function(a,b){if(Q&&b&&b.name){a="<"+a+' name="'+Pa(b.name)+'">'}var c=this.createElement(a);if(b){Yk(c,b)}if(arguments.length>2){function d(g){if(g){this.appendChild(c,W(g)?this.createTextNode(g):g)}}for(var e=2;e<arguments.length;e++){var f=arguments[e];if((bc(f)||Ya&&typeof f=="function"&&
typeof f.length=="number")&&!(Oa(f)&&f.nodeType>0)){Nb(F(f)?f:Gg(f),d,this)}else{d.call(this,f)}}}return c};ua.prototype.createElement=function(a){return this.qa.createElement(a)};ua.prototype.createTextNode=function(a){return this.qa.createTextNode(a)};ua.prototype.Bk=function(){if(this.qa.compatMode){return this.qa.compatMode}if(Ya){var a=this.u("div",{style:"position:absolute;width:0;height:0;width:1"}),b=a.style.width=="1px"?"BackCompat":"CSS1Compat";return this.qa.compatMode=b}return"BackCompat"};
ua.prototype.appendChild=Rk;ua.prototype.$m=Vk;ua.prototype.removeNode=sc;ua.prototype.contains=Fe;var gb="complete";var Ch=function(){return Dh()};var Dh=null,Fh=null,rf=null,km=function(a,b){Dh=a;Fh=b;rf=null},im=function(){var a=Eh();if(a){return new ActiveXObject(a)}else{return new XMLHttpRequest}},jm=function(){var a=Eh(),b={};if(a){b[0]=true;b[1]=true}return b};km(im,jm);var sf=null,Eh=function(){if(!sf&&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);
sf=c;return c}catch(d){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return sf};;var J=function(){};J.inherits(rb);J.prototype.Hd=function(){return null};J.prototype.addEventListener=function(a,b,c,d){o(this,a,b,c,d)};J.prototype.removeEventListener=function(a,b,c,d){ga(this,a,b,c,d)};J.prototype.dispatchEvent=function(a){return gl(this,a)};J.prototype.dispose=function(){if(!this.xa()){rb.prototype.dispose.call(this);ml(this)}};J.prototype.Ig=true;var Ah=function(a){return eval("("+a+")")};var hd=function(){};hd.prototype.Oi=function(a,b){switch(typeof a){case "string":this.Ni(a,b);break;case "number":this.An(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(F(a)){this.zn(a,b);break}this.Bn(a,b);break;default:throw Error("Unknown type: "+typeof a);}};var pf={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"};
hd.prototype.Ni=function(a,b){b.push('"',a.replace(/[\\\"\x00-\x1f\x80-\uffff]/g,function(c){if(c in pf){return pf[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 pf[c]=e+d.toString(16)}),'"')};hd.prototype.An=function(a,b){b.push(isFinite(a)&&!isNaN(a)?a:"null")};hd.prototype.zn=function(a,b){var c=a.length;b.push("[");var d="";for(var e=0;e<c;e++){b.push(d);this.Oi(a[e],b);d=","}b.push("]")};hd.prototype.Bn=function(a,b){b.push("{");var c=
"";for(var d in a){b.push(c);this.Ni(d,b);b.push(":");this.Oi(a[d],b);c=","}b.push("}")};var Df=function(a){if(typeof a.Q=="function"){return a.Q()}if(W(a)){return a.split("")}if(bc(a)){var b=[],c=a.length;for(var d=0;d<c;d++){b.push(a[d])}return b}return jd(a)},Uh=function(a){if(typeof a.ia=="function"){return a.ia()}if(typeof a.Q=="function"){return undefined}if(bc(a)||W(a)){var b=[],c=a.length;for(var d=0;d<c;d++){b.push(d)}return b}return tf(a)};var Ga=function(a,b,c){if(typeof a.forEach=="function"){a.forEach(b,c)}else if(bc(a)||W(a)){Nb(a,b,c)}else{var d=Uh(a),e=Df(a),f=e.length;
for(var g=0;g<f;g++){b.call(c,e[g],d&&d[g],a)}}};var Cm=function(a,b,c){if(typeof a.some=="function"){return a.some(b,c)}if(bc(a)||W(a)){return Dk(a,b,c)}var d=Uh(a),e=Df(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 T=function(a){this.l={};this.H=[];if(a){this.Ab(a)}},Bf=":",Th=Bf.charCodeAt(0);T.prototype.r=0;var Xd=function(a){a=String(a);if(a in Object.prototype){return Bf+a}else if(a.charCodeAt(0)==Th){return Bf+a}else{return a}},Bm=function(a){if(a.charCodeAt(0)==Th){return a.substring(1)}else{return a}};T.prototype.e=function(){return this.r};T.prototype.Q=function(){this.Ue();var a=[];for(var b=0;b<this.H.length;b++){var c=this.H[b];a.push(this.l[c])}return a};T.prototype.ia=function(){this.Ue();var a=
[];for(var b=0;b<this.H.length;b++){var c=this.H[b];a.push(Bm(c))}return a};T.prototype.$=function(a){return Xd(a)in this.l};T.prototype.gb=function(){return this.r==0};T.prototype.clear=function(){this.l={};this.H.length=0;this.r=0};T.prototype.remove=function(a){var b=Xd(a);if(uf(this.l,b)){this.r--;if(this.H.length>2*this.r){this.Ue()}return true}return false};T.prototype.Ue=function(){if(this.r!=this.H.length){var a=0,b=0;while(a<this.H.length){var c=this.H[a];if(c in this.l){this.H[b++]=c}a++}this.H.length=
b}if(this.r!=this.H.length){var d={},a=0,b=0;while(a<this.H.length){var c=this.H[a];if(!(c in d)){this.H[b++]=c;d[c]=1}a++}this.H.length=b}};T.prototype.get=function(a,b){var c=Xd(a);if(c in this.l){return this.l[c]}return b};T.prototype.set=function(a,b){var c=Xd(a);if(!(c in this.l)){this.r++;this.H.push(c)}this.l[c]=b};T.prototype.Ab=function(a){var b,c;if(a instanceof T){b=a.ia();c=a.Q()}else{b=tf(a);c=jd(a)}for(var d=0;d<b.length;d++){this.set(b[d],c[d])}};T.prototype.clone=function(){return new T(this)};var nb=function(a){this.l=new T;if(a){this.Ab(a)}},Cf=function(a){var b=typeof a;if(b=="object"){return"o"+ya(a)}else{return b.substr(0,1)+a}};nb.prototype.e=function(){return this.l.e()};nb.prototype.add=function(a){this.l.set(Cf(a),a)};nb.prototype.Ab=function(a){var b=Df(a),c=b.length;for(var d=0;d<c;d++){this.add(b[d])}};nb.prototype.remove=function(a){return this.l.remove(Cf(a))};nb.prototype.clear=function(){this.l.clear()};nb.prototype.gb=function(){return this.l.gb()};nb.prototype.contains=
function(a){return this.l.$(Cf(a))};nb.prototype.Q=function(){return this.l.Q()};nb.prototype.clone=function(){return new nb(this)};var Jk=function(a){var b=[];for(var c=0;c<a.length;c++){if(F(a[c])){b.push(Jk(a[c]))}else{b.push(a[c])}}return"[ "+b.join(", ")+" ]"},Kk=function(a,b){try{var c=Nk(a),d="Message: "+Pa(c.message)+'\nUrl: <a href="view-source:'+c.fileName+'" target="_new">'+c.fileName+"</a>\nLine: "+c.lineNumber+"\n\nBrowser stack:\n"+Pa(c.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Pa(Mk(b)+"-> ");return d}catch(e){return"Exception trying to expose exception! You win, we lose. "+e}},Nk=function(a){var b=Vd("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 Mk=function(a){return Qg(a||arguments.callee.caller,[])},Qg=function(a,b){var c=[];if(Mb(b,a)){c.push("[...circular reference...]")}else if(a&&b.length<50){c.push(Pg(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=Pg(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(Qg(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("")},Pg=function(a){if(!zd[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,".")}zd[a]=c}else{zd[a]="[Anonymous]"}}return zd[a]},Lk=function(a,b,c,d){if(Vd("document.all")){return""}var e=b||s,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]!=s&&e[h]!=Vd("document")&&e.hasOwnProperty(h)&&g<6){var j=Lk(a,e[h],f+h+".",g+1);if(j)return j}}return""},
zd={};var Qa=function(a,b,c){this.mq=Hk++;this.Qp=Ea();this.hb=a;this.lp=b;this.gp=c};Qa.prototype.Zg=null;Qa.prototype.Yg=null;var Hk=0;Qa.prototype.tf=function(){return this.gp};Qa.prototype.Jk=function(){return this.Zg};Qa.prototype.Fn=function(a){this.Zg=a};Qa.prototype.Kk=function(){return this.Yg};Qa.prototype.Gn=function(a){this.Yg=a};Qa.prototype.Kc=function(){return this.hb};Qa.prototype.$f=function(a){this.hb=a};Qa.prototype.rh=function(){return this.lp};Qa.prototype.sh=function(){return this.Qp};var ba=function(a){this.Pa=a;this.p=null;this.$b={};this.mc=[]};ba.prototype.hb=null;var bb=function(a,b){this.name=a;this.value=b};bb.prototype.toString=function(){return this.name};var bp=new bb("OFF",Infinity),Og=new bb("SHOUT",1200),Ae=new bb("SEVERE",1000),Be=new bb("WARNING",900),Ng=new bb("INFO",800),Ik=new bb("CONFIG",700),ze=new bb("FINE",500),$o=new bb("FINER",400),ap=new bb("FINEST",300),Zo=new bb("ALL",0),Ce=function(a){return Kg(a)};ba.prototype.ra=function(){return this.Pa};ba.prototype.ng=
function(a){this.mc.push(a)};ba.prototype.zi=function(a){return oc(this.mc,a)};ba.prototype.ka=function(){return this.p};ba.prototype.$f=function(a){this.hb=a};ba.prototype.Kc=function(){return this.hb};ba.prototype.Hk=function(){if(this.hb){return this.hb}if(this.p){return this.p.Hk()}return null};ba.prototype.Wd=function(a){if(this.hb){return a.value>=this.hb.value}if(this.p){return this.p.Wd(a)}return false};ba.prototype.log=function(a,b,c){if(!this.Wd(a)){return}var d=new Qa(a,String(b),this.Pa);
if(c){d.Fn(c);d.Gn(Kk(c,arguments.callee.caller))}this.Xl(d)};ba.prototype.severe=function(a,b){this.log(Ae,a,b)};ba.prototype.warning=function(a,b){this.log(Be,a,b)};ba.prototype.info=function(a,b){this.log(Ng,a,b)};ba.prototype.fine=function(a,b){this.log(ze,a,b)};ba.prototype.Xl=function(a){if(!this.Wd(a.Kc())){return}var b=this;while(b){b.Ij(a);b=b.ka()}};ba.prototype.Ij=function(a){for(var b=0;b<this.mc.length;b++){this.mc[b](a)}};ba.prototype.Mn=function(a){this.p=a};ba.prototype.qj=function(a,
b){this.$b[a]=b};var ye={},Qc=null,Mg=function(){if(!Qc){Qc=new ba("");ye[""]=Qc;Qc.$f(Ik)}};var Lg=function(){Mg();return Qc},Kg=function(a){Mg();var b=ye[a];if(b==null){b=Gk(a)}return b},Gk=function(a){var b=new ba(a),c=a.split("."),d=c[c.length-1];c.length=c.length-1;var e=c.join("."),f=Kg(e);f.qj(d,b);b.Mn(f);ye[a]=b;return b};var Db=function(a){this.Qf=a||"";this.Zm=Ea()};Db.prototype.ag=true;Db.prototype.Zi=true;Db.prototype.Yi=true;Db.prototype.kc=function(a){throw Error("Must override formatRecord");};var Ig=function(a){var b=new Date(a.sh());return Ob(b.getFullYear()-2000)+Ob(b.getMonth()+1)+Ob(b.getDate())+" "+Ob(b.getHours())+":"+Ob(b.getMinutes())+":"+Ob(b.getSeconds())+"."+Ob(Math.floor(b.getMilliseconds()/10))},Ob=function(a){if(a<10){return"0"+a}return String(a)},Jg=function(a,b){var c=a.sh()-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},xe=function(a){Db.call(this,a)};xe.inherits(Db);xe.prototype.kc=function(a){var b;switch(a.Kc()){case Og:b="dbg-sh";break;case Ae:b="dbg-sev";break;case Be:b="dbg-w";break;case Ng:b="dbg-i";break;case ze:default:b="dbg-f";break}var c=[];c.push(this.Qf);c.push(" ");if(this.ag){c.push("["+Ig(a)+"] ")}if(this.Zi){c.push("[");c.push(Af(Jg(a,this.Zm)));c.push("s] ")}if(this.Yi){c.push("[");c.push(Pa(a.tf()));c.push("] ")}c.push('<span class="'+
b+'">');c.push(xf(Af(Pa(a.rh()))));if(a.Jk()){c.push("<br>");c.push(xf(Af(a.Kk())))}c.push("</span><br>");return c.join("")};var De=function(a){Db.call(this,a)};De.inherits(Db);De.prototype.kc=function(a){var b=[];b.push(this.Qf);b[b.length]=" ";if(this.ag){b.push("[");b.push(Ig(a));b.push("] ")}if(this.Zi){b.push("[");b.push(Jg(a,this.Zm));b.push("s] ")}if(this.Yi){b.push("["+a.tf()+"] ")}b.push(a.rh());b.push("\n");return b.join("")};var sb=function(a,b){J.call(this);this.Td=a||1;this.Fe=b||Cb;this.vg=v(this.fo,this);this.Ob=Ea()};sb.inherits(J);sb.prototype.enabled=false;var Cb=s.window,tk=0.8;sb.prototype.ua=null;sb.prototype.setInterval=function(a){this.Td=a;if(this.ua&&this.enabled){this.stop();this.start()}else if(this.ua){this.stop()}};sb.prototype.fo=function(){if(this.enabled){var a=Ea()-this.Ob;if(a>0&&a<this.Td*tk){this.ua=this.Fe.setTimeout(this.vg,this.Td-a);return}this.kk();if(this.enabled){this.ua=this.Fe.setTimeout(this.vg,
this.Td);this.Ob=Ea()}}};sb.prototype.kk=function(){this.dispatchEvent("tick")};sb.prototype.start=function(){this.enabled=true;if(!this.ua){this.ua=this.Fe.setTimeout(this.vg,this.Td);this.Ob=Ea()}};sb.prototype.stop=function(){this.enabled=false;this.Fe.clearTimeout(this.ua);this.ua=null};sb.prototype.dispose=function(){if(!this.xa()){J.prototype.dispose.call(this);this.stop();this.Fe=null}};var E=function(){J.call(this);this.headers=new T};E.inherits(J);E.prototype.Mf=Ce("goog.net.XhrLite");E.prototype.zb=false;E.prototype.C=null;E.prototype.Je=null;E.prototype.Xh="";E.prototype.Wh="";E.prototype.Tc=0;E.prototype.Uc="";E.prototype.Ee=0;E.prototype.Wb=null;E.prototype.send=function(a,b,c,d){if(this.zb){throw Error("[goog.net.XhrLite] Object is active with another request");}var e=b||"GET";this.Xh=a;this.Uc="";this.Tc=0;this.Wh=e;this.zb=true;this.C=new Ch;this.Je=rf||(rf=Fh());this.C.onreadystatechange=
v(this.ce,this);try{this.ma("Opening Xhr");this.C.open(e,a,true)}catch(f){this.ma("Error opening Xhr: "+f.message);this.Wg(5,f);return}var g=c?String(c):"",h=this.headers.clone();if(d){Ga(d,function(j,k){h.set(k,j)})}if(e=="POST"&&!h.$("Content-Type")){h.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8")}Ga(h,function(j,k){this.C.setRequestHeader(k,j)},this);try{if(this.Wb){Cb.clearTimeout(this.Wb);this.Wb=null}if(this.Ee>0){this.ma("Will abort after "+this.Ee+"ms if incomplete");
this.Wb=Cb.setTimeout(v(this.ho,this),this.Ee)}this.ma("Sending request");this.C.send(g)}catch(f){this.ma("Send error: "+f.message);this.Wg(5,f)}};E.prototype.ho=function(){if(typeof te=="undefined"){}else if(this.C){this.Uc="Timed out after "+this.Ee+"ms, aborting";this.Tc=8;this.ma(this.Uc);this.dispatchEvent("timeout");this.abort(8)}};E.prototype.Wg=function(a,b){this.zb=false;this.C.abort();this.Uc=b;this.Tc=a;this.dispatchEvent(gb);this.dispatchEvent("error");this.kd()};E.prototype.abort=function(a){if(this.C){this.ma("Aborting");
this.zb=false;this.C.abort();this.Tc=a||7;this.dispatchEvent(gb);this.dispatchEvent("abort");this.kd()}};E.prototype.dispose=function(){if(!this.xa()){if(this.C){this.zb=false;this.C.abort();this.kd(true)}E.ca.dispose.call(this)}};E.prototype.ce=function(){if(!this.zb){return}if(typeof te=="undefined"){}else if(this.Je[1]&&this.Kd()==4&&this.Ld()==2){this.ma("Local request error detected and ignored")}else{this.dispatchEvent("readystatechange");if(this.Ph()){this.ma("Request complete");this.zb=false;
if(this.Nb()){this.dispatchEvent(gb);this.dispatchEvent("success")}else{this.Tc=6;this.Uc=this.Xk()+" ["+this.Ld()+"]";this.dispatchEvent(gb);this.dispatchEvent("error")}this.kd()}}};E.prototype.kd=function(a){if(this.C){this.C.onreadystatechange=this.Je[0]?lm:null;this.C=null;this.Je=null;if(this.Wb){Cb.clearTimeout(this.Wb);this.Wb=null}if(!a){this.dispatchEvent("ready")}}};E.prototype.Ph=function(){return this.Kd()==4};E.prototype.Nb=function(){switch(this.Ld()){case 0:case 200:case 304:return true;
default:return false}};E.prototype.Kd=function(){return this.C?this.C.readyState:0};E.prototype.Ld=function(){try{return this.Kd()>2?this.C.status:-1}catch(a){this.Mf.warning("Can not get status: "+a.message);return-1}};E.prototype.Xk=function(){try{return this.Kd()>2?this.C.statusText:""}catch(a){this.Mf.fine("Can not get status: "+a.message);return""}};E.prototype.lc=function(){return this.C?this.C.responseText:""};E.prototype.getResponseHeader=function(a){return this.C&&this.Ph()?this.C.getResponseHeader(a):
undefined};E.prototype.ma=function(a){this.Mf.fine(a+" ["+this.Wh+" "+this.Xh+" "+this.Ld()+"]")};var G=function(a){J.call(this);this.i=a||Tc()};G.inherits(J);var Hm=0;var Jf="Component already rendered",Xh="Unable to set parent component";G.prototype.Ma=null;G.prototype.i=null;G.prototype.nc=false;G.prototype.b=null;G.prototype.nm=null;G.prototype.p=null;G.prototype.$b=null;G.prototype.jd=null;G.prototype.gj=null;G.prototype.Ja=function(){return this.Ma||(this.Ma=this.Pk())};G.prototype.Ed=function(){return this.b};G.prototype.Ln=function(a){if(this==a){throw Error(Xh);}if(a&&this.p&&this.p.eh(this.Ma)){throw Error(Xh);
}this.p=a};G.prototype.ka=function(){return this.p};G.prototype.Hd=function(){return this.p};G.prototype.Sc=function(){return this.nc};G.prototype.u=function(){this.b=this.i.createElement("div")};G.prototype.render=function(a){this.me(a)};G.prototype.me=function(a,b){if(this.nc){throw Error(Jf);}if(!this.b){this.u()}if(a){a.insertBefore(this.b,b||null)}else{this.i.Ia().body.appendChild(this.b)}if(!this.p||this.p.Sc()){this.hc()}};G.prototype.decorate=function(a){if(this.nc){throw Error(Jf);}else if(a&&
this.hd(a)){this.gj=true;if(!this.i||this.i.Ia()!=ib(a)){this.i=Tc(a)}this.$e(a);this.hc()}else{throw Error("Invalid element to decorate");}};G.prototype.hd=function(a){return true};G.prototype.$e=function(a){this.b=a};G.prototype.hc=function(){this.nc=true;this.nf(function(a){if(a.Ed()){a.hc()}})};G.prototype.jc=function(){this.nf(function(a){if(a.Sc()){a.jc()}});this.nc=false};G.prototype.dispose=function(){if(!this.xa()){G.ca.dispose.call(this);if(this.nc){this.jc()}this.nf(function(a){a.dispose()});
if(!this.gj&&this.b){sc(this.b)}this.$b=null;this.jd=null;this.b=null;this.nm=null;this.p=null}};G.prototype.Pk=function(){return":"+Hm++};G.prototype.eh=function(a){return this.jd&&a?nm(this.jd,a)||null:null};G.prototype.nf=function(a,b){if(this.$b){Nb(this.$b,a,b)}};G.prototype.removeChild=function(a,b){if(a){var c=W(a)?a:a.Ja();a=this.eh(c);if(c&&a){uf(this.jd,c);oc(this.$b,a);if(b){a.jc();if(a.b){sc(a.b)}}a.Ln(null)}}if(!a){throw Error("Child is not in parent component");}return a};var pc=function(a,b){if(gc){a.setAttributeNS("http://www.w3.org/1999/xhtml","role","wairole:"+b);a.roleName=b}};var Pb=function(a,b,c){if(gc){a.setAttributeNS("http://www.w3.org/2005/07/aaa",b,c)}};var xa=function(a,b,c,d){J.call(this);if(!F(a)||!F(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.Tb=a;this.Ug=b;this.ff=c;this.oj=d;this.bc=[]};xa.inherits(J);var Na="begin",lb="animate",Bc=[],ac=null,th=function(){Cb.clearTimeout(ac);var a=Ea();Nb(Bc,function(b){if(b){b.cycle(a)}});ac=Bc.length==0?null:Cb.setTimeout(th,20)},Yl=function(a){if(!Mb(Bc,a)){Bc.push(a)}if(ac==null){ac=Cb.setInterval(th,
20)}},Sd=function(a){oc(Bc,a);if(Bc.length.length==0&&ac!=null){Cb.clearInterval(ac);ac=null}};xa.prototype.Ba=0;xa.prototype.dh=0;xa.prototype.sa=0;xa.prototype.Ub=null;xa.prototype.Vg=null;xa.prototype.If=null;xa.prototype.play=function(a){if(a||this.Ba==0){this.sa=0;this.bc=this.Tb}else if(this.Ba==1){return false}Sd(this);this.Ub=Ea();if(this.Ba==-1){this.Ub-=this.ff*this.sa}this.Vg=this.Ub+this.ff;this.If=this.Ub;if(this.sa==0){this.Xa(Na)}this.Xa("play");if(this.Ba==-1){this.Xa("resume")}this.Ba=
1;Yl(this);this.cycle(this.Ub);return true};xa.prototype.stop=function(a){Sd(this);this.Ba=0;if(a)this.sa=1;this.gg(this.sa);this.Xa("stop");this.Xa("end")};xa.prototype.pause=function(){if(this.Ba==1){Sd(this);this.Ba=-1;this.Xa("pause")}};xa.prototype.cycle=function(a){this.sa=(a-this.Ub)/(this.Vg-this.Ub);if(this.sa>=1)this.sa=1;this.dh=1000/(a-this.If);this.If=a;if(xb(this.oj)){this.gg(this.oj(this.sa))}else{this.gg(this.sa)}if(this.sa==1){this.Ba=0;this.Xa("finish");this.Xa("end");Sd(this)}else if(this.Ba==
1){this.Xa(lb)}};xa.prototype.gg=function(a){this.bc=new Array(this.Tb.length);for(var b=0;b<this.Tb.length;b++){this.bc[b]=(this.Ug[b]-this.Tb[b])*a+this.Tb[b]}};xa.prototype.Xa=function(a){this.dispatchEvent(new nf(a,this))};var nf=function(a,b){Z.call(this,a);this.coords=b.bc;this.x=b.bc[0];this.y=b.bc[1];this.z=b.bc[2];this.duration=b.ff;this.progress=b.sa;this.fps=b.dh;this.state=b.Ba;this.anim=b};nf.inherits(Z);nf.prototype.Cg=function(){return Ck(this.coords,Math.round)};var mb=function(a,b,c){this.target=a;this.handle=b||a;this.Ga=true;this.ud=false;this.limits=c||new dc;this.qa=this.target.ownerDocument||this.target.document;this.screenX=0;this.screenY=0;this.deltaX=0;this.deltaY=0;o(this.handle,vc,this.$i,true,this);o(this.qa,"mousemove",this.fi,false,this);o(this.qa,"mouseup",this.Tg,false,this)};mb.inherits(J);mb.prototype.xc=function(a){this.Ga=a};mb.prototype.dispose=function(){if(this.xa())return;J.prototype.dispose.call(this);ga(this.handle,vc,this.$i,true,
this);ga(this.qa,"mousemove",this.fi,false,this);ga(this.qa,"mouseup",this.Tg,false,this);delete this.target;delete this.handle};mb.prototype.$i=function(a){if(this.Ga&&!this.ud){var b=this.dispatchEvent(new fd("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.ud=true;a.preventDefault()}}};mb.prototype.Tg=function(a){if(this.ud){this.ud=false;var b=this.Zh(this.deltaX),c=this.$h(this.deltaY);
this.dispatchEvent(new fd("end",this,a.clientX,a.clientY,a,b,c))}};mb.prototype.fi=function(a){if(this.ud&&this.Ga){var b=a.screenX-this.screenX,c=a.screenY-this.screenY;this.deltaX+=b;this.deltaY+=c;var d=this.Zh(this.deltaX),e=this.$h(this.deltaY);this.screenX=a.screenX;this.screenY=a.screenY;var f=this.dispatchEvent(new fd("beforedrag",this,a.clientX,a.clientY,a,d,e));if(f!==false){this.gk(d,e);this.dispatchEvent(new fd("drag",this,a.clientX,a.clientY,a,d,e));a.preventDefault()}}};mb.prototype.Zh=
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))};mb.prototype.$h=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))};mb.prototype.gk=function(a,b){this.target.style.left=a+"px";this.target.style.top=b+"px"};var fd=function(a,
b,c,d,e,f,g){Z.call(this,a);this.type=a;this.clientX=c;this.clientY=d;this.browserEvent=e;this.left=na(f)?f:b.deltaX;this.top=na(g)?g:b.deltaY;this.dragger=b};fd.inherits(Z);var Ef,zb=function(a,b,c){a.style[Em(b)]=c};var Dm=function(a,b){var c=ib(a);if(c.defaultView&&c.defaultView.getComputedStyle){var d=c.defaultView.getComputedStyle(a,"");if(d){return d[b]}}return null};var Ff=function(a,b){return Dm(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style[b]};var Hf=function(a,b,c){var d,e;if(b instanceof yb){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 Vh=function(a){var b;if(a){if(a.nodeType==
9){b=a}else{b=ib(a)}}else{b=Ug()}if(Q&&b.compatMode!="CSS1Compat"){return b.body}return b.documentElement},Dc=function(a){var b=ib(a),c=gc&&b.getBoxObjectFor&&Ff(a,"position")=="absolute"&&(a.style.top==""||a.style.left=="");if(typeof Ef=="undefined"){Ef=Zh&&!be("1.8.0.11")}var d=new yb(0,0),e=Vh(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&&!Ef){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(Hb||Ya&&Ff(a,"position")=="absolute"){d.y-=b.body.offsetTop}f=a.offsetParent;while(f&&f!=b.body){d.x-=f.scrollLeft;if(!Hb||f.tagName!="TR"){d.y-=f.scrollTop}f=f.offsetParent}}return d};var Yd=function(a,b,c){var d=Dc(a);if(b instanceof yb){c=b.y;b=b.x}var e=b-d.x,f=c-d.y;Hf(a,a.offsetLeft+e,a.offsetTop+
f)},fc=function(a,b,c){var d;if(b instanceof fb){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},ia=function(a){if(Ff(a,"display")!="none"){return new fb(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 fb(e,f)};var Em=function(a){return String(a).replace(/\-([a-z])/g,
function(b,c){return c.toUpperCase()})};var Gf=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 Xa=function(a,b){a.style.display=b?"":"none"};var x=function(a,b,c){G.call(this,c);this.Z=a||"modal-dialog";this.ej=!(!b);this.Da=Yh};x.inherits(G);x.prototype.Z=null;x.prototype.ej=false;x.prototype.Am=0.3;x.prototype.Ge="";x.prototype.ac="";x.prototype.Da=null;x.prototype.da=false;x.prototype.va=null;x.prototype.X=null;x.prototype.Ca=null;x.prototype.yb=null;x.prototype.eg=null;x.prototype.Xb=null;x.prototype.oa=null;x.prototype.ga=null;x.prototype.Zf=function(a){this.ac=a;if(this.oa){this.oa.innerHTML=a}};x.prototype.hh=function(){if(!this.Sc()){this.render()}return this.oa};
x.prototype.u=function(){this.Eg();this.b=this.i.u("div",{className:this.Z,tabIndex:0},this.Ca=this.i.u("div",{className:this.Z+"-title",id:this.Ja()},this.yb=this.i.u("span",{className:this.Z+"-title-text"},this.Ge),this.Xb=this.i.u("span",{className:this.Z+"-title-close"})),this.oa=this.i.u("div",{className:this.Z+"-content"}),this.ga=this.i.u("div",{className:this.Z+"-buttons"}));this.eg=this.Ca.id;pc(this.b,"dialog");Pb(this.b,"labelledby",this.eg);if(this.ac){this.oa.innerHTML=this.ac}Xa(this.b,
false);if(this.Da){this.Da.Me(this.ga)}};x.prototype.Eg=function(){if(this.ej){this.X=this.i.u("iframe",{frameborder:0,style:"border: 0",className:this.Z+"-bg"});Xa(this.X,false);Gf(this.X,0)}this.va=this.i.u("div",{className:this.Z+"-bg"});Gf(this.va,this.Am);Xa(this.va,false)};x.prototype.render=function(a){if(this.Sc()){throw Error(Jf);}if(!this.b){this.u()}var b=a||this.i.Ia().body;this.Bi(b);x.ca.render.call(this,b)};x.prototype.Bi=function(a){if(this.X){a.appendChild(this.X)}a.appendChild(this.va)};
x.prototype.hd=function(a){return a&&a.tagName&&a.tagName=="DIV"&&x.ca.hd.call(this,a)};x.prototype.$e=function(a){this.b=a;pa(this.b,this.Z);var b=this.Z+"-content";this.oa=Sc(this.b,function(g){return g.nodeType==1&&qc(g,b)});if(this.oa){this.ac=this.oa.innerHTML}else{this.oa=this.i.u("div",{className:b});if(this.ac){this.oa.innerHTML=this.ac}this.b.appendChild(this.oa)}var c=this.Z+"-title",d=this.Z+"-title-text",e=this.Z+"-title-close";this.Ca=Sc(this.b,function(g){return g.nodeType==1&&qc(g,
c)});if(this.Ca){this.yb=Sc(this.Ca,function(g){return g.nodeType==1&&qc(g,d)});this.Xb=Sc(this.Ca,function(g){return g.nodeType==1&&qc(g,e)})}else{this.Ca=this.i.u("div",{className:c});this.b.insertBefore(this.Ca,this.oa)}if(this.yb){this.Ge=He(this.yb)}else{this.yb=this.i.u("span",{className:d},this.Ge);this.Ca.appendChild(this.yb)}Pb(this.b,"labelledby",this.eg);if(!this.Xb){this.Xb=this.i.u("span",{className:e},this.Ge);this.Ca.appendChild(this.Xb)}var f=this.Z+"-buttons";this.ga=Sc(this.b,function(g){return g.nodeType==
1&&qc(g,f)});if(this.ga){this.Da=new oa(this.i);this.Da.decorate(this.ga)}else{this.ga=this.i.u("div",{className:f});this.b.appendChild(this.ga);if(this.Da){this.Da.Me(this.ga)}}this.Eg();this.Bi(ib(this.b).body)};x.prototype.hc=function(){x.ca.hc.call(this);this.ef=new mb(this.b,this.Ca);o(this.Xb,ka,this.pi,false,this);o(this.ga,ka,this.mi,false,this);pc(this.b,"dialog");if(this.yb.id!==""){Pb(this.b,"labelledby",this.yb.id)}};x.prototype.jc=function(){ga(this.Xb,ka,this.pi,this);ga(this.ga,ka,
this.mi,this);if(this.pc()){this.Aa(false)}if(this.ef){this.ef.dispose();this.ef=null}x.ca.jc.call(this)};x.prototype.Aa=function(a){if(a==this.da){return}var b=this.i.Ia(),c=Ya?window:Ad(b)||window;if(!this.Sc()){this.render(b.body)}if(a){this.Hi();this.reposition();o(b,Xc,this.ni,true,this);o(c,"resize",this.oi,true,this)}else{ga(b,Xc,this.ni,true,this);ga(c,"resize",this.oi,true,this)}if(this.X){Xa(this.X,a)}Xa(this.va,a);Xa(this.b,a);if(a&&this.Jc().lh()){var d=this.ga.getElementsByTagName("button");
for(var e=0,f;f=d[e];e++){if(f.name==this.Jc().lh()){f.focus();break}}}this.da=a};x.prototype.pc=function(){return this.da};x.prototype.Hi=function(){if(this.X){Xa(this.X,false)}Xa(this.va,false);var a=this.i.Ia(),b=Ad(a)||window,c=Ie(b),d=a.body.scrollWidth,e=Math.max(a.body.scrollHeight,c.height);if(this.X){Xa(this.X,true);fc(this.X,d,e)}Xa(this.va,true);fc(this.va,d,e);var f=ia(this.b);this.ef.limits=new dc(0,0,d-f.width,e-f.height)};x.prototype.reposition=function(){var a=this.i.Ia(),b=Ad(a)||
window,c=Tk(b),d=c.x,e=c.y,f=ia(this.b),g=Ie(b),h=Math.max(d+g.width/2-f.width/2,0),j=Math.max(e+g.height/2-f.height/2,0);Hf(this.b,h,j)};x.prototype.pi=function(a){var b=this.Jc(),c=b.Ad();if(c){var d=b.get(c);if(this.dispatchEvent(new $d(c,d))){this.Aa(false)}}else{this.Aa(false)}};x.prototype.dispose=function(){if(!this.xa()){x.ca.dispose.call(this);if(this.va){sc(this.va);this.va=null}if(this.X){sc(this.X);this.X=null}}};x.prototype.Pi=function(a){this.Da=a;if(this.ga){this.Da.Me(this.ga)}};x.prototype.Jc=
function(){return this.Da};x.prototype.mi=function(a){if(a.target.tagName=="BUTTON"){var b=a.target.name,c=this.Jc().get(b);if(this.dispatchEvent(new $d(b,c))){this.Aa(false)}}};x.prototype.ni=function(a){if(a.keyCode==27){var b=this.Jc();if(b.Ad()){var c=b.get(b.Ad());if(this.dispatchEvent(new $d(b.Ad(),c))){this.Aa(false)}}else{this.Aa(false)}}};x.prototype.oi=function(a){this.Hi()};var $d=function(a,b){this.type="dialogselect";this.key=a;this.caption=b};$d.inherits(Z);var oa=function(a){this.i=
a||Tc();T.call(this)},Yh,Jm,Km,Im;oa.inherits(T);oa.prototype.Lg=null;oa.prototype.b=null;oa.prototype.yg=null;oa.prototype.set=function(a,b,c,d){T.prototype.set.call(this,a,b);if(c){this.Lg=a}if(d){this.yg=a}};oa.prototype.Me=function(a){this.b=a;this.render()};oa.prototype.render=function(){if(this.b){this.b.innerHTML="";Ga(this,function(a,b){this.b.appendChild(this.i.u("button",{name:b},a))},this)}};oa.prototype.decorate=function(a){if(!a||a.nodeType!=1){return}this.b=a;var b=this.b.getElementsByTagName("button");
for(var c=0,d,e,f;d=b[c];c++){e=d.name||d.id;f=He(d)||d.value;if(e){this.set(e,f,c==0,d.name=="cancel")}}};oa.prototype.lh=function(){return this.Lg};oa.prototype.Ad=function(){return this.yg};(function(){var a=Cc("OK"),b=Cc("Cancel"),c=Cc("Yes"),d=Cc("No"),e=Cc("Save"),f=Cc("Continue"),g=new oa;g.set("ok",a,true);g.set("cancel",b,false,true);Yh=g;var h=new oa;h.set("yes",c,true);h.set("no",d,false,true);Jm=h;var j=new oa;j.set("yes",c);j.set("no",d,true);j.set("cancel",b,false,true);Km=j;var k=new oa;
k.set("continue",f);k.set("save",e);k.set("cancel",b,true,true);Im=k})();var Ee=function(a){var b=a.className;return b?b.split(" "):[]},pa=function(a,b){var c=Ee(a),d=yd(arguments,1),e=1;for(var f=0;f<d.length;f++){if(!Mb(c,d[f])){c.push(d[f]);e&=1}else{e&=0}}a.className=c.join(" ");return Boolean(e)},Aa=function(a,b){var c=Ee(a),d=yd(arguments,1),e=0;for(var f=0;f<c.length;f++){if(Mb(d,c[f])){Ek(c,f--,1);e++}}a.className=c.join(" ");return e==d.length};var qc=function(a,b){return Mb(Ee(a),b)};;;var ea=function(a,b,c,d,e){xa.call(this,b,c,d,e);this.element=a};ea.inherits(xa);var Ud=function(a,b,c,d,e){ea.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fxdhtml.Slide] Start and end points must be 2D";return}var f=[Na,lb,"end"];o(this,f,this.pm,false,this)};Ud.inherits(ea);Ud.prototype.pm=function(a){this.element.style.left=Math.round(a.x)+"px";this.element.style.top=Math.round(a.y)+"px"};var zh=function(a,b,c,d){var e=[a.offsetLeft,a.offsetTop];o(this,Na,this.On,false,this);
Ud.call(this,a,e,b,c,d)};zh.inherits(Ud);zh.prototype.On=function(a){this.Tb=[this.element.offsetLeft,this.element.offsetTop]};var of=function(a,b,c,d,e){ea.apply(this,arguments);if(b.length!=2||c.length!=2){throw"[goog.fxdhtml.Slide] Start and end points must be 2D";return}var f=[Na,lb,"end"];o(this,f,this.ne,false,this);this.gm=Math.max(this.Ug[0],this.Tb[0]);this.em=Math.max(this.Ug[1],this.Tb[1])};of.inherits(ea);of.prototype.ne=function(a){this.Oj(Math.round(a.x),Math.round(a.y),this.gm,this.em);
this.element.style.width=Math.round(a.x)+"px";this.element.style.marginLeft=Math.round(a.x)-this.gm+"px";this.element.style.marginTop=Math.round(a.y)-this.em+"px"};of.prototype.Oj=function(a,b,c,d){this.element.style.clip="rect("+(d-b)+"px "+c+"px "+d+"px "+(c-a)+"px)"};var yh=function(a,b,c,d,e){ea.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=[Na,lb,"end"];o(this,f,this.un,false,this)};yh.inherits(ea);yh.prototype.un=
function(a){this.element.scrollLeft=Math.round(a.x);this.element.scrollTop=Math.round(a.y)};var wh=function(a,b,c,d,e){ea.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=[Na,lb,"end"];o(this,f,this.ne,false,this)};wh.inherits(ea);wh.prototype.ne=function(a){this.element.style.width=Math.round(a.x)+"px";this.element.style.height=Math.round(a.y)+"px"};var xh=function(a,b,c,d,e){ea.call(this,a,[b],[c],d,e);var f=[Na,lb,"end"];
o(this,f,this.nn,false,this)};xh.inherits(ea);xh.prototype.nn=function(a){this.element.style.width=Math.round(a.x)+"px"};var Td=function(a,b,c,d,e){ea.call(this,a,[b],[c],d,e);var f=[Na,lb,"end"];o(this,f,this.mn,false,this)};Td.inherits(ea);Td.prototype.mn=function(a){this.element.style.height=Math.round(a.x)+"px"};var Va=function(a,b,c,d,e){if(gd(b))b=[b];if(gd(c))c=[c];ea.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=[Na,
lb,"end"];o(this,f,this.vk,false,this)};Va.inherits(ea);Va.prototype.vk=function(a){Gf(this.element,a.x)};Va.prototype.show=function(a){this.element.style.display=""};Va.prototype.hide=function(a){this.element.style.display="none"};var am=function(a,b,c){Va.call(this,a,1,0,b,c)};am.inherits(Va);var Zl=function(a,b,c){Va.call(this,a,0,1,b,c)};Zl.inherits(Va);var bm=function(a,b,c){Va.call(this,a,1,0,b,c);o(this,Na,this.show,false,this);o(this,"end",this.hide,false,this)};bm.inherits(Va);var $l=function(a,
b,c){Va.call(this,a,0,1,b,c);o(this,Na,this.show,false,this)};$l.inherits(Va);var uh=function(a,b,c,d,e){ea.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=[Na,lb,"end"];o(this,f,this.se,false,this)};uh.inherits(ea);uh.prototype.se=function(a){var b="rgb("+a.Cg().join(",")+")";this.element.style.backgroundColor=b};var vh=function(a,b,c,d,e){ea.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=[Na,lb,"end"];o(this,f,this.se,false,this)};vh.inherits(ea);vh.prototype.se=function(a){var b="rgb("+a.Cg().join(",")+")";this.element.style.color="rgb("+b+")"};var O=function(a){if(a){this.za(a)}};O.prototype.za=function(a,b,c,d){this.ba=a;if(!c&&!d){if(fa(a,"?")){this.Jj=true;a=a.substring(0,a.length-1)}if(fa(a,"()")){if(fa(a,"name()")||fa(a,"count()")||fa(a,"position()")){var e=a.lastIndexOf("/");if(e!=-1){this.lf=a.substring(e+1);a=a.substring(0,e)}else{this.lf=a;a="."}if(this.lf=="count()"){this.$o=true}}}}this.aa=b||a.split("/");this.S=this.aa.length;this.Ob=this.aa[this.S-1];this.j=this.aa[0];if(this.S==1){this.Ji=this;this.Ud=ra(a,"$")}else{this.Ji=
Le(this.j,null,this,null);this.Ud=this.Ji.Ud;this.j=this.Ji.j}if(this.S==1&&!this.Ud){this.Kl=a=="."||a=="";this.Nl=ra(a,"@");this.Il=a=="*|text()";this.Hl=a=="@*";this.Jl=a=="*"}};O.prototype.Gb=function(){return this.ba};O.prototype.ka=function(){if(!this.qp){if(this.S>1){this.si=Le(null,this.aa.slice(0,this.aa.length-1),this,null)}this.qp=true}return this.si};O.prototype.th=function(){if(!this.mp){if(this.S>1){this.ii=Le(null,this.aa.slice(1),null,this)}this.mp=true}return this.ii};O.prototype.h=
function(a){if(a==null){a=q()}else if(this.Ud){a=a.Bd?a.Bd():q()}if(this.$o){var b=this.ja(a);return b.e()}if(this.S==1){return a.d(this.j)}else if(this.S==0){return a.get()}var c=a.a(this.j);if(c==null){return null}else{return this.th().h(c)}};O.prototype.ja=function(a,b){return this.uf(a,false,b)};O.prototype.D=function(a,b){return this.uf(a,true,b)};O.prototype.uf=function(a,b,c){if(a==null){a=q()}else if(this.Ud){a=a.Bd?a.Bd():q()}if(this.S==0&&b){return a}else if(this.S==0&&!b){return new M([a])}else if(this.S==
1){if(b){return a.a(this.j,c)}else{var d=a.a(this.j);if(d&&d.O()){return d.g()}else{return a.g(this.j)}}}else{var e=a.a(this.j,c);if(e==null&&b){return null}else if(e==null&&!b){return new Ja}return this.th().uf(e,b,c)}};O.prototype.Jj=false;O.prototype.aa=[];O.prototype.S=null;O.prototype.j=null;O.prototype.Ob=null;O.prototype.Kl=false;O.prototype.Nl=false;O.prototype.Il=false;O.prototype.Hl=false;O.prototype.Jl=false;O.prototype.lf=null;O.prototype.si=null;O.prototype.ii=null;var p=function(a){var b=
Bd[a];if(b==null){b=new O(a);Bd[a]=b}return b},Le=function(a,b,c,d){var e=a||b.join("/"),f=Bd[e];if(f==null){f=new O;f.za(e,b,c,d);Bd[e]=f}return f},Bd={};var gp=p("."),dp=p("*|text()"),ep=p("*"),cp=p("@*"),hp=p("name()"),fp=p("count()"),ip=p("position()");var Ra=function(){};Ra.prototype.get=function(){};Ra.prototype.set=function(a){};Ra.prototype.g=function(a){};Ra.prototype.a=function(a){};Ra.prototype.d=function(a){};Ra.prototype.o=function(a,b){};Ra.prototype.m=function(){};Ra.prototype.mb=function(a){};Ra.prototype.s=function(){};Ra.prototype.load=function(){};Ra.prototype.O=function(){};var Uc="NOT_LOADED",ub=function(){};ub.prototype.set=function(a){};ub.prototype.g=function(a){return new Ja};ub.prototype.a=function(a,b){return null};ub.prototype.d=
function(a){return null};ub.prototype.s=function(){var a="",b=this.m();if(this.Lc&&this.Lc()){a=this.Lc().s()+(b.indexOf("[")!=-1?"":"/")}return a+b};ub.prototype.load=function(){};ub.prototype.Lc=null;var tc=function(){};tc.prototype.add=function(a){};tc.prototype.get=function(a){};tc.prototype.n=function(a){};tc.prototype.e=function(){};tc.prototype.nb=function(a,b){};tc.prototype.removeNode=function(a){};var M=function(a){this.l={};this.Oa=[];this.Lb={};if(a){for(var b=0,c;c=a[b];b++){this.add(c)}}};
M.prototype.add=function(a){this.Oa.push(a);var b=a.m();if(b!=null){this.l[b]=a;this.Lb[b]=this.Oa.length-1}};M.prototype.get=function(a){return this.l[a]||null};M.prototype.n=function(a){return this.Oa[a]||null};M.prototype.e=function(){return this.Oa.length};M.prototype.nb=function(a,b){if(b==null){this.removeNode(a)}else{var c=this.Lb[a];if(c!=null){this.l[a]=b;this.Oa[c]=b}else{this.add(b)}}};M.prototype.removeNode=function(a){var b=this.Lb[a];if(b!=null){this.Oa.splice(b,1);delete this.l[a];
delete this.Lb[a];for(var c in this.Lb){if(this.Lb[c]>b){this.Lb[c]--}}}return b!=null};M.prototype.indexOf=function(a){return this.Lb[a]};var Ja=function(){M.call(this)};Ja.inherits(M);Ja.prototype.add=function(a){throw Error("Can't add to EmptyNodeList");};var N=Ce("goog.ds"),Vc=function(a,b){var c=function(){};c.prototype=a;var d=new c;d.m=function(){return b};return d};var Y=function(){this.Ec=new M;this.Fj=new T;this.bi={};this.Yd={};this.Ac={};this.Lo=0;this.Mh={}},Ke=null;Y.inherits(Ra);var q=function(){if(!Ke){Ke=new Y}return Ke};Y.prototype.T=function(a,b,c){var d=!(!b),e=c||a.m();if(!ra(e,"$")){e="$"+e}a.mb(e);this.Ec.add(a);this.Fj.set(e,d)};Y.prototype.yj=function(a,b){if(!this.pg){this.pg=v(this.Sl,this)}if(this.Ac[a]){var c=this.Ac[a].Gb();this.Ai(this.pg,c+"/...",a)}this.Ac[a]=p(b);this.N(this.pg,b+"/...",a);this.k(a)};Y.prototype.Sl=function(a,b){var c=
this.Ac[b];if(c){var d=c.Gb();if(a.indexOf(d)==0){this.k(b+a.substring(d.length))}else{this.k(b)}}};Y.prototype.Cd=function(a){if(this.Ac[a]){return this.Ac[a].D()}else{return this.Ec.get(a)}};Y.prototype.get=function(){return this.Ec};Y.prototype.set=function(a){throw Error("Can't set on DataManager");};Y.prototype.g=function(a){if(a){return new M([this.a(a)])}else{return this.Ec}};Y.prototype.a=function(a){return this.Cd(a)};Y.prototype.d=function(a){var b=this.Cd(a);return b?b.get():null};Y.prototype.m=
function(){return""};Y.prototype.s=function(){return""};Y.prototype.load=function(){var a=this.Ec.e();for(var b=0;b<a;b++){var c=this.Ec.n(b),d=this.Fj.get(c.m());if(d){c.load()}}};Y.prototype.O=function(){return false};Y.prototype.N=function(a,b,c){var d=0;if(fa(b,"/...")){d=1000;b=b.substring(0,b.length-4)}else if(fa(b,"/*")){d=1;b=b.substring(0,b.length-2)}c=c||"";var e=b+":"+c+":"+ya(a),f={dataPath:b,id:c,fn:a},g=p(b),h=ya(a);if(!this.Yd[h]){this.Yd[h]={}}this.Yd[h][e]={listener:f,items:[]};while(g){var j=
{listener:f,maxAncestors:d},k=this.bi[g.Gb()];if(k==null){k={};this.bi[g.Gb()]=k}k[e]=j;d=0;g=g.ka();this.Yd[h][e].items.push({key:e,obj:k})}};Y.prototype.og=function(a,b,c){var d=b.indexOf("*");if(d==-1){this.N(a,b,c);return}var e=b.substring(0,d)+"...",f="$";if(fa(b,"/...")){b=b.substring(0,b.length-4);f=""}var g=Wd(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.N(k,e,c);var l=ya(a);if(!this.Mh[l]){this.Mh[l]={}}var n=b+":"+
c;this.Mh[l][n]={listener:{dataPath:e,fn:k,id:c}}};Y.prototype.Ai=function(a,b,c){if(b&&fa(b,"/...")){b=b.substring(0,b.length-4)}else if(b&&fa(b,"/*")){b=b.substring(0,b.length-2)}this.bn(this.Yd,false,a,b,c)};Y.prototype.bn=function(a,b,c,d,e){var f=ya(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.Ai(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]}}}};Y.prototype.pn=
function(a){if(this.Ng){throw Error("Can not nest calls to runWithoutFiringDataChanges");}this.Ng=true;try{a()}finally{this.Ng=false}};Y.prototype.k=function(a){if(this.Ng){return}var b=p(a),c=0;while(b){var d=this.bi[b.Gb()];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.ka()}this.Lo++};var B=function(a,b,c){this.p=c;this.U=b;this.Ui(a)};B.prototype.Ui=function(a){this.j=a;this.K=null};B.prototype.get=function(){return!Oa(this.j)?this.j:this.g()};B.prototype.set=function(a){if(a&&Oa(this.j)){throw Error("Can't set group nodes to new values yet");}if(this.p){this.p.j[this.U]=a}this.j=a;this.K=null;q().k(this.s())};B.prototype.g=function(a){if(!this.j){return new Ja}if(!a||a=="*"){this.pa(false);return this.K}else if(a.indexOf("*")==-1){if(this.j[a]!=null){return new M([this.a(a)])}else{return new Ja}}else{throw new Error("Selector not supported yet ("+
a+")");}};B.prototype.pa=function(a){if(this.K&&!a){return}if(!Oa(this.j)){this.K=new Ja;return}var b=new M;if(this.j!=null){var c;if(F(this.j)){var d=this.j.length;for(var e=0;e<d;e++){var f=this.j[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.j){var j=this.j[h];if(j.m){b.add(j)}else if(!xb(j)){c=new B(j,h,this);b.add(c)}}}}this.K=b};B.prototype.a=function(a,b){if(!this.j){return null}var c=this.g().get(a);if(!c&&b){var d={};if(F(this.j)){d.id=a;this.j.push(d)}else{this.j[a]=
d}c=new B(d,a,this);if(this.K){this.K.add(c)}}return c};B.prototype.d=function(a){if(this.K){var b=this.g().get(a);return b?b.get():null}else if(this.j){return this.j[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(F(b)||Oa(b)){d=new B(b,a,this)}else{d=new uc(this.j,a,this)}}}if(F(this.j)){this.pa();var f=this.K.indexOf(a);if(b==null){var g=this.K.get(a);if(g){c=g.s()}this.j.splice(f,1)}else{if(f){this.j[f]=b}else{this.j.push(b)}}if(f==
null){e=true}this.K.nb(a,d)}else if(Oa(this.j)){if(b==null){this.pa();var g=this.K.get(a);if(g){c=g.s()}delete this.j[a]}else{if(!this.j[a]){e=true}this.j[a]=b}if(this.K){this.K.nb(a,d)}}var h=q();if(d){h.k(d.s());if(e&&this.O()){h.k(this.s());h.k(this.s()+"/count()")}}else if(c){h.k(c);if(this.O()){h.k(this.s());h.k(this.s()+"/count()")}}return d};B.prototype.m=function(){return this.U};B.prototype.mb=function(a){this.U=a};B.prototype.s=function(){var a="";if(this.p){a=this.p.s()+"/"}return a+this.U};
B.prototype.load=function(){};B.prototype.O=function(){return this.bp!=null?this.bp:F(this.j)};var uc=function(a,b,c){ub.call(this);this.U=b;this.p=a;this.pp=c||this.p};uc.inherits(ub);uc.prototype.get=function(){return this.p[this.U]};uc.prototype.set=function(a){var b=this.p[this.U];this.p[this.U]=a;if(b!=a){q().k(this.s())}};uc.prototype.m=function(){return this.U};uc.prototype.Lc=function(){return this.pp};var r=function(a,b){var c;if(a instanceof r){this.Sb(b==null?a.Nk():b);this.dd(a.yf());this.ze(a.Eh());this.te(a.mh());this.ye(a.xf());this.xe(a.wf());this.cd(a.Jd().clone());this.ue(a.ph())}else if(a&&(c=String(a).match(xk()))){this.Sb(!(!b));this.dd(c[1],true);this.ze(c[2],true);this.te(c[3],true);this.ye(c[4]);this.xe(c[5],true);this.cd(c[6]);this.ue(c[7],true)}else{this.Sb(!(!b));this.V=new S(null,this,this.Na)}};r.prototype.ta="";r.prototype.yc="";r.prototype.Za="";r.prototype.jb=null;r.prototype.Ra=
"";r.prototype.V=null;r.prototype.bb="";r.prototype.Ol=false;r.prototype.Na=false;r.prototype.toString=function(){if(this.Y){return this.Y}var a=[];if(this.ta){a.push(ue(this.ta,Fg),":")}if(this.Za){a.push("//");if(this.yc){a.push(ue(this.yc,Fg),"@")}a.push(Eg(this.Za));if(this.jb!=null){a.push(":",String(this.xf()))}}if(this.Ra){a.push(ue(this.Ra,yk))}var b=String(this.V);if(b){a.push("?",b)}if(this.bb){a.push("#",Eg(this.bb))}return this.Y=a.join("")};r.prototype.resolve=function(a){var b=this.clone(),
c=a.vl();if(c){b.dd(a.yf())}else{c=a.wl()}if(c){b.ze(a.Eh())}else{c=a.ql()}if(c){b.te(a.mh())}else{c=a.tl()}var d=a.wf();if(c){b.ye(a.xf())}else{c=a.sl();if(c){if(!/^\//.test(d)){d=b.wf().replace(/\/?[^\/]*$/,"/"+d)}}}if(c){b.xe(d)}else{c=a.ul()}if(c){b.cd(a.Tk())}else{c=a.rl()}if(c){b.ue(a.ph())}return b};r.prototype.clone=function(){return new uk(this.ta,this.yc,this.Za,this.jb,this.Ra,this.V.clone(),this.bb,this.Na)};r.prototype.yf=function(){return this.ta};r.prototype.dd=function(a,b){this.Ha();
delete this.Y;this.ta=b?Pc(a):a;if(this.ta){this.ta=this.ta.replace(/:$/,"")}return this};r.prototype.vl=function(){return!(!this.ta)};r.prototype.Eh=function(){return this.yc};r.prototype.ze=function(a,b){this.Ha();delete this.Y;this.yc=b?Pc(a):a;return this};r.prototype.wl=function(){return!(!this.yc)};r.prototype.mh=function(){return this.Za};r.prototype.te=function(a,b){this.Ha();delete this.Y;this.Za=b?Pc(a):a;return this};r.prototype.ql=function(){return!(!this.Za)};r.prototype.xf=function(){return this.jb};
r.prototype.ye=function(a){this.Ha();delete this.Y;if(a){a=Number(a);if(isNaN(a)||a<0){throw Error("Bad port number "+a);}this.jb=a}else{this.jb=null}return this};r.prototype.tl=function(){return this.jb!=null};r.prototype.wf=function(){return this.Ra};r.prototype.xe=function(a,b){this.Ha();delete this.Y;this.Ra=b?Pc(a):a;return this};r.prototype.sl=function(){return!(!this.Ra)};r.prototype.ul=function(){return this.V!==null&&this.V.toString()!==""};r.prototype.cd=function(a){this.Ha();delete this.Y;
if(a instanceof S){this.V=a;this.V.B=this;this.V.Sb(this.Na)}else{this.V=new S(a,this,this.Na)}return this};r.prototype.Tk=function(){return this.V.toString()};r.prototype.Jd=function(){return this.V};r.prototype.t=function(a,b){this.Ha();delete this.Y;this.V.set(a,b);return this};r.prototype.we=function(a,b){this.Ha();delete this.Y;if(!F(b)){b=[String(b)]}this.V.Rn(a,b);return this};r.prototype.vf=function(a){return this.V.get(a)};r.prototype.ph=function(){return this.bb};r.prototype.ue=function(a,
b){this.Ha();delete this.Y;this.bb=b?Pc(a):a;return this};r.prototype.rl=function(){return!(!this.bb)};r.prototype.Zl=function(){this.Ha();this.t("zx",Lh());return this};r.prototype.Ha=function(){if(this.Ol){throw Error("Tried to modify a read-only Uri");}};r.prototype.Sb=function(a){this.Na=a;if(this.V){this.V.Sb(a)}};r.prototype.Nk=function(){return this.Na};var uk=function(a,b,c,d,e,f,g,h){var j=new r(null,h);j.dd(a);j.ze(b);j.te(c);j.ye(d);j.xe(e);j.cd(f);j.ue(g);return j};var Pc=function(a){return a?
yf(a):""},Eg=function(a){if(W(a)){return encodeURIComponent(a)}return null},wk=/^[a-zA-Z0-9\-_.!~*'():\/;?]*$/,ue=function(a,b){var c=null;if(W(a)){c=a;if(!wk.test(c)){c=encodeURI(a)}if(c.search(b)>=0){c=c.replace(b,vk)}}return c},vk=function(a){var b=a.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)},ve=null,xk=function(){if(!ve){ve=/^(?:([^:\/?#]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/}return ve},Fg=/[#\/\?@]/g,yk=/[\#\?]/g;var S=
function(a,b,c){this.I=new T;this.B=b;this.Na=!(!c);if(a){var d=a.split("&");for(var e=0;e<d.length;e++){var f=d[e].split("="),g=yf(f[0]);g=this.rb(g);this.add(g,f.length>1?yf(f[1]):"")}}};S.prototype.r=0;S.prototype.e=function(){return this.r};S.prototype.add=function(a,b){this.oc();a=this.rb(a);if(!this.$(a)){this.I.set(a,b)}else{var c=this.I.get(a);if(F(c)){c.push(b)}else{this.I.set(a,[c,b])}}this.r++;return this};S.prototype.remove=function(a){a=this.rb(a);if(this.I.$(a)){this.oc();var b=this.I.get(a);
if(F(b)){this.r-=b.length}else{this.r--}return this.I.remove(a)}return false};S.prototype.clear=function(){this.oc();this.I.clear();this.r=0};S.prototype.gb=function(){return this.r==0};S.prototype.$=function(a){a=this.rb(a);return this.I.$(a)};S.prototype.ia=function(){var a=this.I.Q(),b=this.I.ia(),c=[];for(var d=0;d<b.length;d++){var e=a[d];if(F(e)){for(var f=0;f<e.length;f++){c.push(b[d])}}else{c.push(b[d])}}return c};S.prototype.Q=function(a){var b;if(a){var c=this.rb(a);if(this.$(c)){var d=
this.I.get(c);if(F(d)){return d}else{b=[];b.push(d)}}else{b=[]}}else{var e=this.I.Q();b=[];for(var f=0;f<e.length;f++){var g=e[f];if(F(g)){zk(b,g)}else{b.push(g)}}}return b};S.prototype.set=function(a,b){this.oc();a=this.rb(a);if(this.$(a)){var c=this.I.get(a);if(F(c)){this.r-=c.length}else{this.r--}}this.I.set(a,b);this.r++;return this};S.prototype.get=function(a,b){a=this.rb(a);if(this.$(a)){var c=this.I.get(a);if(F(c)){return c[0]}else{return c}}else{return b}};S.prototype.Rn=function(a,b){this.oc();
a=this.rb(a);if(this.$(a)){var c=this.I.get(a);if(F(c)){this.r-=c.length}else{this.r--}}if(b.length>0){this.I.set(a,b);this.r+=b.length}};S.prototype.toString=function(){if(this.Y){return this.Y}var a=[],b=0,c=this.I.ia();for(var d=0;d<c.length;d++){var e=c[d],f=zf(e),g=this.I.get(e);if(F(g)){for(var h=0;h<g.length;h++){if(b>0){a.push("&")}a.push(f,"=",zf(g[h]));b++}}else{if(b>0){a.push("&")}a.push(f,"=",zf(g));b++}}return this.Y=a.join("")};S.prototype.oc=function(){delete this.Y;if(this.B){delete this.B.Y}};
S.prototype.clone=function(){var a=new S;a.I=this.I.clone();return a};S.prototype.rb=function(a){var b=String(a);if(this.Na){b=b.toLowerCase()}return b};S.prototype.Sb=function(a){var b=a&&!this.Na;if(b){this.oc();Ga(this.I,function(c,d,e){var f=d.toLowerCase();if(d!=f){this.remove(d);this.add(f,c)}},this)}this.Na=a};var Rb=function(a,b){B.call(this,null,b,null);if(a){this.B=new r(a)}else{this.B=null}};Rb.inherits(B);Rb.prototype.ea=Uc;Rb.dataSources={};Rb.prototype.load=function(){if(this.B){Rb.dataSources[this.U]=this;N.info("Sending JS request for DataSource "+this.m()+" to "+this.B);this.ea="LOADING";var a=new r(this.B);a.we("callback","JsonReceive."+this.U);s.JsonReceive[this.U]=v(this.Tm,this);var b=Rc("script");b.src=a;Ok("head")[0].appendChild(b)}else{this.j={};this.ea=Uc}};Rb.prototype.Tm=function(a){this.Ui(a);
this.ea="LOADED";q().k(this.m())};s.JsonReceive={};var tb=function(a,b){if(!a){throw Error("Cannot create a fast data node without a data name");}this.__dataName=a;this.__parent=b};tb.prototype.m=function(){return this.__dataName};tb.prototype.mb=function(a){this.__dataName=a};tb.prototype.s=function(){var a;if(this.__parent){a=this.__parent.s()+"/"}else{a=""}return a+this.m()};var R=function(a,b,c){tb.call(this,b,c);this.$g(a)};R.inherits(tb);R.prototype.$g=function(a){for(var b in a){this[b]=a[b]}};var cb=function(a,b,c){if(F(a)){return new da(a,
b,c)}else if(Oa(a)){return new R(a,b,c)}else{return new jb(a,b,c)}},bl=new Ja;R.prototype.set=function(a){throw"Not implemented yet";};R.prototype.g=function(a){if(!a||a=="*"){return this}else if(a.indexOf("*")==-1){var b=this.a(a);return b?new da([b],null):new Ja}else{throw Error("Unsupported selector: "+a);}};R.prototype.ij=function(a){var b=this[a];if(b!=null&&!b.m){this[a]=cb(this[a],a,this)}};R.prototype.a=function(a,b){this.ij(a);var c=this[a]||null;if(c==null&&b){c=new R({},a,this);this[a]=
c}return c};R.prototype.o=function(a,b){if(b!=null){this[a]=b}else{delete this[a]}q().k(this.s()+"/"+a)};R.prototype.d=function(a){var b=this[a];if(b!=null){return b.m?b.get():b}else{return null}};R.prototype.O=function(){return false};R.prototype.Ka=function(){var a={};for(var b in this){if(!ra(b,"__")&&!xb(this[b])){a[b]=this[b].__dataName?this[b].Ka():this[b]}}return a};R.prototype.clone=function(){return cb(this.Ka(),this.m())};R.prototype.add=function(a){this.o(a.m(),a)};R.prototype.get=function(a){if(arguments.length==
0){return this}else{return this.a(a)}};R.prototype.n=function(a){var b=0;for(var c in this){if(!ra(c,"__")&&!xb(this[c])){if(b==a){this.ij(c);return this[c]}++b}}return null};R.prototype.e=function(){var a=0;for(var b in this){if(!ra(b,"__")&&!xb(this[b])){++a}}return a};R.prototype.nb=function(a,b){this.o(a,b)};R.prototype.removeNode=function(a){delete this[a]};var jb=function(a,b,c){this.na=a;tb.call(this,b,c)};jb.inherits(tb);jb.prototype.get=function(){return this.na};jb.prototype.set=function(a){if(F(a)||
Oa(a)){throw"can only set PrimitiveFastDataNode to primitive values";}this.na=a;q().k(this.s())};jb.prototype.g=function(){return bl};jb.prototype.a=function(a){return null};jb.prototype.d=function(a){return null};jb.prototype.o=function(a,b){throw Error("Cannot set a child node for a PrimitiveFastDataNode");};jb.prototype.O=function(){return false};jb.prototype.Ka=function(){return this.na};var da=function(a,b,c){this.F=[];for(var d=0;d<a.length;++d){var e=a[d].id||"["+d+"]";this.F.push(cb(a[d],
e,this));if(a[d].id){if(!this.l){this.l={}}this.l[a[d].id]=d}}tb.call(this,b,c)};da.inherits(tb);da.prototype.set=function(a){throw Error("Cannot set a FastListNode to a new value");};da.prototype.g=function(){return this};da.prototype.a=function(a,b){var c=this.Gd(a);if(c==null&&this.l){c=this.l[a]}if(c!=null&&this.F[c]){return this.F[c]}else if(b){this.o(a,{});return this.a(a)}else{return null}};da.prototype.d=function(a){var b=this.a(a);return b?b.get():null};da.prototype.Gd=function(a){if(a.charAt(0)==
"["&&a.charAt(a.length-1)=="]"){return Number(a.substring(1,a.length-1))}else{return null}};da.prototype.o=function(a,b){var c=this.F.length;if(b!=null){if(!b.m){b=cb(b,a,this)}var d=this.Gd(a);if(d!=null){if(d<0||d>=this.F.length){throw Error("List index out of bounds: "+d);}this.F[a]=b}else{if(!this.l){this.l={}}this.F.push(b);this.l[a]=this.F.length-1}}else{this.removeNode(a)}var e=q();e.k(this.s()+"/"+a);if(this.F.length!=c){this.Kf()}};da.prototype.Kf=function(){var a=q();a.k(this.s());a.k(this.s()+
"/count()")};da.prototype.O=function(){return true};da.prototype.Ka=function(){var a=[];for(var b=0;b<this.F.length;++b){a.push(this.F[b].Ka())}return a};da.prototype.add=function(a){if(!a.m){a=cb(a,String(this.F.length),this)}this.F.push(a);var b=q();b.k(this.s()+"/["+(this.F.length-1)+"]");this.Kf()};da.prototype.get=function(a){if(arguments.length==0){return this.F}else{return this.a(a)}};da.prototype.n=function(a){var b=this.F[a];return b!=null?b:null};da.prototype.e=function(){return this.F.length};
da.prototype.nb=function(a,b){throw Error("Setting child nodes of a FastListNode is not implemented, yet");};da.prototype.removeNode=function(a){var b=this.Gd(a);if(b==null&&this.l){b=this.l[a]}if(b!=null){this.F.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.s()+"/["+b+"]");this.Kf()}};da.prototype.indexOf=function(a){var b=this.Gd(a);if(b==null&&this.l){b=this.l[a]}if(b==null){throw Error("Cannot determine index for: "+
a);}return b};var vb=function(a,b,c,d,e){R.call(this,{},b,null);if(a){this.B=new r(a);this.C=new E;this.Up=!(!e);o(this.C,gb,this.Pj,false,this)}else{this.B=null}this.Ce=c;this.jf=d};vb.inherits(R);vb.prototype.Ce=null;vb.prototype.jf=null;vb.prototype.load=function(){N.info("Sending JS request for DataSource "+this.m()+" to "+this.B);if(this.B){if(this.Up){var a=this.B.Jd(),b=this.B.clone();b.cd(null);this.C.send(b,"POST",a)}else{this.C.send(this.B)}}else{this.ea=Uc}};vb.prototype.De=function(){q().k(this.m())};
vb.prototype.Pj=function(a){if(this.C.Nb()){N.info("Got data for DataSource "+this.m());var b=this.C.lc();if(this.Ce){var c=b.indexOf(this.Ce);b=b.substring(c+this.Ce.length)}if(this.jf){var d=b.lastIndexOf(this.jf);b=b.substring(0,d)}try{var e=eval("["+b+"][0]");this.$g(e);this.ea="LOADED"}catch(f){this.ea="FAILED";N.severe("Failed to parse data: "+f.message)}s.setTimeout(v(this.De,this),0)}else{N.info("Data retrieve failed for DataSource "+this.m());this.ea="FAILED"}};var $k=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");},al=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 ja=function(a,b,c){this.p=b;this.U=c||(a?a.nodeName:null);this.Jn(a)};ja.prototype.Jn=function(a){this.Qa=a;if(a!=null){switch(a.nodeType){case 2:case 3:this.na=a.nodeValue;break;case 1:if(a.childNodes.length==1&&a.firstChild.nodeType==3){this.na=a.firstChild.nodeValue}}}};ja.prototype.pa=function(){if(this.K){return}var a=new M;if(this.Qa!=null){var b=this.Qa.childNodes;for(var c=0,d;d=b[c];c++){if(d.nodeType!=3||!/^[\r\n\t ]*$/.test(d.nodeValue)){var e=new ja(d,this,d.nodeName);a.add(e)}}}this.K=
a};ja.prototype.Rj=function(){if(this.Dj){return}var a=new M;if(this.Qa!=null&&this.Qa.attributes!=null){var b=this.Qa.attributes;for(var c=0,d;d=b[c];c++){var e=new ja(d,this,d.nodeName);a.add(e)}}this.Dj=a};ja.prototype.get=function(){this.pa();return this.na!=null?this.na:this.K};ja.prototype.set=function(a){throw Error("Can't set on XmlDataSource yet");};ja.prototype.g=function(a){if(a&&a=="@*"){this.Rj();return this.Dj}else if(a==null||a=="*"){this.pa();return this.K}else{throw new Error("Unsupported selector");
}};ja.prototype.a=function(a){if(ra(a,"@")){var b=this.Qa.getAttributeNode(a.substring(1));return b?new ja(b,this):null}else{return this.g().get(a)}};ja.prototype.d=function(a){if(ra(a,"@")){var b=this.Qa.getAttributeNode(a.substring(1));return b?b.nodeValue:null}else{var b=this.a(a);return b?b.get():null}};ja.prototype.m=function(){return this.U};ja.prototype.mb=function(a){this.U=a};ja.prototype.s=function(){var a="";if(this.p){a=this.p.s()+(this.U.indexOf("[")!=-1?"":"/")}return a+this.U};ja.prototype.load=
function(){};var Me=function(){return $k("nothing")},Wc=function(a,b){ja.call(this,null,null,b);if(a){this.B=new r(a)}else{this.B=null}};Wc.inherits(ja);Wc.prototype.ea=Uc;Wc.prototype.load=function(){if(this.B){N.info("Sending XML request for DataSource "+this.m()+" to "+this.B);this.ea="LOADING";this.ep=new Sb(this.B,v(this.De,this),v(this.wk,this))}else{this.Qa=Me();this.ea=Uc}};Wc.prototype.De=function(){N.info("Got data for DataSource "+this.m());var a=this.ep.Uk(),b=a.responseXML;if(b&&!b.hasChildNodes()&&
Oa(a.responseText)){b=al(a.responseText)}if(!b||!b.hasChildNodes()){this.ea="FAILED";this.Qa=Me()}else{this.ea="LOADED";this.Qa=b.documentElement}if(this.m()){q().k(this.m())}};Wc.prototype.wk=function(){N.info("Data retrieve failed for DataSource "+this.m());this.ea="FAILED";this.Qa=Me();if(this.m()){q().k(this.m())}};var Sb=function(a,b,c){this.vc=null;this.np=b;this.um=c||this.hl;this.B=new r(a);this.Vl()};Sb.prototype.Vl=function(){this.vc=new Ch;if(this.vc){try{this.vc.onreadystatechange=v(this.ce,
this);this.vc.open("GET",String(this.B),true);this.vc.send(null)}catch(a){this.um.call(this)}}};Sb.prototype.ce=function(){var a=this.vc,b=a.readyState;if(b==4){var c=a.status,d;if(c==200||c==0){d=v(this.xm,this)}else{d=v(this.vm,this)}window.setTimeout(d,10)}};Sb.prototype.xm=function(){this.np(this)};Sb.prototype.vm=function(){this.um(this)};Sb.prototype.hl=function(){throw Error("Error fetching data from URL: "+this.B);};Sb.prototype.Uk=function(){return this.vc};var Wa=function(a){this.ei=a||100;this.Bb=[]};Wa.prototype.Xc=0;Wa.prototype.add=function(a){this.Bb[this.Xc]=a;this.Xc=(this.Xc+1)%this.ei};Wa.prototype.get=function(a){a=this.ki(a);return this.Bb[a]};Wa.prototype.set=function(a,b){a=this.ki(a);this.Bb[a]=b};Wa.prototype.e=function(){return this.Bb.length};Wa.prototype.gb=function(){return this.Bb.length==0};Wa.prototype.clear=function(){this.Bb.length=0;this.Xc=0};Wa.prototype.Q=function(){var a=this.e(),b=new Array(a);for(var c=0;c<a;c++){b[c]=
this.get(c)}return b};Wa.prototype.ia=function(){var a=[],b=this.e();for(var c=0;c<b;c++){a[c]=c}return a};Wa.prototype.$=function(a){return a<this.e()};Wa.prototype.ki=function(a){if(a>=this.Bb.length){throw Error("Out of bounds exception");}if(this.Bb.length<this.ei){return a}return(this.Xc+Number(a))%this.ei};var ca=function(a,b){this.Df=a||"";this.Qf=b||"";this.ri=[];this.Li=new Wa(500);this.je=v(this.be,this);this.of=new xe(this.Qf);this.Oo={};this.Yf(true);this.Ga=this.ih("enabled")=="1";s.setInterval(v(this.rn,this),7500)};ca.prototype.uo="LOGGING";ca.prototype.M=null;ca.prototype.kg=false;ca.prototype.Vd=false;ca.prototype.wg=null;ca.prototype.Vh=Ea();ca.prototype.init=function(){if(this.Ga){this.Of()}};ca.prototype.xc=function(a){this.Ga=a;if(this.Ga){this.Of();if(this.M){this.kj()}}this.Ri("enabled",
a?1:0)};ca.prototype.Yf=function(a){if(a==this.Vd){return}this.Vd=a;var b=Lg();if(a){b.ng(this.je)}else{b.zi(this.je)}};ca.prototype.be=function(a){if(this.Oo[a.tf()]){return}var b=this.of.kc(a);this.xo(b)};ca.prototype.xo=function(a){if(this.Ga){this.Of();this.Li.add(a);this.lg(a)}else{this.Li.add(a)}};ca.prototype.lg=function(a){this.ri.push(a);s.clearTimeout(this.wg);if(Ea()-this.Vh>750){this.jj()}else{this.wg=s.setTimeout(v(this.jj,this),250)}};ca.prototype.jj=function(){this.Vh=Ea();if(this.M){var a=
this.M.document.body,b=a&&a.scrollHeight-(a.scrollTop+a.clientHeight)<=100;this.M.document.write(this.ri.join(""));this.ri.length=0;if(b){this.M.scrollTo(0,1000000)}}};ca.prototype.wo=function(){var a=this.Li.Q();for(var b=0;b<a.length;b++){this.lg(a[b])}};ca.prototype.Of=function(){if(this.M&&!this.M.closed||this.kg){return}var a=this.ih("dbg","0,0,800,500").split(","),b=Number(a[0]),c=Number(a[1]),d=Number(a[2]),e=Number(a[3]);this.kg=true;this.M=window.open("","dbg"+this.Df,"width="+d+",height="+
e+",toolbar=no,resizable=yes,scrollbars=yes,left="+b+",top="+c+",status=no,screenx="+b+",screeny="+c);if(!this.M){if(!this.Ip){alert("Logger popup was blocked");this.Ip=true}}this.kg=false;if(this.M){this.kj()}};ca.prototype.kj=function(){if(!this.M){return}this.M.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.uo+"<br><small>Logger: "+this.Df+"</small></div><hr>";this.lg(a);this.wo()};ca.prototype.Ri=function(a,b){a+=this.Df;document.cookie=a+"="+encodeURIComponent(b)+";expires="+(new Date(Ea()+2592000000)).toUTCString()};ca.prototype.ih=function(a,b){a+=this.Df;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||""}};ca.prototype.rn=function(){if(!this.M||this.M.closed){return}var a=
this.M.screenX||this.M.screenLeft||0,b=this.M.screenY||this.M.screenTop||0,c=this.M.outerWidth||800,d=this.M.outerHeight||500;this.Ri("dbg",a+","+b+","+c+","+d)};var Hg=function(){this.je=v(this.be,this);this.of=new De;this.of.ag=false;this.Vd=false;this.fp=""};Hg.prototype.Yf=function(a){if(a==this.Vd){return}var b=Lg();if(a){b.ng(this.je)}else{b.zi(this.je);this.logBuffer=""}};Hg.prototype.be=function(a){var b=this.of.kc(a);if(window.console&&window.console.firebug){switch(a.Kc()){case Og:window.console.info(b);break;case Ae:window.console.error(b);break;case Be:window.console.warn(b);break;default:window.console.debug(b);break}}else if(window.console){window.console.log(b)}else{this.fp+=
b}};;var ee=function(){this.mc={};this.Lp={};this.No={}},Uf=null,Ec=function(){if(!Uf){Uf=new ee}return Uf};ee.prototype.fireEvent=function(a,b){var c=null;if(W(a)){c=new Z(a);var d=arguments[1];if(W(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 Z){c=a}this.Pm(c)};ee.prototype.Pm=function(a){var b=a.type,c=this.mc[b];if(c){var d=c(a),e;if(d){e=this.Lp[b]||[]}else{e=this.No[b]||[]}for(var f=0;f<e.length;f++){e[f](a)}}};ee.prototype.L=
function(a,b){this.mc[a]=b};var cc=function(a,b){if(a instanceof cc){this.Ta=a.io()}else if(bc(a)&&gm(a)){this.Ta=Gg(a)}else if(a instanceof fb){this.Ta=Bh(a.width,a.height)}else if(gd(a)&&gd(b)&&a>0&&b>0){this.Ta=Bh(a,b)}else{throw Error("Invalid argument(s) for Matrix contructor");}this.S=new fb(this.Ta.length,this.Ta[0].length)};var Bh=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},gm=function(a){var b=0;for(var c=0;c<a.length;c++){if(!bc(a[c])||b>0&&a[c].length!=b){return false}for(var d=
0;d<a[c].length;d++){if(!gd(a[c][d])){return false}}if(b==0){b=a[c].length}}return b!=0},fm=function(a,b,c){for(var d=0;d<a.zh().width;d++){for(var e=0;e<a.zh().height;e++){b.call(c,a.Zk(d,e),d,e,a)}}};cc.prototype.Ta=null;cc.prototype.S=null;cc.prototype.zh=function(){return this.S};cc.prototype.Zk=function(a,b){if(a<0||a>=this.S.width||b<0||b>this.S.height){return null}return this.Ta[a][b]};cc.prototype.io=function(){return this.Ta};cc.prototype.toString=function(){var a=0;fm(this,function(c){var d=
String(c).length;if(d>a){a=d}});var b=[];Nb(this.Ta,function(c,d){b.push("[ ");Nb(c,function(e,f){e=String(e);b.push((new Array(a-e.length+1)).join(" ")+e+" ")});b.push("]\n")});return b.join("")};var ec=function(a,b){this.x=Number(a)||0;this.y=Number(b)||0};ec.inherits(yb);ec.prototype.clone=function(){return new ec(this.x,this.y)};ec.prototype.magnitude=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};ec.prototype.scale=function(a){this.x*=a;this.y*=a;return this};ec.prototype.normalize=function(){return this.scale(1/this.magnitude())};ec.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};var Za=function(a,b){var c=b||window;if(a==Ai){this.aj="ParentStub"+Number(new Date);this.Pb="ChildStub"}else{this.aj="ChildStub";this.Pb=this.Rk();this.rc=c.opener||c.parent;if(this.Pb&&!this.rc[this.Pb]){var d=0;while(this.rc&&!this.rc[this.Pb]&&d<10){this.rc=this.rc.parent;d++}}c[Wf]=this}c[this.aj]=this.ao.bind(this);this.lo=a};Za.inherits(J);var Xf=function(a){var b=a||window;return b[Wf]};Za.prototype.Dn=function(a,b){this.rc=a;this.la=b};var Ai="Parent",zi="Child",Wf="__topLevelProxy__";Za.prototype.type=
null;Za.prototype.Rk=function(){var a=new r(document.location.href);return a.vf("eventCallback")};Za.prototype.Ah=function(){return this.aj};Za.prototype.ec=function(a){return this.Rm(a)};Za.prototype.Rm=function(a){var b=this.la?this.la.contentWindow:null,c=this.rc||b;if(this.Pb&&c&&c[this.Pb]){return c[this.Pb](a)}else{return true}};Za.prototype.ao=function(a){var b=J.prototype.dispatchEvent.call(this,a);return b};var Yf=function(){};Yf.inherits(J);Yf.prototype.Ti=function(a){this.tp=a};Yf.prototype.dispatchEvent=function(a){if(this.tp.ec(a)){J.prototype.dispatchEvent.call(this,a)}};var Ha=function(a){Za.call(this,Ai,a||window)};Ha.inherits(Za);var Bi=null,go=function(a){switch(a){case "NONE":return"0";case "THIN":return"1px solid black";case "OUTSET":return"2px outset black"}},jo=function(a,b,c){var d=b||{};d.border=d.border||"OUTSET";var e=new Fc(c);e.od(a,d,null);return e},io=function(a,b,c,d){var e=b||{};e.border=e.border||"NONE";var f=Eb(c),g=new hb(d);g.od(a,e,f);return g};Ha.prototype.od=function(a,b,c){};Ha.prototype.show=function(){};Ha.prototype.hide=function(){};Ha.prototype.dispose=
function(){};var lo=function(a,b){var c=b.serverbased?"widgets":"ui",d=new r(ko()+"/"+c+"/"+a),e=new r(document.location.href);if(e.vf("js")){d.t("js",e.vf("js"))}else{d.t("js","RAW")}if(b){Ga(b,function(f,g){if(f!=null){d.t(g,f)}})}return d},ko=function(){if(Bi){return Bi}else if(s.manifest){return s.manifest.serverBase}else{return""}};var ho=0;Wb("createIframeComponent",io);Wb("createIframeDialogComponent",jo);var hb=function(a){Ha.call(this,a)};hb.inherits(Ha);var fo=function(a,b,c,d){var e="hosted-"+ho++ +"-"+Number(new Date),f=H(e);if(!f){var g=new ua(d?ib(d):document);f=g.u("iframe",{id:e});zb(f,"display","block");zb(f,"backgroundColor","#FFF");zb(f,"border",go(c));zb(f,"margin","0");zb(f,"padding","0");zb(f,"overflow","hidden");fc(f,a,b)}return f};hb.prototype.od=function(a,b,c){this.B=lo(a,b);this.Do=b.border;this.da=!(b.hide=="true");this.lm=b.mock;this.yo=b.x||20;this.bq=b.y||20;this.aq=b.width||
600;this.So=b.height||480;this.jp=b.maximize=="true";this.Gm=b.position||"relative";this.Co=b.background;this.zo=b.zIndex;this.Pf=c;var d=fo(this.aq,this.So,this.Do,this.Pf);d.style.position=this.Gm;if(this.zo){d.style.zIndex=this.zo}if(this.Co){d.allowtransparency=true;d.style.backgroundColor="transparent"}if(!this.lm){this.B.t("eventCallback",this.Ah());this.B.t("js","RAW");this.B.Zl();d.src=this.B.toString();d.id=Lh()}this.kf(d);if(this.lm){new Za(zi,d.contentWindow);d.contentWindow[Wf].Pb=this.Ah()}this.Dn(d.contentWindow,
d)};hb.prototype.kf=function(a){this.la=a;if(this.Pf){this.Pf.appendChild(a);this.ig()}else{a.style.position="absolute";document.body.appendChild(a)}if(a.style.position=="absolute"){var b=this.da?this.yo:this.yo-4000;Yd(a,b,this.bq)}else{this.ig();if(!this.da){a.style.visibility="hidden"}}if(window.frames[a.id]){if(window.frames[a.id].location!=a.src){window.frames[a.id].location=a.src}}};hb.prototype.ig=function(){var a=this.nq||this.Pf;if(a&&this.jp){var b=ia(a);fc(this.la,b);if(this.Gm=="absolute"){var c=
Dc(a);if(!this.da){c.x-=4000}this.la.style.left=c.x+"px";this.la.style.top=c.y+"px"}}};hb.prototype.show=function(){this.da=true;this.ig();this.ec("PRESHOW");var a=this;s.setTimeout(function(){a.la.style.display="block";a.ec("SHOW")},5)};hb.prototype.hide=function(){this.la.style.display="none"};hb.prototype.dispose=function(){if(this.la!=null){this.la.parentNode.removeChild(this.la);this.la=null}Ha.prototype.dispose.call(this)};var Fc=function(a){hb.call(this,a)};Fc.inherits(hb);Fc.prototype.kf=function(a){if(gc){pa(document.body,"background")}var b=new x;b.hh().appendChild(a);b.Pi(new oa);b.Aa(this.da);this.af=b;this.la=a};Fc.prototype.show=function(){this.af.Aa(true)};Fc.prototype.hide=function(){this.af.Aa(false)};Fc.prototype.dispose=function(){this.af.dispose();Aa(document.body,"background");this.af=null;this.la=null;hb.prototype.dispose.call(this)};var za=function(){this.Hg={}};za.prototype.Hg=null;var Vf=null,co=function(){if(!Vf){Vf=new za}return Vf};za.prototype.jh=function(a){return this.Hg[a]};za.prototype.create=function(a,b,c){var d=this.jh(a);if(d){if(b){b=Eb(b)}return d(b,c,a)}};za.prototype.Dg=function(a){var b=this.jh(a);if(b){var c={},d=(new r(document.location.href)).Jd();Ga(d,function(g,h){c[h]=g});var e=new Za(zi),f=b(document.body,c,a);if(f.Ti){f.Ti(e)}}};za.prototype.Qe=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(ra(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.Qe(j)}}};za.prototype.ah=function(a){var b=Xf();if(b){if(W(a)){a=new Z(a)}return b.ec(a)}else{return true}};var eo=function(){Wb("Xuit",co());Vb(za.prototype,"buildUi",za.prototype.Qe);Vb(za.prototype,"create",za.prototype.create);Vb(za.prototype,"createAsFullPage",za.prototype.Dg);Vb(za.prototype,"fireHostedEvent",za.prototype.ah);Vb(Ha.prototype,"hide",Ha.prototype.hide);Vb(Ha.prototype,"show",Ha.prototype.show);Vb(Ha.prototype,"dispose",Ha.prototype.dispose)};eo();var ol=function(){};ol.prototype.decorate=function(a,b){if(Ya||Hb)return;var c=b||{},d=new ha,e=true,f=c.enabled;if(f){var g=new wa(f),h=g.P();for(var j=0;j<h.length;j++){q().N(pl.bind(null,d,g),h[j].Gb())}e=g.h()}var k=a.ownerDocument.createElement("div");while(a.childNodes.length>0){k.appendChild(a.firstChild)}d.Kn(b);d.Yl(a);d.Zf(k);d.xc(e);d.render(a);return d};var pl=function(a,b){a.xc(b.h())},ha=function(){this.Ua="#FCFCFC";this.Kg="#F4F4F4";this.fa="#B5B5B5";this.eb="#9CBED8";this.Wa="#B0B0B0";
this.Ga=true};ha.inherits(J);ha.prototype.render=function(a){this.c=a;o(a,ka,this.Oc,false,this);o(a,wc,this.Qc,false,this);o(a,Cd,this.kl,false,this);o(a,vc,this.Pc,false,this);o(a,"mouseup",this.ll,false,this)};ha.prototype.Kn=function(a){this.ge=a||{};this.Ua=this.ge["background-color"]||this.Ua;this.Kg=this.ge["down-background-color"]||this.Kg;this.fa=this.ge["border-color"]||this.fa;this.eb=this.ge["hover-border-color"]||this.eb;this.Wa=this.ge["down-border-color"]||this.Wa};ha.prototype.Yl=
function(a){this.c=a;this.sd=new ua(a.ownerDocument);pa(a,"goog-button");a.style.border="0";a.style.background="transparent";a.style.margin="0";a.style.padding="0";a=(this.Oh=a.appendChild(this.sd.u("div")));this.Rf=this.Wc(a,"l1","background-color:"+this.fa);this.tc=this.Wc(a,"l2","border-color: "+this.fa+";background-color: "+this.Ua);this.Wc(a,"l2","border-color: "+this.fa+";background-color: "+this.Ua);this.R=a.appendChild(this.sd.u("div",{"class":"mid",style:"border-color: "+this.fa+";background-color: "+
this.Ua+";padding: 1px 1px;"}));this.uc=this.Wc(a,"l2","border-color: "+this.fa+";background-color: "+this.Ua);this.Sf=this.Wc(a,"l1","background-color: "+this.fa)};ha.prototype.Wc=function(a,b,c){var d=a.appendChild(this.sd.u("div",{style:c,"class":b}));if(Q){d.style.width="100%"}d.appendChild(this.sd.u("img",{width:"1",height:"1",src:ma().Mc()+"/static/images/Transparent.gif"}));return d};ha.prototype.Oc=function(){this.dispatchEvent(ka)};ha.prototype.Xi=function(){this.Rf.style.backgroundColor=
this.fa;this.tc.style.borderColor=this.fa;this.tc.style.backgroundColor=this.Ua;this.R.style.borderLeft="1px solid "+this.fa;this.R.style.borderRight="1px solid "+this.fa;this.R.style.padding="1px 1px";this.R.style.backgroundColor=this.Ua;this.uc.style.borderColor=this.fa;this.uc.style.backgroundColor=this.Ua;this.Sf.style.backgroundColor=this.fa};ha.prototype.Un=function(){this.Rf.style.backgroundColor=this.eb;this.tc.style.borderColor=this.eb;this.tc.style.backgroundColor=this.eb;this.R.style.borderLeft=
"2px solid "+this.eb;this.R.style.borderRight="2px solid "+this.eb;this.R.style.padding="1px 0px";this.R.style.backgroundColor=this.Ua;this.uc.style.borderColor=this.eb;this.uc.style.backgroundColor=this.eb;this.Sf.style.backgroundColor=this.eb};ha.prototype.Tn=function(){this.Rf.style.backgroundColor=this.Wa;this.tc.style.borderColor=this.Wa;this.tc.style.backgroundColor=this.Wa;this.R.style.borderLeft="2px solid "+this.Wa;this.R.style.borderRight="2px solid "+this.Wa;this.R.style.padding="2px 0px";
this.R.style.backgroundColor=this.Kg;this.uc.style.borderColor=this.Wa;this.uc.style.backgroundColor=this.Wa;this.Sf.style.backgroundColor=this.Wa};ha.prototype.Qc=function(){this.Un()};ha.prototype.kl=function(){this.Xi()};ha.prototype.Pc=function(){this.Tn()};ha.prototype.ll=function(){this.Xi()};ha.prototype.Zf=function(a){a.style.cssFloat="left";while(a.childNodes.length>0){this.R.appendChild(a.firstChild)}if(Q){this.c.style.visibility="hidden";s.setTimeout(this.bg.bind(this),0)}else{this.bg()}o(window,
"resize",this.bg.bind(this))};ha.prototype.bg=function(){var a,b=10,c=this.sd.Ia().compatMode=="BackCompat",a=ia(this.R).width;if(a<10){return}this.c.style.visibility="";if(Q){this.Oh.style.width="1px";this.c.style.overflow="visible";a=ia(this.R).width;this.c.style.width=a+b+"px";if(!c){this.$d(this.Rf,4);this.$d(this.tc,6);this.$d(this.uc,6);this.$d(this.Sf,4)}this.Oh.style.width=a+b+"px"}else{this.R.style.cssFloat="left";a=ia(this.R).width;this.R.style.cssFloat="";if(Hb&&c){this.c.style.width=a+
2+"px"}this.Oh.style.width=a+b+"px"}};ha.prototype.$d=function(a,b){a.style.width=ia(a).width-b+"px"};ha.prototype.xc=function(a){if(this.Ga!=a){if(a){Aa(this.c,"disabled");this.c.disabled=false}else{pa(this.c,"disabled");this.c.disabled=true}this.Ga=a}};var qa=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},Il=function(a,b){document.write(qa(a,b))};Wb("_cp_getMsg",qa);Wb("_cp_writeMsg",Il);var Xk=function(a,b){if(typeof a.selectionStart=="number"){a.selectionStart=b}else if(Q){var c=Je(a),d=c[0],e=c[1];if(!d.inRange(e)){return}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()}else{throw Error("Cannot set the selection start");}},Wg=function(a){if(typeof a.selectionStart=="number"){return a.selectionStart}if(Q){var b=Je(a),c=b[0],d=b[1];if(!c.inRange(d)){return-1}c.setEndPoint("EndToStart",d);return c.text.length}return-1},
Wk=function(a,b){if(typeof a.selectionEnd=="number"){a.selectionEnd=b}else if(Q){var c=Je(a),d=c[0],e=c[1];if(!d.inRange(e)){return}e.collapse();e.moveEnd("character",b-Wg(a));e.select()}else{throw Error("Cannot set the selection end");}};var Je=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]};var U=function(a,b,c){J.call(this);this.cm=a;this.vn=c;this.kb=b;o(b,["hilite","select",If,"dismiss"],this);this.ob=null;this.J=[];this.ya=-1;this.ab=0;this.Vb=null;this.dc=null};U.inherits(J);U.prototype.fm=10;U.prototype.Ej=true;U.prototype.Aj=false;var If="canceldismiss";U.prototype.L=function(a){if(a.target==this.kb){switch(a.type){case "hilite":this.fb(a.row);break;case "select":this.qe();break;case If:this.Se();break;case "dismiss":this.Og();break}}};U.prototype.Qn=function(a,b){if(this.ob==
a){return}this.ob=a;this.cm.Uf(this.ob,this.fm,v(this.bm,this),b);this.Se()};U.prototype.Pn=function(a){this.Vb=a};U.prototype.isOpen=function(){return this.kb.pc()};U.prototype.Jh=function(){if(this.ya>=this.ab&&this.ya<this.ab+this.J.length-1){this.fb(this.ya+1);return true}else if(this.ya==-1){this.fb(this.ab);return true}return false};U.prototype.Kh=function(){if(this.ya>this.ab){this.fb(this.ya-1);return true}else if(this.Aj&&this.ya==this.ab){this.fb(-1)}return false};U.prototype.fb=function(a){this.ya=
a;this.kb.fb(a);return this.sf(a)!=-1};U.prototype.qe=function(){var a=this.sf(this.ya);if(a!=-1){var b=this.J[a];this.vn.re(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.ya=-1;this.ob=null;this.ab+=this.J.length;this.J.length=0;window.clearTimeout(this.dc);this.dc=null;this.kb.dismiss()};U.prototype.Og=function(){if(!this.dc){this.dc=window.setTimeout(v(this.dismiss,
this),50)}};U.prototype.Se=function(){window.setTimeout(v(function(){if(this.dc){window.clearTimeout(this.dc);this.dc=null}},this),10)};U.prototype.dispose=function(){if(!this.xa()){U.ca.dispose.call(this);this.kb.dispose();this.vn.dispose();this.cm=null}};U.prototype.bm=function(a,b,c){if(this.ob!=a){return}var d=c?this.sf(this.ya):null;this.ab+=this.J.length;this.J=b;var e=[];for(var f=0;f<b.length;++f){e.push({id:this.qh(f),data:b[f]})}this.kb.hn(e,this.ob,this.Vb);if(this.Ej&&e.length!=0){var g=
d!=null?this.qh(d):this.ab;this.fb(g)}else{this.ya=-1}};U.prototype.sf=function(a){var b=a-this.ab;if(b<0||b>=this.J.length){return-1}return b};U.prototype.qh=function(a){return this.ab+a};var V=function(a,b,c,d){this.w=null;this.Sg=[];this.ad=na(a)&&!(a===null)?a:",;";this.Jo=this.ad.substring(0,1);this.Rp=new RegExp("^[\\s"+this.ad+"]+|[\\s"+this.ad+"]+$","g");this.Dp=new RegExp("\\s*["+this.ad+"]$");this.Tl=b||"";this.Op=d||50;this.Th=null;this.Ze=null;this.dk=0;this.ae=c!=null?c:true;this.$p=true;this.Po=true;this.Vf=false;this.Pl=0;this.ro=false};V.inherits(rb);V.prototype.dispose=function(){if(!this.xa()){V.ca.dispose.call(this);this.Mg.apply(this,this.Sg)}};V.prototype.Ke=function(){for(var a=
0;a<arguments.length;a++){var b=arguments[a];this.Sg.push(b);o(b,Yc,this.Sh,false,this);o(b,Xc,this.Rh,false,this);o(b,"keyup",this.Uh,false,this);var c=["focus",ka];o(b,c,this.bh,false,this);o(b,"blur",this.tg,false,this);pc(b,"select");Pb(b,"haspopup",true)}};V.prototype.Mg=function(){for(var a=0;a<arguments.length;a++){var b=arguments[a];ga(b,Yc,this.Sh,false,this);ga(b,Xc,this.Rh,false,this);ga(b,"keyup",this.Uh,false,this);var c=["focus",ka];ga(b,c,this.bh,false,this);ga(b,"blur",this.tg,false,
this);oc(this.Sg,b)}};V.prototype.rg=function(a){this.w=a};V.prototype.re=function(a,b){if(na(b)?b:this.ae){var c=this.Ze,d=this.dk,e=this.dg(c.value),f=a.toString();if(!this.Dp.test(f)){f=f.replace(/\s+$/,"")+this.Jo}if(this.$p){if(d!=0&&!Oh(e[d-1])){f=" "+f}if(d<e.length&&!Oh(e[d+1])){f=f+" "}}if(f!=e[d]){e[d]=f;c.value=e.join("");var g=0;for(var h=0;h<=d;h++){g+=e[h].length}c.focus();Xk(c,g);Wk(c,g)}}else{this.Ze.value=a.toString()}};V.prototype.Sh=function(a){var b=a.keyCode;if(this.ad.indexOf(String.fromCharCode(a.charCode))!=
-1){if(this.w&&this.w.qe()&&this.ae){a.preventDefault()}}else if(b==13){this.Vf=true;if(this.w&&this.w.qe()&&this.ae){a.preventDefault()}}else if(b!=40&&b!=39&&b!=38&&b!=37&&b!=27&&b!=9&&b!=229){this.Yc(a)}};V.prototype.Rh=function(a){var b=a.keyCode;this.Pl=b;if(b==40){if(this.w&&!this.w.isOpen()){this.Yc(a);a.preventDefault()}else if(this.w&&this.yl()){a.preventDefault()}}else if(b==39||b==37){this.Yc(a)}else if(b==38){if(this.w&&(this.Al()||this.w.isOpen())){a.preventDefault()}}else if(b==9){s.clearTimeout(this.Th);
if(this.w&&this.w.qe()&&this.ae){a.preventDefault()}}else if(b==27){if(this.w&&this.w.isOpen()){this.w.dismiss()}}else if(Q&&(b==8||b==46)){this.Yc(a)}else if(b==13){this.Vf=false}};V.prototype.Uh=function(a){var b=a.keyCode;if(b==13){if(ae&&!this.Vf||$h&&this.Pl==229){a.preventDefault();this.Yc(a)}this.Vf=false}};V.prototype.Al=function(){return this.ro?this.w.Jh():this.w.Kh()};V.prototype.yl=function(){return this.ro?this.w.Kh():this.w.Jh()};V.prototype.Yc=function(a){s.clearTimeout(this.Th);this.Th=
s.setTimeout(this.xg.bind(this,a.currentTarget),this.Op)};V.prototype.bh=function(a){if(this.w){this.w.Se();if(a.target!=this.Ze){this.w.dismiss()}}this.xg(a.currentTarget)};V.prototype.tg=function(a){if(this.w){this.w.Og()}};V.prototype.xg=function(a){var b=Wg(a),c=this.Cm(a.value,b);this.Ze=a;this.dk=this.Bh(a.value,b);if(this.w){this.w.Pn(a);this.w.Qn(c,a.value)}};V.prototype.Cm=function(a,b){return this.ko(this.dg(a)[this.Bh(a,b)])};V.prototype.ko=function(a){return String(a).replace(this.Rp,
"")};V.prototype.Bh=function(a,b){var c=this.dg(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};V.prototype.dg=function(a){if(!this.ae){return[a]}var b=String(a).split(""),c=[],d=[];for(var e=0,f=false;e<b.length;e++){if(this.Tl&&this.Tl.indexOf(b[e])!=-1){if(this.Po){if(!f){c.push(d.join(""));d.length=0}}d.push(b[e]);f=!f}else if(!f&&this.ad.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 K=function(a,b,c,d){this.p=a||Ug().body;this.i=Tc(this.p);this.kn=!a;this.b=null;this.ob="";this.J=[];this.Cf=-1;this.$n=-1;this.da=false;this.className="ac-renderer";this.rowClassName="ac-row";this.activeClassName="active";this.Dc=b;this.Wp=d!=null?d:true;this.zp=c!=null?c:false;this.Qh=null;this.fg=false};K.inherits(J);var Wh=0;K.prototype.Bc=null;K.prototype.hn=function(a,b,c){this.ob=b;this.J=a;this.Cf=0;this.$n=Ea();this.Vb=c;this.oe=[];this.redraw()};K.prototype.dismiss=function(){if(this.da){this.da=
false;Xa(this.b,false)}};K.prototype.show=function(){if(!this.da){this.da=true;Xa(this.b,true)}};K.prototype.pc=function(){return this.da};K.prototype.Lh=function(a){this.zl();this.Cf=a;if(a>=0&&a<this.b.childNodes.length){var b=this.oe[a];pa(b,this.activeClassName);Pb(this.b,"activedescendant",b.id);Zk(this.Bc,He(b))}};K.prototype.zl=function(){if(this.Cf>=0){Aa(this.oe[this.Cf],this.activeClassName)}};K.prototype.fb=function(a){if(a==-1){this.Lh(-1)}else{for(var b=0;b<this.J.length;b++){if(this.J[b].id==
a){this.Lh(b);return}}}};K.prototype.In=function(a){pa(a,this.className)};K.prototype.redraw=function(){if(!this.b){this.Bc=this.i.u("div",{style:"display:none"});pc(this.Bc,"region");Pb(this.Bc,"live","rude");this.i.appendChild(this.p,this.Bc);this.b=this.i.u("div",{style:"display:none"});this.In(this.b);pc(this.b,"menu");var a=this.b.id="goog-acr-"+Wh++;Pb(this.Vb,"controls",a);this.i.appendChild(this.p,this.b);o(this.b,ka,this.Oc,false,this);o(this.b,vc,this.Pc,false,this);o(this.i.Ia(),ka,this.Fh,
false,this);o(this.b,wc,this.Qc,false,this)}if(this.fg){this.b.style.visibility="hidden"}this.oe.length=0;this.i.$m(this.b);if(this.Dc&&this.Dc.render){this.Dc.render(this,this.b,this.J,this.ob)}else{var b=null;Ga(this.J,function(g){var g=this.gn(g,this.ob);if(this.fg){this.b.insertBefore(g,b)}else{this.i.appendChild(this.b,g)}b=g},this)}if(this.J.length==0){this.dismiss();return}else{this.show()}this.Lm(this.b);if(this.Vb&&this.kn){var c=Dc(this.Vb),d=ia(this.Vb),e=ia(Vh(this.Vb)),f=ia(this.b);c.y=
this.fg?c.y-f.height:c.y+d.height;if((this.zp||c.x+f.width>e.width)&&this.Qh!="LEFT"){c.x=c.x+d.width-f.width;this.Qh="RIGHT"}else{this.Qh="LEFT"}Yd(this.b,c);if(this.fg){this.b.style.visibility="visible"}}};K.prototype.Cn=function(a){this.kn=a};K.prototype.dispose=function(){if(!this.xa()){K.ca.dispose.call(this);if(this.b){ga(this.b,ka,this.Oc,false,this);ga(this.b,vc,this.Pc,false,this);ga(this.i.Ia(),ka,this.Fh,false,this);ga(this.b,wc,this.Qc,false,this);this.i.removeNode(this.b);this.b=null}this.p=
null}};K.prototype.Lm=function(a){if(gc&&ae){a.style.width="";a.style.overflow="visible";a.style.width=a.offsetWidth;a.style.overflow="auto"}};K.prototype.en=function(a,b,c){c.innerHTML=Pa(a.data.toString())};K.prototype.Bf=function(a,b){if(a.nodeType==3){var c,d=null;if(F(b)){c=b.length>0?b[0]:"";if(b.length>1){d=yd(b,1)}}else{c=b}if(c.length==0)return;var e=a.nodeValue;c=Wd(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.i.createElement("b");this.i.appendChild(k,this.i.createTextNode(g[2]));k=a.parentNode.insertBefore(k,a.nextSibling);for(var l=g.length-1;l>=3;l--){a.parentNode.insertBefore(this.i.createTextNode(g[l]),k.nextSibling)}}else if(d){this.Bf(a,d)}}else{var n=a.firstChild;while(n){var m=n.nextSibling;this.Bf(n,b);n=m}}};K.prototype.gn=function(a,b){var c=this.i.u("div",{className:this.rowClassName});if(this.Dc&&this.Dc.Ei){this.Dc.Ei(a,
b,c)}else{this.en(a,b,c)}if(b&&this.Wp){this.Bf(c,b)}c.id="goog-acri-"+Wh++;pa(c,this.rowClassName);pc(c,"menuitem");this.oe.push(c);return c};K.prototype.xh=function(a){while(a&&a!=this.b&&!qc(a,this.rowClassName)){a=a.parentNode}return a?we(this.oe,a):-1};K.prototype.Oc=function(a){var b=this.xh(a.target);if(b>=0){this.dispatchEvent({type:"select",row:this.J[b].id})}a.stopPropagation()};K.prototype.Pc=function(a){this.dispatchEvent(If);a.stopPropagation()};K.prototype.Fh=function(a){this.dispatchEvent("dismiss")};
K.prototype.Qc=function(a){var b=this.xh(a.target);if(b>=0){if(Ea()-this.$n<300){return}this.dispatchEvent({type:"hilite",row:this.J[b].id})}};var Gm=function(){};Gm.prototype.render=function(a,b,c,d){};var Zd=function(a,b){this.J=a;this.Vp=!b};Zd.prototype.Uf=function(a,b,c,d){var e=this.Sk(a,b);if(e.length==0&&this.Vp){e=this.Wk(a,b)}c(a,e)};Zd.prototype.Sk=function(a,b){var c=[];if(a!=""){var d=Wd(a),e=new RegExp("(^|\\W+)"+d,"i");Cm(this.J,function(f){if(String(f).match(e)){c.push(f)}return c.length>=b})}return c};Zd.prototype.Wk=function(a,b){var c=[];Ga(this.J,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 D=A-l-1;if(D>n-5){D=n-5}j+=D;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 Fm=function(a,b,c,d){var e=new Zd(a,!d),f=new K,g=new V(null,null,!(!c));U.call(this,e,f,g);g.rg(this);g.Ke(b)};Fm.inherits(U);var la=function(){this.Ff=false;this.Cc=[];this.dq=[];this.tb=null;this.Rc=[];this.el=[];this.uk={};this.w=null;this.kb=null;this.Wn=true;this.jo={}};la.prototype.pb=function(a,b){if(!a||W(a)){var c={id:-1};if(a){c.Name=a}if(b){c.Emails=[{Address:b}]}a=cb(c,"$SomeContact")}var d=yc(a);if(this.Wn&&!d){return}this.Cc.push(this.We(a))};var yc=function(a){return p("Emails/[0]/Address").h(a)||p("Email").h(a)},Bl=function(a,b){var c=new la;if(!b.uri&&b.serverBase){b.uri=b.serverBase+"data/contacts?max=500"}c.create(a,
b);return c};s._EmailAc_create=Bl;la.prototype.create=function(a,b){var c=Eb(a);this.init(c,b.uri,true,b.rightAlign,b.twoLine);this.xi=b.progressive};la.prototype.dispose=function(){this.tb.dispose();this.kb.dispose()};la.prototype.Sj=function(){return new U(this,this.kb,this.tb)};la.prototype.init=function(a,b,c,d,e,f){if(this.Ff){N.warning("Init already called");return}this.Ff=true;this.B=b;this.ci("$Contacts",v(this.al,this),null,false);var g;if(F(a)){g=a[0].ownerDocument.body}else{g=a.ownerDocument.body}var h=
e?new K(g,new rh,d):new Gd(g);h.Cn(true);this.kb=h;this.tb=new Hd(",;",'"',f);this.w=this.Sj();this.tb.rg(this.w);this.xi=false;if(a){this.vj(a)}};la.prototype.ci=function(a,b,c,d){var e=new r(this.B);e.t("out","js");if(c){e.t("tok",c);e.t("cl",false);e.t("psort","Name")}if(d){e.t("cd","true")}var f=c?10:250;e.t("max",f);var g=new vb(e,a,"&&&START&&&","&&&END&&&"),h=q();h.T(g,true);h.N(b,a);g.load()};la.prototype.vj=function(a){if(!this.Ff){N.warning("Init should be called first");return}if(F(a)){this.Rc=
this.Rc.concat(a);for(var b=0;b<a.length;b++){this.tb.Ke.call(this.tb,a[b])}}else{this.Rc.push(a);this.tb.Ke.call(this.tb,a)}};la.prototype.an=function(a){if(!this.Ff){N.warning("Init should be called first");return}if(F(a)){Nb(a,function(b){this.an(b)},this)}else{oc(this.Rc,a);this.tb.Mg(a)}};la.prototype.Uf=function(a,b,c){this.ck=a;var d=[];if(a!=""){var e=Wd(a),f=f=new RegExp('(^|<| |"|\\()'+e,"i"),g=this.el;for(var h=0;h<g.length&&d.length<b;++h){var j=g[h];if(j.ra().match(f)){d.push(j)}}g=this.Cc;
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.xi&&a){if(!this.Hh(a,b,true)){if(d.length<b){var k=d.concat([]);s.setTimeout(this.zk.bind(this,k,b,a,c),500);d.push(new Ve("MORE"))}}}c(a,d)};la.prototype.Hh=function(a,b,c){var d=this.jo[a];if(d&&(c||d.count<b)){return true}else if(a.length>1){return this.Hh(a.substring(0,a.length-1),b,false)}else{return false}};var Cl=0;la.prototype.zk=function(a,b,c,d){if(c==this.ck&&c!=""){var e="$AdditionalContacts"+
Cl++,f=this.$k.bind(this,a,b,c,d);this.ci(e,f,c,true)}};la.prototype.$k=function(a,b,c,d,e){var f=[].concat(a);if(c==this.ck){var g=this.gh(e),h={};for(var j=0;j<a.length;j++){var k=yc(a[j].contactData);h[k]=true}j=0;while(f.length<b&&j<g.e()){var l=g.n(j),k=yc(l);if(!h[k]){var n=this.We(l);f.push(n);this.uk[k]=true;this.Cc.push(n)}j++}d(c,f,true);this.jo[c]={count:f.length}}};la.prototype.gh=function(a){var b=q().Cd(a),c=b.a("Body",true).a("Contacts",true).g();return c};la.prototype.al=function(a,
b){var c=this.gh("$Contacts"),d=c.e();N.info("Got "+d+" contacts");if(d>0){for(var e=0;e<this.Rc.length;e++){this.Rc[e].setAttribute("autocomplete","off")}}var f=new T;for(var e=0;e<d;e++){var g=c.n(e),h=yc(g);if(!h&&this.Wn){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(ch(j,k[n].value))}}var y=this.We(g);this.Cc.push(y);this.uk[h]=true}N.info("Created contact array");var A=q().Cd("$Contacts"),
D=A.a("Body").a("Groups");if(D!=null){var k=D.g();d=k.e();N.info("Got "+d+" groups");for(var e=0;e<d;e++){var ta=k.n(e),aa=ta.d("id"),j=ta.d("Name");if(aa.charAt(0)!="^"){var X=f.get(aa);if(X!=null){this.el.push(new Dd(j,X))}}}}var $a=A.a("Body").a("UserData");if($a){var ke=$a.a("Features",true).g();for(var e=0;e<ke.e();e++){var $i=ke.n(e).get();if($i=="PROGRESSIVE_AC"){this.xi=true}}}};la.prototype.We=function(a){var b=a.d("Name"),c=yc(a),d={};d.contactData=a;var e=ch(b,c);d.formattedValue=e;d.toString=
function(){return this.formattedValue};return d};var Gd=function(){K.apply(this,arguments)};Gd.inherits(K);Gd.prototype.redraw=function(){var a=false,b=this.J.length;if(b>0&&this.J[b-1].data.Ch&&this.J[b-1].data.Ch()=="MORE"){a=true}Gd.ca.redraw.call(this);if(a){var c=qa("SEARCHING_FOR_MATCHES");if(b>1){var d=this.i.createElement("div"),e=this.i.u("div",{style:"background-color: #A0B0FF; margin: 8px 0px"});if(Q){var f=this.i.u("img",{width:"1",height:"1"});e.appendChild(f)}else{e.style.height="1px"}d.appendChild(e);
this.b.appendChild(d);c=qa("SEARCHING_FOR_MORE_MATCHES")}var g=this.i.u("div");g.innerHTML=c;this.b.appendChild(g)}};var Ve=function(a){this.lo=a};Ve.prototype.toString=function(){return""};Ve.prototype.Ch=function(){return this.lo};var rh=function(){};rh.prototype.Ei=function(a,b,c){c.innerHTML=Ak([Pa(a.data.contactData.d("Name")),Pa(yc(a.data.contactData))],function(d){return d}).join("<br/>")};var _emailAutocomplete=s._emailAutocomplete=new la;s._initEmailAutocomplete=v(s._emailAutocomplete.init,
s._emailAutocomplete);var _initEmailAutocomplete=s._initEmailAutocomplete,ch=function(a,b){var c=a?'"'+a+'"':"",d=b?" <"+b+">":"";return c+d};var Hd=function(a,b,c){V.call(this,a,b,c)};Hd.inherits(V);Hd.prototype.re=function(a){if(a.fh){a=a.fh().join(", ")}Hd.ca.re.call(this,a)};var Dd=function(a,b){this.Pa=a;this.Cc=b};Dd.prototype.toString=function(){return this.Pa+" (Group)"};Dd.prototype.ra=function(){return this.Pa};Dd.prototype.fh=function(){return this.Cc};var Ul=function(a,b,c,d){var e=a.split("."),f=d||s,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}},Vl=function(a,b){if(a.value==""||a.value==b||a.value==a.defaultText){a.defaulted=true;a.value=b;pa(a,"input-default")}a.defaultText=b;o(a,"focus",function(){if(a.defaulted){a.value="";Aa(a,"input-default");a.defaulted=false}});o(a,"blur",Tl.bind(null,a));o(document,Yc,function(c){if(c.target==a&&c.keyCode==27){c.stopPropagation()}},true)},Tl=function(a){if(a.value==
""&&!a.defaulted){a.defaulted=true;a.value=a.defaultText;pa(a,"input-default")}};var Qd=function(a,b){b=b<0?0:b;a.style.height=b+"px";a.__lastHeight=b},sh=function(a,b){b=b<0?0:b;a.style.width=b+"px";a.__lastWidth=b},gf=function(a){return Ua(a,"paddingLeft")+Ua(a,"paddingRight")+Ua(a,"marginLeft")+Ua(a,"marginRight")+Ua(a,"borderLeftWidth")+Ua(a,"borderRightWidth")},hf=function(a){return Ua(a,"paddingTop")+Ua(a,"paddingBottom")+Ua(a,"marginTop")+Ua(a,"marginBottom")+Ua(a,"borderTopWidth")+Ua(a,"borderBottomWidth")},
Ua=function(a,b){var c=ib(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(fa(d,"px")){return Number(d.substring(0,d.length-2))}else{return 0}};var ad=function(a,b){this.c=a;if(a==null){return}this.hf=b?Ed(b):null;if(this.hf){var c=v(this.bj,this);Ga(this.hf.P(),function(h){q().N(c,h.ba)});this.bj()}if(Q){var d=ia(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"}o(a,vc,v(this.Jm,this));o(a,"mouseup",v(this.wi,this));o(a,Cd,v(this.am,this));o(a,wc,v(this.mo,
this));o(a,ka,v(this.wi,this))};ad.prototype.Jm=function(a){pa(a.target,"presubmit");a.target.Km=true};ad.prototype.wi=function(a){Aa(a.target,"presubmit");a.target.Km=false};ad.prototype.am=function(a){Aa(a.target,"presubmit")};ad.prototype.mo=function(a){if(a.target.Km){pa(a.target,"presubmit")}};ad.prototype.bj=function(){if(this.hf){this.c.disabled=!this.hf.h()}};var bh=function(a,b){this.c=Eb(a);this.wa=p(b);q().N(v(this.Cb,this),b);o(this.c,ka,v(this.mk,this),false,this);var c=this.wa.h();if(c){this.c.checked=c}};bh.prototype.Cb=function(){if(!this.Kb){var a=this.wa.h();this.Jb=true;this.c.checked=a!=0;this.Jb=false}};bh.prototype.mk=function(){if(!this.Jb){var a=this.c.checked;this.Kb=true;Sa(this.wa.ba,a);this.Kb=false}};var Id=function(a,b,c,d,e){this.c=Eb(a);this.wa=p(b);this.eq=c;this.Fc=d||this.c.getAttribute("defaultText");this.dm=e;if(this.dm){this.c.maxLength=this.dm}q().N(v(this.Cb,this),b);o(this.c,"change",this.gc,false,this);o(this.c,"keyup",this.gc,false,this);var f=this.wa.h();if(f){this.c.value=f}if(this.Fc){o(this.c,"blur",this.Te,false,this);o(this.c,"focus",this.wm,false,this);this.Te()}};Id.prototype.Cb=function(){if(!this.Kb){var a=this.wa.h();this.Jb=true;this.c.value=a?a:"";this.Jb=false;this.pd=
false;if(this.Fc){this.Te()}}};Id.prototype.gc=function(){if(!this.Jb){var a=this.c.value||null;this.Kb=true;var b=this.wa.ka().D(null,true);b.o(this.wa.Ob,a);this.Kb=false}};Id.prototype.Te=function(){if(this.c.value==""&&!this.pd){this.pd=true;pa(this.c,"input-default");this.c.value=this.Fc}else{Aa(this.c,"input-default");this.pd=false}};Id.prototype.wm=function(){if(this.pd){this.c.value="";Aa(this.c,"input-default");this.pd=false}};var Hl=function(a,b,c){if(a){this.Mb=a;this.El=b||a.getAttribute("icon");if(this.El){this.Ya=Qb("div",{className:this.Mb.className});this.Mb.className="inner";this.Ib=Rc("img");this.Ib.src=this.El;this.Ib.style.verticalAlign="bottom";this.Ya.appendChild(this.Ib);if(this.Ib.readyState!="complete"){this.Ib.style.display="none";o(this.Ib,"load",this.Dl,false,this)}if(Q){this.Ib.style.verticalAlign="top"}a.parentNode.replaceChild(this.Ya,a);this.Ya.appendChild(a);this.Mb.style.border="0px";this.Mb.style.padding=
"0px";this.Mb.style.paddingLeft="4px";this.Ya.style.verticalAlign="top";this.Mb.style.whiteSpace="nowrap";this.Mb.style.width="80%";var d=ia(this.Ya).height;if(d>5){var e=Q?0:hf(this.Ya)-2;this.Ya.style.height=d-e+"px"}this.Ya.style.overflow="hidden"}this.Fc=c||a.getAttribute("defaultText");if(this.Fc){Vl(this.Mb,this.Fc)}}};Hl.prototype.Dl=function(){this.Ib.style.display="inline"};var Xb=function(a){this.c=a;this.Jp=200;this.rp=1000;this.pl=this.Gh.bind(this);o(a,["input","propertychange"],this.Gh,false,this);o(a,Yc,this.jl,false,this);o(a,Xc,this.il,false,this);var b=["focus",ka,"blur"];o(a,b,this.ml,false,this)};Xb.mixin(J.prototype);Xb.prototype.jl=function(a){s.setTimeout(this.pl,0);if(!this.dispatchEvent(a)){a.preventDefault()}};Xb.prototype.il=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(Q&&(b==8||b==46)){s.setTimeout(this.pl,0)}if(c){var d=this.dispatchEvent(c);if(!d){a.preventDefault()}}};Xb.prototype.ml=function(a){this.dispatchEvent(a)};Xb.prototype.Gh=function(a){var b=this.c.defaulted?"":this.c.value;if(b!=this.cp){this.Pg("VALUE",b);if(this.Zn){s.clearTimeout(this.Zn)}this.Zn=s.setTimeout(this.Ag.bind(this,"STABLE_VALUE",b),this.Jp);if(this.Dm){s.clearTimeout(this.Dm)}this.Dm=s.setTimeout(this.Ag.bind(this,"PAUSED_VALUE",b),this.rp);this.cp=
b}};Xb.prototype.Ag=function(a,b){var c=this.c.defaulted?"":this.c.value;if(c==b){this.Pg(a,b)}};Xb.prototype.Pg=function(a,b){var c=new Z(a);c.value=b;this.dispatchEvent(c)};var oh=function(a,b,c){this.c=Eb(a);this.wa=p(b);var d=this.wa.h();if(c){this.fq=c;Ga(c.Q(),function(g,h){var j=Rc("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().N(v(this.Cb,this),b);o(this.c,"change",this.gc,false,this);o(this.c,"keyup",this.gc,false,this)};oh.prototype.Cb=function(){if(!this.Kb){var a=this.wa.h();this.Jb=true;this.c.value=a?a:"";this.Jb=false}};oh.prototype.gc=
function(){if(!this.Jb){var a=this.c.value||null;this.Kb=true;Sa(this.wa.ba,a);this.Kb=false}};var Ol=function(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling){Ol(d,b,c)}if(a.nodeType==1&&a.getAttribute("maximize")=="true"){if(a.__lastWidth){sh(a,a.__lastWidth+b)}if(a.__lastHeight){Qd(a,a.__lastHeight+c)}}},Nl=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=Ie();c=e.width;d=e.height;a.parentNode.style.overflow="hidden"}else{var f=a.parentNode;c=a.parentNode.offsetWidth-gf(f);if(!Q){c-=gf(a)}d=a.parentNode.offsetHeight-
hf(f)}sh(a,c);Qd(a,d);if(a.offsetHeight>d){Qd(a,2*d-a.offsetHeight)}if(a.nodeName=="TABLE"){var g=null,h=0,j;for(var j=0;j<a.rows.length;j++){var k=a.rows[j];if(k.getAttribute("maximize")=="true"){g=k;g.style.height="100%"}}if(g){for(var j=0;j<a.rows.length;j++){var k=a.rows[j];if(k!=g){h+=k.offsetHeight}}Qd(g,d-h-2);g.style.width=""}}}for(b=a.firstChild;b;b=b.nextSibling){Nl(b)}};var jf=function(a,b){this.jm=a;this.Jg=b||"$LastMessage";this.kp=p(this.Jg+"/Message");this.Sp=p(this.Jg+"/Level");q().N(v(this.Fl,this),this.Jg+"/...");this.ub=false};jf.prototype.Fl=function(){if(!this.ub){s.setTimeout(v(this.me,this),0)}this.ub=true};jf.prototype.me=function(){if(this.ub){var a=H(this.jm);if(a){var b=this.kp.h();if(b==null){Aa(a,"error");Aa(a,"info");a.innerHTML=""}else{var c=this.Sp.h();if(c=="INFO"){pa(a,"info");Aa(a,"error")}else{pa(a,"error");Aa(a,"info")}pa(a,"hilite");if(b.length<
150){a.innerHTML=Pa(b)}else{var d=Qb("div",{style:"display:none; position:absolute; background-color:white;padding:8px; border:1px dashed #AAA;text-decoration: none"});d.innerHTML=Pa(b).replace(/\n/g,"<br/>");var e=Qb("a",{href:"#"});o(e,ka,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=
Dc(a),g=ia(a),h=ia(d);Hf(d,f.x+g.width-h.width,f.y+g.height)}s.setTimeout(v(this.Im,this),1000)}}this.ub=false}};jf.prototype.Im=function(){var a=H(this.jm);if(a){Aa(a,"hilite")}};var Da=function(){this.Hj="..";this.Ii={};this.hj={};this.gd={};this.Sd={};this.To={};this.jg={}},ma=function(){if(!ff){ff=new Da}return ff},ff=null;Da.prototype.Nn=function(a,b,c){a=new r(a);if(b&&c){if(!this.gd[b]){this.gd[b]={}}this.gd[b][c]=a}else if(b){this.hj[b]=a}else if(c){this.Ii[c]=a}else{this.Hj=a}};Da.prototype.Mc=function(a,b){if(this.gd[a]&&this.gd[a][b]){return this.gd[a][b]}else if(this.hj[a]){return this.hj[a]}else if(this.Ii[b]){return this.Ii[b]}else{return this.Hj}};Da.prototype.Ym=
function(a){this.Sd[a.Ja()]=a};Da.prototype.sg=function(a,b,c){var d=this.Sd[a];if(d&&d.attach){d.attach(b,c);return true}var e=this.To[a];if(e&&e.attach){e.attach(b,c);return true}return false};Da.prototype.qd=function(a,b,c){var d=this.Sd[a];if(d&&d.qd){d.qd(b,c);return true}return false};Da.prototype.Eb=function(a,b,c){var d=this.Sd[a];if(d&&d.Eb){d.Eb(b,c);return true}return false};var Sl=0;Da.prototype.Uj=function(a,b,c,d){if(ae&&gc){pa(document.body,"background")}var e=this.Vj(a,b),f=this.ak(a,
c,d);if(!Q){e.src=f}var g=new x;g.hh().appendChild(e);g.Pi(new oa);g.Aa(true);if(Q){e.src=f}this.jg[a]=g;return e.contentWindow};Da.prototype.Vj=function(a,b){var c=a+"-iframe",d=H(c);if(!d){d=Qb("iframe",{id:c});zb(d,"display","block");zb(d,"backgroundColor","#FFF");zb(d,"border","1px solid #555");fc(d,b.width,b.height)}return d};Da.prototype.ak=function(a,b,c){var d=new r(this.Mc()+"/ui/"+a);if(c){var e="UiWidgetCallback"+Sl++;s[e]=c;d.t("done",e)}d.t("js","RAW");d.t("pop","TRUE");if(b){Ga(b,function(f,
g){if(f!=null){d.t(g,f)}})}return d};Da.prototype.nk=function(a){var b=this.jg[a];if(b){b.dispose();Aa(document.body,"background")}delete this.jg[a]};Da.prototype.xl=function(a){var b=this.jg[a];if(b){b.Aa(false)}};Da.prototype.Mi=function(a,b){var c=this.Sd[a],d=H(c.Ja()+"-iframe");if(d&&d.contentWindow.UI_receive){d.contentWindow.UI_receive(b)}};Da.prototype.qg=function(a){var b=a||document;for(var c=b.firstChild;c;c=c.nextSibling){this.qg(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.sg(d,b,e);if(!h){this.qd(d,b,e)}}}};window.UI_setServerBase=function(a,b,c){ma().Nn(a,b,c)};window.UI_getServerBase=function(a,b){ma().Mc(a,b)};window.UI_attachAndDisplayAllWidgets=function(a){ma().qg(a)};window.UI_attachWidget=function(a,b,c){ma().sg(a,b,c)};window.UI_displayInline=function(a,b,c){ma().qd(a,b,c)};window.UI_displayIframe=function(a,b){ma().Eb(a,b)};var wa=function(a){this.za(a)},ah={},Ed=function(a){var b=ah[a];if(b==null){b=new wa(a);ah[a]=b}return b};wa.prototype.za=function(a){this.ba=a;this.Fa=[];if(this.cj("||")){this.ic=this.tk}else if(this.cj("and")){this.ic=this.ok}else if(this.Ie("!=")){this.ic=this.sk}else if(this.Ie("=")){this.ic=this.pk}else if(this.Ie("<")){this.ic=this.rk}else if(this.Ie(">")){this.ic=this.qk}else{this.Mo=this.Jf(a);this.ic=this.Yk}};wa.prototype.Ie=function(a){var b=this.ba,c=b.indexOf(a);if(c!=-1){this.op=a;
this.Fb=this.Jf(Fa(b.substring(0,c)));this.Rb=this.Jf(Fa(b.substring(c+a.length)));return true}else{return false}};wa.prototype.cj=function(a){var b=this.ba,c=b.indexOf(a);if(c!=-1){this.op=a;this.Fb=Ed(Fa(b.substring(0,c)));this.Rb=Ed(Fa(b.substring(c+a.length)));this.Fa=this.Fa.concat(this.Fb.P());this.Fa=this.Fa.concat(this.Rb.P());return true}else{return false}};wa.prototype.Jf=function(a){var b=a.substring(0,1),c=a.toLowerCase();if("0123456789'\"".indexOf(b)==-1&&c!="true"&&c!="false"){var d=
p(a);this.Fa.push(d);return d}else{return Pl(a)}};wa.prototype.Yk=function(a){return this.Mo.h(a)?true:false};wa.prototype.pk=function(a){return this.Fb.h(a)==this.Rb.h(a)};wa.prototype.sk=function(a){return this.Fb.h(a)!=this.Rb.h(a)};wa.prototype.rk=function(a){return this.Fb.h(a)<this.Rb.h(a)};wa.prototype.qk=function(a){return this.Fb.h(a)>this.Rb.h(a)};wa.prototype.tk=function(a){return this.Fb.h(a)||this.Rb.h(a)};wa.prototype.ok=function(a){return this.Fb.h(a)&&this.Rb.h(a)};wa.prototype.h=
function(a){return this.ic(a)};wa.prototype.P=function(){return this.Fa};var dd=function(a){if(a){this.za(a)}},ph={},Pl=function(a){var b=ph[a];if(b==null){b=new dd(a);ph[a]=b}return b},Md=function(a){var b=new dd;b.na=a;return b};dd.prototype.za=function(a){this.ba=a;if(a=="TRUE"||a=="true"){this.na=true}else if(a=="FALSE"||a=="false"){this.na=false}else if(ra(a,'"')&&fa(a,'"')){this.na=a.substring(1,a.length-1)}else if(ra(a,"'")&&fa(a,"'")){this.na=a.substring(1,a.length-1)}else if(!isNaN(a)){this.na=Number(a)}else{throw Error("Invalid static expression: "+a);}};dd.prototype.h=
function(a){return this.na};dd.prototype.P=function(){return[]};var Ba=function(a){this.clear();if(a){this.Ab(a)}};Ba.prototype.e=function(){return this.r};Ba.prototype.Q=function(){return jd(this.F)};Ba.prototype.ia=function(){return jd(this.H)};Ba.prototype.$=function(a){var b=ya(a);return b in this.H};Ba.prototype.gb=function(){return this.r==0};Ba.prototype.clear=function(){this.H={};this.F={};this.r=0};Ba.prototype.remove=function(a){var b=ya(a);if(uf(this.H,b)){delete this.F[b];this.r--;return true}return false};Ba.prototype.get=function(a,b){var c=ya(a);
if(c in this.F){return this.F[c]}return b};Ba.prototype.set=function(a,b){var c=ya(a);if(!(c in this.H)){this.H[c]=a;this.r++}this.F[c]=b};Ba.prototype.Ab=function(a){var b,c;if(a instanceof Ba){b=a.ia();c=a.Q()}else{b=tf(a);c=jd(a)}for(var d=0;d<b.length;d++){this.set(b[d],c[d])}};Ba.prototype.clone=function(){return new Ba(this)};var Yb=function(){this.Db=new Ba;this.ua=null;this.wp=v(this.Xm,this)};Yb.prototype.$l=function(a,b,c,d){if(!xb(c)){throw Error("not a function: "+c);}if(!a.qf){throw Error("Nodes for markDirty must support getDepth");}b=b||[];var e=b.join(","),f=this.Db.get(a);if(!f){f={};this.Db.set(a,f)}if(!f[e]){f[e]=[]}Bk(f[e],c);this.sn()};Yb.prototype.di=function(a,b){b=b||[];var c=this.Db.get(a);if(c){if(b.length==0){this.Db.remove(a)}else{var d=String(b);delete c[d];if(c.length==0){this.Db.remove(a)}}}};
Yb.prototype.sn=function(){if(!this.ua){this.ua=s.setTimeout(this.wp,50)}};Yb.prototype.Xm=function(){delete this.ua;var a=this.Db.ia();a.sort(function(d,e){return d.qf()-e.qf()});for(var b=0;b<a.length;b++){var c=a[b];this.Wm(c);this.Db.remove(c)}};Yb.prototype.Wm=function(a){while(true){var b=this.Db.get(a),c=this.Lk(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]}};Yb.prototype.Lk=function(a){if(a!=null){for(var b in a){return b}}return null};var z=function(a,b,c,d){this.ji=a.nodeName;this.ee=c;this.ik=d;this.Sm(a);this.En(b);this.pa(a)},qh=Ce("goog.focus.TemplateNode"),ef=null,Rl=0,df=function(){if(!ef){ef=new Yb}return ef};z.prototype.de=true;z.prototype.qf=function(){return this.ik};z.prototype.dispose=function(){};z.prototype.Sm=function(a){this.Zb={};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.Ef=Ed(f)}else if(e=="context"){this.Qj=p(f)}else if(e=="repeat"){this.Tf=p(f)}else if(e==
"id"){this.Ma=f;this.Cl=Od(this.Ma)}else{var g=ra(e,"on")||e=="g.oncreate";this.Zb[e]=Od(f,g?1:0)}}}};z.prototype.En=function(a){this.on=a;this.sc=this.on;if(this.Qj){this.sc=this.vh(this.Qj,true)}if(this.Tf){this.sc=this.vh(this.Tf,true)}};z.prototype.wh=function(a,b){var c=a.ba,d=b?this.on:this.sc;if(c.indexOf("$")!=0&&d){c=d.ba+"/"+c}return c};z.prototype.vh=function(a,b){return p(this.wh(a,b))};z.prototype.init=function(){if(!this.Yo){this.tj();if(!this.Ma){this.Ma="Node"+Rl++;this.Cl=Od(this.Ma)}this.Yo=
true}};z.prototype.tj=function(){if(this.Ef){var a=this.Xe(this.Kj);this.Xd(this.Ef,a,true)}if(this.Tf){var b=this.Xe(this.qo);this.Xd(this.sc.ka(),b,true)}var c=this.Xe(this.oo);for(var d=0;d<this.Ea.length;d++){var e=this.Ea[d];if(!e.Hb()){this.Xd(e,c,false)}}for(var f in this.Zb){this.Xd(this.Zb[f],c,false)}};z.prototype.Xe=function(a){var b=this;return function(c,d,e){df().$l(b,e,a,c)}};z.prototype.Xd=function(a,b,c){var d=q();if(a.P){var e=a.P();for(var f=0;f<e.length;f++){var g=this.wh(e[f],
c);d.og(b,g)}}else{var g=a.ba;d.og(b,g)}};z.prototype.pa=function(a){if(!this.Ea){var b=this.ji=="script"?1:0;this.Ea=[];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=Wl().$j(e,this.sc,this.ee,this.ik+1,b);this.Ea.push(f)}}}};z.prototype.Hf=function(){if(this.Ef){return this.Ef.h(this)}else{return true}};z.prototype.render=function(a,b){if(b&&b.a){b=p(b.s())}if(b){this.setDataContext(b);this.pa()}this.$c(a)};z.prototype.ve=function(a){this.G=
a||[];this.fc=this.kh(this.G)};z.prototype.Ic=function(a,b){var c=[];for(var d in this.Zb){if(!a||d!="style"){var e=this.Zb[d].h(this)||"";c.push({name:d,value:e})}}var f=b||this.Fd();c.push({name:"id",value:f});if(a){var g=this.Zb.style,h=(g?g.h(this)+"; ":"")+"display: none";c.push({name:"style",value:h})}return c};z.prototype.Ae=function(a,b,c){if(this.de){a.ed(b,c)}};z.prototype.wd=function(a,b){if(this.de){a.Gc(b)}};z.prototype.$c=function(a,b,c){df().di(this,this.G);var d=this.ji,e=this.Hf();
if(this.Tf&&!b){this.cn(a,c);this.xp=true}else if(e){var f=this.Ic();this.Ae(a,d,f);this.Ci(a);this.wd(a,d);this.xp=true}else if(d!="option"){var f=this.Ic(true);if(this.de){a.ed(d,f);a.Gc(d)}}};z.prototype.cn=function(a,b){var c=p(this.rf(this.G)).ja(),d=this.ji;for(var e=0;e<c.e();e++){var f=c.n(e);this.G.push(f.m());this.fc=this.kh(this.G);if(this.Hf()){var g=this.Ic();this.Ae(a,d,g);this.Ci(a);this.wd(a,d);this.uj()}this.G.pop()}if(!b&&d!="option"){this.Fi=this.Fd()+"-R";var h=this.Ic(true,this.Fi);
this.Ae(a,d,h);this.wd(a,d)}};z.prototype.uj=function(){if(!this.gf){this.gf={}}var a=this.gf;for(var b=0;b<this.G.length-1;b++){if(!a[this.G[b]]){a[this.G[b]]={}}a=a[this.G[b]]}a[String(this.G[this.G.length-1])]=this.Fd()};z.prototype.Hm=function(a){var b=this.Hf(),c=a.style.display!="none";if(b!=c){if(b){this.Di(a)}a.style.display=b?"":"none";if(!b){df().di(this,this.G);while(a.lastChild){a.removeChild(a.lastChild)}}}};z.prototype.Di=function(a){var b=new Ta(a,"REPLACE");this.ma("render in renderElement");
b.Be();this.$c(b,true);b.xd()};z.prototype.Ci=function(a){this.pa();for(var b=0;b<this.Ea.length;b++){var c=this.Ea[b];if(c.le){c.le(a,this)}else{c.init();c.ve(this.G);c.render(a)}}};z.prototype.Fd=function(){var a=this.Cl.h(this);if(this.G){for(var b=0;b<this.G.length;b++){a+="-"+this.G[b]}}return a};z.prototype.nh=function(){return H(this.Fd())};z.prototype.kh=function(a){var b=this.rf(a),c=p(b).D();return c};z.prototype.rf=function(a){var b=this.sc?this.sc.ba:"";if(a){for(var c=0;c<a.length;c++){b=
b.replace(/\*/,a[c])}}return b};z.prototype.ma=function(a){var b=ze;if(qh.Wd(b)){var c=[a,"View=",this.ee.Ma," Node=",this.Ma];for(var d=1;d<arguments.length;d++){c.push(arguments[d])}qh.log(b,c.join(", "))}};z.prototype.oo=function(a,b,c){this.ve(c);var d=this.nh();if(d){this.Di(d)}};z.prototype.qo=function(a,b,c){var d=H(this.Fi);if(d){c=c||[];var e=this.gf;for(var f=0;f<c.length;f++){e=this.gf[String(c[f])]}for(var g in e){var h=e[g],j=H(h);if(j){j.parentNode.removeChild(j)}}for(var g in e){delete e[g]}this.ve(c);
var k=new Ta(H(this.Fi),"INSERT_BEFORE");this.ma("render in updateRepeated");k.Be();this.$c(k,null,true);k.xd()}};z.prototype.Kj=function(a,b,c){this.ve(c);var d=this.nh();if(d){this.Hm(d)}};z.prototype.Hb=function(){return true};z.prototype.a=function(a){if(a=="$Context"){var b=this.rf(this.G),c=p(b);if(c.D()){var d=c.D().m()}else if(this.G){d=this.G[this.G.length-1]}if(c&&c.ka()){var e=c.ka().D(),f=e.g().e()-1,g=e.g().indexOf(d)}if(b!=""){b=b+"/"}var h=this.G.length>0?"-"+this.G.join("-"):"",j=
this.ee?this.ee.Zp:"",k=new B({"@dataName":d,"@cid":h,"@vid":j,"@dataPath":b,"@last":f,"@index":g},"Context");return k}else if(a=="$View"){return this.ee.Np}else if(a.indexOf("$")==0){return q().a(a)}else{return this.fc?this.fc.a(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.fc?this.fc.d(a):""}};z.prototype.g=function(a){return this.fc?this.fc.g(a):new Ja};z.prototype.Bd=function(){return this};var Pd=function(a,
b){this.oq=a;this.co=Od(a,b);this.Fa=this.co.P()};Pd.prototype.le=function(a,b){a.chars(wm(this.co.h(b)))};Pd.prototype.P=function(){return this.Fa};Pd.prototype.Hb=function(){return false};var cf=function(a,b,c,d){z.call(this,a,b,this,d);this.Np=c;this.Zp=Ql++;this.de=false};cf.inherits(z);var Ql=0,Ye=function(a,b,c,d){z.call(this,a,b,c,d)};Ye.inherits(z);Ye.prototype.$c=function(a){var b="span";this.Ae(a,b,this.Ic());var c=this.Zb.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.ed("br",[]);a.Gc("br")}a.chars(f)}}this.wd(a,b)};var w=function(){this.lb=ma().Mc().toString();this.Xp=false;this.Tp=false;this.xk=null;this.hp=500;this.Rg=false;this.Mp=false;this.qm=0;this.Ap=50;this.yp=[];this.Yp=!ra(this.lb.toString(),"http");this.Xf=new af;this.lq=new Ld;this.A=new bd;B.call(this,this.A,"Contacts");q().T(this);this.Io={};var a=new B(this.Io,"ContactData");q().T(a);this.Zj()};w.inherits(B);var Qe=null,db=function(){if(!Qe){Qe=new w}return Qe};w.prototype.Ck=function(a){return this.g().get(a)};w.prototype.g=function(a){if(!a||
a=="*"){return this.A}else if(a.indexOf("*")==-1){var b=this.a(a);if(b){return new M([b])}else{return new Ja}}else{throw new Error("Selector not supported yet ("+a+")");}};w.prototype.d=function(a){var b=this.A.get(a);return b==null?null:b.get()};w.prototype.O=function(){return true};w.prototype.Dk=function(a,b,c){var d=new r(this.lb+"/data/contacts"),e=d.Jd();e.set("thumb",this.Xp);e.set("groups",this.Tp);if(this.xk){e.set("show",this.xk);e.set("enums","true")}e.set("psort","Name");e.set("max",a||
this.hp);e.set("out","js");e.set("rf",this.yp.join(","));if(b){e.set("tok",b);if(this.zj){e.set("cl","false")}if(this.Rg){e.set("cd","true")}}if(c){e.set("ud","false")}return d};w.prototype.Sn=function(){if(!this.dp){var a=q();new kb("Groups","$ContactReq/Body/Groups","$ContactReq/Body/Groups");new kb("Enums","$ContactReq/Body/Enums","$ContactReq");new kb("AuthToken","$ContactReq/Body/AuthToken","$ContactReq");new kb("ExtraData","$ContactReq/Body/ExtraData","$ContactReq");a.yj("$UserData","$ContactReq/Body/UserData");
this.Nc="$Groups";this.He=p("$AuthToken/Value");this.Od=p(this.Nc);a.N(v(this.fk,this),"$ContactReq");a.N(v(this.om,this),"$ContactAppend");a.N(v(this.dl,this),this.Nc);var b=this,c=Ec();c.L("ADD_SELECTED_CONTACTS_TO_GROUP",function(d){b.wj(d.groupId)});c.L("ADD_EMAIL",function(){b.zc(b.La(),"Emails","HOME")});c.L("REMOVE_EMAIL",function(d){b.Zc(b.La(),"Emails",d.dataName)});c.L("ADD_PHONE",function(){b.zc(b.La(),"Phones","HOME")});c.L("REMOVE_PHONE",function(d){b.Zc(b.La(),"Phones",d.dataName)});
c.L("ADD_IM",function(){b.zc(b.La(),"Ims")});c.L("REMOVE_IM",function(d){b.Zc(b.La(),"Ims",d.dataName)});c.L("ADD_ADDRESS",function(){b.zc(b.La(),"Addresses","HOME")});c.L("REMOVE_ADDRESS",function(d){b.Zc(b.La(),"Addresses",d.dataName)});c.L("ADD_OTHER",function(){b.zc(b.La(),"Others","HOME")});c.L("REMOVE_OTHER",function(d){b.Zc(b.La(),"Others",d.dataName)});c.L("PICTURE_ERROR",this.nl.bind(this));this.dp=true}};w.prototype.Ak=function(){if(!this.Gj){var a=new r(p("$UserData/PhotoUrl").h()),b=new r(window.location);
a.dd(b.yf());this.Gj=a.toString()}return this.Gj};w.prototype.nl=function(a){var b=p("$Contacts/"+a.contactId).D();if(b){b.Hn();var c=q();c.k("$Contacts/"+a.contactId+"/MaybeHasPicture")}};w.prototype.load=function(a,b,c){this.Sn();var d=a||1,e=d==4,f=d==3,g=c&&this.Rg;if((f||e)&&this.zj&&!g)return;if(!this.Qo||d!=1){var h=e?"ContactAppend":"ContactReq";if(e){Sa("$ContactData/PendingLongRequest",true)}else{Sa("$ContactData/Loading",true)}var j=q(),k=this.Dk(b,c,e);if(this.Yp){k.t("jsx","true");this.Gi=
new vb(k,h,"&&&START&&&","&&&END&&&")}else{this.Gi=new Rb(k,h)}j.T(this.Gi,true);this.Gi.load();this.Qo=true}};w.prototype.fk=function(a){q().pn(v(this.Ul,this,a));var b=Se("$ExtraData/NavLinks",true);if(H("additional-nav-links")&&b){H("additional-nav-links").innerHTML=b.get();var c=Se("$ExtraData/BlInfo",true);H("additional-nav-links").title=c.get()}this.Rg=this.Mp&&p("$UserData/ShowDomainContacts").h();Sa("$ContactData/Loading",false);var d=p("$ContactReq/Body").D();if(d){d.o("Contacts",null)}N.info("About to fire data change");
q().k("$Contacts");q().k("$Groups");q().k("$SelectedContactCount");N.info("Done firing data change");Sa("$ContactData/Loaded",true)};w.prototype.om=function(a){var b=p("$ContactAppend/Body/Contacts").h();N.info("Starting adding additional contacts");if(b){this.A=this.im(this.A,b)}N.info("Ending adding additional contacts");q().k("$Contacts");Sa("$ContactData/PendingLongRequest",false)};w.prototype.Ul=function(a){this.A.clear();N.info("Starting contact add");var b=p("$ContactReq/Body/Contacts").h()||
[];N.info("Starting contact updates");for(var c=0,d=b.length;c<d;c++){this.sj(b[c])}N.info("Ended contact add");this.zj=b.length==yl("$Groups/^All/Count");this.hi(a);if(this.nd){this.he(this.nd,"^Temp")}};w.prototype.hi=function(a){var b=p(a+"/Body/Groups").D(),c=b?b.Ka():[],d=cb(c,"$Groups");q().T(d)};w.prototype.dl=function(){N.info("Starting groupsChanged");this.hq=true;this.Nd={};var a=this.Od.D().g();for(var b=0;b<a.e();b++){var c=a.n(b);this.Nd[c.d("id")]=c}this.Cj();N.info("Ending groupsChanged")};
w.prototype.Cj=function(){var a=this.A.e();for(var b=0;b<a;b++){var c=this.A.n(b);this.Bj(c)}};w.prototype.Bj=function(a){var b=a.a("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.Nd[d.d("id")];if(e){var f=d.a("ref");if(f&&f.d("Name")!=d.d("Name")){d.g().nb("ref",null);f=null}if(!f||!f.get()){d.g().add(Vc(e,"ref"))}}}}};w.prototype.sj=function(a){this.A.update(new $(a,this))};w.prototype.fd=function(a){var b=a.Ka?a.Ka():(a.j?a.j:a),c=new $(b,this),d=b.id,
e=false,f=false,g=null,h=this.A.get(d);if(h){f=this.vb(h,"^Freq");e=this.vb(h,"^Temp");if(e){this.pe(h,false)}g=h.d("RosterState")}var j=this.A.e();this.A.update(c);if(e){this.pe(c,true)}if(f){this.Qi(c,"^Freq",true)}if(g){a.o("RosterState",g)}if(h){if(d==p("$CurrentContactId").h()){s.setTimeout(function(){q().k("$CurrentContact")},5)}}q().k(c.s());if(this.A.e()!=j){q().k("$Contacts/count()")}return c};w.prototype.li=function(a){if(a){var b=a.Ja(),c=a.oh().join(","),d=a.ra();Ec().fireEvent("CONTACT_CHANGED",
"id",b,"emails",c,"name",d)}else{Ec().fireEvent("CONTACT_CHANGED")}};w.prototype.tm=function(){Ec().fireEvent("GROUP_CHANGED")};w.prototype.pb=function(a){this.qm++;var b=String(-this.qm);a.o("Id",b);a=this.fd(a);return a};w.prototype.Zj=function(a){var b={},c=new B(b,"$TempGroup");q().T(c)};w.prototype.qn=function(a,b,c){var d=new E,e=Fd({out:"js",tok:this.He.D().get(),cid:a,photo:b,crop:c,action:"SET"});o(d,gb,this.ui,false,this);d.send(this.lb+"/update/photos","POST",e)};w.prototype.Lj=function(a){var b=
new E,c=Fd({out:"js",tok:this.He.D().get(),cid:a,action:"SET_EVERGREEN"});o(b,gb,this.ui,false,this);b.send(this.lb+"/update/photos","POST",c)};w.prototype.hk=function(a){var b=new E,c=Fd({out:"js",tok:this.He.D().get(),cid:a,action:"DELETE"});o(b,gb,this.Em,false,this);b.send(this.lb+"/update/photos","POST",c)};var Re=function(a){var b=a.indexOf("&&&START&&&")+"&&&START&&&".length,c=a.lastIndexOf("&&&END&&&");return Ah(a.substring(b,c))};w.prototype.ld=function(){Kd()};w.prototype.ui=function(a){var b=
a.target,c=null;if(b.Nb()){c=Re(b.lc())}if(c&&c.Success){Ma().add(qa("PICTURE_ADD_SUCCESS"),"INFO");this.dj(c.Body.Contact);if(c.Body.CanSuggest){ma().Mi("photopicker.PhotoPicker",{type:"SHOW_SUGGEST",imageUrl:c.Body.Contact.Picture})}else{this.ld()}}else{Ma().add(qa("PICTURE_ADD_ERROR"),Gb);this.ld()}};w.prototype.Em=function(a){var b=a.target,c=null;if(b.Nb()){c=Re(b.lc())}if(c&&c.Success){this.dj(c.Body.Contact);Ma().add(qa("PICTURE_DELETE_SUCCESS"),"INFO")}else{Ma().add(qa("PICTURE_DELETE_ERROR"),
Gb)}this.ld()};w.prototype.dj=function(a){var b=this.A.get(a.Id);if(b){b.o("Picture",a.Picture);b.yi();var c=q();c.k("$CurrentContact/Picture");c.k("$CurrentContact/ForcedPicture");c.k("$CurrentContact/MaybeHasPicture")}};w.prototype.xn=function(a,b){var c=new E,d=Fd({out:"js",tok:this.He.D().get(),cid:a,msg:b,action:"SUGGEST"});o(c,gb,this.Fm,false,this);c.send(this.lb+"/update/photos","POST",d)};w.prototype.Fm=function(a){var b=a.target,c=null;if(b.Nb()){c=Re(b.lc())}if(c&&c.Success){Ma().add(qa("PICTURE_SUGGEST_SUCCESS"),
"INFO")}else{Ma().add(qa("PICTURE_SUGGEST_ERROR"),Gb)}this.ld()};var Fd=function(a){var b=new S;for(var c in a){b.add(c,a[c])}return b.toString()};w.prototype.Bg=function(a){this.A.removeNode(a);this.Xf.o(a,null)};w.prototype.wj=function(a){if(a){var b=this.Mk(a),c=new $b(this,b,"ADD");c.send()}};w.prototype.Mk=function(a){return p(this.Nc+"/"+a+"/Name").h()};w.prototype.vb=function(a,b){var c=a.a("Groups",true).a(b);return c!=null&&c.d("id")!=null};w.prototype.Qi=function(a,b,c){var d=this.vb(a,
b);if(c&&!d){var e=a.a("Groups",true).a(b,true);e.o("value",a.ha());e.o("id",b)}else if(!c&&d){a.a("Groups",true).o(b,null)}};w.prototype.pe=function(a,b){a.o("SelectedCount",this.Ap++);var c=a.m(),d=b!=null?b:!this.vb(a,"^Temp");this.Qi(a,"^Temp",d);a.jk();var e=!(!this.Xf.a(c));if(d!=e){var f=d?Vc(a,c):null;this.Xf.o(c,f);Sa("$SelectedContactCount",this.Xf.g().e())}};w.prototype.he=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.ha()]=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=Fa(j)}else{l=Fa(j.substring(0,n));k=Fa(j.substring(n+1,j.indexOf(">",n)))}if(k.length>0){var g=c[k];if(!g){var m={Emails:[{Address:k}]},y=cb(m,k);g=this.pb(y)}this.pe(g,true)}}if(this.Bo){this.zd(-1,"");this.ie("")}};w.prototype.ie=function(a){this.nd=a};w.prototype.zd=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.vb(g,a)){var h=g.d("Name"),j=g.ha(),k=h&&b=="FULL"?h+" <"+j+">":
j;if(d){e=e+", "}e=e+k;d=true}}return e};w.prototype.zc=function(a,b,c){var d=String(Al++),e=a.a(b);if(!e){e=cb([],b,a);a.o(b,e)}var f=cb({id:d},d,e);e.o(d,f);if(c){f.a("Type",true).o("Id",c)}};w.prototype.Zc=function(a,b,c){a.a(b,true).o(c,null)};w.prototype.La=function(){return p("$TempContact").D()};w.prototype.im=function(a,b){var c={},d=a.Oa;for(var e=0,f=d.length;e<f;++e){var g=d[e].oh();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.ra()&&b[e].Name){k.o("Name",b[e].Name)}}else{var n=new $(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.hm(d,j),y=new bd;for(var e=0;e<m.length;++e){y.update(m[e])}return y};w.prototype.hm=function(a,b){var c=[],d=0;for(var e=0;e<a.length;e++){var f=a[e];while(d<b.length&&ql(f,b[d])>0){c.push(b[d++])}c.push(f)}while(d<b.length){c.push(b[d++])}return c};var af=
function(){B.call(this,{},"$SelectedContacts");q().T(this);var a=new B(0,"SelectedContactCount");q().T(a)};af.inherits(B);af.prototype.O=function(){return true};var Ld=function(){B.call(this,{},"SelectedGroup");var a=q();a.T(this);a.N(this.po.bind(this),"$CurrentGroup/id");this.Md=null};Ld.inherits(B);Ld.prototype.O=function(){return true};Ld.prototype.po=function(){var a=p("$CurrentGroup/id").h()||"^Temp";if(this.Md!=a){this.K=new M;var b=db(),c=b.g();for(var d=0;d<c.e();d++){var e=c.n(d),f=e.d("id");
if(b.vb(e,a)){this.o(f,Vc(e,f))}}this.Md=a;q().k("$SelectedGroup")}};var bd=function(){M.call(this)};bd.inherits(M);bd.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.Oa.length;d++){if(this.Oa[d].d("Id")==b){this.Oa[d]=a}}}else{this.add(a)}};bd.prototype.clear=function(){M.call(this)};var $=function(a,b,c){var d=a.Id,e=c||d;a.id=d;if(a.Groups==null){a.Groups=[]}R.call(this,a,e,b)};$.inherits(R);$.prototype.d=function(a){if(a=="UserGroupCount"){return this.Dh().g().e()}else{this.Nh(a);
return $.ca.d.call(this,a)}};$.prototype.a=function(a,b){if(a=="UserGroups"){return this.Dh()}else{this.Nh(a);return $.ca.a.call(this,a,b)}};$.prototype.Dh=function(){var a=new B({},"UserGroups",this),b=this.a("Groups",true).g();for(var c=0;c<b.e();c++){var d=b.n(c),e=d.d("id");if(!ra(e,"^")){a.g().add(Vc(d,e))}}return a};$.prototype.Nh=function(a){if((a=="ForcedPicture"||a=="MaybeHasPicture")&&!this.__PictureInitialized){this.__PictureInitialized=true;this.yi()}};$.prototype.yi=function(){var a=
this.uh();if(a){this.o("ForcedPicture",a);this.o("MaybeHasPicture",true)}else{this.o("MaybeHasPicture",false)}};$.prototype.Hn=function(){this.o("MaybeHasPicture",false)};$.prototype.uh=function(a){var b=this.ha();if(b){var c=db().Ak()+encodeURIComponent(b)+"?rp=1&pld=1&";if(a){c+="t=e&"}c+=Math.floor(Math.random()*2000000);return c}else{return null}};$.prototype.toString=function(){var a=this.ra(),b=this.ha();return a&&b?a+" <"+b+">":a||b};$.prototype.ra=function(){return this.d("Name")};$.prototype.ha=
function(){var a=this.a("Emails");if(a){var b=a.g();if(b&&b.e()>0){return b.n(0).d("Address")}}return null};$.prototype.Ja=function(){return this.d("Id")};$.prototype.oh=function(){var a=[],b=this.a("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};$.prototype.Gk=function(){return this.ra()||this.ha()||""};$.prototype.Ll=function(a){return a=="^All"||this.a("Groups").a(a)!=null};$.prototype.jk=function(){var a=this.a("Emails");if(a){var b=p("$UserData/AspDomain").h(),
c=p("$UserData/Email").h();for(var d=0;d<a.e();d++){var e=a.n(d),f=e.d("Address");if(fa(f,"@gmail.com")||fa(f,"@googlemail.com")||b&&fa(f,"@"+b)){e.o("CanChat",true)}if(f==c){this.o("Me",true)}}}};var ql=function(a,b){var c=rl(a,b);if(c!=0){return c}var d=a.ra()||a.ha()||"zz",e=b.ra()||b.ha()||"zz",f=d.toLowerCase(),g=e.toLowerCase();if(f==g){return 0}else if(f<g){return-1}else{return 1}};var rl=function(a,b){var c=a.d("DomainContact")?1:0,d=b.d("DomainContact")?-1:0;return c+d},eb=function(a,b,c){this.md=
a;this.bo=b;this.mf=c},ul=0;eb.prototype.pf=function(a){var b=new r(db().lb+"/update/"+a),c=db().He.D().get();b.t("token",c);b.t("tok",c);b.t("out","js");return b};eb.prototype.db=function(){throw new Error("getUpdateUri not implemented in "+this);};eb.prototype.send=function(){if(this.fj&&!this.fj()){if(this.mf){this.mf()}return}Sa("$ContactData/PendingRequest",true);var a=ul++;this.ln="ContactUpdate"+a;this.W="$ContactUpdate"+a;var b=this.db(),c=new vb(b,this.ln,"&&&START&&&","&&&END&&&",true);
this.vp=v(this.Um,this);var d=q();d.T(c,this.ln);d.N(this.vp,this.W);c.load();this.Vm=false;s.setTimeout(v(this.Vn,this),1000)};eb.prototype.Vn=function(){if(!this.Vm){Sa("$ContactData/PendingLongRequest",true)}};eb.prototype.Um=function(){this.Vm=true;Sa("$ContactData/PendingRequest",false);Sa("$ContactData/PendingLongRequest",false);var a=p(this.W+"/Success");if(a.h()){var b;if(this.qc){b=this.qc()}if(this.bo){this.bo(b)}var c=p(this.W+"/Messages/*");if(c.ja().e()>0){var d=p(this.W+"/Messages/[0]/Text").h();
Ma().add(d,"INFO")}}else{var e=p(this.W+"/TryLogin").h();if(e){alert(qa("INFO_LOGGED_OUT"));return}var f=p(this.W+"/Errors/*");if(f.ja().e()>0){var g=p(this.W+"/Errors/[0]/Message").h(),h=p(this.W+"/Errors/[0]/Text").h(),j=g||h;Ma().add(qa("SAVE_DATA_ERROR",{msg:j}),Gb)}else{Ma().add(qa("SAVE_DATA_UNKNOWN_ERROR"),Gb)}if(this.mf){this.mf()}}};var Zb=function(a,b,c,d){this.Ve=b;eb.call(this,a,c,d);this.Zo=!b.d("Id")};Zb.inherits(eb);Zb.prototype.db=function(){var a=this.Ve,b=this.pf("contact"),c=a.d("Id");
if(c){b.t("id",c);b.t("action","SET")}else{b.t("action","ADD")}this.rj(b);return b};Zb.prototype.rj=function(a){var b=this.Ve,c=p("Addresses/*").ja(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.mg(a,b,["Name","Title","Company","Notes"]);this.Yb(a,b,"Emails",["Address","Type/Id","Type/Label"]);this.Yb(a,b,"Others",["Value","Type/Id","Type/Label"]);this.Yb(a,b,"Phones",["Number","Type/Id",
"Type/Label"]);this.Yb(a,b,"Ims",["Name","Service/Id","Type/Id","Type/Label"]);this.Yb(a,b,"Addresses",["Street","City","Region","Postal","Type/Id","Type/Label","Source","Unstructured"]);this.Yb(a,b,"Groups",["id","value"]);return a};Zb.prototype.mg=function(a,b,c,d){var e=d||"";for(var f=0;f<c.length;f++){var g=c[f],h=p(g).h(b);if(!h){h=""}else if(W(h)){h=Fa(h)}a.t((e+g).replace("/","."),h)}};Zb.prototype.Yb=function(a,b,c,d){var e=p(c).D(b);if(e){for(var f=0;f<e.g().e();f++){var g=e.g().n(f);this.mg(a,
g,d,c+"."+String(f)+".")}}};Zb.prototype.fj=function(){var a=true,b=this.Ve.a("Emails").g(),c=0,d=false;for(var e=0;e<b.e();e++){var f=b.n(e).d("Address");if(f&&Fa(f)!=""){c++;if(e==0){d=true}}if(f&&!xl.test(Fa(f))){Ma().add(qa("ASK_VALID_EMAIL"),Gb);a=false}}var g=this.Ve.d("Name");if(c==0&&(!g||Fa(g)=="")){Ma().add(qa("ASK_NAME_OR_EMAIL"),Gb);a=false}else if(c>0&&!d){Ma().add(qa("ASK_PRIMARY_EMAIL"),Gb);a=false}return a};Zb.prototype.qc=function(){var a=p(this.W+"/Body/Groups/*").ja();if(a.e()>
0){var b=new kb("Groups",this.W+"/Body/Groups",this.W+"/Body/Groups");b.zf()}var c=p(this.W+"/Body/Contact").D(),d=this.md.fd(c);this.md.li(d);if(this.Zo){q().k("$Contacts")}return d};var Ue=function(a,b,c,d){eb.call(this,a,c,d);this.Vo=W(b)?[b]:b};Ue.inherits(eb);Ue.prototype.db=function(){var a=this.pf("contact");a.we("ids",this.Vo);a.t("action","DELETE");return a};Ue.prototype.qc=function(){var a=p(this.W+"/Body/Contact/*").ja();for(var b=0;b<a.e();b++){var c=a.n(b);this.md.Bg(c.d("Id"))}q().k("$Contacts");
var d=new kb("Groups",this.W+"/Body/Groups",this.W+"/Body/Groups");d.zf();Ma().add("Contact has been deleted.","INFO");this.md.li()};var $b=function(a,b,c,d,e,f){this.md=a;this.Ao=c||"ADD";this.rm=d;this.Md=b;eb.call(this,a,e,f)};$b.inherits(eb);$b.prototype.yh=function(a,b){var c=this.pf("groups");c.t("action",this.Ao);if(this.Md!=null){c.t("id",this.Md)}if(this.rm!=null){c.t("name",this.rm)}if(a.length>0){c.we("contactIds",a)}if(b.length>0){c.we("newContacts",b)}return c};$b.prototype.db=function(){var a=
p("$Contacts/*").ja(),b=a.e(),c=[],d=[];this.Ne={};for(var e=0;e<b;e++){var f=a.n(e);if(db().vb(f,"^Temp")){var g=parseInt(f.d("Id")||"",10);if(!isNaN(g)&&g>=0){c.push(g)}else{var h=f.ha();if(h){var j=f.ra()||"";d.push(h+":"+j);if(!isNaN(g)){this.Ne[h]=Number(g)}}}}}return this.yh(c,d)};$b.prototype.qc=function(){var a=db(),b=p(this.W+"/Body/Contacts/*").ja();for(var c=0;c<b.e();c++){var d=b.n(c),e=false;if(this.Ne){var f=d.Emails||{},g=f[0]||{},h=g.Address;if(h){var j=this.Ne[h];if(j){delete this.Ne[h];
var k=a.Ck(j);if(k){e=k.Ll("^Temp");a.Bg(j)}}}}var l=a.fd(d);if(e){a.pe(l,true)}}q().k("$Contacts");a.hi(this.W);q().k("$Groups");a.tm()};var nh=function(a,b,c,d,e,f,g){$b.call(this,a,c,d,e,f,g);this.Go=b};nh.inherits($b);nh.prototype.db=function(){return this.yh(this.Go,[])};var zl=function(a,b){if(b=="^Temp"){var c=0;for(var d=0;d<a.e();d++){var e=a.n(d);if(db().vb(e,b)){c++}}return c}else{var f=p("$Groups/"+b).D();return f?f.d("Count"):0}},xl=/^[a-z0-9_\.\-\+=%]+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,6})$/i;var yl=function(a,b){return p(a).h(b)},Sa=function(a,b,c){var d=p(a);if(d.ka()){return d.ka().D(c,true).o(d.Ob,b)}else{d.D(c).set(b)}},Se=function(a,b){return p(a).D(b)};var wl=function(a,b){var c=W(a)?Se(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+wl(f.n(h),b+1)+"\n"}e=e+d.substring(0,b)+"}"}return e};var Al=100;var Te=function(a,b){var c=false,d=a.a("Groups");if(d){var e=d.a(b);if(e){c=e.d("id")!=null}}return c},vl=function(a,b){if(!Te(a,b)){var c=a.a("Groups");if(!c.get()){c.set([])}c.a(b).set({id:b})}};var La=function(a,b,c){this.A=new M;B.call(this,this.A,"Contacts");this.Om=a;this.Nm=b;this.Bp=new bf(this);var d=
q();d.T(this);d.T(this.Bp);d.N(v(this.pj,this,a),b);this.Cp=0;new kb("AuthToken","$ContactReq/Body/AuthToken","$ContactReq");this.gq=p("$AuthToken/Value");this.Nc="$Groups";this.Od=p(this.Nc);d.N(v(this.bl,this),this.Nc);this.pq=c};La.inherits(B);La.prototype.pj=function(a,b){if(b==this.Nm){N.info("Starting contact add");var c=p(a+"/*"),d=c.ja(),e=d.e();for(var f=0;f<e;f++){var g=d.n(f);this.pb(g)}if(this.nd){this.he(this.nd,"^Temp")}N.info("About to fire data change");q().k("$Contacts");N.info("Ended contact add")}};
La.prototype.bl=function(){this.Nd={};var a=this.Od.D().g();for(var b=0;b<a.e();b++){var c=a.n(b);this.Nd[c.d("id")]=c}this.Rl()};La.prototype.g=function(a){if(!a||a=="*"){return this.A}else if(a.indexOf("*")==-1){var b=this.a(a);if(b){return new M([b])}else{return new Ja}}else{throw new Error("Selector not supported yet ("+a+")");}};La.prototype.d=function(a){var b=this.A.get(a);return b==null?null:b.get()};La.prototype.pb=function(a){var b=a.ha();a.j.id=b;a.mb(b);this.A.add(a);a.p=this;q().k(a.s());
return a};La.prototype.fd=function(a,b){var c=null,d=a.ha();a.a("id").set(d);a.mb(d);var e=this.A.Oa,f=false;for(var g=0;g<e.length;g++){if(e[g].ha()==d){a.a("SelectedCount").set(e[g].d("SelectedCount"));if(Te(e[g],"^Temp")){vl(a,"^Temp")}e[g]=a;c=e[g];f=true}}if(f){this.A.l.set(d,a);this.ai(a);a.p=this;q().k(a.s());return c}else if(b){return this.pb(a)}};La.prototype.he=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=Fa(e)}else{g=
Fa(e.substring(0,h));f=Fa(e.substring(h+1,e.indexOf(">",h)))}if(f.length>0){var j;if(!this.A.get(f)){var k={Name:g,Email:f,id:f};j=new B(k,k.Email);this.pb(j)}else{j=this.A.get(f)}j.a("SelectedCount").set(this.Cp++);if(b){j.a("Groups");var l=j.a("Groups");if(!l.get()){l.set([])}l.a(b).set(b)}}}if(this.Bo){this.zd(-1,"");this.ie("")}};La.prototype.ie=function(a){this.nd=a};La.prototype.zd=function(a,b){var c=this.A.e(),d=false,e="";for(var f=0;f<c;f++){var g=this.A.n(f);if(Te(g,a)){var h=g.d("Name"),
j=g.ha(),k=h&&b=="FULL"?h+" <"+j+">":j;if(d){e=e+", "}e=e+k;d=true}}return e};La.prototype.Vk=function(){this.wn=new M;var a,b=this.A.e(),c=[],d=[];for(a=0;a<b;a++){var e=this.A.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.wn.add(c[a])}}return this.wn};La.prototype.Rl=function(){var a=this.A.e();for(var b=0;b<a;b++){var c=this.A.n(b);this.ai(c)}};La.prototype.ai=function(a){if(a.a("Groups").get()==null){a.a("Groups").set([])}var b=
a.a("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.Nd[d.d("id")];if(e){var f=d.K.get("ref");if(!f){d.K.add(Vc(e,"ref"))}}}}};var bf=function(a){this.Fo=a;B.call(this,null,"SelectedContacts")};bf.inherits(B);bf.prototype.g=function(a){if(!a||a=="*"){return this.Fo.Vk()}else if(a.indexOf("*")==-1){var b=this.a(a);if(b){return new M([b])}else{return new Ja}}else{throw new Error("Selector not supported yet ("+a+")");}};var kb=function(a,b,c){B.call(this,null,a);
this.Pa=a;this.Om=b;this.Nm=c;this.Ea=new M;this.j=[];this.Wl=false;var d=q();d.T(this);d.N(v(this.zf,this),c)};kb.inherits(B);kb.prototype.zf=function(){if(!this.Wl){var a=this.Om,b=p(a+"/*");this.Ea=b.ja();for(var c=0;c<this.Ea.e();c++){this.j.push(this.Ea.n(c))}q().k("$"+this.Pa);this.Wl=true}};kb.prototype.g=function(a){if(!a||a=="*"){return this.Ea}else{throw new Error("Selector not supported yet ("+a+")");}};var We=function(a,b,c,d,e){this.ub=true;this.Od=p(b+"/*");if(c){this.Ho=p(c+"/*")}this.Gp=
d;this.Hp=e;this.Wf=a;this.Kp=this.Wf.options.length;var f=q();f.N(v(this.cl,this),b+"/...")};We.prototype.cl=function(){this.invalidate()};We.prototype.render=function(){if(this.ub){var a=this.Od.ja(),b=this.Kp,c=this.Wf.value;for(var d=0;d<a.e();d++){var e=a.n(d),f=e.d("id");if(!ra(f,"^")||this.Hp){var g=e.d("Name");if(this.Gp){var h=zl(this.Ho.ja(),f);g=g+" ("+h+")"}var j=Rc("option");j.value=f;j.text=g;this.Wf.options[b++]=j}}this.Wf.value=c;this.ub=false}};We.prototype.invalidate=function(){if(!this.ub){s.setTimeout(v(this.render,
this),5)}this.ub=true};var ed=function(){this.km=[];this.Vc={};q().T(new B(this.Vc,"LastMessage"))},kf;ed.prototype.add=function(a,b){var c=a.length<150,d=new Z("NOTIFY_USER");d.message=a;d.level=b;var e=true;if(c){e=Xf().ec(d)}if(e){this.lk(a,b)}};ed.prototype.lk=function(a,b){var c=b||"INFO",d={Message:a,Level:c};this.km.push(d);this.Vc.Message=a;this.Vc.Level=c;q().k("$LastMessage")};ed.prototype.clear=function(){var a=new Z("CLEAR_NOTIFICATIONS");if(Xf().ec(a)){this.Nj()}};ed.prototype.Nj=function(){var a=
{Message:null};this.km.push(a);this.Vc.Message=null;this.Vc.Level=null;q().T(new B(this.Vc,"LastMessage"));q().k("$LastMessage")};var Ma=function(){if(kf==null){kf=new ed}return kf},Gb="ERROR";var Rd=function(){};Rd.prototype.render=function(a,b){};Rd.prototype.P=function(){};Rd.prototype.Hb=function(){};var zc=function(){};zc.inherits(Rd);zc.prototype.render=function(a,b){};zc.prototype.P=function(){return[]};zc.prototype.Hb=function(){return true};zc.prototype.le=function(a,b){};var Ac=function(){};Ac.prototype.ed=function(a,b){};Ac.prototype.Gc=function(a){};Ac.prototype.chars=function(a){};Ac.prototype.Be=function(){};Ac.prototype.xd=function(){};var Ta=function(a,b){this.c=a;this.rd=a.ownerDocument;this.ib=[];this.Rd=false;this.cg=null;this.Yn=null;this.vd=[];this.Nf=0;this.mm=b||"SET_CONTENT";this.Wj=this.mm!="SET_CONTENT";this.jn=this.mm=="REPLACE";if(this.Wj){var c=Fl[a.nodeName]||"DIV";this.Bl=Rc(c);this.cc=this.Bl}else{this.cc=a}this.vd.push(this.cc)};Ta.inherits(Ac);var Fl={TR:"TABLE",TD:"TR",OPTION:"SELECT"},fh={},eh={},dh={},Gl={style:true,script:true},El={option:true,tr:true,td:true,tbody:true,thead:true},Dl={br:true,img:true};Ta.prototype.ed=
function(a,b){var c,d;if(this.Nf==0&&El[a]){var e=this.rd.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.qi.push({id:c,script:d})}this.vd.push(e);this.cc.appendChild(e);this.cc=e;this.so=true;return}this.Nf++;if(Gl[a]){return this.Qm(a,b)}var j=fh[a];if(!j){j="<"+a;fh[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=dh[l];if(m==null){m=" "+l+'="';dh[l]=m}k=k+m+Pa(n)+'"'}if(c&&d){this.qi.push({id:c,script:d})}}k=k+">";this.ib.push(k)};Ta.prototype.Gc=function(a){if(this.Nf>0){this.Nf--}else{if(this.cc.childNodes.length==0){this.cc.innerHTML=this.ib.join("")}this.ib=[];this.vd.pop();this.cc=this.vd[this.vd.length-1];return}if(this.Rd==true){this.Rd=false;return}if(!Dl[a]){var b=eh[a];if(b==null){b="</"+a+">";eh[a]=b}this.ib.push(b)}if(this.ib.length>1000){var c=this.ib.join("");
this.ib=[c]}};Ta.prototype.chars=function(a){if(this.Rd==true){return this.Xn(a)}this.ib.push(Pa(a))};Ta.prototype.Be=function(){this.ib=[];this.tn=[];this.qi=[]};Ta.prototype.xd=function(){var a=this.ib.join("");if(this.Wj){var b=this.Bl;if(!this.so){b.innerHTML=a}if(b.childNodes.length==1&&this.jn){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.jn){this.c.parentNode.removeChild(this.c)}if(c!=
null){this.c.parentNode.value=c}}}else{if(!this.so){this.c.innerHTML=a}}Ga(this.tn,function(e){eval(e)});Ga(this.qi,function(e){var f=Eb(e.id);(new Function(e.script)).call(f)})};Ta.prototype.Qm=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.cg="style";this.Yn=c+"_ss";this.Rd=true}else if(a=="script"){this.cg="script";this.Rd=true}else{throw Error("No handler for "+a);}};Ta.prototype.Xn=function(a){if(this.cg=="style"){this.xj(this.Yn,a)}else if(this.cg==
"script"){this.tn.push(a)}};Ta.prototype.Yj=function(a){var b=null,c=H(a);if(c==null){c=this.rd.createElement("style");c.setAttribute("type","text/css");c.setAttribute("id",a);this.rd.body.appendChild(c)}for(var d=0;d<this.rd.styleSheets.length;d++){var e=this.rd.styleSheets[d],f=e.owningElement;if(f==null){f=e.ownerNode}if(f.id==a){b=e}}return b};Ta.prototype.xj=function(a,b){if(H(a)){return}var c=this.Yj(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 Nd=function(a,b){this.za(a,b)},Od=function(a,b){if(a.indexOf("{{")==-1||a.indexOf("function(")!=-1){return Md(a)}else if(ra(a,"{{")&&fa(a,"}}")){var c=p(a.substring(2,a.length-2));if(b==1){c=new O(c.Gb());c.Ml=true}c.P=function(){return[c]};return c}else{return new Nd(a,b)}};Nd.prototype.za=function(a,b){this.ba=a;this.aa=[];this.Fa=[];if(this.ba.indexOf("{{")==-1){this.aa.push(Md(this.ba))}else{var c=this.ba.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.aa.push(Md(e))}else{var g=e.substring(0,f),h;if(b==1){h=new O(g);h.Ml=true}else{h=p(g)}this.aa.push(h);this.Fa.push(h);if(f<e.length-1){var j=e.substring(f+2);this.aa.push(Md(j))}}}}}};Nd.prototype.h=function(a){var b=this.aa.length,c=[];for(var d=0;d<b;d++){var e=this.aa[d].h(a);if(this.aa[d].Ml){if(e==null){e="null"}else if(W(e)){e=ym(e)}}c.push(e==null?"":e)}return c.join("")};Nd.prototype.P=function(){return this.Fa};var lf=function(){var a={};Ga(Xl,function(b){a[b]=true});this.Uo=a;this.qq={};this.to={};this.ek={}},mf,Wl=function(){if(mf==null){mf=new lf}return mf};lf.prototype.$j=function(a,b,c,d,e){d=d||0;var f=a.nodeName;if(f=="#text"){return new Pd(a.nodeValue,e)}else if(f=="#comment"){return new zc}else if(f=="MultilineText"){return new Ye(a,b,c,d)}else if(this.Uo[f]){return new z(a,b,c,d)}else if(f=="View"){return new cf(a,b,null,d)}else if(this.to[f]){return new cf(this.to[f],b,this.Xj(a),d)}else if(this.ek[f]){return this.ek[f](a,
b,c)}else{throw Error("No view exists matching name: "+f);}};lf.prototype.Xj=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 cb(b,"$View")};var Xl=["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 Xe="/ui/",gh=function(a){Xe=a};s.HtmlUtil_setServerBase=gh;var sl=function(a){var b=new r(Xe+"ContactManager"),c=a||"THREE";b.t("style",c);b.t("js","RAW");b.t("pop","TRUE");return b},tl=function(a,b){var c=b=="TWO"?502:750,d=new dc(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=sl(b).toString();window.open(f,"_manager",e)};Ul("goog.focus.ContactManagerLauncher.popManager",tl);var Ca=function(a,b){this.c=a;this.vo=b;this.vi=b.exists=="true";this.yd=[];this.Le(a);if(!this.vi){this.Gg("Add a picture",false,true)}};Ca.prototype.dispose=function(){for(var a=0;a<this.yd.length;a++){$c(this.yd[a])}if(this.xb&&this.xb.parentNode){this.xb.parentNode.removeChild(this.xb)}if(this.Va&&this.xb.Va){this.Va.parentNode.removeChild(this.xb)}};Ca.prototype.Le=function(a){this.yd.push(o(a,wc,this.zm,false,this));this.yd.push(o(a,Cd,this.ym,false,this));this.yd.push(o(a,ka,this.Bm,false,
this))};Ca.prototype.Ya=null;Ca.prototype.Qd=null;Ca.prototype.zm=function(a){if(this.Va){this.zg();return}this.Va=this.Tj();if(this.vi){this.Gg("Change picture",true)}};Ca.prototype.Tj=function(){var a=ia(this.c);a.width-=gf(this.c);a.height-=hf(this.c);if(Q){a.width+=4;a.height+=4}a.width+=2;a.height+=2;var b=Qb("div");this.Le(b);b.style.position="absolute";b.style.zIndex=20;fc(b,a);b.style.border="2px solid blue";var c=Dc(this.c);c.x-=3;c.y-=3;b=this.c.parentNode.insertBefore(b,this.c);Yd(b,c);
return b};Ca.prototype.Gg=function(a,b,c){if(!this.c.parentNode){return}var d=Qb("div");this.Le(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;Uk(d,this.c);var f=(this.c.offsetHeight+d.offsetHeight)/2;d.style.top="-"+f+"px";this.xb=d;this.cq=c};Ca.prototype.ym=function(a){if(this.Va){var b=a.relatedTarget;if(!b||
b!=this.c&&!Fe(this.Va,b)){this.Af(true)}}};Ca.prototype.Qk=function(a){var b={dn:a.Gk()},c=a.uh(true);if(c){b.eUrl=c}hh(b);return b};var hh=function(a){var b=p("$UserData/IsPicasaUser").h(),c=p("$UserData/Email").h(),d=b&&c&&(fa(c,"gmail.com")||fa(c,"googlemail.com"));a.userId=d?c.substring(0,c.indexOf("@")):null;a.urlEnabled=1;a.extraUploadParams="out=hjs";a.suppressHide="1"};Ca.prototype.Bm=function(){this.Af(false);var a=p("$Contacts/"+this.vo.contactid).D(),b=this.Qk(a);ma().Eb("photopicker.PhotoPicker",
b,this.Pd.bind(this))};Ca.prototype.Af=function(a){this.zg();if(a){var b=v(this.Af,this,false);this.Qd=s.setTimeout(b,20);return}if(this.c&&this.Va){this.Va.parentNode.removeChild(this.Va);this.Va=null;if(this.vi){this.xb.parentNode.removeChild(this.xb);this.xb=null}}};Ca.prototype.zg=function(){if(this.Qd){s.clearTimeout(this.Qd);this.Qd=null}};Ca.prototype.Pd=function(a){var b=this.vo.contactid,c=a.type;if(c=="PHOTO_PICKED"){if(a.evergreen){db().Lj(b)}else if(a.noPhoto){db().hk(b)}else{db().qn(b,
a.imageUrl,a.cropString)}}else if(c=="SUGGEST_DONE"&&a.suggestMessage){db().xn(b,a.suggestMessage)}else{Kd()}};var Jd=function(){},ih,cd={};Jd.prototype.Ja=function(){return"photopicker.PhotoPicker"};var Jl=function(){if(!ih){var a=new Jd;ma().Ym(a);ih=true}},Kd=function(){ma().xl("photopicker.PhotoPicker");ma().Mi("photopicker.PhotoPicker",{type:"CLOSE_NO_REMOVE"});ma().nk("photopicker.PhotoPicker");Ec().fireEvent("ENABLE_WINDOW")};Jd.prototype.attach=function(a,b){for(var c in cd){var d=cd[c];if(!d.c||!Fe(document,d.c)){d.dispose();delete cd[c]}}if(a&&!cd[a.id]){var e=new Ca(a,b);cd[a.id]=e}};Jd.prototype.Eb=
function(a,b){var c=new fb(545,332);if(Q){c.height-=16}var d=ma().Uj(this.Ja(),c,a,b);Ec().fireEvent("DISABLE_WINDOW")};var Ze,$e,jh=function(a,b){var c=307,d;if(a){d=Dc(a);var e=ia(a);d.y+=e.height}else{d=new yb(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 dc(d.x,d.y,f,g);return k},mh=function(a,b){var c=new r(Xe.replace(/ui\/?$/,""));Kl(c,a,b)},Kl=function(a,b,c,d){var e;if(b){b=H(b);var e=b.getAttribute("id")}else{e=null}var f;if(!Ya&&b){f=Ad(ib(b))||window}else{f=
window}var g=jh(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=kh(a,e,d);f.open(j.toString(),"_picker",h)},kh=function(a,b,c){var d=a.resolve(new r("ui/ContactPicker"));if(b){d.t("inputId",b)}if(c){if(c.serviceName){d.t("service",c.serviceName)}}return d},Ll=function(a,b,c){if(Ze){lh()}var d=jh(a,null),e=kh(a,c);window.iframeDone=lh;e.t("done","iframeDone");var f=H("picker-iframe-div");if(f==null){var f=
Qb("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=H("picker-iframe");g.style.display="block";Yd(f,d.left,d.top);fc(g,d.width,d.height);g.src=e;$e=f;Ze=g},lh=function(){sc($e);$e=null;Ze=null};Wb("goog.focus.PickerLauncher.popPicker",mh);Wb("goog.focus.PickerLauncher.popIframe",Ll);var Fb=function(a,b,c,d,e,f){this.Ko=b;this.sp=c;this.lb=a;this.Eo=d;this.Ep=!(!e);this.eo=f||""};Fb.prototype.Ql=function(){if(!p("$UserData").D()){var a=new E;o(a,gb,this.gl,false,this);a.send(this.lb+"/gastatus?out=js","GET")}else{this.Yh()}};Fb.prototype.gl=function(a){var b=a.target;if(b.Nb()){var c=this.ti(b.lc());if(c.Body){var d=c.Body.UserData,e=new R(d,"UserData");q().T(e)}}this.Yh()};Fb.prototype.Yh=function(){var a={};a.dn=this.Ko;a.profileMode="1";a.eUrl=this.sp;if(this.eo){a.theme=this.eo}hh(a);
ma().Eb("photopicker.PhotoPicker",a,this.Pd.bind(this))};Fb.prototype.Pd=function(a){if(a.type=="PHOTO_PICKED"){this.yn(a)}else{Kd()}};Fb.prototype.yn=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.Ep){b.add("p","true")}var c=new E;o(c,gb,this.ol,false,this);c.send(this.lb+"/update/photos","POST",b.toString())};Fb.prototype.ol=
function(a){Kd();var b=a.target,c=null;if(b.Nb()){c=this.ti(b.lc())}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.Eo(d)};Fb.prototype.ti=function(a){var b=a.indexOf("&&&START&&&")+"&&&START&&&".length,c=a.lastIndexOf("&&&END&&&");return Ah(a.substring(b,c))};var Ml=function(a,b,c,d,e){Jl();var f=new Fb(ma().Mc(),a,b,c,d,e);f.Ql()};window.launchProfilePhotoPicker=Ml;;function Ti(a){if(a in je){return je[a]}return je[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var je={};function Yi(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 td(a,b){if(Yi(a,b))return;a.className+=" "+b}var qk={Wo:function(a){return a.document.body.clientWidth},Xo:function(a){return a.document.documentElement.clientWidth},i:function(a){return a.innerWidth}};
function Xi(a,b){try{if(!window.opera&&"compatMode"in a.document&&a.document.compatMode=="CSS1Compat"){return b.Xo(a)}else if(Ti("msie")&&!window.opera){return b.Wo(a)}}catch(c){}return b.i(a)}function Zi(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 cg?cg[c]:"?"})}var cg={lt:"<",gt:">",quot:'"',
nbsp:" ",amp:"&",apos:"'"};function ud(a){return encodeURIComponent(a)}function Wj(a){return document.getElementById(a)}function Xj(a){return document.all[a]}var Vj=document.getElementById?Wj:Xj;function li(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=Vj("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 rk=this;if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,e;if(!a)a=rk;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 wj(a,b,c){var d=a.ug||[];d=d.concat(Array.prototype.slice.call(arguments,2));if(typeof a.Pe!="undefined"){b=a.Pe}if(typeof a.Oe!="undefined"){a=a.Oe}var e=function(){var f=d.concat(Array.prototype.slice.call(arguments));return a.apply(b,f)};e.ug=d;e.Pe=b;e.Oe=a;return e}Function.prototype.bind=function(a){return wj.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.inherits=function(a){var b=
function(){};b.prototype=a.prototype;this.ca=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}};var jg;function mj(){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);jg=c;break}catch(d){}}if(!jg){throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");}}}mj();if("undefined"==typeof li){li=function(){}};function ag(a){var b=a.match(/^(?:([^:\/?#]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/);if(!b){return null}return new kc(jc(b[1]),jc(b[2]),jc(b[3]),jc(b[4]),jc(b[5]),jc(b[6]),jc(b[7]))}function Vo(a,b){if("string"==typeof a){return encodeURI(a).replace(b,Wo)}return null}function Wo(a){var b=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function kc(a,b,c,d,e,f,g){this.ta=a;this.bk=b;this.Za=c;this.jb=d;this.Ra=
e;this.ke=f;this.bb=g;this.fe=null}kc.prototype.toString=function(){var a=[];if(null!==this.ta){a.push(this.ta,":")}if(null!==this.Za){a.push("//");if(null!==this.bk){a.push(this.bk,"@")}a.push(this.Za);if(null!==this.jb){a.push(":",this.jb.toString())}}if(null!==this.Ra){a.push(this.Ra)}if(null!==this.ke){a.push("?",this.ke)}if(null!==this.bb){a.push("#",this.bb)}return a.join("")};kc.prototype.nj=function(a){this.Ra=Vo(a,/[\#\?]/g);return this};kc.prototype.mj=function(a){this.fe=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.ke=b.join("");return this};kc.prototype.lj=function(){if(!this.fe){if(!this.ke){this.fe=[]}else{var a=this.ke.split(/[&\?]/),b=[];for(var c=0;c<a.length;++c){var d=a[c].match(/^([^=]*)(?:=(.*))?$/);b.push(Oi(d[1]),Oi(d[2]||""))}this.fe=b}}};kc.prototype.Sa=function(a,b){if(typeof b==="string"){b=[b]}this.lj();var c=0,d=this.fe,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.mj(e);return this};function Oi(a){return decodeURIComponent(a).replace(/\+/g," ")}function jc(a){return"string"==typeof a&&a.length>0?a:null};var Lc=[];Lc.HIDE_TIMEOUT=100;Lc.SHOW_TIMEOUT=100;var le="menu-normalsb",vd="menu-shim";function fj(){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 ej(a,b){var c=b.id;if(!c){c=a.currentTarget.id}var d=window.setTimeout(eg(c),Lc.HIDE_TIMEOUT),e=document.getElementById(c);e.VideoTabHideTimer=d}function fg(a){var b=document.getElementById(a);
if(b===null){return}if(b.bt!==null){b.bt.className=le}if(b.style===null){return}b.style.display="none";var c=document.getElementById(vd);if(c!==null&&c.style!==null){c.style.display="none"}}function kj(a){var b=document.getElementById(a);if(b==null){return}if(b.bt!=null){if(b.bt.className==le){b.bt.className="menu-selectsb"}else{b.bt.className=le}}if(b.style!==null){if(b.style.display=="none"){b.style.display="block";var c=document.getElementById(vd);if(c!==null){c.style.display="block"}}else{b.style.display=
"none";var c=document.getElementById(vd);if(c!==null&&c.style!==null){c.style.display="none"}}}}function gj(a){window.clearTimeout(a.VideoTabHideTimer);a.VideoTabHideTimer=null}function dj(a,b,c){var d=a.VideoTabPopupTimer;if(d!==null){window.clearTimeout(d);a.VideoTabPopupTimer=null}var e=window.setTimeout(eg(a.id),Lc.HIDE_TIMEOUT);a.VideoTabHideTimer=e}function jj(a,b,c){if(a.VideoTabHideTimer){window.clearTimeout(a.VideoTabHideTimer);a.VideoTabHideTimer=null}var d=window.setTimeout(bj(a.id),Lc.SHOW_TIMEOUT);
a.VideoTabPopupTimer=d;a.bt=b}function ij(a){if(a===null||a.style===null){return}var b=a.bt,c=Ri(b),d=Si(b)+b.offsetHeight-1,e=c.toString()+"px",f=d.toString()+"px",g=fj();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(vd);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 hj(a){if(a===null){return}a.className="menu-menuitem-sel"}function cj(a){if(a===null){return}a.className="menu-menuitem"}function eg(a){if(!a){return}return function(){fg(a)}}function bj(a){if(!a){return}return function(){ij(document.getElementById(a))}};function Wi(a,b){if(a=="goFullscreen"||a=="donePlaying"){if(this[a]){var c=eval("["+b+"]");this[a].apply(this,c)}}else if(a=="clickVideo"){Jj()}}function Jj(){var a=i("thumbflashpreview");if(!a||typeof a=="undefined"){return}var b=a.parentNode.parentNode.childNodes;Fo();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 vo(a,b){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie=
a+"="+b+"; expires="+c.toGMTString()}function Zf(a,b){var c=new Date,d=ab(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 Hc(a,b,c,d){var e=a+"="+encodeURIComponent(b);if(c){e+="; domain="+c}if(d){e+="; path="+d}document.cookie=e}function ic(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 Ej(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 ab(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 uo(a,
b,c){for(var d=0;d<a.childNodes.length;d++){if(a.childNodes[d].nodeName==b){wo(a.childNodes[d],c)}}}function Fo(){var a=i("thumbflashpreview");if(a&&typeof a!="undefined"){var b=a.parentNode.parentNode;Sn(a.parentNode);uo(b,"A",true)}}var ld=navigator.appVersion.indexOf("MSIE")!=-1?true:false,Of=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,ji=navigator.userAgent.indexOf("Opera")!=-1?true:false;function Tj(a){if(!a&&ld&&Of)return;for(var b=25;b>0;b--){var c;if(ld&&Of&&!ji){c=VBGetSwfVer(b)}else{c=
navigator.plugins["Shockwave Flash"].description.substring(16,19)}if(c==-1){ne();return false}else if(c!=0){var d;if(ld&&Of&&!ji){var e=c.split(" "),f=e[1];d=f.split(",")}else{d=c.split(".")}var g=d[0];if(g<7){ne();return false}else{return true}}}ne();return false}function ne(){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 t(a){a.style.display="none"}function u(a){a.style.display=""}function Po(a,b){mc=i(a);Ki(mc,b)}function Ki(a,b){var c=function(){t(a)};window.setTimeout(c,b)}function wo(a,b){if(b){u(a)}else{t(a)}}function So(a){var b=i(a);if(!b){return true}else if(og(b,"display","display")=="block"||og(b,"display","display")=="inline"){b.className="invisible"}else{b.className=
"visible"}}function og(a,b,c){if(a.currentStyle){return a.currentStyle[b]}else if(window.getComputedStyle){var d=window.getComputedStyle(a,"");return d.getPropertyValue(c)}}function Sn(a){a.parentNode.removeChild(a)}function ce(a){a=encodeURIComponent(a);var b=/(%20)+/g;return a.replace(b,"+")}function Lj(a){var b=a.options[a.selectedIndex].value;if(b)document.location.href=b}function Nn(a,b,c){var d=ab(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}ic(b,d,c)}function lk(){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 hi=lk();function Cj(){var a;if(hi){a=new ActiveXObject(hi)}else{a=new XMLHttpRequest}return a}function L(a,b,c,d,e){var f=Cj(),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 Bb(){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 I(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 hg;function pk(){if(!ab("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";hg=new Image;hg.src=a}}}function yo(a,b){if(a.value.length>b){a.value=a.value.substring(0,b)}};function mc(a){return document.getElementById(a)}function de(a){return Math.floor(a)+"px"}function Ri(a){var b=0;while(a){b+=a.offsetLeft;a=a.offsetParent}return b}function Si(a){var b=0;while(a){b+=a.offsetTop;a=a.offsetParent}return b}function bg(a,b){if(b){this.coord=[a.offsetLeft,a.offsetTop+1,a.offsetWidth-2,a.offsetHeight-2]}else{this.coord=[Ri(a),Si(a),a.offsetWidth,a.offsetHeight]}};bg.prototype.add=function(a){for(var b=0;b<this.coord.length;++b){this.coord[b]+=a[b]}};bg.prototype.apply=
function(a){a.style.left=de(this.coord[0]);a.style.top=de(this.coord[1]);a.style.width=de(this.coord[2]);a.style.height=de(this.coord[3])};function _handleShowAlertPanelClick(){if(hc("addalert")){kd("addalert");i("zip").src="common/plus_sm.gif"}else{ge("addalert");i("zip").src="common/minus_sm.gif"}}function _sendCreateAlertRequest(a,b){i("msg-create-alert-status").innerHTML=MSG_CREATING_ALERT;ge("msg-create-alert-status");sg(i("createalertbutton"));kd("msg-alert-create-bad-email");kd("msg-alert-created");L(a,Pm,b)}function Pm(a,b,c,d,e){if(a.readyState==4){var f=a.responseText;if(f=="alertCreated"){kd("msg-create-alert-status");ge("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"){kd("msg-create-alert-status");ge("msg-alert-create-bad-email")}else{i("msg-create-alert-status").innerHTML=MSG_CREATE_ALERT_ERROR}vg(i("createalertbutton"))}}function ge(a){i(a).style.display=""}function kd(a){i(a).style.display="none"};function Jn(a,b,c,d){var e=i("tag_error");if(!c||i("taginput").value==MSG_ADD_LABEL){rd(MSG_ERROR_TAG_MISSING,null);return}if(c.length>50){rd(MSG_ERROR_TAG_TOO_LONG,null);return}c=c.replace(/(^\s+)|(\s+$)/g,"");if(c!==""){fe(MSG_ANNOTATION_SAVING,null);i("taginput").tagUploadState="uploading";ie(a,b,c,null,null,d)}else{i("taginput").value=""}}function ie(a,b,c,d,e,f){var g=Bb(),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)}}}L(a+
"?frame=label"+VP_langParam,dn,g,null,'text/xml; charset="UTF-8"')}var Ji;function Gi(a,b,c){var d=i("tag_error");d.innerHTML=a;d.style.display="";window.clearTimeout(Ji);if(b!==null){Ji=setTimeout(pg,b)}if(!c||c=="info"){d.className="ratingsInfo"}else{d.className="ratingsError"}}function rd(a,b){Gi(a,b,"error")}function fe(a,b){Gi(a,b,"info")}function Tf(a){a.innerHTML=""}function dn(a,b,c,d,e){pg();var f=i("common_tags_short"),g=i("common_tags_all"),h=i("remove_tags"),j=i("remove_tags_links");if(!b||
!a.responseXML){rd(MSG_UNKNOWN_ERROR,null)}else{var k=a.responseXML.documentElement;if(k.tagName=="error"){var l=I(k,"errormessage");rd(l,null)}else if(k.tagName!="tags"){rd(MSG_UNKNOWN_ERROR,null)}else{Tf(f);Tf(g);Tf(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 D=document.createTextNode(", ");
if(y!==0){g.appendChild(D);if(y<3){f.appendChild(D.cloneNode(false))}h.appendChild(D.cloneNode(false))}if(y<3){f.appendChild(qe(m,null))}g.appendChild(qe(m,null));h.appendChild(qe(m,"delete"))}if(n.length>3){var ta=document.createElement("A");ta.className="taglink";ta.href="javascript:void(0)";g.appendChild(D.cloneNode(false));var aa=ta.cloneNode(true);aa.onclick=function(){Mc("common_tags","false");nd()};aa.innerHTML="<b>&laquo;</b>";g.appendChild(aa);f.appendChild(D.cloneNode(false));var X=ta.cloneNode(true);
X.onclick=function(){Mc("common_tags","true");nd()};X.innerHTML="<b>"+MSG_MORE_TAGS+"&nbsp;&raquo;</b>";f.appendChild(X)}var $a=i("taginput");if($a&&$a.tagUploadState=="uploading"){fe(MSG_ANNOTATION_SAVED,5000);$a.value="";$a.tagUploadState=null}else if(i("tag_error").tagUploadState=="removing"){fe(MSG_REMOVED_TAG,5000);i("tag_error").tagUploadState=null}}}}function qe(a,b){var c=document.createElement("A"),d=I(a,"name"),e=I(a,"raw_name"),f=I(a,"short_name"),g=I(a,"tag_mode"),h=I(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(){Un(TAG_DISPLAY_URI,did,e,h,VP_annotationsToken);
c.className="striketaglink"};c.innerHTML="<nobr>"+f+"&nbsp;";c.innerHTML+="</nobr>"}return c}function Un(a,b,c,d,e){var f=i("tag_error");fe(MSG_REMOVED_TAG,null);f.tagUploadState="removing";if(VP_isOps){ie(a,b,c,"OPS",d,e)}else{ie(a,b,c,"SPAM",d,e)}}function Mc(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 pg(){i("tag_error").innerHTML=
""}function Oo(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 xj(){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 mi(){if(Xo()){qo()}return false}function Xo(){gn();var a=true;if(i("username").value==""){a=false;u(i("username-error"))}if(i("password").value==
""){a=false;u(i("password-error"))}if(i("site").selectedIndex<=0){a=false;u(i("site-error"))}if(!Pi("login-")){a=false}return a}function gn(){t(i("username-error"));t(i("password-error"));t(i("site-error"));fi("login-");t(i("login-error"))}function Ho(){if(Yo()){to()}return false}function Yo(){var a=true;if(i("title").value==""){a=false;u(i("title-error"))}else{t(i("title-error"))}if(!Pi("submit-")){a=false}return a}function qo(){tg(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+=Bg("login-");L(Ag(),Tm,b);u(i("loginstatus"))}function Ag(){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 tg(a){i("loginbutton").disabled=a;i("username").disabled=a;i("password").disabled=a;i("site").disabled=a;Fj("login-",a);i("loginbutton").disabled=a;i("rememberc").disabled=
a}function Tm(a){if(a.readyState==4){t(i("loginstatus"));tg(false);var b=a.responseText.split("\t");if(b[0]-0==0){if(!pi("login-",b)){i("password").value="";i("password").blur();i("password").focus();rn(b[1])}}else{sn(b)}}}function rn(a){i("login-error").innerHTML=a;u(i("login-error"))}function sn(a){Go();VP_supportFlash=""+a[1];Hn(a);if(a[0]==1){si()}else{t(i("logintablediv"));t(i("bloggersdiv"));u(i("blogselect"))}}function Go(){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 Hn(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 si(){Mj();i("player-big").checked=true;i("autoplay").checked=false;t(i("blogselect"));t(i("logindiv"));u(i("submitdiv"));t(i("finisheddiv"))}function Mj(){var a;if(VP_supportFlash=="true"){nj();a=document.createElement("div");
a.innerHTML=VP_flashPath}else{oj();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 oj(){i("playercell").style.height="250px";i("autoplaydisplay").style.display="none";i("playersizelabel").style.display="none";i("thumbsizelabel").style.display="inline"}function nj(){i("playercell").style.height="330px";i("autoplaydisplay").style.display="inline";i("playersizelabel").style.display=
"inline";i("thumbsizelabel").style.display="none"}function to(){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)+Dg()+"&size="+encodeURIComponent(VP_playersize)+
"&site="+encodeURIComponent(a.options[a.selectedIndex].value)+"&auto="+encodeURIComponent(i("autoplay").checked)+"&blog="+encodeURIComponent(b.options[c].value);f+=Bg("submit-");L(Ag(),cn,f);u(i("submitstatus"))}function cn(a){if(a.readyState==4){var b=a.responseText.split("\t"),c;if(b[0]-0==0){if(pi("submit-",b)){i("submitbutton").disabled=false;t(i("submitstatus"));return}else{Io();c=b[1]}}else{Ko();c='<a href="javascript:void(0)" onclick="window.open(&quot;'+b[1]+'&quot;, &quot;_blank&quot;);">'+
b[1]+"</a>"}i("messagediv").innerHTML=c;u(i("messagediv"));t(i("submitstatus"));i("submitbutton").disabled=false}}function Io(){u(i("faildiv"));t(i("logindiv"));t(i("submitdiv"));u(i("finisheddiv"))}function Ko(){u(i("successdiv"));u(i("refreshmsgdiv"));t(i("logindiv"));t(i("submitdiv"));u(i("finisheddiv"))}function Wn(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 vj(){i("password").value="";u(i("logintablediv"));u(i("bloggersdiv"));t(i("blogselect"));fn("login-");fi("login-");Ci("login-",false,"","")}function zj(a){if(!a){a=window.event}var b=a.keyCode||a.which;if(b==13){mi()}}function Co(a){i(a+"captcha-section").style.display=""}function fn(a){i(a+
"captcha-section").style.display="none"}function Bo(a){u(i(a+"captcha-error"))}function fi(a){t(i(a+"captcha-error"))}function Ci(a,b,c,d){i(a+"captcha-required").value=b;i(a+"captcha-image").src=c;i(a+"captcha-token").value=d}function Fj(a,b){i(a+"captcha-text").disabled=b}function Pi(a){if(i(a+"captcha-required").value=="true"&&i(a+"captcha-text").value==""){Bo(a);return false}return true}function Bg(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 pi(a,b){if(b[1]=="captcha-required"){Ci(a,"true",b[2],b[3]);Co(a);return true}return false};var Rf=[];function _addOnLoadAction(a){Rf.push(a)}function _runOnLoadActions(){for(var a=0;a<Rf.length;a++){Rf[a]()}}function Kc(a,b,c,d,e,f,g,h,j,k){this.df=a;this.Pp=b;this.Fp=c;this.jq=d;this.ff=e;this.Gl=f;this.ap=g;this.Ro=h;this.kq=k}var _ContentListItem=Kc;Kc.prototype.Ek=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.Xg(b,g)}}return e};Kc.prototype.Dd=function(a,b,c){var d=this.yk(b);td(d,"contentitemcore");var e=document.createElement("div");e.style.width="150px";td(e,"contentitem");var f;if(this.Gl){f=document.createTextNode("advertisement")}else{f=document.createTextNode(" ")}var g=document.createElement("div");g.appendChild(f);td(g,"contentitemad");
e.appendChild(g);var h=document.createElement("div");for(var j=0;j<c.length;j++){h.appendChild(this.Ek(a,c[j],this.ap));h.appendChild(document.createElement("br"))}td(h,"contentitemcontrols");e.appendChild(h);e.appendChild(d);e.id=b;return e};Kc.prototype.yk=function(a){var b=document.createElement("div"),c=document.createElement("img");c.src=this.Pp;c.alt="";c.border="1";c.width=100;c.height=75;if(this.Ro){c.title="Click here to edit destination URL";c.style.cursor="pointer";var d=this;c.onclick=
function(){Eo(d.df)}}var e=document.createTextNode(this.Fp);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.Pa=a;this.df=b;this.v=[]}_ContentListTimeline.prototype._getIds=function(){return this.v.join(",")};_ContentListTimeline.prototype.qb=function(a){return this.Pa+"_items_"+a};function _addItemToTimeline(a,b){b._addItem(a)}function _addItemHashToTimeline(a,b){var c=
new Kc(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.iq+=a.duration;this.v.push(a);var b=a.Dd(this,this.qb(this.v.length-1),he),c=this,d=0;if(ld&&this.versionMajor==6){d=500}setTimeout(function(){c._finishAddItem(b)},d)};_ContentListTimeline.prototype._finishAddItem=function(a){var b=document.getElementById(this.Pa);b.appendChild(a);b.style.width=this.v.length*150+50+"px";if(a.clientHeight>b.clientHeight){b.style.height=
a.clientHeight+"px"}this.Ki()};_ContentListTimeline.prototype.Ki=function(){var a=document.getElementById("sessionfield"),b="[";for(var c=0;c<this.v.length;c++){b+=An(this.v[c]);if(c<this.v.length-1){b+=","}}b+="]";a.value=b};var he=["remove","noop","up","down"];_ContentListTimeline.prototype.swap=function(a,b){var c=document.getElementById(this.qb(a)),d=document.getElementById(this.qb(b)),e=this.v[a];this.v[a]=this.v[b];this.v[b]=e;var f=this.v[a].Dd(this,this.qb(a),he),g=this.v[b].Dd(this,this.qb(b),
he),h=c.parentNode;h.replaceChild(f,c);h.replaceChild(g,d)};_ContentListTimeline.prototype.Mj=function(){var a=this.v.length;for(var b=0;b<a;b++){this.Xg("remove",this.v[0])}};function _clearAllItemsInTimeline(a){a.Mj()}_ContentListTimeline.prototype.Xg=function(a,b){var c=-1;for(var d=0;d<this.v.length;d++){if(this.v[d]==b){c=d}}if(a=="up"){if(c>0){this.swap(c,c-1)}}else if(a=="down"){if(c<this.v.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.v.length-
1){this.swap(c,this.v.length-1)}}else if(a=="remove"){for(var d=c;d<this.v.length-1;d++){this.swap(d,d+1)}this.v.splice(this.v.length-1,1);var e=document.getElementById(this.qb(this.v.length));e.parentNode.removeChild(e);document.getElementById(this.Pa).style.width=this.v.length*150+50+"px"}this.Ki()};function _getTimelineIds(a){var b=[];for(var c=0;c<a.v.length;c++){b.push(a.v[c].df)}return b.join(" ")}function Eo(a){document.getElementById("editvideometadiv").innerHTML="";document.getElementById("editvideometadiv").style.display=
"block";L("/videometaedit?docid="+a,Gj,null,null)}function Gj(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.no=function(a,b){for(var c=0;c<this.v.length;c++){if(this.v[c].df==a){this.v[c].Gl=b;var d=document.getElementById(this.qb(c)),e=this.v[c].Dd(this,this.qb(c),he),f=d.parentNode;f.replaceChild(e,d)}}};function _saveVideoMetadata(a,
b,c,d,e){var f="/videometawrite?";f+="docid="+ud(b);f+="&url="+ud(c);f+="&urllabel="+ud(d);f+="&isad="+ud(e?"on":"off");L(f,null,null,null);_hideVideoMetadata();a.no(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 An=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 Pj=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},xg=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=Pj(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=xg;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 Zj=function(){var a=ag(document.URL);a.nj("/accountheader");a.Sa("continueUrl",[document.URL]);a.Sa("frame",["1"]);L(a,Yj)},Yj=function(a,b,c,d,e){if(b){var f=i("guser");if(f){f.innerHTML=a.responseText}}},_gb_refreshGaiaBar=Zj;var Nc,nc,Ia,re="GenrePageState",ck=function(a,b,c){Nc=a;nc=b;Ia={};for(var d=0;d<c.length;d++){var e=c[d];if(e.numPages>0){Ia[e.sectionId]=e}}jk()},jk=function(){var a=ab(re),b=yg(a);for(var c in Ia){var d=Ia[c];if(!b||b.pageId!=Nc){d.initialVisibility=true}else if(b.seed!=nc){d.initialVisibility=false}else{d.initialVisibility=true;if(c in b.sectionIdToPageNumMap){var e=b.sectionIdToPageNumMap[c];if(e!=d.currentPage){d.initialVisibility=false}}}}},ek=function(){if(!ik()){zg()}},zg=function(){var a=
{};for(var b in Ia){var c=Ia[b];a[b]=c.currentPage}var d=new se(Nc,nc,a);Hc(re,d.Fk(),null,window.location.pathname)},ik=function(){var a=ab(re),b=yg(a);if(b==null){return false}if(b.pageId!=Nc){return false}var c=false;if(b.seed!=nc){nc=b.seed;c=true}var d=false;for(var e in Ia){var f=Ia[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.Lf(g);d=true}}return d},fk=function(){var a=i("narrow-css"),
b=Xi(window,qk);if(!isNaN(b)){a.disabled=b>=990}},gk=function(a){var b=Ia[a],c=i(b.cb()+"-contents"),d=(c.clientHeight-41)/2,e=i(b.cb()+"-prev-active"),f=i(b.cb()+"-prev-inactive");e.style.margin=d+"px 0";f.style.margin=d+"px 0";var g=i(b.cb()+"-next-active"),h=i(b.cb()+"-next-inactive");g.style.margin=d+"px 0";h.style.margin=d+"px 0"},dk=function(a){Ia[a].sm()},hk=function(a){Ia[a].Mm()},bk=function(a){return Ia[a].Ok()},kk=function(a,b){Ia[a].Vi(b)},pb=function(a,b,c){this.sectionId=a;this.numPages=
c;this.currentPage=b;this.initialVisibility=false;this.pendingRequest=false;this.prevAndNextButtonsAreInitialized=false};pb.prototype.cb=function(){return"gp-section-"+this.sectionId};pb.prototype.hg=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.cb()+"-prev",this.currentPage==0?"hidden":b);a(this.cb()+"-next",this.currentPage+1==this.numPages?"hidden":b)};pb.prototype.Vi=function(a){var b=i(this.cb());if(a){this.hg();b.style.visibility="visible"}else{b.style.visibility="hidden"}};pb.prototype.Ok=function(){return this.initialVisibility};pb.prototype.Lf=function(a){if(!this.pendingRequest){this.pendingRequest=true;this.hg();var b=this,c=ag(document.URL);c.Sa("output",
["AJAX"]);c.Sa("gpid",[Nc]);c.Sa("seed",[nc]);c.Sa("sectionid",[this.sectionId]);c.Sa("page",[a.toString()]);c.Sa("frame",["1"]);L(c,function(d,e,f,g,h){b.fl(d,e,f,g,h)},null,{sectionId:this.sectionId,pageNum:a})}};pb.prototype.sm=function(){this.Lf(this.currentPage+1)};pb.prototype.Mm=function(){this.Lf(this.currentPage-1)};pb.prototype.fl=function(a,b,c,d,e){if(b){var f=i(this.cb()+"-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.Vi(true);zg()}}}else{if(a.status&&a.status==410){window.location.reload(true)}}this.pendingRequest=false;this.hg()};var se=function(a,b,c){this.pageId=a;this.seed=b;this.sectionIdToPageNumMap=c},yg=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 se(c,d,f)};se.prototype.Fk=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=ck,_gp_onLoad=ek,_gp_onWindowResize=fk,_gp_positionArrows=gk,_gp_nextPage=dk,_gp_previousPage=hk,_gp_getInitialVisibility=bk,_gp_setVisibility=kk,_gp_PageableSection=pb;var tn=function(){i("framed_video_data").style.display="none";i("collapse_link").style.display="none";i("expand_link").style.display="inline";Pf();Zf(VP_collapsedFrameCookieName,1)},un=function(){i("framed_video_data").style.display="block";i("expand_link").style.display="none";i("collapse_link").style.display="inline";Pf();Zf(VP_collapsedFrameCookieName,0)},oi=new Array("related-videos","flagtab","sendemail-form","labeltab"),wn=function(a,b){for(var c=0;c<oi.length;c++){var d=oi[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"}}Zf(VP_tabFrameCookieName,b)}},ni=false,vn=function(){if(VP_enableEmailAutocomplete&&!ni){_initEmailAutocomplete(i("to"),"/data/contacts?max=250",false);ni=true}},Pf=function(){var a=i("lpaf_framefull"),b=i("3rdPartyFrame"),c=window.innerHeight||document.documentElement.offsetHeight,
d=c-a.offsetHeight-(Q?3:0);d=Math.max(0,d);b.style.height=d+"px";if(Q||Ya||Hb){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=un,_lpaf_setActiveTab=wn,_lpaf_collapse=tn,_lpaf_onResize=Pf,_lpaf_initAutocomplete=vn;var xd=30,mg=8,lg=50;function aj(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(xd);this.cachedNo=0;this.visibleIndex=0;this.targetVisibleIndex=0;this.animating=false;this.cachingState=0}function dg(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 kn(){for(var a in resultBoxes){jn(resultBoxes[a])}}function jn(a){var b="/videofeed?type=search&output=ajax&frame=morebox&docid="+
VP_docId+"&q="+a.query+"&filter="+a.filter+"&num="+xd+"&start=0&msg=-1";b=qb(b);L(b,Mf,null,a.name)}function Mf(a,b,c,d,e){if(a.readyState==4){var f=a.responseText.replace(/\"/g,"'");ti(encodeURIComponent(f),e)}}function ob(a,b){i(a+"active").style.display=b?"inline":"none";i(a+"inactive").style.display=b?"none":"inline"}function Ii(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 Do(a){if(a.cachedNo==0){return}var b=ak(a);i(a.name+"_items").innerHTML=b;Li(a);Mi(a);Ii(a.name,a.cachedNo>3?4:3)}function ak(a){var b='<table cellpadding="0" cellspacing="2" class="resultboxtable" id="'+a.name+'_table"><tbody>';for(var c=0;c<a.cachedNo;c++){b+=$j(a.cached[c],a.name+"_item_"+c)}b+="</tbody></table>";return b}function $j(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 Mi(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 Li(a){if(a.total==0){ob(a.name+"_prev",false);ob(a.name+"_next",false);return}var b=a.resultIndex+a.visibleIndex+1;ob(a.name+"_prev",b>1?true:false);ob(a.name+"_next",a.visibleIndex+3<a.cachedNo?true:false)}function ti(a,b){var c=resultBoxes[b];c.cachingState=2;if(c.animating){var d='processResponse("'+a+'","'+b+'")';setTimeout(d,
400);return}yj(decodeURIComponent(a),c);if(c.total==0||c.cachedNo==0){ob(b+"_prev",false);ob(b+"_next",false);Ii(b,2)}else{Do(c);po(c)}c.cachingState=0}function po(a){var b=a.name+"_item_"+a.visibleIndex,c=i(b).offsetTop-2;i(a.name+"_items").scrollTop=c}function yj(a,b){var c=a.split("\r\n"),d=c[0].split("\t"),e=1*d[0],f=1*d[1];Oj(d[2],b);if(e<0||e>xd||f<0){return}var g=true;if(f<b.resultIndex){g=false}var h=xd-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 dg(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 dg(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 Oj(a,b){if(b.total<0&&a){var c=1*a;if(c>=0){b.total=c}}}function Xn(a){ob(a+"_prev",false);ob(a+"_next",false);var b=resultBoxes[a];if(b.cachingState==2){var c='resultBoxNextClicked("'+a+'")';setTimeout(c,100)}else{kg(true,a)}}function Yn(a){ob(a+"_prev",false);ob(a+"_next",false);var b=resultBoxes[a];if(b.cachingState==2){var c='resultBoxPrevClicked("'+a+'")';setTimeout(c,100)}else{kg(false,a)}}function kg(a,b){var c=resultBoxes[b];c.animating=true;if(a){Qj(c);pj(c)}else{Rj(c);rj(c)}}
function Qj(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=qb(d);a.cachingState=1;L(d,Mf,null,a.name)}function Rj(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=qb(c);a.cachingState=1;L(c,Mf,null,a.name)}function pj(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;me(a.name,c,d,mg,lg,true)}function rj(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;me(a.name,c,d,mg,lg,false)}function me(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;qj(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 qj(a,b){var c=resultBoxes[a];
c.visibleIndex=c.targetVisibleIndex;Mi(resultBoxes[a]);Li(resultBoxes[a]);c.animating=false};var md={},$n=function(a,b,c){md[a]=new Jb(a,b,c)},ao=function(a,b){for(var c in md){md[c].hide()}md[a].show(b)},Zn=function(a,b){md[a].hide(b)},Jb=function(a,b,c){this.resultNum=a;this.previewContents=b;this.nonAnimateableElements=c?c:[];this.visible=false;this.animating=false};Jb.prototype.pc=function(){return this.visible};Jb.prototype.show=function(a){if(this.visible||this.animating){return}this.visible=true;var b=H("preview-zippy-"+this.resultNum),c=H("show-preview-text-"+this.resultNum),d=H("hide-preview-text-"+
this.resultNum);b.setAttribute("src","/images/zippy_minus_sm.gif");c.style.display="none";d.style.display="";if(a){L(a,null)}var e=H("preview-body-"+this.resultNum);e.innerHTML=this.previewContents;e.style.display="";var f=ia(e).height,g=H("preview-curtain-"+this.resultNum);this.animation=new Td(g,0,f,250);o(this.animation,"end",Jb.prototype.Wi.bind(this));this.animating=true;this.animation.play()};Jb.prototype.Wi=function(){for(var a=0;a<this.nonAnimateableElements.length;++a){var b=H(this.nonAnimateableElements[a]);
if(b){b.style.display=""}}this.animating=false};Jb.prototype.hide=function(a){if(!this.visible||this.animating){return}this.visible=false;var b=H("preview-zippy-"+this.resultNum),c=H("show-preview-text-"+this.resultNum),d=H("hide-preview-text-"+this.resultNum);b.setAttribute("src","/images/zippy_plus_sm.gif");c.style.display="";d.style.display="none";if(a){L(a,null)}for(var e=0;e<this.nonAnimateableElements.length;++e){var f=H(this.nonAnimateableElements[e]);if(f){f.innerHTML=""}}var g=H("preview-body-"+
this.resultNum),h=ia(g).height,j=H("preview-curtain-"+this.resultNum);this.animation=new Td(j,h,0,250);o(this.animation,"end",Jb.prototype.Ih.bind(this));this.animating=true;this.animation.play()};Jb.prototype.Ih=function(){var a=H("preview-body-"+this.resultNum);a.innerHTML="";a.style.display="none";this.animating=false};var _rl_registerPreview=$n,_rl_showPreview=ao,_rl_hidePreview=Zn;function Qn(a){var b=ag(a.URL),c=a.getElementById("regionselect").value;b.Sa("cr",c);window.location=b}var _rs_regionSelectChanged=Qn;function sg(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 vg(a){if(document.all||document.getElementById){a.disabled=false}else if(a){a.onclick=a.oldonclick;a.value=a.oldvalue}}function so(a,b){L(a,$m,b);var c=i("send-status");Vn();Kb(c,"error",MSG_SENDING)}function $m(a){var b=i("send-status");if(a.readyState==4){var c=a.responseText;if(c==0){Kb(b,"error",MSG_SENT);i("to").value="";i("msg").value=
""}else{Kb(b,"","");if(c==1){Kb(i("from-comment"),"error",MSG_INVALID_EMAIL_ADDRESS)}else if(c==2){Kb(i("to-comment"),"error",MSG_INVALID_EMAIL_ADDRESS)}else{Kb(b,"error",MSG_UNKNOWN_ERROR)}}vg(i("sendform").sendvideobutton)}}function Vn(){Kb(i("from-comment"),"example",MSG_EG_EMAIL);Kb(i("to-comment"),"example",MSG_SEPARATE_EMAILS_W_COMMA)};function ok(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 Di(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 qg="VideoEmailFromList",rg="VideoEmailToList",oe="from",pe="to",wg=30;function xo(){if(document.getElementById(oe)!==
null){Di(qg,document.getElementById(oe).value,wg)}if(document.getElementById(pe)!==null){Di(rg,document.getElementById(pe).value,wg)}}function ki(a,b){var c=ok(b);if(c!==null&&document.getElementById(a)!==null){document.getElementById(a).value=c}}function qn(){ki(oe,qg);ki(pe,rg)};function Ro(a){var b=Cg(a);if(a.checked){wi(b,a);a.form.toggleAll.checked=mn(a.form)}else{xi(b,a);a.form.toggleAll.checked=false}}function bo(a){var b=a.form;for(var c=0;c<b.elements.length;c++){var d=b.elements[c];if(Nf(d)&&d.checked!=a.checked){var e=Cg(d);if(a.checked){wi(e,d)}else{xi(e,d)}}}}function mn(a){for(var b=0;b<a.elements.length;b++){var c=a.elements[b];if(Nf(c)&&c.checked==false){return false}}return true}function nn(a){for(var b=0;b<a.elements.length;b++){var c=a.elements[b];if(Nf(c)&&
c.checked){return false}}return true}function Nf(a){return a.id.indexOf("box_")==0}function Cg(a){return i("tr_"+a.id.substr(4))}function yi(a,b){if(b&&b.checked){a.style.backgroundColor="#ffffff"}else{a.style.backgroundColor="#f0f0f0"}}function wi(a,b){b.checked=true;if(a){yi(a,b)}}function xi(a,b){b.checked=false;if(a){yi(a,b)}};function Uo(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=Bb(),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;L(A,en,l,null,'text/xml; charset="utf-8"');var D=document.getElementById("title-"+a);D.innerHTML=e}function en(a,b,c,d,e){};var bi="",sj="";function $f(a){i("downloaddiv").innerHTML='    <iframe marginwidth="0" marginheight="0" src="'+a+'\t   " frameborder="0" width="1" height="1"></iframe>'}function Ui(a,b){this.args=b;eval(a+"(this.args)")}function Bj(a){if(a.isInstalled=="true"){t(i("clientunknowndiv"));u(i("clientpresentdiv"));$f(bi)}else{t(i("clientunknowndiv"));u(i("clientmissingdiv"));$f(sj);Hj("setVars=fetchOnInstallUrl="+bi.replace("&","%2526"))}}function Hj(a){a="container=videoPlayerSettings&"+a;ii("datastoreflashdiv",
"http://video.google.com/datastore.swf",a)};function Gc(a){if(a.indexOf("/videorelated?")==0){if(a.indexOf("topframe")>0){L(a,Zm)}else{L(a,Ym);sd("relatedvids",false)}}else if(a.indexOf("/videomorefrom?")==0){L(a,Vm);sd("morefromvids",false)}else if(a.indexOf("/videostats?")==0){L(a,bn)}else if(a.indexOf("/videoevents?")==0){L(a,null)}else{return}}function ro(){if(VP_next10DocId=="0"){sd("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;Gc(qb(j))}function Ym(a){if(a.readyState==4){ri("relatedvidsactive",a.responseText);sd("relatedvids",true)}}function Zm(a){if(a.readyState==4){Fn("related-videos",a.responseText)}}function Vm(a){if(a.readyState==4){ri("morefromvidsactive",a.responseText);sd("morefromvids",true)}}function bn(a){}
function Rm(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=I(g,"error-code"),j=I(g,"message");if(h){if(h.indexOf("ok")==0){t(i("flag-form"))}f=j}}}i("flag-message").innerHTML=f;u(i("flag-message"))}function Sm(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=I(g,"error-code"),j=I(g,"message");if(h){if(h.indexOf("ok")==0){t(i("label-form"))}f=
j}}}i("label-message").innerHTML=f;u(i("label-message"))}function nk(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 mk(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 Sj(a,b,c,d){var e=Bb(),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;
u(i("flag-submitting-feedback-message"));L(a+"?frame=comment"+VP_langParam,Rm,e,"flagorama",'text/xml; charset="UTF-8"')}function on(a,b,c,d,e){var f=Bb(),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;u(i("label-submitting-feedback-message"));L(a+"?frame=comment"+VP_langParam,Sm,f,"labelorama",'text/xml; charset="UTF-8"')}function uj(){Mn();ui();Pn();
vi("dmrcfp","p");Fi(false)}function Mn(){var a=ab(VP_playlistSettingsCookieName);if(!a){od()}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 Pn(){if(i("collapselink")){if(VP_collapseDescr){i("collapselink").onclick()}else{i("expandlink").onclick()}}}function vi(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 Ei(){Hc(VP_playlistCookieName,VP_myPlaylist,VP_cookieDomain);Hc(VP_playlistIndexCookieName,VP_myPlaylistIndex,VP_cookieDomain);Fi(true);od()}function mo(a){var b=ab(VP_playlistSettingsCookieName);if(!b){od();
return}ic(VP_playlistSettingsCookieName,(a?"1":"0")+b.substring(1,3),VP_cookieDomain)}function no(a){VP_collapseDescr=a;var b=ab(VP_playlistSettingsCookieName);if(!b){od();return}ic(VP_playlistSettingsCookieName,b.charAt(0)+(a?"1":"0")+b.charAt(2),VP_cookieDomain)}function oo(a){VP_visibleTab=a;var b=ab(VP_playlistSettingsCookieName);if(!b){od();return}ic(VP_playlistSettingsCookieName,b.substring(0,2)+a,VP_cookieDomain)}function od(){ic(VP_playlistSettingsCookieName,(VP_autoplayEnabled?"1":"0")+(VP_collapseDescr?
"1":"0")+VP_visibleTab,VP_cookieDomain)}function Fi(a){if(a){Hc(VP_playlistParametersCookieName,"1",VP_cookieDomain)}else{Hc(VP_playlistParametersCookieName,"0",VP_cookieDomain)}}function Uj(){VP_autoplayEnabled=!VP_autoplayEnabled;mo(VP_autoplayEnabled);ui()}function pd(a,b){var c=i(a);if(c&&c.style&&c.style){c.style.display=b}}function ui(){if(VP_autoplayEnabled){pd("autoplayon","inline");pd("autoplayoff","none")}else{pd("autoplayon","none");pd("autoplayoff","inline")}}function sd(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 ri(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 Fn(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=En(d[0],d[1],d[2],d[3],d[5],Zi(d[7]),d[8],VP_queryParam);l.appendChild(n)}e.style.display=h}
function En(a,b,c,d,e,f,g,h){var j=Am(d),k=Aj(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 D=document.createElement("DIV");A.appendChild(D);var ta="favicon"+a;D.id=ta;D.style.position="relative";
D.style.width="80px";D.style.height="60px";D.style.backgroundColor="black";D.style.border="1px solid blue";var aa=document.createElement("A");D.appendChild(aa);aa.href=f;aa.rel="nofollow";var X=document.createElement("IMG");X.onload=function(ke){xg("http://"+g,ta,14,14,40,6)};aa.appendChild(X);X.style.border="none";X.style.width=k[0]+"px";X.style.height=k[1]+"px";X.style.marginLeft=(80-k[0])/2+"px";X.style.marginTop=(60-k[1])/2+"px";X.title=j;X.alt="title="+X.title;X.src=b;y=document.createElement("TR");
m.appendChild(y);A=document.createElement("TD");y.appendChild(A);A.vAlign="top";A.align="center";D=document.createElement("DIV");A.appendChild(D);aa=document.createElement("A");D.appendChild(aa);aa.href=f;aa.rel="nofollow";aa.title=j;aa.innerHTML=c;var $a=document.createElement("DIV");$a.innerHTML=l.innerHTML;$a.className="related_video_thumb";return $a}function Aj(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 Kb(a,b,
c){a.className=b;a.innerHTML=c}function Qi(a){var b=i("VideoPlayback");b.SetVariable("seekTime",a/1000)}function Ij(){var a=i("VideoPlayback");a.SetVariable("doPlay",true)}function sk(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+*/+"video.google.com"+"/videopopup?q="+ce(g)+"&docid="+ce(b)+"&fscid="+ce(c)+"&windowtitle="+ce(window.document.title+" - "+MSG_FULL_SCREEN),"GoogleVideo","toolbar=no,status=no,resizable=yes,scrollbars=0");h.focus()}
function Nj(){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight)}function Tn(){document.body.scroll="no"}function qb(a){return a+"&ms="+(new Date).getTime()}function Kj(){if(!VP_autoplayEnabled){return}if(VP_waitForSale){setTimeout(Hi,10000)}else{setTimeout(Hi,5000)}}function Hi(){if(!VP_autoplayEnabled||hc("send")||hc("embed")||hc("videopurchasediv")||i("playlistNext").href==null){return}Ei();window.location.href=i("hidden_playlistNextAuto").href}function hc(a){return i(a).style.display==
""}var lc=["upnext","details","morefrom","related","comments","flag"];function Lo(a){for(var b=0;b<lc.length;b++){var c=i(lc[b]);if(c){if(a==lc[b]){i("l"+lc[b]).className="nodecoration";u(c)}else{i("l"+lc[b]).className="decorated";t(c)}}}}var wd,Lb,Ab,ig,lj=2,gg=19;function qd(a,b){Ao(a,b,"px")}function Ao(a,b,c){mc=i(a);if(!mc||mc.style==null||b<0){return}var d=b.toString()+c;mc.style.height=d}function qi(){if(!(wd=window.innerHeight)){if(!(wd=document.documentElement.clientHeight)){wd=document.body.clientHeight}}Lb=
wd-i("playvideoblock").offsetTop;ig=Lb-i("flashobjectplaceholder").offsetTop;qd("playvideoblock",Lb);qd("flashobjectplaceholder",ig);qd("playrightblock",Lb);qd("summary",Lb-lj);Ab=Lb-i("abovecorner").offsetHeight-gg;qd("corner",Ab);if(this.onWindowResizeExtra){Cn()}}function ln(a,b){var c=document.createElement("div");i(b).appendChild(c);c.innerHTML=a}function ei(){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 zn(){var a=i("playvideoblock");if(a){if(VP_divOffset!=a.offsetTop||a.clientHeight<a.scrollHeight){VP_divOffset=a.offsetTop;qi()}}var b=ei();if(b!=VP_hashPos){VP_hashPos=b;Qi(VP_hashPos*1000)}}function pn(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 Ib(a,b){if(typeof b=="string"){a.value=b}a.style.color="black";
a.style.fontStyle="normal";a.onfocus=null}function Ni(a,b,c,d,e,f,g){var h=Bb(),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;u(i("gettingreviews"))}C(h,j,"sort",c?"rating":"date");L(a+"?frame=comment"+VP_langParam,ci,h,d,'text/xml; charset="UTF-8"')}function ci(a,b,c,d,e){var f,g=i("summary"),h=true;i("gettingreviews").innerHTML="";t(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){Jc(f,MSG_REVIEW_PUBLISH_ERROR,e)}else{var j=a.responseXML.documentElement;if(j.tagName=="error"){var k="errorin";k+=I(j,"errorsource");k+="_"+e;var l=I(j,"errormessage"),n=i(k);if(n){f=n}Jc(f,l,e)}else if(j.tagName!="reviews"){Jc(f,"Unknown error",e)}else{var m="";h=I(j,"value")=="true";var y=j.getElementsByTagName("review"),A;for(A=0;A<y.length;A++){var D=
y.item(A);m+='<div style="margin:2px 0pt .5em;" id="comment';m+=I(D,"id");m+='"><font size="-1"><b>';m+=I(D,"name");m+="</b>&nbsp;&nbsp;&nbsp;";if(VP_canUserDeleteComments){m+='<span align="right" class="markcomment" onclick="markComment(';m+=I(D,"id");m+=", 'OPS',";m+='MSG_MARKING);"';m+=' id="OPS'+I(D,"id")+'">';m+="<nobr>"+MSG_DELETE_COMMENT+"</nobr>";m+="</span>"}m+="<br/>";var ta=I(D,"rating");if(ta&&ta>0){m+=Dj(ta,ta!=null);m+="&nbsp;"}m+="<font color=green>";m+="<nobr>"+I(D,"textdate")+"</nobr>";
m+="</font>";m+="&nbsp;";m+='<span align="right" class="markcomment" ';if(h){m+='onclick="markComment(';m+=I(D,"id");m+=", 'SPAM', MSG_MARKING);\""}else{m+="onclick='this.innerHTML = \"<br/>";m+=I(j,"reason");m+='"; this.className="error"\''}m+=' id="SPAM'+I(D,"id")+'">';m+="<nobr>"+MSG_MARK_AS_SPAM+"</nobr>";m+="</span>";m+="<br/>";m+=pn(I(D,"text"));m+="</font></div>"}i("commentlist").innerHTML=m;t(i("leavecomment_top"));t(i("topreviewshown"));u(i("topreviewhidden"));u(i("commentlist"));if(y.length==
0){u(i("nocomments"));t(i("sortit"))}else{t(i("nocomments"));u(i("sortit"))}if(e=="top"){i("reviewtext_top").value="";Ib(i("reviewtext_bottom"),"");Ib(i("reviewername_bottom"),i("reviewername_top").value)}else if(e=="bottom"){i("reviewtext_bottom").value="";Ib(i("reviewtext_top"),"");Ib(i("reviewername_top"),i("reviewername_bottom").value);g.scrollTop=0}}}if(h){t(i("reviewpublisherror_top"));t(i("reviewpublisherror_bottom"));i("publishreview_bottom").disabled=false;i("publishreview_top").disabled=
false}else{var aa=I(j,"reason");i("reviewpublisherror_top").innerHTML=aa;i("reviewpublisherror_bottom").innerHTML=aa;u(i("reviewpublisherror_top"));u(i("reviewpublisherror_bottom"))}var X=i("leavecomment_bottom");u(X);u(i("reviewboxandtext_bottom"));u(i("reviewblankdiv"));if(g.scrollHeight-X.scrollHeight>g.clientHeight){u(i("reviewboxandtext_top"));t(i("reviewblankdiv"))}else{t(i("reviewboxandtext_top"));u(i("reviewblankdiv"))}}var xn=[];function yn(a,b,c){var d=Bb(),e=C(d,d,"review");C(d,e,"docid",
VP_docIdString);C(d,e,"mark",b);C(d,e,"id",a);if(b=="SPAM"){L(VP_commentsUrl+"?frame=markcomment"+VP_langParam,Um,d,null,'text/xml; charset="UTF-8"');i("SPAM"+a).innerHTML=MSG_MARKING;i("SPAM"+a).className="";i("SPAM"+a).style.color="#cd3700";xn.push(setTimeout("hideEle(ele('comment"+a+"'))",250))}else{L(VP_commentsUrl+"?frame=markcomment"+VP_langParam,ci,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 Um(){}function Jc(a,
b,c){a.innerHTML=b;u(a);if(c){var d=i("summary");if(c!="bottom"){d.scrollTop=0}else{d.scrollTop=d.scrollHeight-d.clientHeight}}}function In(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"){Jc(g,MSG_EMPTY_REVIEW,c);return}if(e.length>512){Jc(g,MSG_REVIEW_TOO_LONG,c);return}if(d&&d.length>60){Jc(g,MSG_NAME_TOO_LONG,c);return}i("publishreview_"+c).disabled=true;var h=i("reviewername_"+
c);if(h.style.color!="black"){Ib(h,"");d=""}else{d=d.replace(/(^\s+)|(\s+$)/g,"");h.value=d}t(i("reviewpublisherror_"+c));t(i("errorinname_"+c));i("reviewpublishstatus_"+c).innerHTML=MSG_ANNOTATION_SAVING;VP_commentName=d;nd();Ni(a,b,hc("commentsbyrating"),c,d,e,f)}var ng=false;function an(){var a=window.location.search.split("docid=")[1].split("&")[0];if(hc("sharelinks")){t(i("sharelinks"));t(i("send"));t(i("embed"));Gc(qb("/videostats?shareclick=close&docid="+a+"&frame=share"))}else{u(i("sharelinks"));
di();Gc(qb("/videostats?shareclick=open&docid="+a+"&frame=share"))}if(VP_enableEmailAutocomplete&&!ng){_initEmailAutocomplete(i("to"),"/data/contacts?max=250",false);ng=true}}function di(){var a=window.location.search.split("docid=")[1].split("&")[0];i("lsend").className="nodecoration";i("lembed").className="decorated";t(i("embed"));u(i("send"));i("sendform").from.focus();Gc(qb("/videostats?shareclick=send&docid="+a+"&frame=share"))}function Qm(){var a=window.location.search.split("docid=")[1].split("&")[0];
i("lembed").className="nodecoration";i("lsend").className="decorated";t(i("send"));u(i("embed"));Gc(qb("/videostats?shareclick=embed&docid="+a+"&frame=share"))}function hn(a){var b=i("to-label");if(VP_usePicker&&b){b.innerHTML='<a href="javascript:void(0)" onclick="handlePickerClick(event)">'+b.innerHTML+"</a>"}}function Wm(a){gh(VP_contactsBaseUrl+"/ui/");mh("to",a)}var Sf=false,Qf=-1;function zo(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";Sf=true;Jo(a,b,c,d,e)}function Gn(a,b,c,d){Sf=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 Dn(a,b,c,d){d.style.cursor="default";if(!Sf){if(c!=0&&b=="top"){var e=i("noRatingsYet");if(e){e.style.display="none"}i("communityRating").style.display="inline"}if(Qf==-1){Ic(c,b)}else{Ic(Qf,b)}}}function Jo(a,b,c,d,e){var f=Bb(),g=C(f,f,"rating");C(f,g,"docid",b);C(f,g,"user_rating",c);C(f,g,"token",e);L(a+"?frame=rating"+VP_langParam,Xm,f,d,'text/xml; charset="UTF-8"')}function Xm(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(I(j,"user_rating"),10);if(j.tagName=="error"){var l=I(j,"errormessage");f.innerHTML=l;Ic(k,e)}else{var n=parseFloat(I(j,"community_rating")),m=parseInt(I(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}}Ic(k,"top");Ic(k,"top_bottom");Ic(k,"bottom_bottom");if(e=="top"&&h){h.style.display="none"}f.innerHTML=MSG_ANNOTATION_SAVED;Qf=k;To(n,m)}}f.style.display="inline";setTimeout("hideRatingsStatusMessage()",5000)}function gi(){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 Ic(a,b){gi();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 Dj(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 tj(){if(!VP_allowAnnotations){return}Ln();if(VP_commentName&&VP_commentName!=""){if(i("reviewername_bottom")){Ib(i("reviewername_bottom"),VP_commentName)}if(i("reviewername_top")){Ib(i("reviewername_top"),VP_commentName)}}if(VP_showMoreTags==true){Mc("common_tags","true")}else{Mc("common_tags","false")}}function Ln(){var a=
ab(VP_annotationsCookieName);if(!a){nd()}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 nd(){var a=ab(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;ic(VP_annotationsCookieName,b,VP_cookieDomain)}function ug(a){var b=
"targetId="+a+"&functionName=pause";ii("proxyflashdiv","/proxy.swf",b)}function ii(a,b,c){var d;if(ld){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 To(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 Dg(){if(!VP_subtitleEnabled){return""}else{return"&subtitle="+(VP_subtitleOn?"on":"off")}}function Vi(a,b){if(a=="subtitleUpdate"){var c=b.split(",");VP_subtitleEnabled=c[0]=="true"?true:false;VP_subtitleOn=c[1]=="true"?true:false}}function Rn(a){try{if(top==
window){window.location.replace(a)}}catch(b){}};function Cn(){var a=i("videopurchasediv"),b=i("videopurchaseiframe");if(a&&b){a.style.height=Ab;b.style.height=Ab}}function Mo(){t(i("thumbsetc"));t(i("purchaseorthumbs"));u(i("videopurchasediv"));u(i("thumbsorpurchase"));Ab=Lb-i("abovecorner").offsetHeight-gg;i("corner").style.height=Ab;i("videopurchasediv").style.height=Ab;i("videopurchaseiframe").style.height=Ab}function No(){t(i("videopurchasediv"));t(i("thumbsorpurchase"));u(i("thumbsetc"));u(i("purchaseorthumbs"))}function Bn(a,b,c,d){u(i("directdownloaddiv"));
t(i("gvpdownloaddiv"));u(i("videodownloaddiv"));if(i("macdownloaddiv")){t(i("macdownloaddiv"))}if(i("ipoddownloaddiv")){t(i("ipoddownloaddiv"))}if(i("pspdownloaddiv")){t(i("pspdownloaddiv"))}u(i(d+"downloaddiv"));window.setTimeout(function(){$f(i(d+"downloadlink").href)},0);ug(a)}function On(a){window.parent._gb_refreshGaiaBar();window.location.href=a};function Kn(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 Qo(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=me;window.timedHideEle=Ki;window.timedHideEleById=Po;window.appendElement=C;window.applyAnnotationsSettings=tj;window.applyPlaylistSettings=uj;window.backLinkClicked=vj;window.blogpostInitialize=xj;window.checkEnterKey=zj;window.contents=Bj;window.DataStoreHandler=Ui;window.DoFSCommand=Vi;window.deleteCookie=Ej;window.disableButton=sg;window.discloseTags=Mc;window.donePlaying=Kj;window.doPause=ug;window.doPlay=Ij;window.dropdownNav=Lj;window.ele=i;window.expand=Nj;window.flagVideo=
Sj;window.flash7OrHigher=Tj;window.FlashRequest=Wi;window.flipAutoplay=Uj;window.getCheckedValue=nk;window.getCheckedLabels=mk;window.getElementValue=I;window.getNoCacheURL=qb;window.getPrefCookie=pk;window.getSubtitleArgForFlash=Dg;window.getXmlDocument=Bb;window.goFullscreen=sk;window.handleEmbedHTMLClick=Qm;window.handlePickerClick=Wm;window.handleSendEmailLinkClick=di;window.handleSharePanelClick=an;window.hashTextToTime=ei;window.hideEle=t;window.hideRatingsStatusMessage=gi;window.insertHtmlInEle=
ln;window.initializeResultBoxes=kn;window.initPicker=hn;window.isNoneSelected=nn;window.isVisName="isVisible";window[window.isVisName]=hc;window.labelVideo=on;window.loadEmailCookieForFromAndTo=qn;window.loginButtonClicked=mi;window.massageReviewInput=Ib;window.markComment=yn;window.monitorDivOffset=zn;window.onDownloadClick=Bn;window.onWindowResize=qi;window.outStars=Dn;window.overStars=Gn;window.proceedToSubmit=si;window.processResponse=ti;window.publishComment=In;window.publishTag=Jn;window.qs=
Kn;window.recordFlaggedVideo=Nn;window.redirectToPurchase=On;window.refreshVisibleTab=vi;window.reloadWithFrameIfNeeded=Rn;window.removeScrollBars=Tn;window.resizePlayer=Wn;window.ResultBox=aj;window.resultBoxNextClicked=Xn;window.resultBoxPrevClicked=Yn;window.rowToggleAll=bo;window.saveCollapseDescr=no;window.saveAnnotationsSettings=nd;window.saveVisibleTab=oo;window.sendAjaxRequest=L;window.sendPlaylistNextRequest=ro;window.sendRequest=Gc;window.sendSendLinkRequest=so;window.setCookie=vo;window.setElementDisplay=
pd;window.setEmailCookieForFromAndTo=xo;window.setMaxLength=yo;window.setMyPlaylist=Ei;window.setPermanentCookie=ic;window.setSessionCookie=Hc;window.setStars=zo;window.showEle=u;window.submitButtonClicked=Ho;window.switchTab=Lo;window.switchToPurchase=Mo;window.switchToThumbs=No;window.tagInputFieldOnKeyDown=Oo;window.togDisp=Qo;window.toggleRow=Ro;window.toggleVisibility=So;window.updateReviews=Ni;window.updateTags=ie;window.uploadedVideoUpdateMetadata=Uo;window.vpseek=Qi;window.VMT_deselectMenu=
cj;window.VMT_hideMenu=fg;window.VMT_hideMenuButtonFromTimeout=dj;window.VMT_hideMenuTimeout=ej;window.VMT_persistMenu=gj;window.VMT_selectMenu=hj;window.VMT_showMenuFromButtonTimeout=jj;window.VMT_toggleMenu=kj;window.VP_linksArray=lc;

var MSG_FULL_SCREEN = "Full Screen";
var MSG_NO_MATCHING_VIDEOS = "No matching videos.";
var MSG_MORE_RELATED = "more";

var MSG_SENDING = "Sending...";
var MSG_SENT = "Sent!";
var MSG_INVALID_EMAIL_ADDRESS = "Invalid email address";
var MSG_UNKNOWN_ERROR = "Unknown error - Please try again later";
var MSG_EG_EMAIL = "e.g. myemail@gmail.com";
var MSG_SEPARATE_EMAILS_W_COMMA = "Separate emails with ,";

var MSG_CLICK_HERE_TO_WATCH_ENTIRE_VIDEO = "Click here to watch entire video";

var MSG_ERROR_TAG_TOO_LONG = "Try a shorter tag";
var MSG_ERROR_TAG_MISSING = "Please enter a tag";
var MSG_BROWSE = "Browse:";
var MSG_MORE_TAGS = "more";
var MSG_REMOVE_TAGS = "Click a tag to remove it";
var MSG_REMOVED_TAG = "Removed";
var MSG_YOUR_TAG = "you added this tag";
var MSG_ADD_LABEL = "Add your own tag";
var MSG_REMOVE_TAG_TITLE = "click to remove";
var MSG_ANNOTATION_SAVING = "Saving...";
var MSG_EMPTY_REVIEW = "Please write a review to submit";
var MSG_REVIEW_PUBLISH_ERROR = "Error while getting/publishing reviews";
var MSG_REVIEW_TOO_LONG = "Comment cannot exceed 512 characters. Current length is:";
var MSG_NAME_TOO_LONG = "Name cannot exceed 60 characters. Current length is:";
var MSG_GETTING_REVIEWS = "Getting reviews...";
var MSG_ANNOTATION_SAVED = "Saved!";

var MSG_RATING_POOR = "Poor";
var MSG_RATING_POOR_SHORT = "Poor";
var MSG_RATING_BELOW_AVERAGE = "Below Average";
var MSG_RATING_BELOW_AVERAGE_SHORT = "Below Avg";
var MSG_RATING_AVERAGE = "Average";
var MSG_RATING_AVERAGE_SHORT = "Average";
var MSG_RATING_ABOVE_AVERAGE = "Above Average";
var MSG_RATING_ABOVE_AVERAGE_SHORT = "Above Avg";
var MSG_RATING_EXCELLENT = "Excellent!";
var MSG_RATING_EXCELLENT_SHORT = "Excellent!";

var MSG_CREATING_ALERT = "Creating alert...";
var MSG_CREATE_ALERT_UNVERIFIED = "Alert created. Please check your email to start receiving this alert.";
var MSG_CREATE_ALERT_ERROR = "Error creating alert.";

var MSG_OF_HUNDREDS = "of hundreds";
var MSG_OF_THOUSANDS = "of thousands";

var MSG_SAVING_FEEDBACK = "Saving your feedback...";
var MSG_DELETE_COMMENT = "Delete comment";
var MSG_DELETING = "Deleting...";
var MSG_MARK_AS_SPAM = "Mark as Spam";
var MSG_MARKING = "Marking...";

var MSG_CANCEL_UPLOAD_WARNING = "Leaving this page will cancel your current upload.";