var COMPILED=true;var goog=goog||{};goog.global=this;goog.DEBUG=true;goog.LOCALE="en";goog.evalWorksForGlobals_=null;goog.provide=function(name){if(!COMPILED){if(goog.getObjectByName(name)&&!goog.implicitNamespaces_[name])throw Error('Namespace "'+name+'" already declared.');for(var namespace=name;namespace=namespace.substring(0,namespace.lastIndexOf("."));)goog.implicitNamespaces_[namespace]=true}goog.exportPath_(name)};if(!COMPILED)goog.implicitNamespaces_={};
goog.exportPath_=function(name,opt_object,opt_objectToExportTo){var parts=name.split(".");var cur=opt_objectToExportTo||goog.global;if(!(parts[0]in cur)&&cur.execScript)cur.execScript("var "+parts[0]);for(var part;parts.length&&(part=parts.shift());)if(!parts.length&&goog.isDef(opt_object))cur[part]=opt_object;else if(cur[part])cur=cur[part];else cur=cur[part]={}};
goog.getObjectByName=function(name,opt_obj){var parts=name.split(".");var cur=opt_obj||goog.global;for(var part;part=parts.shift();)if(cur[part])cur=cur[part];else return null;return cur};goog.globalize=function(obj,opt_global){var global=opt_global||goog.global;for(var x in obj)global[x]=obj[x]};
goog.addDependency=function(relPath,provides,requires){if(!COMPILED){var provide;var require;var path=relPath.replace(/\\/g,"/");var deps=goog.dependencies_;for(var i=0;provide=provides[i];i++){deps.nameToPath[provide]=path;if(!(path in deps.pathToNames))deps.pathToNames[path]={};deps.pathToNames[path][provide]=true}for(var j=0;require=requires[j];j++){if(!(path in deps.requires))deps.requires[path]={};deps.requires[path][require]=true}}};
goog.require=function(rule){if(!COMPILED){if(goog.getObjectByName(rule))return;var path=goog.getPathFromDeps_(rule);if(path){goog.included_[path]=true;goog.writeScripts_()}else if(goog.useStrictRequires)throw new Error("goog.require could not find: "+rule);}};goog.useStrictRequires=false;goog.basePath="";goog.global.CLOSURE_BASE_PATH;goog.global.CLOSURE_NO_DEPS;goog.nullFunction=function(){};goog.identityFunction=function(var_args){return arguments[0]};
goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(ctor){ctor.getInstance=function(){return ctor.instance_||(ctor.instance_=new ctor)}};
if(!COMPILED){goog.included_={};goog.dependencies_={pathToNames:{},nameToPath:{},requires:{},visited:{},written:{}};goog.inHtmlDocument_=function(){var doc=goog.global.document;return typeof doc!="undefined"&&"write"in doc};goog.findBasePath_=function(){if(!goog.inHtmlDocument_())return;var doc=goog.global.document;if(goog.global.CLOSURE_BASE_PATH){goog.basePath=goog.global.CLOSURE_BASE_PATH;return}var scripts=doc.getElementsByTagName("script");var script;for(var i=0;script=scripts[i];i++){var src=
script.src;var l=src.length;if(src.substr(l-7)=="base.js"){goog.basePath=src.substr(0,l-7);return}}};goog.writeScriptTag_=function(src){if(goog.inHtmlDocument_()&&!goog.dependencies_.written[src]){goog.dependencies_.written[src]=true;var doc=goog.global.document;doc.write('<script type="text/javascript" src="'+src+'"></'+"script>")}};goog.writeScripts_=function(){var scripts=[];var seenScript={};var deps=goog.dependencies_;function visitNode(path){if(path in deps.written)return;if(path in deps.visited){if(!(path in
seenScript)){seenScript[path]=true;scripts.push(path)}return}deps.visited[path]=true;if(path in deps.requires)for(var requireName in deps.requires[path])if(requireName in deps.nameToPath)visitNode(deps.nameToPath[requireName]);else throw Error("Undefined nameToPath for "+requireName);if(!(path in seenScript)){seenScript[path]=true;scripts.push(path)}}for(var path in goog.included_)if(!deps.written[path])visitNode(path);for(var i=0;i<scripts.length;i++)if(scripts[i])goog.writeScriptTag_(goog.basePath+
scripts[i]);else throw Error("Undefined script input");};goog.getPathFromDeps_=function(rule){if(rule in goog.dependencies_.nameToPath)return goog.dependencies_.nameToPath[rule];else return null};goog.findBasePath_();if(!goog.global.CLOSURE_NO_DEPS)goog.writeScriptTag_(goog.basePath+"deps.js")}
goog.typeOf=function(value){var s=typeof value;if(s=="object")if(value){if(value instanceof Array||!(value instanceof Object)&&Object.prototype.toString.call(value)=="[object Array]"||typeof value.length=="number"&&typeof value.splice!="undefined"&&typeof value.propertyIsEnumerable!="undefined"&&!value.propertyIsEnumerable("splice"))return"array";if(!(value instanceof Object)&&(Object.prototype.toString.call(value)=="[object Function]"||typeof value.call!="undefined"&&typeof value.propertyIsEnumerable!=
"undefined"&&!value.propertyIsEnumerable("call")))return"function"}else return"null";else if(s=="function"&&typeof value.call=="undefined")return"object";return s};goog.propertyIsEnumerableCustom_=function(object,propName){if(propName in object)for(var key in object)if(key==propName&&Object.prototype.hasOwnProperty.call(object,propName))return true;return false};
goog.propertyIsEnumerable_=function(object,propName){if(object instanceof Object)return Object.prototype.propertyIsEnumerable.call(object,propName);else return goog.propertyIsEnumerableCustom_(object,propName)};goog.isDef=function(val){return val!==undefined};goog.isNull=function(val){return val===null};goog.isDefAndNotNull=function(val){return val!=null};goog.isArray=function(val){return goog.typeOf(val)=="array"};
goog.isArrayLike=function(val){var type=goog.typeOf(val);return type=="array"||type=="object"&&typeof val.length=="number"};goog.isDateLike=function(val){return goog.isObject(val)&&typeof val.getFullYear=="function"};goog.isString=function(val){return typeof val=="string"};goog.isBoolean=function(val){return typeof val=="boolean"};goog.isNumber=function(val){return typeof val=="number"};goog.isFunction=function(val){return goog.typeOf(val)=="function"};
goog.isObject=function(val){var type=goog.typeOf(val);return type=="object"||type=="array"||type=="function"};goog.getHashCode=function(obj){if(obj.hasOwnProperty&&obj.hasOwnProperty(goog.HASH_CODE_PROPERTY_))return obj[goog.HASH_CODE_PROPERTY_];if(!obj[goog.HASH_CODE_PROPERTY_])obj[goog.HASH_CODE_PROPERTY_]=++goog.hashCodeCounter_;return obj[goog.HASH_CODE_PROPERTY_]};goog.removeHashCode=function(obj){if("removeAttribute"in obj)obj.removeAttribute(goog.HASH_CODE_PROPERTY_);try{delete obj[goog.HASH_CODE_PROPERTY_]}catch(ex){}};
goog.HASH_CODE_PROPERTY_="closure_hashCode_"+Math.floor(Math.random()*2147483648).toString(36);goog.hashCodeCounter_=0;goog.cloneObject=function(proto){var type=goog.typeOf(proto);if(type=="object"||type=="array"){if(proto.clone)return proto.clone.call(proto);var clone=type=="array"?[]:{};for(var key in proto)clone[key]=goog.cloneObject(proto[key]);return clone}return proto};Object.prototype.clone;
goog.bind=function(fn,selfObj,var_args){var boundArgs=fn.boundArgs_;if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);if(boundArgs)args.unshift.apply(args,boundArgs);boundArgs=args}selfObj=fn.boundSelf_||selfObj;fn=fn.boundFn_||fn;var newfn;var context=selfObj||goog.global;if(boundArgs)newfn=function(){var args=Array.prototype.slice.call(arguments);args.unshift.apply(args,boundArgs);return fn.apply(context,args)};else newfn=function(){return fn.apply(context,arguments)};newfn.boundArgs_=
boundArgs;newfn.boundSelf_=selfObj;newfn.boundFn_=fn;return newfn};goog.partial=function(fn,var_args){var args=Array.prototype.slice.call(arguments,1);args.unshift(fn,null);return goog.bind.apply(null,args)};goog.mixin=function(target,source){for(var x in source)target[x]=source[x]};goog.now=Date.now||function(){return(new Date).getTime()};
goog.globalEval=function(script){if(goog.global.execScript)goog.global.execScript(script,"JavaScript");else if(goog.global.eval){if(goog.evalWorksForGlobals_==null){goog.global.eval("var _et_ = 1;");if(typeof goog.global["_et_"]!="undefined"){delete goog.global["_et_"];goog.evalWorksForGlobals_=true}else goog.evalWorksForGlobals_=false}if(goog.evalWorksForGlobals_)goog.global.eval(script);else{var doc=goog.global.document;var scriptElt=doc.createElement("script");scriptElt.type="text/javascript";
scriptElt.defer=false;scriptElt.appendChild(doc.createTextNode(script));doc.body.appendChild(scriptElt);doc.body.removeChild(scriptElt)}}else throw Error("goog.globalEval not available");};goog.typedef=true;goog.cssNameMapping_;goog.getCssName=function(className,opt_modifier){var cssName=className+(opt_modifier?"-"+opt_modifier:"");return goog.cssNameMapping_&&cssName in goog.cssNameMapping_?goog.cssNameMapping_[cssName]:cssName};goog.setCssNameMapping=function(mapping){goog.cssNameMapping_=mapping};
goog.getMsg=function(str,opt_values){var values=opt_values||{};for(var key in values)str=str.replace(new RegExp("\\{\\$"+key+"\\}","gi"),values[key]);return str};goog.exportSymbol=function(publicPath,object,opt_objectToExportTo){goog.exportPath_(publicPath,object,opt_objectToExportTo)};goog.exportProperty=function(object,publicName,symbol){object[publicName]=symbol};
goog.inherits=function(childCtor,parentCtor){function tempCtor(){}tempCtor.prototype=parentCtor.prototype;childCtor.superClass_=parentCtor.prototype;childCtor.prototype=new tempCtor;childCtor.prototype.constructor=childCtor};goog.MODIFY_FUNCTION_PROTOTYPES=true;
if(goog.MODIFY_FUNCTION_PROTOTYPES){Function.prototype.bind=function(selfObj,var_args){if(arguments.length>1){var args=Array.prototype.slice.call(arguments,1);args.unshift(this,selfObj);return goog.bind.apply(null,args)}else return goog.bind(this,selfObj)};Function.prototype.partial=function(var_args){var args=Array.prototype.slice.call(arguments);args.unshift(this,null);return goog.bind.apply(null,args)};Function.prototype.inherits=function(parentCtor){goog.inherits(this,parentCtor)};Function.prototype.mixin=
function(source){goog.mixin(this.prototype,source)}};goog.array={};goog.array.ArrayLike=goog.typedef;goog.array.peek=function(array){return array[array.length-1]};goog.array.indexOf=function(arr,obj,opt_fromIndex){if(arr.indexOf)return arr.indexOf(obj,opt_fromIndex);if(Array.indexOf)return Array.indexOf(arr,obj,opt_fromIndex);var fromIndex=opt_fromIndex==null?0:opt_fromIndex<0?Math.max(0,arr.length+opt_fromIndex):opt_fromIndex;for(var i=fromIndex;i<arr.length;i++)if(i in arr&&arr[i]===obj)return i;return-1};
goog.array.lastIndexOf=function(arr,obj,opt_fromIndex){var fromIndex=opt_fromIndex==null?arr.length-1:opt_fromIndex;if(arr.lastIndexOf)return arr.lastIndexOf(obj,fromIndex);if(Array.lastIndexOf)return Array.lastIndexOf(arr,obj,fromIndex);if(fromIndex<0)fromIndex=Math.max(0,arr.length+fromIndex);for(var i=fromIndex;i>=0;i--)if(i in arr&&arr[i]===obj)return i;return-1};
goog.array.forEach=function(arr,f,opt_obj){if(arr.forEach)arr.forEach(f,opt_obj);else if(Array.forEach)Array.forEach(arr,f,opt_obj);else{var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2)f.call(opt_obj,arr2[i],i,arr)}};goog.array.forEachRight=function(arr,f,opt_obj){var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=l-1;i>=0;--i)if(i in arr2)f.call(opt_obj,arr2[i],i,arr)};
goog.array.filter=function(arr,f,opt_obj){if(arr.filter)return arr.filter(f,opt_obj);if(Array.filter)return Array.filter(arr,f,opt_obj);var l=arr.length;var res=[];var resLength=0;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2){var val=arr2[i];if(f.call(opt_obj,val,i,arr))res[resLength++]=val}return res};
goog.array.map=function(arr,f,opt_obj){if(arr.map)return arr.map(f,opt_obj);if(Array.map)return Array.map(arr,f,opt_obj);var l=arr.length;var res=[];var resLength=0;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2)res[resLength++]=f.call(opt_obj,arr2[i],i,arr);return res};
goog.array.reduce=function(arr,f,val,opt_obj){if(arr.reduce)if(opt_obj)return arr.reduce(goog.bind(f,opt_obj),val);else return arr.reduce(f,val);var rval=val;goog.array.forEach(arr,function(val,index){rval=f.call(opt_obj,rval,val,index,arr)});return rval};
goog.array.reduceRight=function(arr,f,val,opt_obj){if(arr.reduceRight)if(opt_obj)return arr.reduceRight(goog.bind(f,opt_obj),val);else return arr.reduceRight(f,val);var rval=val;goog.array.forEachRight(arr,function(val,index){rval=f.call(opt_obj,rval,val,index,arr)});return rval};
goog.array.some=function(arr,f,opt_obj){if(arr.some)return arr.some(f,opt_obj);if(Array.some)return Array.some(arr,f,opt_obj);var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2&&f.call(opt_obj,arr2[i],i,arr))return true;return false};
goog.array.every=function(arr,f,opt_obj){if(arr.every)return arr.every(f,opt_obj);if(Array.every)return Array.every(arr,f,opt_obj);var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2&&!f.call(opt_obj,arr2[i],i,arr))return false;return true};goog.array.find=function(arr,f,opt_obj){var i=goog.array.findIndex(arr,f,opt_obj);return i<0?null:goog.isString(arr)?arr.charAt(i):arr[i]};
goog.array.findIndex=function(arr,f,opt_obj){var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=0;i<l;i++)if(i in arr2&&f.call(opt_obj,arr2[i],i,arr))return i;return-1};goog.array.findRight=function(arr,f,opt_obj){var i=goog.array.findIndexRight(arr,f,opt_obj);return i<0?null:goog.isString(arr)?arr.charAt(i):arr[i]};
goog.array.findIndexRight=function(arr,f,opt_obj){var l=arr.length;var arr2=goog.isString(arr)?arr.split(""):arr;for(var i=l-1;i>=0;i--)if(i in arr2&&f.call(opt_obj,arr2[i],i,arr))return i;return-1};goog.array.contains=function(arr,obj){if(arr.contains)return arr.contains(obj);return goog.array.indexOf(arr,obj)>-1};goog.array.isEmpty=function(arr){return arr.length==0};goog.array.clear=function(arr){if(!goog.isArray(arr))for(var i=arr.length-1;i>=0;i--)delete arr[i];arr.length=0};
goog.array.insert=function(arr,obj){if(!goog.array.contains(arr,obj))arr.push(obj)};goog.array.insertAt=function(arr,obj,opt_i){goog.array.splice(arr,opt_i,0,obj)};goog.array.insertArrayAt=function(arr,elementsToAdd,opt_i){goog.partial(goog.array.splice,arr,opt_i,0).apply(null,elementsToAdd)};goog.array.insertBefore=function(arr,obj,opt_obj2){var i;if(arguments.length==2||(i=goog.array.indexOf(arr,opt_obj2))==-1)arr.push(obj);else goog.array.insertAt(arr,obj,i)};
goog.array.remove=function(arr,obj){var i=goog.array.indexOf(arr,obj);var rv;if(rv=i!=-1)goog.array.removeAt(arr,i);return rv};goog.array.removeAt=function(arr,i){return Array.prototype.splice.call(arr,i,1).length==1};goog.array.removeIf=function(arr,f,opt_obj){var i=goog.array.findIndex(arr,f,opt_obj);if(i>=0){goog.array.removeAt(arr,i);return true}return false};
goog.array.clone=function(arr){if(goog.isArray(arr))return arr.concat();else{var rv=[];var i=0;for(var len=arr.length;i<len;i++)rv[i]=arr[i];return rv}};goog.array.toArray=function(object){if(goog.isArray(object))return object.concat();return goog.array.clone(object)};goog.array.extend=function(arr1,var_args){for(var i=1;i<arguments.length;i++){var arr2=arguments[i];if(goog.isArrayLike(arr2)){arr2=goog.array.toArray(arr2);arr1.push.apply(arr1,arr2)}else arr1.push(arr2)}};
goog.array.splice=function(arr,index,howMany,var_args){return Array.prototype.splice.apply(arr,goog.array.slice(arguments,1))};goog.array.slice=function(arr,start,opt_end){if(arguments.length<=2)return Array.prototype.slice.call(arr,start);else return Array.prototype.slice.call(arr,start,opt_end)};
goog.array.removeDuplicates=function(arr,opt_rv){var rv=opt_rv||arr;var seen={};var cursorInsert=0;for(var cursorRead=0;cursorRead<arr.length;){var current=arr[cursorRead++];var hc=goog.isObject(current)?goog.getHashCode(current):current;if(!(hc in seen)){seen[hc]=true;rv[cursorInsert++]=current}}rv.length=cursorInsert};
goog.array.binarySearch=function(arr,target,opt_compareFn){var left=0;var right=arr.length-1;for(var compareFn=opt_compareFn||goog.array.defaultCompare;left<=right;){var mid=left+right>>1;var compareResult=compareFn(target,arr[mid]);if(compareResult>0)left=mid+1;else if(compareResult<0)right=mid-1;else return mid}return-(left+1)};goog.array.sort=function(arr,opt_compareFn){Array.prototype.sort.call(arr,opt_compareFn||goog.array.defaultCompare)};
goog.array.stableSort=function(arr,opt_compareFn){for(var i=0;i<arr.length;i++)arr[i]={index:i,value:arr[i]};var valueCompareFn=opt_compareFn||goog.array.defaultCompare;function stableCompareFn(obj1,obj2){return valueCompareFn(obj1.value,obj2.value)||obj1.index-obj2.index}goog.array.sort(arr,stableCompareFn);for(i=0;i<arr.length;i++)arr[i]=arr[i].value};
goog.array.sortObjectsByKey=function(arr,key,opt_compareFn){var compare=opt_compareFn||goog.array.defaultCompare;goog.array.sort(arr,function(a,b){return compare(a[key],b[key])})};goog.array.compare=function(arr1,arr2,opt_compareFn){if(!goog.isArrayLike(arr1)||!goog.isArrayLike(arr2)||arr1.length!=arr2.length)return false;var l=arr1.length;var compareFn=opt_compareFn||goog.array.defaultCompareEquality;for(var i=0;i<l;i++)if(!compareFn.call(null,arr1[i],arr2[i]))return false;return true};
goog.array.defaultCompare=function(a,b){return a>b?1:a<b?-1:0};goog.array.defaultCompareEquality=function(a,b){return a===b};goog.array.binaryInsert=function(array,value,opt_compareFn){var index=goog.array.binarySearch(array,value,opt_compareFn);if(index<0){goog.array.insertAt(array,value,-(index+1));return true}return false};goog.array.binaryRemove=function(array,value,opt_compareFn){var index=goog.array.binarySearch(array,value,opt_compareFn);return index>=0?goog.array.removeAt(array,index):false};
goog.array.bucket=function(array,sorter){var buckets={};for(var i=0;i<array.length;i++){var value=array[i];var key=sorter(value,i,array);if(goog.isDef(key)){var bucket=buckets[key]||(buckets[key]=[]);bucket.push(value)}}return buckets};goog.array.repeat=function(value,n){var array=[];for(var i=0;i<n;i++)array[i]=value;return array};
goog.array.flatten=function(var_args){var result=[];for(var i=0;i<arguments.length;i++){var element=arguments[i];if(goog.isArray(element))result.push.apply(result,goog.array.flatten.apply(null,element));else result.push(element)}return result};goog.array.rotate=function(array,n){if(array.length){n%=array.length;if(n>0)Array.prototype.unshift.apply(array,array.splice(-n,n));else if(n<0)Array.prototype.push.apply(array,array.splice(0,-n))}return array};goog.dom={};
goog.dom.TagName={A:"A",ABBR:"ABBR",ACRONYM:"ACRONYM",ADDRESS:"ADDRESS",APPLET:"APPLET",AREA:"AREA",B:"B",BASE:"BASE",BASEFONT:"BASEFONT",BDO:"BDO",BIG:"BIG",BLOCKQUOTE:"BLOCKQUOTE",BODY:"BODY",BR:"BR",BUTTON:"BUTTON",CAPTION:"CAPTION",CENTER:"CENTER",CITE:"CITE",CODE:"CODE",COL:"COL",COLGROUP:"COLGROUP",DD:"DD",DEL:"DEL",DFN:"DFN",DIR:"DIR",DIV:"DIV",DL:"DL",DT:"DT",EM:"EM",FIELDSET:"FIELDSET",FONT:"FONT",FORM:"FORM",FRAME:"FRAME",FRAMESET:"FRAMESET",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",
HEAD:"HEAD",HR:"HR",HTML:"HTML",I:"I",IFRAME:"IFRAME",IMG:"IMG",INPUT:"INPUT",INS:"INS",ISINDEX:"ISINDEX",KBD:"KBD",LABEL:"LABEL",LEGEND:"LEGEND",LI:"LI",LINK:"LINK",MAP:"MAP",MENU:"MENU",META:"META",NOFRAMES:"NOFRAMES",NOSCRIPT:"NOSCRIPT",OBJECT:"OBJECT",OL:"OL",OPTGROUP:"OPTGROUP",OPTION:"OPTION",P:"P",PARAM:"PARAM",PRE:"PRE",Q:"Q",S:"S",SAMP:"SAMP",SCRIPT:"SCRIPT",SELECT:"SELECT",SMALL:"SMALL",SPAN:"SPAN",STRIKE:"STRIKE",STRONG:"STRONG",STYLE:"STYLE",SUB:"SUB",SUP:"SUP",TABLE:"TABLE",TBODY:"TBODY",
TD:"TD",TEXTAREA:"TEXTAREA",TFOOT:"TFOOT",TH:"TH",THEAD:"THEAD",TITLE:"TITLE",TR:"TR",TT:"TT",U:"U",UL:"UL",VAR:"VAR"};goog.dom.classes={};goog.dom.classes.set=function(element,className){element.className=className};goog.dom.classes.get=function(element){var className=element.className;return className&&typeof className.split=="function"?className.split(" "):[]};goog.dom.classes.add=function(element,var_args){var classes=goog.dom.classes.get(element);var args=goog.array.slice(arguments,1);var b=goog.dom.classes.add_(classes,args);element.className=classes.join(" ");return b};
goog.dom.classes.remove=function(element,var_args){var classes=goog.dom.classes.get(element);var args=goog.array.slice(arguments,1);var b=goog.dom.classes.remove_(classes,args);element.className=classes.join(" ");return b};goog.dom.classes.add_=function(classes,args){var rv=0;for(var i=0;i<args.length;i++)if(!goog.array.contains(classes,args[i])){classes.push(args[i]);rv++}return rv==args.length};
goog.dom.classes.remove_=function(classes,args){var rv=0;for(var i=0;i<classes.length;i++)if(goog.array.contains(args,classes[i])){goog.array.splice(classes,i--,1);rv++}return rv==args.length};goog.dom.classes.swap=function(element,fromClass,toClass){var classes=goog.dom.classes.get(element);var removed=false;for(var i=0;i<classes.length;i++)if(classes[i]==fromClass){goog.array.splice(classes,i--,1);removed=true}if(removed){classes.push(toClass);element.className=classes.join(" ")}return removed};
goog.dom.classes.addRemove=function(element,classesToRemove,classesToAdd){var classes=goog.dom.classes.get(element);if(goog.isString(classesToRemove))goog.array.remove(classes,classesToRemove);else if(goog.isArray(classesToRemove))goog.dom.classes.remove_(classes,classesToRemove);if(goog.isString(classesToAdd)&&!goog.array.contains(classes,classesToAdd))classes.push(classesToAdd);else if(goog.isArray(classesToAdd))goog.dom.classes.add_(classes,classesToAdd);element.className=classes.join(" ")};
goog.dom.classes.has=function(element,className){return goog.array.contains(goog.dom.classes.get(element),className)};goog.dom.classes.enable=function(element,className,enabled){if(enabled)goog.dom.classes.add(element,className);else goog.dom.classes.remove(element,className)};goog.dom.classes.toggle=function(element,className){var add=!goog.dom.classes.has(element,className);goog.dom.classes.enable(element,className,add);return add};goog.math={};goog.math.Coordinate=function(opt_x,opt_y){this.x=goog.isDef(opt_x)?opt_x:0;this.y=goog.isDef(opt_y)?opt_y:0};goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)};if(goog.DEBUG)goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"};goog.math.Coordinate.equals=function(a,b){if(a==b)return true;if(!a||!b)return false;return a.x==b.x&&a.y==b.y};
goog.math.Coordinate.distance=function(a,b){var dx=a.x-b.x;var dy=a.y-b.y;return Math.sqrt(dx*dx+dy*dy)};goog.math.Coordinate.squaredDistance=function(a,b){var dx=a.x-b.x;var dy=a.y-b.y;return dx*dx+dy*dy};goog.math.Coordinate.difference=function(a,b){return new goog.math.Coordinate(a.x-b.x,a.y-b.y)};goog.math.Coordinate.sum=function(a,b){return new goog.math.Coordinate(a.x+b.x,a.y+b.y)};goog.math.Size=function(width,height){this.width=width;this.height=height};goog.math.Size.equals=function(a,b){if(a==b)return true;if(!a||!b)return false;return a.width==b.width&&a.height==b.height};goog.math.Size.prototype.clone=function(){return new goog.math.Size(this.width,this.height)};if(goog.DEBUG)goog.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};goog.math.Size.prototype.getLongest=function(){return Math.max(this.width,this.height)};
goog.math.Size.prototype.getShortest=function(){return Math.min(this.width,this.height)};goog.math.Size.prototype.area=function(){return this.width*this.height};goog.math.Size.prototype.aspectRatio=function(){return this.width/this.height};goog.math.Size.prototype.isEmpty=function(){return!this.area()};goog.math.Size.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
goog.math.Size.prototype.fitsInside=function(target){return this.width<=target.width&&this.height<=target.height};goog.math.Size.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};goog.math.Size.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};goog.math.Size.prototype.scale=function(s){this.width*=s;this.height*=s;return this};
goog.math.Size.prototype.scaleToFit=function(target){var s=this.aspectRatio()>target.aspectRatio()?target.width/this.width:target.height/this.height;return this.scale(s)};goog.object={};goog.object.forEach=function(obj,f,opt_obj){for(var key in obj)f.call(opt_obj,obj[key],key,obj)};goog.object.filter=function(obj,f,opt_obj){var res={};for(var key in obj)if(f.call(opt_obj,obj[key],key,obj))res[key]=obj[key];return res};goog.object.map=function(obj,f,opt_obj){var res={};for(var key in obj)res[key]=f.call(opt_obj,obj[key],key,obj);return res};goog.object.some=function(obj,f,opt_obj){for(var key in obj)if(f.call(opt_obj,obj[key],key,obj))return true;return false};
goog.object.every=function(obj,f,opt_obj){for(var key in obj)if(!f.call(opt_obj,obj[key],key,obj))return false;return true};goog.object.getCount=function(obj){var rv=0;for(var key in obj)rv++;return rv};goog.object.getAnyKey=function(obj){for(var key in obj)return key};goog.object.getAnyValue=function(obj){for(var key in obj)return obj[key]};goog.object.contains=function(obj,val){return goog.object.containsValue(obj,val)};
goog.object.getValues=function(obj){var res=[];var i=0;for(var key in obj)res[i++]=obj[key];return res};goog.object.getKeys=function(obj){var res=[];var i=0;for(var key in obj)res[i++]=key;return res};goog.object.containsKey=function(obj,key){return key in obj};goog.object.containsValue=function(obj,val){for(var key in obj)if(obj[key]==val)return true;return false};goog.object.findKey=function(obj,f,opt_this){for(var key in obj)if(f.call(opt_this,obj[key],key,obj))return key;return undefined};
goog.object.findValue=function(obj,f,opt_this){var key=goog.object.findKey(obj,f,opt_this);return key&&obj[key]};goog.object.isEmpty=function(obj){for(var key in obj)return false;return true};goog.object.clear=function(obj){var keys=goog.object.getKeys(obj);for(var i=keys.length-1;i>=0;i--)goog.object.remove(obj,keys[i])};goog.object.remove=function(obj,key){var rv;if(rv=key in obj)delete obj[key];return rv};
goog.object.add=function(obj,key,val){if(key in obj)throw Error('The object already contains the key "'+key+'"');goog.object.set(obj,key,val)};goog.object.get=function(obj,key,opt_val){if(key in obj)return obj[key];return opt_val};goog.object.set=function(obj,key,value){obj[key]=value};goog.object.setIfUndefined=function(obj,key,value){return key in obj?obj[key]:(obj[key]=value)};goog.object.clone=function(obj){var res={};for(var key in obj)res[key]=obj[key];return res};
goog.object.transpose=function(obj){var transposed={};for(var key in obj)transposed[obj[key]]=key;return transposed};goog.object.PROTOTYPE_FIELDS_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];
goog.object.extend=function(target,var_args){var key;var source;for(var i=1;i<arguments.length;i++){source=arguments[i];for(key in source)target[key]=source[key];for(var j=0;j<goog.object.PROTOTYPE_FIELDS_.length;j++){key=goog.object.PROTOTYPE_FIELDS_[j];if(Object.prototype.hasOwnProperty.call(source,key))target[key]=source[key]}}};
goog.object.create=function(var_args){var argLength=arguments.length;if(argLength==1&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(argLength%2)throw Error("Uneven number of arguments");var rv={};for(var i=0;i<argLength;i+=2)rv[arguments[i]]=arguments[i+1];return rv};
goog.object.createSet=function(var_args){var argLength=arguments.length;if(argLength==1&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);var rv={};for(var i=0;i<argLength;i++)rv[arguments[i]]=true;return rv};goog.string={};goog.string.Unicode={NBSP:"\u00a0"};goog.string.startsWith=function(str,prefix){return str.indexOf(prefix)==0};goog.string.endsWith=function(str,suffix){var l=str.length-suffix.length;return l>=0&&str.lastIndexOf(suffix,l)==l};goog.string.caseInsensitiveStartsWith=function(str,prefix){return goog.string.caseInsensitiveCompare(prefix,str.substr(0,prefix.length))==0};
goog.string.caseInsensitiveEndsWith=function(str,suffix){return goog.string.caseInsensitiveCompare(suffix,str.substr(str.length-suffix.length,suffix.length))==0};goog.string.subs=function(str,var_args){for(var i=1;i<arguments.length;i++){var replacement=String(arguments[i]).replace(/\$/g,"$$$$");str=str.replace(/\%s/,replacement)}return str};goog.string.collapseWhitespace=function(str){return str.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};goog.string.isEmpty=function(str){return/^[\s\xa0]*$/.test(str)};
goog.string.isEmptySafe=function(str){return goog.string.isEmpty(goog.string.makeSafe(str))};goog.string.isBreakingWhitespace=function(str){return!/[^\t\n\r ]/.test(str)};goog.string.isAlpha=function(str){return!/[^a-zA-Z]/.test(str)};goog.string.isNumeric=function(str){return!/[^0-9]/.test(str)};goog.string.isAlphaNumeric=function(str){return!/[^a-zA-Z0-9]/.test(str)};goog.string.isSpace=function(ch){return ch==" "};
goog.string.isUnicodeChar=function(ch){return ch.length==1&&ch>=" "&&ch<="~"||ch>="\u0080"&&ch<="\ufffd"};goog.string.stripNewlines=function(str){return str.replace(/(\r\n|\r|\n)+/g," ")};goog.string.canonicalizeNewlines=function(str){return str.replace(/(\r\n|\r|\n)/g,"\n")};goog.string.normalizeWhitespace=function(str){return str.replace(/\xa0|\s/g," ")};goog.string.normalizeSpaces=function(str){return str.replace(/\xa0|[ \t]+/g," ")};
goog.string.trim=function(str){return str.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};goog.string.trimLeft=function(str){return str.replace(/^[\s\xa0]+/,"")};goog.string.trimRight=function(str){return str.replace(/[\s\xa0]+$/,"")};goog.string.caseInsensitiveCompare=function(str1,str2){var test1=String(str1).toLowerCase();var test2=String(str2).toLowerCase();if(test1<test2)return-1;else if(test1==test2)return 0;else return 1};goog.string.numerateCompareRegExp_=/(\.\d+)|(\d+)|(\D+)/g;
goog.string.numerateCompare=function(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;var tokens1=str1.toLowerCase().match(goog.string.numerateCompareRegExp_);var tokens2=str2.toLowerCase().match(goog.string.numerateCompareRegExp_);var count=Math.min(tokens1.length,tokens2.length);for(var i=0;i<count;i++){var a=tokens1[i];var b=tokens2[i];if(a!=b){var num1=parseInt(a,10);if(!isNaN(num1)){var num2=parseInt(b,10);if(!isNaN(num2)&&num1-num2)return num1-num2}return a<b?-1:1}}if(tokens1.length!=
tokens2.length)return tokens1.length-tokens2.length;return str1<str2?-1:1};goog.string.encodeUriRegExp_=/^[a-zA-Z0-9\-_.!~*'()]*$/;goog.string.urlEncode=function(str){str=String(str);if(!goog.string.encodeUriRegExp_.test(str))return encodeURIComponent(str);return str};goog.string.urlDecode=function(str){return decodeURIComponent(str.replace(/\+/g," "))};goog.string.newLineToBr=function(str,opt_xml){return str.replace(/(\r\n|\r|\n)/g,opt_xml?"<br />":"<br>")};
goog.string.htmlEscape=function(str,opt_isLikelyToContainHtmlChars){if(opt_isLikelyToContainHtmlChars)return str.replace(goog.string.amperRe_,"&amp;").replace(goog.string.ltRe_,"&lt;").replace(goog.string.gtRe_,"&gt;").replace(goog.string.quotRe_,"&quot;");else{if(!goog.string.allRe_.test(str))return str;if(str.indexOf("&")!=-1)str=str.replace(goog.string.amperRe_,"&amp;");if(str.indexOf("<")!=-1)str=str.replace(goog.string.ltRe_,"&lt;");if(str.indexOf(">")!=-1)str=str.replace(goog.string.gtRe_,"&gt;");
if(str.indexOf('"')!=-1)str=str.replace(goog.string.quotRe_,"&quot;");return str}};goog.string.amperRe_=/&/g;goog.string.ltRe_=/</g;goog.string.gtRe_=/>/g;goog.string.quotRe_=/\"/g;goog.string.allRe_=/[&<>\"]/;goog.string.unescapeEntities=function(str){if(goog.string.contains(str,"&"))if("document"in goog.global&&!goog.string.contains(str,"<"))return goog.string.unescapeEntitiesUsingDom_(str);else return goog.string.unescapePureXmlEntities_(str);return str};
goog.string.unescapeEntitiesUsingDom_=function(str){var el=goog.global["document"]["createElement"]("a");el["innerHTML"]=str;if(el[goog.string.NORMALIZE_FN_])el[goog.string.NORMALIZE_FN_]();str=el["firstChild"]["nodeValue"];el["innerHTML"]="";return str};
goog.string.unescapePureXmlEntities_=function(str){return str.replace(/&([^;]+);/g,function(s,entity){switch(entity){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if(entity.charAt(0)=="#"){var n=Number("0"+entity.substr(1));if(!isNaN(n))return String.fromCharCode(n)}return s}})};goog.string.NORMALIZE_FN_="normalize";goog.string.whitespaceEscape=function(str,opt_xml){return goog.string.newLineToBr(str.replace(/  /g," &#160;"),opt_xml)};
goog.string.stripQuotes=function(str,quoteChars){var length=quoteChars.length;for(var i=0;i<length;i++){var quoteChar=length==1?quoteChars:quoteChars.charAt(i);if(str.charAt(0)==quoteChar&&str.charAt(str.length-1)==quoteChar)return str.substring(1,str.length-1)}return str};
goog.string.truncate=function(str,chars,opt_protectEscapedCharacters){if(opt_protectEscapedCharacters)str=goog.string.unescapeEntities(str);if(str.length>chars)str=str.substring(0,chars-3)+"...";if(opt_protectEscapedCharacters)str=goog.string.htmlEscape(str);return str};
goog.string.truncateMiddle=function(str,chars,opt_protectEscapedCharacters){if(opt_protectEscapedCharacters)str=goog.string.unescapeEntities(str);if(str.length>chars){var half=Math.floor(chars/2);var endPos=str.length-half;half+=chars%2;str=str.substring(0,half)+"..."+str.substring(endPos)}if(opt_protectEscapedCharacters)str=goog.string.htmlEscape(str);return str};goog.string.jsEscapeCache_={"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\x0B",'"':'\\"',"'":"\\'","\\":"\\\\"};
goog.string.quote=function(s){s=String(s);if(s.quote)return s.quote();else{var sb=['"'];for(var i=0;i<s.length;i++)sb[i+1]=goog.string.escapeChar(s.charAt(i));sb.push('"');return sb.join("")}};
goog.string.escapeChar=function(c){if(c in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[c];var rv=c;var cc=c.charCodeAt(0);if(cc>31&&cc<127)rv=c;else{if(cc<256){rv="\\x";if(cc<16||cc>256)rv+="0"}else{rv="\\u";if(cc<4096)rv+="0"}rv+=cc.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[c]=rv};goog.string.toMap=function(s){var rv={};for(var i=0;i<s.length;i++)rv[s.charAt(i)]=true;return rv};goog.string.contains=function(s,ss){return s.indexOf(ss)!=-1};
goog.string.removeAt=function(s,index,stringLength){var resultStr=s;if(index>=0&&index<s.length&&stringLength>0)resultStr=s.substr(0,index)+s.substr(index+stringLength,s.length-index-stringLength);return resultStr};goog.string.remove=function(s,ss){var re=new RegExp(goog.string.regExpEscape(ss),"");return s.replace(re,"")};goog.string.removeAll=function(s,ss){var re=new RegExp(goog.string.regExpEscape(ss),"g");return s.replace(re,"")};
goog.string.regExpEscape=function(s){return String(s).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};goog.string.repeat=function(string,length){return(new Array(length+1)).join(string)};goog.string.padNumber=function(num,length,opt_precision){var s=goog.isDef(opt_precision)?num.toFixed(opt_precision):String(num);var index=s.indexOf(".");if(index==-1)index=s.length;return goog.string.repeat("0",Math.max(0,length-index))+s};
goog.string.makeSafe=function(obj){return obj==null?"":String(obj)};goog.string.buildString=function(var_args){return Array.prototype.join.call(arguments,"")};goog.string.getRandomString=function(){return Math.floor(Math.random()*2147483648).toString(36)+(Math.floor(Math.random()*2147483648)^(new Date).getTime()).toString(36)};
goog.string.compareVersions=function(version1,version2){var order=0;var v1Subs=goog.string.trim(String(version1)).split(".");var v2Subs=goog.string.trim(String(version2)).split(".");var subCount=Math.max(v1Subs.length,v2Subs.length);for(var subIdx=0;order==0&&subIdx<subCount;subIdx++){var v1Sub=v1Subs[subIdx]||"";var v2Sub=v2Subs[subIdx]||"";var v1CompParser=new RegExp("(\\d*)(\\D*)","g");var v2CompParser=new RegExp("(\\d*)(\\D*)","g");do{var v1Comp=v1CompParser.exec(v1Sub)||["","",""];var v2Comp=
v2CompParser.exec(v2Sub)||["","",""];if(v1Comp[0].length==0&&v2Comp[0].length==0)break;var v1CompNum=v1Comp[1].length==0?0:parseInt(v1Comp[1],10);var v2CompNum=v2Comp[1].length==0?0:parseInt(v2Comp[1],10);order=goog.string.compareElements_(v1CompNum,v2CompNum)||goog.string.compareElements_(v1Comp[2].length==0,v2Comp[2].length==0)||goog.string.compareElements_(v1Comp[2],v2Comp[2])}while(order==0)}return order};
goog.string.compareElements_=function(left,right){if(left<right)return-1;else if(left>right)return 1;return 0};goog.string.HASHCODE_MAX_=4294967296;goog.string.hashCode=function(str){var result=0;for(var i=0;i<str.length;++i){result=31*result+str.charCodeAt(i);result%=goog.string.HASHCODE_MAX_}return result};goog.string.uniqueStringCounter_=goog.now();goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++};
goog.string.toNumber=function(str){var num=Number(str);if(num==0&&goog.string.isEmpty(str))return NaN;return num};goog.userAgent={};goog.userAgent.ASSUME_IE=false;goog.userAgent.ASSUME_GECKO=false;goog.userAgent.ASSUME_CAMINO=false;goog.userAgent.ASSUME_WEBKIT=false;goog.userAgent.ASSUME_MOBILE_WEBKIT=false;goog.userAgent.ASSUME_OPERA=false;goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_CAMINO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA;
goog.userAgent.getUserAgentString=function(){return goog.global["navigator"]?goog.global["navigator"].userAgent:null};goog.userAgent.getNavigator=function(){return goog.global["navigator"]};
goog.userAgent.init_=function(){goog.userAgent.detectedOpera_=false;goog.userAgent.detectedIe_=false;goog.userAgent.detectedWebkit_=false;goog.userAgent.detectedMobile_=false;goog.userAgent.detectedGecko_=false;goog.userAgent.detectedCamino_=false;var ua;if(!goog.userAgent.BROWSER_KNOWN_&&(ua=goog.userAgent.getUserAgentString())){var navigator=goog.userAgent.getNavigator();goog.userAgent.detectedOpera_=ua.indexOf("Opera")==0;goog.userAgent.detectedIe_=!goog.userAgent.detectedOpera_&&ua.indexOf("MSIE")!=
-1;goog.userAgent.detectedWebkit_=!goog.userAgent.detectedOpera_&&ua.indexOf("WebKit")!=-1;goog.userAgent.detectedMobile_=goog.userAgent.detectedWebkit_&&ua.indexOf("Mobile")!=-1;goog.userAgent.detectedGecko_=!goog.userAgent.detectedOpera_&&!goog.userAgent.detectedWebkit_&&navigator.product=="Gecko";goog.userAgent.detectedCamino_=goog.userAgent.detectedGecko_&&navigator.vendor=="Camino"}};if(!goog.userAgent.BROWSER_KNOWN_)goog.userAgent.init_();
goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.userAgent.detectedOpera_;goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.userAgent.detectedIe_;goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_CAMINO:goog.userAgent.detectedGecko_;goog.userAgent.CAMINO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_CAMINO:goog.userAgent.detectedCamino_;
goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.userAgent.detectedWebkit_;goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.detectedMobile_;goog.userAgent.SAFARI=goog.userAgent.WEBKIT;goog.userAgent.determinePlatform_=function(){var navigator=goog.userAgent.getNavigator();return navigator&&navigator.platform||""};goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_();goog.userAgent.ASSUME_MAC=false;
goog.userAgent.ASSUME_WINDOWS=false;goog.userAgent.ASSUME_LINUX=false;goog.userAgent.ASSUME_X11=false;goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11;
goog.userAgent.initPlatform_=function(){goog.userAgent.detectedMac_=goog.string.contains(goog.userAgent.PLATFORM,"Mac");goog.userAgent.detectedWindows_=goog.string.contains(goog.userAgent.PLATFORM,"Win");goog.userAgent.detectedLinux_=goog.string.contains(goog.userAgent.PLATFORM,"Linux");goog.userAgent.detectedX11_=!!goog.userAgent.getNavigator()&&goog.string.contains(goog.userAgent.getNavigator()["appVersion"]||"","X11")};if(!goog.userAgent.PLATFORM_KNOWN_)goog.userAgent.initPlatform_();
goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.userAgent.detectedMac_;goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.userAgent.detectedWindows_;goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.detectedLinux_;goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.detectedX11_;
goog.userAgent.determineVersion_=function(){var version="";var re;if(goog.userAgent.OPERA&&goog.global["opera"]){var operaVersion=goog.global["opera"].version;version=typeof operaVersion=="function"?operaVersion():operaVersion}else{if(goog.userAgent.GECKO)re=/rv\:([^\);]+)(\)|;)/;else if(goog.userAgent.IE)re=/MSIE\s+([^\);]+)(\)|;)/;else if(goog.userAgent.WEBKIT)re=/WebKit\/(\S+)/;if(re){var arr=re.exec(goog.userAgent.getUserAgentString());version=arr?arr[1]:""}}return version};
goog.userAgent.VERSION=goog.userAgent.determineVersion_();goog.userAgent.compare=function(v1,v2){return goog.string.compareVersions(v1,v2)};goog.userAgent.isVersionCache_={};goog.userAgent.isVersion=function(version){return goog.userAgent.isVersionCache_[version]||(goog.userAgent.isVersionCache_[version]=goog.string.compareVersions(goog.userAgent.VERSION,version)>=0)};goog.dom.ASSUME_QUIRKS_MODE=false;goog.dom.ASSUME_STANDARDS_MODE=false;goog.dom.COMPAT_MODE_KNOWN_=goog.dom.ASSUME_QUIRKS_MODE||goog.dom.ASSUME_STANDARDS_MODE;goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};
goog.dom.getDomHelper=function(opt_element){return opt_element?new goog.dom.DomHelper(goog.dom.getOwnerDocument(opt_element)):goog.dom.defaultDomHelper_||(goog.dom.defaultDomHelper_=new goog.dom.DomHelper)};goog.dom.defaultDomHelper_;goog.dom.getDocument=function(){return document};goog.dom.getElement=function(element){return goog.isString(element)?document.getElementById(element):element};goog.dom.$=goog.dom.getElement;
goog.dom.getElementsByTagNameAndClass=function(opt_tag,opt_class,opt_el){return goog.dom.getElementsByTagNameAndClass_(document,opt_tag,opt_class,opt_el)};
goog.dom.getElementsByTagNameAndClass_=function(doc,opt_tag,opt_class,opt_el){var parent=opt_el||doc;var tagName=opt_tag&&opt_tag!="*"?opt_tag.toLowerCase():"";if(parent.querySelectorAll&&(tagName||opt_class)&&(!goog.userAgent.WEBKIT||goog.dom.isCss1CompatMode_(doc)||goog.userAgent.isVersion("528"))){var query=tagName+(opt_class?"."+opt_class:"");return parent.querySelectorAll(query)}if(opt_class&&parent.getElementsByClassName){var els=parent.getElementsByClassName(opt_class);if(tagName){var arrayLike=
{};var len=0;var i=0;for(var el;el=els[i];i++)if(tagName==el.nodeName.toLowerCase())arrayLike[len++]=el;arrayLike.length=len;return arrayLike}else return els}els=parent.getElementsByTagName(tagName||"*");if(opt_class){arrayLike={};len=0;for(i=0;el=els[i];i++){var className=el.className;if(typeof className.split=="function"&&goog.array.contains(className.split(" "),opt_class))arrayLike[len++]=el}arrayLike.length=len;return arrayLike}else return els};goog.dom.$$=goog.dom.getElementsByTagNameAndClass;
goog.dom.setProperties=function(element,properties){goog.object.forEach(properties,function(val,key){if(key=="style")element.style.cssText=val;else if(key=="class")element.className=val;else if(key=="for")element.htmlFor=val;else if(key in goog.dom.DIRECT_ATTRIBUTE_MAP_)element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key],val);else element[key]=val})};
goog.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",type:"type"};goog.dom.getViewportSize=function(opt_window){return goog.dom.getViewportSize_(opt_window||window)};
goog.dom.getViewportSize_=function(win){var doc=win.document;if(goog.userAgent.WEBKIT&&!goog.userAgent.isVersion("500")&&!goog.userAgent.MOBILE){if(typeof win.innerHeight=="undefined")win=window;var innerHeight=win.innerHeight;var scrollHeight=win.document.documentElement.scrollHeight;if(win==win.top)if(scrollHeight<innerHeight)innerHeight-=15;return new goog.math.Size(win.innerWidth,innerHeight)}var el=goog.dom.isCss1CompatMode_(doc)&&(!goog.userAgent.OPERA||goog.userAgent.OPERA&&goog.userAgent.isVersion("9.50"))?
doc.documentElement:doc.body;return new goog.math.Size(el.clientWidth,el.clientHeight)};goog.dom.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(window)};
goog.dom.getDocumentHeight_=function(win){var doc=win.document;var height=0;if(doc){var vh=goog.dom.getViewportSize_(win).height;var body=doc.body;var docEl=doc.documentElement;if(goog.dom.isCss1CompatMode_(doc)&&docEl.scrollHeight)height=docEl.scrollHeight!=vh?docEl.scrollHeight:docEl.offsetHeight;else{var sh=docEl.scrollHeight;var oh=docEl.offsetHeight;if(docEl.clientHeight!=oh){sh=body.scrollHeight;oh=body.offsetHeight}if(sh>vh)height=sh>oh?sh:oh;else height=sh<oh?sh:oh}}return height};
goog.dom.getPageScroll=function(opt_window){var win=opt_window||goog.global||window;return goog.dom.getDomHelper(win.document).getDocumentScroll()};goog.dom.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(document)};goog.dom.getDocumentScroll_=function(doc){var el=goog.dom.getDocumentScrollElement_(doc);return new goog.math.Coordinate(el.scrollLeft,el.scrollTop)};goog.dom.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(document)};
goog.dom.getDocumentScrollElement_=function(doc){return!goog.userAgent.WEBKIT&&goog.dom.isCss1CompatMode_(doc)?doc.documentElement:doc.body};goog.dom.getWindow=function(opt_doc){return opt_doc?goog.dom.getWindow_(opt_doc):window};
goog.dom.getWindow_=function(doc){if(doc.parentWindow)return doc.parentWindow;if(goog.userAgent.WEBKIT&&!goog.userAgent.isVersion("500")&&!goog.userAgent.MOBILE){var scriptElement=doc.createElement("script");scriptElement.innerHTML="document.parentWindow=window";var parentElement=doc.documentElement;parentElement.appendChild(scriptElement);parentElement.removeChild(scriptElement);return doc.parentWindow}return doc.defaultView};
goog.dom.createDom=function(tagName,opt_attributes,var_args){return goog.dom.createDom_(document,arguments)};
goog.dom.createDom_=function(doc,args){var tagName=args[0];var attributes=args[1];if(goog.userAgent.IE&&attributes&&(attributes.name||attributes.type)){var tagNameArr=["<",tagName];if(attributes.name)tagNameArr.push(' name="',goog.string.htmlEscape(attributes.name),'"');if(attributes.type){tagNameArr.push(' type="',goog.string.htmlEscape(attributes.type),'"');attributes=goog.cloneObject(attributes);delete attributes.type}tagNameArr.push(">");tagName=tagNameArr.join("")}var element=doc.createElement(tagName);
if(attributes)if(goog.isString(attributes))element.className=attributes;else goog.dom.setProperties(element,attributes);if(args.length>2){function childHandler(child){if(child)element.appendChild(goog.isString(child)?doc.createTextNode(child):child)}for(var i=2;i<args.length;i++){var arg=args[i];if(goog.isArrayLike(arg)&&!goog.dom.isNodeLike(arg))goog.array.forEach(goog.dom.isNodeList(arg)?goog.array.clone(arg):arg,childHandler);else childHandler(arg)}}return element};goog.dom.$dom=goog.dom.createDom;
goog.dom.createElement=function(name){return document.createElement(name)};goog.dom.createTextNode=function(content){return document.createTextNode(content)};goog.dom.htmlToDocumentFragment=function(htmlString){return goog.dom.htmlToDocumentFragment_(document,htmlString)};
goog.dom.htmlToDocumentFragment_=function(doc,htmlString){var tempDiv=doc.createElement("div");tempDiv.innerHTML=htmlString;if(tempDiv.childNodes.length==1)return tempDiv.firstChild;else{for(var fragment=doc.createDocumentFragment();tempDiv.firstChild;)fragment.appendChild(tempDiv.firstChild);return fragment}};goog.dom.getCompatMode=function(){return goog.dom.isCss1CompatMode()?"CSS1Compat":"BackCompat"};goog.dom.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(document)};
goog.dom.isCss1CompatMode_=function(doc){if(goog.dom.COMPAT_MODE_KNOWN_)return goog.dom.ASSUME_STANDARDS_MODE;return doc.compatMode=="CSS1Compat"};goog.dom.canHaveChildren=function(node){if(node.nodeType!=goog.dom.NodeType.ELEMENT)return false;if("canHaveChildren"in node)return node.canHaveChildren;switch(node.tagName){case goog.dom.TagName.APPLET:case goog.dom.TagName.AREA:case goog.dom.TagName.BR:case goog.dom.TagName.COL:case goog.dom.TagName.FRAME:case goog.dom.TagName.HR:case goog.dom.TagName.IMG:case goog.dom.TagName.INPUT:case goog.dom.TagName.IFRAME:case goog.dom.TagName.ISINDEX:case goog.dom.TagName.LINK:case goog.dom.TagName.NOFRAMES:case goog.dom.TagName.NOSCRIPT:case goog.dom.TagName.META:case goog.dom.TagName.OBJECT:case goog.dom.TagName.PARAM:case goog.dom.TagName.SCRIPT:case goog.dom.TagName.STYLE:return false}return true};
goog.dom.appendChild=function(parent,child){parent.appendChild(child)};goog.dom.removeChildren=function(node){for(var child;child=node.firstChild;)node.removeChild(child)};goog.dom.insertSiblingBefore=function(newNode,refNode){if(refNode.parentNode)refNode.parentNode.insertBefore(newNode,refNode)};goog.dom.insertSiblingAfter=function(newNode,refNode){if(refNode.parentNode)refNode.parentNode.insertBefore(newNode,refNode.nextSibling)};
goog.dom.removeNode=function(node){return node&&node.parentNode?node.parentNode.removeChild(node):null};goog.dom.replaceNode=function(newNode,oldNode){var parent=oldNode.parentNode;if(parent)parent.replaceChild(newNode,oldNode)};
goog.dom.flattenElement=function(element){var child;var parent=element.parentNode;if(parent&&parent.nodeType!=goog.dom.NodeType.DOCUMENT_FRAGMENT)if(element.removeNode)return element.removeNode(false);else{for(;child=element.firstChild;)parent.insertBefore(child,element);return goog.dom.removeNode(element)}};goog.dom.getFirstElementChild=function(node){return goog.dom.getNextElementNode_(node.firstChild,true)};
goog.dom.getLastElementChild=function(node){return goog.dom.getNextElementNode_(node.lastChild,false)};goog.dom.getNextElementSibling=function(node){return goog.dom.getNextElementNode_(node.nextSibling,true)};goog.dom.getPreviousElementSibling=function(node){return goog.dom.getNextElementNode_(node.previousSibling,false)};goog.dom.getNextElementNode_=function(node,forward){for(;node&&node.nodeType!=goog.dom.NodeType.ELEMENT;)node=forward?node.nextSibling:node.previousSibling;return node};
goog.dom.isNodeLike=function(obj){return goog.isObject(obj)&&obj.nodeType>0};goog.dom.BAD_CONTAINS_WEBKIT_=goog.userAgent.WEBKIT&&goog.userAgent.isVersion("522");
goog.dom.contains=function(parent,descendant){if(typeof parent.contains!="undefined"&&!goog.dom.BAD_CONTAINS_WEBKIT_&&descendant.nodeType==goog.dom.NodeType.ELEMENT)return parent==descendant||parent.contains(descendant);if(typeof parent.compareDocumentPosition!="undefined")return parent==descendant||Boolean(parent.compareDocumentPosition(descendant)&16);for(;descendant&&parent!=descendant;)descendant=descendant.parentNode;return descendant==parent};
goog.dom.compareNodeOrder=function(node1,node2){if(node1==node2)return 0;if(node1.compareDocumentPosition)return node1.compareDocumentPosition(node2)&2?1:-1;if("sourceIndex"in node1||node1.parentNode&&"sourceIndex"in node1.parentNode){var isElement1=node1.nodeType==goog.dom.NodeType.ELEMENT;var isElement2=node2.nodeType==goog.dom.NodeType.ELEMENT;if(isElement1&&isElement2)return node1.sourceIndex-node2.sourceIndex;else{var parent1=node1.parentNode;var parent2=node2.parentNode;if(parent1==parent2)return goog.dom.compareSiblingOrder_(node1,
node2);if(!isElement1&&goog.dom.contains(parent1,node2))return-1*goog.dom.compareParentsDescendantNodeIe_(node1,node2);if(!isElement2&&goog.dom.contains(parent2,node1))return goog.dom.compareParentsDescendantNodeIe_(node2,node1);return(isElement1?node1.sourceIndex:parent1.sourceIndex)-(isElement2?node2.sourceIndex:parent2.sourceIndex)}}var doc=goog.dom.getOwnerDocument(node1);var range1;var range2;range1=doc.createRange();range1.selectNode(node1);range1.collapse(true);range2=doc.createRange();range2.selectNode(node2);
range2.collapse(true);return range1.compareBoundaryPoints(goog.global["Range"].START_TO_END,range2)};goog.dom.compareParentsDescendantNodeIe_=function(textNode,node){var parent=textNode.parentNode;if(parent==node)return-1;for(var sibling=node;sibling.parentNode!=parent;)sibling=sibling.parentNode;return goog.dom.compareSiblingOrder_(sibling,textNode)};goog.dom.compareSiblingOrder_=function(node1,node2){for(var s=node2;s=s.previousSibling;)if(s==node1)return-1;return 1};
goog.dom.findCommonAncestor=function(var_args){var i;var count=arguments.length;if(!count)return null;else if(count==1)return arguments[0];var paths=[];var minLength=Infinity;for(i=0;i<count;i++){var ancestors=[];for(var node=arguments[i];node;){ancestors.unshift(node);node=node.parentNode}paths.push(ancestors);minLength=Math.min(minLength,ancestors.length)}var output=null;for(i=0;i<minLength;i++){var first=paths[0][i];for(var j=1;j<count;j++)if(first!=paths[j][i])return output;output=first}return output};
goog.dom.getOwnerDocument=function(node){return node.nodeType==goog.dom.NodeType.DOCUMENT?node:node.ownerDocument||node.document};goog.dom.getFrameContentDocument=function(frame){var doc;if(goog.userAgent.WEBKIT)doc=frame.document||frame.contentWindow.document;else doc=frame.contentDocument||frame.contentWindow.document;return doc};goog.dom.getFrameContentWindow=function(frame){return frame.contentWindow||goog.dom.getWindow_(goog.dom.getFrameContentDocument(frame))};
goog.dom.setTextContent=function(element,text){if("textContent"in element)element.textContent=text;else if(element.firstChild&&element.firstChild.nodeType==goog.dom.NodeType.TEXT){for(;element.lastChild!=element.firstChild;)element.removeChild(element.lastChild);element.firstChild.data=text}else{goog.dom.removeChildren(element);var doc=goog.dom.getOwnerDocument(element);element.appendChild(doc.createTextNode(text))}};
goog.dom.getOuterHtml=function(element){if("outerHTML"in element)return element.outerHTML;else{var doc=goog.dom.getOwnerDocument(element);var div=doc.createElement("div");div.appendChild(element.cloneNode(true));return div.innerHTML}};goog.dom.findNode=function(root,p){var rv=[];var found=goog.dom.findNodes_(root,p,rv,true);return found?rv[0]:undefined};goog.dom.findNodes=function(root,p){var rv=[];goog.dom.findNodes_(root,p,rv,false);return rv};
goog.dom.findNodes_=function(root,p,rv,findOne){if(root!=null){var i=0;for(var child;child=root.childNodes[i];i++){if(p(child)){rv.push(child);if(findOne)return true}if(goog.dom.findNodes_(child,p,rv,findOne))return true}}return false};goog.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};goog.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"};
goog.dom.isFocusableTabIndex=function(element){var attrNode=element.getAttributeNode("tabindex");if(attrNode&&attrNode.specified){var index=element.tabIndex;return goog.isNumber(index)&&index>=0}return false};goog.dom.setFocusableTabIndex=function(element,enable){if(enable)element.tabIndex=0;else element.removeAttribute("tabIndex")};
goog.dom.getTextContent=function(node){var textContent;if(goog.userAgent.IE&&"innerText"in node)textContent=goog.string.canonicalizeNewlines(node.innerText);else{var buf=[];goog.dom.getTextContent_(node,buf,true);textContent=buf.join("")}textContent=textContent.replace(/\xAD/g,"");textContent=textContent.replace(/ +/g," ");if(textContent!=" ")textContent=textContent.replace(/^\s*/,"");return textContent};
goog.dom.getRawTextContent=function(node){var buf=[];goog.dom.getTextContent_(node,buf,false);return buf.join("")};
goog.dom.getTextContent_=function(node,buf,normalizeWhitespace){if(node.nodeName in goog.dom.TAGS_TO_IGNORE_);else if(node.nodeType==goog.dom.NodeType.TEXT)if(normalizeWhitespace)buf.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g,""));else buf.push(node.nodeValue);else if(node.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)buf.push(goog.dom.PREDEFINED_TAG_VALUES_[node.nodeName]);else for(var child=node.firstChild;child;){goog.dom.getTextContent_(child,buf,normalizeWhitespace);child=child.nextSibling}};
goog.dom.getNodeTextLength=function(node){return goog.dom.getTextContent(node).length};goog.dom.getNodeTextOffset=function(node,opt_offsetParent){var root=opt_offsetParent||goog.dom.getOwnerDocument(node).body;for(var buf=[];node&&node!=root;){for(var cur=node;cur=cur.previousSibling;)buf.unshift(goog.dom.getTextContent(cur));node=node.parentNode}return goog.string.trimLeft(buf.join("")).replace(/ +/g," ").length};
goog.dom.getNodeAtOffset=function(parent,offset,opt_result){var stack=[parent];var pos=0;for(var cur;stack.length>0&&pos<offset;){cur=stack.pop();if(cur.nodeName in goog.dom.TAGS_TO_IGNORE_);else if(cur.nodeType==goog.dom.NodeType.TEXT){var text=cur.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," ");pos+=text.length}else if(cur.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)pos+=goog.dom.PREDEFINED_TAG_VALUES_[cur.nodeName].length;else for(var i=cur.childNodes.length-1;i>=0;i--)stack.push(cur.childNodes[i])}if(goog.isObject(opt_result)){opt_result.remainder=
cur?cur.nodeValue.length+offset-pos-1:0;opt_result.node=cur}return cur};goog.dom.isNodeList=function(val){if(val&&typeof val.length=="number")if(goog.isObject(val))return typeof val.item=="function"||typeof val.item=="string";else if(goog.isFunction(val))return typeof val.item=="function";return false};
goog.dom.getAncestorByTagNameAndClass=function(element,opt_tag,opt_class){return goog.dom.getAncestor(element,function(node){return(!opt_tag||node.nodeName==opt_tag)&&(!opt_class||goog.dom.classes.has(node,opt_class))},true)};
goog.dom.getAncestor=function(element,matcher,opt_includeNode,opt_maxSearchSteps){if(!opt_includeNode)element=element.parentNode;var ignoreSearchSteps=opt_maxSearchSteps==null;for(var steps=0;element&&(ignoreSearchSteps||steps<=opt_maxSearchSteps);){if(matcher(element))return element;element=element.parentNode;steps++}return null};goog.dom.DomHelper=function(opt_document){this.document_=opt_document||goog.global.document||document};goog.dom.DomHelper.prototype.getDomHelper=goog.dom.getDomHelper;
goog.dom.DomHelper.prototype.setDocument=function(document){this.document_=document};goog.dom.DomHelper.prototype.getDocument=function(){return this.document_};goog.dom.DomHelper.prototype.getElement=function(element){if(goog.isString(element))return this.document_.getElementById(element);else return element};goog.dom.DomHelper.prototype.$=goog.dom.DomHelper.prototype.getElement;
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass=function(opt_tag,opt_class,opt_el){return goog.dom.getElementsByTagNameAndClass_(this.document_,opt_tag,opt_class,opt_el)};goog.dom.DomHelper.prototype.$$=goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;goog.dom.DomHelper.prototype.setProperties=goog.dom.setProperties;goog.dom.DomHelper.prototype.getViewportSize=function(opt_window){return goog.dom.getViewportSize(opt_window||this.getWindow())};
goog.dom.DomHelper.prototype.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(this.getWindow())};goog.dom.DomHelper.prototype.createDom=function(tagName,opt_attributes,var_args){return goog.dom.createDom_(this.document_,arguments)};goog.dom.DomHelper.prototype.$dom=goog.dom.DomHelper.prototype.createDom;goog.dom.DomHelper.prototype.createElement=function(name){return this.document_.createElement(name)};goog.dom.DomHelper.prototype.createTextNode=function(content){return this.document_.createTextNode(content)};
goog.dom.DomHelper.prototype.htmlToDocumentFragment=function(htmlString){return goog.dom.htmlToDocumentFragment_(this.document_,htmlString)};goog.dom.DomHelper.prototype.getCompatMode=function(){return this.isCss1CompatMode()?"CSS1Compat":"BackCompat"};goog.dom.DomHelper.prototype.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(this.document_)};goog.dom.DomHelper.prototype.getWindow=function(){return goog.dom.getWindow_(this.document_)};
goog.dom.DomHelper.prototype.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(this.document_)};goog.dom.DomHelper.prototype.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(this.document_)};goog.dom.DomHelper.prototype.appendChild=goog.dom.appendChild;goog.dom.DomHelper.prototype.removeChildren=goog.dom.removeChildren;goog.dom.DomHelper.prototype.insertSiblingBefore=goog.dom.insertSiblingBefore;goog.dom.DomHelper.prototype.insertSiblingAfter=goog.dom.insertSiblingAfter;
goog.dom.DomHelper.prototype.removeNode=goog.dom.removeNode;goog.dom.DomHelper.prototype.replaceNode=goog.dom.replaceNode;goog.dom.DomHelper.prototype.flattenElement=goog.dom.flattenElement;goog.dom.DomHelper.prototype.getFirstElementChild=goog.dom.getFirstElementChild;goog.dom.DomHelper.prototype.getLastElementChild=goog.dom.getLastElementChild;goog.dom.DomHelper.prototype.getNextElementSibling=goog.dom.getNextElementSibling;goog.dom.DomHelper.prototype.getPreviousElementSibling=goog.dom.getPreviousElementSibling;
goog.dom.DomHelper.prototype.isNodeLike=goog.dom.isNodeLike;goog.dom.DomHelper.prototype.contains=goog.dom.contains;goog.dom.DomHelper.prototype.getOwnerDocument=goog.dom.getOwnerDocument;goog.dom.DomHelper.prototype.getFrameContentDocument=goog.dom.getFrameContentDocument;goog.dom.DomHelper.prototype.getFrameContentWindow=goog.dom.getFrameContentWindow;goog.dom.DomHelper.prototype.setTextContent=goog.dom.setTextContent;goog.dom.DomHelper.prototype.findNode=goog.dom.findNode;
goog.dom.DomHelper.prototype.findNodes=goog.dom.findNodes;goog.dom.DomHelper.prototype.getTextContent=goog.dom.getTextContent;goog.dom.DomHelper.prototype.getNodeTextLength=goog.dom.getNodeTextLength;goog.dom.DomHelper.prototype.getNodeTextOffset=goog.dom.getNodeTextOffset;goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass=goog.dom.getAncestorByTagNameAndClass;goog.dom.DomHelper.prototype.getAncestor=goog.dom.getAncestor;goog.Disposable=function(){};goog.Disposable.prototype.disposed_=false;goog.Disposable.prototype.isDisposed=function(){return this.disposed_};goog.Disposable.prototype.getDisposed=goog.Disposable.prototype.isDisposed;goog.Disposable.prototype.dispose=function(){if(!this.disposed_){this.disposed_=true;this.disposeInternal()}};goog.Disposable.prototype.disposeInternal=function(){};goog.dispose=function(obj){if(obj&&typeof obj.dispose=="function")obj.dispose()};goog.debug={};goog.debug.errorHandlerWeakDep={protectEntryPoint:function(fn,opt_tracers){return fn}};goog.events={};goog.events.Event=function(type,opt_target){this.type=type;this.target=opt_target;this.currentTarget=this.target};goog.inherits(goog.events.Event,goog.Disposable);goog.events.Event.prototype.disposeInternal=function(){delete this.type;delete this.target;delete this.currentTarget};goog.events.Event.prototype.propagationStopped_=false;goog.events.Event.prototype.returnValue_=true;goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=true};
goog.events.Event.prototype.preventDefault=function(){this.returnValue_=false};goog.events.BrowserEvent=function(opt_e,opt_currentTarget){if(opt_e)this.init(opt_e,opt_currentTarget)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};goog.events.BrowserEvent.IEButtonMap_=[1,4,2];goog.events.BrowserEvent.prototype.type=null;goog.events.BrowserEvent.prototype.target=null;goog.events.BrowserEvent.prototype.currentTarget;goog.events.BrowserEvent.prototype.relatedTarget=null;
goog.events.BrowserEvent.prototype.offsetX=0;goog.events.BrowserEvent.prototype.offsetY=0;goog.events.BrowserEvent.prototype.clientX=0;goog.events.BrowserEvent.prototype.clientY=0;goog.events.BrowserEvent.prototype.screenX=0;goog.events.BrowserEvent.prototype.screenY=0;goog.events.BrowserEvent.prototype.button=0;goog.events.BrowserEvent.prototype.keyCode=0;goog.events.BrowserEvent.prototype.charCode=0;goog.events.BrowserEvent.prototype.ctrlKey=false;goog.events.BrowserEvent.prototype.altKey=false;
goog.events.BrowserEvent.prototype.shiftKey=false;goog.events.BrowserEvent.prototype.metaKey=false;goog.events.BrowserEvent.prototype.event_=null;
goog.events.BrowserEvent.prototype.init=function(e,opt_currentTarget){this.type=e.type;this.target=e.target||e.srcElement;this.currentTarget=opt_currentTarget;if(e.relatedTarget)this.relatedTarget=e.relatedTarget;else if(this.type==goog.events.EventType.MOUSEOVER)this.relatedTarget=e.fromElement;else if(this.type==goog.events.EventType.MOUSEOUT)this.relatedTarget=e.toElement;else this.relatedTarget=null;this.offsetX=typeof e.layerX=="number"?e.layerX:e.offsetX;this.offsetY=typeof e.layerY=="number"?
e.layerY:e.offsetY;this.clientX=typeof e.clientX=="number"?e.clientX:e.pageX;this.clientY=typeof e.clientY=="number"?e.clientY:e.pageY;this.screenX=e.screenX||0;this.screenY=e.screenY||0;this.button=e.button;this.keyCode=e.keyCode||0;this.charCode=e.charCode||(this.type==goog.events.EventType.KEYPRESS?e.keyCode:0);this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;this.shiftKey=e.shiftKey;this.metaKey=e.metaKey;this.event_=e;delete this.returnValue_;delete this.propagationStopped_};
goog.events.BrowserEvent.prototype.isButton=function(button){if(goog.userAgent.IE)if(this.type==goog.events.EventType.CLICK)return button==goog.events.BrowserEvent.MouseButton.LEFT;else return!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap_[button]);else return this.event_.button==button};goog.events.BrowserEvent.prototype.stopPropagation=function(){this.propagationStopped_=true;if(this.event_.stopPropagation)this.event_.stopPropagation();else this.event_.cancelBubble=true};
goog.events.BrowserEvent.prototype.preventDefault=function(){this.returnValue_=false;if(!this.event_.preventDefault){this.event_.returnValue=false;try{this.event_.keyCode=-1}catch(ex){}}else this.event_.preventDefault()};goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_};goog.events.BrowserEvent.prototype.disposeInternal=function(){goog.events.BrowserEvent.superClass_.disposeInternal.call(this);this.event_=null};goog.events.Listener=function(){};goog.events.Listener.counter_=0;goog.events.Listener.prototype.isFunctionListener_=null;goog.events.Listener.prototype.listener=null;goog.events.Listener.prototype.proxy=null;goog.events.Listener.prototype.src=null;goog.events.Listener.prototype.type=null;goog.events.Listener.prototype.capture=null;goog.events.Listener.prototype.handler=null;goog.events.Listener.prototype.key=0;goog.events.Listener.prototype.removed=false;goog.events.Listener.prototype.callOnce=false;
goog.events.Listener.prototype.init=function(listener,proxy,src,type,capture,handler){if(goog.isFunction(listener))this.isFunctionListener_=true;else if(listener&&listener.handleEvent&&goog.isFunction(listener.handleEvent))this.isFunctionListener_=false;else throw Error("Invalid listener argument");this.listener=listener;this.proxy=proxy;this.src=src;this.type=type;this.capture=!!capture;this.handler=handler;this.callOnce=false;this.key=++goog.events.Listener.counter_;this.removed=false};
goog.events.Listener.prototype.handleEvent=function(eventObject){if(this.isFunctionListener_)return this.listener.call(this.handler||this.src,eventObject);return this.listener.handleEvent.call(this.listener,eventObject)};goog.structs={};goog.structs.SimplePool=function(initialCount,maxCount){goog.Disposable.call(this);this.maxCount_=maxCount;this.freeQueue_=[];this.createInitial_(initialCount)};goog.inherits(goog.structs.SimplePool,goog.Disposable);goog.structs.SimplePool.prototype.createObjectFn_=null;goog.structs.SimplePool.prototype.disposeObjectFn_=null;goog.structs.SimplePool.prototype.setCreateObjectFn=function(createObjectFn){this.createObjectFn_=createObjectFn};
goog.structs.SimplePool.prototype.setDisposeObjectFn=function(disposeObjectFn){this.disposeObjectFn_=disposeObjectFn};goog.structs.SimplePool.prototype.getObject=function(){if(this.freeQueue_.length)return this.freeQueue_.pop();return this.createObject()};goog.structs.SimplePool.prototype.releaseObject=function(obj){if(this.freeQueue_.length<this.maxCount_)this.freeQueue_.push(obj);else this.disposeObject(obj)};
goog.structs.SimplePool.prototype.createInitial_=function(initialCount){if(initialCount>this.maxCount_)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");for(var i=0;i<initialCount;i++)this.freeQueue_.push(this.createObject())};goog.structs.SimplePool.prototype.createObject=function(){if(this.createObjectFn_)return this.createObjectFn_();else return{}};
goog.structs.SimplePool.prototype.disposeObject=function(obj){if(this.disposeObjectFn_)this.disposeObjectFn_(obj);else if(goog.isFunction(obj.dispose))obj.dispose();else for(var i in obj)delete obj[i]};goog.structs.SimplePool.prototype.disposeInternal=function(){goog.structs.SimplePool.superClass_.disposeInternal.call(this);for(var freeQueue=this.freeQueue_;freeQueue.length;)this.disposeObject(freeQueue.pop());delete this.freeQueue_};goog.events.listeners_={};goog.events.listenerTree_={};goog.events.sources_={};goog.events.OBJECT_POOL_INITIAL_COUNT=0;goog.events.OBJECT_POOL_MAX_COUNT=600;goog.events.objectPool_=new goog.structs.SimplePool(goog.events.OBJECT_POOL_INITIAL_COUNT,goog.events.OBJECT_POOL_MAX_COUNT);goog.events.objectPool_.setCreateObjectFn(function(){return{count_:0,remaining_:0}});goog.events.objectPool_.setDisposeObjectFn(function(obj){obj.count_=0});goog.events.ARRAY_POOL_INITIAL_COUNT=0;
goog.events.ARRAY_POOL_MAX_COUNT=600;goog.events.arrayPool_=new goog.structs.SimplePool(goog.events.ARRAY_POOL_INITIAL_COUNT,goog.events.ARRAY_POOL_MAX_COUNT);goog.events.arrayPool_.setCreateObjectFn(function(){return[]});goog.events.arrayPool_.setDisposeObjectFn(function(obj){obj.length=0;delete obj.locked_;delete obj.needsCleanup_});goog.events.HANDLE_EVENT_PROXY_POOL_INITIAL_COUNT=0;goog.events.HANDLE_EVENT_PROXY_POOL_MAX_COUNT=600;
goog.events.handleEventProxyPool_=new goog.structs.SimplePool(goog.events.HANDLE_EVENT_PROXY_POOL_INITIAL_COUNT,goog.events.HANDLE_EVENT_PROXY_POOL_MAX_COUNT);goog.events.handleEventProxyPool_.setCreateObjectFn(function(){var f=function(eventObject){return goog.events.handleBrowserEvent_.call(f.src,f.key,eventObject)};return f});goog.events.LISTENER_POOL_INITIAL_COUNT=0;goog.events.LISTENER_POOL_MAX_COUNT=600;goog.events.createListenerFunction_=function(){return new goog.events.Listener};
goog.events.listenerPool_=new goog.structs.SimplePool(goog.events.LISTENER_POOL_INITIAL_COUNT,goog.events.LISTENER_POOL_MAX_COUNT);goog.events.listenerPool_.setCreateObjectFn(goog.events.createListenerFunction_);goog.events.EVENT_POOL_INITIAL_COUNT=0;goog.events.EVENT_POOL_MAX_COUNT=600;goog.events.createEventFunction_=function(){return new goog.events.BrowserEvent};
goog.events.createEventPool_=function(){var eventPool=null;if(goog.userAgent.IE){eventPool=new goog.structs.SimplePool(goog.events.EVENT_POOL_INITIAL_COUNT,goog.events.EVENT_POOL_MAX_COUNT);eventPool.setCreateObjectFn(goog.events.createEventFunction_)}return eventPool};goog.events.eventPool_=goog.events.createEventPool_();goog.events.onString_="on";goog.events.onStringMap_={};goog.events.keySeparator_="_";
goog.events.listen=function(src,type,listener,opt_capt,opt_handler){if(!type)throw Error("Invalid event type");else if(goog.isArray(type)){for(var i=0;i<type.length;i++)goog.events.listen(src,type[i],listener,opt_capt,opt_handler);return null}else{var capture=!!opt_capt;var map=goog.events.listenerTree_;if(!(type in map))map[type]=goog.events.objectPool_.getObject();map=map[type];if(!(capture in map)){map[capture]=goog.events.objectPool_.getObject();map.count_++}map=map[capture];var srcHashCode=goog.getHashCode(src);
var listenerArray;var listenerObj;map.remaining_++;if(!map[srcHashCode]){listenerArray=map[srcHashCode]=goog.events.arrayPool_.getObject();map.count_++}else{listenerArray=map[srcHashCode];for(i=0;i<listenerArray.length;i++){listenerObj=listenerArray[i];if(listenerObj.listener==listener&&listenerObj.handler==opt_handler){if(listenerObj.removed)break;return listenerArray[i].key}}}var proxy=goog.events.handleEventProxyPool_.getObject();proxy.src=src;listenerObj=goog.events.listenerPool_.getObject();
listenerObj.init(listener,proxy,src,type,capture,opt_handler);var key=listenerObj.key;proxy.key=key;listenerArray.push(listenerObj);goog.events.listeners_[key]=listenerObj;if(!goog.events.sources_[srcHashCode])goog.events.sources_[srcHashCode]=goog.events.arrayPool_.getObject();goog.events.sources_[srcHashCode].push(listenerObj);if(src.addEventListener){if(src==goog.global||!src.customEvent_)src.addEventListener(type,proxy,capture)}else src.attachEvent(goog.events.getOnString_(type),proxy);return key}};
goog.events.listenOnce=function(src,type,listener,opt_capt,opt_handler){if(goog.isArray(type)){for(var i=0;i<type.length;i++)goog.events.listenOnce(src,type[i],listener,opt_capt,opt_handler);return null}var key=goog.events.listen(src,type,listener,opt_capt,opt_handler);var listenerObj=goog.events.listeners_[key];listenerObj.callOnce=true;return key};
goog.events.unlisten=function(src,type,listener,opt_capt,opt_handler){if(goog.isArray(type)){for(var i=0;i<type.length;i++)goog.events.unlisten(src,type[i],listener,opt_capt,opt_handler);return null}var capture=!!opt_capt;var listenerArray=goog.events.getListeners_(src,type,capture);if(!listenerArray)return false;for(i=0;i<listenerArray.length;i++)if(listenerArray[i].listener==listener&&listenerArray[i].capture==capture&&listenerArray[i].handler==opt_handler)return goog.events.unlistenByKey(listenerArray[i].key);
return false};
goog.events.unlistenByKey=function(key){if(!goog.events.listeners_[key])return false;var listener=goog.events.listeners_[key];if(listener.removed)return false;var src=listener.src;var type=listener.type;var proxy=listener.proxy;var capture=listener.capture;if(src.removeEventListener){if(src==goog.global||!src.customEvent_)src.removeEventListener(type,proxy,capture)}else if(src.detachEvent)src.detachEvent(goog.events.getOnString_(type),proxy);var srcHashCode=goog.getHashCode(src);var listenerArray=goog.events.listenerTree_[type][capture][srcHashCode];
if(goog.events.sources_[srcHashCode]){var sourcesArray=goog.events.sources_[srcHashCode];goog.array.remove(sourcesArray,listener);if(sourcesArray.length==0)delete goog.events.sources_[srcHashCode]}listener.removed=true;listenerArray.needsCleanup_=true;goog.events.cleanUp_(type,capture,srcHashCode,listenerArray);delete goog.events.listeners_[key];return true};
goog.events.cleanUp_=function(type,capture,srcHashCode,listenerArray){if(!listenerArray.locked_)if(listenerArray.needsCleanup_){var oldIndex=0;for(var newIndex=0;oldIndex<listenerArray.length;oldIndex++){if(listenerArray[oldIndex].removed){goog.events.listenerPool_.releaseObject(listenerArray[oldIndex]);continue}if(oldIndex!=newIndex)listenerArray[newIndex]=listenerArray[oldIndex];newIndex++}listenerArray.length=newIndex;listenerArray.needsCleanup_=false;if(newIndex==0){goog.events.arrayPool_.releaseObject(listenerArray);
delete goog.events.listenerTree_[type][capture][srcHashCode];goog.events.listenerTree_[type][capture].count_--;if(goog.events.listenerTree_[type][capture].count_==0){goog.events.objectPool_.releaseObject(goog.events.listenerTree_[type][capture]);delete goog.events.listenerTree_[type][capture];goog.events.listenerTree_[type].count_--}if(goog.events.listenerTree_[type].count_==0){goog.events.objectPool_.releaseObject(goog.events.listenerTree_[type]);delete goog.events.listenerTree_[type]}}}};
goog.events.removeAll=function(opt_obj,opt_type,opt_capt){var count=0;var noObj=opt_obj==null;var noType=opt_type==null;var noCapt=opt_capt==null;opt_capt=!!opt_capt;if(!noObj){var srcHashCode=goog.getHashCode(opt_obj);if(goog.events.sources_[srcHashCode]){var sourcesArray=goog.events.sources_[srcHashCode];for(var i=sourcesArray.length-1;i>=0;i--){var listener=sourcesArray[i];if((noType||opt_type==listener.type)&&(noCapt||opt_capt==listener.capture)){goog.events.unlistenByKey(listener.key);count++}}}}else goog.object.forEach(goog.events.sources_,
function(listeners){for(var i=listeners.length-1;i>=0;i--){var listener=listeners[i];if((noType||opt_type==listener.type)&&(noCapt||opt_capt==listener.capture)){goog.events.unlistenByKey(listener.key);count++}}});return count};goog.events.getListeners=function(obj,type,capture){return goog.events.getListeners_(obj,type,capture)||[]};
goog.events.getListeners_=function(obj,type,capture){var map=goog.events.listenerTree_;if(type in map){map=map[type];if(capture in map){map=map[capture];var objHashCode=goog.getHashCode(obj);if(map[objHashCode])return map[objHashCode]}}return null};
goog.events.getListener=function(src,type,listener,opt_capt,opt_handler){var capture=!!opt_capt;var listenerArray=goog.events.getListeners_(src,type,capture);if(listenerArray)for(var i=0;i<listenerArray.length;i++)if(listenerArray[i].listener==listener&&listenerArray[i].capture==capture&&listenerArray[i].handler==opt_handler)return listenerArray[i];return null};
goog.events.hasListener=function(obj,opt_type,opt_capture){var objHashCode=goog.getHashCode(obj);var listeners=goog.events.sources_[objHashCode];if(listeners){var hasType=goog.isDef(opt_type);var hasCapture=goog.isDef(opt_capture);if(hasType&&hasCapture){var map=goog.events.listenerTree_[opt_type];return!!map&&!!map[opt_capture]&&objHashCode in map[opt_capture]}else if(!(hasType||hasCapture))return true;else return goog.array.some(listeners,function(listener){return hasType&&listener.type==opt_type||
hasCapture&&listener.capture==opt_capture})}return false};goog.events.expose=function(e){var str=[];for(var key in e)if(e[key]&&e[key].id)str.push(key+" = "+e[key]+" ("+e[key].id+")");else str.push(key+" = "+e[key]);return str.join("\n")};
goog.events.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",SELECT:"select",SUBMIT:"submit",LOAD:"load",UNLOAD:"unload",ERROR:"error",HELP:"help",RESIZE:"resize",
SCROLL:"scroll",READYSTATECHANGE:"readystatechange",CONTEXTMENU:"contextmenu"};goog.events.getOnString_=function(type){if(type in goog.events.onStringMap_)return goog.events.onStringMap_[type];return goog.events.onStringMap_[type]=goog.events.onString_+type};goog.events.fireListeners=function(obj,type,capture,eventObject){var map=goog.events.listenerTree_;if(type in map){map=map[type];if(capture in map)return goog.events.fireListeners_(map[capture],obj,type,capture,eventObject)}return true};
goog.events.fireListeners_=function(map,obj,type,capture,eventObject){var retval=1;var objHashCode=goog.getHashCode(obj);if(map[objHashCode]){map.remaining_--;var listenerArray=map[objHashCode];if(!listenerArray.locked_)listenerArray.locked_=1;else listenerArray.locked_++;try{var length=listenerArray.length;for(var i=0;i<length;i++){var listener=listenerArray[i];if(listener&&!listener.removed)retval&=goog.events.fireListener(listener,eventObject)!==false}}finally{listenerArray.locked_--;goog.events.cleanUp_(type,
capture,objHashCode,listenerArray)}}return Boolean(retval)};goog.events.fireListener=function(listener,eventObject){var rv=listener.handleEvent(eventObject);if(listener.callOnce)goog.events.unlistenByKey(listener.key);return rv};goog.events.getTotalListenerCount=function(){return goog.object.getCount(goog.events.listeners_)};
goog.events.dispatchEvent=function(src,e){if(goog.isString(e))e=new goog.events.Event(e,src);else if(!(e instanceof goog.events.Event)){var oldEvent=e;e=new goog.events.Event(e.type,src);goog.object.extend(e,oldEvent)}else e.target=e.target||src;var rv=1;var ancestors;var type=e.type;var map=goog.events.listenerTree_;if(!(type in map))return true;map=map[type];var hasCapture=true in map;var targetsMap;if(hasCapture){ancestors=[];for(var parent=src;parent;parent=parent.getParentEventTarget())ancestors.push(parent);
targetsMap=map[true];targetsMap.remaining_=targetsMap.count_;for(var i=ancestors.length-1;!e.propagationStopped_&&i>=0&&targetsMap.remaining_;i--){e.currentTarget=ancestors[i];rv&=goog.events.fireListeners_(targetsMap,ancestors[i],e.type,true,e)&&e.returnValue_!=false}}var hasBubble=false in map;if(hasBubble){targetsMap=map[false];targetsMap.remaining_=targetsMap.count_;if(hasCapture)for(i=0;!e.propagationStopped_&&i<ancestors.length&&targetsMap.remaining_;i++){e.currentTarget=ancestors[i];rv&=goog.events.fireListeners_(targetsMap,
ancestors[i],e.type,false,e)&&e.returnValue_!=false}else for(var current=src;!e.propagationStopped_&&current&&targetsMap.remaining_;current=current.getParentEventTarget()){e.currentTarget=current;rv&=goog.events.fireListeners_(targetsMap,current,e.type,false,e)&&e.returnValue_!=false}}return Boolean(rv)};goog.events.protectBrowserEventEntryPoint=function(errorHandler,opt_tracers){goog.events.handleBrowserEvent_=errorHandler.protectEntryPoint(goog.events.handleBrowserEvent_,opt_tracers)};
goog.events.handleBrowserEvent_=function(key,opt_evt){if(!goog.events.listeners_[key])return true;var listener=goog.events.listeners_[key];var type=listener.type;var map=goog.events.listenerTree_;if(!(type in map))return true;map=map[type];var retval;var targetsMap;if(goog.userAgent.IE){var ieEvent=opt_evt||goog.getObjectByName("window.event");var hasCapture=true in map;var hasBubble=false in map;if(hasCapture){if(goog.events.isMarkedIeEvent_(ieEvent))return true;goog.events.markIeEvent_(ieEvent)}var evt=
goog.events.eventPool_.getObject();evt.init(ieEvent,this);retval=true;try{if(hasCapture){var ancestors=goog.events.arrayPool_.getObject();for(var parent=evt.currentTarget;parent;parent=parent.parentNode)ancestors.push(parent);targetsMap=map[true];targetsMap.remaining_=targetsMap.count_;for(var i=ancestors.length-1;!evt.propagationStopped_&&i>=0&&targetsMap.remaining_;i--){evt.currentTarget=ancestors[i];retval&=goog.events.fireListeners_(targetsMap,ancestors[i],type,true,evt)}if(hasBubble){targetsMap=
map[false];targetsMap.remaining_=targetsMap.count_;for(i=0;!evt.propagationStopped_&&i<ancestors.length&&targetsMap.remaining_;i++){evt.currentTarget=ancestors[i];retval&=goog.events.fireListeners_(targetsMap,ancestors[i],type,false,evt)}}}else retval=goog.events.fireListener(listener,evt)}finally{if(ancestors){ancestors.length=0;goog.events.arrayPool_.releaseObject(ancestors)}evt.dispose();goog.events.eventPool_.releaseObject(evt)}return retval}var be=new goog.events.BrowserEvent(opt_evt,this);try{retval=
goog.events.fireListener(listener,be)}finally{be.dispose()}return retval};goog.events.markIeEvent_=function(e){var useReturnValue=false;if(e.keyCode==0)try{e.keyCode=-1;return}catch(ex){useReturnValue=true}if(useReturnValue||e.returnValue==undefined)e.returnValue=true};goog.events.isMarkedIeEvent_=function(e){return e.keyCode<0||e.returnValue!=undefined};goog.events.uniqueIdCounter_=0;goog.events.getUniqueId=function(identifier){return identifier+"_"+goog.events.uniqueIdCounter_++};goog.events.EventTarget=function(){};goog.inherits(goog.events.EventTarget,goog.Disposable);goog.events.EventTarget.prototype.customEvent_=true;goog.events.EventTarget.prototype.parentEventTarget_=null;goog.events.EventTarget.prototype.getParentEventTarget=function(){return this.parentEventTarget_};goog.events.EventTarget.prototype.setParentEventTarget=function(parent){this.parentEventTarget_=parent};
goog.events.EventTarget.prototype.addEventListener=function(type,handler,opt_capture,opt_handlerScope){goog.events.listen(this,type,handler,opt_capture,opt_handlerScope)};goog.events.EventTarget.prototype.removeEventListener=function(type,handler,opt_capture,opt_handlerScope){goog.events.unlisten(this,type,handler,opt_capture,opt_handlerScope)};goog.events.EventTarget.prototype.dispatchEvent=function(e){return goog.events.dispatchEvent(this,e)};
goog.events.EventTarget.prototype.disposeInternal=function(){goog.events.EventTarget.superClass_.disposeInternal.call(this);goog.events.removeAll(this);this.parentEventTarget_=null};goog.Timer=function(opt_interval,opt_timerObject){goog.events.EventTarget.call(this);this.interval_=opt_interval||1;this.timerObject_=opt_timerObject||goog.Timer.defaultTimerObject;this.boundTick_=goog.bind(this.tick_,this);this.last_=goog.now()};goog.inherits(goog.Timer,goog.events.EventTarget);goog.Timer.MAX_TIMEOUT_=2147483647;goog.Timer.prototype.enabled=false;goog.Timer.defaultTimerObject=goog.global["window"];goog.Timer.intervalScale=0.8;goog.Timer.prototype.timer_=null;
goog.Timer.prototype.getInterval=function(){return this.interval_};goog.Timer.prototype.setInterval=function(interval){this.interval_=interval;if(this.timer_&&this.enabled){this.stop();this.start()}else if(this.timer_)this.stop()};
goog.Timer.prototype.tick_=function(){if(this.enabled){var elapsed=goog.now()-this.last_;if(elapsed>0&&elapsed<this.interval_*goog.Timer.intervalScale){this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-elapsed);return}this.dispatchTick_();if(this.enabled){this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_);this.last_=goog.now()}}};goog.Timer.prototype.dispatchTick_=function(){this.dispatchEvent(goog.Timer.TICK)};
goog.Timer.prototype.start=function(){this.enabled=true;if(!this.timer_){this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_);this.last_=goog.now()}};goog.Timer.prototype.stop=function(){this.enabled=false;if(this.timer_){this.timerObject_.clearTimeout(this.timer_);this.timer_=null}};goog.Timer.prototype.disposeInternal=function(){goog.Timer.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};goog.Timer.TICK="tick";
goog.Timer.callOnce=function(listener,opt_interval,opt_handler){if(goog.isFunction(listener)){if(opt_handler)listener=goog.bind(listener,opt_handler)}else if(listener&&typeof listener.handleEvent=="function")listener=goog.bind(listener.handleEvent,listener);else throw Error("Invalid listener argument");if(opt_interval>goog.Timer.MAX_TIMEOUT_)return-1;else return goog.Timer.defaultTimerObject.setTimeout(listener,opt_interval||0)};goog.Timer.clear=function(timerId){goog.Timer.defaultTimerObject.clearTimeout(timerId)};goog.fx={};goog.fx.easing={};goog.fx.TIMEOUT=20;goog.fx.easing.easeIn=function(t){return t*t*t};goog.fx.easing.easeOut=function(t){return 1-Math.pow(1-t,3)};goog.fx.easing.inAndOut=function(t){return 3*t*t-2*t*t*t};
goog.fx.Animation=function(start,end,duration,opt_acc){goog.events.EventTarget.call(this);if(!goog.isArray(start)||!goog.isArray(end))throw Error("Start and end parameters must be arrays");if(start.length!=end.length)throw Error("Start and end points must be the same length");this.startPoint=start;this.endPoint=end;this.duration=duration;this.accel=opt_acc;this.coords=[]};goog.inherits(goog.fx.Animation,goog.events.EventTarget);
goog.fx.Animation.EventType={PLAY:"play",BEGIN:"begin",RESUME:"resume",END:"end",STOP:"stop",FINISH:"finish",PAUSE:"pause",ANIMATE:"animate",DESTROY:"destroy"};goog.fx.Animation.State={STOPPED:0,PAUSED:-1,PLAYING:1};goog.fx.Animation.activeAnimations_={};goog.fx.Animation.globalTimer_=null;
goog.fx.Animation.cycleAnimations_=function(){goog.Timer.defaultTimerObject.clearTimeout(goog.fx.Animation.globalTimer_);var now=goog.now();for(var hc in goog.fx.Animation.activeAnimations_)goog.fx.Animation.activeAnimations_[hc].cycle(now);goog.fx.Animation.globalTimer_=goog.object.isEmpty(goog.fx.Animation.activeAnimations_)?null:goog.Timer.defaultTimerObject.setTimeout(goog.fx.Animation.cycleAnimations_,goog.fx.TIMEOUT)};
goog.fx.Animation.registerAnimation=function(animation){var hc=goog.getHashCode(animation);if(!(hc in goog.fx.Animation.activeAnimations_))goog.fx.Animation.activeAnimations_[hc]=animation;if(!goog.fx.Animation.globalTimer_)goog.fx.Animation.globalTimer_=goog.Timer.defaultTimerObject.setTimeout(goog.fx.Animation.cycleAnimations_,goog.fx.TIMEOUT)};
goog.fx.Animation.unregisterAnimation=function(animation){var hc=goog.getHashCode(animation);delete goog.fx.Animation.activeAnimations_[hc];if(goog.fx.Animation.globalTimer_&&goog.object.isEmpty(goog.fx.Animation.activeAnimations_)){goog.Timer.defaultTimerObject.clearTimeout(goog.fx.Animation.globalTimer_);goog.fx.Animation.globalTimer_=null}};goog.fx.Animation.prototype.state_=goog.fx.Animation.State.STOPPED;goog.fx.Animation.prototype.fps_=0;goog.fx.Animation.prototype.progress=0;
goog.fx.Animation.prototype.startTime=null;goog.fx.Animation.prototype.endTime=null;goog.fx.Animation.prototype.lastFrame=null;
goog.fx.Animation.prototype.play=function(opt_restart){if(opt_restart||this.state_==goog.fx.Animation.State.STOPPED){this.progress=0;this.coords=this.startPoint}else if(this.state_==goog.fx.Animation.State.PLAYING)return false;goog.fx.Animation.unregisterAnimation(this);this.startTime=goog.now();if(this.state_==goog.fx.Animation.State.PAUSED)this.startTime-=this.duration*this.progress;this.endTime=this.startTime+this.duration;this.lastFrame=this.startTime;if(!this.progress)this.onBegin();this.onPlay();
if(this.state_==goog.fx.Animation.State.PAUSED)this.onResume();this.state_=goog.fx.Animation.State.PLAYING;goog.fx.Animation.registerAnimation(this);this.cycle(this.startTime);return true};goog.fx.Animation.prototype.stop=function(gotoEnd){goog.fx.Animation.unregisterAnimation(this);this.state_=goog.fx.Animation.State.STOPPED;if(gotoEnd)this.progress=1;this.updateCoords_(this.progress);this.onStop();this.onEnd()};
goog.fx.Animation.prototype.pause=function(){if(this.state_==goog.fx.Animation.State.PLAYING){goog.fx.Animation.unregisterAnimation(this);this.state_=goog.fx.Animation.State.PAUSED;this.onPause()}};goog.fx.Animation.prototype.disposeInternal=function(){if(this.state_!=goog.fx.Animation.State.STOPPED)this.stop(false);this.onDestroy();goog.fx.Animation.superClass_.disposeInternal.call(this)};goog.fx.Animation.prototype.destroy=function(){this.dispose()};
goog.fx.Animation.prototype.cycle=function(now){this.progress=(now-this.startTime)/(this.endTime-this.startTime);if(this.progress>=1)this.progress=1;this.fps_=1000/(now-this.lastFrame);this.lastFrame=now;if(goog.isFunction(this.accel))this.updateCoords_(this.accel(this.progress));else this.updateCoords_(this.progress);if(this.progress==1){this.state_=goog.fx.Animation.State.STOPPED;goog.fx.Animation.unregisterAnimation(this);this.onFinish();this.onEnd()}else if(this.state_==goog.fx.Animation.State.PLAYING)this.onAnimate()};
goog.fx.Animation.prototype.updateCoords_=function(t){this.coords=new Array(this.startPoint.length);for(var i=0;i<this.startPoint.length;i++)this.coords[i]=(this.endPoint[i]-this.startPoint[i])*t+this.startPoint[i]};goog.fx.Animation.prototype.onAnimate=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.ANIMATE)};goog.fx.Animation.prototype.onBegin=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.BEGIN)};goog.fx.Animation.prototype.onDestroy=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.DESTROY)};
goog.fx.Animation.prototype.onEnd=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.END)};goog.fx.Animation.prototype.onFinish=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.FINISH)};goog.fx.Animation.prototype.onPause=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.PAUSE)};goog.fx.Animation.prototype.onPlay=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.PLAY)};goog.fx.Animation.prototype.onResume=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.RESUME)};
goog.fx.Animation.prototype.onStop=function(){this.dispatchAnimationEvent_(goog.fx.Animation.EventType.STOP)};goog.fx.Animation.prototype.dispatchAnimationEvent_=function(type){this.dispatchEvent(new goog.fx.AnimationEvent(type,this))};
goog.fx.AnimationEvent=function(type,anim){goog.events.Event.call(this,type);this.coords=anim.coords;this.x=anim.coords[0];this.y=anim.coords[1];this.z=anim.coords[2];this.duration=anim.duration;this.progress=anim.progress;this.fps=anim.fps_;this.state=anim.state_;this.anim=anim};goog.inherits(goog.fx.AnimationEvent,goog.events.Event);goog.fx.AnimationEvent.prototype.coordsAsInts=function(){return goog.array.map(this.coords,Math.round)};goog.color={};
goog.color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};goog.math.Box=function(top,right,bottom,left){this.top=top;this.right=right;this.bottom=bottom;this.left=left};goog.math.Box.boundingBox=function(var_args){var box=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x);for(var i=1;i<arguments.length;i++){var coord=arguments[i];box.top=Math.min(box.top,coord.y);box.right=Math.max(box.right,coord.x);box.bottom=Math.max(box.bottom,coord.y);box.left=Math.min(box.left,coord.x)}return box};
goog.math.Box.prototype.clone=function(){return new goog.math.Box(this.top,this.right,this.bottom,this.left)};if(goog.DEBUG)goog.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};goog.math.Box.prototype.contains=function(other){return goog.math.Box.contains(this,other)};
goog.math.Box.prototype.expand=function(top,opt_right,opt_bottom,opt_left){if(goog.isObject(top)){this.top-=top.top;this.right+=top.right;this.bottom+=top.bottom;this.left-=top.left}else{this.top-=top;this.right+=opt_right;this.bottom+=opt_bottom;this.left-=opt_left}return this};goog.math.Box.equals=function(a,b){if(a==b)return true;if(!a||!b)return false;return a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left};
goog.math.Box.contains=function(box,other){if(!box||!other)return false;if(other instanceof goog.math.Box)return other.left>=box.left&&other.right<=box.right&&other.top>=box.top&&other.bottom<=box.bottom;return other.x>=box.left&&other.x<=box.right&&other.y>=box.top&&other.y<=box.bottom};
goog.math.Box.distance=function(box,coord){if(coord.x>=box.left&&coord.x<=box.right){if(coord.y>=box.top&&coord.y<=box.bottom)return 0;return coord.y<box.top?box.top-coord.y:coord.y-box.bottom}if(coord.y>=box.top&&coord.y<=box.bottom)return coord.x<box.left?box.left-coord.x:coord.x-box.right;return goog.math.Coordinate.distance(coord,new goog.math.Coordinate(coord.x<box.left?box.left:box.right,coord.y<box.top?box.top:box.bottom))};goog.math.Range=function(a,b){a=Number(a);b=Number(b);this.start=a<b?a:b;this.end=a<b?b:a};goog.math.Range.prototype.clone=function(){return new goog.math.Range(this.start,this.end)};if(goog.DEBUG)goog.math.Range.prototype.toString=function(){return"["+this.start+", "+this.end+"]"};goog.math.Range.equals=function(a,b){if(a==b)return true;if(!a||!b)return false;return a.start==b.start&&a.end==b.end};
goog.math.Range.intersection=function(a,b){var c0=Math.max(a.start,b.start);var c1=Math.min(a.end,b.end);return c0<=c1?new goog.math.Range(c0,c1):null};goog.math.Range.hasIntersection=function(a,b){return Math.max(a.start,b.start)<=Math.min(a.end,b.end)};goog.math.Range.boundingRange=function(a,b){return new goog.math.Range(Math.min(a.start,b.start),Math.max(a.end,b.end))};goog.math.Range.contains=function(a,b){return a.start<=b.start&&a.end>=b.end};
goog.math.Range.containsPoint=function(range,p){return range.start<=p&&range.end>=p};goog.math.Rect=function(x,y,w,h){this.left=x;this.top=y;this.width=w;this.height=h};goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height)};goog.math.Rect.prototype.toBox=function(){var right=this.left+this.width;var bottom=this.top+this.height;return new goog.math.Box(this.top,right,bottom,this.left)};goog.math.Rect.createFromBox=function(box){return new goog.math.Rect(box.left,box.top,box.right-box.left,box.bottom-box.top)};
if(goog.DEBUG)goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};goog.math.Rect.equals=function(a,b){if(a==b)return true;if(!a||!b)return false;return a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height};
goog.math.Rect.prototype.intersection=function(rect){var x0=Math.max(this.left,rect.left);var x1=Math.min(this.left+this.width,rect.left+rect.width);if(x0<=x1){var y0=Math.max(this.top,rect.top);var y1=Math.min(this.top+this.height,rect.top+rect.height);if(y0<=y1){this.left=x0;this.top=y0;this.width=x1-x0;this.height=y1-y0;return true}}return false};
goog.math.Rect.intersection=function(a,b){var x0=Math.max(a.left,b.left);var x1=Math.min(a.left+a.width,b.left+b.width);if(x0<=x1){var y0=Math.max(a.top,b.top);var y1=Math.min(a.top+a.height,b.top+b.height);if(y0<=y1)return new goog.math.Rect(x0,y0,x1-x0,y1-y0)}return null};goog.math.Rect.intersects=function(a,b){var x0=Math.max(a.left,b.left);var x1=Math.min(a.left+a.width,b.left+b.width);if(x0<=x1){var y0=Math.max(a.top,b.top);var y1=Math.min(a.top+a.height,b.top+b.height);if(y0<=y1)return true}return false};
goog.math.Rect.prototype.intersects=function(rect){return goog.math.Rect.intersects(this,rect)};
goog.math.Rect.difference=function(a,b){var intersection=goog.math.Rect.intersection(a,b);if(!intersection||!intersection.height||!intersection.width)return[a.clone()];var result=[];var top=a.top;var height=a.height;var ar=a.left+a.width;var ab=a.top+a.height;var br=b.left+b.width;var bb=b.top+b.height;if(b.top>a.top){result.push(new goog.math.Rect(a.left,a.top,a.width,b.top-a.top));top=b.top;height-=b.top-a.top}if(bb<ab){result.push(new goog.math.Rect(a.left,bb,a.width,ab-bb));height=bb-top}if(b.left>
a.left)result.push(new goog.math.Rect(a.left,top,b.left-a.left,height));if(br<ar)result.push(new goog.math.Rect(br,top,ar-br,height));return result};goog.math.Rect.prototype.difference=function(rect){return goog.math.Rect.difference(this,rect)};
goog.math.Rect.prototype.boundingRect=function(rect){var right=Math.max(this.left+this.width,rect.left+rect.width);var bottom=Math.max(this.top+this.height,rect.top+rect.height);this.left=Math.min(this.left,rect.left);this.top=Math.min(this.top,rect.top);this.width=right-this.left;this.height=bottom-this.top};goog.math.Rect.boundingRect=function(a,b){if(!a||!b)return null;var clone=a.clone();clone.boundingRect(b);return clone};
goog.math.Rect.prototype.contains=function(another){if(another instanceof goog.math.Rect)return this.left<=another.left&&this.left+this.width>=another.left+another.width&&this.top<=another.top&&this.top+this.height>=another.top+another.height;else return another.x>=this.left&&another.x<=this.left+this.width&&another.y>=this.top&&another.y<=this.top+this.height};goog.math.Rect.prototype.getSize=function(){return new goog.math.Size(this.width,this.height)};goog.math.randomInt=function(a){return Math.floor(Math.random()*a)};goog.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};goog.math.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)};goog.math.modulo=function(a,b){var r=a%b;return r*b<0?r+b:r};goog.math.lerp=function(a,b,x){return a+x*(b-a)};goog.math.nearlyEquals=function(a,b,opt_tolerance){return Math.abs(a-b)<=(opt_tolerance||1.0E-6)};goog.math.standardAngle=function(angle){return goog.math.modulo(angle,360)};
goog.math.toRadians=function(angleDegrees){return angleDegrees*Math.PI/180};goog.math.toDegrees=function(angleRadians){return angleRadians*180/Math.PI};goog.math.angleDx=function(degrees,radius){return radius*Math.cos(goog.math.toRadians(degrees))};goog.math.angleDy=function(degrees,radius){return radius*Math.sin(goog.math.toRadians(degrees))};goog.math.angle=function(x1,y1,x2,y2){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(y2-y1,x2-x1)))};
goog.math.angleDifference=function(startAngle,endAngle){var d=goog.math.standardAngle(endAngle)-goog.math.standardAngle(startAngle);if(d>180)d=d-360;else if(d<=-180)d=360+d;return d};goog.math.sign=function(x){return x<0?-1:1};
goog.math.longestCommonSubsequence=function(array1,array2,opt_compareFn,opt_collectorFn){var compare=opt_compareFn||function(a,b){return a==b};var collect=opt_collectorFn||function(i1,i2){return array1[i1]};var length1=array1.length;var length2=array2.length;var arr=[];for(var i=0;i<length1+1;i++){arr[i]=[];arr[i][0]=0}for(var j=0;j<length2+1;j++)arr[0][j]=0;for(i=1;i<=length1;i++)for(j=1;j<=length1;j++)if(compare(array1[i-1],array2[j-1]))arr[i][j]=arr[i-1][j-1]+1;else arr[i][j]=Math.max(arr[i-1][j],
arr[i][j-1]);var result=[];i=length1;for(j=length2;i>0&&j>0;)if(compare(array1[i-1],array2[j-1])){result.unshift(collect(i-1,j-1));i--;j--}else if(arr[i-1][j]>arr[i][j-1])i--;else j--;return result};goog.math.sum=function(var_args){return goog.array.reduce(arguments,function(sum,value){return sum+value},0)};goog.math.average=function(var_args){return goog.math.sum.apply(null,arguments)/arguments.length};
goog.math.standardDeviation=function(var_args){var sampleSize=arguments.length;if(sampleSize<2)return 0;var mean=goog.math.average.apply(null,arguments);var variance=goog.math.sum.apply(null,goog.array.map(arguments,function(val){return Math.pow(val-mean,2)}))/(sampleSize-1);return Math.sqrt(variance)};goog.math.isInt=function(num){return isFinite(num)&&num%1==0};goog.math.isFiniteNumber=function(num){return isFinite(num)&&!isNaN(num)};goog.color.parse=function(str){var result={};str=String(str);var maybeHex=goog.color.prependPoundIfNecessary_(str);if(goog.color.isValidHexColor_(maybeHex)){result.hex=goog.color.normalizeHex(maybeHex);result.type="hex";return result}else{var rgb=goog.color.isValidRgbColor_(str);if(rgb.length){result.hex=goog.color.rgbArrayToHex(rgb);result.type="rgb";return result}else if(goog.color.names){var hex=goog.color.names[str.toLowerCase()];if(hex){result.hex=hex;result.type="named";return result}}}throw Error(str+
" is not a valid color string");};goog.color.parseRgb=function(str){var rgb=goog.color.isValidRgbColor_(str);if(!rgb.length)throw Error(str+" is not a valid RGB color");return rgb};goog.color.hexToRgbStyle=function(hexColor){return goog.color.rgbStyle_(goog.color.hexToRgb(hexColor))};goog.color.hexTripletRe_=/#(.)(.)(.)/;
goog.color.normalizeHex=function(hexColor){if(!goog.color.isValidHexColor_(hexColor))throw Error("'"+hexColor+"' is not a valid hex color");if(hexColor.length==4)hexColor=hexColor.replace(goog.color.hexTripletRe_,"#$1$1$2$2$3$3");return hexColor.toLowerCase()};goog.color.hexToRgb=function(hexColor){hexColor=goog.color.normalizeHex(hexColor);var r=parseInt(hexColor.substr(1,2),16);var g=parseInt(hexColor.substr(3,2),16);var b=parseInt(hexColor.substr(5,2),16);return[r,g,b]};
goog.color.rgbToHex=function(r,g,b){r=Number(r);g=Number(g);b=Number(b);if(isNaN(r)||r<0||r>255||isNaN(g)||g<0||g>255||isNaN(b)||b<0||b>255)throw Error('"('+r+","+g+","+b+'") is not a valid RGB color');var hexR=goog.color.prependZeroIfNecessary_(r.toString(16));var hexG=goog.color.prependZeroIfNecessary_(g.toString(16));var hexB=goog.color.prependZeroIfNecessary_(b.toString(16));return"#"+hexR+hexG+hexB};goog.color.rgbArrayToHex=function(rgb){return goog.color.rgbToHex(rgb[0],rgb[1],rgb[2])};
goog.color.rgbToHsl=function(r,g,b){var normR=r/255;var normG=g/255;var normB=b/255;var max=Math.max(normR,normG,normB);var min=Math.min(normR,normG,normB);var h=0;var s=0;var l=0.5*(max+min);if(max!=min){if(max==normR)h=60*(normG-normB)/(max-min);else if(max==normG)h=60*(normB-normR)/(max-min)+120;else if(max==normB)h=60*(normR-normG)/(max-min)+240;if(0<l&&l<=0.5)s=(max-min)/(2*l);else s=(max-min)/(2-2*l)}return[Math.round(h+360)%360,s,l]};
goog.color.rgbArrayToHsl=function(rgb){return goog.color.rgbToHsl(rgb[0],rgb[1],rgb[2])};goog.color.hueToRgb_=function(v1,v2,vH){if(vH<0)vH+=1;else if(vH>1)vH-=1;if(6*vH<1)return v1+(v2-v1)*6*vH;else if(2*vH<1)return v2;else if(3*vH<2)return v1+(v2-v1)*(2/3-vH)*6;return v1};
goog.color.hslToRgb=function(h,s,l){var r=0;var g=0;var b=0;var normH=h/360;if(s==0)r=g=b=l*255;else{var temp1=0;var temp2=0;if(l<0.5)temp2=l*(1+s);else temp2=l+s-s*l;temp1=2*l-temp2;r=255*goog.color.hueToRgb_(temp1,temp2,normH+1/3);g=255*goog.color.hueToRgb_(temp1,temp2,normH);b=255*goog.color.hueToRgb_(temp1,temp2,normH-1/3)}return[Math.round(r),Math.round(g),Math.round(b)]};goog.color.hslArrayToRgb=function(hsl){return goog.color.hslToRgb(hsl[0],hsl[1],hsl[2])};goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i;
goog.color.isValidHexColor_=function(str){return goog.color.validHexColorRe_.test(str)};goog.color.normalizedHexColorRe_=/^#[0-9a-f]{6}$/;goog.color.isNormalizedHexColor_=function(str){return goog.color.normalizedHexColorRe_.test(str)};goog.color.rgbColorRe_=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;
goog.color.isValidRgbColor_=function(str){var regExpResultArray=str.match(goog.color.rgbColorRe_);if(regExpResultArray){var r=Number(regExpResultArray[1]);var g=Number(regExpResultArray[2]);var b=Number(regExpResultArray[3]);if(r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&b<=255)return[r,g,b]}return[]};goog.color.prependZeroIfNecessary_=function(hex){return hex.length==1?"0"+hex:hex};goog.color.prependPoundIfNecessary_=function(str){return str.charAt(0)=="#"?str:"#"+str};
goog.color.rgbStyle_=function(rgb){return"rgb("+rgb.join(",")+")"};
goog.color.hsvToRgb=function(h,s,brightness){var red=0;var green=0;var blue=0;if(s==0){red=brightness;green=brightness;blue=brightness}else{var sextant=Math.floor(h/60);var remainder=h/60-sextant;var val1=brightness*(1-s);var val2=brightness*(1-s*remainder);var val3=brightness*(1-s*(1-remainder));switch(sextant){case 1:red=val2;green=brightness;blue=val1;break;case 2:red=val1;green=brightness;blue=val3;break;case 3:red=val1;green=val2;blue=brightness;break;case 4:red=val3;green=val1;blue=brightness;
break;case 5:red=brightness;green=val1;blue=val2;break;case 6:case 0:red=brightness;green=val3;blue=val1;break}}return[Math.floor(red),Math.floor(green),Math.floor(blue)]};
goog.color.rgbToHsv=function(red,green,blue){var max=Math.max(Math.max(red,green),blue);var min=Math.min(Math.min(red,green),blue);var hue;var saturation;var value=max;if(min==max){hue=0;saturation=0}else{var delta=max-min;saturation=delta/max;if(red==max)hue=(green-blue)/delta;else if(green==max)hue=2+(blue-red)/delta;else hue=4+(red-green)/delta;hue*=60;if(hue<0)hue+=360;if(hue>360)hue-=360}return[hue,saturation,value]};
goog.color.rgbArrayToHsv=function(rgb){return goog.color.rgbToHsv(rgb[0],rgb[1],rgb[2])};goog.color.hsvArrayToRgb=function(hsv){return goog.color.hsvToRgb(hsv[0],hsv[1],hsv[2])};goog.color.hexToHsl=function(hex){var rgb=goog.color.hexToRgb(hex);return goog.color.rgbToHsl(rgb[0],rgb[1],rgb[2])};goog.color.hslToHex=function(h,s,l){return goog.color.rgbArrayToHex(goog.color.hslToRgb(h,s,l))};goog.color.hslArrayToHex=function(hsl){return goog.color.rgbArrayToHex(goog.color.hslToRgb(hsl[0],hsl[1],hsl[2]))};
goog.color.hexToHsv=function(hex){return goog.color.rgbArrayToHsv(goog.color.hexToRgb(hex))};goog.color.hsvToHex=function(h,s,v){return goog.color.rgbArrayToHex(goog.color.hsvToRgb(h,s,v))};goog.color.hsvArrayToHex=function(hsv){return goog.color.hsvToHex(hsv[0],hsv[1],hsv[2])};
goog.color.hslDistance=function(hsl1,hsl2){var sl1;var sl2;if(hsl1[2]<=0.5)sl1=hsl1[1]*hsl1[2];else sl1=hsl1[1]*(1-hsl1[2]);if(hsl2[2]<=0.5)sl2=hsl2[1]*hsl2[2];else sl2=hsl2[1]*(1-hsl2[2]);var h1=hsl1[0]/360;var h2=hsl2[0]/360;var dh=(h1-h2)*2*Math.PI;return(hsl1[2]-hsl2[2])*(hsl1[2]-hsl2[2])+sl1*sl1+sl2*sl2-2*sl1*sl2*Math.cos(dh)};
goog.color.blend=function(rgb1,rgb2,factor){factor=goog.math.clamp(factor,0,1);return[Math.round(factor*rgb1[0]+(1-factor)*rgb2[0]),Math.round(factor*rgb1[1]+(1-factor)*rgb2[1]),Math.round(factor*rgb1[2]+(1-factor)*rgb2[2])]};goog.color.darken=function(rgb,factor){var black=[0,0,0];return goog.color.blend(black,rgb,factor)};goog.color.lighten=function(rgb,factor){var white=[255,255,255];return goog.color.blend(white,rgb,factor)};
goog.color.highContrast=function(prime,suggestions){var suggestionsWithDiff=[];for(var i=0;i<suggestions.length;i++)suggestionsWithDiff.push({color:suggestions[i],diff:goog.color.yiqBrightnessDiff_(suggestions[i],prime)+goog.color.colorDiff_(suggestions[i],prime)});suggestionsWithDiff.sort(function(a,b){return b.diff-a.diff});return suggestionsWithDiff[0].color};goog.color.yiqBrightness_=function(rgb){return Math.round((rgb[0]*299+rgb[1]*587+rgb[2]*114)/1000)};
goog.color.yiqBrightnessDiff_=function(rgb1,rgb2){return Math.abs(goog.color.yiqBrightness_(rgb1)-goog.color.yiqBrightness_(rgb2))};goog.color.colorDiff_=function(rgb1,rgb2){return Math.abs(rgb1[0]-rgb2[0])+Math.abs(rgb1[1]-rgb2[1])+Math.abs(rgb1[2]-rgb2[2])};goog.userAgent.product={};goog.userAgent.product.ASSUME_FIREFOX=false;goog.userAgent.product.ASSUME_CAMINO=false;goog.userAgent.product.ASSUME_IPHONE=false;goog.userAgent.product.ASSUME_ANDROID=false;goog.userAgent.product.ASSUME_CHROME=false;goog.userAgent.product.ASSUME_SAFARI=false;
goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_CAMINO||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI;
goog.userAgent.product.init_=function(){goog.userAgent.product.detectedFirefox_=false;goog.userAgent.product.detectedCamino_=false;goog.userAgent.product.detectedIphone_=false;goog.userAgent.product.detectedAndroid_=false;goog.userAgent.product.detectedChrome_=false;goog.userAgent.product.detectedSafari_=false;var ua=goog.userAgent.getUserAgentString();if(!ua)return;if(ua.indexOf("Firefox")!=-1)goog.userAgent.product.detectedFirefox_=true;else if(ua.indexOf("Camino")!=-1)goog.userAgent.product.detectedCamino_=
true;else if(ua.indexOf("iPhone")!=-1||ua.indexOf("iPod")!=-1)goog.userAgent.product.detectedIphone_=true;else if(ua.indexOf("Android")!=-1)goog.userAgent.product.detectedAndroid_=true;else if(ua.indexOf("Chrome")!=-1)goog.userAgent.product.detectedChrome_=true;else if(ua.indexOf("Safari")!=-1)goog.userAgent.product.detectedSafari_=true};if(!goog.userAgent.product.PRODUCT_KNOWN_)goog.userAgent.product.init_();goog.userAgent.product.OPERA=goog.userAgent.OPERA;goog.userAgent.product.IE=goog.userAgent.IE;
goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.userAgent.product.detectedFirefox_;goog.userAgent.product.CAMINO=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CAMINO:goog.userAgent.product.detectedCamino_;goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.detectedIphone_;
goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.userAgent.product.detectedAndroid_;goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.userAgent.product.detectedChrome_;goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.detectedSafari_;goog.style={};goog.style.setStyle=function(element,style,opt_value){if(goog.isString(style))goog.style.setStyle_(element,opt_value,style);else goog.object.forEach(style,goog.partial(goog.style.setStyle_,element))};goog.style.setStyle_=function(element,value,style){element.style[goog.style.toCamelCase(style)]=value};goog.style.getStyle=function(element,style){return element.style[goog.style.toCamelCase(style)]};
goog.style.getComputedStyle=function(element,style){var doc=goog.dom.getOwnerDocument(element);if(doc.defaultView&&doc.defaultView.getComputedStyle){var styles=doc.defaultView.getComputedStyle(element,"");if(styles)return styles[style]}return null};goog.style.getCascadedStyle=function(element,style){return element.currentStyle?element.currentStyle[style]:null};
goog.style.getStyle_=function(element,style){return goog.style.getComputedStyle(element,style)||goog.style.getCascadedStyle(element,style)||element.style[style]};goog.style.getComputedPosition=function(element){return goog.style.getStyle_(element,"position")};goog.style.getBackgroundColor=function(element){return goog.style.getStyle_(element,"backgroundColor")};
goog.style.setPosition=function(el,arg1,opt_arg2){var x;var y;var buggyGeckoSubPixelPos=goog.userAgent.GECKO&&(goog.userAgent.MAC||goog.userAgent.X11)&&goog.userAgent.isVersion("1.9");if(arg1 instanceof goog.math.Coordinate){x=arg1.x;y=arg1.y}else{x=arg1;y=opt_arg2}el.style.left=typeof x=="number"?(buggyGeckoSubPixelPos?Math.round(x):x)+"px":x;el.style.top=typeof y=="number"?(buggyGeckoSubPixelPos?Math.round(y):y)+"px":y};
goog.style.getPosition=function(element){return new goog.math.Coordinate(element.offsetLeft,element.offsetTop)};goog.style.getClientViewportElement=function(opt_node){var doc;if(opt_node)if(opt_node.nodeType==goog.dom.NodeType.DOCUMENT)doc=opt_node;else doc=goog.dom.getOwnerDocument(opt_node);else doc=goog.dom.getDocument();if(goog.userAgent.IE&&!goog.dom.getDomHelper(doc).isCss1CompatMode())return doc.body;return doc.documentElement};
goog.style.getBoundingClientRect_=function(el){var rect=el.getBoundingClientRect();if(goog.userAgent.IE){var doc=el.ownerDocument;rect.left-=doc.documentElement.clientLeft+doc.body.clientLeft;rect.top-=doc.documentElement.clientTop+doc.body.clientTop}return rect};
goog.style.getOffsetParent=function(element){if(goog.userAgent.IE)return element.offsetParent;var doc=goog.dom.getOwnerDocument(element);var positionStyle=goog.style.getStyle_(element,"position");var skipStatic=positionStyle=="fixed"||positionStyle=="absolute";for(var parent=element.parentNode;parent&&parent!=doc;parent=parent.parentNode){positionStyle=goog.style.getStyle_(parent,"position");skipStatic=skipStatic&&positionStyle=="static"&&parent!=doc.documentElement&&parent!=doc.body;if(!skipStatic&&
(parent.scrollWidth>parent.clientWidth||parent.scrollHeight>parent.clientHeight||positionStyle=="fixed"||positionStyle=="absolute"))return parent}return null};
goog.style.getVisibleRectForElement=function(element){var visibleRect=new goog.math.Box(0,Infinity,Infinity,0);var dom=goog.dom.getDomHelper(element);var scrollEl=dom.getDocumentScrollElement();var inContainer;for(var el=element;el=goog.style.getOffsetParent(el);)if((!goog.userAgent.IE||el.clientWidth!=0)&&(el.scrollWidth!=el.clientWidth||el.scrollHeight!=el.clientHeight)&&goog.style.getStyle_(el,"overflow")!="visible"){var pos=goog.style.getPageOffset(el);var client=goog.style.getClientLeftTop(el);
pos.x+=client.x;pos.y+=client.y;visibleRect.top=Math.max(visibleRect.top,pos.y);visibleRect.right=Math.min(visibleRect.right,pos.x+el.clientWidth);visibleRect.bottom=Math.min(visibleRect.bottom,pos.y+el.clientHeight);visibleRect.left=Math.max(visibleRect.left,pos.x);inContainer=inContainer||el!=scrollEl}var scrollX=scrollEl.scrollLeft;var scrollY=scrollEl.scrollTop;if(goog.userAgent.WEBKIT){visibleRect.left+=scrollX;visibleRect.top+=scrollY}else{visibleRect.left=Math.max(visibleRect.left,scrollX);
visibleRect.top=Math.max(visibleRect.top,scrollY)}if(!inContainer||goog.userAgent.WEBKIT){visibleRect.right+=scrollX;visibleRect.bottom+=scrollY}var winSize=dom.getViewportSize();visibleRect.right=Math.min(visibleRect.right,scrollX+winSize.width);visibleRect.bottom=Math.min(visibleRect.bottom,scrollY+winSize.height);return visibleRect.top>=0&&visibleRect.left>=0&&visibleRect.bottom>visibleRect.top&&visibleRect.right>visibleRect.left?visibleRect:null};
goog.style.getClientLeftTop=function(el){if(goog.userAgent.GECKO&&!goog.userAgent.isVersion("1.9")){var left=parseFloat(goog.style.getComputedStyle(el,"borderLeftWidth"));if(goog.style.isRightToLeft(el)){var scrollbarWidth=el.offsetWidth-el.clientWidth-left-parseFloat(goog.style.getComputedStyle(el,"borderRightWidth"));left+=scrollbarWidth}return new goog.math.Coordinate(left,parseFloat(goog.style.getComputedStyle(el,"borderTopWidth")))}return new goog.math.Coordinate(el.clientLeft,el.clientTop)};
goog.style.getPageOffset=function(el){var box;var doc=goog.dom.getOwnerDocument(el);var positionStyle=goog.style.getStyle_(el,"position");var BUGGY_GECKO_BOX_OBJECT=goog.userAgent.GECKO&&doc.getBoxObjectFor&&!el.getBoundingClientRect&&positionStyle=="absolute"&&(box=doc.getBoxObjectFor(el))&&(box.screenX<0||box.screenY<0);var pos=new goog.math.Coordinate(0,0);var viewportElement=goog.style.getClientViewportElement(doc);if(el==viewportElement)return pos;if(el.getBoundingClientRect){box=goog.style.getBoundingClientRect_(el);
var scrollCoord=goog.dom.getDomHelper(doc).getDocumentScroll();pos.x=box.left+scrollCoord.x;pos.y=box.top+scrollCoord.y}else if(doc.getBoxObjectFor&&!BUGGY_GECKO_BOX_OBJECT){box=doc.getBoxObjectFor(el);var vpBox=doc.getBoxObjectFor(viewportElement);pos.x=box.screenX-vpBox.screenX;pos.y=box.screenY-vpBox.screenY}else{var parent=el;do{pos.x+=parent.offsetLeft;pos.y+=parent.offsetTop;if(parent!=el){pos.x+=parent.clientLeft||0;pos.y+=parent.clientTop||0}if(goog.userAgent.WEBKIT&&goog.style.getComputedPosition(parent)==
"fixed"){pos.x+=doc.body.scrollLeft;pos.y+=doc.body.scrollTop;break}parent=parent.offsetParent}while(parent&&parent!=el);if(goog.userAgent.OPERA||goog.userAgent.WEBKIT&&positionStyle=="absolute")pos.y-=doc.body.offsetTop;for(parent=el;(parent=goog.style.getOffsetParent(parent))&&parent!=doc.body&&parent!=viewportElement;){pos.x-=parent.scrollLeft;if(!goog.userAgent.OPERA||parent.tagName!="TR")pos.y-=parent.scrollTop}}return pos};goog.style.getPageOffsetLeft=function(el){return goog.style.getPageOffset(el).x};
goog.style.getPageOffsetTop=function(el){return goog.style.getPageOffset(el).y};
goog.style.getFramedPageOffset=function(el,relativeWin){var position=new goog.math.Coordinate(0,0);var currentWin=goog.dom.getWindow(goog.dom.getOwnerDocument(el));var currentEl=el;do{var offset=currentWin==relativeWin?goog.style.getPageOffset(currentEl):goog.style.getClientPosition(currentEl);position.x+=offset.x;position.y+=offset.y}while(currentWin&&currentWin!=relativeWin&&(currentEl=currentWin.frameElement)&&(currentWin=currentWin.parent));return position};
goog.style.translateRectForAnotherFrame=function(rect,origBase,newBase){if(origBase.getDocument()!=newBase.getDocument()){var body=origBase.getDocument().body;var pos=goog.style.getFramedPageOffset(body,newBase.getWindow());pos=goog.math.Coordinate.difference(pos,goog.style.getPageOffset(body));if(goog.userAgent.IE&&!origBase.isCss1CompatMode())pos=goog.math.Coordinate.difference(pos,origBase.getDocumentScroll());rect.left+=pos.x;rect.top+=pos.y}};
goog.style.getRelativePosition=function(a,b){var ap=goog.style.getClientPosition(a);var bp=goog.style.getClientPosition(b);return new goog.math.Coordinate(ap.x-bp.x,ap.y-bp.y)};
goog.style.getClientPosition=function(el){var pos=new goog.math.Coordinate;if(el.nodeType==goog.dom.NodeType.ELEMENT)if(el.getBoundingClientRect){var box=goog.style.getBoundingClientRect_(el);pos.x=box.left;pos.y=box.top}else{var scrollCoord=goog.dom.getDomHelper(el).getDocumentScroll();var pageCoord=goog.style.getPageOffset(el);pos.x=pageCoord.x-scrollCoord.x;pos.y=pageCoord.y-scrollCoord.y}else{pos.x=el.clientX;pos.y=el.clientY}return pos};
goog.style.setPageOffset=function(el,x,opt_y){var cur=goog.style.getPageOffset(el);if(x instanceof goog.math.Coordinate){opt_y=x.y;x=x.x}var dx=x-cur.x;var dy=opt_y-cur.y;goog.style.setPosition(el,el.offsetLeft+dx,el.offsetTop+dy)};
goog.style.setSize=function(element,w,opt_h){var h;if(w instanceof goog.math.Size){h=w.height;w=w.width}else{if(opt_h==undefined)throw Error("missing height argument");h=opt_h}element.style.width=typeof w=="number"?Math.round(w)+"px":w;element.style.height=typeof h=="number"?Math.round(h)+"px":h};
goog.style.getSize=function(element){var hasOperaBug=goog.userAgent.OPERA&&!goog.userAgent.isVersion("10");if(goog.style.getStyle_(element,"display")!="none")if(hasOperaBug)return new goog.math.Size(element.offsetWidth||element.clientWidth,element.offsetHeight||element.clientHeight);else return new goog.math.Size(element.offsetWidth,element.offsetHeight);var style=element.style;var originalDisplay=style.display;var originalVisibility=style.visibility;var originalPosition=style.position;style.visibility=
"hidden";style.position="absolute";style.display="inline";var originalWidth;var originalHeight;if(hasOperaBug){originalWidth=element.offsetWidth||element.clientWidth;originalHeight=element.offsetHeight||element.clientHeight}else{originalWidth=element.offsetWidth;originalHeight=element.offsetHeight}style.display=originalDisplay;style.position=originalPosition;style.visibility=originalVisibility;return new goog.math.Size(originalWidth,originalHeight)};
goog.style.getBounds=function(element){var o=goog.style.getPageOffset(element);var s=goog.style.getSize(element);return new goog.math.Rect(o.x,o.y,s.width,s.height)};goog.style.toCamelCaseCache_={};goog.style.toCamelCase=function(selector){return goog.style.toCamelCaseCache_[selector]||(goog.style.toCamelCaseCache_[selector]=String(selector).replace(/\-([a-z])/g,function(all,match){return match.toUpperCase()}))};goog.style.toSelectorCase=function(selector){return selector.replace(/([A-Z])/g,"-$1").toLowerCase()};
goog.style.getOpacity=function(el){var style=el.style;var result="";if("opacity"in style)result=style.opacity;else if("MozOpacity"in style)result=style.MozOpacity;else if("filter"in style){var match=style.filter.match(/alpha\(opacity=([\d.]+)\)/);if(match)result=String(match[1]/100)}return result==""?result:Number(result)};
goog.style.setOpacity=function(el,alpha){var style=el.style;if("opacity"in style)style.opacity=alpha;else if("MozOpacity"in style)style.MozOpacity=alpha;else if("filter"in style)if(alpha==="")style.filter="";else style.filter="alpha(opacity="+alpha*100+")"};
goog.style.setTransparentBackgroundImage=function(el,src){var style=el.style;if(goog.userAgent.IE&&!goog.userAgent.isVersion("8"))style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader("+'src="'+src+'", sizingMethod="crop")';else{style.backgroundImage="url("+src+")";style.backgroundPosition="top left";style.backgroundRepeat="no-repeat"}};goog.style.clearTransparentBackgroundImage=function(el){var style=el.style;if("filter"in style)style.filter="";else style.backgroundImage="none"};
goog.style.showElement=function(el,display){el.style.display=display?"":"none"};goog.style.isElementShown=function(el){return el.style.display!="none"};
goog.style.installStyles=function(stylesString,opt_node){var dh=goog.dom.getDomHelper(opt_node);var styleSheet=null;if(goog.userAgent.IE){styleSheet=dh.getDocument().createStyleSheet();goog.style.setStyles(styleSheet,stylesString)}else{var head=dh.getElementsByTagNameAndClass("head")[0];if(!head){var body=dh.getElementsByTagNameAndClass("body")[0];head=dh.createDom("head");body.parentNode.insertBefore(head,body)}styleSheet=dh.createDom("style");goog.style.setStyles(styleSheet,stylesString);dh.appendChild(head,
styleSheet)}return styleSheet};goog.style.setStyles=function(element,stylesString){if(goog.userAgent.IE)element.cssText=stylesString;else{var propToSet=goog.userAgent.WEBKIT?"innerText":"innerHTML";element[propToSet]=stylesString}};
goog.style.setPreWrap=function(el){var style=el.style;if(goog.userAgent.IE&&!goog.userAgent.isVersion("8")){style.whiteSpace="pre";style.wordWrap="break-word"}else if(goog.userAgent.GECKO)style.whiteSpace="-moz-pre-wrap";else if(goog.userAgent.OPERA)style.whiteSpace="-o-pre-wrap";else style.whiteSpace="pre-wrap"};
goog.style.setInlineBlock=function(el){var style=el.style;style.position="relative";if(goog.userAgent.IE&&!goog.userAgent.isVersion("8")){style.zoom="1";style.display="inline"}else if(goog.userAgent.GECKO)style.display=goog.userAgent.isVersion("1.9a")?"inline-block":"-moz-inline-box";else style.display="inline-block"};goog.style.needsInlineBlockWrapper=function(content){return goog.style.browserNeedsInlineBlockWrapper_&&goog.style.hasUnguardedText_(content)};
goog.style.hasUnguardedText_=function(content){if(!content)return false;else if(goog.isString(content)||content.nodeType==goog.dom.NodeType.TEXT)return true;else return goog.array.some(content,goog.style.hasUnguardedText_)};goog.style.browserNeedsInlineBlockWrapper_=goog.userAgent.GECKO&&!goog.userAgent.isVersion("1.9");goog.style.isRightToLeft=function(el){return"rtl"==goog.style.getStyle_(el,"direction")};
goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT?"WebkitUserSelect":null;goog.style.isUnselectable=function(el){if(goog.style.unselectableStyle_)return el.style[goog.style.unselectableStyle_].toLowerCase()=="none";else if(goog.userAgent.IE||goog.userAgent.OPERA)return el.getAttribute("unselectable")=="on";return false};
goog.style.setUnselectable=function(el,unselectable,opt_noRecurse){var descendants=!opt_noRecurse?el.getElementsByTagName("*"):null;var name=goog.style.unselectableStyle_;if(name){var value=unselectable?"none":"";el.style[name]=value;if(descendants){var i=0;for(var descendant;descendant=descendants[i];i++)descendant.style[name]=value}}else if(goog.userAgent.IE||goog.userAgent.OPERA){value=unselectable?"on":"";el.setAttribute("unselectable",value);if(descendants)for(i=0;descendant=descendants[i];i++)descendant.setAttribute("unselectable",
value)}};goog.style.getBorderBoxSize=function(element){return new goog.math.Size(element.offsetWidth,element.offsetHeight)};
goog.style.setBorderBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element);var isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(goog.userAgent.IE&&(!isCss1CompatMode||!goog.userAgent.isVersion("8"))){var style=element.style;if(isCss1CompatMode){var paddingBox=goog.style.getPaddingBox(element);var borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right;style.pixelHeight=size.height-borderBox.top-
paddingBox.top-paddingBox.bottom-borderBox.bottom}else{style.pixelWidth=size.width;style.pixelHeight=size.height}}else goog.style.setBoxSizingSize_(element,size,"border-box")};
goog.style.getContentBoxSize=function(element){var doc=goog.dom.getOwnerDocument(element);var ieCurrentStyle=goog.userAgent.IE&&element.currentStyle;if(ieCurrentStyle&&goog.dom.getDomHelper(doc).isCss1CompatMode()&&ieCurrentStyle.width!="auto"&&ieCurrentStyle.height!="auto"&&!ieCurrentStyle.boxSizing){var width=goog.style.getIePixelValue_(element,ieCurrentStyle.width,"width","pixelWidth");var height=goog.style.getIePixelValue_(element,ieCurrentStyle.height,"height","pixelHeight");return new goog.math.Size(width,
height)}else{var borderBoxSize=goog.style.getBorderBoxSize(element);var paddingBox=goog.style.getPaddingBox(element);var borderBox=goog.style.getBorderBox(element);return new goog.math.Size(borderBoxSize.width-borderBox.left-paddingBox.left-paddingBox.right-borderBox.right,borderBoxSize.height-borderBox.top-paddingBox.top-paddingBox.bottom-borderBox.bottom)}};
goog.style.setContentBoxSize=function(element,size){var doc=goog.dom.getOwnerDocument(element);var isCss1CompatMode=goog.dom.getDomHelper(doc).isCss1CompatMode();if(goog.userAgent.IE&&(!isCss1CompatMode||!goog.userAgent.isVersion("8"))){var style=element.style;if(isCss1CompatMode){style.pixelWidth=size.width;style.pixelHeight=size.height}else{var paddingBox=goog.style.getPaddingBox(element);var borderBox=goog.style.getBorderBox(element);style.pixelWidth=size.width+borderBox.left+paddingBox.left+paddingBox.right+
borderBox.right;style.pixelHeight=size.height+borderBox.top+paddingBox.top+paddingBox.bottom+borderBox.bottom}}else goog.style.setBoxSizingSize_(element,size,"content-box")};
goog.style.setBoxSizingSize_=function(element,size,boxSizing){var style=element.style;if(goog.userAgent.GECKO)style.MozBoxSizing=boxSizing;else if(goog.userAgent.WEBKIT)style.WebkitBoxSizing=boxSizing;else if(goog.userAgent.OPERA&&!goog.userAgent.isVersion("9.50"))if(boxSizing)style.setProperty("box-sizing",boxSizing);else style.removeProperty("box-sizing");else style.boxSizing=boxSizing;style.width=size.width+"px";style.height=size.height+"px"};
goog.style.getIePixelValue_=function(element,value,name,pixelName){if(/^\d+px?$/.test(value))return parseInt(value,10);else{var oldStyleValue=element.style[name];var oldRuntimeValue=element.runtimeStyle[name];element.runtimeStyle[name]=element.currentStyle[name];element.style[name]=value;var pixelValue=element.style[pixelName];element.style[name]=oldStyleValue;element.runtimeStyle[name]=oldRuntimeValue;return pixelValue}};
goog.style.getIePixelDistance_=function(element,propName){return goog.style.getIePixelValue_(element,goog.style.getCascadedStyle(element,propName),"left","pixelLeft")};
goog.style.getBox_=function(element,stylePrefix){if(goog.userAgent.IE){var left=goog.style.getIePixelDistance_(element,stylePrefix+"Left");var right=goog.style.getIePixelDistance_(element,stylePrefix+"Right");var top=goog.style.getIePixelDistance_(element,stylePrefix+"Top");var bottom=goog.style.getIePixelDistance_(element,stylePrefix+"Bottom");return new goog.math.Box(top,right,bottom,left)}else{left=goog.style.getComputedStyle(element,stylePrefix+"Left");right=goog.style.getComputedStyle(element,
stylePrefix+"Right");top=goog.style.getComputedStyle(element,stylePrefix+"Top");bottom=goog.style.getComputedStyle(element,stylePrefix+"Bottom");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left))}};goog.style.getPaddingBox=function(element){return goog.style.getBox_(element,"padding")};goog.style.getMarginBox=function(element){return goog.style.getBox_(element,"margin")};goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6};
goog.style.getIePixelBorder_=function(element,prop){if(goog.style.getCascadedStyle(element,prop+"Style")=="none")return 0;var width=goog.style.getCascadedStyle(element,prop+"Width");if(width in goog.style.ieBorderWidthKeywords_)return goog.style.ieBorderWidthKeywords_[width];return goog.style.getIePixelValue_(element,width,"left","pixelLeft")};
goog.style.getBorderBox=function(element){if(goog.userAgent.IE){var left=goog.style.getIePixelBorder_(element,"borderLeft");var right=goog.style.getIePixelBorder_(element,"borderRight");var top=goog.style.getIePixelBorder_(element,"borderTop");var bottom=goog.style.getIePixelBorder_(element,"borderBottom");return new goog.math.Box(top,right,bottom,left)}else{left=goog.style.getComputedStyle(element,"borderLeftWidth");right=goog.style.getComputedStyle(element,"borderRightWidth");top=goog.style.getComputedStyle(element,
"borderTopWidth");bottom=goog.style.getComputedStyle(element,"borderBottomWidth");return new goog.math.Box(parseFloat(top),parseFloat(right),parseFloat(bottom),parseFloat(left))}};
goog.style.getFontFamily=function(el){var doc=goog.dom.getOwnerDocument(el);var font="";if(doc.createTextRange){var range=doc.body.createTextRange();range.moveToElementText(el);font=range.queryCommandValue("FontName")}if(!font){font=goog.style.getStyle_(el,"fontFamily");if(goog.userAgent.OPERA&&goog.userAgent.LINUX)font=font.replace(/ \[[^\]]*\]/,"")}var fontsArray=font.split(",");if(fontsArray.length>1)font=fontsArray[0];return goog.string.stripQuotes(font,"\"'")};
goog.style.getLengthUnits=function(value){var units=value.match(/[^\d]+$/);return units&&units[0]||null};goog.style.ABSOLUTE_CSS_LENGTH_UNITS_={cm:1,"in":1,mm:1,pc:1,pt:1};goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_={em:1,ex:1};
goog.style.getFontSize=function(el){var fontSize=goog.style.getStyle_(el,"fontSize");var sizeUnits=goog.style.getLengthUnits(fontSize);if(fontSize&&"px"==sizeUnits)return parseInt(fontSize,10);if(goog.userAgent.IE)if(sizeUnits in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_)return goog.style.getIePixelValue_(el,fontSize,"left","pixelLeft");else if(el.parentNode&&el.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&sizeUnits in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_){var parentElement=el.parentNode;var parentSize=
goog.style.getStyle_(parentElement,"fontSize");return goog.style.getIePixelValue_(parentElement,fontSize==parentSize?"1em":fontSize,"left","pixelLeft")}var sizeElement=goog.dom.createDom("span",{style:"visibility:hidden;position:absolute;"+"line-height:0;padding:0;margin:0;border:0;height:1em;"});goog.dom.appendChild(el,sizeElement);fontSize=sizeElement.offsetHeight;goog.dom.removeNode(sizeElement);return fontSize};
goog.style.parseStyleAttribute=function(value){var result={};goog.array.forEach(value.split(/\s*;\s*/),function(pair){var keyValue=pair.split(/\s*:\s*/);if(keyValue.length==2)result[goog.style.toCamelCase(keyValue[0].toLowerCase())]=keyValue[1]});return result};goog.style.toStyleAttribute=function(obj){var buffer=[];goog.object.forEach(obj,function(value,key){buffer.push(goog.style.toSelectorCase(key),":",value,";")});return buffer.join("")};
goog.style.setFloat=function(el,value){el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]=value};goog.style.getFloat=function(el){return el.style[goog.userAgent.IE?"styleFloat":"cssFloat"]||""};goog.fx.dom={};goog.fx.dom.PredefinedEffect=function(element,start,end,time,opt_acc){goog.fx.Animation.call(this,start,end,time,opt_acc);this.element=element};goog.inherits(goog.fx.dom.PredefinedEffect,goog.fx.Animation);goog.fx.dom.PredefinedEffect.prototype.updateStyle=goog.nullFunction;goog.fx.dom.PredefinedEffect.prototype.onAnimate=function(){this.updateStyle();goog.fx.dom.PredefinedEffect.superClass_.onAnimate.call(this)};
goog.fx.dom.PredefinedEffect.prototype.onEnd=function(){this.updateStyle();goog.fx.dom.PredefinedEffect.superClass_.onEnd.call(this)};goog.fx.dom.PredefinedEffect.prototype.onBegin=function(){this.updateStyle();goog.fx.dom.PredefinedEffect.superClass_.onBegin.call(this)};goog.fx.dom.Slide=function(element,start,end,time,opt_acc){if(start.length!=2||end.length!=2)throw Error("Start and end points must be 2D");goog.fx.dom.PredefinedEffect.apply(this,arguments)};goog.inherits(goog.fx.dom.Slide,goog.fx.dom.PredefinedEffect);
goog.fx.dom.Slide.prototype.updateStyle=function(){this.element.style.left=Math.round(this.coords[0])+"px";this.element.style.top=Math.round(this.coords[1])+"px"};goog.fx.dom.SlideFrom=function(element,end,time,opt_acc){var start=[element.offsetLeft,element.offsetTop];goog.fx.dom.Slide.call(this,element,start,end,time,opt_acc)};goog.inherits(goog.fx.dom.SlideFrom,goog.fx.dom.Slide);
goog.fx.dom.SlideFrom.prototype.onBegin=function(){this.startPoint=[this.element.offsetLeft,this.element.offsetTop];goog.fx.dom.SlideFrom.superClass_.onBegin.call(this)};goog.fx.dom.Swipe=function(element,start,end,time,opt_acc){if(start.length!=2||end.length!=2)throw Error("Start and end points must be 2D");goog.fx.dom.PredefinedEffect.apply(this,arguments);this.maxWidth_=Math.max(this.endPoint[0],this.startPoint[0]);this.maxHeight_=Math.max(this.endPoint[1],this.startPoint[1])};
goog.inherits(goog.fx.dom.Swipe,goog.fx.dom.PredefinedEffect);goog.fx.dom.Swipe.prototype.updateStyle=function(){var x=this.coords[0];var y=this.coords[1];this.clip_(Math.round(x),Math.round(y),this.maxWidth_,this.maxHeight_);this.element.style.width=Math.round(x)+"px";this.element.style.marginLeft=Math.round(x)-this.maxWidth_+"px";this.element.style.marginTop=Math.round(y)-this.maxHeight_+"px"};
goog.fx.dom.Swipe.prototype.clip_=function(x,y,w,h){this.element.style.clip="rect("+(h-y)+"px "+w+"px "+h+"px "+(w-x)+"px)"};goog.fx.dom.Scroll=function(element,start,end,time,opt_acc){if(start.length!=2||end.length!=2)throw Error("Start and end points must be 2D");goog.fx.dom.PredefinedEffect.apply(this,arguments)};goog.inherits(goog.fx.dom.Scroll,goog.fx.dom.PredefinedEffect);
goog.fx.dom.Scroll.prototype.updateStyle=function(){this.element.scrollLeft=Math.round(this.coords[0]);this.element.scrollTop=Math.round(this.coords[1])};goog.fx.dom.Resize=function(element,start,end,time,opt_acc){if(start.length!=2||end.length!=2)throw Error("Start and end points must be 2D");goog.fx.dom.PredefinedEffect.apply(this,arguments)};goog.inherits(goog.fx.dom.Resize,goog.fx.dom.PredefinedEffect);
goog.fx.dom.Resize.prototype.updateStyle=function(){this.element.style.width=Math.round(this.coords[0])+"px";this.element.style.height=Math.round(this.coords[1])+"px"};goog.fx.dom.ResizeWidth=function(element,start,end,time,opt_acc){goog.fx.dom.PredefinedEffect.call(this,element,[start],[end],time,opt_acc)};goog.inherits(goog.fx.dom.ResizeWidth,goog.fx.dom.PredefinedEffect);goog.fx.dom.ResizeWidth.prototype.updateStyle=function(){this.element.style.width=Math.round(this.coords[0])+"px"};
goog.fx.dom.ResizeHeight=function(element,start,end,time,opt_acc){goog.fx.dom.PredefinedEffect.call(this,element,[start],[end],time,opt_acc)};goog.inherits(goog.fx.dom.ResizeHeight,goog.fx.dom.PredefinedEffect);goog.fx.dom.ResizeHeight.prototype.updateStyle=function(){this.element.style.height=Math.round(this.coords[0])+"px"};
goog.fx.dom.Fade=function(element,start,end,time,opt_acc){if(goog.isNumber(start))start=[start];if(goog.isNumber(end))end=[end];goog.fx.dom.PredefinedEffect.call(this,element,start,end,time,opt_acc);if(start.length!=1||end.length!=1)throw Error("Start and end points must be 1D");};goog.inherits(goog.fx.dom.Fade,goog.fx.dom.PredefinedEffect);goog.fx.dom.Fade.prototype.updateStyle=function(){goog.style.setOpacity(this.element,this.coords[0])};
goog.fx.dom.Fade.prototype.show=function(){this.element.style.display=""};goog.fx.dom.Fade.prototype.hide=function(){this.element.style.display="none"};goog.fx.dom.FadeOut=function(element,time,opt_acc){goog.fx.dom.Fade.call(this,element,1,0,time,opt_acc)};goog.inherits(goog.fx.dom.FadeOut,goog.fx.dom.Fade);goog.fx.dom.FadeIn=function(element,time,opt_acc){goog.fx.dom.Fade.call(this,element,0,1,time,opt_acc)};goog.inherits(goog.fx.dom.FadeIn,goog.fx.dom.Fade);
goog.fx.dom.FadeOutAndHide=function(element,time,opt_acc){goog.fx.dom.Fade.call(this,element,1,0,time,opt_acc)};goog.inherits(goog.fx.dom.FadeOutAndHide,goog.fx.dom.Fade);goog.fx.dom.FadeOutAndHide.prototype.onBegin=function(){this.show();goog.fx.dom.FadeOutAndHide.superClass_.onBegin.call(this)};goog.fx.dom.FadeOutAndHide.prototype.onEnd=function(){this.hide();goog.fx.dom.FadeOutAndHide.superClass_.onEnd.call(this)};
goog.fx.dom.FadeInAndShow=function(element,time,opt_acc){goog.fx.dom.Fade.call(this,element,0,1,time,opt_acc)};goog.inherits(goog.fx.dom.FadeInAndShow,goog.fx.dom.Fade);goog.fx.dom.FadeInAndShow.prototype.onBegin=function(){this.show();goog.fx.dom.FadeInAndShow.superClass_.onBegin.call(this)};goog.fx.dom.BgColorTransform=function(element,start,end,time,opt_acc){if(start.length!=3||end.length!=3)throw Error("Start and end points must be 3D");goog.fx.dom.PredefinedEffect.apply(this,arguments)};
goog.inherits(goog.fx.dom.BgColorTransform,goog.fx.dom.PredefinedEffect);goog.fx.dom.BgColorTransform.prototype.setColor=function(){var coordsAsInts=[];for(var i=0;i<this.coords.length;i++)coordsAsInts[i]=Math.round(this.coords[i]);var color="rgb("+coordsAsInts.join(",")+")";this.element.style.backgroundColor=color};goog.fx.dom.BgColorTransform.prototype.updateStyle=function(){this.setColor()};
goog.fx.dom.bgColorFadeIn=function(element,start,time){var initialBgColor=element.style.backgroundColor||"";var computedBgColor=goog.style.getBackgroundColor(element);var end;if(computedBgColor!="transparent"&&computedBgColor!="rgba(0, 0, 0, 0)")end=goog.color.hexToRgb(goog.color.parse(computedBgColor).hex);else end=[255,255,255];var anim=new goog.fx.dom.BgColorTransform(element,start,end,time);goog.events.listen(anim,goog.fx.Animation.EventType.END,function(){element.style.backgroundColor=initialBgColor});
anim.play()};goog.fx.dom.ColorTransform=function(element,start,end,time,opt_acc){if(start.length!=3||end.length!=3)throw Error("Start and end points must be 3D");goog.fx.dom.PredefinedEffect.apply(this,arguments)};goog.inherits(goog.fx.dom.ColorTransform,goog.fx.dom.PredefinedEffect);
goog.fx.dom.ColorTransform.prototype.updateStyle=function(){var coordsAsInts=[];for(var i=0;i<this.coords.length;i++)coordsAsInts[i]=Math.round(this.coords[i]);var color="rgb("+coordsAsInts.join(",")+")";this.element.style.color=color};