var h=true,j=null,k=false,n,aa=aa||{},o=this,p=function(a,b,c){a=a.split(".");c=c||o;!(a[0]in c)&&c.execScript&&c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)if(!a.length&&b!==undefined)c[d]=b;else c=c[d]?c[d]:(c[d]={})},ba=function(a,b){a=a.split(".");b=b||o;for(var c;c=a.shift();)if(b[c])b=b[c];else return j;return b},ca=function(){},da=function(a){a.getInstance=function(){return a.instance_||(a.instance_=new a)}},ea=function(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array||
!(a instanceof Object)&&Object.prototype.toString.call(a)=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof Object)&&(Object.prototype.toString.call(a)=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call")))return"function"}else return"null";else if(b=="function"&&typeof a.call=="undefined")return"object";
return b},s=function(a){return ea(a)=="array"},fa=function(a){var b=ea(a);return b=="array"||b=="object"&&typeof a.length=="number"},u=function(a){return typeof a=="string"},ga=function(a){return ea(a)=="function"},ha=function(a){a=ea(a);return a=="object"||a=="array"||a=="function"},v=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(ia))return a[ia];a[ia]||(a[ia]=++ja);return a[ia]},ia="closure_hashCode_"+Math.floor(Math.random()*2147483648).toString(36),ja=0,ka=function(a){var b=ea(a);if(b=="object"||
b=="array"){if(a.clone)return a.clone.call(a);b=b=="array"?[]:{};for(var c in a)b[c]=ka(a[c]);return b}return a},x=function(a,b){var c=a.boundArgs_;if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);c&&d.unshift.apply(d,c);c=d}b=a.boundSelf_||b;a=a.boundFn_||a;var f=b||o;d=c?function(){var g=Array.prototype.slice.call(arguments);g.unshift.apply(g,c);return a.apply(f,g)}:function(){return a.apply(f,arguments)};d.boundArgs_=c;d.boundSelf_=b;d.boundFn_=a;return d},la=function(a){var b=
Array.prototype.slice.call(arguments,1);b.unshift(a,j);return x.apply(j,b)},na=Date.now||function(){return(new Date).getTime()},y=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c};var oa=function(a,b,c){if(a.indexOf)return a.indexOf(b,c);if(Array.indexOf)return Array.indexOf(a,b,c);for(c=c==j?0:c<0?Math.max(0,a.length+c):c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},pa=function(a,b,c){if(a.forEach)a.forEach(b,c);else if(Array.forEach)Array.forEach(a,b,c);else for(var d=a.length,f=u(a)?a.split(""):a,g=0;g<d;g++)g in f&&b.call(c,f[g],g,a)},qa=function(a,b){if(a.contains)return a.contains(b);return oa(a,b)>-1},sa=function(a,b,c){ra(a,c,0,b)},ta=function(a,b){b=oa(a,
b);var c;if(c=b!=-1)Array.prototype.splice.call(a,b,1).length==1;return c},ua=function(a){if(s(a))return a.concat();else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}},va=function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];if(fa(c)){c=s(c)?c.concat():ua(c);a.push.apply(a,c)}else a.push(c)}},ra=function(a){return Array.prototype.splice.apply(a,wa(arguments,1))},wa=function(a,b,c){return arguments.length<=2?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var z=function(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0};z.prototype.clone=function(){return new z(this.x,this.y)};z.prototype.toString=function(){return"("+this.x+", "+this.y+")"};var xa=function(a,b){return new z(a.x-b.x,a.y-b.y)};var A=function(a,b){this.width=a;this.height=b},ya=function(a,b){if(a==b)return h;if(!a||!b)return k;return a.width==b.width&&a.height==b.height};n=A.prototype;n.clone=function(){return new A(this.width,this.height)};n.toString=function(){return"("+this.width+" x "+this.height+")"};n.aspectRatio=function(){return this.width/this.height};n.fitsInside=function(a){return this.width<=a.width&&this.height<=a.height};
n.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};n.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};n.scale=function(a){this.width*=a;this.height*=a;return this};n.scaleToFit=function(a){return this.scale(this.aspectRatio()>a.aspectRatio()?a.width/this.width:a.height/this.height)};var za=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Aa=function(a){var b=[],c=0;for(var d in a)b[c++]=a[d];return b},Ba=function(a){var b=[],c=0;for(var d in a)b[c++]=d;return b},Ca=function(a){for(var b in a)return k;return h},Da=function(a,b){var c;if(c=b in a)delete a[b];return c},Ea=function(a,b,c){if(b in a)return a[b];return c},Fa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ga=function(a){for(var b,c,d=1;d<arguments.length;d++){c=
arguments[d];for(b in c)a[b]=c[b];for(var f=0;f<Fa.length;f++){b=Fa[f];if(Object.prototype.hasOwnProperty.call(c,b))a[b]=c[b]}}};var Ha=function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ja=/^[a-zA-Z0-9\-_.!~*'()]*$/,Ka=function(a){a=String(a);if(!Ja.test(a))return encodeURIComponent(a);return a},Qa=function(a,b){if(b)return a.replace(La,"&amp;").replace(Ma,"&lt;").replace(Na,"&gt;").replace(Oa,"&quot;");else{if(!Pa.test(a))return a;if(a.indexOf("&")!=-1)a=a.replace(La,"&amp;");if(a.indexOf("<")!=-1)a=a.replace(Ma,"&lt;");if(a.indexOf(">")!=-1)a=a.replace(Na,"&gt;");if(a.indexOf('"')!=-1)a=a.replace(Oa,"&quot;");return a}},
La=/&/g,Ma=/</g,Na=/>/g,Oa=/\"/g,Pa=/[&<>\"]/,Ra=function(a,b){return a.indexOf(b)!=-1},Sa=function(){return Array.prototype.join.call(arguments,"")},Va=function(a,b){var c=0;a=Ha(String(a)).split(".");b=Ha(String(b)).split(".");for(var d=Math.max(a.length,b.length),f=0;c==0&&f<d;f++){var g=a[f]||"",l=b[f]||"",m=new RegExp("(\\d*)(\\D*)","g"),t=new RegExp("(\\d*)(\\D*)","g");do{var q=m.exec(g)||["","",""],r=t.exec(l)||["","",""];if(q[0].length==0&&r[0].length==0)break;c=q[1].length==0?0:parseInt(q[1],
10);var w=r[1].length==0?0:parseInt(r[1],10);c=Ua(c,w)||Ua(q[2].length==0,r[2].length==0)||Ua(q[2],r[2])}while(c==0)}return c},Ua=function(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};na();var Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb=function(){return o.navigator?o.navigator.userAgent:j},gb=function(){return o.navigator};(function(){ab=$a=Za=Ya=Xa=Wa=k;var a;if(a=fb()){var b=gb();Wa=a.indexOf("Opera")==0;Xa=!Wa&&a.indexOf("MSIE")!=-1;Za=(Ya=!Wa&&a.indexOf("WebKit")!=-1)&&a.indexOf("Mobile")!=-1;ab=($a=!Wa&&!Ya&&b.product=="Gecko")&&b.vendor=="Camino"}})();var hb=Wa,B=Xa,C=$a,D=Ya,ib=Za,jb=function(){var a=gb();return a&&a.platform||""}();
(function(){bb=Ra(jb,"Mac");cb=Ra(jb,"Win");db=Ra(jb,"Linux");eb=!!gb()&&Ra(gb().appVersion||"","X11")})();var kb=bb,lb=cb,mb=eb,nb=function(){var a="",b;if(hb&&o.opera){a=o.opera.version;a=typeof a=="function"?a():a}else{if(C)b=/rv\:([^\);]+)(\)|;)/;else if(B)b=/MSIE\s+([^\);]+)(\)|;)/;else if(D)b=/WebKit\/(\S+)/;if(b)a=(a=b.exec(fb()))?a[1]:""}return a}(),ob={},pb=function(a){return ob[a]||(ob[a]=Va(nb,a)>=0)};var qb,rb=function(a){return(a=a.className)&&typeof a.split=="function"?a.split(" "):[]},sb=function(a){for(var b=rb(a),c=wa(arguments,1),d=0,f=0;f<c.length;f++)if(!qa(b,c[f])){b.push(c[f]);d++}c=d==c.length;a.className=b.join(" ");return c},tb=function(a){for(var b=rb(a),c=wa(arguments,1),d=0,f=0;f<b.length;f++)if(qa(c,b[f])){ra(b,f--,1);d++}c=d==c.length;a.className=b.join(" ");return c},ub=function(a,b,c){for(var d=rb(a),f=k,g=0;g<d.length;g++)if(d[g]==b){ra(d,g--,1);f=h}if(f){d.push(c);a.className=
d.join(" ")}return f};var wb=function(a){return a?new vb(E(a)):qb||(qb=new vb)},F=function(a){return u(a)?document.getElementById(a):a},G=F,yb=function(a,b,c){a:{c=c||document;a=a&&a!="*"?a.toLowerCase():"";if(c.querySelectorAll&&(a||b)&&(!D||xb(document)||pb("528")))b=c.querySelectorAll(a+(b?"."+b:""));else{if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},f=0,g=0,l;l=c[g];g++)if(a==l.nodeName.toLowerCase())d[f++]=l;d.length=f;b=d;break a}else{b=c;break a}}c=c.getElementsByTagName(a||"*");
if(b){d={};for(g=f=0;l=c[g];g++){a=l.className;if(typeof a.split=="function"&&qa(a.split(" "),b))d[f++]=l}d.length=f;b=d}else b=c}}return b},Ab=function(a,b){za(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 zb)a.setAttribute(zb[d],c);else a[d]=c})},zb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",
type:"type"},Bb=function(a){a=a||window;var b=a.document;if(D&&!pb("500")&&!ib){if(typeof a.innerHeight=="undefined")a=window;b=a.innerHeight;var c=a.document.documentElement.scrollHeight;if(a==a.top)if(c<b)b-=15;a=new A(a.innerWidth,b)}else{a=xb(b)&&(!hb||hb&&pb("9.50"))?b.documentElement:b.body;a=new A(a.clientWidth,a.clientHeight)}return a},Db=function(a){return a?Cb(a):window},Cb=function(a){if(a.parentWindow)return a.parentWindow;if(D&&!pb("500")&&!ib){var b=a.createElement("script");b.innerHTML=
"document.parentWindow=window";var c=a.documentElement;c.appendChild(b);c.removeChild(b);return a.parentWindow}return a.defaultView},I=function(){return Eb(document,arguments)},Eb=function(a,b){var c=b[0],d=b[1];if(B&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Qa(d.name),'"');if(d.type){c.push(' type="',Qa(d.type),'"');d=ka(d);delete d.type}c.push(">");c=c.join("")}var f=a.createElement(c);if(d)if(u(d))f.className=d;else Ab(f,d);if(b.length>2){function g(l){if(l)f.appendChild(u(l)?a.createTextNode(l):
l)}for(d=2;d<b.length;d++){c=b[d];fa(c)&&!(ha(c)&&c.nodeType>0)?pa(Fb(c)?ua(c):c,g):g(c)}}return f},xb=function(a){return a.compatMode=="CSS1Compat"},Gb=function(a,b){a.appendChild(b)},Hb=function(a){for(var b;b=a.firstChild;)a.removeChild(b)},J=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):j},Ib=D&&pb("522"),Jb=function(a,b){if(typeof a.contains!="undefined"&&!Ib&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&
16);for(;b&&a!=b;)b=b.parentNode;return b==a},E=function(a){return a.nodeType==9?a:a.ownerDocument||a.document},Kb=function(a,b){if("textContent"in a)a.textContent=b;else if(a.firstChild&&a.firstChild.nodeType==3){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else{Hb(a);var c=E(a);a.appendChild(c.createTextNode(b))}},Lb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Mb={IMG:" ",BR:"\n"},Ob=function(a){if(B&&"innerText"in a)a=a.innerText.replace(/(\r\n|\r|\n)/g,"\n");
else{var b=[];Nb(a,b,h);a=b.join("")}a=a.replace(/\xAD/g,"");a=a.replace(/ +/g," ");if(a!=" ")a=a.replace(/^\s*/,"");return a},Nb=function(a,b,c){if(!(a.nodeName in Lb))if(a.nodeType==3)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Mb)b.push(Mb[a.nodeName]);else for(a=a.firstChild;a;){Nb(a,b,c);a=a.nextSibling}},Fb=function(a){if(a&&typeof a.length=="number")if(ha(a))return typeof a.item=="function"||typeof a.item=="string";else if(ga(a))return typeof a.item==
"function";return k},vb=function(a){this.document_=a||o.document||document};n=vb.prototype;n.getDomHelper=wb;n.getElement=function(a){return u(a)?this.document_.getElementById(a):a};n.getViewportSize=function(a){return Bb(a||this.getWindow())};n.createDom=function(){return Eb(this.document_,arguments)};n.createElement=function(a){return this.document_.createElement(a)};n.createTextNode=function(a){return this.document_.createTextNode(a)};n.isCss1CompatMode=function(){return xb(this.document_)};
n.getWindow=function(){return Cb(this.document_)};n.getDocumentScrollElement=function(){return!D&&xb(this.document_)?this.document_.documentElement:this.document_.body};n.getDocumentScroll=function(){var a;a=!D&&xb(this.document_)?this.document_.documentElement:this.document_.body;return a=new z(a.scrollLeft,a.scrollTop)};n.appendChild=Gb;n.contains=Jb;var Pb={};p("_G3DWH_AdvancedSearchUI",function(){},undefined);p("_G3DWH_AdvancedSearchUI.setModelFieldsDisabled",function(a){if(a){F("bestof").checked=k;F("located").disabled=k}F("complexity-select").disabled=a;F("filetype-select").disabled=a;F("bestof").disabled=a;if(F("isdl")!=j)F("isdl").disabled=a;if(F("isdyn")!=j)F("isdyn").disabled=a},undefined);
p("_G3DWH_AdvancedSearchUI.setGeoFieldEnablement",function(){if(F("bestof").checked){F("located").selectedIndex=0;F("located").disabled=h}else F("located").disabled=k},undefined);var Qb=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};Qb.prototype.clone=function(){return new Qb(this.top,this.right,this.bottom,this.left)};Qb.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};Qb.prototype.contains=function(a){a=!this||!a?k:a instanceof Qb?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom;return a};var Rb=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};n=Rb.prototype;n.clone=function(){return new Rb(this.left,this.top,this.width,this.height)};n.toBox=function(){return new Qb(this.top,this.left+this.width,this.top+this.height,this.left)};n.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};
n.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(d<=a){this.left=b;this.top=d;this.width=c-b;this.height=a-d;return h}}return k};
n.contains=function(a){return a instanceof Rb?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};n.getSize=function(){return new A(this.width,this.height)};var Sb,Tb,Ub,Vb,Wb,Xb;(function(){Xb=Wb=Vb=Ub=Tb=Sb=k;var a=fb();if(a)if(a.indexOf("Firefox")!=-1)Sb=h;else if(a.indexOf("Camino")!=-1)Tb=h;else if(a.indexOf("iPhone")!=-1||a.indexOf("iPod")!=-1)Ub=h;else if(a.indexOf("Android")!=-1)Vb=h;else if(a.indexOf("Chrome")!=-1)Wb=h;else if(a.indexOf("Safari")!=-1)Xb=h})();var Zb=function(a,b,c){u(b)?Yb(a,c,b):za(b,la(Yb,a))},Yb=function(a,b,c){a.style[$b(c)]=b},ac=function(a,b){var c=E(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(a=c.defaultView.getComputedStyle(a,""))return a[b];return j},bc=function(a,b){return ac(a,b)||(a.currentStyle?a.currentStyle[b]:j)||a.style[b]},cc=function(a){return bc(a,"position")},dc=function(a,b,c){var d,f=C&&(kb||mb)&&pb("1.9");if(b instanceof z){d=b.x;b=b.y}else{d=b;b=c}a.style.left=typeof d=="number"?(f?Math.round(d):d)+
"px":d;a.style.top=typeof b=="number"?(f?Math.round(b):b)+"px":b},fc=function(a){var b=a.getBoundingClientRect();if(B){a=a.ownerDocument;b.left-=a.documentElement.clientLeft+a.body.clientLeft;b.top-=a.documentElement.clientTop+a.body.clientTop}return b},gc=function(a){if(B)return a.offsetParent;var b=E(a),c=bc(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=bc(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||
a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return j},jc=function(a){var b=new Qb(0,Infinity,Infinity,0),c=wb(a),d=c.getDocumentScrollElement(),f;for(a=a;a=gc(a);)if((!B||a.clientWidth!=0)&&(a.scrollWidth!=a.clientWidth||a.scrollHeight!=a.clientHeight)&&bc(a,"overflow")!="visible"){var g=hc(a),l;if(C&&!pb("1.9")){l=parseFloat(ac(a,"borderLeftWidth"));if(ic(a)){var m=a.offsetWidth-a.clientWidth-l-parseFloat(ac(a,"borderRightWidth"));l+=m}l=new z(l,parseFloat(ac(a,"borderTopWidth")))}else l=
new z(a.clientLeft,a.clientTop);g.x+=l.x;g.y+=l.y;b.top=Math.max(b.top,g.y);b.right=Math.min(b.right,g.x+a.clientWidth);b.bottom=Math.min(b.bottom,g.y+a.clientHeight);b.left=Math.max(b.left,g.x);f=f||a!=d}a=d.scrollLeft;d=d.scrollTop;if(D){b.left+=a;b.top+=d}else{b.left=Math.max(b.left,a);b.top=Math.max(b.top,d)}if(!f||D){b.right+=a;b.bottom+=d}c=c.getViewportSize();b.right=Math.min(b.right,a+c.width);b.bottom=Math.min(b.bottom,d+c.height);return b.top>=0&&b.left>=0&&b.bottom>b.top&&b.right>b.left?
b:j},hc=function(a){var b,c=E(a),d=bc(a,"position"),f=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&d=="absolute"&&(b=c.getBoxObjectFor(a))&&(b.screenX<0||b.screenY<0),g=new z(0,0),l;b=c?c.nodeType==9?c:E(c):document;l=B&&!wb(b).isCss1CompatMode()?b.body:b.documentElement;if(a==l)return g;if(a.getBoundingClientRect){b=fc(a);a=wb(c).getDocumentScroll();g.x=b.left+a.x;g.y=b.top+a.y}else if(c.getBoxObjectFor&&!f){b=c.getBoxObjectFor(a);a=c.getBoxObjectFor(l);g.x=b.screenX-a.screenX;g.y=b.screenY-a.screenY}else{b=
a;do{g.x+=b.offsetLeft;g.y+=b.offsetTop;if(b!=a){g.x+=b.clientLeft||0;g.y+=b.clientTop||0}if(D&&cc(b)=="fixed"){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(hb||D&&d=="absolute")g.y-=c.body.offsetTop;for(b=a;(b=gc(b))&&b!=c.body&&b!=l;){g.x-=b.scrollLeft;if(!hb||b.tagName!="TR")g.y-=b.scrollTop}}return g},lc=function(a,b){a=kc(a);b=kc(b);return new z(a.x-b.x,a.y-b.y)},kc=function(a){var b=new z;if(a.nodeType==1)if(a.getBoundingClientRect){var c=fc(a);b.x=c.left;
b.y=c.top}else{c=wb(a).getDocumentScroll();a=hc(a);b.x=a.x-c.x;b.y=a.y-c.y}else{b.x=a.clientX;b.y=a.clientY}return b},mc=function(a,b,c){var d=hc(a);if(b instanceof z){c=b.y;b=b.x}dc(a,a.offsetLeft+(b-d.x),a.offsetTop+(c-d.y))},nc=function(a,b,c){if(b instanceof A){c=b.height;b=b.width}else{if(c==undefined)e(Error("missing height argument"));c=c}a.style.width=typeof b=="number"?Math.round(b)+"px":b;a.style.height=typeof c=="number"?Math.round(c)+"px":c},oc=function(a){var b=hb&&!pb("10");if(bc(a,
"display")!="none")return b?new A(a.offsetWidth||a.clientWidth,a.offsetHeight||a.clientHeight):new A(a.offsetWidth,a.offsetHeight);var c=a.style,d=c.display,f=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";if(b){b=a.offsetWidth||a.clientWidth;a=a.offsetHeight||a.clientHeight}else{b=a.offsetWidth;a=a.offsetHeight}c.display=d;c.position=g;c.visibility=f;return new A(b,a)},pc={},$b=function(a){return pc[a]||(pc[a]=String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()}))},
qc=function(a,b){a=a.style;if("opacity"in a)a.opacity=b;else if("MozOpacity"in a)a.MozOpacity=b;else if("filter"in a)a.filter=b===""?"":"alpha(opacity="+b*100+")"},L=function(a,b){a.style.display=b?"":"none"},ic=function(a){return"rtl"==bc(a,"direction")};var rc=function(){};rc.prototype.disposed_=k;rc.prototype.dispose=function(){if(!this.disposed_){this.disposed_=h;this.disposeInternal()}};rc.prototype.disposeInternal=function(){};var sc=function(a,b){rc.call(this);this.maxCount_=b;this.freeQueue_=[];this.createInitial_(a)};y(sc,rc);n=sc.prototype;n.createObjectFn_=j;n.disposeObjectFn_=j;n.setCreateObjectFn=function(a){this.createObjectFn_=a};n.setDisposeObjectFn=function(a){this.disposeObjectFn_=a};n.getObject=function(){if(this.freeQueue_.length)return this.freeQueue_.pop();return this.createObject()};n.releaseObject=function(a){this.freeQueue_.length<this.maxCount_?this.freeQueue_.push(a):this.disposeObject(a)};
n.createInitial_=function(a){if(a>this.maxCount_)e(Error("[goog.structs.SimplePool] Initial cannot be greater than max"));for(var b=0;b<a;b++)this.freeQueue_.push(this.createObject())};n.createObject=function(){return this.createObjectFn_?this.createObjectFn_():{}};n.disposeObject=function(a){if(this.disposeObjectFn_)this.disposeObjectFn_(a);else if(ga(a.dispose))a.dispose();else for(var b in a)delete a[b]};
n.disposeInternal=function(){sc.superClass_.disposeInternal.call(this);for(var a=this.freeQueue_;a.length;)this.disposeObject(a.pop());delete this.freeQueue_};var M=function(a,b){this.type=a;this.currentTarget=this.target=b};y(M,rc);n=M.prototype;n.disposeInternal=function(){delete this.type;delete this.target;delete this.currentTarget};n.propagationStopped_=k;n.returnValue_=h;n.stopPropagation=function(){this.propagationStopped_=h};n.preventDefault=function(){this.returnValue_=k};var tc=function(a,b){a&&this.init(a,b)};y(tc,M);var uc=[1,4,2];n=tc.prototype;n.type=j;n.target=j;n.relatedTarget=j;n.offsetX=0;n.offsetY=0;n.clientX=0;n.clientY=0;n.screenX=0;n.screenY=0;n.button=0;n.keyCode=0;n.charCode=0;n.ctrlKey=k;n.altKey=k;n.shiftKey=k;n.metaKey=k;n.event_=j;
n.init=function(a,b){this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;this.relatedTarget=a.relatedTarget?a.relatedTarget:this.type=="mouseover"?a.fromElement:this.type=="mouseout"?a.toElement:j;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=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.event_=a;delete this.returnValue_;delete this.propagationStopped_};n.isButton=function(a){return B?this.type=="click"?a==0:!!(this.event_.button&uc[a]):this.event_.button==a};
n.stopPropagation=function(){this.propagationStopped_=h;if(this.event_.stopPropagation)this.event_.stopPropagation();else this.event_.cancelBubble=h};n.preventDefault=function(){this.returnValue_=k;if(this.event_.preventDefault)this.event_.preventDefault();else{this.event_.returnValue=k;try{this.event_.keyCode=-1}catch(a){}}};n.disposeInternal=function(){tc.superClass_.disposeInternal.call(this);this.event_=j};var vc=function(){},wc=0;n=vc.prototype;n.key=0;n.removed=k;n.callOnce=k;n.init=function(a,b,c,d,f,g){if(ga(a))this.isFunctionListener_=h;else if(a&&a.handleEvent&&ga(a.handleEvent))this.isFunctionListener_=k;else e(Error("Invalid listener argument"));this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!f;this.handler=g;this.callOnce=k;this.key=++wc;this.removed=k};
n.handleEvent=function(a){if(this.isFunctionListener_)return this.listener.call(this.handler||this.src,a);return this.listener.handleEvent.call(this.listener,a)};var xc={},N={},yc={},zc=new sc(0,600);zc.setCreateObjectFn(function(){return{count_:0,remaining_:0}});zc.setDisposeObjectFn(function(a){a.count_=0});var Ac=new sc(0,600);Ac.setCreateObjectFn(function(){return[]});Ac.setDisposeObjectFn(function(a){a.length=0;delete a.locked_;delete a.needsCleanup_});var Bc=new sc(0,600);Bc.setCreateObjectFn(function(){var a=function(b){return Cc.call(a.src,a.key,b)};return a});var Dc=function(){return new vc},Ec=new sc(0,600);Ec.setCreateObjectFn(Dc);
var Fc=function(){return new tc},Gc=function(){var a=j;if(B){a=new sc(0,600);a.setCreateObjectFn(Fc)}return a}(),Hc={},O=function(a,b,c,d,f){if(b)if(s(b)){for(var g=0;g<b.length;g++)O(a,b[g],c,d,f);return j}else{d=!!d;var l=N;b in l||(l[b]=zc.getObject());l=l[b];if(!(d in l)){l[d]=zc.getObject();l.count_++}l=l[d];var m=v(a),t;l.remaining_++;if(l[m]){t=l[m];for(g=0;g<t.length;g++){l=t[g];if(l.listener==c&&l.handler==f){if(l.removed)break;return t[g].key}}}else{t=l[m]=Ac.getObject();l.count_++}g=Bc.getObject();
g.src=a;l=Ec.getObject();l.init(c,g,a,b,d,f);c=l.key;g.key=c;t.push(l);xc[c]=l;yc[m]||(yc[m]=Ac.getObject());yc[m].push(l);if(a.addEventListener){if(a==o||!a.customEvent_)a.addEventListener(b,g,d)}else a.attachEvent(Ic(b),g);return c}else e(Error("Invalid event type"))},Jc=function(a,b,c,d,f){if(s(b)){for(var g=0;g<b.length;g++)Jc(a,b[g],c,d,f);return j}a=O(a,b,c,d,f);xc[a].callOnce=h;return a},P=function(a,b,c,d,f){if(s(b)){for(var g=0;g<b.length;g++)P(a,b[g],c,d,f);return j}d=!!d;a=Kc(a,b,d);if(!a)return k;
for(g=0;g<a.length;g++)if(a[g].listener==c&&a[g].capture==d&&a[g].handler==f)return Lc(a[g].key);return k},Lc=function(a){if(!xc[a])return k;var b=xc[a];if(b.removed)return k;var c=b.src,d=b.type,f=b.proxy,g=b.capture;if(c.removeEventListener){if(c==o||!c.customEvent_)c.removeEventListener(d,f,g)}else c.detachEvent&&c.detachEvent(Ic(d),f);c=v(c);f=N[d][g][c];if(yc[c]){var l=yc[c];ta(l,b);l.length==0&&delete yc[c]}b.removed=h;f.needsCleanup_=h;Mc(d,g,c,f);delete xc[a];return h},Mc=function(a,b,c,d){if(!d.locked_)if(d.needsCleanup_){for(var f=
0,g=0;f<d.length;f++)if(d[f].removed)Ec.releaseObject(d[f]);else{if(f!=g)d[g]=d[f];g++}d.length=g;d.needsCleanup_=k;if(g==0){Ac.releaseObject(d);delete N[a][b][c];N[a][b].count_--;if(N[a][b].count_==0){zc.releaseObject(N[a][b]);delete N[a][b];N[a].count_--}if(N[a].count_==0){zc.releaseObject(N[a]);delete N[a]}}}},Nc=function(a,b,c){var d=0,f=a==j,g=b==j,l=c==j;c=!!c;if(f)za(yc,function(t){for(var q=t.length-1;q>=0;q--){var r=t[q];if((g||b==r.type)&&(l||c==r.capture)){Lc(r.key);d++}}});else{a=v(a);
if(yc[a]){a=yc[a];for(f=a.length-1;f>=0;f--){var m=a[f];if((g||b==m.type)&&(l||c==m.capture)){Lc(m.key);d++}}}}return d},Kc=function(a,b,c){var d=N;if(b in d){d=d[b];if(c in d){d=d[c];a=v(a);if(d[a])return d[a]}}return j},Ic=function(a){if(a in Hc)return Hc[a];return Hc[a]="on"+a},Pc=function(a,b,c,d,f){var g=1;b=v(b);if(a[b]){a.remaining_--;a=a[b];if(a.locked_)a.locked_++;else a.locked_=1;try{for(var l=a.length,m=0;m<l;m++){var t=a[m];if(t&&!t.removed)g&=Oc(t,f)!==k}}finally{a.locked_--;Mc(c,d,b,
a)}}return Boolean(g)},Oc=function(a,b){b=a.handleEvent(b);a.callOnce&&Lc(a.key);return b},Cc=function(a,b){if(!xc[a])return h;a=xc[a];var c=a.type,d=N;if(!(c in d))return h;d=d[c];var f,g;if(B){f=b||ba("window.event");b=h in d;var l=k in d;if(b){if(f.keyCode<0||f.returnValue!=undefined)return h;a:{var m=k;if(f.keyCode==0)try{f.keyCode=-1;break a}catch(t){m=h}if(m||f.returnValue==undefined)f.returnValue=h}}m=Gc.getObject();m.init(f,this);f=h;try{if(b){for(var q=Ac.getObject(),r=m.currentTarget;r;r=
r.parentNode)q.push(r);g=d[h];g.remaining_=g.count_;for(var w=q.length-1;!m.propagationStopped_&&w>=0&&g.remaining_;w--){m.currentTarget=q[w];f&=Pc(g,q[w],c,h,m)}if(l){g=d[k];g.remaining_=g.count_;for(w=0;!m.propagationStopped_&&w<q.length&&g.remaining_;w++){m.currentTarget=q[w];f&=Pc(g,q[w],c,k,m)}}}else f=Oc(a,m)}finally{if(q){q.length=0;Ac.releaseObject(q)}m.dispose();Gc.releaseObject(m)}return f}g=new tc(b,this);try{f=Oc(a,g)}finally{g.dispose()}return f};if("StopIteration"in o)var Qc=o.StopIteration;else Qc=Error("StopIteration");var Rc=function(){};Rc.prototype.next=function(){e(Qc)};Rc.prototype.__iterator__=function(){return this};var Sc=function(a){if(typeof a.getValues=="function")return a.getValues();if(u(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Aa(a)},Tc=function(a){if(typeof a.getKeys=="function")return a.getKeys();if(typeof a.getValues=="function")return undefined;if(fa(a)||u(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Ba(a)},Uc=function(a,b,c){if(typeof a.forEach=="function")a.forEach(b,c);else if(fa(a)||u(a))pa(a,b,c);else for(var d=Tc(a),
f=Sc(a),g=f.length,l=0;l<g;l++)b.call(c,f[l],d&&d[l],a)};var Zc=function(a){this.map_={};this.keys_=[];var b=arguments.length;if(b>1){if(b%2)e(Error("Uneven number of arguments"));for(var c=0;c<b;c+=2)this.set(arguments[c],arguments[c+1])}else a&&this.addAll(a)};n=Zc.prototype;n.count_=0;n.version_=0;n.getValues=function(){this.cleanupKeysArray_();for(var a=[],b=0;b<this.keys_.length;b++)a.push(this.map_[this.keys_[b]]);return a};n.getKeys=function(){this.cleanupKeysArray_();return this.keys_.concat()};n.containsKey=function(a){return $c(this.map_,a)};
n.clear=function(){this.map_={};this.version_=this.count_=this.keys_.length=0};n.remove=function(a){if($c(this.map_,a)){delete this.map_[a];this.count_--;this.version_++;this.keys_.length>2*this.count_&&this.cleanupKeysArray_();return h}return k};
n.cleanupKeysArray_=function(){if(this.count_!=this.keys_.length){for(var a=0,b=0;a<this.keys_.length;){var c=this.keys_[a];if($c(this.map_,c))this.keys_[b++]=c;a++}this.keys_.length=b}if(this.count_!=this.keys_.length){var d={};for(b=a=0;a<this.keys_.length;){c=this.keys_[a];if(!$c(d,c)){this.keys_[b++]=c;d[c]=1}a++}this.keys_.length=b}};n.get=function(a,b){if($c(this.map_,a))return this.map_[a];return b};
n.set=function(a,b){if(!$c(this.map_,a)){this.count_++;this.keys_.push(a);this.version_++}this.map_[a]=b};n.addAll=function(a){var b;if(a instanceof Zc){b=a.getKeys();a=a.getValues()}else{b=Ba(a);a=Aa(a)}for(var c=0;c<b.length;c++)this.set(b[c],a[c])};n.clone=function(){return new Zc(this)};
n.__iterator__=function(a){this.cleanupKeysArray_();var b=0,c=this.keys_,d=this.map_,f=this.version_,g=this,l=new Rc;l.next=function(){for(;1;){if(f!=g.version_)e(Error("The map has changed since the iterator was created"));if(b>=c.length)e(Qc);var m=c[b++];return a?m:d[m]}};return l};var $c=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var ad=/^(?:([^:\/?#]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,bd=function(a){return a.match(ad)};var R=function(a,b){var c;if(a instanceof R){this.setIgnoreCase(b==j?a.ignoreCase_:b);this.setScheme(a.scheme_);this.setUserInfo(a.userInfo_);this.setDomain(a.domain_);this.setPort(a.port_);this.setPath(a.path_);this.setQueryData(a.queryData_.clone());this.setFragment(a.fragment_)}else if(a&&(c=bd(String(a)))){this.setIgnoreCase(!!b);this.setScheme(c[1]||"",h);this.setUserInfo(c[2]||"",h);this.setDomain(c[3]||"",h);this.setPort(c[4]);this.setPath(c[5]||"",h);this.setQuery(c[6]||"",h);this.setFragment(c[7]||
"",h)}else{this.setIgnoreCase(!!b);this.queryData_=new S(j,this,this.ignoreCase_)}};n=R.prototype;n.scheme_="";n.userInfo_="";n.domain_="";n.port_=j;n.path_="";n.fragment_="";n.isReadOnly_=k;n.ignoreCase_=k;
n.toString=function(){if(this.cachedToString_)return this.cachedToString_;var a=[];this.scheme_&&a.push(cd(this.scheme_,dd),":");if(this.domain_){a.push("//");this.userInfo_&&a.push(cd(this.userInfo_,dd),"@");a.push(ed(this.domain_));this.port_!=j&&a.push(":",String(this.port_))}this.path_&&a.push(cd(this.path_,fd));var b=String(this.queryData_);b&&a.push("?",b);this.fragment_&&a.push("#",cd(this.fragment_,gd));return this.cachedToString_=a.join("")};
n.resolve=function(a){var b=this.clone(),c=a.hasScheme();if(c)b.setScheme(a.scheme_);else c=a.hasUserInfo();if(c)b.setUserInfo(a.userInfo_);else c=a.hasDomain();if(c)b.setDomain(a.domain_);else c=a.hasPort();var d=a.path_;if(c)b.setPort(a.port_);else if(c=a.hasPath()){if(d.charAt(0)!="/")if(this.hasDomain()&&!this.hasPath())d="/"+d;else{var f=b.path_.lastIndexOf("/");if(f!=-1)d=b.path_.substr(0,f+1)+d}if(d==".."||d==".")d="";else if(!Ra(d,"./")&&!Ra(d,"/."))d=d;else{f=d.indexOf("/")==0;d=d.split("/");
for(var g=[],l=0;l<d.length;){var m=d[l++];if(m==".")f&&l==d.length&&g.push("");else if(m==".."){if(g.length>1||g.length==1&&g[0]!="")g.pop();f&&l==d.length&&g.push("")}else{g.push(m);f=h}}d=g.join("/")}}if(c)b.setPath(d);else c=a.hasQuery();if(c)b.setQuery(a.getDecodedQuery());else c=a.hasFragment();c&&b.setFragment(a.fragment_);return b};
n.clone=function(){var a;a=this.scheme_;var b=this.userInfo_,c=this.domain_,d=this.port_,f=this.path_,g=this.queryData_.clone(),l=this.fragment_,m=new R(j,this.ignoreCase_);a&&m.setScheme(a);b&&m.setUserInfo(b);c&&m.setDomain(c);d&&m.setPort(d);f&&m.setPath(f);g&&m.setQueryData(g);l&&m.setFragment(l);return a=m};n.setScheme=function(a,b){this.enforceReadOnly();delete this.cachedToString_;if(this.scheme_=b?hd(a):a)this.scheme_=this.scheme_.replace(/:$/,"");return this};n.hasScheme=function(){return!!this.scheme_};
n.setUserInfo=function(a,b){this.enforceReadOnly();delete this.cachedToString_;this.userInfo_=b?hd(a):a;return this};n.hasUserInfo=function(){return!!this.userInfo_};n.setDomain=function(a,b){this.enforceReadOnly();delete this.cachedToString_;this.domain_=b?hd(a):a;return this};n.hasDomain=function(){return!!this.domain_};n.setPort=function(a){this.enforceReadOnly();delete this.cachedToString_;if(a){a=Number(a);if(isNaN(a)||a<0)e(Error("Bad port number "+a));this.port_=a}else this.port_=j;return this};
n.hasPort=function(){return this.port_!=j};n.setPath=function(a,b){this.enforceReadOnly();delete this.cachedToString_;this.path_=b?hd(a):a;return this};n.hasPath=function(){return!!this.path_};n.hasQuery=function(){return this.queryData_.toString()!==""};n.setQueryData=function(a,b){this.enforceReadOnly();delete this.cachedToString_;if(a instanceof S){this.queryData_=a;this.queryData_.uri_=this;this.queryData_.setIgnoreCase(this.ignoreCase_)}else{b||(a=cd(a,id));this.queryData_=new S(a,this,this.ignoreCase_)}return this};
n.setQuery=function(a,b){return this.setQueryData(a,b)};n.getDecodedQuery=function(){return this.queryData_.toDecodedString()};n.setParameterValue=function(a,b){this.enforceReadOnly();delete this.cachedToString_;this.queryData_.set(a,b);return this};n.getParameterValue=function(a){return this.queryData_.get(a)};n.setFragment=function(a,b){this.enforceReadOnly();delete this.cachedToString_;this.fragment_=b?hd(a):a;return this};n.hasFragment=function(){return!!this.fragment_};
n.setReadOnly=function(a){this.isReadOnly_=a};n.enforceReadOnly=function(){if(this.isReadOnly_)e(Error("Tried to modify a read-only Uri"))};n.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)};
var hd=function(a){return a?decodeURIComponent(a):""},ed=function(a){if(u(a))return encodeURIComponent(a);return j},jd=/^[a-zA-Z0-9\-_.!~*'():\/;?]*$/,cd=function(a,b){var c=j;if(u(a)){c=a;jd.test(c)||(c=encodeURI(a));if(c.search(b)>=0)c=c.replace(b,kd)}return c},kd=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},dd=/[#\/\?@]/g,fd=/[\#\?]/g,id=/[\#\?@]/g,gd=/#/g,S=function(a,b,c){this.encodedQuery_=a||j;this.uri_=b||j;this.ignoreCase_=!!c};n=S.prototype;
n.ensureKeyMapInitialized_=function(){if(!this.keyMap_){this.keyMap_=new Zc;if(this.encodedQuery_)for(var a=this.encodedQuery_.split("&"),b=0;b<a.length;b++){var c=a[b].indexOf("="),d=j,f=j;if(c>=0){d=a[b].substring(0,c);f=a[b].substring(c+1)}else d=a[b];d=decodeURIComponent(d.replace(/\+/g," "));d=this.getKeyName_(d);this.add(d,f?decodeURIComponent(f.replace(/\+/g," ")):"")}}};n.keyMap_=j;n.count_=j;
n.add=function(a,b){this.ensureKeyMapInitialized_();this.invalidateCache_();a=this.getKeyName_(a);if(this.containsKey(a)){var c=this.keyMap_.get(a);s(c)?c.push(b):this.keyMap_.set(a,[c,b])}else this.keyMap_.set(a,b);this.count_++;return this};n.remove=function(a){this.ensureKeyMapInitialized_();a=this.getKeyName_(a);if(this.keyMap_.containsKey(a)){this.invalidateCache_();var b=this.keyMap_.get(a);if(s(b))this.count_-=b.length;else this.count_--;return this.keyMap_.remove(a)}return k};
n.clear=function(){this.invalidateCache_();this.keyMap_&&this.keyMap_.clear();this.count_=0};n.containsKey=function(a){this.ensureKeyMapInitialized_();a=this.getKeyName_(a);return this.keyMap_.containsKey(a)};n.getKeys=function(){this.ensureKeyMapInitialized_();for(var a=this.keyMap_.getValues(),b=this.keyMap_.getKeys(),c=[],d=0;d<b.length;d++){var f=a[d];if(s(f))for(var g=0;g<f.length;g++)c.push(b[d]);else c.push(b[d])}return c};
n.getValues=function(a){this.ensureKeyMapInitialized_();if(a){a=this.getKeyName_(a);if(this.containsKey(a)){var b=this.keyMap_.get(a);if(s(b))return b;else{a=[];a.push(b)}}else a=[]}else{b=this.keyMap_.getValues();a=[];for(var c=0;c<b.length;c++){var d=b[c];s(d)?va(a,d):a.push(d)}}return a};
n.set=function(a,b){this.ensureKeyMapInitialized_();this.invalidateCache_();a=this.getKeyName_(a);if(this.containsKey(a)){var c=this.keyMap_.get(a);if(s(c))this.count_-=c.length;else this.count_--}this.keyMap_.set(a,b);this.count_++;return this};n.get=function(a,b){this.ensureKeyMapInitialized_();a=this.getKeyName_(a);if(this.containsKey(a)){a=this.keyMap_.get(a);return s(a)?a[0]:a}else return b};
n.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var a=[],b=0,c=this.keyMap_.getKeys(),d=0;d<c.length;d++){var f=c[d],g=Ka(f);f=this.keyMap_.get(f);if(s(f))for(var l=0;l<f.length;l++){b>0&&a.push("&");a.push(g,"=",Ka(f[l]));b++}else{b>0&&a.push("&");a.push(g,"=",Ka(f));b++}}return this.encodedQuery_=a.join("")};n.toDecodedString=function(){if(!this.decodedQuery_)this.decodedQuery_=hd(this.toString());return this.decodedQuery_};
n.invalidateCache_=function(){delete this.decodedQuery_;delete this.encodedQuery_;this.uri_&&delete this.uri_.cachedToString_};n.clone=function(){var a=new S;if(this.decodedQuery_)a.decodedQuery_=this.decodedQuery_;if(this.encodedQuery_)a.encodedQuery_=this.encodedQuery_;if(this.keyMap_)a.keyMap_=this.keyMap_.clone();return a};n.getKeyName_=function(a){a=String(a);if(this.ignoreCase_)a=a.toLowerCase();return a};
n.setIgnoreCase=function(a){if(a&&!this.ignoreCase_){this.ensureKeyMapInitialized_();this.invalidateCache_();Uc(this.keyMap_,function(b,c){var d=c.toLowerCase();if(c!=d){this.remove(c);this.add(d,b)}},this)}this.ignoreCase_=a};n.extend=function(){for(var a=0;a<arguments.length;a++)Uc(arguments[a],function(b,c){this.add(c,b)},this)};var T={};p("_G3DWH_Utils",T,undefined);p("goog.dom.getElement",F,undefined);p("goog.style.showElement",L,undefined);T.showHideElement=function(a,b){a=F(a);L(a,b)};p("_G3DWH_Utils.showHideElement",T.showHideElement,undefined);T.toggleVisible=function(a){var b=a;if(typeof a==="string")b=F(a);L(b,!(b.style.display!="none"))};p("_G3DWH_Utils.toggleVisible",T.toggleVisible,undefined);T.swapClass=function(a,b,c){a=F(a);return ub(a,b,c)};p("_G3DWH_Utils.swapClass",T.swapClass,undefined);
T.getSingleValue=function(a,b){a=a.getElementsByTagName(b);if(a.length>0){a=a.item(0).firstChild;if(a!==j)return Ha(a.data)}return j};T.focusElementOnLoad=function(a){Jc(window,"load",function(){var b=F(a);b&&b.focus()})};p("_G3DWH_Utils.focusElementOnLoad",T.focusElementOnLoad,undefined);T.logClientAction=function(a,b,c){a=new R(a);a.setParameterValue(b,c);(new Image).src=a.toString()};p("_G3DWH_Utils.logClientAction",T.logClientAction,undefined);T.isEarthPluginCompatible=function(){return lb};
p("_G3DWH_Utils.isEarthPluginCompatible",T.isEarthPluginCompatible,undefined);T.wrapLinks=function(a){return a.replace(/\B@([_a-z0-9]+)/ig,"").replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(b){return'<a href="'+b+'">'+b+"</a>"})};p("_G3DWH_Utils.wrapLinks",T.wrapLinks,undefined);var ld=function(a){this.div=F(a);this.originalText=this.div.innerHTML};n=ld.prototype;n.originalTextTruncated=j;n.translation=j;n.detectedLanguage=j;n.truncate_=function(a){var b=a;if(a.length>5000){b=a.substr(0,4997);a=b.lastIndexOf(" ");b=a!=-1?b.substr(0,a)+"...":""}return b};n.getTruncatedText_=function(){if(this.originalTextTruncated==j)this.originalTextTruncated=this.truncate_(this.originalText);return this.originalTextTruncated};
n.onTranslated_=function(a){if(!a.error)this.translation=this.div.innerHTML=a.translation};n.detect=function(a){google.language.detect(this.getTruncatedText_(),x(function(b){if(!b.error&&b.language&&b.isReliable)this.detectedLanguage=b.language;a(b)},this))};n.translate=function(a){if(!(a==this.detectedLanguage)){this.translation!=j&&this.onTranslated_({translation:this.translation});google.language.translate(this.getTruncatedText_(),this.detectedLanguage,a,x(this.onTranslated_,this))}};
n.restore=function(){this.div.innerHTML=this.originalText};var md=function(a,b,c,d,f,g,l,m){this.translateDiv=F(a);this.restoreDiv=F(b);this.userLang=c;this.actionTrackingUrl=d;this.actionTrackingParamName=f;this.translateActionCode=g;this.restoreActionCode=l;this.translatables=[];for(a=0;a<m.length;a++)F(m[a])!=j&&this.translatables.push(new ld(m[a]));if(google.language.isTranslatable(this.userLang))for(a=0;a<this.translatables.length;a++)this.translatables[a].detect(x(this.onDetectCallback_,this))};
md.prototype.restore=function(){T.logClientAction(this.actionTrackingUrl,this.actionTrackingParamName,this.restoreActionCode);for(var a=0;a<this.translatables.length;a++)this.translatables[a].restore();L(this.translateDiv,h);L(this.restoreDiv,k)};md.prototype.translate=function(){T.logClientAction(this.actionTrackingUrl,this.actionTrackingParamName,this.translateActionCode);L(this.translateDiv,k);L(this.restoreDiv,h);for(var a=0;a<this.translatables.length;a++)this.translatables[a].translate(this.userLang)};
md.prototype.onDetectCallback_=function(a){!a.error&&a.language&&a.isReliable&&a.language!=this.userLang&&google.language.isTranslatable(a.language)&&L(this.translateDiv,h)};p("_G3DWH_Translator",md,undefined);p("_G3DWH_Translator.prototype.translate",md.prototype.translate,undefined);p("_G3DWH_Translator.prototype.restore",md.prototype.restore,undefined);var nd,od=function(a,b,c){if(C||nd)a.setAttribute("aria-"+b,c)};var U=function(){};y(U,rc);n=U.prototype;n.customEvent_=h;n.parentEventTarget_=j;n.setParentEventTarget=function(a){this.parentEventTarget_=a};n.addEventListener=function(a,b,c,d){O(this,a,b,c,d)};n.removeEventListener=function(a,b,c,d){P(this,a,b,c,d)};
n.dispatchEvent=function(a){a=a;if(u(a))a=new M(a,this);else if(a instanceof M)a.target=a.target||this;else{var b=a;a=new M(a.type,this);Ga(a,b)}b=1;var c,d=a.type,f=N;if(d in f){f=f[d];d=h in f;var g;if(d){c=[];for(g=this;g;g=g.parentEventTarget_)c.push(g);g=f[h];g.remaining_=g.count_;for(var l=c.length-1;!a.propagationStopped_&&l>=0&&g.remaining_;l--){a.currentTarget=c[l];b&=Pc(g,c[l],a.type,h,a)&&a.returnValue_!=k}}if(k in f){g=f[k];g.remaining_=g.count_;if(d)for(l=0;!a.propagationStopped_&&l<
c.length&&g.remaining_;l++){a.currentTarget=c[l];b&=Pc(g,c[l],a.type,k,a)&&a.returnValue_!=k}else for(c=this;!a.propagationStopped_&&c&&g.remaining_;c=c.parentEventTarget_){a.currentTarget=c;b&=Pc(g,c,a.type,k,a)&&a.returnValue_!=k}}a=Boolean(b)}else a=h;return a};n.disposeInternal=function(){U.superClass_.disposeInternal.call(this);Nc(this);this.parentEventTarget_=j};var pd=function(a){U.call(this);this.element_=a;a=B?"focusout":"blur";this.listenKeyIn_=O(this.element_,B?"focusin":"focus",this,!B);this.listenKeyOut_=O(this.element_,a,this,!B)};y(pd,U);pd.prototype.handleEvent=function(a){var b=new tc(a.event_);b.type=a.type=="focusin"||a.type=="focus"?"focusin":"focusout";try{this.dispatchEvent(b)}finally{b.dispose()}};pd.prototype.disposeInternal=function(){pd.superClass_.disposeInternal.call(this);Lc(this.listenKeyIn_);Lc(this.listenKeyOut_);delete this.element_};var qd=function(a,b,c){this.target=a;this.handle=b||a;this.limits=c||new Rb(NaN,NaN,NaN,NaN);this.document_=a.ownerDocument||a.document;O(this.handle,"mousedown",this.startDrag,k,this)};y(qd,U);var rd=C&&!pb("1.9a");n=qd.prototype;n.screenX=0;n.screenY=0;n.startX=0;n.startY=0;n.deltaX=0;n.deltaY=0;n.enabled_=h;n.dragging_=k;n.hysteresisDistanceSquared_=0;n.mouseDownTime_=0;n.ieDragStartCancellingOn_=k;var sd=function(a){a.preventDefault()};n=qd.prototype;
n.disposeInternal=function(){qd.superClass_.disposeInternal.call(this);P(this.handle,"mousedown",this.startDrag,k,this);this.tearDownDragHandlers();delete this.target;delete this.handle};
n.startDrag=function(a){if(this.enabled_&&!this.dragging_&&(a.type!="mousedown"||a.isButton(0))){if(this.hysteresisDistanceSquared_==0){this.initializeDrag_(a);if(this.dragging_)a.preventDefault();else return}else a.preventDefault();this.setupDragHandlers();this.screenX=this.startX=a.screenX;this.screenY=this.startY=a.screenY;this.deltaX=this.target.offsetLeft;this.deltaY=this.target.offsetTop;this.pageScroll=wb(this.document_).getDocumentScroll();this.mouseDownTime_=na()}};
n.setupDragHandlers=function(){O(this.document_,"mousemove",this.mouseMoved_,k,this);O(this.document_,"mouseup",this.endDrag,k,this);if(rd)try{O(window.top,"mouseout",this.onWindowMouseOut_,k,this)}catch(a){}B&&this.ieDragStartCancellingOn_&&O(this.document_,"dragstart",sd,k,this);this.scrollTarget_&&O(this.scrollTarget_,"scroll",this.onScroll_,k,this)};n.initializeDrag_=function(a){if(this.dispatchEvent(new td("start",this,a.clientX,a.clientY,a))!==k)this.dragging_=h};
n.endDrag=function(a,b){this.tearDownDragHandlers();if(this.dragging_){this.dragging_=k;var c=this.limitX(this.deltaX),d=this.limitY(this.deltaY);this.dispatchEvent(new td("end",this,a.clientX,a.clientY,a,c,d,b))}};n.endDragCancel=function(a){this.endDrag(a,h)};
n.tearDownDragHandlers=function(){P(this.document_,"mousemove",this.mouseMoved_,k,this);P(this.document_,"mouseup",this.endDrag,k,this);if(rd)try{P(window.top,"mouseout",this.onWindowMouseOut_,k,this)}catch(a){}B&&this.ieDragStartCancellingOn_&&P(this.document_,"dragstart",sd,k,this);this.scrollTarget_&&P(this.scrollTarget_,"scroll",this.onScroll_,k,this)};n.onWindowMouseOut_=function(a){this.dragging_&&!a.relatedTarget&&a.target.tagName!="IFRAME"&&this.endDragCancel(a)};
n.mouseMoved_=function(a){if(this.enabled_)if(B&&!a.button&&!pb("8"))this.endDragCancel(a);else{var b=a.screenX-this.screenX,c=a.screenY-this.screenY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.dragging_){var d=this.startX-this.screenX,f=this.startY-this.screenY;if(d*d+f*f>this.hysteresisDistanceSquared_){this.initializeDrag_(a);if(!this.dragging_){this.endDrag(a);return}}}c=this.calculatePosition_(b,c);b=c.x;c=c.y;if(this.dragging_)if(this.dispatchEvent(new td("beforedrag",this,a.clientX,
a.clientY,a,b,c))!==k){this.doDrag(a,b,c,k);a.preventDefault()}}};n.calculatePosition_=function(a,b){var c=wb(this.document_).getDocumentScroll();a+=c.x-this.pageScroll.x;b+=c.y-this.pageScroll.y;this.pageScroll=c;this.deltaX+=a;this.deltaY+=b;a=this.limitX(this.deltaX);b=this.limitY(this.deltaY);return new z(a,b)};n.onScroll_=function(a){var b=this.calculatePosition_(0,0);a.clientX=this.pageScroll.x-this.screenX;a.clientY=this.pageScroll.x-this.screenY;this.doDrag(a,b.x,b.y,h)};
n.doDrag=function(a,b,c){this.defaultAction(b,c);this.dispatchEvent(new td("drag",this,a.clientX,a.clientY,a,b,c))};n.limitX=function(a){var b=this.limits,c=!isNaN(b.left)?b.left:j;b=!isNaN(b.width)?b.width:0;return Math.min(c!=j?c+b:Infinity,Math.max(c!=j?c:-Infinity,a))};n.limitY=function(a){var b=this.limits,c=!isNaN(b.top)?b.top:j;b=!isNaN(b.height)?b.height:0;return Math.min(c!=j?c+b:Infinity,Math.max(c!=j?c:-Infinity,a))};
n.defaultAction=function(a,b){this.target.style.left=a+"px";this.target.style.top=b+"px"};var td=function(a,b,c,d,f,g,l,m){M.call(this,a);this.type=a;this.clientX=c;this.clientY=d;this.browserEvent=f;this.left=g!==undefined?g:b.deltaX;this.top=l!==undefined?l:b.deltaY;this.dragger=b;this.dragCanceled=!!m};y(td,M);var ud=o.window,vd=function(a,b,c){if(ga(a)){if(c)a=x(a,c)}else if(a&&typeof a.handleEvent=="function")a=x(a.handleEvent,a);else e(Error("Invalid listener argument"));return b>2147483647?-1:ud.setTimeout(a,b||0)};var wd=function(a){this.handler_=a};y(wd,rc);var xd=new sc(0,100);n=wd.prototype;n.listen=function(a,b,c,d,f){if(s(b))for(var g=0;g<b.length;g++)this.listen(a,b[g],c,d,f);else this.recordListenerKey_(O(a,b,c||this,d||k,f||this.handler_||this));return this};n.recordListenerKey_=function(a){if(this.keys_)this.keys_[a]=h;else if(this.key_){this.keys_=xd.getObject();this.keys_[this.key_]=h;this.key_=j;this.keys_[a]=h}else this.key_=a};
n.unlisten=function(a,b,c,d,f){if(this.key_||this.keys_)if(s(b))for(var g=0;g<b.length;g++)this.unlisten(a,b[g],c,d,f);else{a:{d=!!(d||k);if(a=Kc(a,b,d))for(b=0;b<a.length;b++)if(a[b].listener==(c||this)&&a[b].capture==d&&a[b].handler==(f||this.handler_||this)){c=a[b];break a}c=j}if(c){c=c.key;Lc(c);if(this.keys_)Da(this.keys_,c);else if(this.key_==c)this.key_=j}}return this};
n.removeAll=function(){if(this.keys_){for(var a in this.keys_){Lc(a);delete this.keys_[a]}xd.releaseObject(this.keys_);this.keys_=j}else this.key_&&Lc(this.key_)};n.disposeInternal=function(){wd.superClass_.disposeInternal.call(this);this.removeAll()};n.handleEvent=function(){e(Error("EventHandler.handleEvent not implemented"))};var yd=function(){};da(yd);yd.prototype.nextId_=0;yd.prototype.getNextUniqueId=function(){return":"+(this.nextId_++).toString(36)};yd.getInstance();var Ad=function(a){U.call(this);this.dom_=a||wb();this.rightToLeft_=zd};y(Ad,U);Ad.prototype.idGenerator_=yd.getInstance();var zd=j;n=Ad.prototype;n.id_=j;n.dom_=j;n.inDocument_=k;n.element_=j;n.rightToLeft_=j;n.model_=j;n.parent_=j;n.children_=j;n.childIndex_=j;n.wasDecorated_=k;n.getId=function(){return this.id_||(this.id_=this.idGenerator_.getNextUniqueId())};n.getElement=function(){return this.element_};n.setElementInternal=function(a){this.element_=a};
n.getHandler=function(){return this.googUiComponentHandler_||(this.googUiComponentHandler_=new wd(this))};n.setParent=function(a){if(this==a)e(Error("Unable to set parent component"));if(a&&this.parent_&&this.id_&&this.parent_.getChild(this.id_)&&this.parent_!=a)e(Error("Unable to set parent component"));this.parent_=a;Ad.superClass_.setParentEventTarget.call(this,a)};
n.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)e(Error("Method not supported"));Ad.superClass_.setParentEventTarget.call(this,a)};n.getDomHelper=function(){return this.dom_};n.createDom=function(){this.element_=this.dom_.createElement("div")};n.render=function(a){this.render_(a)};
n.render_=function(a,b){if(this.inDocument_)e(Error("Component already rendered"));this.element_||this.createDom();a?a.insertBefore(this.element_,b||j):this.dom_.document_.body.appendChild(this.element_);if(!this.parent_||this.parent_.inDocument_)this.enterDocument()};n.decorate=function(a){if(this.inDocument_)e(Error("Component already rendered"));else if(a&&this.canDecorate(a)){this.wasDecorated_=h;if(!this.dom_||this.dom_.document_!=E(a))this.dom_=wb(a);this.decorateInternal(a);this.enterDocument()}else e(Error("Invalid element to decorate"))};
n.canDecorate=function(){return h};n.decorateInternal=function(a){this.element_=a};n.enterDocument=function(){this.inDocument_=h;this.forEachChild(function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})};n.exitDocument=function(){this.forEachChild(function(a){a.inDocument_&&a.exitDocument()});this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=k};
n.disposeInternal=function(){Ad.superClass_.disposeInternal.call(this);this.inDocument_&&this.exitDocument();if(this.googUiComponentHandler_){this.googUiComponentHandler_.dispose();delete this.googUiComponentHandler_}this.forEachChild(function(a){a.dispose()});!this.wasDecorated_&&this.element_&&J(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=j};n.getChild=function(a){return this.childIndex_&&a?Ea(this.childIndex_,a)||j:j};
n.forEachChild=function(a,b){this.children_&&pa(this.children_,a,b)};n.removeChild=function(a,b){if(a){var c=u(a)?a:a.getId();a=this.getChild(c);if(c&&a){Da(this.childIndex_,c);ta(this.children_,a);if(b){a.exitDocument();a.element_&&J(a.element_)}a.setParent(j)}}if(!a)e(Error("Child is not in parent component"));return a};var Cd=function(a,b,c){Ad.call(this,c);this.class_=a||"modal-dialog";this.useIframeMask_=!!b;this.buttons_=Bd;this.focusHandler_=new pd(this.getDomHelper().document_)};y(Cd,Ad);n=Cd.prototype;n.useIframeMask_=k;n.modal_=h;n.draggable_=h;n.backgroundElementOpacity_=0.3;n.title_="";n.content_="";n.buttons_=j;n.dragger_=j;n.visible_=k;n.disposeOnHide_=k;n.bgEl_=j;n.bgIframeEl_=j;n.titleEl_=j;n.titleTextEl_=j;n.titleId_=j;n.titleCloseEl_=j;n.contentEl_=j;n.buttonEl_=j;
n.setTitle=function(a){this.title_=a;this.titleTextEl_&&Kb(this.titleTextEl_,a)};n.setContent=function(a){this.content_=a;if(this.contentEl_)this.contentEl_.innerHTML=a};n.getTitleCloseElement=function(){this.inDocument_||this.render();return this.titleCloseEl_};
n.setDraggable=function(a){if((this.draggable_=a)&&!this.dragger_&&this.getElement())this.dragger_=this.createDraggableTitleDom_();else if(!this.draggable_&&this.dragger_){this.getElement()&&tb(this.titleEl_,this.class_+"-title-draggable");this.dragger_.dispose();this.dragger_=j}};n.createDraggableTitleDom_=function(){var a=new qd(this.getElement(),this.titleEl_);sb(this.titleEl_,this.class_+"-title-draggable");return a};
n.createDom=function(){this.manageBackgroundDom_();var a=this.getDomHelper();this.setElementInternal(a.createDom("div",{className:this.class_,tabIndex:0},this.titleEl_=a.createDom("div",{className:this.class_+"-title",id:this.getId()},this.titleTextEl_=a.createDom("span",this.class_+"-title-text",this.title_),this.titleCloseEl_=a.createDom("span",this.class_+"-title-close")),this.contentEl_=a.createDom("div",this.class_+"-content"),this.buttonEl_=a.createDom("div",this.class_+"-buttons"),this.tabCatcherEl_=
a.createDom("span",{tabIndex:0})));this.titleId_=this.titleEl_.id;a=this.getElement();if(C||nd){a.setAttribute("role","dialog");a.roleName="dialog"}od(this.getElement(),"labelledby",this.titleId_||"");if(this.content_)this.contentEl_.innerHTML=this.content_;L(this.getElement(),k);this.buttons_&&this.buttons_.attachToElement(this.buttonEl_)};
n.manageBackgroundDom_=function(){if(this.useIframeMask_&&this.modal_&&!this.bgIframeEl_){var a;this.bgIframeEl_=a=this.getDomHelper().createDom("iframe",{frameborder:0,style:"border: 0; vertical-align: bottom",src:'javascript:""'});this.bgIframeEl_.className=this.class_+"-bg";L(this.bgIframeEl_,k);qc(this.bgIframeEl_,0)}else if((!this.useIframeMask_||!this.modal_)&&this.bgIframeEl_){J(this.bgIframeEl_);this.bgIframeEl_=j}if(this.modal_&&!this.bgEl_){this.bgEl_=this.getDomHelper().createDom("div",
this.class_+"-bg");qc(this.bgEl_,this.backgroundElementOpacity_);L(this.bgEl_,k)}else if(!this.modal_&&this.bgEl_){J(this.bgEl_);this.bgEl_=j}};n.render=function(a){if(this.inDocument_)e(Error("Component already rendered"));this.getElement()||this.createDom();a=a||this.getDomHelper().document_.body;this.renderBackground_(a);Cd.superClass_.render.call(this,a)};n.renderBackground_=function(a){this.bgIframeEl_&&a.appendChild(this.bgIframeEl_);this.bgEl_&&a.appendChild(this.bgEl_)};
n.canDecorate=function(a){return a&&a.tagName&&a.tagName=="DIV"&&Cd.superClass_.canDecorate.call(this,a)};
n.decorateInternal=function(a){Cd.superClass_.decorateInternal.call(this,a);sb(this.getElement(),this.class_);a=this.class_+"-content";if(this.contentEl_=yb(j,a,this.getElement())[0])this.content_=this.contentEl_.innerHTML;else{this.contentEl_=this.getDomHelper().createDom("div",a);if(this.content_)this.contentEl_.innerHTML=this.content_;this.getElement().appendChild(this.contentEl_)}a=this.class_+"-title";var b=this.class_+"-title-text",c=this.class_+"-title-close";if(this.titleEl_=yb(j,a,this.getElement())[0]){this.titleTextEl_=
yb(j,b,this.titleEl_)[0];this.titleCloseEl_=yb(j,c,this.titleEl_)[0]}else{this.titleEl_=this.getDomHelper().createDom("div",a);this.getElement().insertBefore(this.titleEl_,this.contentEl_)}if(this.titleTextEl_)this.title_=Ob(this.titleTextEl_);else{this.titleTextEl_=this.getDomHelper().createDom("span",b,this.title_);this.titleEl_.appendChild(this.titleTextEl_)}od(this.getElement(),"labelledby",this.titleId_||"");if(!this.titleCloseEl_){this.titleCloseEl_=this.getDomHelper().createDom("span",c);this.titleEl_.appendChild(this.titleCloseEl_)}a=
this.class_+"-buttons";if(this.buttonEl_=yb(j,a,this.getElement())[0]){this.buttons_=new Dd(this.getDomHelper());this.buttons_.decorate(this.buttonEl_)}else{this.buttonEl_=this.getDomHelper().createDom("div",a);this.getElement().appendChild(this.buttonEl_);this.buttons_&&this.buttons_.attachToElement(this.buttonEl_)}this.manageBackgroundDom_();this.renderBackground_(E(this.getElement()).body);L(this.getElement(),k)};
n.enterDocument=function(){Cd.superClass_.enterDocument.call(this);if(this.draggable_&&!this.dragger_)this.dragger_=this.createDraggableTitleDom_();this.getHandler().listen(this.titleCloseEl_,"click",this.onTitleCloseClick_).listen(this.focusHandler_,"focusin",this.onFocus_);var a=this.getElement();if(C||nd){a.setAttribute("role","dialog");a.roleName="dialog"}this.titleTextEl_.id!==""&&od(this.getElement(),"labelledby",this.titleTextEl_.id)};
n.exitDocument=function(){this.isVisible()&&this.setVisible(k);if(this.dragger_){this.dragger_.dispose();this.dragger_=j}Cd.superClass_.exitDocument.call(this)};
n.setVisible=function(a){if(!(a==this.visible_)){var b=this.getDomHelper().document_,c=Db(b)||window;this.inDocument_||this.render(b.body);if(a){this.resizeBackground_();this.reposition();this.getHandler().listen(this.getElement(),"keydown",this.onKeyDown_,h).listen(c,"resize",this.onResize_,h)}else this.getHandler().unlisten(this.getElement(),"keydown",this.onKeyDown_,h).unlisten(c,"resize",this.onResize_,h);this.bgIframeEl_&&L(this.bgIframeEl_,a);this.bgEl_&&L(this.bgEl_,a);L(this.getElement(),
a);if(a){C&&this.getElement().focus();if(this.buttons_)if(c=this.buttons_.defaultButton_)for(var d=this.buttonEl_.getElementsByTagName("button"),f=0,g;g=d[f];f++)if(g.name==c){try{if(D||hb){var l=b.createElement("input");l.style.cssText="position:fixed;width:0;height:0";this.getElement().appendChild(l);l.focus();this.getElement().removeChild(l)}g.focus()}catch(m){}break}}if(this.visible_=a)this.getHandler().listen(this.buttonEl_,"click",this.onButtonClick_);else{this.getHandler().unlisten(this.buttonEl_,
"click",this.onButtonClick_);this.dispatchEvent("afterhide");this.disposeOnHide_&&this.dispose()}}};n.isVisible=function(){return this.visible_};
n.setDisposeOnHide=function(a){this.disposeOnHide_=a};n.disposeInternal=function(){Cd.superClass_.disposeInternal.call(this);if(this.focusHandler_){this.focusHandler_.dispose();this.focusHandler_=j}if(this.bgEl_){J(this.bgEl_);this.bgEl_=j}if(this.bgIframeEl_){J(this.bgIframeEl_);this.bgIframeEl_=j}this.tabCatcherEl_=this.buttonEl_=this.titleCloseEl_=j};n.setButtonSet=function(a){this.buttons_=a;this.buttonEl_&&this.buttons_.attachToElement(this.buttonEl_)};
n.onButtonClick_=function(a){if(a=this.findParentButton_(a.target)){a=a.name;var b=this.buttons_.get(a);this.dispatchEvent(new Ed(a,b))&&this.setVisible(k)}};n.findParentButton_=function(a){for(a=a;a!=j&&a!=this.buttonEl_;){if(a.tagName=="BUTTON")return a;a=a.parentNode}return j};
n.onKeyDown_=function(a){var b=this.buttons_;if(a.keyCode==27){var c=b&&b.cancelButton_;if(c){b=b.get(c);this.dispatchEvent(new Ed(c,b))&&this.setVisible(k)}else this.setVisible(k);a.stopPropagation()}else if(a.keyCode==13){if(a.target&&a.target.tagName=="BUTTON")c=a.target.name;else if(b){var d=(c=b.defaultButton_)&&b.getButton(c);c=d&&!d.disabled?c:j}if(c&&this.dispatchEvent(new Ed(c,String(b.get(c))))){this.setVisible(k);a.preventDefault()}a.stopPropagation()}else if(a.keyCode==9&&a.shiftKey&&
a.target==this.getElement()){a.preventDefault();a.stopPropagation()}};n.onResize_=function(){this.resizeBackground_()};n.onFocus_=function(a){this.tabCatcherEl_==a.target&&vd(this.focusElement_,0,this)};n.focusElement_=function(){B&&this.getDomHelper().document_.body.focus();this.getElement().focus()};var Ed=function(a,b){this.type="dialogselect";this.key=a;this.caption=b};y(Ed,M);var Dd=function(a){this.dom_=a||wb();Zc.call(this)},Bd;y(Dd,Zc);n=Dd.prototype;n.defaultButton_=j;n.element_=j;
n.cancelButton_=j;n.set=function(a,b,c,d){Zc.prototype.set.call(this,a,b);if(c)this.defaultButton_=a;if(d)this.cancelButton_=a;return this};n.attachToElement=function(a){this.element_=a;this.render()};n.render=function(){if(this.element_){this.element_.innerHTML="";var a=wb(this.element_);Uc(this,function(b,c){this.element_.appendChild(a.createDom("button",{name:c},b))},this)}};
n.decorate=function(a){if(!(!a||a.nodeType!=1)){this.element_=a;a=this.element_.getElementsByTagName("button");for(var b=0,c,d,f;c=a[b];b++){d=c.name||c.id;f=Ob(c)||c.value;d&&this.set(d,f,b==0,c.name=="cancel")}}};n.getButton=function(a){for(var b=this.getAllButtons(),c=0,d;d=b[c];c++)if(d.name==a||d.id==a)return d;return j};n.getAllButtons=function(){return this.element_.getElementsByTagName("BUTTON")};
(function(){(new Dd).set("ok","OK",h);Bd=(new Dd).set("ok","OK",h).set("cancel","Cancel",k,h);(new Dd).set("yes","Yes",h).set("no","No",k,h);(new Dd).set("yes","Yes").set("no","No",h).set("cancel","Cancel",k,h);(new Dd).set("continue","Continue").set("save","Save").set("cancel","Cancel",h,h)})();var Fd=function(a,b){Ad.call(this,b);this.label_=a||""};y(Fd,Ad);n=Fd.prototype;n.ffKeyRestoreValue_=j;n.createDom=function(){this.setElementInternal(this.getDomHelper().createDom("input",{type:"text"}))};n.decorateInternal=function(a){Fd.superClass_.decorateInternal.call(this,a);if(!this.label_)this.label_=a.getAttribute("label")||""};n.enterDocument=function(){Fd.superClass_.enterDocument.call(this);this.attachEvents_();this.check_();this.getElement().labelInput_=this};
n.exitDocument=function(){Fd.superClass_.exitDocument.call(this);this.detachEvents_();this.getElement().labelInput_=j};n.attachEvents_=function(){var a=new wd(this);a.listen(this.getElement(),"focus",this.handleFocus_);a.listen(this.getElement(),"blur",this.handleBlur_);C&&a.listen(this.getElement(),["keypress","keydown","keyup"],this.handleEscapeKeys_);var b=E(this.getElement());b=Db(b);a.listen(b,"load",this.handleWindowLoad_);this.eventHandler_=a;this.attachEventsToForm_()};
n.attachEventsToForm_=function(){if(!this.formAttached_&&this.eventHandler_&&this.getElement().form){this.eventHandler_.listen(this.getElement().form,"submit",this.handleFormSubmit_);this.formAttached_=h}};n.detachEvents_=function(){if(this.eventHandler_){this.eventHandler_.dispose();this.eventHandler_=j}};n.disposeInternal=function(){Fd.superClass_.disposeInternal.call(this);this.detachEvents_()};n.LABEL_CLASS_NAME="label-input-label";
n.handleFocus_=function(){this.hasFocus_=h;tb(this.getElement(),this.LABEL_CLASS_NAME);if(!this.hasChanged()&&!this.inFocusAndSelect_){var a=this,b=function(){a.getElement().value=""};B?vd(b,10):b()}};n.handleBlur_=function(){this.ffKeyRestoreValue_=j;this.hasFocus_=k;this.check_()};
n.handleEscapeKeys_=function(a){if(a.keyCode==27){if(a.type=="keydown")this.ffKeyRestoreValue_=this.getElement().value;else if(a.type=="keypress")this.getElement().value=this.ffKeyRestoreValue_;else if(a.type=="keyup")this.ffKeyRestoreValue_=j;a.preventDefault()}};n.handleFormSubmit_=function(){if(!this.hasChanged()){this.getElement().value="";vd(this.handleAfterSubmit_,10,this)}};n.handleAfterSubmit_=function(){if(!this.hasChanged())this.getElement().value=this.label_};n.handleWindowLoad_=function(){this.check_()};
n.hasChanged=function(){return this.getElement().value!=""&&this.getElement().value!=this.label_};n.clear=function(){this.getElement().value="";if(this.ffKeyRestoreValue_!=j)this.ffKeyRestoreValue_=""};n.setValue=function(a){if(this.ffKeyRestoreValue_!=j)this.ffKeyRestoreValue_=a;this.getElement().value=a;this.check_()};n.getValue=function(){if(this.ffKeyRestoreValue_!=j)return this.ffKeyRestoreValue_;return this.hasChanged()?this.getElement().value:""};
n.check_=function(){this.attachEventsToForm_();if(this.hasChanged())tb(this.getElement(),this.LABEL_CLASS_NAME);else{!this.inFocusAndSelect_&&!this.hasFocus_&&sb(this.getElement(),this.LABEL_CLASS_NAME);vd(this.restoreLabel_,10,this)}};n.restoreLabel_=function(){if(this.getElement()&&!this.hasChanged())this.getElement().value=this.label_};var Gd=function(a,b,c,d,f){this.defaultMessage_=b;this.errorMessage_=c;this.columns_=d;this.rows_=f;this.textBox_=f===1?I("input",{size:this.columns_}):I("textarea",{cols:this.columns_,rows:this.rows_});this.errorDiv_=I("div",{"class":"text_box_error",style:"display:none"},this.errorMessage_);a.appendChild(this.textBox_);a.appendChild(this.errorDiv_);this.input_=new Fd(this.defaultMessage_);this.input_.setElementInternal(this.textBox_);this.input_.enterDocument()};p("_G3DWH_TextBoxWithError",Gd,undefined);
Gd.prototype.getFieldValue=function(){return this.input_.getValue()};p("_G3DWH_getFieldValue",Pb.getFieldValue,undefined);Gd.prototype.displayError=function(a){T.showHideElement(this.errorDiv_,a)};p("_G3DWH_displayError",Pb.displayError,undefined);Gd.prototype.setFieldValue=function(a){return this.input_.setValue(a)};p("_G3DWH_setFieldValue",Pb.setFieldValue,undefined);Gd.prototype.getTextBox=function(){return this.textBox_};p("_G3DWH_getTextBox",Pb.getTextBox,undefined);var Hd=function(a,b,c,d,f,g,l,m,t,q,r,w,H,K){this.submitUrl_=a;this.title_=b;this.appealCommentHint_=c;this.submitButtonText_=d;this.cancelButtonText_=f;this.maxStringLength_=g;this.appealSelectError_=l;this.securityTokenParam_=m;this.securityTokenValue_=t;this.removeUrlMsg_=q;this.rejectedMsg_=r;this.errorMsg_=w;this.appealReceivedTitle_=H;this.modelDetailsUrl_=K;this.commentFields_=[];this.supportUrlFields_=[];this.urlDivs_=[];this.validUrlIndices_=[]};p("_G3DWH_AppealUI",Hd,undefined);
Hd.prototype.buildAppealDialog_=function(){this.appealDialog=new Cd;this.appealDialog.setDisposeOnHide(h);this.appealDialog.setContent(G("appeal_template").innerHTML.replace(/__APPEAL_REASON__/g,"appeal_reason_").replace(/__APPEAL_COMMENT__/g,"appeal_comment_").replace(/__ADD_URLS_TOP_MESSAGE__/g,"add_urls_top_message").replace(/__SUPPORT_URLS__/g,"support_urls").replace(/__ADDITIONAL_URL_LINKS__/g,"additional_url_links"));this.appealDialog.setTitle(this.title_);var a=new Dd;a.set("submit_btn",this.submitButtonText_,
h,k);a.set("cancel",this.cancelButtonText_,k,h);this.appealDialog.setButtonSet(a);this.appealDialog.setDraggable(h);a=x(function(b){if(b.key!=="cancel"){b.stopPropagation();b.preventDefault();this.checkSubmit()&&this.saveAppeal()}},this);O(this.appealDialog,"dialogselect",a);return this.appealDialog};Hd.prototype.displayAppealDialog=function(){this.buildAppealDialog_();this.appealDialog.setVisible(h);this.initCommentFields();return k};
p("_G3DWH_AppealUI.prototype.displayAppealDialog",Hd.prototype.displayAppealDialog,undefined);Hd.prototype.initCommentFields=function(){for(var a=yb("textarea"),b=0;b<a.length;b++){var c=G(a[b].id);if(c.id.search("appeal_comment_")===0){var d=new Fd(this.appealCommentHint_);d.setElementInternal(c);d.enterDocument()}}};Hd.prototype.addCommentField=function(a){a=G(a);this.commentFields_.push(new Gd(a,this.appealCommentHint_,this.errorMsg_,65,2))};
p("_G3DWH_AppealUI.prototype.addCommentField",Hd.prototype.addCommentField,undefined);
Hd.prototype.addSupportUrlField=function(){var a=this.supportUrlFields_.length,b=I("div",{style:"padding-bottom:2px"}),c=I("input",{type:"text",maxwidth:this.maxCommentLength_,style:"width:90%"});c.style.width="90%";var d=I("a",{href:"#appeal_template"},this.removeUrlMsg_);O(d,"click",x(this.removeSupportUrlField,this,a));if(this.validUrlIndices_.length===0){T.showHideElement(G("add_urls_top_message"),k);T.showHideElement(G("additional_url_links"),h)}this.supportUrlFields_[a]=c;this.validUrlIndices_.push(a);
this.urlDivs_[a]=b;b.appendChild(c);b.appendChild(d);G("support_urls").appendChild(b)};p("_G3DWH_AppealUI.prototype.addSupportUrlField",Hd.prototype.addSupportUrlField,undefined);n=Hd.prototype;
n.removeSupportUrlField=function(a){G("support_urls").removeChild(this.urlDivs_[a]);for(var b=0;b<this.validUrlIndices_.length;b++)if(this.validUrlIndices_[b]===a){this.validUrlIndices_.splice(b,1);break}if(this.validUrlIndices_.length===0){T.showHideElement(G("add_urls_top_message"),h);T.showHideElement(G("additional_url_links"),k)}return k};
n.checkSubmit=function(){for(var a=h,b=yb("select"),c=0;c<b.length;c++){var d=b[c];if(d.id.search("appeal_reason_")===0)if(d.selectedIndex===0){a=k;alert(this.appealSelectError_);break}}return a};n.submitCallback_=function(a){if(a.type=="complete"){a=a.target;if(a.isSuccess()){this.appealDialog.setVisible(k);this.showAppealReceivedDialog()}else a.getStatus()==400?alert(this.rejectedMsg_):alert(this.errorMsg_)}};
n.getAppealMasks=function(){for(var a=yb("select"),b=[],c=[],d=0;d<a.length;d++){var f=G(a[d].id);if(f!=j&&f.id.search("appeal_reason_")===0){b.push(f.id.substring(14));c.push(f.value)}}return new Array(b.join(","),c.join(","))};n.getConcatenatedStringFieldsFromPrefix=function(a){for(var b=yb("textarea"),c=[],d=0;d<b.length;d++){var f=G(b[d].id);f.id.search(a)===0&&c.push(f.value)}return c.join("___")};
n.saveAppeal=function(){var a=new R(this.submitUrl_),b=new S,c=this.getAppealMasks();b.add("rejection_masks",c[0]);b.add("appeal_reasons",c[1]);yb("textarea",j,G("appeal_template"));c=this.getConcatenatedStringFieldsFromPrefix("appeal_comment_");b.add("appeal_comments",c);c=[];for(var d=0;d<this.validUrlIndices_.length;d++)c.push(this.supportUrlFields_[this.validUrlIndices_[d]].getFieldValue());b.add("appeal_urls",c.join("___"));b.add(this.securityTokenParam_,this.securityTokenValue_);Id(a.toString(),
x(this.submitCallback_,this),"POST",b.toString())};
n.showAppealReceivedDialog=function(){if(!this.appealReceivedDialog){this.appealReceivedDialog=new Cd;this.appealDialog.setDisposeOnHide(k);var a=G("appeal_received_template").innerHTML;this.appealReceivedDialog.setContent(a);this.appealReceivedDialog.setTitle(this.appealReceivedTitle_);this.appealReceivedDialog.setButtonSet(new Dd);this.appealReceivedDialog.setDraggable(h);a=x(function(){window.location=this.modelDetailsUrl_},this);O(this.appealReceivedDialog.getTitleCloseElement(),"click",a)}this.appealReceivedDialog.setVisible(h)};window.reportOnLoad=function(a){function b(){var c=window.jstiming.load;c.tick("ol");c.name=a;window.jstiming.report(c)}if(window.attachEvent)window.attachEvent("onload",b);else window.addEventListener&&window.addEventListener("load",b,k)};var Jd=function(a){this.map_=new Zc;a&&this.addAll(a)},Kd=function(a){var b=typeof a;return b=="object"&&a||b=="function"?"o"+v(a):b.substr(0,1)+a};n=Jd.prototype;n.add=function(a){this.map_.set(Kd(a),a)};n.addAll=function(a){a=Sc(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};n.removeAll=function(a){a=Sc(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};n.remove=function(a){return this.map_.remove(Kd(a))};n.clear=function(){this.map_.clear()};n.contains=function(a){return this.map_.containsKey(Kd(a))};
n.intersection=function(a){var b=new Jd;a=Sc(a);for(var c=0;c<a.length;c++){var d=a[c];this.contains(d)&&b.add(d)}return b};n.getValues=function(){return this.map_.getValues()};n.clone=function(){return new Jd(this)};n.__iterator__=function(){return this.map_.__iterator__(k)};var Md=function(a,b){try{var c,d=ba("window.location.href");c=typeof a=="string"?{message:a,name:"Unknown error",lineNumber:"Not available",fileName:d,stack:"Not available"}:!a.lineNumber||!a.fileName||!a.stack?{message:a.message,name:a.name,lineNumber:a.lineNumber||a.line||"Not available",fileName:a.fileName||a.filename||a.sourceURL||d,stack:a.stack||"Not available"}:a;return"Message: "+Qa(c.message)+'\nUrl: <a href="view-source:'+c.fileName+'" target="_new">'+c.fileName+"</a>\nLine: "+c.lineNumber+
"\n\nBrowser stack:\n"+Qa(c.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Qa(Ld(b)+"-> ")}catch(f){return"Exception trying to expose exception! You win, we lose. "+f}},Ld=function(a){return Nd(a||arguments.callee.caller,[])},Nd=function(a,b){var c=[];if(qa(b,a))c.push("[...circular reference...]");else if(a&&b.length<50){c.push(Od(a)+"(");for(var d=a.arguments,f=0;f<d.length;f++){f>0&&c.push(", ");var g;g=d[f];switch(typeof g){case "object":g=g?"object":"null";break;case "string":g=g;break;case "number":g=
String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=Od(g))?g:"[fn]";break;case "undefined":default:g=typeof g;break}if(g.length>40)g=g.substr(0,40)+"...";c.push(g)}b.push(a);c.push(")\n");try{c.push(Nd(a.caller,b))}catch(l){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Od=function(a){a=String(a);if(!Pd[a]){var b=/function ([^\(]+)/.exec(a);Pd[a]=b?b[1]:"[Anonymous]"}return Pd[a]},Pd={};var Rd=function(a,b,c,d,f){this.sequenceNumber_=typeof f=="number"?f:Qd++;this.time_=d||na();this.level_=a;this.msg_=b;this.loggerName_=c};Rd.prototype.exception_=j;Rd.prototype.exceptionText_=j;var Qd=0;Rd.prototype.setException=function(a){this.exception_=a};Rd.prototype.setExceptionText=function(a){this.exceptionText_=a};Rd.prototype.setLevel=function(a){this.level_=a};var Sd=function(a){this.name_=a;this.parent_=j;this.children_={};this.handlers_=[]};Sd.prototype.level_=j;var Td=function(a,b){this.name=a;this.value=b};Td.prototype.toString=function(){return this.name};new Td("OFF",Infinity);new Td("SHOUT",1200);new Td("SEVERE",1000);var Ud=new Td("WARNING",900);new Td("INFO",800);var Vd=new Td("CONFIG",700),Wd=new Td("FINE",500);new Td("FINER",400);var Xd=new Td("FINEST",300);new Td("ALL",0);n=Sd.prototype;n.setLevel=function(a){this.level_=a};
n.isLoggable=function(a){if(this.level_)return a.value>=this.level_.value;if(this.parent_)return this.parent_.isLoggable(a);return k};n.log=function(a,b,c){this.isLoggable(a)&&this.logRecord(this.getLogRecord(a,b,c))};n.getLogRecord=function(a,b,c){var d=new Rd(a,String(b),this.name_);if(c){d.setException(c);d.setExceptionText(Md(c,arguments.callee.caller))}return d};n.warning=function(a,b){this.log(Ud,a,b)};n.fine=function(a,b){this.log(Wd,a,b)};n.finest=function(a,b){this.log(Xd,a,b)};
n.logRecord=function(a){if(this.isLoggable(a.level_))for(var b=this;b;){b.callPublish_(a);b=b.parent_}};n.callPublish_=function(a){for(var b=0;b<this.handlers_.length;b++)this.handlers_[b](a)};n.setParent_=function(a){this.parent_=a};n.addChild_=function(a,b){this.children_[a]=b};
var Yd={},Zd=j,ae=function(a){if(!Zd){Zd=new Sd("");Yd[""]=Zd;Zd.setLevel(Vd)}return a in Yd?Yd[a]:$d(a)},$d=function(a){var b=new Sd(a),c=a.split("."),d=c[c.length-1];c.length=c.length-1;c=c.join(".");c=ae(c);c.addChild_(d,b);b.setParent_(c);return Yd[a]=b};var be=function(a){a=String(a);var b;b=/^\s*$/.test(a)?k:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x10-\x1f\x80-\x9f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""));if(b)try{return eval("("+a+")")}catch(c){}e(Error("Invalid JSON string: "+a))},ce=function(){};ce.prototype.serialize=function(a){var b=[];this.serialize_(a,b);return b.join("")};
ce.prototype.serialize_=function(a,b){switch(typeof a){case "string":this.serializeString_(a,b);break;case "number":this.serializeNumber_(a,b);break;case "boolean":b.push(a);break;case "undefined":b.push("null");break;case "object":if(a==j){b.push("null");break}if(s(a)){this.serializeArray_(a,b);break}this.serializeObject_(a,b);break;case "function":break;default:e(Error("Unknown type: "+typeof a))}};
var de={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},ee=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;ce.prototype.serializeString_=function(a,b){b.push('"',a.replace(ee,function(c){if(c in de)return de[c];var d=c.charCodeAt(0),f="\\u";if(d<16)f+="000";else if(d<256)f+="00";else if(d<4096)f+="0";return de[c]=f+d.toString(16)}),'"')};
ce.prototype.serializeNumber_=function(a,b){b.push(isFinite(a)&&!isNaN(a)?a:"null")};ce.prototype.serializeArray_=function(a,b){var c=a.length;b.push("[");for(var d="",f=0;f<c;f++){b.push(d);this.serialize_(a[f],b);d=","}b.push("]")};ce.prototype.serializeObject_=function(a,b){b.push("{");var c="";for(var d in a)if(a.hasOwnProperty(d)){var f=a[d];if(typeof f!="function"){b.push(c);this.serializeString_(d,b);b.push(":");this.serialize_(f,b);c=","}}b.push("}")};var fe=function(){if(C){this.contextsToXhr_={};this.xhrToContexts_={};this.stack_=[]}};n=fe.prototype;n.logger_=ae("goog.net.xhrMonitor");n.pushContext=function(a){if(C){var b=u(a)?a:ha(a)?v(a):"";this.logger_.finest("Pushing context: "+a+" ("+b+")");this.stack_.push(b)}};n.popContext=function(){if(C){var a=this.stack_.pop();this.logger_.finest("Popping context: "+a);this.updateDependentContexts_(a)}};
n.markXhrOpen=function(a){if(C){a=v(a);this.logger_.fine("Opening XHR : "+a);for(var b=0;b<this.stack_.length;b++){var c=this.stack_[b];this.addToMap_(this.contextsToXhr_,c,a);this.addToMap_(this.xhrToContexts_,a,c)}}};n.markXhrClosed=function(a){if(C){a=v(a);this.logger_.fine("Closing XHR : "+a);delete this.xhrToContexts_[a];for(var b in this.contextsToXhr_){ta(this.contextsToXhr_[b],a);this.contextsToXhr_[b].length==0&&delete this.contextsToXhr_[b]}}};
n.updateDependentContexts_=function(a){var b=this.xhrToContexts_[a],c=this.contextsToXhr_[a];if(b&&c){this.logger_.finest("Updating dependent contexts");pa(b,function(d){pa(c,function(f){this.addToMap_(this.contextsToXhr_,d,f);this.addToMap_(this.xhrToContexts_,f,d)},this)},this)}};n.addToMap_=function(a,b,c){a[b]||(a[b]=[]);qa(a[b],c)||a[b].push(c)};var ge=new fe;var ie=function(){return he()},he=j,je=j,ke=j;(function(a,b){he=a;je=b;ke=j})(function(){var a=le();return a?new ActiveXObject(a):new XMLHttpRequest},function(){var a={};if(le()){a[0]=h;a[1]=h}return a});var me=j,le=function(){if(!me&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);return me=c}catch(d){}}e(Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed"))}return me};var V=function(){U.call(this);this.headers=new Zc};y(V,U);V.prototype.logger_=ae("goog.net.XhrIo");var ne=[],Id=function(a,b,c,d,f,g){var l=new V;ne.push(l);b&&O(l,"complete",b);O(l,"ready",la(oe,l));g&&l.setTimeoutInterval(g);l.send(a,c,d,f)},pe=function(){for(;ne.length;)ne.pop().dispose()},qe=function(a,b){V.prototype.onReadyStateChangeEntryPoint_=a.protectEntryPoint(V.prototype.onReadyStateChangeEntryPoint_,b)},oe=function(a){a.dispose();ta(ne,a)};n=V.prototype;n.active_=k;n.xhr_=j;
n.xhrOptions_=j;n.lastUri_="";n.lastMethod_="";n.lastErrorCode_=0;n.lastError_="";n.errorDispatched_=k;n.inSend_=k;n.inOpen_=k;n.inAbort_=k;n.timeoutInterval_=0;n.timeoutId_=j;n.setTimeoutInterval=function(a){this.timeoutInterval_=Math.max(0,a)};
n.send=function(a,b,c,d){if(this.active_)e(Error("[goog.net.XhrIo] Object is active with another request"));b=b||"GET";this.lastUri_=a;this.lastError_="";this.lastErrorCode_=0;this.lastMethod_=b;this.errorDispatched_=k;this.active_=h;this.xhr_=new ie;this.xhrOptions_=ke||(ke=je());ge.markXhrOpen(this.xhr_);this.xhr_.onreadystatechange=x(this.onReadyStateChange_,this);try{this.logger_.fine(this.formatMsg_("Opening Xhr"));this.inOpen_=h;this.xhr_.open(b,a,h);this.inOpen_=k}catch(f){this.logger_.fine(this.formatMsg_("Error opening Xhr: "+
f.message));this.error_(5,f);return}a=c||"";var g=this.headers.clone();d&&Uc(d,function(m,t){g.set(t,m)});b=="POST"&&!g.containsKey("Content-Type")&&g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Uc(g,function(m,t){this.xhr_.setRequestHeader(t,m)},this);try{if(this.timeoutId_){ud.clearTimeout(this.timeoutId_);this.timeoutId_=j}if(this.timeoutInterval_>0){this.logger_.fine(this.formatMsg_("Will abort after "+this.timeoutInterval_+"ms if incomplete"));this.timeoutId_=ud.setTimeout(x(this.timeout_,
this),this.timeoutInterval_)}this.logger_.fine(this.formatMsg_("Sending request"));this.inSend_=h;this.xhr_.send(a);this.inSend_=k}catch(l){this.logger_.fine(this.formatMsg_("Send error: "+l.message));this.error_(5,l)}};n.dispatchEvent=function(a){if(this.xhr_){ge.pushContext(this.xhr_);try{V.superClass_.dispatchEvent.call(this,a)}finally{ge.popContext()}}else V.superClass_.dispatchEvent.call(this,a)};
n.timeout_=function(){if(!(typeof aa=="undefined"))if(this.xhr_){this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting";this.lastErrorCode_=8;this.logger_.fine(this.formatMsg_(this.lastError_));this.dispatchEvent("timeout");this.abort(8)}};n.error_=function(a,b){this.active_=k;if(this.xhr_){this.inAbort_=h;this.xhr_.abort();this.inAbort_=k}this.lastError_=b;this.lastErrorCode_=a;this.dispatchErrors_();this.cleanUpXhr_()};
n.dispatchErrors_=function(){if(!this.errorDispatched_){this.errorDispatched_=h;this.dispatchEvent("complete");this.dispatchEvent("error")}};n.abort=function(a){if(this.xhr_){this.logger_.fine(this.formatMsg_("Aborting"));this.active_=k;this.inAbort_=h;this.xhr_.abort();this.inAbort_=k;this.lastErrorCode_=a||7;this.dispatchEvent("complete");this.dispatchEvent("abort");this.cleanUpXhr_()}};
n.disposeInternal=function(){if(this.xhr_){if(this.active_){this.active_=k;this.inAbort_=h;this.xhr_.abort();this.inAbort_=k}this.cleanUpXhr_(h)}V.superClass_.disposeInternal.call(this)};n.onReadyStateChange_=function(){!this.inOpen_&&!this.inSend_&&!this.inAbort_?this.onReadyStateChangeEntryPoint_():this.onReadyStateChangeHelper_()};n.onReadyStateChangeEntryPoint_=function(){this.onReadyStateChangeHelper_()};
n.onReadyStateChangeHelper_=function(){if(this.active_)if(!(typeof aa=="undefined"))if(this.xhrOptions_[1]&&this.getReadyState()==4&&this.getStatus()==2)this.logger_.fine(this.formatMsg_("Local request error detected and ignored"));else if(this.inSend_&&this.getReadyState()==4)ud.setTimeout(x(this.onReadyStateChange_,this),0);else{this.dispatchEvent("readystatechange");if(this.isComplete()){this.logger_.fine(this.formatMsg_("Request complete"));this.active_=k;if(this.isSuccess()){this.dispatchEvent("complete");
this.dispatchEvent("success")}else{this.lastErrorCode_=6;this.lastError_=this.getStatusText()+" ["+this.getStatus()+"]";this.dispatchErrors_()}this.cleanUpXhr_()}}};n.cleanUpXhr_=function(a){if(this.xhr_){this.xhr_.onreadystatechange=this.xhrOptions_[0]?ca:j;var b=this.xhr_;this.xhrOptions_=this.xhr_=j;if(this.timeoutId_){ud.clearTimeout(this.timeoutId_);this.timeoutId_=j}if(!a){ge.pushContext(b);this.dispatchEvent("ready");ge.popContext()}ge.markXhrClosed(b)}};
n.isComplete=function(){return this.getReadyState()==4};n.isSuccess=function(){switch(this.getStatus()){case 0:case 200:case 204:case 304:return h;default:return k}};n.getReadyState=function(){return this.xhr_?this.xhr_.readyState:0};n.getStatus=function(){try{return this.getReadyState()>2?this.xhr_.status:-1}catch(a){this.logger_.warning("Can not get status: "+a.message);return-1}};
n.getStatusText=function(){try{return this.getReadyState()>2?this.xhr_.statusText:""}catch(a){this.logger_.fine("Can not get status: "+a.message);return""}};n.getResponseText=function(){return this.xhr_?this.xhr_.responseText:""};n.getResponseXml=function(){return this.xhr_?this.xhr_.responseXML:j};n.getResponseJson=function(){return this.xhr_?be(this.xhr_.responseText):undefined};n.getResponseHeader=function(a){return this.xhr_&&this.isComplete()?this.xhr_.getResponseHeader(a):undefined};
n.formatMsg_=function(a){return a+" ["+this.lastMethod_+" "+this.lastUri_+" "+this.getStatus()+"]"};V.send=Id;V.cleanup=pe;V.protectEntryPoints=qe;V.cleanupSend_=oe;V.CONTENT_TYPE_HEADER="Content-Type";V.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";V.sendInstances_=ne;var re=function(a,b,c,d,f,g){this.modelIdParam_=b;this.localeParam_=c;this.locale_=d;this.bubbleDetailUri_=new R(f);this.bubbleDetailUri_.setParameterValue(c,d);this.sourceUri_=new R(a);this.sourceUri_.setParameterValue(this.localeParam_,this.locale_);this.errorMsg_=g};n=re.prototype;n.map_=j;n.setMap=function(a){this.map_=a};n.createMap=function(a,b,c){a=F(a);this.map_=new GMap2(a,{mapTypes:b});if(c)for(b=0;b<c.length;b++)this.map_.addControl(c[b]);O(window,"unload",this.unload,h,this)};
n.refreshPlacemarks=function(a,b){var c=this;V.send((b||this.sourceUri_).toString(),function(d){if(d.type=="complete")if(d.target.isSuccess()){d=d.target.getResponseXml();a(d)}else c.handleMapError(c.errorMsg_)})};n.displayPlacemarkBubble=function(a,b){var c=new R(this.bubbleDetailUri_);c.setParameterValue(this.modelIdParam_,b);var d=this;V.send(c.toString(),function(f){if(f.type=="complete")f.target.isSuccess()?a.openInfoWindowHtml(f.target.getResponseText(),{maxWidth:d.maxBubbleWidth_}):d.handleMapError(d.errorMsg_)})};
n.handleMapError=function(a){window.console&&window.console.log("Model map error: "+a)};n.unload=function(){GUnload()};var se=function(a,b,c,d,f,g,l,m,t,q,r,w){re.call(this,a,b,c,d,f,g);this.displayDelay_=l;a=T.isEarthPluginCompatible();this.earthFeatureEnabled=m&&a;this.useEarth=t&&a;this.firstMarkerPlaced_=k;this.sortParam=q;this.sortOptions=r;this.initialSort=w};y(se,re);p("_G3DWH_CyclingModelMap",se,undefined);
se.prototype.initMap=function(a,b){var c=Bb(),d=F(a);d.style.width=c.width-50;d.style.height=c.height-225;d.style.marginLeft=25;this.maxBubbleWidth_=c.width*b;this.createMap(a,this.earthFeatureEnabled?[G_HYBRID_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]:[G_HYBRID_MAP,G_PHYSICAL_MAP],[new GMapTypeControl,new GSmallMapControl,new GScaleControl]);this.map_.setCenter(new GLatLng(0,0),2);GEvent.addListener(this.map_,"maptypechanged",x(this.mapTypeChanged,this));this.earthFeatureEnabled&&this.useEarth&&this.map_.setMapType(G_SATELLITE_3D_MAP);
this.updateSortLinks(this.initialSort);for(a=0;a<this.sortOptions.length;a++)O(F("sort"+this.sortOptions[a]),"click",x(this.changeSortOption,this,this.sortOptions[a]));this.showModels()};p("_G3DWH_CyclingModelMap.prototype.initMap",se.prototype.initMap,undefined);se.prototype.changeSortOption=function(a){this.pauseMapView();this.sourceUri_.setParameterValue(this.sortParam,a);this.updateSortLinks(a);this.showModels()};
se.prototype.updateSortLinks=function(a){for(var b=0;b<this.sortOptions.length;b++){var c="sort"+this.sortOptions[b],d=F(c+"_current");c=F(c);if(this.sortOptions[b]===a){L(d,h);L(c,k)}else{L(d,k);L(c,h)}}};se.prototype.playMapView=function(){this.map_.clearOverlays();this.showModels()};p("_G3DWH_CyclingModelMap.prototype.playMapView",se.prototype.playMapView,undefined);se.prototype.pauseMapView=function(){this.displayTimer_!=j&&o.clearTimeout(this.displayTimer_)};
p("_G3DWH_CyclingModelMap.prototype.pauseMapView",se.prototype.pauseMapView,undefined);n=se.prototype;n.showModels=function(){this.refreshPlacemarks(x(this.displayModels,this))};n.displayModels=function(a){this.map_.clearOverlays();a=a.getElementsByTagName("placemark");a.length>0&&this.displayModel(0,a)};n.mapTypeChanged=function(){this.currentMarker_&&this.map_.getCurrentMapType()==G_SATELLITE_3D_MAP&&this.map_.getEarthInstance(x(this.moveCameraToPlacemark,this,this.currentMarker_))};
n.moveCameraToPlacemark=function(a,b){if(b){a=a.getLatLng();var c=b.getView().copyAsLookAt(b.ALTITUDE_RELATIVE_TO_GROUND);c.setLatitude(a.lat());c.setLongitude(a.lng());b.getView().setAbstractView(c)}};n.placeMarker=function(a,b){this.map_.addOverlay(a);this.displayPlacemarkBubble(a,b)};n.placeMarkerOnEarth=function(a,b,c){if(c){c.setBalloon(j);this.moveCameraToPlacemark(a,c);o.setTimeout(x(this.placeMarker,this,a,b),1000)}};
n.displayModel=function(a,b){var c=this;if(a<b.length){this.currentMarker_=j;this.map_.clearOverlays();var d=b.item(a),f=T.getSingleValue(d,"id"),g=parseFloat(T.getSingleValue(d,"latitude"));d=parseFloat(T.getSingleValue(d,"longitude"));g=new GLatLng(g,d);this.currentMarker_=d=new GMarker(g,{});if(this.map_.getCurrentMapType()==G_SATELLITE_3D_MAP){if(this.useEarth&&!this.firstMarkerPlaced_){this.map_.setCenter(g);this.firstMarkerPlaced_=h}this.map_.getEarthInstance(x(this.placeMarkerOnEarth,this,
d,f))}else this.placeMarker(d,f);this.displayTimer_=o.setTimeout(function(){c.displayModel(a+1,b)},c.displayDelay_)}else this.showModels()};var te=function(a,b){this.configurableUIEnabled_=a;this.embeddableUrl_=b};p("_G3DWH_Embed",te,undefined);te.prototype.update=function(a){var b=this.embeddableUrl_;if(this.configurableUIEnabled_)b+="&etyp="+a;b+="&width=400&height=300";a="<iframe src='"+b+"' frameborder='0' scrolling='no' ";a+="marginheight='0' marginwidth='0' ";a+="width='400' height='300'></iframe>";G("revealedHtmlText").value=a};p("_G3DWH_Embed.prototype.update",te.prototype.update,undefined);var ue=function(a){return a*Math.PI/180};var ve=function(a){return 1-Math.pow(1-a,3)},we=function(a){return 3*a*a-2*a*a*a},xe=function(a,b,c,d){U.call(this);if(!s(a)||!s(b))e(Error("Start and end parameters must be arrays"));if(a.length!=b.length)e(Error("Start and end points must be the same length"));this.startPoint=a;this.endPoint=b;this.duration=c;this.accel=d;this.coords=[]};y(xe,U);
var ye={},ze=j,Ae=function(){ud.clearTimeout(ze);var a=na();for(var b in ye)ye[b].cycle(a);ze=Ca(ye)?j:ud.setTimeout(Ae,20)},Be=function(a){a=v(a);delete ye[a];if(ze&&Ca(ye)){ud.clearTimeout(ze);ze=j}};n=xe.prototype;n.state_=0;n.fps_=0;n.progress=0;n.startTime=j;n.endTime=j;n.lastFrame=j;
n.play=function(a){if(a||this.state_==0){this.progress=0;this.coords=this.startPoint}else if(this.state_==1)return k;Be(this);this.startTime=na();if(this.state_==-1)this.startTime-=this.duration*this.progress;this.endTime=this.startTime+this.duration;this.lastFrame=this.startTime;this.progress||this.onBegin();this.onPlay();this.state_==-1&&this.onResume();this.state_=1;a=v(this);a in ye||(ye[a]=this);ze||(ze=ud.setTimeout(Ae,20));this.cycle(this.startTime);return h};
n.stop=function(a){Be(this);this.state_=0;if(a)this.progress=1;this.updateCoords_(this.progress);this.onStop();this.onEnd()};n.pause=function(){if(this.state_==1){Be(this);this.state_=-1;this.onPause()}};n.disposeInternal=function(){this.state_!=0&&this.stop(k);this.onDestroy();xe.superClass_.disposeInternal.call(this)};
n.cycle=function(a){this.progress=(a-this.startTime)/(this.endTime-this.startTime);if(this.progress>=1)this.progress=1;this.fps_=1000/(a-this.lastFrame);this.lastFrame=a;ga(this.accel)?this.updateCoords_(this.accel(this.progress)):this.updateCoords_(this.progress);if(this.progress==1){this.state_=0;Be(this);this.onFinish();this.onEnd()}else this.state_==1&&this.onAnimate()};
n.updateCoords_=function(a){this.coords=new Array(this.startPoint.length);for(var b=0;b<this.startPoint.length;b++)this.coords[b]=(this.endPoint[b]-this.startPoint[b])*a+this.startPoint[b]};n.onAnimate=function(){this.dispatchAnimationEvent_("animate")};n.onBegin=function(){this.dispatchAnimationEvent_("begin")};n.onDestroy=function(){this.dispatchAnimationEvent_("destroy")};n.onEnd=function(){this.dispatchAnimationEvent_("end")};n.onFinish=function(){this.dispatchAnimationEvent_("finish")};
n.onPause=function(){this.dispatchAnimationEvent_("pause")};n.onPlay=function(){this.dispatchAnimationEvent_("play")};n.onResume=function(){this.dispatchAnimationEvent_("resume")};n.onStop=function(){this.dispatchAnimationEvent_("stop")};n.dispatchAnimationEvent_=function(a){this.dispatchEvent(new Ce(a,this))};
var Ce=function(a,b){M.call(this,a);this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.progress=b.progress;this.fps=b.fps_;this.state=b.state_;this.anim=b};y(Ce,M);var De=function(a,b,c,d,f){xe.call(this,b,c,d,f);this.element=a};y(De,xe);De.prototype.updateStyle=ca;De.prototype.onAnimate=function(){this.updateStyle();De.superClass_.onAnimate.call(this)};De.prototype.onEnd=function(){this.updateStyle();De.superClass_.onEnd.call(this)};De.prototype.onBegin=function(){this.updateStyle();De.superClass_.onBegin.call(this)};var Ee=function(a,b,c,d,f){if(typeof b=="number")b=[b];if(typeof c=="number")c=[c];De.call(this,a,b,c,d,f);if(b.length!=1||c.length!=1)e(Error("Start and end points must be 1D"))};
y(Ee,De);Ee.prototype.updateStyle=function(){qc(this.element,this.coords[0])};Ee.prototype.show=function(){this.element.style.display=""};Ee.prototype.hide=function(){this.element.style.display="none"};var Fe=function(a,b,c){Ee.call(this,a,1,0,b,c)};y(Fe,Ee);Fe.prototype.onBegin=function(){this.show();Fe.superClass_.onBegin.call(this)};Fe.prototype.onEnd=function(){this.hide();Fe.superClass_.onEnd.call(this)};var Ge=function(a,b){this.sectionIds=a;this.contentUri=b;this.fetchCount=this.currentSection=0;this.pendingContent={}};p("_G3DWH_FeaturedRotation",Ge,undefined);Ge.prototype.start=function(){var a=G("section_container");O(a,"mouseover",x(this.pause,this),h);O(a,"mouseout",x(this.resumeAfterDelay,this),h);for(a=0;a<this.sectionIds.length;a++){var b=G(this.getSectionHeaderId(a));O(b,"click",x(this.switchSections,this,a),h)}this.startTimer()};
p("_G3DWH_FeaturedRotation.prototype.start",Ge.prototype.start,undefined);n=Ge.prototype;n.pause=function(){if(this.rotationTimer){o.clearTimeout(this.rotationTimer);this.rotationTimer=j}if(this.resumeTimer){o.clearTimeout(this.resumeTimer);this.resumeTimer=j}L(G("paused"),h);return h};n.resumeAfterDelay=function(){this.resumeTimer=o.setTimeout(x(this.resume,this),250)};n.resume=function(){this.startTimer();L(G("paused"),k);var a=G("resuming");L(a,h);(new Fe(a,1000)).play();return h};
n.switchSections=function(a,b){if(!(a==this.currentSection)){this.startTimer();var c=this.sectionIds[a];if(!b&&this.pendingContent[c]){G(c).innerHTML=this.pendingContent[c];this.pendingContent[c]=j}b=new He(G(this.sectionIds[a]),G(this.sectionIds[this.currentSection]),60);ub(G(this.getSectionHeaderId(this.currentSection)),"feature_header_current","feature_header_link");this.currentSection=a;ub(G(this.getSectionHeaderId(this.currentSection)),"feature_header_link","feature_header_current");b.play()}};
n.rotate=function(){var a=(this.currentSection+1)%this.sectionIds.length;this.switchSections(a);if(this.fetchCount<3&&a==this.sectionIds.length-1){this.fetchCount++;a=new R(this.contentUri);a.setParameterValue("reqct",this.fetchCount);V.send(a.toString(),x(this.handleNewContent,this))}};
n.handleNewContent=function(a){if(a.type=="complete"){var b=a.target;if(b.isSuccess()){a=document.createElement("div");a.innerHTML=b.getResponseText();for(b=0;b<this.sectionIds.length;b++)for(var c=this.sectionIds[b],d=a.firstChild;d;d=d.nextSibling)if(d.id&&d.id===c)this.pendingContent[c]=d.innerHTML}}};n.getSectionHeaderId=function(a){return this.sectionIds[a]+"s"};
n.startTimer=function(){this.rotationTimer&&o.clearTimeout(this.rotationTimer);this.rotationTimer=o.setTimeout(x(this.rotate,this),5000)};var He=function(a,b,c){Ee.call(this,a,0,1,c);this.swapIn=a;this.swapOut=b;O(this,"begin",this.onBegin,k,this);O(this,"end",this.onEnd,k,this)};y(He,Ee);He.prototype.onBegin=function(){this.swapIn.style.display="";this.swapOut.style.display=""};He.prototype.onEnd=function(){this.swapOut.style.display="none"};var Ie=function(a,b,c,d,f,g,l,m,t){this.modelId_=a;this.actionUrl_=b;this.securityTokenParam_=c;this.securityTokenValue_=d;this.rejectedMsg_=f;this.errorMsg_=g;this.spinnerUrl=m;this.checkUrl=t;this.lastVerifiedProblemMask_=l;this.buttons_=[]};n=Ie.prototype;n.pendingCalls_=0;
n.ajaxCallback_=function(a){if(a.type=="complete"){this.pendingCalls_-=1;a=a.target;if(a.isSuccess()){a=a.getResponseText();var b=F("judgmentStatus");if(b){b.innerHTML=a;if(a=F("problemMask"))this.lastVerifiedProblemMask_=Number(a.value)}}else a.getStatus()==400?alert(this.rejectedMsg_):alert(this.errorMsg_)}if(this.pendingCalls_<=0){this.updateCheckBoxes(this.lastVerifiedProblemMask_);this.pendingCalls_=0}};
n.send=function(a){var b=new R(this.actionUrl_);a=a||new S;var c=F("judgmentCommentDiv");c&&a.add("judgment_comment",c.value);a.add(this.securityTokenParam_,this.securityTokenValue_);this.pendingCalls_+=1;Id(b.toString(),x(this.ajaxCallback_,this),"POST",a.toString())};n.acceptModel=function(){Je(k);var a=new S;a.add("action","acceptmodel");this.send(a);for(a=0;a<this.buttons_.length;a++)this.buttons_[a].freeze()};n.deleteJudgment=function(a){var b=new S;b.add("deljudgment",a);this.send(b)};
n.updateCheckBoxes=function(a){for(var b=0;b<this.buttons_.length;b++)this.buttons_[b].updateStateFromMask(a)};n.addProblemButton=function(a){this.buttons_.push(a)};
var Je=function(a){L(G("auto_rejection_message"),a)},Ke=function(a,b,c,d){this.judgment_=a;this.elementId_=b;this.value_=c;this.isChecked_=!!d;this.domElement_=F(this.elementId_);this.checkElement_=I("img",{src:this.judgment_.checkUrl,style:"display:none","class":"problemCheck"});this.domElement_.appendChild(this.checkElement_);this.spinnerElement_=I("img",{src:this.judgment_.spinnerUrl,style:"display:none","class":"problemSpinner"});this.domElement_.appendChild(this.spinnerElement_);this.updateState(this.isChecked_);
this.handlingRequest_=k;O(this.domElement_,"click",this.toggle,k,this)};n=Ke.prototype;n.toggle=function(){if(!this.handlingRequest_){var a=new S;this.updateState(!this.isChecked_);this.isChecked_?a.add("problem_set_mask",this.value_):a.add("problem_clear_mask",this.value_);Je(this.isChecked_);this.freeze();this.judgment_.send(a)}};n.updateState=function(a){this.isChecked_=a;L(this.checkElement_,this.isChecked_);this.showSpinner(k);this.handlingRequest_=k};
n.updateStateFromMask=function(a){this.updateState(!!(this.value_&a))};n.showSpinner=function(a){L(this.spinnerElement_,a)};n.freeze=function(){this.handlingRequest_=h;this.showSpinner(h)};p("_G3DWH_Judgment",Ie,undefined);p("_G3DWH_Judgment.prototype.acceptModel",Ie.prototype.acceptModel,undefined);p("_G3DWH_Judgment.prototype.deleteJudgment",Ie.prototype.deleteJudgment,undefined);p("_G3DWH_Judgment.prototype.addProblemButton",Ie.prototype.addProblemButton,undefined);
p("_G3DWH_ProblemButton",Ke,undefined);p("_G3DWH_Utils.createLabelInput",function(a,b){b=new Fd(b);b.setElementInternal(G(a));b.enterDocument();return b},undefined);var Le=function(a,b,c,d,f,g,l,m,t,q){re.call(this,a,b,c,d,f,g);this.bboxParam_=l;this.refreshDelay_=q;this.placemarkIcon_=new GIcon;this.placemarkIcon_.image=m;this.placemarkIcon_.iconSize=new GSize(32,32);this.placemarkIcon_.iconAnchor=new GPoint(16,16);this.placemarkIcon_.infoWindowAnchor=new GPoint(25,7);this.clusterIcon_=new GIcon;this.clusterIcon_.image=t;this.clusterIcon_.iconSize=new GSize(32,32);this.clusterIcon_.iconAnchor=new GPoint(16,16);this.clusterIcon_.infoWindowAnchor=new GPoint(25,
7)};y(Le,re);n=Le.prototype;
n.initMap=function(a,b,c,d,f){this.maxBubbleWidth_=f;this.createMap("map",[G_HYBRID_MAP,G_NORMAL_MAP,G_SATELLITE_MAP],[new GMapTypeControl,new GSmallMapControl,new GScaleControl]);this.map_.addControl(new GMapTypeControl);this.map_.addControl(new GSmallMapControl);this.map_.addControl(new GScaleControl);GEvent.addDomListener(this.map_.getContainer(),"DOMMouseScroll",function(g){g.preventDefault&&g.preventDefault()});c=this.map_.getBoundsZoomLevel(new GLatLngBounds(c,d),this.map_.getCurrentMapType());
this.map_.enableScrollWheelZoom();this.map_.setCenter(new GLatLng(a,b),c);this.configureMapListeners()};n.initFromExistingMap=function(a){this.setMap(a);this.configureMapListeners()};n.configureMapListeners=function(){var a=this;GEvent.addListener(this.map_,"zoomend",function(){a.doRefresh()});GEvent.addListener(this.map_,"dragend",function(){a.doRefresh()})};n.setStickyMarker=function(a){this.stickyMarker_=a};n.setIgnoredModelId=function(a){this.ignoredId_=a};
n.doRefresh=function(){this.deferredVbrTimer_!==j&&o.clearTimeout(this.deferredVbrTimer_);var a=this.map_.getBounds(),b=a.getSouthWest();a=a.getNorthEast();b=b.lng()+","+b.lat()+","+a.lng()+","+a.lat();this.deferredVbrTimer_=o.setTimeout(x(this.sendOrQueueVbrRequest,this,b),this.refreshDelay_)};n.sendOrQueueVbrRequest=function(a){var b=new R(this.sourceUri_);b.setParameterValue(this.bboxParam_,a);this.refreshPlacemarks(x(this.setPlacemarks,this),b)};
n.getPlacemarkMarker=function(a,b){var c=new GMarker(b,this.placemarkIcon_),d=this;GEvent.addListener(c,"click",function(){d.displayPlacemarkBubble(c,a)});return c};n.getClusterMarker=function(a){var b=new GMarker(a,this.clusterIcon_),c=this;GEvent.addListener(b,"click",function(){var d=c.map_.getCurrentMapType().getMaximumResolution(),f=c.map_.getZoom();if(f<d)f=f+1;c.map_.setCenter(a,f)});return b};
n.setPlacemarks=function(a){this.map_.clearOverlays();this.stickyMarker_&&this.map_.addOverlay(this.stickyMarker_);for(var b=a.getElementsByTagName("placemark"),c=0;c<b.length;c++){var d=b.item(c),f=T.getSingleValue(d,"id");if(!(f===this.ignoredId_)){var g=parseFloat(T.getSingleValue(d,"latitude"));d=parseFloat(T.getSingleValue(d,"longitude"));g=new GLatLng(g,d);this.map_.addOverlay(this.getPlacemarkMarker(f,g))}}a=a.getElementsByTagName("cluster");for(c=0;c<a.length;c++){b=a.item(c);T.getSingleValue(b,
"count");g=parseFloat(T.getSingleValue(b,"latitude"));d=parseFloat(T.getSingleValue(b,"longitude"));g=new GLatLng(g,d);this.map_.addOverlay(this.getClusterMarker(g))}};var Me=function(a,b,c,d,f,g,l,m,t,q,r,w){Le.call(this,a,b,c,d,f,g,l,m,t,q);this.sourceUri_.setParameterValue(r,w)};y(Me,Le);p("_G3DWH_CollectionMap",Me,undefined);p("_G3DWH_CollectionMap.prototype.initMap",Le.prototype.initMap,undefined);p("_G3DWH_CollectionMap.prototype.doRefresh",Le.prototype.doRefresh,undefined);
var Ne=function(a,b,c,d,f,g,l,m,t,q,r,w){Le.call(this,a,b,c,d,f,g,l,m,t,q);this.setStickyMarker(r);this.setIgnoredModelId(w)};y(Ne,Le);p("_G3DWH_Utils.createSimpleMap",function(a,b,c,d,f){a=document.getElementById(a);a=new GMap2(a,{mapTypes:f?[G_HYBRID_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]:[G_HYBRID_MAP]});a.checkResize();b=new GLatLng(b,c);a.setCenter(b,d);d=new GMarker(b);a.addOverlay(d);a.enableScrollWheelZoom();if(f){a.addControl(new GMapTypeControl);a.addControl(new GSmallMapControl);a.addControl(new GScaleControl)}return a},undefined);var Oe=function(a,b,c,d,f,g,l,m,t,q,r,w,H,K,Q,ma,Ia,W){this.swivelUrl=t;this.displayType=g;this.toolbarType=l;this.wantsLogo=m;this.lat=r;this.lon=w;this.locale=K;this.geLoadingImageUrl=H;this.kmzUrl=q;this.swivelButtonUrl=ma;this.geButtonUrl=Ia;this.storedImageWidth=b;this.storedImageHeight=c;this.activateCallback=W;this.windowWidth=d;this.windowHeight=f;this.detailsUrl=a;this.previewImageUrl=Q;this.earthApiLoaded=k};p("_G3DWH_ModelPreview",Oe,undefined);
Oe.prototype.initialize=function(){var a=F("embed_previewImage"),b=this.storedImageWidth<50?500:this.storedImageWidth,c=this.storedImageHeight<30?300:this.storedImageHeight;b=new A(b,c);c=new A(this.windowWidth,this.windowHeight);b.fitsInside(c)||(b=b.scaleToFit(c));c=b.height;b=b.width;a.style.width=b+"px";a.style.height=c+"px";a.style.top=Math.round((this.windowHeight-c)/2);a.src=this.previewImageUrl;a=F("embed_previewCell");a.style.height=this.windowHeight+"px";a.style.width=this.windowWidth+"px";
if(this.displayType=="sw")O(a,"click",x(this.showSwivel,this));else this.displayType=="ge"&&O(a,"click",x(this.loadEarthApi,this));if(this.displayType!="im"){F("embed_promptanchor").style.backgroundImage=this.displayType=="sw"?"url("+this.swivelButtonUrl+")":"url("+this.geButtonUrl+")";c=F("embed_prompt");if(this.windowWidth<150||this.windowHeight<150){L(c.style.display,k);O(a,"mouseover",x(this.showPrompt,this));O(a,"mouseout",x(this.hidePrompt,this))}c.style.top=Math.round((this.windowHeight-70)/
2)+"px"}};p("_G3DWH_ModelPreview.prototype.initialize",Oe.prototype.initialize,undefined);Oe.prototype.reset=function(){var a=F("embed_cell");a.removeChild(a.lastChild);L(F("embed_div"),k);L(F("embed_previewImage"),h);this.showPrompt()};p("_G3DWH_ModelPreview.prototype.reset",Oe.prototype.reset,undefined);Oe.prototype.setInvokeCallback=function(a){this.activateCallback=a};p("_G3DWH_ModelPreview.prototype.setInvokeCallback",Oe.prototype.setInvokeCallback,undefined);n=Oe.prototype;
n.callInvokeCallback=function(){this.activateCallback&&this.activateCallback()};n.showSwivel=function(){window.location=this.swivelUrl+"&width="+this.windowWidth+"&height="+this.windowHeight+"&tb="+this.toolbarType+"&logo="+this.wantsLogo};n.showPrompt=function(){F("embed_prompt")!=j&&L(F("embed_prompt"),h)};n.hidePrompt=function(){L(F("embed_prompt"),k)};
n.initEarthCB=function(a){if(!(a==j)){this.ge=a;this.ge.getWindow().setVisibility(h);this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BUILDINGS,k);this.createLoadingOverlay();try{google.earth.fetchKml(this.ge,this.kmzUrl,x(function(c){if(c){this.ge.getGlobe().getFeatures().appendChild(c);o.setTimeout(x(this.setInitialEarthView,this),0)}this.screenOverlay.setVisibility(k)},this))}catch(b){this.screenOverlay.setVisibility(k)}this.setInitialEarthView()}};n.failEarthCB=function(){};
n.setInitialEarthView=function(){var a=this.ge.createLookAt("");a.set(this.lat,this.lon,25,this.ge.ALTITUDE_RELATIVE_TO_GROUND,70,60,200);this.ge.getView().setAbstractView(a)};n.loadEarthApi=function(){google.load("earth","1",{callback:x(this.initializeEarthPlugin,this)})};
n.initializeEarthPlugin=function(){this.callInvokeCallback();google.earth.setLanguage(this.locale);this.earthApiLoaded=h;this.hidePrompt();L(F("embed_div"),h);L(F("embed_previewImage"),k);google.earth.createInstance("embed_cell",x(this.initEarthCB,this),x(this.failEarthCB,this))};
n.createLoadingOverlay=function(){var a=this.ge.createScreenOverlay("");a.setVisibility(k);a.setIcon(this.ge.createIcon(""));a.getIcon().setHref(this.geLoadingImageUrl);a.getScreenXY().setXUnits(this.ge.UNITS_PIXELS);a.getScreenXY().setYUnits(this.ge.UNITS_PIXELS);a.getScreenXY().setX(0);a.getScreenXY().setY(0);a.getOverlayXY().setXUnits(this.ge.UNITS_PIXELS);a.getOverlayXY().setYUnits(this.ge.UNITS_PIXELS);a.getOverlayXY().setX(0);a.getOverlayXY().setY(0);a.getSize().setXUnits(this.ge.UNITS_FRACTION);
a.getSize().setYUnits(this.ge.UNITS_FRACTION);a.getSize().setX(1);a.getSize().setY(1);a.setVisibility(h);this.screenOverlay=a;this.ge.getGlobe().getFeatures().appendChild(a)};var Pe=function(a){this.timerId=0;this.contents=a};p("_G3DWH_EmbedToolbar",Pe,undefined);Pe.prototype.initialize=function(){var a=G(this.contents);if(a){O(a,"mouseover",x(this.turnOnToolbar,this));O(a,"mouseout",x(this.turnOffToolbar,this))}};p("_G3DWH_EmbedToolbar.prototype.initialize",Pe.prototype.initialize,undefined);
Pe.prototype.turnOnToolbar=function(){if(this.timerId!=0){o.clearTimeout(this.timerId);this.timerId=0}G("toolbarContents")&&L(G("toolbarContents"),h)};Pe.prototype.turnOffToolbar=function(){if(this.timerId==0&&G("toolbarContents"))this.timerId=o.setTimeout(x(this.turnToolbarOffNow,this),1000)};Pe.prototype.turnToolbarOffNow=function(){L(G("toolbarContents"),k)};var Qe=function(a,b,c,d,f,g,l,m,t,q,r,w,H,K,Q,ma,Ia,W,Vc,Wc,Xc,Yc,ec){this.hasMap=a;this.hasLogo=b;this.mapLat=c;this.mapLng=d;this.contractImg=f;this.expandImg=g;this.modelId=l;this.enableStreetView=m;this.noFlashErrorMsg=t;this.actionTrackingUrl=q;this.actionTrackingParamName=r;this.mapTabActionCode=w;this.svTabActionCode=H;this.swivelViewUrl=K;this.swivelLoaded=k;this.enableGoogleEarthView=Q;this.geLoadingImageUrl=ma;this.kmzUrl=Ia;this.isBuglight=W;this.geViewActionCode=Vc;this.geModelDownloadFailureMsg=
Wc;this.screenOverlay=j;this.earthViewInitialized=k;this.swivelWidth=Xc;this.swivelHeight=Yc;this.langCode=ec;this.earthApiLoaded=this.mapsApiLoaded=k;if(this.hasMap){this.currentTab="imageTab";a=F("imageTab");O(a,"click",this.toggleImageTab,h,this);a=F("mapTab");O(a,"click",this.toggleMapTab,h,this)}if(b){b=F("logoToggle");O(b,"click",this.toggleOverlays,h,this)}else this.overlaysShowing=k};p("_G3DWH_ModelPreviewTabs",Qe,undefined);n=Qe.prototype;n.previewImageSize=j;n.overlaysShowing=h;
n.mapTabInitialized=k;n.svTabInitialized=k;n.map=j;n.modelMarker=j;var Re={};
Qe.prototype.initGeoTabs=function(a,b,c,d,f,g,l,m,t,q){this.mapsApiLoaded=h;if(this.hasMap){this.latLng=new GLatLng(this.mapLat,this.mapLng);O(window,"unload",this.unload,h,this);if(this.enableStreetView){var r=new GStreetviewClient;this.svLatLng=j;r.getNearestPanorama(this.latLng,x(this.initStreetViewLocation,this))}this.modelAreaMap=new Ne(a,b,c,d,f,g,l,m,t,q,this.getModelMarker(),this.modelId);this.showWaitCursor(k);if(this.earthPagePending)this.openEarthPage();else this.mapTabPending&&this.toggleMapTab()}};
p("_G3DWH_ModelPreviewTabs.prototype.initGeoTabs",Qe.prototype.initGeoTabs,undefined);n=Qe.prototype;n.showWaitCursor=function(a){G("modelTabSet").style.cursor=a?"wait":"auto"};n.toggleImageTab=function(){this.currentTab==="imageTab"||this.toggleTabSelection("imageTab")};n.loadEarthApi=function(a){google.load("earth","1",{callback:x(this.initializeEarthPluginLanguage,this,a)})};n.initializeEarthPluginLanguage=function(a){google.earth.setLanguage(this.langCode);this.earthApiLoaded=h;a&&this.openEarthPage()};
n.toggleMapTab=function(){if(this.mapsApiLoaded){if(!(this.currentTab==="mapTab")){this.toggleTabSelection("mapTab");if(!this.mapTabInitialized){this.earthApiLoaded||this.loadEarthApi();this.map=this.initMapTab();T.logClientAction(this.actionTrackingUrl,this.actionTrackingParamName,this.mapTabActionCode);this.mapTabInitialized=h}}}else{this.showWaitCursor(h);this.mapTabPending=h}};
n.toggleStreetViewTab=function(){if(!(this.currentTab==="svTab")){this.toggleTabSelection("svTab");if(!this.svTabInitialized){this.initSvTab();T.logClientAction(this.actionTrackingUrl,this.actionTrackingParamName,this.svTabActionCode);this.svTabInitialized=h}}};
n.toggleTabSelection=function(a){if(this.currentTab==="mapTab"){var b=-(screen.width*2)+"px",c=-(screen.height*2)+"px";F(this.currentTab+"Contents").style.left=b;F(this.currentTab+"Contents").style.top=c;F(this.currentTab+"Contents").style.height="0px";F(this.currentTab+"Contents").style.borderWidth="0px"}else L(F(this.currentTab+"Contents"),k);F(this.currentTab+"Left").className="tab-l";F(this.currentTab+"Middle").className="tab-m";F(this.currentTab+"Right").className="tab-r";this.currentTab=a;F(this.currentTab+
"Left").className="selected-tab-l";F(this.currentTab+"Middle").className="selected-tab-m";F(this.currentTab+"Right").className="selected-tab-r";if(this.currentTab==="mapTab"){F(this.currentTab+"Contents").style.display=="none"&&L(F(this.currentTab+"Contents"),h);F(this.currentTab+"Contents").style.left="";F(this.currentTab+"Contents").style.top="";F(this.currentTab+"Contents").style.borderWidth="1px";F(this.currentTab+"Contents").style.height=this.swivelHeight+"px"}else L(F(this.currentTab+"Contents"),
h)};n.initSvTab=function(){var a=F("svFlashContainer");this.streetView=new GStreetviewPanorama(a);GEvent.addListener(this.streetView,"error",x(this.handleNoFlash,this));this.streetView.setLocationAndPOV(this.svLatLng,{yaw:this.getInitialBearing(this.svLatLng,this.latLng),pitch:-10})};n.getModelMarker=function(){if(!this.modelMarker){this.modelMarker=new GMarker(this.latLng);var a=x(this.showThumbnailInfoWindow,this,this.modelMarker);GEvent.addListener(this.modelMarker,"click",a)}return this.modelMarker};
n.initMapTab=function(){var a=this.initMap("mapTabContents",this.getModelMarker());GEvent.addDomListener(a.getContainer(),"DOMMouseScroll",function(b){b.preventDefault&&b.preventDefault()});a.enableScrollWheelZoom();a.addControl(new GMapTypeControl);a.addControl(new GScaleControl);a.addControl(new GSmallMapControl);this.currentMapType=G_HYBRID_MAP;if(this.modelAreaMap){this.modelAreaMap.initFromExistingMap(a);this.modelAreaMap.doRefresh()}return a};
n.initStreetViewLocation=function(a){if(a.code==200){this.svLatLng=new GLatLng(a.Location.lat,a.Location.lng);a=F("svTab");L(a,h);O(a,"click",this.toggleStreetViewTab,h,this)}};n.getInitialBearing=function(a,b){var c=ue(a.lat()),d=ue(b.lat());b=ue(b.lng()-a.lng());a=Math.sin(b)*Math.cos(d);c=Math.cos(c)*Math.sin(d)-Math.sin(c)*Math.cos(d)*Math.cos(b);c=Math.atan2(a,c)*180/Math.PI;return(c+360)%360};n.handleNoFlash=function(a){if(a==603)F("svTabContents").innerHTML=this.noFlashErrorMsg};
n.showThumbnailInfoWindow=function(a){if(this.currentMapType==G_SATELLITE_3D_MAP){this.earthViewInitialized=k;this.setInitialEarthView()}else{if(!this.thumbnail){var b=new A(100,75),c=j;if(this.previewImageSize){c=this.previewImageSize.clone();c.fitsInside(b)||c.scaleToFit(b)}else c=b;b="height:"+c.height+"px;width:"+c.width+"px;display:block;margin-left:auto;margin-right:auto;";c=F("previewImage");this.thumbnail=I("img",{src:c.src,style:b})}a.openInfoWindow(this.thumbnail,{maxWidth:100})}};
n.initMap=function(a,b){var c=F(a);a=j;a=this.enableGoogleEarthView?new GMap2(c,{mapTypes:[G_HYBRID_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]}):new GMap2(c,{mapTypes:[G_NORMAL_MAP,G_HYBRID_MAP,G_PHYSICAL_MAP]});a.checkResize();a.setCenter(this.latLng,13);GEvent.addListener(a,"maptypechanged",x(this.mapTypeChanged,this));if(b)a.addOverlay(b);else{b=new GMarker(this.latLng);a.addOverlay(b)}return a};
n.toggleOverlays=function(){this.overlaysShowing=!this.overlaysShowing;var a=F("logoToggle");this.overlaysShowing?ub(a,this.expandImg,this.contractImg):ub(a,this.contractImg,this.expandImg);(a=F("logoBorder"))&&L(a,this.overlaysShowing)};
n.displaySwivel=function(a){if(a)if(!this.swivelLoaded){var b=I("iframe",{src:this.swivelViewUrl,scrolling:"no",frameborder:"0",width:this.swivelWidth,height:this.swivelHeight});b.style.border="0";F("swiveldiv").appendChild(b);this.swivelLoaded=h}b=F("thumbnailBtn");var c=F("swivelBtn");if(a){b.className="image-button-footer";c.className="image-button-footer image-button-active";this.overlaysShowing&&this.toggleOverlays(j)}else{b.className="image-button-footer image-button-active";c.className="image-button-footer"}T.showHideElement("thumbnail",
!a);T.showHideElement("swivel",a)};p("_G3DWH_ModelPreviewTabs.prototype.displaySwivel",Qe.prototype.displaySwivel,undefined);n=Qe.prototype;n.unload=function(){GUnload()};
n.createLoadingOverlay=function(){var a=this.googleEarth,b=a.createScreenOverlay("");b.setVisibility(k);b.setIcon(a.createIcon(""));b.getIcon().setHref(this.geLoadingImageUrl);b.getScreenXY().setXUnits(a.UNITS_PIXELS);b.getScreenXY().setYUnits(a.UNITS_PIXELS);b.getScreenXY().setX(0);b.getScreenXY().setY(0);b.getOverlayXY().setXUnits(a.UNITS_PIXELS);b.getOverlayXY().setYUnits(a.UNITS_PIXELS);b.getOverlayXY().setX(0);b.getOverlayXY().setY(0);b.getSize().setXUnits(a.UNITS_FRACTION);b.getSize().setYUnits(a.UNITS_FRACTION);
b.getSize().setX(1);b.getSize().setY(1);b.setVisibility(h);this.screenOverlay=b;a.getGlobe().getFeatures().appendChild(b)};n.setGeErrorMessage=function(a){F(Re.GE_DIV).innerHTML=a;this.googleEarth=j};
n.initializeEarthPlugin=function(a){this.googleEarth=a;if(!(this.googleEarth==j)){this.googleEarth.getNavigationControl().setVisibility(this.googleEarth.VISIBILITY_HIDE);if(this.isBuglight){this.googleEarth.getLayerRoot().enableLayerById(this.googleEarth.LAYER_BUILDINGS,h);o.setTimeout(x(this.setInitialEarthView,this),10)}else{this.googleEarth.getLayerRoot().enableLayerById(this.googleEarth.LAYER_BUILDINGS,k);this.createLoadingOverlay();try{google.earth.fetchKml(this.googleEarth,this.kmzUrl,x(function(c){if(c){this.googleEarth.getGlobe().getFeatures();
this.googleEarth.getGlobe().getFeatures().appendChild(c);o.setTimeout(x(this.setInitialEarthView,this),0)}else alert(this.geModelDownloadFailureMsg);this.screenOverlay.setVisibility(k)},this))}catch(b){this.screenOverlay.setVisibility(k);this.setGeErrorMessage(this.geModelDownloadFailureMsg)}}}};
n.setInitialEarthView=function(){if(!this.earthViewInitialized){this.earthViewInitialized=h;var a=this.latLng.lat(),b=this.latLng.lng(),c=this.googleEarth.createLookAt("");c.set(a,b,25,this.googleEarth.ALTITUDE_RELATIVE_TO_GROUND,70,60,200);this.googleEarth.getView().setAbstractView(c)}};
n.mapTypeChanged=function(){if(!(this.map==j)){this.currentMapType=this.map.getCurrentMapType();if(this.currentMapType==G_SATELLITE_3D_MAP){T.logClientAction(this.actionTrackingUrl,this.actionTrackingParamName,this.geViewActionCode);this.map.getEarthInstance(x(this.initializeEarthPlugin,this))}}};
n.openEarthPage=function(){if(this.mapsApiLoaded)if(this.earthApiLoaded){this.toggleMapTab(j);this.map.setMapType(G_SATELLITE_3D_MAP)}else{this.showWaitCursor(h);this.loadEarthApi(h)}else{this.showWaitCursor(h);this.earthPagePending=h}};p("_G3DWH_ModelPreviewTabs.prototype.openEarthPage",Qe.prototype.openEarthPage,undefined);var _3dwh_thumbnailRequestCount=0,Se=function(a,b,c,d,f,g,l,m,t,q,r,w,H,K,Q,ma){this.cacheKey=a;this.showAuthors=b;this.lastValidIndex=d;this.startParamName=m;this.requestCountParamName=q;this.currentIndex=c;this.pageSize=f;this.errorMsg=K;this.cellsAreClean=k;this.uri=new R(g);this.uri.setParameterValue(r,w);this.uri.setParameterValue(l,a);this.uri.setParameterValue(t,b);this.uri.setParameterValue(Q,ma);this.cellCache={};if(H){this.prevActiveDivId=this.cacheKey+"-prev";this.nextActiveDivId=this.cacheKey+
"-next";this.prevActiveClass="homepage_left-arrow";this.prevInactiveClass="homepage_left-arrow-inactive";this.nextActiveClass="homepage_right-arrow";this.nextInactiveClass="homepage_right-arrow-inactive"}else{this.nextActiveDivId=this.cacheKey+"-prev";this.prevActiveDivId=this.cacheKey+"-next";this.nextActiveClass="homepage_left-arrow";this.nextInactiveClass="homepage_left-arrow-inactive";this.prevActiveClass="homepage_right-arrow";this.prevInactiveClass="homepage_right-arrow-inactive";a=G(this.cacheKey+
"-prev-label");b=a.parentNode;c=G(this.cacheKey+"-next-label");d=c.parentNode;J(a);J(c);b.appendChild(c);d.appendChild(a)}this.loadingCell=F(this.cacheKey+"-loading");a=F(this.prevActiveDivId);O(a,"click",this.prev,h,this);a=F(this.nextActiveDivId);O(a,"click",this.next,h,this);this.prevEnabled=this.nextEnabled=k;this.resetArrowEnablement()};p("_G3DWH_ThumbnailPaginator",Se,undefined);n=Se.prototype;
n.prev=function(){if(!(!this.prevEnabled||this.currentIndex===0)){this.disableArrows();this.currentIndex--;var a=this.currentIndex,b=this.createCellId(a),c=F(this.cacheKey);this.ensureRowIsClean();if(!this.cellCache[c.lastChild.firstChild.id])this.cellCache[c.lastChild.firstChild.id]=c.lastChild.firstChild;var d=c.lastChild.firstChild;c.lastChild.removeChild(c.lastChild.firstChild);for(var f=c.lastChild;f.previousSibling;f=f.previousSibling){var g=f.previousSibling.firstChild;this.assertValidElement(g);
f.previousSibling.removeChild(g);f.appendChild(g)}if(this.cellCache[b]){c.firstChild.appendChild(this.cellCache[b]);this.resetArrowEnablement()}else{c.firstChild.appendChild(this.loadingCell);c.firstChild.style.verticalAlign="middle";L(this.loadingCell,h);a=this.buildThumbnailRequest(Math.max(0,a-this.pageSize+1));V.send(a,x(this.cachePrevEntries,this,b,d))}}};
n.cachePrevEntries=function(a,b,c){if(c.type=="complete"){c=c.target;var d=j;if(c.isSuccess()){this.handleThumbnailResponse(c);d=F(this.cacheKey);d.firstChild.removeChild(this.loadingCell);d.firstChild.style.verticalAlign="";d.firstChild.appendChild(this.cellCache[a])}else{alert(this.errorMsg);d=F(this.cacheKey);d.removeChild(this.loadingCell);d.appendChild(b);this.currentIndex++}this.resetArrowEnablement()}};
n.next=function(){if(this.nextEnabled){this.disableArrows();this.currentIndex++;var a=this.currentIndex+this.pageSize-1,b=this.createCellId(a),c=F(this.cacheKey);this.ensureRowIsClean();if(!this.cellCache[c.firstChild.firstChild.id])this.cellCache[c.firstChild.firstChild.id]=c.firstChild.firstChild;var d=c.firstChild.firstChild;c.firstChild.removeChild(c.firstChild.firstChild);for(var f=c.firstChild;f.nextSibling;f=f.nextSibling){var g=f.nextSibling.firstChild;this.assertValidElement(g);f.nextSibling.removeChild(g);
f.appendChild(g)}if(this.cellCache[b]){c.lastChild.appendChild(this.cellCache[b]);this.resetArrowEnablement()}else{c.lastChild.appendChild(this.loadingCell);c.lastChild.style.verticalAlign="middle";L(this.loadingCell,h);a=this.buildThumbnailRequest(a);V.send(a,x(this.cacheNextEntries,this,b,d))}}};
n.cacheNextEntries=function(a,b,c){if(c.type=="complete"){c=c.target;var d=j;if(c.isSuccess()){this.handleThumbnailResponse(c);d=F(this.cacheKey);d.lastChild.removeChild(this.loadingCell);d.lastChild.style.verticalAlign="";d.lastChild.appendChild(this.cellCache[a])}else{alert(this.errorMsg);d=F(this.cacheKey);d.removeChild(this.loadingCell);d.insertBefore(b,d.firstChild);this.currentIndex--}this.resetArrowEnablement()}};
n.buildThumbnailRequest=function(a){_3dwh_thumbnailRequestCount++;var b=new R(this.uri);b.setParameterValue(this.startParamName,a);b.setParameterValue(this.requestCountParamName,_3dwh_thumbnailRequestCount);return b.toString()};n.handleThumbnailResponse=function(a){this.lastValidIndex=parseInt(a.getResponseHeader("X-3DWarehouse-LastValidStartIndex"),10);this.cacheFetchedData(a.getResponseText())};
n.cacheFetchedData=function(a){var b=document.createElement("div");b.innerHTML=a;for(a=b.firstChild;a;a=a.nextSibling)if(a.id&&this.isTagNamed(a,"div")&&!this.cellCache[a.id])this.cellCache[a.id]=a};n.createCellId=function(a){return this.cacheKey+a};n.disableArrows=function(){this.prevEnabled=k;ub(G(this.prevActiveDivId),this.prevActiveClass,this.prevInactiveClass);this.nextEnabled=k;ub(G(this.nextActiveDivId),this.nextActiveClass,this.nextInactiveClass)};
n.resetArrowEnablement=function(){var a=G(this.prevActiveDivId),b=G(this.nextActiveDivId);if(this.currentIndex===0){this.prevEnabled=k;ub(a,this.prevActiveClass,this.prevInactiveClass)}else{this.prevEnabled=h;ub(a,this.prevInactiveClass,this.prevActiveClass)}if(this.currentIndex===this.lastValidIndex){this.nextEnabled=k;ub(b,this.nextActiveClass,this.nextInactiveClass)}else{this.nextEnabled=h;ub(b,this.nextInactiveClass,this.nextActiveClass)}};
n.ensureRowIsClean=function(){if(!this.cellsAreClean){var a=F(this.cacheKey);this.removeNonNamedElements(a,"td");for(a=a.firstChild;a;a=a.nextSibling)this.removeNonNamedElements(a,"div");this.cellsAreClean=h}};n.removeNonNamedElements=function(a,b){for(var c=[],d=a.firstChild;d;d=d.nextSibling)this.isTagNamed(d,b)||c.push(d);b=c.length;for(d=0;d<b;d++)a.removeChild(c[d])};n.isTagNamed=function(a,b){return a&&a.tagName&&a.tagName.toLowerCase()==b};
n.assertValidElement=function(a){if((!a||a.nodeType!=1)&&window.console)window.console.log("Thumbnail cell did not contain a div: "+this.cacheKey)};var Te=function(a,b,c,d,f){Ad.call(this,d);this.uri_=new R(f||"http://chart.apis.google.com/chart");this.encodingType_="";this.dataSets_=[];this.setColors_=[];this.setLegendTexts_=[];this.xLabels_=[];this.leftLabels_=[];this.rightLabels_=[];this.multiAxisType_=[];this.multiAxisLabelText_={};this.multiAxisLabelPosition_={};this.multiAxisRange_={};this.multiAxisLabelStyle_={};this.setType(a);this.setSize(b,c);this.minValue_=this.isPieChart()?0:Infinity};y(Te,Ad);n=Te.prototype;n.uriLengthLimit_=2048;
n.gridX_=0;n.gridY_=0;n.maxValue_=-Infinity;n.title_=j;n.legend_=j;n.numVisibleDataSets_=j;n.createDom=function(){var a=this.getSize();this.setElementInternal(this.getDomHelper().createDom("img",{src:this.getUri(),"class":"goog-serverchart-image",width:a[0],height:a[1]}))};n.decorateInternal=function(a){a.src=this.getUri();this.setElementInternal(a)};n.getUri=function(){this.computeDataString_();return this.uri_};n.setType=function(a){this.uri_.setParameterValue("cht",a)};n.getType=function(){return this.uri_.getParameterValue("cht")};
n.setSize=function(a,b){this.uri_.setParameterValue("chs",[a||300,b||150].join("x"))};n.getSize=function(){return this.uri_.getParameterValue("chs").split("x")};n.setMinValue=function(a){this.minValue_=a};n.setMaxValue=function(a){this.maxValue_=a};n.setGridX=function(a){this.gridX_=a;this.setGrids_(this.gridX_,this.gridY_)};n.setGridY=function(a){this.gridY_=a;this.setGrids_(this.gridX_,this.gridY_)};n.setGrids_=function(a,b){this.uri_.setParameterValue("chg",[a==0?0:100/a,b==0?0:100/b].join(","))};
n.setXLabels=function(a){this.xLabels_=a;this.uri_.setParameterValue("chl",this.xLabels_.join("|"))};n.isPieChart=function(){var a=this.getType();return a=="p"||a=="p3"||a=="pc"};n.setParameterValue=function(a,b){this.uri_.setParameterValue(a,b)};n.setRightLabels=function(a){this.rightLabels_=a;this.uri_.setParameterValue("chlr",this.rightLabels_.reverse().join("|"))};n.setTitle=function(a){this.title_=a;this.uri_.setParameterValue("chtt",this.title_.replace(/\n/g,"|"))};
n.addDataSet=function(a,b,c){var d=this.arrayMin_(a);if(d<this.minValue_)this.minValue_=d;d=this.arrayMax_(a);if(d>this.maxValue_)this.maxValue_=d;if(c!==undefined){if(this.setLegendTexts_.length<this.dataSets_.length)e(Error("Cannot start adding legends text after first element."));this.setLegendTexts_.push(c);this.uri_.setParameterValue("chdl",this.setLegendTexts_.join("|"))}this.dataSets_.push(a);this.setColors_.push(b);this.uri_.setParameterValue("chco",this.setColors_.join(","))};
n.computeDataString_=function(){var a;if(this.encodingType_!="")a=this.computeDataStringForEncoding_(this.encodingType_);else(a=this.computeDataStringForEncoding_("e"))||(a=this.computeDataStringForEncoding_("s"));a||this.dispatchEvent(new Ue(this.uri_.toString()))};
n.computeDataStringForEncoding_=function(a){for(var b=[],c=0,d=this.dataSets_.length;c<d;++c)b[c]=this.getChartServerValues_(this.dataSets_[c],this.minValue_,this.maxValue_,a);b=b.join(a=="t"?"|":",");a=this.numVisibleDataSets_==j?Sa(a,":",b):Sa(a,this.numVisibleDataSets_,":",b);this.uri_.setParameterValue("chd",a);return this.uri_.toString().length<this.uriLengthLimit_};var Ve=Math.pow(64,2)-1;n=Te.prototype;
n.getConvertedValue_=function(a,b,c,d){if(b>c)e(Error("minValue is greater than maxValue"));var f=d=="e";if(!(a!=j)||isNaN(a))return f?"__":"_";if(d=="t")return String(a);d=0.5;if(c>b)d=(a-b)/(c-b);if(f){a=Math.floor(d*Ve/64);b=Math.floor(d*Ve%64);return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.".charAt(a)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.".charAt(b)}return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.round(d*61))};
n.getChartServerValues_=function(a,b,c,d){for(var f=[],g=0,l=a.length;g<l;++g)f.push(this.getConvertedValue_(a[g],b,c,d));return f.join(this.encodingType_=="t"?",":"")};n.arrayMin_=function(a){for(var b=Infinity,c=0,d=a.length;c<d;++c){var f=a[c];if(f!=j&&f<b)b=f}return b};n.arrayMax_=function(a){for(var b=-Infinity,c=0,d=a.length;c<d;++c){var f=a[c];if(f!=j&&f>b)b=f}return b};
n.disposeInternal=function(){Te.superClass_.disposeInternal.call(this);delete this.xLabels_;delete this.leftLabels_;delete this.rightLabels_;delete this.gridX_;delete this.gridY_;delete this.setColors_;delete this.setLegendTexts_;delete this.dataSets_;this.uri_=j;delete this.minValue_;delete this.maxValue_;this.title_=j;delete this.multiAxisType_;delete this.multiAxisLabelText_;delete this.multiAxisLabelPosition_;delete this.multiAxisRange_;delete this.multiAxisLabelStyle_;this.legend_=j};
var Ue=function(a){M.call(this,"uritoolong");this.uri=a};y(Ue,M);p("_G3DWH_PopularityGraph.createGraph",function(a,b,c,d,f,g,l){a=G(a).innerHTML.replace("__GRAPH_IMG_ID__","__popgraph");var m=new Cd;m.setDisposeOnHide(h);m.setContent(a);m.setTitle(c);c=new Dd;c.set("close_button_id",d,k);m.setButtonSet(c);m.setDraggable(h);m.setVisible(h);var t=new V;t.send(b);O(t,"success",function(){var q=t.getResponseJson(),r=new Te("lc");r.setMinValue(0);r.setMaxValue(q.yMax);r.setGridX(q.dateLabels.length-1);r.setGridY(5);for(var w in q.values)r.addDataSet(q.values[w],{CLICK:g,
DOWNLOAD:l}[w]);var H=[];for(w=0;w<6;w++)H[w]=Math.round(w*q.yMax/5);r.setRightLabels(H);r.setXLabels(q.dateLabels);q=r;q.setSize(575,240);q.decorate(G("__popgraph"))});O(t,"error",function(){m.setVisible(k);alert(f)})},undefined);var Xe=function(a,b,c,d,f,g,l,m){var t,q=c.offsetParent;if(q){var r=q.tagName=="HTML"||q.tagName=="BODY";if(!r||cc(q)!="static"){t=hc(q);r||(t=xa(t,new z(q.scrollLeft,q.scrollTop)))}}q=hc(a);r=oc(a);q=new Rb(q.x,q.y,r.width,r.height);(r=jc(a))&&q.intersection(new Rb(r.left,r.top,r.right-r.left,r.bottom-r.top));q=q;r=wb(a);var w=wb(c);if(r.document_!=w.document_){var H=r.document_.body;w=w.getWindow();var K=new z(0,0),Q=Db(E(H)),ma=H;do{var Ia=Q==w?hc(ma):kc(ma);K.x+=Ia.x;K.y+=Ia.y}while(Q&&Q!=w&&
(ma=Q.frameElement)&&(Q=Q.parent));w=K;w=xa(w,hc(H));if(B&&!r.isCss1CompatMode())w=xa(w,r.getDocumentScroll());q.left+=w.x;q.top+=w.y}a=(b&4&&ic(a)?b^2:b)&-5;b=new z(a&2?q.left+q.width:q.left,a&1?q.top+q.height:q.top);if(t)b=xa(b,t);if(f){b.x+=(a&2?-1:1)*f.x;b.y+=(a&1?-1:1)*f.y}var W;if(l)if((W=jc(c))&&t){W.top=Math.max(0,W.top-t.y);W.right-=t.x;W.bottom-=t.y;W.left=Math.max(0,W.left-t.x)}a:{f=b;f=f.clone();t=0;d=(d&4&&ic(c)?d^2:d)&-5;a=oc(c);m=m?m.clone():a;if(g||d!=0){if(d&2)f.x-=m.width+(g?g.right:
0);else if(g)f.x+=g.left;if(d&1)f.y-=m.height+(g?g.bottom:0);else if(g)f.y+=g.top}if(l){t=W?We(f,m,W,l):256;if(t&496){c=t;break a}}dc(c,f);ya(a,m)||nc(c,m);c=t}return c},We=function(a,b,c,d){var f=0;if(a.x<c.left&&d&1){a.x=c.left;f|=1}if(a.x<c.left&&a.x+b.width>c.right&&d&16){b.width-=a.x+b.width-c.right;f|=4}if(a.x+b.width>c.right&&d&1){a.x=Math.max(c.right-b.width,c.left);f|=1}if(d&2)f|=(a.x<c.left?16:0)|(a.x+b.width>c.right?32:0);if(a.y<c.top&&d&4){a.y=c.top;f|=2}if(a.y>=c.top&&a.y+b.height>c.bottom&&
d&32){b.height-=a.y+b.height-c.bottom;f|=8}if(a.y+b.height>c.bottom&&d&4){a.y=Math.max(c.bottom-b.height,c.top);f|=2}if(d&8)f|=(a.y<c.top?64:0)|(a.y+b.height>c.bottom?128:0);return f};var Ye=function(){};Ye.prototype.reposition=function(){};var Ze=function(a,b){this.element=a;this.corner=b};y(Ze,Ye);Ze.prototype.reposition=function(a,b,c){Xe(this.element,this.corner,a,b,undefined,c)};var $e=function(a,b,c){Ze.call(this,a,b);this.adjust_=c};y($e,Ze);$e.prototype.reposition=function(a,b,c,d){var f=Xe(this.element,this.corner,a,b,j,c,10,d)&496;if(f)if(f=Xe(this.element,b,a,this.corner,j,c,10,d)&496)this.adjust_?Xe(this.element,this.corner,a,b,j,c,5,d):Xe(this.element,this.corner,a,b,j,c,0,d)};var af=function(a,b){this.handler_=new wd(this);this.setElement(a||j);b&&this.setType(b)};y(af,U);n=af.prototype;n.element_=j;n.autoHide_=h;n.autoHideRegion_=j;n.isVisible_=k;n.shouldHideAsync_=k;n.lastShowTime_=-1;n.lastHideTime_=-1;n.hideOnEscape_=k;n.enableCrossIframeDismissal_=h;n.type_="toggle_display";n.getType=function(){return this.type_};n.setType=function(a){this.type_=a};n.getElement=function(){return this.element_};n.setElement=function(a){this.ensureNotVisible_();this.element_=a};
n.setAutoHide=function(a){this.ensureNotVisible_();this.autoHide_=a};n.ensureNotVisible_=function(){if(this.isVisible_)e(Error("Can not change this state of the popup while showing."))};n.isVisible=function(){return this.isVisible_};n.setVisible=function(a){a?this.show_():this.hide_()};n.reposition=function(){};
n.show_=function(){if(!this.isVisible_)if(this.onBeforeShow()){if(!this.element_)e(Error("Caller must call setElement before trying to show the popup"));this.reposition();var a=E(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,h);if(this.autoHide_){this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,h);if(B){for(var b=a.activeElement;b&&b.nodeName=="IFRAME";){try{var c,d=undefined;c=d=D?b.document||b.contentWindow.document:b.contentDocument||b.contentWindow.document}catch(f){break}a=
c;b=a.activeElement}this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,h);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_)}if(this.type_=="toggle_display")this.showPopupElement();else this.type_=="move_offscreen"&&this.reposition();this.isVisible_=h;this.onShow_()}};
n.hide_=function(a){if(!this.isVisible_||!this.onBeforeHide_(a))return k;this.handler_&&this.handler_.removeAll();if(this.type_=="toggle_display")this.shouldHideAsync_?vd(this.hidePopupElement_,0,this):this.hidePopupElement_();else this.type_=="move_offscreen"&&this.moveOffscreen_();this.isVisible_=k;this.onHide_(a);return h};n.showPopupElement=function(){this.element_.style.visibility="visible";L(this.element_,h)};
n.hidePopupElement_=function(){this.element_.style.visibility="hidden";L(this.element_,k)};n.moveOffscreen_=function(){this.element_.style.left="-200px";this.element_.style.top="-200px"};n.onBeforeShow=function(){return this.dispatchEvent("beforeshow")};n.onShow_=function(){this.lastShowTime_=na();this.lastHideTime_=-1;this.dispatchEvent("show")};n.onBeforeHide_=function(a){return this.dispatchEvent({type:"beforehide",target:a})};
n.onHide_=function(a){this.lastHideTime_=na();this.dispatchEvent({type:"hide",target:a})};n.onDocumentMouseDown_=function(a){a=a.target;if(!Jb(this.element_,a)&&(!this.autoHideRegion_||Jb(this.autoHideRegion_,a))&&!this.shouldDebounce_())this.hide_(a)};n.onDocumentKeyDown_=function(a){if(a.keyCode==27)if(this.hide_(a.target)){a.preventDefault();a.stopPropagation()}};
n.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=E(this.element_);if(B||hb){if((a=b.activeElement)&&Jb(this.element_,a))return}else if(a.target!=b)return;this.shouldDebounce_()||this.hide_()}};n.shouldDebounce_=function(){return na()-this.lastShowTime_<150};n.disposeInternal=function(){af.superClass_.disposeInternal.call(this);this.handler_.dispose();delete this.element_;delete this.handler_};var bf=function(a,b){this.popupCorner_=4;this.position_=b||undefined;af.call(this,a)};y(bf,af);bf.prototype.setPinnedCorner=function(a){this.popupCorner_=a;this.isVisible()&&this.reposition()};bf.prototype.setPosition=function(a){this.position_=a||undefined;this.isVisible()&&this.reposition()};bf.prototype.setMargin=function(a,b,c,d){this.margin_=a==j||a instanceof Qb?a:new Qb(a,b,c,d);this.isVisible()&&this.reposition()};
bf.prototype.reposition=function(){if(this.position_){var a=!this.isVisible()&&this.getType()!="move_offscreen",b=this.getElement();if(a){b.style.visibility="hidden";L(b,h)}this.position_.reposition(b,this.popupCorner_,this.margin_);a&&L(b,k)}};p("_G3DWH_Utils.createPopup",function(a,b,c,d){a=G(a);var f=new bf(a);f.setAutoHide(h);f.setPinnedCorner(d?2:0);f.setMargin(new Qb(c?c:2,0,0,0));b=G(b);f.setPosition(new $e(b,d?3:1));O(b,"click",function(){f.setVisible(!f.isVisible())})},undefined);var X=function(a,b,c,d,f,g,l,m,t,q,r,w,H,K,Q){this.formIsDisabled_=k;this.isLoggedIn_=a;this.submittedRating_=this.ratingToSubmit_=b;this.submittedReview_=this.reviewToSubmit_=c;this.enterRatingForm_=F("enterRating");this.currentRatingDisplay_=F("currentRatingDisplay");this.currentReviewDisplay_=F("currentReviewDisplay");this.ratingPrompt_=F("ratingPrompt");this.reviewTextBox_=F("reviewText");this.saveButton_=F("saveButton");this.loginForm_=F("loginForm");this.currentRatingsLink_=F("viewRatingsLink");
this.starDescriptions_=d;this.displayStarElementIds_=f;this.displayStarOnClasses_=g;this.displayStarOffClasses_=l;this.ratingEditStarElementIds_=m;this.ratingEditStarOnClasses_=t;this.ratingEditStarOffClasses_=q;this.canSubmitRating_=r;this.rateThisMsg_=w;this.editMsg_=H;this.savingMsg_=K;this.opt_rateEntityDivId_=Q==j?"":Q};p("_G3DWH_RateEntity",X,undefined);
X.prototype.updateInterface=function(a){L(this.enterRatingForm_,a);L(this.ratingPrompt_,!a);this.currentRatingsLink_!=j&&L(this.currentRatingsLink_,!a);T.showHideElement("cannotSave",k);this.enableForm(a);this.setStarRatingDisplay(this.submittedRating_);this.currentReviewDisplay_.innerHTML=this.submittedReview_!==""?Qa(this.submittedReview_):"--";var b=this.submittedRating_>0||this.submittedReview_!=="";L(this.currentRatingDisplay_,!a&&b);b=F("deleteLink");if(a)L(b,k);else if(this.canSubmitRating_)if(this.submittedRating_===
0&&this.submittedReview_===""){this.ratingPrompt_.innerHTML=this.rateThisMsg_;L(b,k)}else{this.ratingPrompt_.innerHTML=this.editMsg_;L(b,h);this.currentRatingsLink_!=j&&L(this.currentRatingsLink_,k)}else{this.ratingPrompt_.style.display="none";this.currentRatingsLink_!=j&&L(this.currentRatingsLink_,k)}};p("_G3DWH_RateEntity.prototype.updateInterface",X.prototype.updateInterface,undefined);
X.prototype.setStarRatingDisplay=function(a){T.showHideElement("yourStarsDisplay",a>0);T.showHideElement("noStarsDisplay",a===0);--a;for(var b=this.displayStarElementIds_.length,c=0;c<b;++c)F(this.displayStarElementIds_[c]).className=c<=a?this.displayStarOnClasses_[c]:this.displayStarOffClasses_[c]};X.prototype.setStarRating=function(a){--a;for(var b=this.ratingEditStarElementIds_.length,c=0;c<b;++c)F(this.ratingEditStarElementIds_[c]).className=c<=a?this.ratingEditStarOnClasses_[c]:this.ratingEditStarOffClasses_[c]};
X.prototype.reparentElement=function(a){if(this.opt_rateEntityDivId_!=""){var b=document.getElementById(this.opt_rateEntityDivId_);b!=a.parentNode&&b.appendChild(a)}};
X.prototype.showRatingForm=function(){if(!this.isLoggedIn_){this.currentRatingsLink_!=j&&L(this.currentRatingsLink_,k);this.reparentElement(this.loginForm_);T.toggleVisible(this.loginForm_);return k}this.reparentElement(this.enterRatingForm_);this.updateInterface(h);this.resetStars();this.reviewTextBox_.value=this.submittedReview_;this.enableForm(h);return k};p("_G3DWH_RateEntity.prototype.showRatingForm",X.prototype.showRatingForm,undefined);
X.prototype.deleteRating=function(){this.enableForm(k);T.showHideElement("deleteConfirm",h);return k};p("_G3DWH_RateEntity.prototype.deleteRating",X.prototype.deleteRating,undefined);X.prototype.hideDeleteConfirmMessage=function(){T.showHideElement("deleteConfirm",k);this.enableForm(h)};p("_G3DWH_RateEntity.prototype.hideDeleteConfirmMessage",X.prototype.hideDeleteConfirmMessage,undefined);
X.prototype.hoverStar=function(a){if(!this.formIsDisabled_){this.setStarRating(a);this.setStatusMessage(this.starDescriptions_[a-1])}};p("_G3DWH_RateEntity.prototype.hoverStar",X.prototype.hoverStar,undefined);X.prototype.resetStars=function(){this.setStarRating(this.ratingToSubmit_);T.showHideElement("starsLeftEdge",this.ratingToSubmit_===0);T.showHideElement("zeroStars",this.ratingToSubmit_>0)};
X.prototype.clickStar=function(a){if(!this.formIsDisabled_){this.setRatingToSubmit(a);T.showHideElement("cannotSave",k)}};p("_G3DWH_RateEntity.prototype.clickStar",X.prototype.clickStar,undefined);X.prototype.setRatingToSubmit=function(a){this.ratingToSubmit_=a;this.resetStars();this.enableForm(!this.formIsDisabled_)};X.prototype.setSubmittedRating=function(a){this.setRatingToSubmit(a);this.submittedRating_=a};X.prototype.setSubmittedReview=function(a){this.reviewToSubmit_=this.submittedReview_=a};
X.prototype.hoverZeroStars=function(a,b){if(!this.formIsDisabled_){F("zeroStars").className=a;this.setStarRating(0);this.setStatusMessage(b)}};p("_G3DWH_RateEntity.prototype.hoverZeroStars",X.prototype.hoverZeroStars,undefined);X.prototype.mouseOutZeroStars=function(a){if(!this.formIsDisabled_){F("zeroStars").className=a;this.resetStars();this.setStatusMessage("")}};p("_G3DWH_RateEntity.prototype.mouseOutZeroStars",X.prototype.mouseOutZeroStars,undefined);
X.prototype.mouseOutStar=function(){if(!this.formIsDisabled_){this.resetStars();this.setStatusMessage("")}};p("_G3DWH_RateEntity.prototype.mouseOutStar",X.prototype.mouseOutStar,undefined);X.prototype.cancelEdit=function(){this.ratingToSubmit_=this.submittedRating_;this.reviewToSubmit_=this.submittedReview_;this.updateInterface(k)};p("_G3DWH_RateEntity.prototype.cancelEdit",X.prototype.cancelEdit,undefined);
X.prototype.submitRatingAndReview=function(a,b,c,d,f,g,l,m,t,q,r){if(!this.formIsDisabled_){this.enableForm(k);if(a){this.ratingToSubmit_=0;this.reviewToSubmit_=""}else if(this.ratingToSubmit_===0&&this.reviewToSubmit_===""){T.showHideElement("cannotSave",h);this.enableForm(h);return}var w=this;a=function(H){try{if(H.type=="complete"){var K=H.target;if(K.isSuccess()){w.setSubmittedRating(w.ratingToSubmit_);w.setSubmittedReview(w.reviewToSubmit_);w.updateInterface(k);if(b)window.location.href=c;else window.location.reload(h)}else{K.getStatus()==
400?alert(f):alert(g);w.enableForm(h)}}}catch(Q){alert(g)}};d=new R(d);d.setParameterValue(m,this.ratingToSubmit_);d.setParameterValue(q,l);d.setParameterValue(t,this.reviewToSubmit_);d.setParameterValue(r,F("securityToken").value);V.send(d.toString(),a,"POST")}};p("_G3DWH_RateEntity.prototype.submitRatingAndReview",X.prototype.submitRatingAndReview,undefined);
X.prototype.typeReviewText=function(a,b){this.reviewToSubmit_=a.value;if(this.reviewToSubmit_.length>=b){this.reviewToSubmit_=this.reviewToSubmit_.slice(0,b-1);a.value=this.reviewToSubmit_}T.showHideElement("cannotSave",k)};p("_G3DWH_RateEntity.prototype.typeReviewText",X.prototype.typeReviewText,undefined);
X.prototype.enableForm=function(a){this.formIsDisabled_=!a;this.reviewTextBox_.disabled=this.formIsDisabled_;this.saveButton_.disabled=this.formIsDisabled_;F("cancelButton").disabled=this.formIsDisabled_;this.setStatusMessage(this.formIsDisabled_?this.savingMsg_:"")};p("_G3DWH_RateEntity.prototype.enableForm",X.prototype.enableForm,undefined);X.prototype.setStatusMessage=function(a){F("statusMessage").innerHTML=a};p("_G3DWH_RateEntity.prototype.setStatusMessage",X.prototype.setStatusMessage,undefined);var cf=function(){};p("_G3DWH_RevisionActionUI",cf,undefined);
cf.prototype.buildRevisionActionDialog_=function(){var a=new Cd;a.setDisposeOnHide(h);var b=G("revision_action_template").innerHTML.replace("__REVISION_ACTION_TEXT_",this.staticText).replace("__REVISION_ACTION_DEFAULT_MSG_",this.defaultMessage).replace("__REVISION_ACTION_TEXTBOX_ID__","revision_action_textarea");a.setContent(b);a.setTitle(this.title);b=new Dd;b.set("revision_action_accept_id",this.okButtonText,k);b.set("cancel",this.cancelButtonText,k,h);a.setButtonSet(b);a.setDraggable(h);b=x(function(c){if(c.key!==
"cancel"){if(!this.clearMessageBox)this.form[this.messageId].value=Qa(G("revision_action_textarea").value);this.form.submit();c=yb("input");for(var d=0;d<c.length;d++)c[d].disabled=h}},this);O(a,"dialogselect",b);return a};
cf.prototype.confirmRevisionAction=function(a,b,c,d,f,g,l){this.title=c;this.okButtonText=d;this.cancelButtonText=f;this.defaultMessage=g;this.form=a;this.messageId=b;this.staticText=l;this.clearMessageBox=h;this.buildRevisionActionDialog_().setVisible(h);O(G("revision_action_textarea"),"click",x(this.clearMessageBox_,this));return k};p("_G3DWH_RevisionActionUI.prototype.confirmRevisionAction",cf.prototype.confirmRevisionAction,undefined);
cf.prototype.clearMessageBox_=function(){if(this.clearMessageBox){G("revision_action_textarea").value="";G("revision_action_textarea").style.color="#000000"}this.clearMessageBox=k};var df=function(a){U.call(this);this.window_=a||window;this.listenerKey_=O(this.window_,"resize",this.handleResize_,k,this);this.size_=Bb(this.window_);if(this.isPollingRequired_())this.windowSizePollInterval_=window.setInterval(x(this.checkForSizeChange_,this),500)};y(df,U);n=df.prototype;n.listenerKey_=j;n.window_=j;n.size_=j;n.windowSizePollInterval_=j;n.isPollingRequired_=function(){return D&&lb||hb&&this.window_.self!=this.window_.top};
n.getSize=function(){return this.size_?this.size_.clone():j};n.disposeInternal=function(){df.superClass_.disposeInternal.call(this);if(this.listenerKey_){Lc(this.listenerKey_);this.listenerKey_=j}if(this.windowSizePollInterval_){window.clearInterval(this.windowSizePollInterval_);this.windowSizePollInterval_=j}this.size_=this.window_=j};n.handleResize_=function(){this.checkForSizeChange_()};n.checkForSizeChange_=function(){var a=Bb(this.window_);if(!ya(a,this.size_)){this.size_=a;this.dispatchEvent("resize")}};var ef;
(function(){function a(m){m=m.match(/[\d]+/g);m.length=3;return m.join(".")}var b=k,c="";if(navigator.plugins&&navigator.plugins.length){var d=navigator.plugins["Shockwave Flash"];if(d){b=h;if(d.description)c=a(d.description)}if(navigator.plugins["Shockwave Flash 2.0"]){b=h;c="2.0.0.11"}}else if(navigator.mimeTypes&&navigator.mimeTypes.length){if(b=(d=navigator.mimeTypes["application/x-shockwave-flash"])&&d.enabledPlugin)c=a(d.enabledPlugin.description)}else try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");b=
h;c=a(d.GetVariable("$version"))}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=h;c="6.0.21"}catch(g){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");b=h;c=a(d.GetVariable("$version"))}catch(l){}}}ef=c})();var Y=function(a,b,c){var d=ff;this.mapEl=G(d.MAP);this.panoEl=G(d.PANO);this.tweakerContainerEl=G(d.TWEAKER_CONTAINER);this.mapPanelEl=G(d.MAP_PANEL);this.selectButtonEl=G(d.SELECT_BUTTON);this.doneButtonsEl=G(d.DONE_BUTTONS);this.buttonsPanelEl=G(d.BUTTONS_PANEL);this.addressEl=G(d.ADDRESS);this.goButtonEl=G(d.GO_BUTTON);this.expandButtonEl=G(d.EXPAND_BUTTON);this.eulaEl=G(d.EULA_CONTAINER);this.addressNotFoundMsg_=a;this.window_=c||window;a=parseFloat(ef);if(a<9||isNaN(a))this.window_.setTimeout(x(function(){this.window_.location.href=
"skp:get_flash"},this),10);this.expanded_=h;this.region_="";a=new GLatLng(40.017,-105.283);L(this.doneButtonsEl,k);this.pano_=new GStreetviewPanorama(this.panoEl);this.map_=new GMap2(this.mapEl);this.map_.setCenter(a,17);this.map_.enableScrollWheelZoom();this.map_.setMapType(G_HYBRID_MAP);c=new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(10,10));this.map_.addControl(new GSmallZoomControl3D,c);this.map_.addOverlay(new GStreetviewOverlay);this.map_.enableContinuousZoom();this.iconPath_=b;this.icon_=
new GIcon;this.icon_.image=this.iconPath_+"fov0.png";this.icon_.iconSize=new GSize(36,36);this.icon_.dragCrossSize=new GSize(15,15);this.icon_.iconAnchor=new GPoint(17,24);this.marker_=new GMarker(a,{draggable:h,icon:this.icon_});GEvent.addListener(this.marker_,"dragend",x(this.onDragMarker,this));this.map_.addOverlay(this.marker_);this.targetIcon_=new GIcon;this.targetIcon_.image=this.iconPath_+"target.png";this.targetIcon_.iconSize=new GSize(16,16);this.targetIcon_.iconAnchor=new GPoint(8,8);this.targetMarker_=
new GMarker(a,{icon:this.targetIcon_});this.map_.addOverlay(this.targetMarker_);this.geocoder_=new GClientGeocoder;this.client_=new GStreetviewClient;this.vsm_=new df(window);GEvent.addListener(this.map_,"click",x(this.onMapClick,this));GEvent.addListener(this.pano_,"yawchanged",x(this.onYawChanged,this));GEvent.addListener(this.pano_,"initialized",x(this.onPanoInitialized,this));O(this.vsm_,"resize",x(this.onResize,this));O(window,"unload",GUnload,h,this);b=b+"tweaker.swf?"+Math.random();this.tweakerContainerEl.innerHTML=
['<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="tweaker"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="',b,'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="swLiveConnect" value="true" /><param name="salign" value="lt" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="',
b,'"  quality="high" scale="noscale" swLiveConnect="true" salign="lt"  wmode="transparent" bgcolor="#ffffff"  style="position:absolute; z-index:5"  name="tweaker" align="middle" allowScriptAccess="always"  allowFullScreen="false" type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'].join("");this.tweakerEl=G(d.TWEAKER);this.onResize()};p("_G3DWH_SketchUpTextures",Y,undefined);
var ff={MAP:"streetview-map",PANO:"streetview-pano",MAP_PANEL:"streetview-mappanel",TWEAKER:"tweaker",TWEAKER_CONTAINER:"tweaker-container",SELECT_BUTTON:"select-button",DONE_BUTTONS:"done-buttons",BUTTONS_PANEL:"buttons-panel",ADDRESS:"address",GO_BUTTON:"go-button",EULA_CONTAINER:"eula-container",EXPAND_BUTTON:"streetview-expand-button"};
Y.prototype.select=function(a){this.window_.location.href="skp:pull_selected_shape@oncomplete="+a;this.window_.setTimeout(x(function(){L(this.mapPanelEl,this.expanded_);L(this.selectButtonEl,k);L(this.doneButtonsEl,h);Zb(this.tweakerEl,"top","0px")},this),10)};p("_G3DWH_SketchUpTextures.prototype.select",Y.prototype.select,undefined);Y.prototype.cancel=function(){L(this.mapPanelEl,h);L(this.doneButtonsEl,k);L(this.selectButtonEl,h);Zb(this.tweakerEl,"top","5000px")};
p("_G3DWH_SketchUpTextures.prototype.cancel",Y.prototype.cancel,undefined);Y.prototype.grab=function(a){L(this.doneButtonsEl,k);Zb(this.tweakerEl,"top","5000px");var b="skp:grab@region="+this.region_;if(a)b+="&oncomplete="+a;if(this.expanded_){a=this.vsm_.getSize();var c=oc(this.mapPanelEl);b+="&top_left_x=0&top_left_y=0&bottom_right_x="+a.width+"&bottom_right_y="+(a.height-c.height)}this.window_.setTimeout(x(function(){this.window_.location.href=b},this),0)};
p("_G3DWH_SketchUpTextures.prototype.grab",Y.prototype.grab,undefined);n=Y.prototype;n.onMapClick=function(a,b){if(b){this.pano_.setLocationAndPOV(b);this.marker_.setLatLng(b);this.map_.setCenter(b)}};
n.onYawChanged=function(){var a=this.pano_.getPOV(),b=this.marker_.getLatLng();a=a.yaw+22.5;if(a>360)a-=360;a=Math.floor(a/45)*45;this.icon_.image=this.iconPath_+"fov"+a+".png";this.map_.removeOverlay(this.marker_);this.marker_=new GMarker(b,{draggable:h,icon:this.icon_});GEvent.addListener(this.marker_,"dragend",x(this.onDragMarker,this));this.map_.addOverlay(this.marker_);this.storeUiState()};
n.onPanoInitialized=function(a){this.marker_.setLatLng(a.latlng);this.map_.setCenter(a.latlng);this.lookupAddress(a.latlng);this.storeUiState()};n.onDragMarker=function(){var a=this.marker_.getLatLng();this.pano_.setLocationAndPOV(a);this.map_.setCenter(a);this.setTweakerShape("",1,1,"100,300:300,300:300,100:100,100");this.region_="100,300:300,300:300,100:100,100";this.storeUiState()};n.setAddress=function(a){this.geocoder_&&this.geocoder_.getLatLng(a,x(this.onSetAddress,this))};
p("_G3DWH_SketchUpTextures.prototype.setAddress",Y.prototype.setAddress,undefined);Y.prototype.onSetAddress=function(a){if(a){this.map_.setCenter(a,17);this.marker_.setLatLng(a);this.pano_.setLocationAndPOV(a)}else alert(this.addressNotFoundMsg_)};
Y.prototype.onResize=function(){var a=this.vsm_.getSize(),b=oc(this.buttonsPanelEl);dc(this.buttonsPanelEl,a.width-b.width,0);var c,d=oc(this.goButtonEl),f=oc(this.addressEl);nc(this.addressEl,0,f.height);if(this.expanded_){c=Math.floor(a.height/3);nc(this.mapEl,a.width-7+1,c);nc(this.mapPanelEl,a.width+1,c+29);b=oc(this.mapPanelEl);dc(this.mapPanelEl,-1,a.height-b.height);nc(this.panoEl,a.width,a.height-c)}else{c=200;nc(this.mapEl,c,c);nc(this.mapPanelEl,c+7,c+29);b=oc(this.mapPanelEl);dc(this.mapPanelEl,
a.width-b.width,a.height-b.height);nc(this.panoEl,a.width,a.height)}b=oc(this.mapEl);nc(this.addressEl,b.width-d.width-10,f.height);this.map_.checkResize();this.pano_.checkResize();this.map_.setCenter(this.marker_.getLatLng())};Y.prototype.onGrabComplete=function(){this.cancel()};p("_G3DWH_SketchUpTextures.prototype.onGrabComplete",Y.prototype.onGrabComplete,undefined);Y.prototype.setRegionFromTweaker=function(a){this.region_=a;this.storeUiState()};
p("_G3DWH_SketchUpTextures.prototype.setRegionFromTweaker",Y.prototype.setRegionFromTweaker,undefined);Y.prototype.setTweakerShape=function(a,b,c,d,f,g){try{f&&g&&this.targetMarker_.setLatLng(new GLatLng(f,g));B?window.tweaker.setTweakerShape(a,b,c,d):document.tweaker.setTweakerShape(a,b,c,d)}catch(l){}};p("_G3DWH_SketchUpTextures.prototype.setTweakerShape",Y.prototype.setTweakerShape,undefined);
Y.prototype.storeUiState=function(){var a={},b=this.marker_.getLatLng();a.address=this.addressEl.value;a.lat=b.lat();a.lng=b.lng();b=this.pano_.getPOV();a.yaw=b.yaw;a.pitch=b.pitch;a.zoom=b.zoom;a.region=this.region_;b=this.vsm_.getSize();a.windowWidth=b.width;a.windowHeight=b.height;this.window_.location.href="skp:store_ui_state@key=streetview&state="+(new ce).serialize(a)};Y.prototype.pullUiState=function(a){this.window_.location.href="skp:pull_ui_state@oncomplete="+a};
p("_G3DWH_SketchUpTextures.prototype.pullUiState",Y.prototype.pullUiState,undefined);
Y.prototype.onPullUiStateComplete=function(a){var b,c,d,f;a.agreedToEula||Zb(this.eulaEl,"display","block");if(a.selectionLat){b=new GLatLng(a.selectionLat,a.selectionLng);this.targetMarker_.setLatLng(b)}if(a.selectionOffsetLat)b=new GLatLng(a.selectionOffsetLat,a.selectionOffsetLng);if(a.streetview&&!a.shadow_info.hasChanged){b||(b=new GLatLng(a.streetview.lat,a.streetview.lng));F("address").value=a.streetview.address;c=a.streetview.yaw;d=a.streetview.pitch;f=a.streetview.zoom;this.marker_.setLatLng(b);
this.map_.setCenter(b);a.streetview.region&&this.window_.setTimeout(x(function(){this.setTweakerShape("",1,1,a.streetview.region)},this),20)}else{b||(b=new GLatLng(a.shadow_info.lat,a.shadow_info.lng));this.marker_.setLatLng(b);this.map_.setCenter(b);this.lookupAddress(b);f=d=c=0}this.pano_.setLocationAndPOV(b,{yaw:c,pitch:d,zoom:f});this.client_.getNearestPanoramaLatLng(b,x(this.onPanoFirstLoad,this))};
p("_G3DWH_SketchUpTextures.prototype.onPullUiStateComplete",Y.prototype.onPullUiStateComplete,undefined);Y.prototype.lookupAddress=function(a){a!=j&&this.geocoder_.getLocations(a,function(b){if(!b||b.Status.code!=200)F("address").value="";else{b=b.Placemark[0];F("address").value=b.address}})};Y.prototype.onPanoFirstLoad=function(a){if(a!=j){this.marker_.setLatLng(a);this.map_.setCenter(a)}else alert(this.addressNotFoundMsg_)};
Y.prototype.toggleMapSize=function(){if(this.expanded_){this.expanded_=k;this.expandButtonEl.className=""}else{this.expanded_=h;this.expandButtonEl.className="expanded"}this.onResize()};p("_G3DWH_SketchUpTextures.prototype.toggleMapSize",Y.prototype.toggleMapSize,undefined);Y.prototype.agreeToEula=function(){L(this.eulaEl,k);this.window_.location.href="skp:agree_to_eula"};p("_G3DWH_SketchUpTextures.prototype.agreeToEula",Y.prototype.agreeToEula,undefined);var gf=function(a){U.call(this);this.element_=a;this.listenKey_=O(this.element_,C?"DOMMouseScroll":"mousewheel",this)};y(gf,U);gf.prototype.handleEvent=function(a){var b=0;a=a.event_;var c="vertical";if(a.type=="mousewheel"){b=-a.wheelDelta/40;if(D){pb("530.4")||(b/=3);if(a.wheelDeltaX)c="horizontal"}}else b=a.detail;if(typeof a.axis!="undefined"&&typeof a.HORIZONTAL_AXIS!="undefined"&&a.axis==a.HORIZONTAL_AXIS)c="horizontal";if(b>100)b=3;else if(b<-100)b=-3;b=new hf(b,a,c);try{this.dispatchEvent(b)}finally{b.dispose()}};
gf.prototype.disposeInternal=function(){gf.superClass_.disposeInternal.call(this);Lc(this.listenKey_);delete this.listenKey_};var hf=function(a,b,c){tc.call(this,b);this.type="mousewheel";this.axis=c||"vertical";this.detail=a};y(hf,tc);var jf=function(a,b,c,d,f,g,l){this.nPreloadImages_=c;this.imageUrls_=b;this.swivelContents_=F(a);this.swivelContents_.style.position="relative";this.swivelSize_=new A(d,f);this.imageSize_=new A(g,l)};p("_G3DWH_Swivel",jf,undefined);jf.prototype.zoomFadeFx_=j;
jf.prototype.initImages=function(){var a=this.imageUrls_.length;this.imageArray_=new Array(a);if(!this.imageSize_.fitsInside(this.swivelSize_))this.imageSize_=this.imageSize_.scaleToFit(this.swivelSize_);this.leftIncrement_=0;var b=this.swivelSize_.width-this.imageSize_.width;if(b>0)this.leftIncrement_=Math.floor(b/2);this.topIncrement_=0;b=this.swivelSize_.height-this.imageSize_.height;if(b>0)this.topIncrement_=Math.floor(b/2);b=0;for(var c=[],d=a/this.nPreloadImages_;b<a;){this.createImage(b);b++;
if(b>=a)break;for(var f=1;f<d;f++){c.push(b);this.imageArray_[b]=j;b++;if(b>=a)break}}this.initDisplay(c)};p("_G3DWH_Swivel.prototype.initImages",jf.prototype.initImages,undefined);
jf.prototype.createImage=function(a){var b=I("img",{src:this.imageUrls_[a]});this.imageArray_[a]=b;b.style.width=this.imageSize_.width;b.style.height=this.imageSize_.height;b.style.left=this.leftIncrement_+"px";b.style.top=this.topIncrement_+"px";b.style.overflow="hidden";b.style.position="relative";b.style.zIndex="2";this.hideImage(b);this.swivelContents_.appendChild(b)};
jf.prototype.initDisplay=function(a){this.initHelpIcon();this.initZoomIndicator();this.mouseY_=this.mouseX_=this.mouseXOrig_=this.addToPos_=this.currentPos_=0;this.mouseIsDown_=k;this.currentZoom_=1;var b=I("div",{"class":"sheet"});this.swivelContents_.appendChild(b);b.id="sheet";b.style.width=this.swivelSize_.width+"px";b.style.height=this.swivelSize_.height+"px";O(this.swivelContents_,"mousemove",this.doMouseMove,h,this);O(this.swivelContents_,"mousedown",this.doMouseDown,k,this);O(this.swivelContents_,
"mouseup",this.doMouseUp,h,this);O(this.swivelContents_,"mouseover",this.doMouseIn,k,this);O(this.swivelContents_,"mouseout",this.doMouseOut,k,this);var c=new gf(this.swivelContents_);O(c,"mousewheel",this.zoom,k,this);qc(b,0);for(b=this.currentPos_=0;b<a.length;b++)this.createImage(a[b]);this.showImage(this.currentPos_,1)};p("_G3DWH_Swivel.prototype.initDisplay",jf.prototype.initDisplay,undefined);n=jf.prototype;
n.initHelpIcon=function(){var a="/reussir/skin/images/arrows_curved_small.gif";if(B)a="/reussir/skin/images/arrows_curved_small.gif";this.helpIcon_=I("img",{src:a,"class":"helpIcon"});this.helpIcon_.id="helpIcon";a=new A(200,90);a.fitsInside(this.swivelSize_)||(a=a.scaleToFit(this.swivelSize_));this.helpIcon_.style.width=a.width+"px";this.helpIcon_.style.height=a.height+"px";this.helpIcon_.style.left=Math.floor((this.swivelSize_.width-a.width)/2);this.helpIcon_.style.top=Math.floor((this.swivelSize_.height-a.height)/2);this.swivelContents_.appendChild(this.helpIcon_)};
n.initZoomIndicator=function(){var a="color:gray;position:absolute;top:0;left:0;z-index:3;";if(B&&!pb("7"))a+="background-color:white;";this.zoomIndicator_=I("span",{style:a});this.swivelContents_.appendChild(this.zoomIndicator_)};n.doMouseIn=function(a){if(this.mouseIsDown_){a.stopPropagation();a.preventDefault()}else this.cursorSwivel(a)};n.doMouseOut=function(a){if(this.mouseIsDown_){a.stopPropagation();a.preventDefault()}else{this.doMouseUp(a);this.cursorDefault()}};
n.doMouseDown=function(a){a.stopPropagation();a.preventDefault();P(this.swivelContents_,"mouseover",this.doMouseIn,k,this);P(this.swivelContents_,"mouseout",this.doMouseOut,k,this);T.showHideElement(this.helpIcon_,k);this.cursorSwivel(a);this.getMouseXY(a);this.mouseXOrig_=this.mouseX_;this.mouseYOrig_=this.mouseY_;this.addToPos_=0;this.mouseIsDown_=h};
n.doMouseUp=function(a){a.stopPropagation();a.preventDefault();O(this.swivelContents_,"mouseover",this.doMouseIn,k,this);O(this.swivelContents_,"mouseout",this.doMouseOut,k,this);this.currentPos_+=this.addToPos_;this.mouseIsDown_=k;this.cursorSwivel(a)};n.doMouseMove=function(a){if(this.mouseIsDown_){a.stopPropagation();a.preventDefault();a.shiftKey?this.doPan(a):this.doRotate(a)}else this.cursorSwivel(a)};
n.doRotate=function(a){this.getMouseXY(a);a=this.imageUrls_.length;this.addToPos_=Math.floor((this.mouseX_-this.mouseXOrig_)/(this.swivelSize_.width/a));if(this.addToPos_!=0){var b=(this.currentPos_+this.addToPos_)%a;b=b<0?a+b:b;if(this.hasLoadedInBrowser(this.imageArray_[b])){for(var c=0;c<a;c++)this.imageArray_[c]!=j&&this.hideImage(this.imageArray_[c]);this.showImage(b,1)}}return k};
n.doPan=function(a){this.mouseXOrig_=this.mouseX_;this.mouseYOrig_=this.mouseY_;this.getMouseXY(a);this.leftIncrement_-=this.mouseXOrig_-this.mouseX_;this.topIncrement_-=this.mouseYOrig_-this.mouseY_;a=Math.floor(this.imageSize_.width*this.currentZoom_);var b=Math.floor(this.imageSize_.height*this.currentZoom_);this.leftIncrement_=Math.min(Math.max(this.leftIncrement_,-a),this.swivelSize_.width);this.topIncrement_=Math.min(Math.max(this.topIncrement_,-b),this.swivelSize_.height);a=this.imageArray_.length;
for(b=0;b<a;b++){var c=this.imageArray_[b];c.style.top=this.topIncrement_+"px";c.style.left=this.leftIncrement_+"px"}};n.hasLoadedInBrowser=function(a){if(!a||!a.complete)return k;if(typeof a.naturalWidth!="undefined"&&a.naturalWidth==0)return k;return h};n.getMouseXY=function(a){if(B){this.mouseX_=a.clientX+document.body.scrollLeft;this.mouseY_=a.clientY+document.body.scrollTop;if(this.mouseX_<0)this.mouseX_=0;if(this.mouseY_<0)this.mouseY_=0}else{this.mouseX_=a.offsetX;this.mouseY_=a.offsetY}};
n.hideImage=function(a){T.showHideElement(a,k)};n.showImage=function(a,b){var c=this.imageArray_[a];if(this.hasLoadedInBrowser(c)){T.showHideElement(c,h);this.cursorSwivel()}else if(b<11){this.cursorWait();b++;o.setTimeout(x(this.showImage,this,a,b),1000)}else this.cursorSwivel()};n.cursorWait=function(){document.body.style.cursor="wait"};n.cursorSwivel=function(a){document.body.style.cursor=a&&a.shiftKey?"move":"col-resize"};n.cursorDefault=function(){document.body.style.cursor="default"};
n.removeSwivelListeners=function(){P(this.swivelContents_,"mousemove",this.doRotate,h,this);P(this.swivelContents_,"mousedown",this.doMouseDown,k,this);P(this.swivelContents_,"mouseup",this.doMouseUp,h,this);P(this.swivelContents_,"mouseover",this.doMouseIn,k,this);P(this.swivelContents_,"mouseout",this.doMouseOut,k,this)};p("_G3DWH_Swivel.prototype.removeSwivelListeners",jf.prototype.removeSwivelListeners,undefined);
jf.prototype.zoom=function(a){a.stopPropagation();a.preventDefault();var b=a.detail>0?-0.25:0.25;if(!(this.currentZoom_==0.5&&b<0||this.currentZoom_==4&&b>0)){var c=Math.floor(this.imageSize_.width*this.currentZoom_),d=Math.floor(this.imageSize_.height*this.currentZoom_),f=this.leftIncrement_+c/2,g=this.topIncrement_+d/2;this.getMouseXY(a);a=(this.mouseX_-f)/this.currentZoom_;var l=(this.mouseY_-g)/this.currentZoom_,m=this.currentZoom_;this.currentZoom_+=b;this.currentZoom_=Math.min(Math.max(this.currentZoom_,
0.5),4);c=Math.floor(this.imageSize_.width*this.currentZoom_);d=Math.floor(this.imageSize_.height*this.currentZoom_);a*=this.currentZoom_;l*=this.currentZoom_;if(b>0){f=this.mouseX_-a;g=this.mouseY_-l}else{b=(this.currentZoom_-0.5)/(m-0.5);f=b*f+(1-b)*this.swivelSize_.width/2;g=b*g+(1-b)*this.swivelSize_.height/2}this.leftIncrement_=Math.floor(f-c/2);this.topIncrement_=Math.floor(g-d/2);this.leftIncrement_=Math.min(Math.max(this.leftIncrement_,-c),this.swivelSize_.width);this.topIncrement_=Math.min(Math.max(this.topIncrement_,
-d),this.swivelSize_.height);f=this.imageArray_.length;for(g=0;g<f;g++){b=this.imageArray_[g];b.style.width=c;b.style.height=d;b.style.top=this.topIncrement_+"px";b.style.left=this.leftIncrement_+"px"}this.zoomIndicator_.innerHTML=this.currentZoom_*100+"%";if(this.zoomFadeFx_!=j){this.zoomFadeFx_.stop(k);qc(this.zoomIndicator_,1)}T.showHideElement(this.zoomIndicator_,h);if(this.zoomFadeFx_==j)this.zoomFadeFx_=new Fe(this.zoomIndicator_,1000);this.zoomFadeFx_.play(h);T.showHideElement(this.helpIcon_,
k)}};var kf=function(a,b,c,d,f,g,l,m,t){var q;q=[];if(a.length){q.push(a[0]);for(var r=1;r<a.length;r++)r%2?q.unshift(a[r]):q.push(a[r])}this.entries=q=q;this.container=F(b);this.titleElement=F(l);this.maxWidth=c;this.maxHeight=d;this.containerSize=new A(m,t);this.containerCenter=new z(this.containerSize.width/2,this.containerSize.height/2);this.containerShield=I("div",{style:"position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000"});this.container.appendChild(this.containerShield);this.images=
[];this.imageSizes=[];this.imagePositions=[];this.opacities=[];this.zIndex=[];for(b=0;b<a.length;b++){c=a.length*2-2-b;d=(b+1)/a.length;this.imageSizes[b]=new A(Math.round(d*this.maxWidth),Math.round(d*this.maxHeight));l=Math.round((this.containerCenter.x-this.maxWidth/2)*d*d);m=Math.round((this.containerSize.height-this.imageSizes[b].height)/2);this.imagePositions[b]=new z(l,m);this.opacities[b]=d;this.zIndex[b]=Math.round(d*100);if(c!=b){this.imageSizes[c]=this.imageSizes[b];this.imagePositions[c]=
new z(Math.round(this.containerSize.width-this.imagePositions[b].x-this.imageSizes[b].width),this.imagePositions[b].y);this.opacities[c]=d;this.zIndex[c]=this.zIndex[b]}else this.zIndex[c]=1100}this.currentFocus=Math.round(a.length/2)-1;for(b=0;b<a.length&&a[b];b++){c=b+this.currentFocus;this.images[b]=I("img",{src:this.entries[b].imageUrl,height:this.imageSizes[c].height,width:this.imageSizes[c].width,style:this.createInitialThumbnailStyle(c)});this.container.appendChild(this.images[b])}this.updateTitle();
O(F(f),"click",this.moveDown,h,this);O(F(g),"click",this.moveUp,h,this);O(this.container,"mousedown",this.startDrag,k,this);this.dragStartX=0;this.currentDragScrolled=k;a=new gf(this.container);O(a,"mousewheel",this.handleMouseWheel,k,this);this.mouseWheelCount=0};
p("coverflow",kf,undefined);var lf={"class":"smaller"};n=kf.prototype;n.titleFiller=j;
n.createInitialThumbnailStyle=function(a){return["border:1px solid #999;position:absolute;top:",this.imagePositions[a].y,"px;left:",this.imagePositions[a].x,"px;z-index:",this.zIndex[a],";opacity:",this.opacities[a],";",this.createAlphaFilter(this.opacities[a]),";"].join("")};
n.startDrag=function(a){a.stopPropagation();a.preventDefault();O(this.container,"mousemove",this.moveDrag,h,this);O(this.container,"mouseup",this.endDrag,h,this);this.dragStartX=lc(a,this.container).x;this.currentDragScrolled=k};n.moveDrag=function(a){a.stopPropagation();a.preventDefault();if(!this.currentScroll){a=lc(a,this.container).x;if(this.dragStartX&&Math.abs(this.dragStartX-a)>10){var b=Math.round((a-this.dragStartX)/10);this.dragStartX=a;this.currentDragScrolled=h;this.scrollBy(b)}}};
n.endDrag=function(a){P(this.container,"mousemove",this.moveDrag,h,this);P(this.container,"mouseup",this.endDrag,h,this);if(!this.currentDragScrolled&&a.type=="mouseup"){a=lc(a,this.container);if(this.dragStartX&&Math.abs(this.dragStartX-a.x)<5){for(var b=-1,c=-1,d=0;d<this.entries.length;d++){var f=d+this.currentFocus;if(this.zIndex[f]>c)if((new Rb(this.imagePositions[f].x,this.imagePositions[f].y,this.imageSizes[f].width,this.imageSizes[f].height)).toBox().contains(a)){c=this.zIndex[f];b=this.entries.length-
1-d}}if(b==this.currentFocus)window.open(this.entries[this.getCurrentIndex()].detailsUrl);else b!=-1&&this.focus(b,j)}}this.dragStartX=0;this.currentDragScrolled=k};
n.handleMouseWheel=function(a){if(a){a.stopPropagation();a.preventDefault()}a=a?a.detail>0?1:-1:0;if(this.mouseWheelCount>0&&a<0||this.mouseWheelCount<0&&a>0)this.mouseWheelCount=0;if(this.currentScroll){this.mouseWheelCount+=a;var b=this}else{if(a=this.scrollBy(a+this.mouseWheelCount)){b=this;O(a,"end",function(){b.handleMouseWheel(j)})}this.mouseWheelCount=0}};
n.scrollBy=function(a){if(a<0&&this.currentFocus>0){a=Math.max(0,this.currentFocus+a);return this.focus(a,j)}else if(a>0&&this.currentFocus<this.entries.length-1){a=Math.min(this.entries.length-1,this.currentFocus+a);return this.focus(a,j)}return j};n.focus=function(a){if(a!==this.currentFocus){this.images[this.getCurrentIndex()].style.cursor="default";var b=this.currentFocus;this.currentFocus=a;a=new mf(this,b,this.currentFocus);a.play();return a}return j};n.moveUp=function(){this.scrollBy(-1)};
n.moveDown=function(){this.scrollBy(1)};n.updateTitle=function(){var a=this.getCurrentIndex(),b=this.entries[a].title;this.replaceTitleElement(I("span",lf,I("a",{href:this.entries[a].detailsUrl,target:"_blank"},b)));this.images[this.getCurrentIndex()].style.cursor="pointer";};
n.clearTitle=function(){if(!this.titleFiller)this.titleFiller=I("span",lf,"loading...");this.replaceTitleElement(this.titleFiller)};n.replaceTitleElement=function(a){Hb(this.titleElement);this.titleElement.appendChild(a)};n.getCurrentIndex=function(){return this.images.length-1-this.currentFocus};n.createAlphaFilter=function(a){return["alpha(opacity=",Math.round(a*100),")"].join("")};var mf=function(a,b,c){xe.call(this,[0],[1],200,we);this.gallery=a;this.oldFocus=b;this.currentFocus=c;O(this,["begin","animate","end"],this.scroll,k,this);a.currentScroll=this};y(mf,xe);mf.prototype.scroll=function(a){for(var b=a.x,c=0;c<this.gallery.images.length;c++){var d=c+this.oldFocus,f=c+this.currentFocus;this.gallery.images[c].style.height=this.getNextValue(this.gallery.imageSizes[d].height,this.gallery.imageSizes[f].height,b);this.gallery.images[c].style.width=this.getNextValue(this.gallery.imageSizes[d].width,this.gallery.imageSizes[f].width,b);this.gallery.images[c].style.top=this.getNextValue(this.gallery.imagePositions[d].y,this.gallery.imagePositions[f].y,b);this.gallery.images[c].style.left=this.getNextValue(this.gallery.imagePositions[d].x,this.gallery.imagePositions[f].x,b);this.gallery.images[c].style.zIndex=this.getNextValue(this.gallery.zIndex[d],this.gallery.zIndex[f],b);this.gallery.images[c].style.opacity=this.getNextValue(this.gallery.opacities[d],this.gallery.opacities[f],b);this.gallery.images[c].style.filter=this.gallery.createAlphaFilter(this.getNextValue(this.gallery.opacities[d],this.gallery.opacities[f],b))}if(a.type=="play"||a.type=="begin")this.gallery.clearTitle();else if(a.type=="end"){this.gallery.currentScroll=j;this.gallery.updateTitle()}};mf.prototype.getNextValue=function(a,b,c){return a+(b-a)*c};function nf(a,b,c){this.fieldsHidden_={};this.chooserElement_=F(a);this.chooserMessage_=b;this.showAllMessage_=c;this.defaultTextHeaderElement_=j}p("_G3DWH_TranslationFields",nf,undefined);