var base2={name:"base2",version:"1.0",exports:"Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp,Undefined,Null,This,True,False,assignID,detect,global",namespace:""};new function(_no_shrink_){var Undefined=K(),Null=K(null),True=K(true),False=K(false),This=function(){return this};var global=This();var base2=global.base2;var _FORMAT=/%([1-9])/g;var _LTRIM=/^\s\s*/;var _RTRIM=/\s\s*$/;var _RESCAPE=/([\/()[\]{}|*+-.,^$?\\])/g;var _BASE=/try/.test(detect)?/\bbase\b/:/.*/;var _HIDDEN=["constructor","toString","valueOf"];var _MSIE_NATIVE_FUNCTION=detect("(jscript)")?new RegExp("^"+rescape(isNaN).replace(/isNaN/,"\\w+")+"$"):{test:False};var _counter=1;var _slice=Array.prototype.slice;_Function_forEach();function assignID(object){if(!object.base2ID)object.base2ID="b2_"+_counter++;return object.base2ID};var _subclass=function(_instance,_static){base2.__prototyping=this.prototype;var _prototype=new this;if(_instance)extend(_prototype,_instance);delete base2.__prototyping;var _constructor=_prototype.constructor;function _class(){if(!base2.__prototyping){if(this.constructor==arguments.callee||this.__constructing){this.__constructing=true;_constructor.apply(this,arguments);delete this.__constructing}else{return extend(arguments[0],_prototype)}}return this};_prototype.constructor=_class;for(var i in Base)_class[i]=this[i];_class.ancestor=this;_class.base=Undefined;if(_static)extend(_class,_static);_class.prototype=_prototype;if(_class.init)_class.init();return _class};var Base=_subclass.call(Object,{constructor:function(){if(arguments.length>0){this.extend(arguments[0])}},base:function(){},extend:delegate(extend)},Base={ancestorOf:function(klass){return _ancestorOf(this,klass)},extend:_subclass,forEach:function(object,block,context){_Function_forEach(this,object,block,context)},implement:function(source){if(typeof source=="function"){source=source.prototype}extend(this.prototype,source);return this}});var Package=Base.extend({constructor:function(_private,_public){this.extend(_public);if(this.init)this.init();if(this.name&&this.name!="base2"){if(!this.parent)this.parent=base2;this.parent.addName(this.name,this);this.namespace=format("var %1=%2;",this.name,String2.slice(this,1,-1))}if(_private){var JSNamespace=base2.JavaScript?base2.JavaScript.namespace:"";_private.imports=Array2.reduce(csv(this.imports),function(namespace,name){var ns=lookup(name)||lookup("JavaScript."+name);return namespace+=ns.namespace},"var base2=(function(){return this.base2})();"+base2.namespace+JSNamespace)+lang.namespace;_private.exports=Array2.reduce(csv(this.exports),function(namespace,name){var fullName=this.name+"."+name;this.namespace+="var "+name+"="+fullName+";";return namespace+="if(!"+fullName+")"+fullName+"="+name+";"},"",this)+"this._label_"+this.name+"();";var pkg=this;var packageName=String2.slice(this,1,-1);_private["_label_"+this.name]=function(){Package.forEach(pkg,function(object,name){if(object&&object.ancestorOf==Base.ancestorOf){object.toString=K(format("[%1.%2]",packageName,name));if(object.prototype.toString==Base.prototype.toString){object.prototype.toString=K(format("[object %1.%2]",packageName,name))}}})}}function lookup(names){names=names.split(".");var value=base2,i=0;while(value&&names[i]!=null){value=value[names[i++]]}return value}},exports:"",imports:"",name:"",namespace:"",parent:null,addName:function(name,value){if(!this[name]){this[name]=value;this.exports+=","+name;this.namespace+=format("var %1=%2.%1;",name,this.name)}},addPackage:function(name){this.addName(name,new Package(null,{name:name,parent:this}))},toString:function(){return format("[%1]",this.parent?String2.slice(this.parent,1,-1)+"."+this.name:this.name)}});var Abstract=Base.extend({constructor:function(){throw new TypeError("Abstract class cannot be instantiated.");}});var _moduleCount=0;var Module=Abstract.extend(null,{namespace:"",extend:function(_interface,_static){var module=this.base();var index=_moduleCount++;module.namespace="";module.partial=this.partial;module.toString=K("[base2.Module["+index+"]]");Module[index]=module;module.implement(this);if(_interface)module.implement(_interface);if(_static){extend(module,_static);if(module.init)module.init()}return module},forEach:function(block,context){_Function_forEach(Module,this.prototype,function(method,name){if(typeOf(method)=="function"){block.call(context,this[name],name,this)}},this)},implement:function(_interface){var module=this;var id=module.toString().slice(1,-1);if(typeof _interface=="function"){if(!_ancestorOf(_interface,module)){this.base(_interface)}if(_ancestorOf(Module,_interface)){for(var name in _interface){if(module[name]===undefined){var property=_interface[name];if(typeof property=="function"&&property.call&&_interface.prototype[name]){property=_staticModuleMethod(_interface,name)}module[name]=property}}module.namespace+=_interface.namespace.replace(/base2\.Module\[\d+\]/g,id)}}else{extend(module,_interface);_extendModule(module,_interface)}return module},partial:function(){var module=Module.extend();var id=module.toString().slice(1,-1);module.namespace=this.namespace.replace(/(\w+)=b[^\)]+\)/g,"$1="+id+".$1");this.forEach(function(method,name){module[name]=partial(bind(method,module))});return module}});function _extendModule(module,_interface){var proto=module.prototype;var id=module.toString().slice(1,-1);for(var name in _interface){var property=_interface[name],namespace="";if(name.charAt(0)=="@"){if(detect(name.slice(1)))_extendModule(module,property)}else if(!proto[name]){if(name==name.toUpperCase()){namespace="var "+name+"="+id+"."+name+";"}else if(typeof property=="function"&&property.call){namespace="var "+name+"=base2.lang.bind('"+name+"',"+id+");";proto[name]=_moduleMethod(module,name)}if(module.namespace.indexOf(namespace)==-1){module.namespace+=namespace}}}};function _staticModuleMethod(module,name){return function(){return module[name].apply(module,arguments)}};function _moduleMethod(module,name){return function(){var args=_slice.call(arguments);args.unshift(this);return module[name].apply(module,args)}};var Enumerable=Module.extend({every:function(object,test,context){var result=true;try{forEach(object,function(value,key){result=test.call(context,value,key,object);if(!result)throw StopIteration;})}catch(error){if(error!=StopIteration)throw error;}return!!result},filter:function(object,test,context){var i=0;return this.reduce(object,function(result,value,key){if(test.call(context,value,key,object)){result[i++]=value}return result},[])},invoke:function(object,method){var args=_slice.call(arguments,2);return this.map(object,(typeof method=="function")?function(item){return item==null?undefined:method.apply(item,args)}:function(item){return item==null?undefined:item[method].apply(item,args)})},map:function(object,block,context){var result=[],i=0;forEach(object,function(value,key){result[i++]=block.call(context,value,key,object)});return result},pluck:function(object,key){return this.map(object,function(item){return item==null?undefined:item[key]})},reduce:function(object,block,result,context){var initialised=arguments.length>2;forEach(object,function(value,key){if(initialised){result=block.call(context,result,value,key,object)}else{result=value;initialised=true}});return result},some:function(object,test,context){return!this.every(object,not(test),context)}});var _HASH="#";var Map=Base.extend({constructor:function(values){if(values)this.merge(values)},clear:function(){for(var key in this)if(key.indexOf(_HASH)==0){delete this[key]}},copy:function(){base2.__prototyping=true;var copy=new this.constructor;delete base2.__prototyping;for(var i in this)if(this[i]!==copy[i]){copy[i]=this[i]}return copy},forEach:function(block,context){for(var key in this)if(key.indexOf(_HASH)==0){block.call(context,this[key],key.slice(1),this)}},get:function(key){return this[_HASH+key]},getKeys:function(){return this.map(II)},getValues:function(){return this.map(I)},has:function(key){/*@cc_on @*/ /*@if(@_jscript_version<5.5)return $Legacy.has(this,_HASH+key);@else @*/return _HASH+key in this;/*@end @*/},merge:function(values){var put=flip(this.put);forEach(arguments,function(values){forEach(values,put,this)},this);return this},put:function(key,value){this[_HASH+key]=value},remove:function(key){delete this[_HASH+key]},size:function(){var size=0;for(var key in this)if(key.indexOf(_HASH)==0)size++;return size},union:function(values){return this.merge.apply(this.copy(),arguments)}});Map.implement(Enumerable);Map.prototype.filter=function(test,context){return this.reduce(function(result,value,key){if(!test.call(context,value,key,this)){result.remove(key)}return result},this.copy(),this)};var _KEYS="~";var Collection=Map.extend({constructor:function(values){this[_KEYS]=new Array2;this.base(values)},add:function(key,item){assert(!this.has(key),"Duplicate key '"+key+"'.");this.put.apply(this,arguments)},clear:function(){this.base();this[_KEYS].length=0},copy:function(){var copy=this.base();copy[_KEYS]=this[_KEYS].copy();return copy},forEach:function(block,context){var keys=this[_KEYS];var length=keys.length;for(var i=0;i<length;i++){block.call(context,this[_HASH+keys[i]],keys[i],this)}},getAt:function(index){var key=this[_KEYS].item(index);return(key===undefined)?undefined:this[_HASH+key]},getKeys:function(){return this[_KEYS].copy()},indexOf:function(key){return this[_KEYS].indexOf(String(key))},insertAt:function(index,key,item){assert(this[_KEYS].item(index)!==undefined,"Index out of bounds.");assert(!this.has(key),"Duplicate key '"+key+"'.");this[_KEYS].insertAt(index,String(key));this[_HASH+key]=null;this.put.apply(this,_slice.call(arguments,1))},item:function(keyOrIndex){return this[typeof keyOrIndex=="number"?"getAt":"get"](keyOrIndex)},put:function(key,item){if(!this.has(key)){this[_KEYS].push(String(key))}var klass=this.constructor;if(klass.Item&&!instanceOf(item,klass.Item)){item=klass.create.apply(klass,arguments)}this[_HASH+key]=item},putAt:function(index,item){arguments[0]=this[_KEYS].item(index);assert(arguments[0]!==undefined,"Index out of bounds.");this.put.apply(this,arguments)},remove:function(key){if(this.has(key)){this[_KEYS].remove(String(key));delete this[_HASH+key]}},removeAt:function(index){var key=this[_KEYS].item(index);if(key!==undefined){this[_KEYS].removeAt(index);delete this[_HASH+key]}},reverse:function(){this[_KEYS].reverse();return this},size:function(){return this[_KEYS].length},slice:function(start,end){var sliced=this.copy();if(arguments.length>0){var keys=this[_KEYS],removed=keys;sliced[_KEYS]=Array2(_slice.apply(keys,arguments));if(sliced[_KEYS].length){removed=removed.slice(0,start);if(arguments.length>1){removed=removed.concat(keys.slice(end))}}for(var i=0;i<removed.length;i++){delete sliced[_HASH+removed[i]]}}return sliced},sort:function(compare){if(compare){this[_KEYS].sort(bind(function(key1,key2){return compare(this[_HASH+key1],this[_HASH+key2],key1,key2)},this))}else this[_KEYS].sort();return this},toString:function(){return"("+(this[_KEYS]||"")+")"}},{Item:null,create:function(key,item){return this.Item?new this.Item(key,item):item},extend:function(_instance,_static){var klass=this.base(_instance);klass.create=this.create;if(_static)extend(klass,_static);if(!klass.Item){klass.Item=this.Item}else if(typeof klass.Item!="function"){klass.Item=(this.Item||Base).extend(klass.Item)}if(klass.init)klass.init();return klass}});var _RG_BACK_REF=/\\(\d+)/g,_RG_ESCAPE_CHARS=/\\./g,_RG_ESCAPE_BRACKETS=/\(\?[:=!]|\[[^\]]+\]/g,_RG_BRACKETS=/\(/g,_RG_LOOKUP=/\$(\d+)/,_RG_LOOKUP_SIMPLE=/^\$\d+$/;var RegGrp=Collection.extend({constructor:function(values,ignoreCase){this.base(values);this.ignoreCase=!!ignoreCase},ignoreCase:false,exec:function(string,override){string+="";var items=this,keys=this[_KEYS];if(!keys.length)return string;if(override==RegGrp.IGNORE)override=0;return string.replace(new RegExp(this,this.ignoreCase?"gi":"g"),function(match){var item,offset=1,i=0;while((item=items[_HASH+keys[i++]])){var next=offset+item.length+1;if(arguments[offset]){var replacement=override==null?item.replacement:override;switch(typeof replacement){case"function":return replacement.apply(items,_slice.call(arguments,offset,next));case"number":return arguments[offset+replacement];default:return replacement}}offset=next}return match})},insertAt:function(index,expression,replacement){if(instanceOf(expression,RegExp)){arguments[1]=expression.source}return base(this,arguments)},test:function(string){return this.exec(string)!=string},toString:function(){var offset=1;return"("+this.map(function(item){var expression=(item+"").replace(_RG_BACK_REF,function(match,index){return"\\"+(offset+Number(index))});offset+=item.length+1;return expression}).join(")|(")+")"}},{IGNORE:"$0",init:function(){forEach("add,get,has,put,remove".split(","),function(name){_override(this,name,function(expression){if(instanceOf(expression,RegExp)){arguments[0]=expression.source}return base(this,arguments)})},this.prototype)},Item:{constructor:function(expression,replacement){if(replacement==null)replacement=RegGrp.IGNORE;else if(replacement.replacement!=null)replacement=replacement.replacement;else if(typeof replacement!="function")replacement=String(replacement);if(typeof replacement=="string"&&_RG_LOOKUP.test(replacement)){if(_RG_LOOKUP_SIMPLE.test(replacement)){replacement=parseInt(replacement.slice(1))}else{var Q='"';replacement=replacement.replace(/\\/g,"\\\\").replace(/"/g,"\\x22").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\$(\d+)/g,Q+"+(arguments[$1]||"+Q+Q+")+"+Q).replace(/(['"])\1\+(.*)\+\1\1$/,"$1");replacement=new Function("return "+Q+replacement+Q)}}this.length=RegGrp.count(expression);this.replacement=replacement;this.toString=K(expression+"")},length:0,replacement:""},count:function(expression){expression=(expression+"").replace(_RG_ESCAPE_CHARS,"").replace(_RG_ESCAPE_BRACKETS,"");return match(expression,_RG_BRACKETS).length}});var lang={name:"lang",version:base2.version,exports:"assert,assertArity,assertType,base,bind,copy,extend,forEach,format,instanceOf,match,pcopy,rescape,trim,typeOf",namespace:""};function assert(condition,message,ErrorClass){if(!condition){throw new(ErrorClass||Error)(message||"Assertion failed.");}};function assertArity(args,arity,message){if(arity==null)arity=args.callee.length;if(args.length<arity){throw new SyntaxError(message||"Not enough arguments.");}};function assertType(object,type,message){if(type&&(typeof type=="function"?!instanceOf(object,type):typeOf(object)!=type)){throw new TypeError(message||"Invalid type.");}};function copy(object){var copy={};for(var i in object){copy[i]=object[i]}return copy};function pcopy(object){_dummy.prototype=object;return new _dummy};function _dummy(){};function base(object,args){return object.base.apply(object,args)};function extend(object,source){if(object&&source){if(arguments.length>2){var key=source;source={};source[key]=arguments[2]}var proto=global[(typeof source=="function"?"Function":"Object")].prototype;if(base2.__prototyping){var i=_HIDDEN.length,key;while((key=_HIDDEN[--i])){var value=source[key];if(value!=proto[key]){if(_BASE.test(value)){_override(object,key,value)}else{object[key]=value}}}}for(key in source){if(proto[key]===undefined){var value=source[key];if(key.charAt(0)=="@"){if(detect(key.slice(1)))extend(object,value)}else{var ancestor=object[key];if(ancestor&&typeof value=="function"){if(value!=ancestor){if(_BASE.test(value)){_override(object,key,value)}else{value.ancestor=ancestor;object[key]=value}}}else{object[key]=value}}}}}return object};function _ancestorOf(ancestor,fn){while(fn){if(!fn.ancestor)return false;fn=fn.ancestor;if(fn==ancestor)return true}return false};function _override(object,name,method){var ancestor=object[name];var superObject=base2.__prototyping;if(superObject&&ancestor!=superObject[name])superObject=null;function _base(){var previous=this.base;this.base=superObject?superObject[name]:ancestor;var returnValue=method.apply(this,arguments);this.base=previous;return returnValue};_base.method=method;_base.ancestor=ancestor;object[name]=_base};if(typeof StopIteration=="undefined"){StopIteration=new Error("StopIteration")}function forEach(object,block,context,fn){if(object==null)return;if(!fn){if(typeof object=="function"&&object.call){fn=Function}else if(typeof object.forEach=="function"&&object.forEach!=arguments.callee){object.forEach(block,context);return}else if(typeof object.length=="number"){_Array_forEach(object,block,context);return}}_Function_forEach(fn||Object,object,block,context)};forEach.csv=function(string,block,context){forEach(csv(string),block,context)};forEach.detect=function(object,block,context){forEach(object,function(value,key){if(key.charAt(0)=="@"){if(detect(key.slice(1)))forEach(value,arguments.callee)}else block.call(context,value,key,object)})};function _Array_forEach(array,block,context){if(array==null)array=global;var length=array.length||0,i;if(typeof array=="string"){for(i=0;i<length;i++){block.call(context,array.charAt(i),i,array)}}else{for(i=0;i<length;i++){/*@cc_on @*/ /*@if(@_jscript_version<5.2)if($Legacy.has(array,i))@else @*/if(i in array)/*@end @*/block.call(context,array[i],i,array)}}};function _Function_forEach(fn,object,block,context){var Temp=function(){this.i=1};Temp.prototype={i:1};var count=0;for(var i in new Temp)count++;_Function_forEach=(count>1)?function(fn,object,block,context){var processed={};for(var key in object){if(!processed[key]&&fn.prototype[key]===undefined){processed[key]=true;block.call(context,object[key],key,object)}}}:function(fn,object,block,context){for(var key in object){if(fn.prototype[key]===undefined){block.call(context,object[key],key,object)}}};_Function_forEach(fn,object,block,context)};function instanceOf(object,klass){if(typeof klass!="function"){throw new TypeError("Invalid 'instanceOf' operand.");}if(object==null)return false;/*@cc_on if(typeof object.constructor!="function"){return typeOf(object)==typeof klass.prototype.valueOf()}@*/if(object.constructor==klass)return true;if(klass.ancestorOf)return klass.ancestorOf(object.constructor);/*@if(@_jscript_version<5.1)@else @*/if(object instanceof klass)return true;/*@end @*/if(Base.ancestorOf==klass.ancestorOf)return false;if(Base.ancestorOf==object.constructor.ancestorOf)return klass==Object;switch(klass){case Array:return!!(typeof object=="object"&&object.join&&object.splice);case Function:return typeOf(object)=="function";case RegExp:return typeof object.constructor.$1=="string";case Date:return!!object.getTimezoneOffset;case String:case Number:case Boolean:return typeOf(object)==typeof klass.prototype.valueOf();case Object:return true}return false};function typeOf(object){var type=typeof object;switch(type){case"object":return object==null?"null":typeof object.constructor=="undefined"?_MSIE_NATIVE_FUNCTION.test(object)?"function":type:typeof object.constructor.prototype.valueOf();case"function":return typeof object.call=="function"?type:"object";default:return type}};var JavaScript={name:"JavaScript",version:base2.version,exports:"Array2,Date2,Function2,String2",namespace:"",bind:function(host){var top=global;global=host;forEach.csv(this.exports,function(name2){var name=name2.slice(0,-1);extend(host[name],this[name2]);this[name2](host[name].prototype)},this);global=top;return host}};function _createObject2(Native,constructor,generics,extensions){var INative=Module.extend();var id=INative.toString().slice(1,-1);forEach.csv(generics,function(name){INative[name]=unbind(Native.prototype[name]);INative.namespace+=format("var %1=%2.%1;",name,id)});forEach(_slice.call(arguments,3),INative.implement,INative);var Native2=function(){return INative(this.constructor==INative?constructor.apply(null,arguments):arguments[0])};Native2.prototype=INative.prototype;for(var name in INative){if(name!="prototype"&&Native[name]){INative[name]=Native[name];delete INative.prototype[name]}Native2[name]=INative[name]}Native2.ancestor=Object;delete Native2.extend;Native2.namespace=Native2.namespace.replace(/(var (\w+)=)[^,;]+,([^\)]+)\)/g,"$1$3.$2");return Native2};if((new Date).getYear()>1900){Date.prototype.getYear=function(){return this.getFullYear()-1900};Date.prototype.setYear=function(year){return this.setFullYear(year+1900)}}var _testDate=new Date(Date.UTC(2006,1,20));_testDate.setUTCDate(15);if(_testDate.getUTCHours()!=0){forEach.csv("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds",function(type){extend(Date.prototype,"setUTC"+type,function(){var value=base(this,arguments);if(value>=57722401000){value-=3600000;this.setTime(value)}return value})})}Function.prototype.prototype={};if("".replace(/^/,K("$$"))=="$"){extend(String.prototype,"replace",function(expression,replacement){if(typeof replacement=="function"){var fn=replacement;replacement=function(){return String(fn.apply(null,arguments)).split("$").join("$$")}}return this.base(expression,replacement)})}var Array2=_createObject2(Array,Array,"concat,join,pop,push,reverse,shift,slice,sort,splice,unshift",Enumerable,{combine:function(keys,values){if(!values)values=keys;return Array2.reduce(keys,function(hash,key,index){hash[key]=values[index];return hash},{})},contains:function(array,item){return Array2.indexOf(array,item)!=-1},copy:function(array){var copy=_slice.call(array);if(!copy.swap)Array2(copy);return copy},flatten:function(array){var i=0;return Array2.reduce(array,function(result,item){if(Array2.like(item)){Array2.reduce(item,arguments.callee,result)}else{result[i++]=item}return result},[])},forEach:_Array_forEach,indexOf:function(array,item,fromIndex){var length=array.length;if(fromIndex==null){fromIndex=0}else if(fromIndex<0){fromIndex=Math.max(0,length+fromIndex)}for(var i=fromIndex;i<length;i++){if(array[i]===item)return i}return-1},insertAt:function(array,index,item){Array2.splice(array,index,0,item);return item},item:function(array,index){if(index<0)index+=array.length;return array[index]},lastIndexOf:function(array,item,fromIndex){var length=array.length;if(fromIndex==null){fromIndex=length-1}else if(fromIndex<0){fromIndex=Math.max(0,length+fromIndex)}for(var i=fromIndex;i>=0;i--){if(array[i]===item)return i}return-1},map:function(array,block,context){var result=[];Array2.forEach(array,function(item,index){result[index]=block.call(context,item,index,array)});return result},remove:function(array,item){var index=Array2.indexOf(array,item);if(index!=-1)Array2.removeAt(array,index)},removeAt:function(array,index){Array2.splice(array,index,1)},swap:function(array,index1,index2){if(index1<0)index1+=array.length;if(index2<0)index2+=array.length;var temp=array[index1];array[index1]=array[index2];array[index2]=temp;return array}});Array2.reduce=Enumerable.reduce;Array2.like=function(object){return typeOf(object)=="object"&&typeof object.length=="number"};var _DATE_PATTERN=/^((-\d+|\d{4,})(-(\d{2})(-(\d{2}))?)?)?T((\d{2})(:(\d{2})(:(\d{2})(\.(\d{1,3})(\d)?\d*)?)?)?)?(([+-])(\d{2})(:(\d{2}))?|Z)?$/;var _DATE_PARTS={FullYear:2,Month:4,Date:6,Hours:8,Minutes:10,Seconds:12,Milliseconds:14};var _TIMEZONE_PARTS={Hectomicroseconds:15,UTC:16,Sign:17,Hours:18,Minutes:20};var _TRIM_ZEROES=/(((00)?:0+)?:0+)?\.0+$/;var _TRIM_TIMEZONE=/(T[0-9:.]+)$/;var Date2=_createObject2(Date,function(yy,mm,dd,h,m,s,ms){switch(arguments.length){case 0:return new Date;case 1:return typeof yy=="number"?new Date(yy):Date2.parse(yy);default:return new Date(yy,mm,arguments.length==2?1:dd,h||0,m||0,s||0,ms||0)}},"",{toISOString:function(date){var string="####-##-##T##:##:##.###";for(var part in _DATE_PARTS){string=string.replace(/#+/,function(digits){var value=date["getUTC"+part]();if(part=="Month")value++;return("000"+value).slice(-digits.length)})}return string.replace(_TRIM_ZEROES,"").replace(_TRIM_TIMEZONE,"$1Z")}});delete Date2.forEach;Date2.now=function(){return(new Date).valueOf()};Date2.parse=function(string,defaultDate){if(arguments.length>1){assertType(defaultDate,"number","default date should be of type 'number'.")}var parts=match(string,_DATE_PATTERN);if(parts.length){if(parts[_DATE_PARTS.Month])parts[_DATE_PARTS.Month]--;if(parts[_TIMEZONE_PARTS.Hectomicroseconds]>=5)parts[_DATE_PARTS.Milliseconds]++;var date=new Date(defaultDate||0);var prefix=parts[_TIMEZONE_PARTS.UTC]||parts[_TIMEZONE_PARTS.Hours]?"UTC":"";for(var part in _DATE_PARTS){var value=parts[_DATE_PARTS[part]];if(!value)continue;date["set"+prefix+part](value);if(date["get"+prefix+part]()!=parts[_DATE_PARTS[part]]){return NaN}}if(parts[_TIMEZONE_PARTS.Hours]){var hours=Number(parts[_TIMEZONE_PARTS.Sign]+parts[_TIMEZONE_PARTS.Hours]);var minutes=Number(parts[_TIMEZONE_PARTS.Sign]+(parts[_TIMEZONE_PARTS.Minutes]||0));date.setUTCMinutes(date.getUTCMinutes()+(hours*60)+minutes)}return date.valueOf()}else{return Date.parse(string)}};var String2=_createObject2(String,function(string){return new String(arguments.length==0?"":string)},"charAt,charCodeAt,concat,indexOf,lastIndexOf,match,replace,search,slice,split,substr,substring,toLowerCase,toUpperCase",{csv:csv,format:format,rescape:rescape,trim:trim});delete String2.forEach;function trim(string){return String(string).replace(_LTRIM,"").replace(_RTRIM,"")};function csv(string){return string?(string+"").split(/\s*,\s*/):[]};function format(string){var args=arguments;var pattern=new RegExp("%([1-"+(arguments.length-1)+"])","g");return(string+"").replace(pattern,function(match,index){return args[index]})};function match(string,expression){return(string+"").match(expression)||[]};function rescape(string){return(string+"").replace(_RESCAPE,"\\$1")};var Function2=_createObject2(Function,Function,"",{I:I,II:II,K:K,bind:bind,compose:compose,delegate:delegate,flip:flip,not:not,partial:partial,unbind:unbind});function I(i){return i};function II(i,ii){return ii};function K(k){return function(){return k}};function bind(fn,context){var lateBound=typeof fn!="function";if(arguments.length>2){var args=_slice.call(arguments,2);return function(){return(lateBound?context[fn]:fn).apply(context,args.concat.apply(args,arguments))}}else{return function(){return(lateBound?context[fn]:fn).apply(context,arguments)}}};function compose(){var fns=_slice.call(arguments);return function(){var i=fns.length,result=fns[--i].apply(this,arguments);while(i--)result=fns[i].call(this,result);return result}};function delegate(fn,context){return function(){var args=_slice.call(arguments);args.unshift(this);return fn.apply(context,args)}};function flip(fn){return function(){return fn.apply(this,Array2.swap(arguments,0,1))}};function not(fn){return function(){return!fn.apply(this,arguments)}};function partial(fn){var args=_slice.call(arguments,1);return function(){var specialised=args.concat(),i=0,j=0;while(i<args.length&&j<arguments.length){if(specialised[i]===undefined)specialised[i]=arguments[j++];i++}while(j<arguments.length){specialised[i++]=arguments[j++]}if(Array2.contains(specialised,undefined)){specialised.unshift(fn);return partial.apply(null,specialised)}return fn.apply(this,specialised)}};function unbind(fn){return function(context){return fn.apply(context,_slice.call(arguments,1))}};function detect(){var jscript=NaN/*@cc_on||@_jscript_version@*/;var javaEnabled=global.java?true:false;if(global.navigator){var MSIE=/MSIE[\d.]+/g;var element=document.createElement("span");var userAgent=navigator.userAgent.replace(/([a-z])[\s\/](\d)/gi,"$1$2");if(!jscript)userAgent=userAgent.replace(MSIE,"");if(MSIE.test(userAgent))userAgent=userAgent.match(MSIE)[0]+" "+userAgent.replace(MSIE,"");base2.userAgent=navigator.platform+" "+userAgent.replace(/like \w+/gi,"");javaEnabled&=navigator.javaEnabled()}var _cache={};detect=function(expression){if(_cache[expression]==null){var returnValue=false,test=expression;var not=test.charAt(0)=="!";if(not)test=test.slice(1);if(test.charAt(0)=="("){try{returnValue=new Function("element,jscript,java,global","return !!"+test)(element,jscript,javaEnabled,global)}catch(ex){}}else{returnValue=new RegExp("("+test+")","i").test(base2.userAgent)}_cache[expression]=!!(not^returnValue)}return _cache[expression]};return detect(arguments[0])};base2=global.base2=new Package(this,base2);var exports=this.exports;lang=new Package(this,lang);exports+=this.exports;JavaScript=new Package(this,JavaScript);eval(exports+this.exports);lang.base=base;lang.extend=extend};new function(_no_shrink_){var DOM=new base2.Package(this,{name:"DOM",version:"1.0.1",imports:"Function2",exports:"Interface,Binding,Node,Document,Element,AbstractView,HTMLDocument,HTMLElement,Selector,Traversal,CSSParser,XPathParser,NodeSelector,DocumentSelector,ElementSelector,StaticNodeList,Event,EventTarget,DocumentEvent,ViewCSS,CSSStyleDeclaration,ClassList",bind:function(node){if(node&&node.nodeType){var base2ID=assignID(node);if(!DOM.bind[base2ID]){switch(node.nodeType){case 1:if(typeof node.className=="string"){(HTMLElement.bindings[node.tagName]||HTMLElement).bind(node)}else{Element.bind(node)}break;case 9:if(node.writeln){HTMLDocument.bind(node)}else{Document.bind(node)}break;default:Node.bind(node)}DOM.bind[base2ID]=true}}return node},"@MSIE5.+win":{bind:function(node){if(node&&node.writeln){node.nodeType=9}return this.base(node)}}});eval(this.imports);var _MSIE=detect("MSIE");var _MSIE5=detect("MSIE5");var Interface=Module.extend(null,{forEach:function(block,context){forEach(this,function(method,name){if(typeOf(method)=="function"&&(this.prototype[name]||method._delegate)){block.call(context,method,name,this)}},this,Module)},implement:function(_interface){if(typeof _interface=="object"){_createDelegates(this,_interface)}else if(Interface.ancestorOf(_interface)){for(var name in _interface){if(_interface[name]&&_interface[name]._delegate){this[name]=bind(name,_interface);this[name]._delegate=name}}}return this.base(_interface)}});function _createDelegates(module,_interface){var id=module.toString().slice(1,-1);for(var name in _interface){var property=_interface[name];if(name.charAt(0)=="@"){_createDelegates(module,property)}else if(!module[name]&&typeof property=="function"&&property.call){var args="abcdefghij".slice(0,property.length).split("");var fn=new Function(args.join(","),format("%2.base=%2.%1.ancestor;var m=%2.base?'base':'%1';return %2[m](%3)",name,args[0],args.slice(1)));fn._delegate=name;module[name]=fn;module.namespace+="var "+name+"=base2.lang.bind('"+name+"',"+id+");";}}};var Binding=Interface.extend(null,{bind:function(object){return extend(object,this.prototype);}});var Node=Binding.extend({"@!(element.compareDocumentPosition)":{compareDocumentPosition:function(node,other){if(Traversal.contains(node,other)){return 4|16;}else if(Traversal.contains(other,node)){return 2|8;}var nodeIndex=_getSourceIndex(node);var otherIndex=_getSourceIndex(other);if(nodeIndex<otherIndex){return 4;}else if(nodeIndex>otherIndex){return 2;}return 0;}}},{"@Gecko":{bind:function(node){return extend(this.base(node),"removeEventListener",function(){var args=Array2.slice(arguments);args.unshift(this);EventTarget.removeEventListener.apply(EventTarget,args);});}}});var _getSourceIndex=document.documentElement.sourceIndex?function(node){return node.sourceIndex;}:function(node){var key=0;while(node){key=Traversal.getNodeIndex(node)+"."+key;node=node.parentNode;}return key;};var Document=Node.extend(null,{bind:function(document){extend(document,"createElement",function(tagName){return DOM.bind(this.base(tagName));});extend(document,"createElementNS",function(namespaceURI,qualifiedName){var result=this.base(namespaceURI,qualifiedName);if(namespaceURI==='http://www.w3.org/1999/xhtml'){return DOM.bind(result);}else{return result;}});AbstractView.bind(document.defaultView);if(document!=window.document)new DOMContentLoadedEvent(document);return this.base(document);},"@!(document.defaultView)":{bind:function(document){document.defaultView=Traversal.getDefaultView(document);return this.base(document);}}});var _ATTRIBUTES={"class":"className","for":"htmlFor"};var Element=Node.extend({"@MSIE.+win":{getAttribute:function(element,name){if(element.className===undefined){return this.base(element,name);}var attribute=_getAttributeNode(element,name);if(attribute&&(attribute.specified||name=="value")){if(name=="href"||name=="src"){element.base=element.getAttribute.ancestor;return element[element.base?"base":"getAttribute"](name,2);}else if(name=="style"){return element.style.cssText.toLowerCase();}else{return attribute.nodeValue;}}else if(name=="type"&&element.nodeName=="INPUT"){var outerHTML=element.outerHTML;with(outerHTML)outerHTML=slice(0,indexOf(">")+1);return match(outerHTML,/type="?([^\s">]*)"?/i)[1]||null}return null},removeAttribute:function(element,name){if(element.className!==undefined){name=_ATTRIBUTES[name.toLowerCase()]||name}this.base(element,name)},setAttribute:function(element,name,value){if(element.className===undefined){this.base(element,name,value)}else if(name=="style"){element.style.cssText=value}else{value=String(value);var attribute=_getAttributeNode(element,name);if(attribute){attribute.nodeValue=value}else{this.base(element,_ATTRIBUTES[name.toLowerCase()]||name,value)}}}},"@!(element.hasAttribute)":{hasAttribute:function(element,name){if(element.className===undefined){return this.base(element,name)}return this.getAttribute(element,name)!=null}}});if(detect("MSIE.+win"))extend(Element.prototype,"cloneNode",function(deep){var clone=this.base(deep||false);clone.base2ID=undefined;return clone});var _HTML_ATTRIBUTES="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";extend(_ATTRIBUTES,Array2.combine(_HTML_ATTRIBUTES.toLowerCase().split(","),_HTML_ATTRIBUTES.split(",")));var _getAttributeNode=document.documentElement.getAttributeNode?function(element,name){return element.getAttributeNode(name)}:function(element,name){return element.attributes[name]||element.attributes[_ATTRIBUTES[name.toLowerCase()]]};var TEXT=detect("(element.textContent===undefined)")?"innerText":"textContent";var Traversal=Module.extend({getDefaultView:function(node){return this.getDocument(node).defaultView},getNextElementSibling:function(node){while(node&&(node=node.nextSibling)&&!this.isElement(node))continue;return node},getNodeIndex:function(node){var index=0;while(node&&(node=node.previousSibling))index++;return index},getOwnerDocument:function(node){return node.ownerDocument},getPreviousElementSibling:function(node){while(node&&(node=node.previousSibling)&&!this.isElement(node))continue;return node},getTextContent:function(node,isHTML){return node[isHTML?"innerHTML":TEXT]},isEmpty:function(node){node=node.firstChild;while(node){if(node.nodeType==3||this.isElement(node))return false;node=node.nextSibling}return true},setTextContent:function(node,text,isHTML){return node[isHTML?"innerHTML":TEXT]=text},"@!MSIE":{setTextContent:function(node,text,isHTML){with(node)while(lastChild)parentNode.removeChild(lastChild);return this.base(node,text,isHTML)}},"@MSIE":{getDefaultView:function(node){return(node.document||node).parentWindow},"@MSIE5":{getOwnerDocument:function(node){return node.ownerDocument||node.document}}}},{contains:function(node,target){node.nodeType;while(target&&(target=target.parentNode)&&node!=target)continue;return!!target},getDocument:function(node){return this.isDocument(node)?node:node.ownerDocument||node.document},isDocument:function(node){return!!(node&&node.documentElement)},isElement:function(node){return!!(node&&node.nodeType==1)},"@(element.contains)":{contains:function(node,target){return node!=target&&(this.isDocument(node)?node==this.getOwnerDocument(target):node.contains(target))}},"@MSIE5":{isElement:function(node){return!!(node&&node.nodeType==1&&node.nodeName!="!")}}});var AbstractView=Binding.extend();var _CAPTURE_TYPE={},_TYPE_MAP={"2":2,"4":1};var _CAPTURING_PHASE=1,_AT_TARGET=2,_BUBBLING_PHASE=3;var _MOUSE_BUTTON=/^mouse(up|down)|click$/,_MOUSE_CLICK=/click$/,_BUBBLES="abort|error|select|change|resize|scroll|",_CANCELABLE="(dbl)?click|mouse(down|up|over|move|out|wheel)|key(down|up)|submit|reset";_BUBBLES=new RegExp("^("+_BUBBLES+_CANCELABLE+")$");_CANCELABLE=new RegExp("^("+_CANCELABLE+")$");if(_MSIE){var _W3C_EVENT_TYPE={focusin:"focus",focusout:"blur"};_CAPTURE_TYPE={focus:"focusin",blur:"focusout"}}var _CAN_DELEGATE=/^(blur|submit|reset|change|select)$|^(mouse|key|focus)|click$/;var Event=Binding.extend({"@!(document.createEvent)":{initEvent:function(event,type,bubbles,cancelable){event.type=String(type);event.bubbles=!!bubbles;event.cancelable=!!cancelable},preventDefault:function(event){if(event.cancelable!==false){event.returnValue=false}},stopPropagation:function(event){event.cancelBubble=true},"@MSIE":{preventDefault:function(event){this.base(event);if(event.type=="mousedown"){var type="onbeforedeactivate";var document=Traversal.getDocument(event.target);document.attachEvent(type,function(event){event.returnValue=false;document.detachEvent(type,arguments.callee)})}}}}},{CAPTURING_PHASE:_CAPTURING_PHASE,AT_TARGET:_AT_TARGET,BUBBLING_PHASE:_BUBBLING_PHASE,"@!(document.createEvent)":{"@MSIE":{bind:function(event){var type=event.type;if(!event.timeStamp){event.bubbles=_BUBBLES.test(type);event.cancelable=_CANCELABLE.test(type);event.timeStamp=new Date().valueOf()}event.relatedTarget=event[(event.target==event.fromElement?"to":"from")+"Element"];return this.base(event)}}},cloneEvent:function(event){var clone=copy(event);clone.stopPropagation=function(){event.stopPropagation()};clone.preventDefault=function(){event.preventDefault()};return clone},"@MSIE":{cloneEvent:copy}});var EventDispatcher=Base.extend({constructor:function(state){this.state=state;this.events=state.events},dispatch:function(nodes,event,phase){event.eventPhase=phase;var map=this.events[event.type][phase];if(map){var i=nodes.length;while(i--&&!event.cancelBubble){var currentTarget=nodes[i];var listeners=map[currentTarget.base2ID];if(listeners){listeners=copy(listeners);event.currentTarget=currentTarget;event.eventPhase=currentTarget==event.target?_AT_TARGET:phase;for(var listenerID in listeners){var listener=listeners[listenerID];if(typeof listener=="function"){listener.call(currentTarget,event)}else{listener.handleEvent(event)}}}}}},handleEvent:function(event,fixed){Event.bind(event);var type=event.type;var w3cType=_W3C_EVENT_TYPE[type];if(w3cType){event=copy(event);type=event.type=w3cType}if(this.events[type]){if(_MOUSE_BUTTON.test(type)){var button=_MOUSE_CLICK.test(type)?this.state._button:event.button;button=_TYPE_MAP[button]||0;if(event.button!=button){event=copy(event);event.button=button}}var currentTarget=event.target;var nodes=[],i=0;while(currentTarget){nodes[i++]=currentTarget;currentTarget=currentTarget.parentNode}this.dispatch(nodes,event,_CAPTURING_PHASE);if(!event.cancelBubble){if(!event.bubbles)nodes.length=1;nodes.reverse();this.dispatch(nodes,event,_BUBBLING_PHASE)}}return event.returnValue!==false},"@MSIE.+win":{handleEvent:function(event){if(event.type=="scroll"){setTimeout(bind(this.base,this,copy(event),true),0);return true}else{return this.base(event)}},"@MSIE5":{dispatch:function(nodes,event,phase){if(phase==_CAPTURING_PHASE&&!Array2.item(nodes,-1).documentElement){nodes.push(nodes[0].document)}this.base(nodes,event,phase)}}}});var _wrappedListeners={};var EventTarget=Interface.extend({"@!(element.addEventListener)":{addEventListener:function(target,type,listener,useCapture){var documentState=DocumentState.getInstance(target);var targetID=assignID(target);var listenerID=assignID(listener);var phase=useCapture?_CAPTURING_PHASE:_BUBBLING_PHASE;var typeMap=documentState.registerEvent(type,target);var phaseMap=typeMap[phase];if(!phaseMap)phaseMap=typeMap[phase]={};if(useCapture)type=_CAPTURE_TYPE[type]||type;var listeners=phaseMap[targetID];if(!listeners)listeners=phaseMap[targetID]={};listeners[listenerID]=listener},dispatchEvent:function(target,event){event.target=target;return DocumentState.getInstance(target).handleEvent(event)},removeEventListener:function(target,type,listener,useCapture){var events=DocumentState.getInstance(target).events;var typeMap=events[type];if(typeMap){var phaseMap=typeMap[useCapture?_CAPTURING_PHASE:_BUBBLING_PHASE];if(phaseMap){var listeners=phaseMap[target.base2ID];if(listeners)delete listeners[listener.base2ID]}}}},"@(element.addEventListener)":{"@Gecko":{addEventListener:function(target,type,listener,useCapture){if(type=="mousewheel"){type="DOMMouseScroll";var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(event){event=Event.cloneEvent(event);event.type="mousewheel";event.wheelDelta=(-event.detail*40)||0;_handleEvent(target,originalListener,event)}}this.base(target,type,listener,useCapture)}},"@webkit[1-4]|KHTML[34]":{addEventListener:function(target,type,listener,useCapture){if(_MOUSE_BUTTON.test(type)){var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(event){var button=_TYPE_MAP[event.button]||0;if(event.button!=button){event=Event.cloneEvent(event);event.button=button}_handleEvent(target,originalListener,event)}}else if(typeof listener=="object"){listener=_wrappedListeners[assignID(listener)]=bind("handleEvent",listener)}this.base(target,type,listener,useCapture)}},"@Linux|Mac|opera":{addEventListener:function(target,type,listener,useCapture){if(type=="keydown"){var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(keydownEvent){var firedCount=0,cancelled=false;extend(keydownEvent,"preventDefault",function(){this.base();cancelled=true});function handleEvent(event){if(cancelled)event.preventDefault();if(event==keydownEvent||firedCount>1){_handleEvent(target,originalListener,keydownEvent)}firedCount++};handleEvent(keydownEvent);target.addEventListener("keyup",function(){target.removeEventListener("keypress",handleEvent,true);target.removeEventListener("keyup",arguments.callee,true)},true);target.addEventListener("keypress",handleEvent,true)}}this.base(target,type,listener,useCapture)}},removeEventListener:function(target,type,listener,useCapture){this.base(target,type,_wrappedListeners[listener.base2ID]||listener,useCapture)}}});if(detect("Gecko")){EventTarget.removeEventListener._delegate="removeEventListener";delete EventTarget.prototype.removeEventListener}function _handleEvent(target,listener,event){if(typeof listener=="function"){listener.call(target,event)}else{listener.handleEvent(event)}};var DocumentEvent=Interface.extend({"@!(document.createEvent)":{createEvent:function(document,type){var event=document.createEventObject?document.createEventObject():{};event.bubbles=false;event.cancelable=false;event.eventPhase=0;event.target=document;event.currentTarget=null;event.relatedTarget=null;event.timeStamp=new Date().valueOf();return Event(event)}},"@(document.createEvent)":{"@!(document.createEvent('Events'))":{createEvent:function(document,type){return this.base(document,type=="Events"?"UIEvents":type)}}}});var DOMContentLoadedEvent=Base.extend({constructor:function(document){var fired=false;this.fire=function(){if(!fired){fired=true;setTimeout(function(){var event=DocumentEvent.createEvent(document,"Events");Event.initEvent(event,"DOMContentLoaded",true,false);EventTarget.dispatchEvent(document,event)},1)}};EventTarget.addEventListener(document,"DOMContentLoaded",function(){fired=true},false);this.listen(document)},listen:Undefined,"@!Gecko20([^0]|0[3-9])|Webkit[5-9]|Opera[19]|MSIE.+mac":{listen:function(document){EventTarget.addEventListener(Traversal.getDefaultView(document),"load",this.fire,false)},"@MSIE.+win":{listen:function(document){try{document.body.doScroll("left");if(!this.__constructing)this.fire()}catch(e){setTimeout(bind(this.listen,this,document),10)}}},"@KHTML":{listen:function(document){if(/loaded|complete/.test(document.readyState)){if(!this.__constructing)this.fire()}else{setTimeout(bind(this.listen,this,document),10)}}}}});Document.implement(DocumentEvent);Document.implement(EventTarget);Element.implement(EventTarget);var _PIXEL=/^\d+(px)?$/i,_METRICS=/(width|height|top|bottom|left|right|fontSize)$/,_COLOR=/^(color|backgroundColor)$/,_RGB_BLACK="rgb(0, 0, 0)",_BLACK={black:1,"#000":1,"#000000":1};var ViewCSS=Interface.extend({"@!(document.defaultView.getComputedStyle)":{"@MSIE":{getComputedStyle:function(view,element,pseudoElement){var currentStyle=element.currentStyle;var computedStyle={};for(var propertyName in currentStyle){if(_METRICS.test(propertyName)||_COLOR.test(propertyName)){computedStyle[propertyName]=this.getComputedPropertyValue(view,element,propertyName)}else if(propertyName.indexOf("ruby")!=0){computedStyle[propertyName]=currentStyle[propertyName]}}return computedStyle}}},getComputedStyle:function(view,element,pseudoElement){return _CSSStyleDeclaration_ReadOnly.bind(this.base(view,element,pseudoElement))}},{getComputedPropertyValue:function(view,element,propertyName){return CSSStyleDeclaration.getPropertyValue(this.getComputedStyle(view,element,null),propertyName)},"@MSIE":{getComputedPropertyValue:function(view,element,propertyName){propertyName=this.toCamelCase(propertyName);var value=element.currentStyle[propertyName];if(_METRICS.test(propertyName))return _MSIE_getPixelValue(element,value)+"px";if(!_MSIE5&&_COLOR.test(propertyName)){var rgb=_MSIE_getColorValue(element,propertyName=="color"?"ForeColor":"BackColor");return(rgb==_RGB_BLACK&&!_BLACK[value])?value:rgb}return value}},toCamelCase:function(string){return string.replace(/\-([a-z])/g,flip(String2.toUpperCase))}});function _MSIE_getPixelValue(element,value){if(_PIXEL.test(value))return parseInt(value);var styleLeft=element.style.left;var runtimeStyleLeft=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=styleLeft;element.runtimeStyle.left=runtimeStyleLeft;return value};function _MSIE_getColorValue(element,type){if(element.createTextRange){var range=element.createTextRange()}else{range=element.document.body.createTextRange();range.moveToElementText(element)}var color=range.queryCommandValue(type);return format("rgb(%1, %2, %3)",color&0xff,(color&0xff00)>>8,(color&0xff0000)>>16)};var _CSSStyleDeclaration_ReadOnly=Binding.extend({getPropertyValue:function(style,propertyName){return this.base(style,_CSSPropertyNameMap[propertyName]||propertyName)},"@MSIE.+win":{getPropertyValue:function(style,propertyName){return propertyName=="float"?style.styleFloat:style[ViewCSS.toCamelCase(propertyName)]}}});var CSSStyleDeclaration=_CSSStyleDeclaration_ReadOnly.extend({setProperty:function(style,propertyName,value,priority){return this.base(style,_CSSPropertyNameMap[propertyName]||propertyName,value,priority)},"@MSIE.+win":{setProperty:function(style,propertyName,value,priority){if(propertyName=="opacity"){value*=100;style.opacity=value;style.zoom=1;style.filter="Alpha(opacity="+value+")"}else{if(priority=="important"){style.cssText+=format(";%1:%2!important;",propertyName,value)}else{style.setAttribute(ViewCSS.toCamelCase(propertyName),value)}}}}},{"@MSIE":{bind:function(style){style.getPropertyValue=this.prototype.getPropertyValue;style.setProperty=this.prototype.setProperty;return style}}});var _CSSPropertyNameMap=new Base({"@Gecko":{opacity:"-moz-opacity"},"@KHTML":{opacity:"-khtml-opacity"}});with(CSSStyleDeclaration.prototype)getPropertyValue.toString=setProperty.toString=K("[base2]");AbstractView.implement(ViewCSS);var NodeSelector=Interface.extend({"@(element.querySelector)":{querySelector:function(node,selector){try{var element=this.base(node,trim(selector));if(element)return element}catch(x){}return new Selector(selector).exec(node,1)},querySelectorAll:function(node,selector){try{var nodeList=this.base(node,trim(selector));if(nodeList)return new StaticNodeList(nodeList)}catch(x){}return new Selector(selector).exec(node)}},"@!(element.querySelector)":{querySelector:function(node,selector){return new Selector(selector).exec(node,1)},querySelectorAll:function(node,selector){return new Selector(selector).exec(node)}}});extend(NodeSelector.prototype,{querySelector:function(selector){return DOM.bind(this.base(selector))},querySelectorAll:function(selector){return extend(this.base(selector),"item",function(index){return DOM.bind(this.base(index))})}});var DocumentSelector=NodeSelector.extend();var ElementSelector=NodeSelector.extend({"@!(element.matchesSelector)":{matchesSelector:function(element,selector){return new Selector(selector).test(element)}}});var _CSS_ESCAPE=/'(\\.|[^'\\])*'|"(\\.|[^"\\])*"/g,_CSS_IMPLIED_ASTERISK=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,_CSS_IMPLIED_SPACE=/(^|,)([^\s>+~])/g,_CSS_WHITESPACE=/\s*([\s>+~,]|^|$)\s*/g,_CSS_WILD_CARD=/\s\*\s/g,_CSS_UNESCAPE=/\x01(\d+)/g,_QUOTE=/'/g;var CSSParser=RegGrp.extend({constructor:function(items){this.base(items);this.cache={};this.sorter=new RegGrp;this.sorter.add(/:not\([^)]*\)/,RegGrp.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},cache:null,ignoreCase:true,escape:function(selector,simple){var strings=this._strings=[];selector=this.optimise(this.format(String(selector).replace(_CSS_ESCAPE,function(string){return"\x01"+strings.push(string.slice(1,-1).replace(_QUOTE,"\\'"))})));if(simple)selector=selector.replace(/(^|,) \*?/g,"$1");return selector},format:function(selector){return selector.replace(_CSS_WHITESPACE,"$1").replace(_CSS_IMPLIED_SPACE,"$1 $2").replace(_CSS_IMPLIED_ASTERISK,"$1*$2")},optimise:function(selector){return this.sorter.exec(selector.replace(_CSS_WILD_CARD,">* "))},parse:function(selector,simple){return this.cache[selector]||(this.cache[selector]=this.unescape(this.exec(this.escape(selector,simple))))},unescape:function(selector){var strings=this._strings;return selector.replace(_CSS_UNESCAPE,function(match,index){return strings[index-1]})}});function _nthChild(match,args,position,last,not,and,mod,equals){last=/last/i.test(match)?last+"+1-":"";if(!isNaN(args))args="0n+"+args;else if(args=="even")args="2n";else if(args=="odd")args="2n+1";args=args.split("n");var a=args[0]?(args[0]=="-")?-1:parseInt(args[0]):1;var b=parseInt(args[1])||0;var negate=a<0;if(negate){a=-a;if(a==1)b++}var query=format(a==0?"%3%7"+(last+b):"(%4%3-%2)%6%1%70%5%4%3>=%2",a,b,position,last,and,mod,equals);if(negate)query=not+"("+query+")";return query};var XPathParser=CSSParser.extend({constructor:function(){this.base(XPathParser.build());this.sorter.putAt(1,"$1$4$3$6")},escape:function(selector,simple){return this.base(selector,simple).replace(/,/g,"\x02")},unescape:function(selector){return this.base(selector.replace(/\[self::\*\]/g,"").replace(/(^|\x02)\//g,"$1./").replace(/\x02/g," | ")).replace(/'[^'\\]*\\'(\\.|[^'\\])*'/g,function(match){return"concat("+match.split("\\'").join("',\"'\",'")+")"})},"@opera(7|8|9\\.[1-4])":{unescape:function(selector){return this.base(selector.replace(/last\(\)/g,"count(preceding-sibling::*)+count(following-sibling::*)+1"))}}},{build:function(){this.values.attributes[""]="[@$1]";forEach(this.types,function(add,type){forEach(this.values[type],add,this.rules)},this);this.build=K(this.rules);return this.rules},optimised:{pseudoClasses:{"first-child":"[1]","last-child":"[last()]","only-child":"[last()=1]"}},rules:extend({},{"@!KHTML|opera":{"(^|\\x02) (\\*|[\\w-]+)#([\\w-]+)":"$1id('$3')[self::$2]"},"@!KHTML":{"([ >])(\\*|[\\w-]+):([\\w-]+-child(\\(([^)]+)\\))?)":function(match,token,tagName,pseudoClass,$4,args){var replacement=(token==" ")?"//*":"/*";if(/^nth/i.test(pseudoClass)){replacement+=_xpath_nthChild(pseudoClass,args,"position()")}else{replacement+=XPathParser.optimised.pseudoClasses[pseudoClass]}return replacement+"[self::"+tagName+"]"}}}),types:{identifiers:function(replacement,token){this[rescape(token)+"([\\w-]+)"]=replacement},combinators:function(replacement,combinator){this[rescape(combinator)+"(\\*|[\\w-]+)"]=replacement},attributes:function(replacement,operator){this["\\[\\s*([\\w-]+)\\s*"+rescape(operator)+"\\s*([^\\]\\s]*)\\s*\\]"]=replacement},pseudoClasses:function(replacement,pseudoClass){this[":"+pseudoClass.replace(/\(\)$/,"\\(([^)]+)\\)")]=replacement}},values:{identifiers:{"#":"[@id='$1'][1]",".":"[contains(concat(' ',@class,' '),' $1 ')]"},combinators:{" ":"/descendant::$1",">":"/child::$1","+":"/following-sibling::*[1][self::$1]","~":"/following-sibling::$1"},attributes:{"*=":"[contains(@$1,'$2')]","^=":"[starts-with(@$1,'$2')]","$=":"[substring(@$1,string-length(@$1)-string-length('$2')+1)='$2']","~=":"[contains(concat(' ',@$1,' '),' $2 ')]","|=":"[contains(concat('-',@$1,'-'),'-$2-')]","!=":"[not(@$1='$2')]","=":"[@$1='$2']"},pseudoClasses:{"link":"[false]","visited":"[false]","empty":"[not(child::*) and not(text())]","first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","not()":_xpath_not,"nth-child()":_xpath_nthChild,"nth-last-child()":_xpath_nthChild,"only-child":"[not(preceding-sibling::*) and not(following-sibling::*)]","root":"[not(parent::*)]"}},"@opera(7|8|9\\.[1-4])":{build:function(){this.optimised.pseudoClasses["last-child"]=this.values.pseudoClasses["last-child"];this.optimised.pseudoClasses["only-child"]=this.values.pseudoClasses["only-child"];return this.base()}}});var _notParser;function _xpath_not(match,args){if(!_notParser)_notParser=new XPathParser;return"[not("+_notParser.exec(trim(args)).replace(/\[1\]/g,"").replace(/^(\*|[\w-]+)/,"[self::$1]").replace(/\]\[/g," and ").slice(1,-1)+")]"};function _xpath_nthChild(match,args,position){return"["+_nthChild(match,args,position||"count(preceding-sibling::*)+1","last()","not"," and "," mod ","=")+"]"};var Selector=Base.extend({constructor:function(selector){this.toString=K(trim(selector))},exec:function(context,count,simple){return Selector.parse(this,simple)(context,count)},isSimple:function(){if(!_parser.exec)_parser=new CSSParser(_parser);return!_COMBINATOR.test(trim(_parser.escape(this)))},test:function(element){if(this.isSimple()){return!!Selector.parse(this,true)(element,1)}else{element.setAttribute("b2-test",true);var result=new Selector(this+"[b2-test]").exec(Traversal.getOwnerDocument(element),1);element.removeAttribute("b2-test");return result==element}},toXPath:function(simple){return Selector.toXPath(this,simple)},"@(XPathResult)":{exec:function(context,count,simple){if(_NOT_XPATH.test(this)){return this.base(context,count,simple)}var document=Traversal.getDocument(context);var type=count==1?9:7;var result=document.evaluate(this.toXPath(simple),context,null,type,null);return count==1?result.singleNodeValue:result}},"@MSIE":{exec:function(context,count,simple){if(typeof context.selectNodes!="undefined"&&!_NOT_XPATH.test(this)){var method=single?"selectSingleNode":"selectNodes";return context[method](this.toXPath(simple))}return this.base(context,count,simple)}},"@(true)":{exec:function(context,count,simple){try{var result=this.base(context||document,count,simple)}catch(error){throw new SyntaxError(format("'%1' is not a valid CSS selector.",this));}return count==1?result:new StaticNodeList(result)}}},{toXPath:function(selector,simple){if(!_xpathParser)_xpathParser=new XPathParser;return _xpathParser.parse(selector,simple)}});var _COMBINATOR=/[^,]\s|[+>~]/;var _NOT_XPATH=":(checked|disabled|enabled|contains|hover|active|focus)|^(#[\\w-]+\\s*)?\\w+$";if(detect("KHTML")){if(detect("WebKit5")){_NOT_XPATH+="|nth\\-|,"}else{_NOT_XPATH="."}}_NOT_XPATH=new RegExp(_NOT_XPATH);Selector.operators={"=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};Selector.operators[""]="%1!=null";Selector.pseudoClasses={"checked":"e%1.checked","contains":"e%1[TEXT].indexOf('%2')!=-1","disabled":"e%1.disabled","empty":"Traversal.isEmpty(e%1)","enabled":"e%1.disabled===false","first-child":"!Traversal.getPreviousElementSibling(e%1)","last-child":"!Traversal.getNextElementSibling(e%1)","only-child":"!Traversal.getPreviousElementSibling(e%1)&&!Traversal.getNextElementSibling(e%1)","root":"e%1==Traversal.getDocument(e%1).documentElement","target":"e%1.id&&e%1.id==location.hash.slice(1)","hover":"DocumentState.getInstance(d).isHover(e%1)","active":"DocumentState.getInstance(d).isActive(e%1)","focus":"DocumentState.getInstance(d).hasFocus(e%1)","link":"false","visited":"false"};var _INDEXED=document.documentElement.sourceIndex!==undefined,_VAR="var p%2=0,i%2,e%3,n%2=e%1.",_ID=_INDEXED?"e%1.sourceIndex":"assignID(e%1)",_TEST="var g="+_ID+";if(!p[g]){p[g]=1;",_STORE="r[k++]=e%1;if(s==1)return e%1;if(k===s){_query.state=[%2];_query.complete=%3;return r;",_FN="var _query=function(e0,s%1){_indexed++;var r=[],p={},p0=0,reg=[%4],d=Traversal.getDocument(e0),c=d.writeln?'toUpperCase':'toString',k=0;";var _xpathParser;var _reg,_index,_wild,_list,_group,_listAll,_duplicate,_cache={},_simple={};function sum(list){var total=0;for(var i=0;i<list.length;i++){total+=list[i]}return total};var _parser={"^(\\*|[\\w-]+)":function(match,tagName){return tagName=="*"?"":format("if(e0.nodeName=='%1'[c]()){",tagName)},"^ \\*:root":function(match){_wild=false;var replacement="e%2=d.documentElement;if(Traversal.contains(e%1,e%2)){";return format(replacement,_index++,_index)}," (\\*|[\\w-]+)#([\\w-]+)":function(match,tagName,id){_wild=false;var replacement="var e%2=_byId(d,'%4');if(e%2&&";if(tagName!="*")replacement+="e%2.nodeName=='%3'[c]()&&";replacement+="Traversal.contains(e%1,e%2)){";if(_list[_group])replacement+=format("i%1=n%1.length;",sum(_list));return format(replacement,_index++,_index,tagName,id)}," (\\*|[\\w-]+)":function(match,tagName){_duplicate++;_wild=tagName=="*";var replacement=format(_VAR,_index++,"%2",_index);replacement+=(_wild&&_MSIE5)?"all":"getElementsByTagName('%3')";replacement+=";for(i%2=a%2||0;(e%1=n%2[i%2]);i%2++){";_list[_group]++;return format(replacement,_index,sum(_list),tagName)},">(\\*|[\\w-]+)":function(match,tagName){var children=_MSIE&&_index;_wild=tagName=="*";var replacement=_VAR+(children?"children":"childNodes");replacement=format(replacement,_index++,"%2",_index);if(!_wild&&_MSIE&&children)replacement+=".tags('%3')";replacement+=";for(i%2=a%2||0;(e%1=n%2[i%2]);i%2++){";if(_wild){replacement+="if(e%1.nodeType==1){";_wild=_MSIE5}else{if(!_MSIE||!children)replacement+="if(e%1.nodeName=='%3'[c]()){"}_list[_group]++;return format(replacement,_index,sum(_list),tagName)},"\\+(\\*|[\\w-]+)":function(match,tagName){var replacement="";if(_wild&&_MSIE)replacement+="if(e%1.nodeName!='!'){";_wild=false;replacement+="e%1=Traversal.getNextElementSibling(e%1);if(e%1";if(tagName!="*")replacement+="&&e%1.nodeName=='%2'[c]()";replacement+="){";return format(replacement,_index,tagName)},"~(\\*|[\\w-]+)":function(match,tagName){var replacement="";if(_wild&&_MSIE)replacement+="if(e%1.nodeName!='!'){";_wild=false;_duplicate=2;replacement+="while(e%1=e%1.nextSibling){if(e%1.b2_adjacent==_indexed)break;if(";if(tagName=="*"){replacement+="e%1.nodeType==1";if(_MSIE5)replacement+="&&e%1.nodeName!='!'"}else replacement+="e%1.nodeName=='%2'[c]()";replacement+="){e%1.b2_adjacent=_indexed;";return format(replacement,_index,tagName)},"#([\\w-]+)":function(match,id){_wild=false;var replacement="if(e%1.id=='%2'){";if(_list[_group])replacement+=format("i%1=n%1.length;",sum(_list));return format(replacement,_index,id)},"\\.([\\w-]+)":function(match,className){_wild=false;_reg.push(new RegExp("(^|\\s)"+rescape(className)+"(\\s|$)"));return format("if(e%1.className&&reg[%2].test(e%1.className)){",_index,_reg.length-1)},":not\\((\\*|[\\w-]+)?([^)]*)\\)":function(match,tagName,filters){var replacement=(tagName&&tagName!="*")?format("if(e%1.nodeName=='%2'[c]()){",_index,tagName):"";replacement+=_parser.exec(filters);return"if(!"+replacement.slice(2,-1).replace(/\)\{if\(/g,"&&")+"){"},":nth(-last)?-child\\(([^)]+)\\)":function(match,last,args){_wild=false;last=format("e%1.parentNode.b2_length",_index);var replacement="if(p%1!==e%1.parentNode)p%1=_register(e%1.parentNode);";replacement+="var i=e%1[p%1.b2_lookup];if(p%1.b2_lookup!='b2_index')i++;if(";return format(replacement,_index)+_nthChild(match,args,"i",last,"!","&&","% ","==")+"){"},":([\\w-]+)(\\(([^)]+)\\))?":function(match,pseudoClass,$2,args){return"if("+format(Selector.pseudoClasses[pseudoClass]||"throw",_index,args||"")+"){"},"\\[\\s*([\\w-]+)\\s*([^=]?=)?\\s*([^\\]\\s]*)\\s*\\]":function(match,attr,operator,value){value=trim(value);if(_MSIE){var getAttribute="Element.getAttribute(e%1,'%2')"}else{getAttribute="e%1.getAttribute('%2')"}getAttribute=format(getAttribute,_index,attr);var replacement=Selector.operators[operator||""];if(instanceOf(replacement,RegExp)){_reg.push(new RegExp(format(replacement.source,rescape(_parser.unescape(value)))));replacement="reg[%2].test(%1)";value=_reg.length-1}return"if("+format(replacement,getAttribute,value)+"){"}};(function(_no_shrink_){var _byId=detect("MSIE[5-7]")?function(document,id){var result=document.all[id]||null;if(!result||result.id==id)return result;for(var i=0;i<result.length;i++){if(result[i].id==id)return result[i]}return null}:function(document,id){return document.getElementById(id)};var _indexed=1;function _register(element){if(element.rows){element.b2_length=element.rows.length;element.b2_lookup="rowIndex"}else if(element.cells){element.b2_length=element.cells.length;element.b2_lookup="cellIndex"}else if(element.b2_indexed!=_indexed){var index=0;var child=element.firstChild;while(child){if(child.nodeType==1&&child.nodeName!="!"){child.b2_index=++index}child=child.nextSibling}element.b2_length=index;element.b2_lookup="b2_index"}element.b2_indexed=_indexed;return element};Selector.parse=function(selector,simple){var cache=simple?_simple:_cache;if(!cache[selector]){if(!_parser.exec)_parser=new CSSParser(_parser);_reg=[];_list=[];var fn="";var selectors=_parser.escape(selector,simple).split(",");for(_group=0;_group<selectors.length;_group++){_wild=_index=_list[_group]=0;_duplicate=selectors.length>1?2:0;var block=_parser.exec(selectors[_group])||"throw;";if(_wild&&_MSIE){block+=format("if(e%1.tagName!='!'){",_index)}var store=(_duplicate>1)?_TEST:"";block+=format(store+_STORE,_index,"%2");block+=Array(match(block,/\{/g).length+1).join("}");fn+=block}fn=_parser.unescape(fn);if(selectors.length>1)fn+="r.unsorted=1;";var args="";var state=[];var total=sum(_list);for(var i=1;i<=total;i++){args+=",a"+i;state.push("i"+i+"?(i"+i+"-1):0")}if(total){var complete=[],k=0;for(var i=0;i<_group;i++){k+=_list[i];if(_list[i])complete.push(format("n%1&&i%1==n%1.length",k))}}fn+="_query.state=[%2];_query.complete=%3;return s==1?null:r}";eval(format(_FN+fn,args,state.join(","),total?complete.join("&&"):true,_reg));cache[selector]=_query}return cache[selector]}})();var StaticNodeList=Base.extend({constructor:function(nodes){nodes=nodes||[];this.length=nodes.length;this.item=function(index){if(index<0)index+=this.length;return nodes[index]};if(nodes.unsorted)nodes.sort(_SORTER)},length:0,forEach:function(block,context){for(var i=0;i<this.length;i++){block.call(context,this.item(i),i,this)}},item:Undefined,not:function(test,context){return this.filter(not(test),context)},slice:function(start,end){return new StaticNodeList(this.map(I).slice(start,end))},"@(XPathResult)":{constructor:function(nodes){if(nodes&&nodes.snapshotItem){this.length=nodes.snapshotLength;this.item=function(index){if(index<0)index+=this.length;return nodes.snapshotItem(index)}}else this.base(nodes)}}});StaticNodeList.implement(Enumerable);var _matchesSelector=function(test,context){if(typeof test!="function"){test=bind("test",new Selector(test))}return this.base(test,context)};StaticNodeList.implement({every:_matchesSelector,filter:_matchesSelector,not:_matchesSelector,some:_matchesSelector});StaticNodeList.implement({filter:function(test,context){return new StaticNodeList(this.base(test,context))}});var _SORTER=_INDEXED?function(node1,node2){return node1.sourceIndex-node2.sourceIndex}:function(node1,node2){return(Node.compareDocumentPosition(node1,node2)&2)-1};Document.implement(DocumentSelector);Element.implement(ElementSelector);var HTMLDocument=Document.extend(null,{bind:function(document){DocumentState.createState(document);return this.base(document)}});var HTMLElement=Element.extend(null,{bindings:{},tags:"*",bind:function(element){if(!element.classList){element.classList=new _ElementClassList(element)}if(!element.ownerDocument){element.ownerDocument=Traversal.getOwnerDocument(element)}return this.base(element)},extend:function(){var binding=base(this,arguments);forEach.csv(binding.tags,function(tagName){HTMLElement.bindings[tagName]=binding});return binding}});HTMLElement.extend(null,{tags:"APPLET,EMBED",bind:I});var ClassList=Module.extend({add:function(element,token){if(!this.has(element,token)){element.className+=(element.className?" ":"")+token}},has:function(element,token){var regexp=new RegExp("(^|\\s)"+token+"(\\s|$)");return regexp.test(element.className)},remove:function(element,token){var regexp=new RegExp("(^|\\s)"+token+"(\\s|$)","g");element.className=trim(element.className.replace(regexp,"$2"))},toggle:function(element,token){this[this.has(element,token)?"remove":"add"](element,token)}});function _ElementClassList(element){this.add=function(token){ClassList.add(element,token)};this.has=function(token){return ClassList.has(element,token)};this.remove=function(token){ClassList.remove(element,token)}};_ElementClassList.prototype.toggle=function(token){this[this.has(token)?"remove":"add"](token)};var DocumentState=Base.extend({constructor:function(document){this.document=document;this.events={};this._hoverElement=document.documentElement;this.isBound=function(){return!!DOM.bind[document.base2ID]};forEach(this,function(method,name,documentState){if(/^on((DOM)?\w+|[a-z]+)$/.test(name)){documentState.registerEvent(name.slice(2))}})},includes:function(element,target){return target&&(element==target||Traversal.contains(element,target))},hasFocus:function(element){return element==this._focusElement},isActive:function(element){return this.includes(element,this._activeElement)},isHover:function(element){return this.includes(element,this._hoverElement)},handleEvent:function(event){return this["on"+event.type](event)},onblur:function(event){delete this._focusElement},onmouseover:function(event){this._hoverElement=event.target},onmouseout:function(event){delete this._hoverElement},onmousedown:function(event){this._activeElement=event.target},onfocus:function(event){this._focusElement=event.target},onmouseup:function(event){delete this._activeElement},registerEvent:function(type){this.document.addEventListener(type,this,true);this.events[type]=true},"@(document.activeElement===undefined)":{constructor:function(document){this.base(document);if(this.isBound()){document.activeElement=document.body}},onfocus:function(event){this.base(event);if(this.isBound()){this.document.activeElement=this._focusElement}},onblur:function(event){this.base(event);if(this.isBound()){this.document.activeElement=this.document.body}}},"@!(element.addEventListener)":{constructor:function(document){this.base(document);var dispatcher=new EventDispatcher(this);this._dispatch=function(event){event.target=event.target||event.srcElement||document;dispatcher.handleEvent(event)};this.handleEvent=function(event){if(this["on"+event.type]){this["on"+event.type](event)}return dispatcher.handleEvent(event)}},registerEvent:function(type,target){var events=this.events[type];var canDelegate=_CAN_DELEGATE.test(type);if(!events||!canDelegate){if(!events)events=this.events[type]={};if(canDelegate||!target)target=this.document;var state=this;target["on"+type]=function(event){if(!event){event=Traversal.getDefaultView(this).event}if(event)state.handleEvent(event)}}return events},"@MSIE.+win":{constructor:function(document){this.base(document);var forms={};this._registerForm=function(form){var formID=assignID(form);if(!forms[formID]){forms[formID]=true;form.attachEvent("onsubmit",this._dispatch);form.attachEvent("onreset",this._dispatch)}}},fireEvent:function(type,event){event=copy(event);event.type=type;this.handleEvent(event)},registerEvent:function(type,target){var events=this.events[type];var canDelegate=_CAN_DELEGATE.test(type);if(!events||!canDelegate){if(!events)events=this.events[type]={};if(canDelegate||!target)target=this.document;var state=this;target.attachEvent("on"+type,function(event){event.target=event.srcElement||state.document;state.handleEvent(event);if(state["after"+type]){state["after"+type](event)}})}return events},onDOMContentLoaded:function(event){forEach(event.target.forms,this._registerForm,this);this.setFocus(this.document.activeElement)},onmousedown:function(event){this.base(event);this._button=event.button},onmouseup:function(event){this.base(event);if(this._button==null){this.fireEvent("mousedown",event)}delete this._button},aftermouseup:function(){if(this._selectEvent){this._dispatch(this._selectEvent);delete this._selectEvent}},onfocusin:function(event){this.setFocus(event.target);this.onfocus(event)},setFocus:function(target){var change=this.events.change,select=this.events.select;if(change||select){var dispatch=this._dispatch;if(change)target.attachEvent("onchange",dispatch);if(select){var state=this;var onselect=function(event){if(state._activeElement==target){state._selectEvent=copy(event)}else{dispatch(event)}};target.attachEvent("onselect",onselect)}target.attachEvent("onblur",function(){target.detachEvent("onblur",arguments.callee);if(change)target.detachEvent("onchange",dispatch);if(select)target.detachEvent("onselect",onselect)})}},onfocusout:function(event){this.onblur(event)},onclick:function(event){var target=event.target;if(target.form)this._registerForm(target.form)},ondblclick:function(event){this.fireEvent("click",event)}}}},{init:function(){assignID(document);DocumentState=this;this.createState(document);new DOMContentLoadedEvent(document)},createState:function(document){var base2ID=document.base2ID;if(!this[base2ID]){this[base2ID]=new this(document)}return this[base2ID]},getInstance:function(target){return this[Traversal.getDocument(target).base2ID]}});eval(this.exports)};new function(_no_shrink_){var JSON=new base2.Package(this,{name:"JSON",imports:"Enumerable",version:"0.9",VALID:/^("(\\.|[^"\\\n\r])*"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])*$/,copy:function(object){return this.parse(this.toString(object))},parse:function(string){return this.String.parseJSON(string)}});eval(this.imports);JSON.toString=function(object){if(arguments.length==0)return"[base2.JSON]";var module=this.Object;try{forEach(this,function(property,name){if(JSON.Object.ancestorOf(property)&&instanceOf(object,global[name])){module=property;throw StopIteration;}})}catch(error){if(error!=StopIteration)throw error;}return module.toJSONString(object)};JSON.Object=Module.extend({toJSONString:function(object){return object==null?"null":"{"+reduce(object,function(properties,property,name){if(JSON.Object.isValid(property)){properties.push(JSON.String.toJSONString(name)+":"+JSON.toString(property))}return properties},[]).join(",")+"}"}},{VALID_TYPE:/^(object|boolean|number|string)$/,isValid:function(object){return this.VALID_TYPE.test(typeof object)}});JSON.Array=JSON.Object.extend({toJSONString:function(array){return"["+reduce(array,function(items,item){if(JSON.Object.isValid(item)){items.push(JSON.toString(item))}return items},[]).join(",")+"]"}});JSON.Boolean=JSON.Object.extend({toJSONString:function(bool){return String(bool)}});JSON.Date=JSON.Object.extend({toJSONString:function(date){var pad=function(n){return n<10?"0"+n:n};return'"'+date.getUTCFullYear()+"-"+pad(date.getUTCMonth()+1)+"-"+pad(date.getUTCDate())+"T"+pad(date.getUTCHours())+":"+pad(date.getUTCMinutes())+":"+pad(date.getUTCSeconds())+'Z"'}});JSON.Number=JSON.Object.extend({toJSONString:function(number){return isFinite(number)?String(number):"null"}});JSON.String=JSON.Object.extend({parseJSON:function(string){try{if(JSON.VALID.test(string)){return new Function("return "+string)()}}catch(error){throw new SyntaxError("parseJSON");}return""},toJSONString:function(string){return'"'+this.ESCAPE.exec(string)+'"'}},{ESCAPE:new RegGrp({'\b':'\\b','\\t':'\\t','\\n':'\\n','\\f':'\\f','\\r':'\\r','"':'\\"','\\\\':'\\\\','[\\x00-\\x1f]':function(chr){var charCode=chr.charCodeAt(0);return'\\u00'+Math.floor(charCode/16).toString(16)+(charCode%16).toString(16)}})});eval(this.exports)};function Animator(options){this.setOptions(options);var self=this;this.timerDelegate=function(){self.onTimerEvent()};this.subjects=[];this.target=0;this.state=0;this.lastTime=null}function DiscreteStyleSubject(els,property,from,to,threshold){this.els=Animator.makeArray(els);this.property=property;this.from=from;this.to=to;this.threshold=threshold||0.5}DiscreteStyleSubject.prototype={setState:function(state){for(var i=0;i<this.els.length;i++){this.els[i].style.setProperty(this.property,state<=this.threshold?this.from:this.to)}},inspect:function(){return"\t"+this.property+"("+this.from+" to "+this.to+" @ "+this.threshold+")\n"}};function NumericalStyleSubject(els,property,from,to,units){this.els=Animator.makeArray(els);this.property=property;this.from=parseFloat(from);this.to=parseFloat(to);this.units=units!==null?units:'px'}NumericalStyleSubject.prototype={setState:function(state){var style=this.getStyle(state);var j=0;for(var i=0;i<this.els.length;i++){try{this.els[i].style.setProperty(this.property,style,'')}catch(e){if(this.property!=='fontWeight'){throw e;}}if(j++>20){return}}},getStyle:function(state){state=this.from+((this.to-this.from)*state);if(this.property==='opacity'){return state}return Math.round(state)+this.units},inspect:function(){return"\t"+this.property+"("+this.from+this.units+" to "+this.to+this.units+")\n"}};function ColorStyleSubject(els,property,from,to){this.els=Animator.makeArray(els);this.property=property;this.to=this.expandColor(to);this.from=this.expandColor(from);this.origFrom=from;this.origTo=to}ColorStyleSubject.prototype={expandColor:function(color){var hexColor,red,green,blue;hexColor=ColorStyleSubject.parseColor(color);if(hexColor){red=parseInt(hexColor.slice(1,3),16);green=parseInt(hexColor.slice(3,5),16);blue=parseInt(hexColor.slice(5,7),16);return[red,green,blue]}if(window.DEBUG){alert("Invalid colour: '"+color+"'")}},getValueForState:function(color,state){return Math.round(this.from[color]+((this.to[color]-this.from[color])*state))},setState:function(state){var color='#'+ColorStyleSubject.toColorPart(this.getValueForState(0,state))+ColorStyleSubject.toColorPart(this.getValueForState(1,state))+ColorStyleSubject.toColorPart(this.getValueForState(2,state));for(var i=0;i<this.els.length;i++){this.els[i].style.setProperty(this.property,color,'')}},inspect:function(){return"\t"+this.property+"("+this.origFrom+" to "+this.origTo+")\n"}};ColorStyleSubject.parseColor=function(string){var color='#',i,match=ColorStyleSubject.parseColor.rgbRe.exec(string);if(match){var part;for(i=1;i<=3;i++){part=Math.max(0,Math.min(255,parseInt(match[i],10)));color+=ColorStyleSubject.toColorPart(part)}return color}match=ColorStyleSubject.parseColor.hexRe.exec(string);if(match){if(match[1].length===3){for(i=0;i<3;i++){color+=match[1].charAt(i)+match[1].charAt(i)}return color}return'#'+match[1]}return false};ColorStyleSubject.toColorPart=function(number){if(number>255){number=255}var digits=number.toString(16);if(number<16){return'0'+digits}return digits};ColorStyleSubject.parseColor.rgbRe=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;ColorStyleSubject.parseColor.hexRe=/^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function CSSStyleSubject(els,style1,style2){els=Animator.makeArray(els);this.subjects=[];if(els.length===0){return}var prop,toStyle,fromStyle;if(style2){fromStyle=this.parseStyle(style1,els[0]);toStyle=this.parseStyle(style2,els[0])}else{toStyle=this.parseStyle(style1,els[0]);fromStyle={};base2.lang.forEach(toStyle,function(prop){fromStyle[prop]=CSSStyleSubject.getStyle(els[0],prop)})}for(prop in fromStyle){if(fromStyle[prop]===toStyle[prop]){delete fromStyle[prop];delete toStyle[prop]}}var units,match,Type,from,to,self=this;base2.lang.forEach(fromStyle,function(value,prop){var fromProp=String(value);var toProp=String(toStyle[prop]);if(toStyle[prop]===null){if(window.DEBUG){alert("No to style provided for '"+prop+'"')}return}from=ColorStyleSubject.parseColor(fromProp);if(from){to=ColorStyleSubject.parseColor(toProp);Type=ColorStyleSubject}else if(fromProp.match(CSSStyleSubject.numericalRe)&&toProp.match(CSSStyleSubject.numericalRe)){from=parseFloat(fromProp);to=parseFloat(toProp);Type=NumericalStyleSubject;match=CSSStyleSubject.numericalRe.exec(fromProp);var reResult=CSSStyleSubject.numericalRe.exec(toProp);if(match[1]!==null){units=match[1]}else if(reResult[1]!==null){units=reResult[1]}else{units=reResult}}else if(fromProp.match(CSSStyleSubject.discreteRe)&&toProp.match(CSSStyleSubject.discreteRe)){from=fromProp;to=toProp;Type=DiscreteStyleSubject;units=0}else{if(window.DEBUG){alert("Unrecognised format for value of "+prop+": '"+value+"'")}return}self.subjects[self.subjects.length]=new Type(els,prop,from,to,units)})}CSSStyleSubject.prototype={parseStyle:function(style,el){var rtn={},i;if(style.indexOf(":")!==-1){var styles=style.split(";");for(i=0;i<styles.length;i++){var parts=CSSStyleSubject.ruleRe.exec(styles[i]);if(parts){rtn[parts[1]]=parts[2]}}}else{var prop,value,oldClass;oldClass=el.className;el.className=style;for(i=0;i<CSSStyleSubject.cssProperties.length;i++){prop=CSSStyleSubject.cssProperties[i];value=CSSStyleSubject.getStyle(el,prop);if(value!==null){rtn[prop]=value}}el.className=oldClass}return rtn},setState:function(state){for(var i=0;i<this.subjects.length;i++){this.subjects[i].setState(state)}},inspect:function(){var str="";for(var i=0;i<this.subjects.length;i++){str+=this.subjects[i].inspect()}return str}};CSSStyleSubject.getStyle=function(el,property){return document.defaultView.getComputedStyle(el,"").getPropertyValue(property)};CSSStyleSubject.ruleRe=/^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;CSSStyleSubject.numericalRe=/^-?\d+(?:\.\d+)?(%|[a-zA-Z]{2})?$/;CSSStyleSubject.discreteRe=/^\w+$/;CSSStyleSubject.cssProperties=['azimuth','background','background-attachment','background-color','background-image','background-position','background-repeat','border-collapse','border-color','border-spacing','border-style','border-top','border-top-color','border-right-color','border-bottom-color','border-left-color','border-top-style','border-right-style','border-bottom-style','border-left-style','border-top-width','border-right-width','border-bottom-width','border-left-width','border-width','bottom','clear','clip','color','content','cursor','direction','display','elevation','empty-cells','css-float','font','font-family','font-size','font-size-adjust','font-stretch','font-style','font-variant','font-weight','height','left','letter-spacing','line-height','list-style','list-style-image','list-style-position','list-style-type','margin','margin-top','margin-right','margin-bottom','margin-left','max-height','max-width','min-height','min-width','orphans','outline','outline-color','outline-style','outline-width','overflow','padding','padding-top','padding-right','padding-bottom','padding-left','pause','position','right','size','table-layout','text-align','text-decoration','text-indent','text-shadow','text-transform','top','vertical-align','visibility','white-space','width','word-spacing','z-index','opacity','outline-offset','overflow-x','overflow-y'];Animator.prototype={setOptions:function(options){this.options=Animator.applyDefaults({interval:20,duration:400,onComplete:function(){},onStep:function(){},transition:Animator.tx.easeInOut},options)},seekTo:function(to){this.seekFromTo(this.state,to)},seekFromTo:function(from,to){this.target=Math.max(0,Math.min(1,to));this.state=Math.max(0,Math.min(1,from));this.lastTime=new Date().getTime();if(!this.intervalId){this.intervalId=window.setInterval(this.timerDelegate,this.options.interval)}},jumpTo:function(to){this.target=this.state=Math.max(0,Math.min(1,to));this.propagate()},toggle:function(){this.seekTo(1-this.target)},addSubject:function(subject){this.subjects[this.subjects.length]=subject;return this},clearSubjects:function(){this.subjects=[]},propagate:function(){var value=this.options.transition(this.state);for(var i=0;i<this.subjects.length;i++){if(this.subjects[i].setState){this.subjects[i].setState(value)}else{this.subjects[i](value)}}},onTimerEvent:function(){var now=new Date().getTime();var timePassed=now-this.lastTime;this.lastTime=now;var movement=(timePassed/this.options.duration)*(this.state<this.target?1:-1);if(Math.abs(movement)>=Math.abs(this.state-this.target)){this.state=this.target}else{this.state+=movement}try{this.propagate()}finally{this.options.onStep.call(this);if(this.target===this.state){window.clearInterval(this.intervalId);this.intervalId=null;this.options.onComplete.call(this)}}},play:function(){this.seekFromTo(0,1)},reverse:function(){this.seekFromTo(1,0)},inspect:function(){var str="#<Animator:\n";for(var i=0;i<this.subjects.length;i++){str+=this.subjects[i].inspect()}str+=">";return str}};Animator.applyDefaults=function(defaults,prefs){prefs=prefs||{};var prop,result={};for(prop in defaults){if(prefs[prop]===undefined){result[prop]=defaults[prop]}else{result[prop]=prefs[prop]}}return result};Animator.makeArray=function(o){if(o===null){return[]}if(!o.length){return[o]}var result=[];for(var i=0;i<o.length;i++){result[i]=o[i]}return result};Animator.apply=function(el,style,options){if(style instanceof Array){return new Animator(options).addSubject(new CSSStyleSubject(el,style[0],style[1]))}return new Animator(options).addSubject(new CSSStyleSubject(el,style))};Animator.makeEaseIn=function(a){return function(state){return Math.pow(state,a*2)}};Animator.makeEaseOut=function(a){return function(state){return 1-Math.pow(1-state,a*2)}};Animator.makeElastic=function(bounces){return function(state){state=Animator.tx.easeInOut(state);return((1-Math.cos(state*Math.PI*bounces))*(1-state))+state}};Animator.makeADSR=function(attackEnd,decayEnd,sustainEnd,sustainLevel){if(sustainLevel===null){sustainLevel=0.5}return function(state){if(state<attackEnd){return state/attackEnd}if(state<decayEnd){return 1-((state-attackEnd)/(decayEnd-attackEnd)*(1-sustainLevel))}if(state<sustainEnd){return sustainLevel}return sustainLevel*(1-((state-sustainEnd)/(1-sustainEnd)))}};Animator.makeBounce=function(bounces){var fn=Animator.makeElastic(bounces);return function(state){state=fn(state);return state<=1?state:2-state}};Animator.tx={easeInOut:function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5)},linear:function(x){return x},easeIn:Animator.makeEaseIn(1.5),easeOut:Animator.makeEaseOut(1.5),strongEaseIn:Animator.makeEaseIn(2.5),strongEaseOut:Animator.makeEaseOut(2.5),elastic:Animator.makeElastic(1),veryElastic:Animator.makeElastic(3),bouncy:Animator.makeBounce(1),veryBouncy:Animator.makeBounce(3)};function AnimatorChain(animators,options){this.animators=animators;this.setOptions(options);for(var i=0;i<this.animators.length;i++){this.listenTo(this.animators[i])}this.forwards=false;this.current=0}AnimatorChain.prototype={setOptions:function(options){this.options=Animator.applyDefaults({resetOnPlay:true},options)},play:function(){this.forwards=true;this.current=-1;if(this.options.resetOnPlay){for(var i=0;i<this.animators.length;i++){this.animators[i].jumpTo(0)}}this.advance()},reverse:function(){this.forwards=false;this.current=this.animators.length;if(this.options.resetOnPlay){for(var i=0;i<this.animators.length;i++){this.animators[i].jumpTo(1)}}this.advance()},toggle:function(){if(this.forwards){this.seekTo(0)}else{this.seekTo(1)}},listenTo:function(animator){var oldOnComplete=animator.options.onComplete;var self=this;animator.options.onComplete=function(){if(oldOnComplete){oldOnComplete.call(animator)}self.advance()}},advance:function(){if(this.forwards){if(this.animators[this.current+1]===null){return}this.current++;this.animators[this.current].play()}else{if(this.animators[this.current-1]===null){return}this.current--;this.animators[this.current].reverse()}},seekTo:function(target){if(target<=0){this.forwards=false;this.animators[this.current].seekTo(0)}else{this.forwards=true;this.animators[this.current].seekTo(1)}}};function Accordion(options){this.setOptions(options);var selected=this.options.initialSection,current;if(this.options.rememberance){current=document.location.hash.substring(1)}this.rememberanceTexts=[];this.ans=[];var self=this;var get_click_callback=function(i){return function(){self.show(i)}};for(var i=0;i<this.options.sections.length;i++){var el=this.options.sections[i];var an=new Animator(this.options.animatorOptions);var from=this.options.from+(this.options.shift*i);var to=this.options.to+(this.options.shift*i);an.addSubject(new NumericalStyleSubject(el,this.options.property,from,to,this.options.units));an.jumpTo(0);var activator=this.options.getActivator(el);activator.index=i;activator.onclick=get_click_callback(i);this.ans[this.ans.length]=an;this.rememberanceTexts[i]=activator.innerHTML.replace(/\s/g,"");if(this.rememberanceTexts[i]===current){selected=i}}this.show(selected)}Accordion.prototype={setOptions:function(options){this.options=Object.extend({sections:null,getActivator:function(el){return document.getElementById(el.getAttribute("activator"))},shift:0,initialSection:0,rememberance:true,animatorOptions:{}},options||{})},show:function(section){for(var i=0;i<this.ans.length;i++){this.ans[i].seekTo(i>section?1:0)}if(this.options.rememberance){document.location.hash=this.rememberanceTexts[section]}}};if(typeof $==='undefined'){function $(id){if(typeof id==='string'){return document.getElementById(id)}else{return id}}}if(typeof $$==='undefined'){function $$(query){if(query.toLowerCase()==='body'){return document.body}result=document.querySelectorAll(query);switch(result.length){case 0:return null;case 1:return result[0];default:return result}}}var Tag={XHTML_NS:'http://www.w3.org/1999/xhtml',create:function(name,properties){var tag;if(typeof(name)==='object'&&name!==null){properties=name;name=properties.name}if(document.createElementNS&&Tag.inXHTML()){tag=document.createElementNS(Tag.XHTML_NS,name.toLowerCase())}else{tag=document.createElement(name)}if(typeof(properties)==='object'&&properties!==null){var i;var key;var children=properties.children;var events=properties.events;var attributes=properties.attributes;var styles=properties.styles;var classes=properties.classes;if(children!==null){var addChild=function(o){if(typeof(o)==='string'){tag.appendChild(Tag.text(o))}else if(typeof(o)==='object'){if(typeof o.nodeName!=='undefined'){tag.appendChild(o)}else if(o.name){tag.appendChild(Tag.create(o))}}};if(children instanceof Array){children.forEach(addChild)}else{addChild(children)}}if(attributes!==null&&attributes instanceof Object){for(key in attributes){if(key==='style'){}else{tag.setAttribute(key,attributes[key])}}}base2.DOM.CSSStyleDeclaration.bind(tag.style);if(styles!==null&&styles instanceof Object){base2.lang.forEach(styles,function(style,key){tag.style.setProperty(key,style,'')})}if(classes!==null&&classes!==undefined){if(classes instanceof Array){classes.forEach(tag.classList.add)}else if(typeof(classes)==='string'){tag.classList.add(tag)}}}return tag},createWithText:function(name,text){return Tag.create(name,{children:text})},createHeader:function(level,text){return Tag.createWithText('H'+Number(level),text)},cssStyleToJS:function(style_key){if(style_key==='float'){if(typeof($$('body').style.cssFloat)!=='undefined'){return'cssFloat'}else{return'styleFloat'}}else{return style_key.replace(/-(.)/g,function(match,m1,offset,original){return m1.toUpperCase()})}},getChildren:function(parent,tag){if(tag!==undefined){tag=tag.toLowerCase()}var children=[],nodes,child;if(parent.children!==undefined){if(tag===undefined){return parent.children}else{nodes=parent.children}}else{nodes=parent.childNodes}Array.forEach(nodes,function(child){if(child.nodeType===1){if(tag===undefined||child.nodeName.toLowerCase()===tag){children.push(child)}}});return children},text:function(txt){return document.createTextNode(txt)},inXHTML:function(tag){if(typeof tag==='undefined'||tag===null){tag=document.firstChild}var child=tag.ownerDocument.firstChild;return(child.nodeType===10&&child.publicId.indexOf(' XHTML ')!==-1)||(child.nodeType===8&&child.tagName==='!'&&child.nodeValue.indexOf(' XHTML ')!==-1)||(child.nextSibling&&child.nextSibling.namespaceURI===Tag.XHTML_NS)||(child.nodeType===1&&child.namespaceURI===Tag.XHTML_NS)},dispatchEvent:function(tag,name){if(tag.fireEvent){tag.fireEvent('on'+name)}else if(document.createEvent&&tag.dispatchEvent){var mouse_events=['click','dblclick','mousedown','mousemove','mouseout','mouseover','mouseup'];var key_events=['keydown','keypress','keyup'];var html_events=['abort','blur','change','error','focus','load','reset','resize','scroll','select','submit','unload'];var evt_type='';if(mouse_events.indexOf(name)!==-1){evt_type='MouseEvent'}else if(key_events.indexOf(name)!==-1){evt_type='KeyEvent'}else if(html_events.indexOf(name)!==-1){evt_type='HTMLEvent'}var evt=document.createEvent(evt_type+'s');if(evt['init'+evt_type]){evt['init'+evt_type](name,true,true,window,1,0,0,0,0,false,false,false,false,0,null)}else{evt.initEvent(name)}tag.dispatchEvent(evt)}else{alert('This browser does not support synthetic events!')}}};function getXHR(){var xmlhttp=false;if(typeof XMLHttpRequest!=='undefined'){try{xmlhttp=new XMLHttpRequest()}catch(xhr_e){xmlhttp=false}}/*@cc_on @*/ /*@if(@_jscript_version>=5)if(!xmlhttp){var msXMLHttpFactories=[function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];for(var i=0;i<msXMLHttpFactories.length;i++){try{xmlhttp=msXMLHttpFactories[i]()}catch(ms_e){continue}break}}@end @*/if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest()}catch(ice_e){xmlhttp=false}}return xmlhttp}if(!!window.base2){base2.JavaScript.bind(window);base2.DOM.bind(document);if(!window.JSON){window.JSON={parse:function(str){return base2.JSON.parse(str)},stringify:function(obj){return base2.JSON.toString(obj)}}}}(function(){document.addEventListener('DOMContentLoaded',function(e){var uri_regex=new RegExp('^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?');if(typeof window.run_headlines!=='undefined'&&window.run_headlines){var xhr=getXHR();if(xhr!==false){xhr.open('GET','planet/headlines.json',true);xhr.onreadystatechange=function(evt){if(xhr.readyState!==4){return}if(xhr.status!==200&&xhr.status!==304){return}var data=JSON.parse(xhr.responseText);if(data.headlines.length>0){var headlines=Tag.create('DIV',{styles:{opacity:0,'-webkit-border-radius':'2em','-moz-border-radius':'2em','border-radius':'2em'},attributes:{id:'headlines'},children:[Tag.create('H2',{children:'Items of Interest'}),Tag.create('UL',{styles:{'padding-left':'1.25em'}})]});var list=headlines.lastChild;for(var i=0;i<10;i++){var headline=data.headlines[i];var link_attrs={href:headline.link,title:headline.source};var uri_host=uri_regex.exec(headline.link)[2];var uri_host_len=uri_host.length;if(uri_host_len>11&&uri_host.substr(uri_host_len-11)==='.malept.com'){link_attrs['class']='subdomain'}list.appendChild(Tag.create('LI',{children:Tag.create('A',{attributes:link_attrs,children:headline.title})}))}document.body.insertBefore(headlines,document.getElementsByTagName('p')[1]);var ani=new Animator({duration:2500});ani.addSubject(new NumericalStyleSubject(headlines,'opacity',0,1));ani.play()}};xhr.send(null)}}if(typeof window.is_cv!=='undefined'&&window.is_cv){var me=document.querySelector('.hresume .contact.vcard');var get_me=function(path){return me.querySelector(path).innerHTML.toLowerCase()};var email=me.querySelector('.email');var addr=get_me('.given-name')+get_me('.family-name')+decodeURIComponent('%2Binquiries%40malept.com');email.setAttribute('href','mailto:'+addr);email.innerHTML=addr}},false)}());
