/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  December 2nd 2008 1:03:36 PM PST                             */
/*      Machine:  10.16.139.106                                                */
/*       Source:  Global Cache                                                 */
/*     Location:  js/common.js.pkg.php r125170                                 */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/common.js.pkg.php                                         */


var onloadRegister=window.onloadRegister||function(h) {onloadhooks.push(h);};var onloadhooks=window.onloadhooks||[];var onafterloadRegister=window.onafterloadRegister||function(h) {onafterloadhooks.push(h);};var onafterloadhooks=window.onafterloadhooks||[];function wait_for_load(element,e,f) {f=bind(element,f,e);if(window.loading_begun){return f();}
switch((e||event).type){case'load':onloadRegister(f);return;case'click':if(element.original_cursor===undefined){element.original_cursor= _proxy_jslib_handle(element.style, 'cursor', '', 0, 0);}
if( _proxy_jslib_handle(document, 'body', '', 0, 0).original_cursor===undefined){ _proxy_jslib_handle(document, 'body', '', 0, 0).original_cursor= _proxy_jslib_handle( _proxy_jslib_handle(document, 'body', '', 0, 0).style, 'cursor', '', 0, 0);}
 _proxy_jslib_assign('', element.style, 'cursor', '=', ( _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'body', '', 0, 0).style, 'cursor', '=', ('progress'))));onafterloadRegister(function() { _proxy_jslib_assign('', element.style, 'cursor', '=', (element.original_cursor)); _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'body', '', 0, 0).style, 'cursor', '=', ( _proxy_jslib_handle(document, 'body', '', 0, 0).original_cursor));element.original_cursor= _proxy_jslib_handle(document, 'body', '', 0, 0).original_cursor=undefined;if(element.tagName.toLowerCase()=='a'){var original_event=window.event;window.event=e;var ret_value=element.onclick.call(element,e);window.event=original_event;if(ret_value!==false&& _proxy_jslib_handle(element, 'href', '', 0, 0)){ _proxy_jslib_assign('',  _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '=', ( _proxy_jslib_handle(element, 'href', '', 0, 0)));}}else if(element.click){element.click();}});break;}
return false;};function bind(obj,method) {var args=[];for(var ii=2;ii<arguments.length;ii++){args.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}
var fn=function() {var _obj=obj||(this==window?false:this);var _args=args.slice();for(var jj=0;jj<arguments.length;jj++){_args.push( _proxy_jslib_handle(arguments, (jj), 0, 0));}
if(typeof(method)=="string"){if( _proxy_jslib_handle(_obj, (method), 0, 0)){return  _proxy_jslib_handle(_obj, (method), 0, 0).apply(_obj,_args);}}else{return method.apply(_obj,_args);}};if(typeof method=='string'){fn.name=method;}else if(method){if(method.name){fn.name=method.name;}
 _proxy_jslib_assign('', fn, 'toString', '=', (function() {return'bound<'+ _proxy_jslib_handle(method, 'toString', '', 1, 0)()+'>';}))}
return fn;};function goURI(uri) {uri= _proxy_jslib_handle(uri, 'toString', '', 1, 0)();if(window.PageTransitions){PageTransitions.go(uri);}else if( _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0)==uri){ _proxy_jslib_handle(window, 'location', '', 0, 0).reload();}else{ _proxy_jslib_assign('',  _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '=', (uri));}}
var PrimordialBootloader=window.PrimordialBootloader||{loaded:[],done:function(names) {PrimordialBootloader.loaded.push(names);}};var Bootloader=window.Bootloader||{done:PrimordialBootloader.done};

function hasArrayNature(obj) {if(!obj){return false;}
if(typeof obj!='object'){return false;}
if(obj instanceof Array){return true;}
if(!('length'in obj)){return false;}
if('callee'in obj){return true;}
if('push'in obj&&'pop'in obj){return true;}
return false;}
function copy_properties(u,v) {if(!u||!v){throw new (TypeError)("Can not copy between types "+typeof(u)+" and "+typeof(v)+".");}
for(var k in v){ _proxy_jslib_assign('', u, (k), '=', ( _proxy_jslib_handle(v, (k), 0, 0)));}
if(v.hasOwnProperty&&v.hasOwnProperty('toString')&&(typeof  _proxy_jslib_handle(v, 'toString', '', 0, 0)!='undefined')&&( _proxy_jslib_handle(u, 'toString', '', 0, 0)!== _proxy_jslib_handle(v, 'toString', '', 0, 0))){ _proxy_jslib_assign('', u, 'toString', '=', ( _proxy_jslib_handle(v, 'toString', '', 0, 0)));}
return u;}
function arrayize(obj) {if(!hasArrayNature(obj)){return[obj];}
return obj;}
var Bootloader={loadComponents:function(components,callback) {components=arrayize(components);var required_resources=[];for(var ii=0;ii<components.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){var component_resource_list= _proxy_jslib_handle(this._component_map, ( _proxy_jslib_handle(components, (ii), 0, 0)), 0, 0);if(!component_resource_list){throw new (Error)("Can not bootload `"+ _proxy_jslib_handle(components, (ii), 0, 0)+"'.");}
for(var jj=0;jj<component_resource_list.length;(jj= _proxy_jslib_assign_rval('++', 'jj', '', '', jj))){required_resources.push( _proxy_jslib_handle(component_resource_list, (jj), 0, 0));}}
this.loadResources(required_resources,callback);},loadResources:function(resources,callback) {resources=arrayize(resources);var request_index=this._pending.length;var will_request=[];var pending_request=false;for(var ii=0;ii<resources.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){var rsrc= _proxy_jslib_handle(resources, (ii), 0, 0);if( _proxy_jslib_handle(this._loaded, (rsrc.name), 0, 0)){continue;}
if(rsrc.type=='js'&&callback){if(! _proxy_jslib_handle(this._pending, (request_index), 0, 0)){ _proxy_jslib_assign('', this._pending, (request_index), '=', ({names:{},callback:callback}));}
 _proxy_jslib_assign('',  _proxy_jslib_handle(this._pending, (request_index), 0, 0).names, (rsrc.name), '=', (true));pending_request=true;}
if(! _proxy_jslib_handle(this._requested, (rsrc.name), 0, 0)){this.requested(rsrc.name);will_request.push(rsrc);}}
for(var ii=0;ii<will_request.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){this.requestResource( _proxy_jslib_handle(will_request, (ii), 0, 0).type, _proxy_jslib_handle( _proxy_jslib_handle(will_request, (ii), 0, 0), 'src', '', 0, 0));}
if(!pending_request&&callback){this._invoke(callback);}},requestResource:function(type,source) {var h=this._getHardpoint();switch(type){case'js':var script=document.createElement('script'); _proxy_jslib_assign('', script, 'src', '=', (source));script.type='text/javascript';h.appendChild(script);break;case'css':var link=document.createElement('link');link.rel="stylesheet";link.type="text/css";link.media="all"
 _proxy_jslib_assign('', link, 'href', '=', (source));h.appendChild(link);break;default:throw new (TypeError)("Bad resource type `"+type+"'.");}},done:function(names) {var preloaded=PrimordialBootloader.loaded;PrimordialBootloader.loaded=[];for(var ii=0;ii<preloaded.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){Bootloader.done( _proxy_jslib_handle(preloaded, (ii), 0, 0));}
this.requested(names);for(var ii=0;ii<names.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){var loaded_resource= _proxy_jslib_handle(names, (ii), 0, 0); _proxy_jslib_assign('', this._loaded, (loaded_resource), '=', (true));for(var jj=0;jj<this._pending.length;(jj= _proxy_jslib_assign_rval('++', 'jj', '', '', jj))){var required_resources= _proxy_jslib_handle(this._pending, (jj), 0, 0).names; _proxy_jslib_assign('delete', (required_resources), (loaded_resource), '');if(is_empty(required_resources)){var callback= _proxy_jslib_handle(this._pending, (jj), 0, 0).callback;this._pending.splice(jj,1);(jj= _proxy_jslib_assign_rval('--', 'jj', '', '', jj));if(callback){this._invoke(callback);}}}}
if(window.Arbiter){var message={sender:this};Arbiter.inform(Arbiter.BOOTLOAD,message,Arbiter.BEHAVIOR_EVENT);}},requested:function(resources) {resources=arrayize(resources);for(var ii=0;ii<resources.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){ _proxy_jslib_assign('', this._requested, ( _proxy_jslib_handle(resources, (ii), 0, 0)), '=', (true));}},enableBootload:function(map) {copy_properties(this._component_map,map);},_invoke:function(callback) { _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(callback,0);},_getHardpoint:function() {if(!this._hardpoint){var n,heads= _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('head');if(heads.length){n=heads[0];}else{n= _proxy_jslib_handle(document, 'body', '', 0, 0);}
this._hardpoint=n;}
return this._hardpoint;},_requested:{},_loaded:{},_pending:[],_component_map:{},_hardpoint:null};

function to_array(obj) {var ret=[]
for(var i=0,l=obj.length;i<l;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){ret.push( _proxy_jslib_handle(obj, (i), 0, 0));}
return ret;}
var $A=to_array;Array.prototype.alloc=function(length) {return length?new (Array)(length):[];}
Array.prototype.map=function(callback,thisObject) {if(this==window){throw new (TypeError)();}
if(typeof(callback)!=="function"){throw new (TypeError)();}
var ii;var len=this.length;var r=this.alloc(len);for(ii=0;ii<len;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if(ii in this){ _proxy_jslib_assign('', r, (ii), '=', (callback.call(thisObject, _proxy_jslib_handle(this, (ii), 0, 0),ii,this)));}}
return r;};Array.prototype.forEach=function(callback,thisObject) {this.map(callback,thisObject);return this;};Array.prototype.each=function(callback,thisObject) {return this.forEach.apply(this,arguments);}
Array.prototype.filter=function(callback,thisObject) {callback=callback||identity;if(this==window){throw new (TypeError)();}
if(typeof(callback)!=="function"){throw new (TypeError)();}
var ii,val,len=this.length,r=this.alloc();for(ii=0;ii<len;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if(ii in this){val= _proxy_jslib_handle(this, (ii), 0, 0);if(callback.call(thisObject,val,ii,this)){r.push(val);}}}
return r;};Array.prototype.every=function(callback,thisObject) {return(this.filter(callback,thisObject).length==this.length);}
Array.prototype.some=function(callback,thisObject) {return(this.filter(callback,thisObject).length>0);}
Array.prototype.pull=function(callback) {if(this==window){throw new (TypeError)();}
if(typeof(callback)=='string'){var grip_key=callback;callback=function() {return  _proxy_jslib_handle(this, (grip_key), 0, 0)};}
if(typeof(callback)!=='function'){throw new (TypeError)();}
var args=Array.prototype.slice.call(arguments,1);var len=this.length;var r=this.alloc(len);for(ii=0;ii<len;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if(ii in this){ _proxy_jslib_assign('', r, (ii), '=', (callback.apply( _proxy_jslib_handle(this, (ii), 0, 0),args)));}}
return r;}
Array.prototype.pullEach=function(callback) {this.pull.apply(this,arguments);return this;}
Array.prototype.filterEach=function(callback) {var map=this.pull.apply(this,arguments);var len=this.length;var r=this.alloc();for(var ii=0;ii<len;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if(ii in this){r.push( _proxy_jslib_handle(this, (ii), 0, 0));}}
return r;}
Array.prototype.partition=function(callback) {if(this==window){throw new (TypeError)();}
if(typeof(callback)!=='function'){throw new (TypeError)();}
var pos=this.alloc();var neg=this.alloc();for(var ii=0;ii<this.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if(callback( _proxy_jslib_handle(this, (ii), 0, 0))){pos.push( _proxy_jslib_handle(this, (ii), 0, 0));}else{neg.push( _proxy_jslib_handle(this, (ii), 0, 0));}}
return[pos,neg];}
Array.prototype.reduce=null;Array.prototype.reduceRight=null;Array.prototype.sort=(function(sort) {return function(callback) {return(this==window)?null:(callback?sort.call(this,function(a,b) {return callback(a,b)}):sort.call(this));}})(Array.prototype.sort);Array.prototype.reverse=(function(reverse) {return function() {return(this==window)?null:reverse.call(this);}})(Array.prototype.reverse);Array.prototype.concat=(function(concat) {return function() {return(this==window)?null:concat.apply(this,arguments);}})(Array.prototype.concat);Array.prototype.slice=(function(slice) {return function() {return(this==window)?null:slice.apply(this,arguments);}})(Array.prototype.slice);Array.prototype.clone=Array.prototype.slice;if(Array.prototype.indexOf){Array.prototype.indexOf=(function(indexOf) {return function(val,index) {return(this==window)?null:indexOf.apply(this,arguments);}})(Array.prototype.indexOf);}else{Array.prototype.indexOf=function(val,index) {if(this==window){throw new (TypeError)();}
var len=this.length;var from=Number(index)||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0){from+=len;}
for(;from<len;from++){if(from in this&& _proxy_jslib_handle(this, (from), 0, 0)===val){return from;}}
return-1;};}
Array.prototype.contains=function(val) {return this.indexOf(val)!=-1;};Array.prototype.remove=function(val) {var index=this.indexOf(val);if(index!=-1){this.splice(index,1);}}
function mapToInt(array) {return array.map(function(val,i) {return parseInt(val,10);});}
function unique(array) {var obj={};var res=[];for(var i=0;i<array.length;i++){var val= _proxy_jslib_handle(array, (i), 0, 0);if(! _proxy_jslib_handle(obj, (val), 0, 0)){res.push(val);}
 _proxy_jslib_assign('', obj, (val), '=', (1));}
return res;}

function is_scalar(v) {switch(typeof(v)){case'string':case'number':case'null':case'boolean':return true;}
return false;}
function is_empty(obj) {if(obj instanceof Array){return obj.length==0;}else if(obj instanceof Object){for(var i in obj){return false;}
return true;}else{return!obj;}}
function keys(obj) {if(hasArrayNature(obj)){throw new (TypeError)('keys() was passed an array.');}
var keys=[];for(var i in obj){keys.push(i);}
return keys;}
function values(obj) {if(hasArrayNature(obj)){throw new (TypeError)('values() was passed an array; use to_array().');}
var values=[];for(var i in obj){values.push( _proxy_jslib_handle(obj, (i), 0, 0));}
return values;}
function count(obj) {if(hasArrayNature(obj)){throw new (TypeError)('count() was passed an array.');}
var count=0;for(var i in obj){count++;}
return count;}
function are_equal(a,b) {return JSON.encode(a)==JSON.encode(b);}

function Arbiter() {copy_properties(this,{_listeners:[],_events:{}});copy_properties(this,Arbiter);}
copy_properties(Arbiter,{SUBSCRIBE_NEW:'new',SUBSCRIBE_ALL:'all',BEHAVIOR_EVENT:'event',BEHAVIOR_PERSISTENT:'persistent',BEHAVIOR_STATE:'state',ALL:'all',LIVEMESSAGE:'livemessage',BOOTLOAD:'bootload',PAGE_TRANSITION:'pagetransitions/transition',subscribe:function(types,callback,subscription_policy) {var a=Arbiter._getInstance(this);types=types||Arbiter.ALL;a._listeners.push({callback:callback,types:types});subscription_policy=subscription_policy||Arbiter.SUBSCRIBE_ALL;if(subscription_policy==Arbiter.SUBSCRIBE_ALL){if(!(types instanceof Array)){types=[types];}
var e;var type;var ret;for(var idx=0;idx<types.length;idx++){type= _proxy_jslib_handle(types, (idx), 0, 0);if(typeof type!="string"){throw new (TypeError)("Event types must be strings.");}
if(type in a._events){for(var ii=0;ii< _proxy_jslib_handle(a._events, (type), 0, 0).length;ii++){e= _proxy_jslib_handle( _proxy_jslib_handle(a._events, (type), 0, 0), (ii), 0, 0);if(Arbiter._checkType(e[0],types)){ret=callback.apply(null,e);if(ret===false){ _proxy_jslib_handle(a._events, (type), 0, 0).splice(ii,1);ii--;}}}}}}else if(subscription_policy!=Arbiter.SUBSCRIBE_NEW){throw new (TypeError)("Bad subscription policy.");}
return{arbiterID:a._listeners.length-1};},unsubscribe:function(token) {if(!('arbiterID'in token)){throw new (TypeError)("Not an arbiter token.");}
 _proxy_jslib_assign('delete', (Arbiter._getInstance(this)._listeners), (token.arbiterID), '');},inform:function(type,data,behavior) {var a=Arbiter._getInstance(this);var e=[type,data];var idx=null;behavior=behavior||Arbiter.BEHAVIOR_EVENT;if(behavior==Arbiter.BEHAVIOR_PERSISTENT){idx=a._events.length;if(!(type in a._events)){ _proxy_jslib_assign('', a._events, (type), '=', ([]));}
 _proxy_jslib_handle(a._events, (type), 0, 0).push(e); _proxy_jslib_handle(a._events, (type), 0, 0)._stateful=false;}else if(behavior==Arbiter.BEHAVIOR_STATE){idx=0; _proxy_jslib_assign('', a._events, (type), '=', ([e])); _proxy_jslib_handle(a._events, (type), 0, 0)._stateful=true;}else if(type in a._events){ _proxy_jslib_handle(a._events, (type), 0, 0)._stateful=false;}
var res;for(var ii=0;ii<a._listeners.length;ii++){if( _proxy_jslib_handle(a._listeners, (ii), 0, 0)){if(Arbiter._checkType(e[0], _proxy_jslib_handle(a._listeners, (ii), 0, 0).types)){res= _proxy_jslib_handle(a._listeners, (ii), 0, 0).callback.apply(null,e);if(res===false){if(idx!==null){ _proxy_jslib_handle(a._events, (type), 0, 0).splice(idx,1);}
break;}}}}},query:function(type) {var a=Arbiter._getInstance(this);if(!(type in a._events)){return null;}
if(! _proxy_jslib_handle(a._events, (type), 0, 0)._stateful){throw new (Error)("Querying state of an unstateful event.");}
if( _proxy_jslib_handle(a._events, (type), 0, 0).length){return  _proxy_jslib_handle(a._events, (type), 0, 0)[0];}
return null;},_instance:null,_getInstance:function(self) {if(self instanceof Arbiter){return self;}
if(!Arbiter._instance){Arbiter._instance=new (Arbiter)();}
return Arbiter._instance;},_checkType:function(event_type,callback_type) {if(callback_type==Arbiter.ALL){return true;}
if(event_type==callback_type){return true;}
if(callback_type.length){for(var ii=0;ii<callback_type.length;ii++){if( _proxy_jslib_handle(callback_type, (ii), 0, 0)==event_type){return true;}}}
return false;}});

Function.prototype.extend=function(superclass) {if(typeof superclass!='string'){throw new (TypeError)('You must extend() with the name of a class, not the function object. '+'This generally means you need to replace "Dog.extend(Animal);" with '+'"Dog.extend(\'Animal\');".');}
if(!Metaprototype._arbiterHandle){Metaprototype._arbiterHandle=Arbiter.subscribe(Arbiter.BOOTLOAD,Metaprototype._onbootload.bind(Metaprototype));}
Metaprototype._queue(this,superclass);}
function Metaprototype() {}
copy_properties(Metaprototype,{_pending:[],_queue:function(subclass,superclass) {this._pending.push({subclass:subclass,superclass:superclass});var src=this._pending;var dst=[];for(var ii=0;ii< _proxy_jslib_handle(null, 'src', src, 0, 0).length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){var node= _proxy_jslib_handle( _proxy_jslib_handle(null, 'src', src, 0, 0), (ii), 0, 0);for(var jj=0;jj<dst.length;(jj= _proxy_jslib_assign_rval('++', 'jj', '', '', jj))){if( _proxy_jslib_handle(window, ( _proxy_jslib_handle(dst, (jj), 0, 0).superclass), 0, 0)==node.subclass){dst.splice(jj,0,node);break;}}
if(jj==dst.length){dst.push(node);}}
this._pending=dst;this._update();},_onbootload:function(type,data) {this._update();},_update:function() {for(var ii=0;ii<this._pending.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){var node= _proxy_jslib_handle(this._pending, (ii), 0, 0);var super_object= _proxy_jslib_handle(window, (node.superclass), 0, 0);if(!super_object){continue;}
for(var jj=0;jj<this._pending.length;(jj= _proxy_jslib_assign_rval('++', 'jj', '', '', jj))){if( _proxy_jslib_handle(this._pending, (jj), 0, 0).subclass==super_object){break;}}
if(jj==this._pending.length){this._pending.splice(ii,1);(ii= _proxy_jslib_assign_rval('--', 'ii', '', '', ii));this._apply(node.subclass,super_object);}}},_apply:function(subclass,superclass) {var superprototype=__metaprototype(superclass,0);var subprototype=__metaprototype(subclass,superprototype.prototype.__level+1); _proxy_jslib_assign('', subprototype, 'parent', '=', (superprototype));}});function __metaprototype(obj,level) {if(obj.__metaprototype){return obj.__metaprototype;}
var metaprototype=_proxy_jslib_new_function();metaprototype.construct=__metaprototype_construct;metaprototype.prototype.construct=__metaprototype_wrap(obj,level,true);metaprototype.prototype.__level=level;metaprototype.base=obj; _proxy_jslib_assign('', obj.prototype, 'parent', '=', (metaprototype));obj.__metaprototype=metaprototype;return metaprototype;}
function __metaprototype_construct(instance) {__metaprototype_init( _proxy_jslib_handle(instance, 'parent', '', 0, 0));var parents=[];var obj=instance;while( _proxy_jslib_handle(obj, 'parent', '', 0, 0)){parents.push(new_obj=new ( _proxy_jslib_handle(obj, 'parent', '', 0, 1))());new_obj.__instance=instance;obj= _proxy_jslib_handle(obj, 'parent', '', 0, 0);}
 _proxy_jslib_assign('', instance, 'parent', '=', (parents[1]));parents.reverse();parents.pop();instance.__parents=parents;instance.__instance=instance;return  _proxy_jslib_handle(instance, 'parent', '', 0, 0).construct.apply( _proxy_jslib_handle(instance, 'parent', '', 0, 0),arguments);}
function __metaprototype_init(metaprototype) {if(metaprototype.initialized)return;var base=metaprototype.base.prototype;if( _proxy_jslib_handle(metaprototype, 'parent', '', 0, 0)){__metaprototype_init( _proxy_jslib_handle(metaprototype, 'parent', '', 0, 0));var parent_prototype= _proxy_jslib_handle(metaprototype, 'parent', '', 0, 0).prototype;for(i in parent_prototype){if(i!='__level'&&i!='construct'&& _proxy_jslib_handle(base, (i), 0, 0)===undefined){ _proxy_jslib_assign('', base, (i), '=', ( _proxy_jslib_assign('', metaprototype.prototype, (i), '=', ( _proxy_jslib_handle(parent_prototype, (i), 0, 0)))))}}}
metaprototype.initialized=true;var level=metaprototype.prototype.__level;for(i in base){if(i!='parent'){ _proxy_jslib_assign('', base, (i), '=', ( _proxy_jslib_assign('', metaprototype.prototype, (i), '=', (__metaprototype_wrap( _proxy_jslib_handle(base, (i), 0, 0),level)))));}}}
function __metaprototype_wrap(method,level,shift) {if(typeof method!='function'||method.__prototyped){return method;}
var func=function() {var instance=this.__instance;if(instance){var old_parent= _proxy_jslib_handle(instance, 'parent', '', 0, 0); _proxy_jslib_assign('', instance, 'parent', '=', (level? _proxy_jslib_handle(instance.__parents, (level-1), 0, 0):null));if(shift){var args=[];for(var i=1;i<arguments.length;i++){args.push( _proxy_jslib_handle(arguments, (i), 0, 0));}
var ret=method.apply(instance,args);}else{var ret=method.apply(instance,arguments);}
 _proxy_jslib_assign('', instance, 'parent', '=', (old_parent));return ret;}else{return method.apply(this,arguments);}}
func.__prototyped=true;return func;}
Function.prototype.bind=function(context) {var argv=[arguments[0],this];var argc=arguments.length;for(var ii=1;ii<argc;ii++){argv.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}
return bind.apply(null,argv);}
Function.prototype.shield=function(context) {if(typeof this!='function'){throw new (TypeException)();}
var bound=this.bind.apply(this,to_array(arguments));return function() {return bound();}}
Function.prototype.defer=function(msec) {if(typeof this!='function'){throw new (TypeError)();}
msec=msec||0;return  _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(this,msec);}
Function.prototype.recur=function(msec) {if(typeof this!='function'){throw new (TypeError)();}
return  _proxy_jslib_handle(null, 'setInterval', setInterval, 1, 0)(this,msec);}
Function.prototype.occur=function() {if(typeof this!='function'){throw new (TypeError)();}
return this.apply(this,arguments);}
Function.prototype.memoize=function() {if(typeof this!='function'){throw new (TypeError)();}
var cache={};var functor=this;return function() {var key=JSON.encode(arguments);if(!(key in cache)){ _proxy_jslib_assign('', cache, (key), '=', (functor.apply(this,arguments)));}
return  _proxy_jslib_handle(cache, (key), 0, 0);};}
function bagofholding() {return undefined;}
function abstractMethod() {throw new (Error)('You must implement this function in your base class.');}
function identity(input) {return input;}
function call_or_eval(obj,func,args_map) {if(!func){return undefined;}
args_map=args_map||{};if(typeof(func)=='string'){var params=keys(args_map).join(', ');func=eval(_proxy_jslib_proxify_js(('({f: function('+params+') { '+func+'}})'), 0, 0) ).f;}
if(typeof(func)!='function'){Util.error('handler was neither a function nor a string of JS code');return undefined;}
return func.apply(obj,values(args_map));}

String.prototype.trim=function() {if(this==window){return null;}
return  _proxy_jslib_handle(this, 'replace', '', 1, 0)(/^\s*|\s*$/g,'');}
function trim(text) {try{return String( _proxy_jslib_handle(text, 'toString', '', 1, 0)()).trim();}catch(ignored){return'';}}
String.prototype.startsWith=function(substr) {if(this==window){return null;}
return this.substring(0,substr.length)==substr;};String.prototype.endsWith=function(substr) {if(this==window){return null;}
return this.length>=substr.length&&this.substring(this.length-substr.length)==substr;};String.prototype.split=(function(split) {return function(separator,limit) {var flags="";if(separator===null||limit===null){return[];}else if(typeof separator=='string'){return split.call(this,separator,limit);}else if(separator===undefined){return[ _proxy_jslib_handle(this, 'toString', '', 1, 0)()];}else if(separator instanceof RegExp){if(!separator._2||!separator._1){flags= _proxy_jslib_handle( _proxy_jslib_handle(separator, 'toString', '', 1, 0)(), 'replace', '', 1, 0)(/^[\S\s]+\//,"");if(!separator._1){if(!separator.global){separator._1=new (RegExp)(separator.source,"g"+flags);}else{separator._1=1;}}}
separator1=separator._1===1?separator:separator._1;var separator2=(separator._2?separator._2:separator._2=new (RegExp)("^"+separator1.source+"$",flags));if(limit===undefined||limit<0){limit=false;}else{limit=Math.floor(limit);if(!limit)return[];}
var match,output=[],lastLastIndex=0,i=0;while((limit?i++<=limit:true)&&(match=separator1.exec(this))){if((match[0].length===0)&&(separator1.lastIndex>match.index)){separator1.lastIndex--;}
if(separator1.lastIndex>lastLastIndex){if(match.length>1){ _proxy_jslib_handle(match[0], 'replace', '', 1, 0)(separator2,function() {for(var j=1;j<arguments.length-2;j++){if( _proxy_jslib_handle(arguments, (j), 0, 0)===undefined) _proxy_jslib_assign('', match, (j), '=', (undefined));}});}
output=output.concat(this.substring(lastLastIndex,match.index),(match.index===this.length?[]:match.slice(1)));lastLastIndex=separator1.lastIndex;}
if(match[0].length===0){separator1.lastIndex++;}}
return(lastLastIndex===this.length)?(separator1.test("")?output:output.concat("")):(limit?output:output.concat(this.substring(lastLastIndex)));}else{return split.call(this,separator,limit);}}})(String.prototype.split);

function List(length) {if(arguments.length>1){for(var ii=0;ii<arguments.length;ii++){this.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}}else{this.resize(length||0);}}
List.prototype.length=0;List.prototype.size=function() {return this.length;}
List.prototype.resize=function(new_size) {this.length=new_size;return this;}
List.prototype.alloc=function(n) {return new (List)(n);}
 _proxy_jslib_assign('', List.prototype, 'toString', '=', (function() {return'['+this.join(', ')+']';}))
List.prototype.push=Array.prototype.push;List.prototype.pop=Array.prototype.pop;List.prototype.join=Array.prototype.join;List.prototype.map=Array.prototype.map;List.prototype.forEach=Array.prototype.forEach;List.prototype.each=Array.prototype.each;List.prototype.filter=Array.prototype.filter;List.prototype.every=Array.prototype.every;List.prototype.some=Array.prototype.some;List.prototype.pull=Array.prototype.pull;List.prototype.pullEach=Array.prototype.pullEach;List.prototype.pullFilter=Array.prototype.pullFilter;function SortedList(compareFunction,uniqueElements) {this._compareFunction=compareFunction||SortedList._defaultCompareFunction;if(uniqueElements===undefined){uniqueElements=false;}
this._unique=uniqueElements;}
SortedList.prototype=new (List)();SortedList.prototype.binarySearch=function(element) {var low=0,high=this.length-1,mid=0;while(low<=high){var mid=low+Math.floor((high-low)/2);var cmp=this._compareFunction(element, _proxy_jslib_handle(this, (mid), 0, 0));if(cmp<0){high=mid-1;}else if(cmp>0){low=mid+1;}else{return mid;}}
return-(low+1);}
SortedList.prototype.contains=function(element) {return this.binarySearch(element)>=0;}
SortedList.prototype.push=function() {this.concat(arguments);return this.length;}
SortedList.prototype.concat=function(array) {for(var i=0;i<array.length;i++){var element= _proxy_jslib_handle(array, (i), 0, 0);var idx=this._getInsertionPoint(element);if(idx!==null){Array.prototype.splice.apply(this,[idx,0,element]);}}
return this;}
SortedList.prototype.indexOf=Array.prototype.indexOf;SortedList.prototype.remove=Array.prototype.remove;SortedList.prototype.splice=function() {if(arguments.length>2){throw new (Error)('splice doesn\'t support adding elements. Use push instead.');}
Array.prototype.splice.apply(this,[arguments[0],arguments[1]]);}
SortedList.prototype.clear=function() {this.length=0;}
SortedList.prototype._getInsertionPoint=function(element) {var ret=this.binarySearch(element);if(ret>=0&&this._unique){return null;}
if(ret<0){ret=-(ret+1);}
return ret;}
SortedList._defaultCompareFunction=function(a,b) {if(a<b){return-1;}else if(a>b){return 1;}
return 0;}

var ua={ie:function() {return this._ie;},firefox:function() {return this._firefox;},opera:function() {return this._opera;},safari:function() {return this._safari;},safariPreWebkit:function() {return this._safari<500;},windows:function() {return this._windows;},osx:function() {return this._osx;},populate:function() {var agent=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera.(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(navigator.userAgent);var os=/(Mac OS X)|(Windows;)/.exec(navigator.userAgent);if(agent){ua._ie=agent[1]?parseFloat(agent[1]):NaN;if(ua._ie>=8&&!window.HTMLCollection){ua._ie=7;}
ua._firefox=agent[2]?parseFloat(agent[2]):NaN;ua._opera=agent[3]?parseFloat(agent[3]):NaN;ua._safari=agent[4]?parseFloat(agent[4]):NaN;}else{ua._ie=ua._firefox=ua._opera=ua._safari=NaN;}
if(os){ua._osx=!!os[1];ua._windows=!!os[2];}else{ua._osx=ua._windows=false;}}};

function chain(u,v) {var calls=[];for(var ii=0;ii<arguments.length;ii++){calls.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}
return function(event) {event=event||window.event;for(var ii=0;ii<calls.length;ii++){if( _proxy_jslib_handle(calls, (ii), 0, 0)&& _proxy_jslib_handle(calls, (ii), 0, 0).apply(this,arguments)===false){return false;}else if(event&&event.cancelBubble){return true;}}
return true;}}
function addEventBase(obj,type,fn,name_hash) {if(obj.addEventListener){obj.addEventListener(type,fn,false);}
else if(obj.attachEvent)
{var fn_name=type+fn+name_hash; _proxy_jslib_assign('', obj, ("e"+fn_name), '=', (fn)); _proxy_jslib_assign('', obj, (fn_name), '=', (function() { _proxy_jslib_handle(obj, ("e"+fn_name), 1, 0)(window.event);}))
obj.attachEvent("on"+type, _proxy_jslib_handle(obj, (fn_name), 0, 0));}
return fn;}
function removeEventBase(obj,type,fn,name_hash) {if(obj.removeEventListener){obj.removeEventListener(type,fn,false);}
else if(obj.detachEvent)
{var fn_name=type+fn+name_hash;if( _proxy_jslib_handle(obj, (fn_name), 0, 0)){obj.detachEvent("on"+type, _proxy_jslib_handle(obj, (fn_name), 0, 0)); _proxy_jslib_assign('', obj, (fn_name), '=', (null)); _proxy_jslib_assign('', obj, ("e"+fn_name), '=', (null));}}}
window.Event=window.Event||function() {};Event.prototype=Event.prototype||{};Event.prototype._inherits_from_prototype=true;function $E(e) {e=e||window.event;e=e||{};if(!e._inherits_from_prototype){for(var k in Event.prototype){try{ _proxy_jslib_assign('', e, (k), '=', ( _proxy_jslib_handle(Event.prototype, (k), 0, 0)));}catch(ignored){}}}
return e;}
var event_get=$E;Event.prototype.kill=function() {this.stop();this.returnValue=false;this.preventDefault&&this.preventDefault();return false;}
Event.prototype.stop=function() {this.cancelBubble=true;this.stopPropagation&&this.stopPropagation();}
Event.stop=function(e) {return $E(e).stop();}
Event.kill=function(e) {return $E(e).kill();}
var event_kill=Event.kill;var event_abort=Event.kill;var event_prevent=Event.kill;var stopPropagation=Event.stop;Event.Priority={TRADITIONAL:-10,NORMAL:0,LINK_CONTROLLER:100};Event.listen=function(element,event_name,handler,priority) {if(typeof element=='string'){element=$(element,true);}
if(typeof priority=='undefined'){priority=Event.Priority.NORMAL;}
element.__listen__=element.__listen__||{};var handlers=element.__listen__;event_name=Event._normalizeName(event_name);Event._attachHandler(element,event_name);var type_handlers= _proxy_jslib_handle(handlers, (event_name), 0, 0);if(!(priority in type_handlers)){ _proxy_jslib_assign('', type_handlers, (priority), '=', ([]));}
var id= _proxy_jslib_handle(type_handlers, (priority), 0, 0).length;var ref=new (EventHandlerRef)(handler, _proxy_jslib_handle(type_handlers, (priority), 0, 0),id); _proxy_jslib_handle(type_handlers, (priority), 0, 0).push(ref);return ref;};Event._normalizeName=function(event_name) {event_name=event_name.toLowerCase();if(event_name.match(/^on/)){throw new (TypeError)("Bad event name `"+event_name+"': use `click', not `onclick'.");}
return event_name;};Event._attachHandler=function(element,event_name) {var full_event_name='on'+event_name;var handlers=element.__listen__;if(event_name in handlers){if( _proxy_jslib_handle(element, (full_event_name), 0, 0)!==Event._listenHandler){throw new (Error)("`"+full_event_name+"' listen handler gone!");}
return;}
 _proxy_jslib_assign('', handlers, (event_name), '=', ({}));var old_handler= _proxy_jslib_handle(element, (full_event_name), 0, 0); _proxy_jslib_assign('', element, (full_event_name), '=', (Event._listenHandler));if(old_handler){Event.listen(element,event_name,old_handler,Event.Priority.TRADITIONAL);}};Event._listenHandler=function(event) {event=$E(event);var type=event.type;if(!this.__listen__){throw new (Error)("Bad _listenHandler() context.");}
var type_handlers= _proxy_jslib_handle(this.__listen__, (type), 0, 0);if(!type_handlers){throw new (Error)("No registered handlers for `"+type+"'.");}
if(!Event._listenHandler._orderedPriorities){var ordered=values(Event.Priority);ordered.sort();Event._listenHandler._orderedPriorities=ordered;}
var priorities=Event._listenHandler._orderedPriorities;for(var pri_idx=0;pri_idx<priorities.length;pri_idx++){var priority= _proxy_jslib_handle(priorities, (pri_idx), 0, 0);if(priority in type_handlers){var handlers= _proxy_jslib_handle(type_handlers, (priority), 0, 0);for(var idx=0;idx<handlers.length;idx++){if(! _proxy_jslib_handle(handlers, (idx), 0, 0)){continue;}
var result= _proxy_jslib_handle(handlers, (idx), 0, 0).fire(this,event);if(result===false){return event.kill();}else if(event.cancelBubble){return event.stop();}}}}};function EventHandlerRef(handler,container,index) {this._handler=handler;this._container=container;this._index=index;}
copy_properties(EventHandlerRef.prototype,{remove:function() { _proxy_jslib_assign('delete', (this), ('_handler'), ''); _proxy_jslib_assign('delete', (this._container), (this._index), '');},fire:function(element,event) {return this._handler.call(element,event);}});Event.prototype.getTarget=function() {var target=this.target||this.srcElement;if(target){return $(target);}
return null;}
function event_get_target(e) {return $E(e).getTarget();}
Event.prototype.getModifiers=function() {var m={control:!!this.ctrlKey,shift:!!this.shiftKey,alt:!!this.altKey,meta:!!this.metaKey};m.access=ua.osx()?m.control:m.alt;m.any=m.control||m.shift||m.alt||m.meta;return m;}
function event_get_keypress_keycode(event) {event=event_get(event);if(!event){return false;}
switch(event.keyCode){case 63232:return 38;case 63233:return 40;case 63234:return 37;case 63235:return 39;case 63272:case 63273:case 63275:return null;case 63276:return 33;case 63277:return 34;}
if(event.shiftKey){switch(event.keyCode){case 33:case 34:case 37:case 38:case 39:case 40:return null;}}else{return event.keyCode;}}

function Stack() {this.stack=[];try{var metaStack=[];try{({}).llama();}catch(e){if(e.stack){var regex=/^[^@]*?@(.+?):([0-9]+)$/mg;for(line=regex.exec(e.stack);line;line=regex.exec()){metaStack.push([line[1],line[2]]);}}}
var frame=arguments.callee,stale=[];for(var frame=arguments.callee,i=0;frame;frame=frame.caller,(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){i&&this.stack.push({func:frame,args:frame.arguments,file: _proxy_jslib_handle(metaStack, (i), 0, 0)? _proxy_jslib_handle(metaStack, (i), 0, 0)[0]:null,line: _proxy_jslib_handle(metaStack, (i), 0, 0)? _proxy_jslib_handle(metaStack, (i), 0, 0)[1]:null,toString:Stack.frameToString});if(stale.indexOf(frame)>=0){break;}
stale.push(frame);}}catch(e){}}
Stack.prototype.shift=function(n) {this.stack.splice(0,n);return this;}
Stack.recurssion={toString:bind(Stack,'frameToString')};Stack.functionGetName=function(fn) {return fn.name||(/^function *([^(]*)\(/.exec(fn)||[]).pop()||'(no name)';}
Stack.frameSrcToString=function(file,line) {if(!file){return'?';}else if(file.indexOf('TabConsole.getInstance().onresult')>0){return'IceSpider';}else if(file.indexOf('with (__scope__.vars)')>0){return'FireBug';}else{return file+(line?':'+line:'');}}
Stack.frameToString=function() {if(this==Stack.recurssion){return'* * recurssion * *';}
var str=Stack.argToString(this.func)+'(';for(var i=0;i<this.args.length;i++){str+=(i?', ':'')+Stack.argToString( _proxy_jslib_handle(this.args, (i), 0, 0));}
return str+') @ '+Stack.frameSrcToString(this.file,this.line);}
Stack.argToString=function(arg) {if(arg instanceof Function){return Stack.functionGetName(arg);}if(arg instanceof Array){return'Array';}else if(arg instanceof Object){return'Object';}else if(typeof arg=='string'){return'"'+ _proxy_jslib_handle(arg, 'replace', '', 1, 0)(/("|\\)/g,'\\$1')+'"';}else{return arg+'';}}
 _proxy_jslib_assign('', Stack.prototype, 'toString', '=', (function() {if(!this.stack.length){return'No stack trace available.';}
var str='';for(var i=0;i<this.stack.length;i++){str+=(i?'\n':'')+'#'+i+' '+ _proxy_jslib_handle(this.stack, (i), 0, 0);}
return str;}))

function escapeURI(u) {if(encodeURIComponent){return encodeURIComponent(u);}
if(escape){return escape(u);}}
function htmlspecialchars(text) {if(typeof(text)=='undefined'||! _proxy_jslib_handle(text, 'toString', '', 0, 0)){return'';}
if(text===false){return'0';}else if(text===true){return'1';}
return  _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle(text, 'toString', '', 1, 0)(), 'replace', '', 1, 0)(/&/g,'&amp;'), 'replace', '', 1, 0)(/"/g,'&quot;'), 'replace', '', 1, 0)(/'/g,'&#039;'), 'replace', '', 1, 0)(/</g,'&lt;'), 'replace', '', 1, 0)(/>/g,'&gt;');}
function htmlize(text) {return  _proxy_jslib_handle(htmlspecialchars(text), 'replace', '', 1, 0)(/\n/g,'<br />');}
function escape_js_quotes(text) {if(typeof(text)=='undefined'||! _proxy_jslib_handle(text, 'toString', '', 0, 0)){return'';}
return  _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle(text, 'toString', '', 1, 0)(), 'replace', '', 1, 0)(/\\/g,'\\\\'), 'replace', '', 1, 0)(/\n/g,'\\n'), 'replace', '', 1, 0)(/\r/g,'\\r'), 'replace', '', 1, 0)(/"/g,'\\x22'), 'replace', '', 1, 0)(/'/g,'\\\''), 'replace', '', 1, 0)(/</g,'\\x3c'), 'replace', '', 1, 0)(/>/g,'\\x3e'), 'replace', '', 1, 0)(/&/g,'\\x26');}

function env_get(k) {return typeof( _proxy_jslib_handle(window, ('Env'), 0, 0))!='undefined'&& _proxy_jslib_handle(Env, (k), 0, 0);}
var Util={fallbackErrorHandler:function(msg) {aiert(msg);},isDevelopmentEnvironment:function() {return env_get('dev');},warn:function() {Util.log(sprintf.apply(null,arguments),'warn');},error:function() {Util.log(sprintf.apply(null,arguments),'error');},log:function(msg,type) {if(Util.isDevelopmentEnvironment()){type=type||'log';if(typeof(console)!='undefined'&& _proxy_jslib_handle(console, (type), 0, 0)){ _proxy_jslib_handle(console, (type), 1, 0)(msg);}else if(typeof(window.TabConsole)!='undefined'){var con=TabConsole.getInstance();if(con){con.log(HTML(msg),type);}}else if(Util.fallbackErrorHandler){Util.fallbackErrorHandler(msg);}}else{if(type=='error'){msg+='\n\n'+Util.stack();(typeof( _proxy_jslib_handle(window, ('Env'), 0, 0))!='undefined')&&(Env.rlog)&&(typeof( _proxy_jslib_handle(window, ('debug_rlog'), 0, 0))=='function')&&debug_rlog(msg);}}},stack:function() {return _proxy_jslib_handle((new (Stack)()), 'toString', '', 1, 0)();}};

function sprintf() {if(arguments.length==0){Util.warn('sprintf() was called with no arguments; it should be called with at '+'least one argument.');return'';}
var args=['This is an argument vector.'];for(var ii=arguments.length-1;ii>0;ii--){if(typeof( _proxy_jslib_handle(arguments, (ii), 0, 0))=="undefined"){Util.log('You passed an undefined argument (argument '+ii+') to sprintf(). '+'Pattern was: `'+(arguments[0])+'\'.','error');args.push('');}else if( _proxy_jslib_handle(arguments, (ii), 0, 0)===null){args.push('');}else if( _proxy_jslib_handle(arguments, (ii), 0, 0)===true){args.push('true');}else if( _proxy_jslib_handle(arguments, (ii), 0, 0)===false){args.push('false');}else{if(! _proxy_jslib_handle( _proxy_jslib_handle(arguments, (ii), 0, 0), 'toString', '', 0, 0)){Util.log('Argument '+(ii+1)+' to sprintf() does not have a toString() '+'method. The pattern was: `'+(arguments[0])+'\'.','error');return'';}
args.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}}
var pattern=arguments[0];pattern= _proxy_jslib_handle(pattern, 'toString', '', 1, 0)().split('%');var patlen=pattern.length;var result=pattern[0];for(var ii=1;ii<patlen;ii++){if(args.length==0){Util.log('Not enough arguments were provide to sprintf(). The pattern was: '+'`'+(arguments[0])+'\'.','error');return'';}
if(! _proxy_jslib_handle(pattern, (ii), 0, 0).length){result+="%";continue;}
var p=0;var m=0;var r='';var padChar=' ';var padSize=null;var maxSize=null;var rawPad='';var pos=0;if(m= _proxy_jslib_handle(pattern, (ii), 0, 0).match(/^('.)?(?:(-?\d+\.)?(-?\d+)?)/)){if(m[2]!==undefined&&m[2].length){padSize=parseInt(rawPad=m[2]);}
if(m[3]!==undefined&&m[3].length){if(padSize!==null){maxSize=parseInt(m[3]);}else{padSize=parseInt(rawPad=m[3]);}}
pos=m[0].length;if(m[1]!==undefined&&m[1].length){padChar=m[1].charAt(1);}else{if(rawPad.charAt(0)==0){padChar='0';}}}
switch( _proxy_jslib_handle(pattern, (ii), 0, 0).charAt(pos)){case's':raw=htmlspecialchars( _proxy_jslib_handle(args.pop(), 'toString', '', 1, 0)());break;case'h':raw= _proxy_jslib_handle(args.pop(), 'toString', '', 1, 0)();break;case'd':raw= _proxy_jslib_handle(parseInt(args.pop()), 'toString', '', 1, 0)();break;case'f':raw= _proxy_jslib_handle(parseFloat(args.pop()), 'toString', '', 1, 0)();break;case'q':raw="`"+htmlspecialchars( _proxy_jslib_handle(args.pop(), 'toString', '', 1, 0)())+"'";break;case'e':raw="'"+escape_js_quotes( _proxy_jslib_handle(args.pop(), 'toString', '', 1, 0)())+"'";break;case'L':var list=args.pop();for(var ii=0;ii<list.length;ii++){ _proxy_jslib_assign('', list, (ii), '=', ("`"+htmlspecialchars( _proxy_jslib_handle(args.pop(), 'toString', '', 1, 0)())+"'"));}
if(list.length>1){ _proxy_jslib_assign('', list, (list.length-1), '=', ('and '+ _proxy_jslib_handle(list, (list.length-1), 0, 0)));}
raw=list.join(', ');break;case'x':var x=args.pop();var line=null;var src=null;try{if(typeof( _proxy_jslib_handle(x, ('line'), 0, 0))!='undefined'){line=x.line;}else if(typeof( _proxy_jslib_handle(x, ('lineNumber'), 0, 0))!='undefined'){line=x.lineNumber;}
if(typeof( _proxy_jslib_handle(x, ('sourceURL'), 0, 0))!='undefined'){ src= _proxy_jslib_assign_rval('', 'src', '=', ( _proxy_jslib_handle(x, ('sourceURL'), 0, 0)), src);}else if(typeof( _proxy_jslib_handle(x, ('fileName'), 0, 0))!='undefined'){ src= _proxy_jslib_assign_rval('', 'src', '=', ( _proxy_jslib_handle(x, ('fileName'), 0, 0)), src);}}catch(exception){}
var s='[An Exception]';try{s=x.message|| _proxy_jslib_handle(x, 'toString', '', 1, 0)();}catch(exception){}
raw=s+' [at '+Stack.frameSrcToString( _proxy_jslib_handle(null, 'src', src, 0, 0),line)+']';break;default:raw="%"+ _proxy_jslib_handle(pattern, (ii), 0, 0).charAt(pos+1);break;}
if(padSize!==null){if(raw.length<Math.abs(padSize)){var padding='';var padlen=(Math.abs(padSize)-raw.length);for(var ll=0;ll<padlen;ll++){padding+=padChar;}
if(padSize<0){raw+=padding;}else{raw=padding+raw;}}}
if(maxSize!==null){if(raw.length>maxSize){raw=raw.substr(0,maxSize);}}
result+=raw+ _proxy_jslib_handle(pattern, (ii), 0, 0).substring(pos+1);}
if(args.length>1){Util.log('Too many arguments ('+(args.length-1)+' extras) were passed to '+'sprintf(). Pattern was: `'+(arguments[0])+'\'.','error');}
return result;}

window.onloadRegister=function(handler) {window.loaded?_runHook(handler):_addHook('onloadhooks',handler);};function onafterloadRegister(handler) {window.loaded?_runHook(handler):_addHook('onafterloadhooks',handler);}
function _include_quickling_events_default() {return!window.loading_page_chrome;}
function onbeforeunloadRegister(handler,include_quickling_events) {if(include_quickling_events===undefined){include_quickling_events=_include_quickling_events_default();}
if(include_quickling_events){_addHook('onbeforeleavehooks',handler);}else{_addHook('onbeforeunloadhooks',handler);}}
function onunloadRegister(handler,include_quickling_events) {if(include_quickling_events===undefined){include_quickling_events=_include_quickling_events_default();}
if(include_quickling_events){_addHook('onleavehooks',handler);}else{_addHook('onunloadhooks',handler);}}
function _onloadHook() {window.loading_begun=true;!window.loaded&&window.Env&&(Env.t_willonloadhooks=(new (Date)()).getTime());_runHooks('onloadhooks');!window.loaded&&window.Env&&(Env.t_doneonloadhooks=(new (Date)()).getTime());window.loaded=true;}
function _runHook(handler) {try{handler();}catch(ex){Util.error('Uncaught exception in hook (run after page load): %x',ex);}}
function _runHooks(hooks) {var isbeforeunload=hooks=='onbeforeleavehooks'||hooks=='onbeforeunloadhooks';var warn=null;do{var h= _proxy_jslib_handle(window, (hooks), 0, 0);if(!isbeforeunload){ _proxy_jslib_assign('', window, (hooks), '=', (null));}
if(!h){break;}
for(var ii=0;ii<h.length;ii++){try{if(isbeforeunload){warn=warn|| _proxy_jslib_handle(h, (ii), 1, 0)();}else{ _proxy_jslib_handle(h, (ii), 1, 0)();}}catch(ex){Util.error('Uncaught exception in hook (%q) %q: %x',hooks, _proxy_jslib_handle(h, (ii), 0, 0),ex);}}
if(isbeforeunload){break;}}while( _proxy_jslib_handle(window, (hooks), 0, 0));if(isbeforeunload&&warn){return warn;}}
function _addHook(hooks,handler) {( _proxy_jslib_handle(window, (hooks), 0, 0)? _proxy_jslib_handle(window, (hooks), 0, 0):( _proxy_jslib_assign('', window, (hooks), '=', ([])))).push(handler);}
function removeHook(hooks) { _proxy_jslib_assign('', window, (hooks), '=', ([]));}
function _bootstrapEventHandlers() {if(document.addEventListener){if(ua.safari()){var timeout= _proxy_jslib_handle(null, 'setInterval', setInterval, 1, 0)(function() {if(/loaded|complete/.test(document.readyState)){(window.Env&&(Env.t_domcontent=(new (Date)()).getTime()));_onloadHook();clearTimeout(timeout);}},3);}else{document.addEventListener("DOMContentLoaded",function() {(window.Env&&(Env.t_domcontent=(new (Date)()).getTime()));_onloadHook();},true);}}else{var src='javascript:void(0)';if( _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'protocol', '', 0, 0)=='https:'){ src= _proxy_jslib_assign_rval('', 'src', '=', ('//:'), src);}
 _proxy_jslib_handle(document, 'write', '', 1, 0)('<script onreadystatechange="if (this.readyState==\'complete\') {'+'(window.Env&&(Env.t_domcontent=(new Date()).getTime()));'+'this.parentNode.removeChild(this);_onloadHook();}" defer="defer" '+'src="'+ _proxy_jslib_handle(null, 'src', src, 0, 0)+'"><\/script\>');}
window.onload=chain(window.onload,function() {(window.Env&&(Env.t_layout=(new (Date)()).getTime()));var force_layout=document&& _proxy_jslib_handle(document, 'body', '', 0, 0)&& _proxy_jslib_handle(document, 'body', '', 0, 0).offsetWidth;(window.Env&&(Env.t_onload=(new (Date)()).getTime()));_onloadHook();_runHooks('onafterloadhooks');});window.onbeforeunload=function() {var warn=_runHooks('onbeforeleavehooks')||_runHooks('onbeforeunloadhooks');if(!warn){window.loaded=false;}
return warn;};window.onunload=chain(window.onunload,function() {_runHooks('onleavehooks');_runHooks('onunloadhooks');});}
function keep_window_set_as_loaded() {if(window.loaded==false){window.loaded=true;_runHooks('onloadhooks');_runHooks('onafterloadhooks');}}

function EventController(eventResponderObject) {copy_properties(this,{_queue:[],_ready:false,_responder:eventResponderObject});};copy_properties(EventController.prototype,{startQueue:function() {this._ready=true;this.dispatchEvents();return this;},pauseQueue:function() {this._ready=false;return this;},addEvent:function(event) {event=event.toLowerCase();var args=[];for(var ii=1;ii<arguments.length;ii++){args.push( _proxy_jslib_handle(arguments, (ii), 0, 0));}
this._queue.push({type:event,args:args});if(this._ready){this.dispatchEvents();}
return false;},dispatchEvents:function() {if(!this._responder){throw new (Error)('No event responder.');}
for(var ii=0;ii<this._queue.length;ii++){var evtName='on'+ _proxy_jslib_handle(this._queue, (ii), 0, 0).type;if(typeof( _proxy_jslib_handle(this._responder, (evtName), 0, 0))!='function'&&typeof( _proxy_jslib_handle(this._responder, (evtName), 0, 0))!='null'){throw new (Error)('No event handler.');}else{if( _proxy_jslib_handle(this._responder, (evtName), 0, 0)){ _proxy_jslib_handle(this._responder, (evtName), 0, 0).apply(this._responder, _proxy_jslib_handle(this._queue, (ii), 0, 0).args);}}}
this._queue=[];}});

function adjustUABehaviors() {onloadRegister(addSafariLabelSupport);if(ua.ie()<7){try{ _proxy_jslib_handle(document, 'execCommand', '', 1, 0)('BackgroundImageCache',false,true);}catch(ignored){}}}
function addSafariLabelSupport(base) {if(ua.safari()<500){var labels= _proxy_jslib_handle((base|| _proxy_jslib_handle(document, 'body', '', 0, 0)), 'getElementsByTagName', '', 1, 0)("label");for(i=0;i<labels.length;i++){ _proxy_jslib_handle(labels, (i), 0, 0).addEventListener('click',addLabelAction,true);}}}
function addLabelAction(event) {var id=this.getAttribute('for');var item=null;if(id){item= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(id);}else{item= _proxy_jslib_handle(this, 'getElementsByTagName', '', 1, 0)('input')[0];}
if(!item||event.srcElement==item){return;}
if(item.type=='checkbox'){item.checked=!item.checked;}else if(item.type=='radio'){var radios= _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('input');for(i=0;i<radios.length;i++){if( _proxy_jslib_handle(radios, (i), 0, 0).name==item.name&& _proxy_jslib_handle(radios, (i), 0, 0).form==item.form){radios.checked=false;}}
item.checked=true;}else{item.focus();}
if(item.onclick){item.onclick(event);}}

function setCookie(cookieName,cookieValue,nDays) {if(nDays){var today=new (Date)();var expire=new (Date)();expire.setTime(today.getTime()+3600000*24*nDays);}
 _proxy_jslib_assign('', document, 'cookie', '=', (cookieName+"="+encodeURIComponent(cookieValue)+"; "+
(nDays?"expires="+expire.toGMTString()+"; ":"")+"path=/; domain=.facebook.com"));}
function clearCookie(cookieName) { _proxy_jslib_assign('', document, 'cookie', '=', (cookieName+"=; expires=Mon, 26 Jul 1997 05:00:00 GMT; path=/; domain=.facebook.com"));}
function getCookie(name) {var nameEQ=name+"=";var ca= _proxy_jslib_handle(document, 'cookie', '', 0, 0).split(';');for(i=0;i<ca.length;i++){var c= _proxy_jslib_handle(ca, (i), 0, 0);while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0){return decodeURIComponent(c.substring(nameEQ.length,c.length))}}
return null;}

function html_wordwrap(str,wrap_limit,txt_fn) {if(typeof wrap_limit=='undefined'){wrap_limit=60;}
if(typeof txt_fn!='function'){txt_fn=htmlize;}
var regex=new (RegExp)("\\S{"+(wrap_limit+1)+"}",'g');var start=0;var str_remaining=str;var ret_arr=[];var matches=str.match(regex);if(matches){for(var i=0;i<matches.length;i++){var match= _proxy_jslib_handle(matches, (i), 0, 0);var match_index=start+str_remaining.indexOf(match);var chunk=str.substring(start,match_index);if(chunk){ret_arr.push(txt_fn(chunk));}
ret_arr.push(txt_fn(match)+'<wbr/>');start=match_index+match.length;str_remaining=str.substring(start);}}
if(str_remaining){ret_arr.push(txt_fn(str_remaining));}
return ret_arr.join('');}
function text_get_hyperlinks(str) {if(typeof(str)!='string'){return[];}
return str.match(/(?:(?:ht|f)tps?):\/\/[^\s<]*[^\s<\.)]/ig);}
function html_hyperlink(str,txt_fn,url_fn) {var accepted_delims={'<':'>','*':'*','{':'}','[':']',"'":"'",'"':'"','#':'#','+':'+','-':'-','(':')'};if(typeof(str)=='undefined'||! _proxy_jslib_handle(str, 'toString', '', 0, 0)){return'';}
if(typeof txt_fn!='function'){txt_fn=htmlize;}
if(typeof url_fn!='function'){url_fn=htmlize;}
var str= _proxy_jslib_handle(str, 'toString', '', 1, 0)();var http_matches=text_get_hyperlinks(str);var start=0;var str_remaining=str;var ret_arr=[];var str_remaining=str;if(http_matches){for(var i=0;i<http_matches.length;i++){var http_url= _proxy_jslib_handle(http_matches, (i), 0, 0);var http_index=start+str_remaining.indexOf(http_url);var str_len=http_url.length;var non_url=str.substring(start,http_index);if(non_url){ret_arr.push(txt_fn(non_url));}
var trailing='';if(http_index>0){var delim= _proxy_jslib_handle(str, (http_index-1), 0, 0);if(typeof  _proxy_jslib_handle(accepted_delims, (delim), 0, 0)!='undefined'){var end_delim= _proxy_jslib_handle(accepted_delims, (delim), 0, 0);var end_delim_index=http_url.indexOf(end_delim);if(end_delim_index!=-1){trailing=txt_fn(http_url.substring(end_delim_index));http_url=http_url.substring(0,end_delim_index);}}}
http_str=url_fn(http_url);http_url_quote_escape= _proxy_jslib_handle(http_url, 'replace', '', 1, 0)(/"/g,'%22');ret_arr.push('<a href="'+http_url_quote_escape+'" target="_blank" rel="nofollow">'+
http_str+'</a>'+trailing);start=http_index+str_len;str_remaining=str.substring(start);}}
if(str_remaining){ret_arr.push(txt_fn(str_remaining));}
return ret_arr.join('');}
function nl2br(text) {if(typeof(text)=='undefined'||! _proxy_jslib_handle(text, 'toString', '', 0, 0)){return'';}
return  _proxy_jslib_handle( _proxy_jslib_handle(text, 'toString', '', 1, 0)(), 'replace', '', 1, 0)(/\n/g,'<br />');}
function is_email(email) {return/^([\w!.%+\-])+@([\w\-])+(?:\.[\w\-]+)+$/.test(email);}

function URI(uri) {if(uri===window){Util.error('what the hell are you doing');return;}
if(this===window){return new (URI)(uri|| _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0));}
this.parse(uri||'');}
copy_properties(URI,{getRequestURI:function(respect_page_transitions) {respect_page_transitions=respect_page_transitions===undefined||respect_page_transitions;if(respect_page_transitions&&window.PageTransitions){return PageTransitions.getCurrentURI().getQualifiedURI();}else{return new (URI)( _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0));}},expression:/(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/,arrayQueryExpression:/^(\w+)((?:\[\w*\])+)=?(.*)/,explodeQuery:function(q) {if(!q){return{};}
var ii,result={};q=q.split('&');for(ii=0,l=q.length;ii<l;ii++){var match= _proxy_jslib_handle(q, (ii), 0, 0).match(URI.arrayQueryExpression);if(!match){var term= _proxy_jslib_handle(q, (ii), 0, 0).split('='); _proxy_jslib_assign('', result, (URI.decodeComponent(term[0])), '=', (term[1]===undefined?null:URI.decodeComponent(term[1])));}else{var indices=match[2].split(/\]\[|\[|\]/).slice(0,-1);var name=match[1];var value=URI.decodeComponent(match[3]||'');indices[0]=name;var resultNode=result;for(var i=0;i<indices.length-1;i++){if( _proxy_jslib_handle(indices, (i), 0, 0)){if( _proxy_jslib_handle(resultNode, ( _proxy_jslib_handle(indices, (i), 0, 0)), 0, 0)===undefined){if( _proxy_jslib_handle(indices, (i+1), 0, 0)&&! _proxy_jslib_handle(indices, (i+1), 0, 0).match(/\d+$/)){ _proxy_jslib_assign('', resultNode, ( _proxy_jslib_handle(indices, (i), 0, 0)), '=', ({}));}else{ _proxy_jslib_assign('', resultNode, ( _proxy_jslib_handle(indices, (i), 0, 0)), '=', ([]));}}
resultNode= _proxy_jslib_handle(resultNode, ( _proxy_jslib_handle(indices, (i), 0, 0)), 0, 0);}else{if( _proxy_jslib_handle(indices, (i+1), 0, 0)&&! _proxy_jslib_handle(indices, (i+1), 0, 0).match(/\d+$/)){resultNode.push({});}else{resultNode.push([]);}
resultNode= _proxy_jslib_handle(resultNode, (resultNode.length-1), 0, 0);}}
if(resultNode instanceof Array&& _proxy_jslib_handle(indices, (indices.length-1), 0, 0)==''){resultNode.push( _proxy_jslib_handle(null, 'value', value, 0, 0));}else{ _proxy_jslib_assign('', resultNode, ( _proxy_jslib_handle(indices, (indices.length-1), 0, 0)), '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));}}}
return result;},implodeQuery:function(obj,name) {name=name||'';var r=[];if(obj===null){r.push(URI.encodeComponent(name));}else if(obj instanceof Array){for(var ii=0;ii<obj.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){try{if( _proxy_jslib_handle(obj, (ii), 0, 0)!==undefined){r.push(URI.implodeQuery( _proxy_jslib_handle(obj, (ii), 0, 0),name?(name+'['+ii+']'):ii));}}catch(ignored){}}}else if(typeof(obj)=='object'){if(is_node(obj)){r.push('{node}');}else{for(var k in obj){try{if( _proxy_jslib_handle(obj, (k), 0, 0)!==undefined){r.push(URI.implodeQuery( _proxy_jslib_handle(obj, (k), 0, 0),name?(name+'['+k+']'):k));}}catch(ignored){}}}}else{r.push(URI.encodeComponent(name)+'='+URI.encodeComponent(obj));}
return r.join('&');},encodeComponent:function(raw) {var parts=String(raw).split(/([\[\]])/);for(var i=0,l=parts.length;i<l;i+=2){ _proxy_jslib_assign('', parts, (i), '=', (window.encodeURIComponent( _proxy_jslib_handle(parts, (i), 0, 0))));}
return parts.join('');},decodeComponent:function(encoded_s) {return window.decodeURIComponent( _proxy_jslib_handle(encoded_s, 'replace', '', 1, 0)(/\+/g,' '));}});copy_properties(URI.prototype,{parse:function(uri) {var m= _proxy_jslib_handle(uri, 'toString', '', 1, 0)().match(URI.expression);copy_properties(this,{protocol:m[3]||'',domain:m[4]||'',port:m[6]||'',path:m[7]||'',query_s:m[9]||'',fragment:m[11]||''});return this;},setProtocol:function(p) { _proxy_jslib_assign('', this, 'protocol', '=', (p));return this;},getProtocol:function() {return  _proxy_jslib_handle(this, 'protocol', '', 0, 0);},setQueryData:function(o) {this.query_s=URI.implodeQuery(o);return this;},addQueryData:function(o) {return this.setQueryData(copy_properties(this.getQueryData(),o));},removeQueryData:function(keys) {if(!(keys instanceof Array)){keys=[keys];}
var query=this.getQueryData();for(var i=0,l=keys.length;i<l;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){ _proxy_jslib_assign('delete', (query), ( _proxy_jslib_handle(keys, (i), 0, 0)), '');}
return this.setQueryData(query);},getQueryData:function() {return URI.explodeQuery(this.query_s);},setFragment:function(f) {this.fragment=f;return this;},getFragment:function() {return this.fragment;},setDomain:function(d) { _proxy_jslib_assign('', this, 'domain', '=', (d));return this;},getDomain:function() {return  _proxy_jslib_handle(this, 'domain', '', 0, 0);},setPort:function(p) { _proxy_jslib_assign('', this, 'port', '=', (p));return this;},getPort:function() {return  _proxy_jslib_handle(this, 'port', '', 0, 0);},setPath:function(p) {this.path=p;return this;},getPath:function() {return  _proxy_jslib_handle(this.path, 'replace', '', 1, 0)(/^\/+/,'/');},toString:function() {var r=''; _proxy_jslib_handle(this, 'protocol', '', 0, 0)&&(r+= _proxy_jslib_handle(this, 'protocol', '', 0, 0)+'://'); _proxy_jslib_handle(this, 'domain', '', 0, 0)&&(r+= _proxy_jslib_handle(this, 'domain', '', 0, 0)); _proxy_jslib_handle(this, 'port', '', 0, 0)&&(r+=':'+ _proxy_jslib_handle(this, 'port', '', 0, 0));if( _proxy_jslib_handle(this, 'domain', '', 0, 0)&&!this.path){r+='/';}
this.path&&(r+=this.path);this.query_s&&(r+='?'+this.query_s);this.fragment&&(r+='#'+this.fragment);return r;},valueOf:function() {return  _proxy_jslib_handle(this, 'toString', '', 1, 0)();},isFacebookURI:function() {return! _proxy_jslib_handle(this, 'domain', '', 0, 0)||!! _proxy_jslib_handle(this, 'domain', '', 0, 0).match(/(^|\.)facebook\.com$/i);},getUnqualifiedURI:function() {return new (URI)(this).setProtocol(null).setDomain(null).setPort(null);},getQualifiedURI:function() {var uri=new (URI)(this);if(!uri.getDomain()){var current=URI();uri.setProtocol(current.getProtocol()).setDomain(current.getDomain()).setPort(current.getPort());}
return uri;},isSameOrigin:function(asThisURI) {var uri=asThisURI|| _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0);if(!(uri instanceof URI)){uri=new (URI)( _proxy_jslib_handle(uri, 'toString', '', 1, 0)());}
if(this.getProtocol()&&this.getProtocol()!=uri.getProtocol()){return false;}
if(this.getDomain()&&this.getDomain()!=uri.getDomain()){return false;}
return true;},coerceToSameOrigin:function(targetURI) {var uri=targetURI|| _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0);if(!(uri instanceof URI)){uri=new (URI)( _proxy_jslib_handle(uri, 'toString', '', 1, 0)());}
if(this.isSameOrigin(uri)){return true;}
if(this.getProtocol()!=uri.getProtocol()){return false;}
var dst=uri.getDomain().split('.');var src=this.getDomain().split('.');if(dst.pop()=='com'&& _proxy_jslib_handle(null, 'src', src, 0, 0).pop()=='com'){if(dst.pop()=='facebook'&& _proxy_jslib_handle(null, 'src', src, 0, 0).pop()=='facebook'){this.setDomain(uri.getDomain());return true;}}
return false;},go:function() { _proxy_jslib_assign('',  _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '=', (this));},setSubdomain:function(subdomain) {var uri=new (URI)(this).getQualifiedURI();var domains=uri.getDomain().split('.');if(domains.length<=2){domains.unshift(subdomain);}else{domains[0]=subdomain;}
return uri.setDomain(domains.join('.'));},getSubdomain:function() {if(!this.getDomain()){return'';}
if(!this.isFacebookURI()){return null;}
var domains=this.getDomain().split('.');if(domains.length<=2){return'';}else{return domains[0];}}});

var Emote={_initialized:false,_imageBase:null,_emoteMap:null,_emoteOrderMap:null,_imageURLs:null,_regex:null,initImageURL:function(imageURL) {Emote._imageURL=imageURL;},_init:function() {var staticBase=env_get('static_base');Emote._imageBase=staticBase+'images/emote/';Emote._blankImgSrc=staticBase+'images/blank.gif';var emoteOrder=['smile','frown','tongue','grin','gasp','wink','glasses','sunglasses','grumpy','unsure','cry','devil','angel','kiss','heart','kiki','squint','confused','upset','pacman','colonthree'];Emote._emoteMap={':-)':['\\:\\-\\)','smile'],':)':['\\:\\)','smile'],':]':['\\:\\]','smile'],'=)':['=\\)','smile'],':-(':['\\:\\-\\(','frown'],':(':['\\:\\(','frown'],':[':['\\:\\[','frown'],'=(':['=\\(','frown'],':-P':['\\:\\-P','tongue'],':P':['\\:P','tongue'],':-p':['\\:\\-p','tongue'],':p':['\\:p','tongue'],'=P':['=P','tongue'],':-D':['\\:\\-D','grin'],':D':['\\:D','grin'],'=D':['=D','grin'],':-O':['\\:\\-O','gasp'],':O':['\\:O','gasp'],':-o':['\\:\\-o','gasp'],':o':['\\:o','gasp'],';-)':['\\;\\-\\)','wink'],';)':['\\;\\)','wink'],'8-)':['8\\-\\)','glasses'],'8)':['8\\)','glasses'],'B-)':['B\\-\\)','glasses'],'B)':['B\\)','glasses'],'8-|':['8\\-\\|','sunglasses'],'8|':['8\\|','sunglasses'],'B-|':['B\\-\\|','sunglasses'],'B|':['B\\|','sunglasses'],'>:(':['>\\:\\(','grumpy'],'>:-(':['>\\:\\-\\(','grumpy'],':/':['\\:/','unsure'],':-/':['\\:\\-/','unsure'],':\\':['\\:\\\\','unsure'],':-\\':['\\:\\-\\\\','unsure'],":'(":["\\:'\\(",'cry'],'3:)':['3\\:\\)','devil'],'3:-)':['3\\:\\-\\)','devil'],'O:)':['O\\:\\)','angel'],'O:-)':['O\\:\\-\\)','angel'],':-*':['\\:\\-\\*','kiss'],':*':['\\:\\*','kiss'],'<3':['<3','heart'],'^_^':['\\^_\\^','kiki'],'-_-':['\\-_\\-','squint'],'o.O':['o\\.O','confused'],'O.o':['O\\.o','confused'],'>:O':['>\\:O','upset'],'>:-O':['>\\:\\-O','upset'],'>:o':['>\\:o','upset'],'>:-o':['>\\:\\-o','upset'],':v':['\\:v','pacman'],':|]':['\\:\\|\\]','robot'],':3':['\\:3','colonthree'],':putnam:':['\\:putnam\\:','putnam']};var regexArr=[];for(var match in Emote._emoteMap){regexArr.push( _proxy_jslib_handle(Emote._emoteMap, (match), 0, 0)[0]);}
var regexStr='(?:^|\\s|\'|"|\\.)('+regexArr.join('|')+')(?:\\s|\'|"|\\.|,|!|\\?|$)';Emote._regex=new (RegExp)(regexStr);Emote._emoteOrderMap={};for(var i=0;i<emoteOrder.length;i++){ _proxy_jslib_assign('', Emote._emoteOrderMap, ( _proxy_jslib_handle(emoteOrder, (i), 0, 0)), '=', (i));}
Emote._initialized=true;},htmlEmote:function(str,txtFn) {if(typeof txtFn!='function'){txtFn=htmlize;}
if(!Emote._initialized){Emote._init();}
var start=0;var strRemaining=str;var retArr=[];while(true){var matchObj=Emote._regex.exec(strRemaining);if(!matchObj||!matchObj.length){break;}
var match=matchObj[1];var matchKey= _proxy_jslib_handle(Emote._emoteMap, (match), 0, 0)[1];var matchIndex=strRemaining.indexOf(match);var chunk=strRemaining.substring(0,matchIndex);if(chunk){retArr.push(txtFn(chunk));}
retArr.push('<span class="emote_text">');retArr.push(match);retArr.push('</span><img class="emote_img" ');var matchOrder;if(typeof(matchOrder= _proxy_jslib_handle(Emote._emoteOrderMap, (matchKey), 0, 0))=='undefined'){retArr.push('src="');retArr.push(Emote._imageBase);retArr.push(matchKey);retArr.push('.gif" ');}else{var matchPos=matchOrder*-16;retArr.push('src="');retArr.push(Emote._blankImgSrc);retArr.push('" style="background:url(');retArr.push(Emote._imageURL);retArr.push(') ');retArr.push(matchPos);retArr.push('px top no-repeat" ');}
retArr.push('alt="');retArr.push(match);retArr.push('" />');strRemaining=strRemaining.substring(matchIndex+match.length);}
if(strRemaining){retArr.push(txtFn(strRemaining));}
return retArr.join('');}};

var Configurable={getOption:function(opt) {if(typeof( _proxy_jslib_handle(this.option, (opt), 0, 0))=='undefined'){Util.warn('Failed to get option %q; it does not exist.',opt);return null;}
return  _proxy_jslib_handle(this.option, (opt), 0, 0);},setOption:function(opt,v) {if(typeof( _proxy_jslib_handle(this.option, (opt), 0, 0))=='undefined'){Util.warn('Failed to set option %q; it does not exist.',opt);}else{ _proxy_jslib_assign('', this.option, (opt), '=', (v));}
return this;},getOptions:function() {return this.option;}};

function Vector2(x,y,domain) {copy_properties(this,{x:parseFloat(x),y:parseFloat(y),domain: _proxy_jslib_handle(null, 'domain', domain, 0, 0)||'pure'});};copy_properties(Vector2.prototype,{toString:function() {return'('+this.x+', '+this.y+')';},add:function(vx,vy) {var x=this.x,y=this.y,l=arguments.length;if(l==1){if( _proxy_jslib_handle(vx, 'domain', '', 0, 0)!='pure'){vx=vx.convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));}
x+=vx.x;y+=vx.y;}else if(l==2){x+=parseFloat(vx);y+=parseFloat(arguments[1]);}else{Util.warn('Vector2.add called with %d arguments, should be one (a vector) or '+'two (x and y coordinates).',l);}
return new (Vector2)(x,y, _proxy_jslib_handle(this, 'domain', '', 0, 0));},mul:function(sx,sy) {if(typeof(sy)=="undefined"){sy=sx;}
return new (Vector2)(this.x*sx,this.y*sy, _proxy_jslib_handle(this, 'domain', '', 0, 0));},sub:function(v) {var x=this.x,y=this.y,l=arguments.length;if(l==1){if( _proxy_jslib_handle(v, 'domain', '', 0, 0)!='pure'){v=v.convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));}
x-=v.x;y-=v.y;}else if(l==2){x-=parseFloat(v);y-=parseFloat(arguments[1]);}else{Util.warn('Vector2.add called with %d arguments, should be one (a vector) or '+'two (x and y coordinates).',l);}
return new (Vector2)(x,y, _proxy_jslib_handle(this, 'domain', '', 0, 0));},distanceTo:function(v) {return this.sub(v).magnitude();},magnitude:function() {return Math.sqrt((this.x*this.x)+(this.y*this.y));},convertTo:function(newDomain) {if(newDomain!='pure'&&newDomain!='viewport'&&newDomain!='document'){Util.error('Domain %q is not valid; legitimate coordinate domains are %q, %q, '+'%q.',newDomain,'pure','viewport','document');return new (Vector2)(0,0);}
if(newDomain== _proxy_jslib_handle(this, 'domain', '', 0, 0)){return new (Vector2)(this.x,this.y, _proxy_jslib_handle(this, 'domain', '', 0, 0));}
if(newDomain=='pure'){return new (Vector2)(this.x,this.y);}
if( _proxy_jslib_handle(this, 'domain', '', 0, 0)=='pure'){Util.error('Unable to covert a pure vector to %q coordinates; a pure vector is '+'abstract and does not exist in any document coordinate system. If '+'you need to hack around this, create the vector explicitly in some '+'document coordinate domain, by passing a third argument to the '+'constructor. But you probably don\'t, and are just using the class '+'wrong. Stop doing that.',newDomain);return new (Vector2)(0,0);}
var o=Vector2.getScrollPosition('document');var x=this.x,y=this.y;if( _proxy_jslib_handle(this, 'domain', '', 0, 0)=='document'){x-=o.x;y-=o.y;}else{x+=o.x;y+=o.y;}
return new (Vector2)(x,y,newDomain);},setElementPosition:function(el) {var p=this.convertTo('document');el.style.left=parseInt(p.x)+'px'; _proxy_jslib_assign('', el.style, 'top', '=', (parseInt(p.y)+'px'));return this;},setElementDimensions:function(el) {return this.setElementWidth(el).setElementHeight(el);},setElementWidth:function(el) {el.style.width=parseInt(this.x,10)+'px';return this;},setElementHeight:function(el) {el.style.height=parseInt(this.y,10)+'px';return this;}});copy_properties(Vector2,{compass:{east:'e',west:'w',north:'n',south:'s',center:'center',northeast:'ne',northwest:'nw',southeast:'se',southwest:'sw'},getEventPosition:function(e,domain) { domain= _proxy_jslib_assign_rval('', 'domain', '=', ( _proxy_jslib_handle(null, 'domain', domain, 0, 0)||'document'), domain);e=event_get(e);var x=e.pageX||(e.clientX+
(document.documentElement.scrollLeft|| _proxy_jslib_handle(document, 'body', '', 0, 0).scrollLeft));var y=e.pageY||(e.clientY+
(document.documentElement.scrollTop|| _proxy_jslib_handle(document, 'body', '', 0, 0).scrollTop));var v=new (Vector2)(x,y,'document');if(DOMScroll.getScrollWrapper()){v=v.add(Vector2.getScrollPosition());}
return v.convertTo( _proxy_jslib_handle(null, 'domain', domain, 0, 0));},getScrollPosition:function(domain) { domain= _proxy_jslib_assign_rval('', 'domain', '=', ( _proxy_jslib_handle(null, 'domain', domain, 0, 0)||'document'), domain);var wrapper=DOMScroll.getScrollWrapper();if(wrapper){var x=wrapper.scrollLeft;var y=wrapper.scrollTop;}else{var x= _proxy_jslib_handle(document, 'body', '', 0, 0).scrollLeft||document.documentElement.scrollLeft;var y= _proxy_jslib_handle(document, 'body', '', 0, 0).scrollTop||document.documentElement.scrollTop;}
return(new (Vector2)(x,y,'document').convertTo( _proxy_jslib_handle(null, 'domain', domain, 0, 0)));},getElementPosition:function(el,domain) { domain= _proxy_jslib_assign_rval('', 'domain', '=', ( _proxy_jslib_handle(null, 'domain', domain, 0, 0)||'document'), domain);if(!el){return;}
if(ua.safari()<500&&el.tagName=='TR'){el=el.firstChild;}
var left=el.offsetLeft;var top=el.offsetTop;var op=el.offsetParent;var root=DOMScroll.getScrollWrapper()|| _proxy_jslib_handle(document, 'body', '', 0, 0);var fixed=false;while(el.parentNode&&root!=el.parentNode&& _proxy_jslib_handle(document, 'body', '', 0, 0)!=el.parentNode){el=el.parentNode;if(!isNaN(el.scrollTop)){if(!(ua.opera()<9.50)||! _proxy_jslib_handle(operaIgnoreScroll, (window.getComputedStyle(el,'').getPropertyValue('display')), 0, 0)){ top= _proxy_jslib_assign_rval('', 'top', '-=', (el.scrollTop), top);left-=el.scrollLeft;}}
if(op==el){if(ua.safari()<500&&el.tagName=='TR'){ top= _proxy_jslib_assign_rval('', 'top', '+=', (el.firstChild.offsetTop), top);left+=el.firstChild.offsetLeft;}else{ top= _proxy_jslib_assign_rval('', 'top', '+=', (el.offsetTop), top);left+=el.offsetLeft;}
op=el.offsetParent;}
if(op&&CSS.getStyle(op,'position')=='fixed'){fixed=true; top= _proxy_jslib_assign_rval('', 'top', '+=', (op.offsetTop), top);left+=op.offsetLeft;break;}}
if(fixed){var scrollPosition=Vector2.getScrollPosition('document');left+=scrollPosition.x; top= _proxy_jslib_assign_rval('', 'top', '+=', (scrollPosition.y), top);}
return(new (Vector2)(left, _proxy_jslib_handle(null, 'top', top, 0, 0),'document').convertTo( _proxy_jslib_handle(null, 'domain', domain, 0, 0)));},getElementDimensions:function(el,useClient) {if(ua.safariPreWebkit()&&el.nodeName=='TR'){var tds= _proxy_jslib_handle(el, 'getElementsByTagName', '', 1, 0)('td');var dimensions=Vector2.getElementCompassPoint( _proxy_jslib_handle(tds, (tds.length-1), 0, 0),Vector2.compass.southeast,useClient).sub(Vector2.getElementPosition(tds[0],'document',useClient));return dimensions;}
var x=(useClient?el.clientWidth:el.offsetWidth)||0;var y=(useClient?el.clientHeight:el.offsetHeight)||0;return new (Vector2)(x,y);},getHiddenElementDimensions:function(el) {var element=$(el);var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;if(originalDisplay=='none'){els.visibility='hidden';els.position='absolute';els.display='block';}
var originalDimensions=Vector2.getElementDimensions(element);els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return originalDimensions;},getElementCompassPoint:function(el,which,useClient) {which=which||Vector2.compass.southeast;var p=Vector2.getElementPosition(el);var d=Vector2.getElementDimensions(el,useClient);var c=Vector2.compass;switch(which){case c.east:return p.add(d.x,d.y*.5);case c.west:return p.add(0,d.y*.5);case c.north:return p.add(d.x*.5,0);case c.south:return p.add(d.x*.5,d.y);case c.center:return p.add(d.mul(.5));case c.northwest:return p;case c.northeast:return p.add(d.x,0);case c.southwest:return p.add(0,d.y);case c.southeast:return p.add(d);}
Util.error('Unknown compass point %s.',which);return p;},getViewportDimensions:function() {var x=(window&&window.innerWidth)||(document&&document.documentElement&&document.documentElement.clientWidth)||(document&& _proxy_jslib_handle(document, 'body', '', 0, 0)&& _proxy_jslib_handle(document, 'body', '', 0, 0).clientWidth)||0;var y=(window&&window.innerHeight)||(document&&document.documentElement&&document.documentElement.clientHeight)||(document&& _proxy_jslib_handle(document, 'body', '', 0, 0)&& _proxy_jslib_handle(document, 'body', '', 0, 0).clientHeight)||0;return new (Vector2)(x,y,'viewport');},getDocumentDimensions:function() {var wrapper=DOMScroll.getScrollWrapper();var x=(wrapper&&wrapper.scrollWidth)||(document&&document.documentElement&&document.documentElement.scrollWidth)||(document&& _proxy_jslib_handle(document, 'body', '', 0, 0)&& _proxy_jslib_handle(document, 'body', '', 0, 0).scrollWidth)||0;var y=(wrapper&&wrapper.scrollHeight)||(document&&document.documentElement&&document.documentElement.scrollHeight)||(document&& _proxy_jslib_handle(document, 'body', '', 0, 0)&& _proxy_jslib_handle(document, 'body', '', 0, 0).scrollHeight)||0;return new (Vector2)(x,y,'document');}});var mouseX=function(e) {return Vector2.getEventPosition(e).x;}
var mouseY=function(e) {return Vector2.getEventPosition(e).y;}
var pageScrollX=function() {return Vector2.getScrollPosition().x;}
var pageScrollY=function() {return Vector2.getScrollPosition().y;}
var getViewportWidth=function() {return Vector2.getViewportDimensions().x;}
var getViewportHeight=function() {return Vector2.getViewportDimensions().y;}
var operaIgnoreScroll={'table':true,'inline-table':true,'inline':true};function elementX(obj) {return Vector2.getElementPosition(obj,'document').x;}
function elementY(obj) {return Vector2.getElementPosition(obj,'document').y;}

function Rect(t,r,b,l,domain) {if(this===window){if(t instanceof Rect){return t;}
return Rect.getElementBounds($(t));}
copy_properties(this,{t:t,r:r,b:b,l:l,domain: _proxy_jslib_handle(null, 'domain', domain, 0, 0)||'pure'});};copy_properties(Rect.prototype,{w:function() {return this.r-this.l;},h:function() {return this.b-this.t;},area:function() {return this.w()*this.h();},toString:function() {return'(('+this.l+', '+this.t+'), ('+this.r+', '+this.b+'))';},intersects:function(v) {v=Rect(v).convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));var u=this;if(u.l>v.r||v.l>u.r||u.t>v.b||v.t>u.b){return false;}
return true;},intersectingArea:function(v) {v=Rect(v).convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));var u=this;if(!this.intersects(v)){return null;}
return new (Rect)(Math.max(u.t,v.t),Math.min(u.r,v.r),Math.min(u.b,v.b),Math.max(u.l,v.l)).area();},contains:function(v) {v=Rect(v).convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));var u=this;if(v instanceof Vector2){return(u.l<=v.x&&u.r>=v.x&&u.t<=v.y&&u.b>=v.y);}else{return(u.l<=v.l&&u.r>=u.r&&u.t<=v.t&&u.b>=v.b);}},canContain:function(v) {v=Rect(v).convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));return(v.h()<=this.h())&&(v.w()<=this.w());},forceBelow:function(v,min) {min=min||0;v=Rect(v).convertTo( _proxy_jslib_handle(this, 'domain', '', 0, 0));if(v.b>this.t){return this.offset(0,(v.b-this.t)+min);}
return this;},offset:function(x,y) {return new (Rect)(this.t+y,this.r+x,this.b+y,this.l+x, _proxy_jslib_handle(this, 'domain', '', 0, 0));},expand:function(x,y) {return new (Rect)(this.t,this.r+x,this.b+y,this.l, _proxy_jslib_handle(this, 'domain', '', 0, 0));},scale:function(x,y) {y=y||x;return new (Rect)(this.t,this.l+(this.w()*x),this.t+(this.h()*y),this.l, _proxy_jslib_handle(this, 'domain', '', 0, 0));},setDimensions:function(x,y) {return new (Rect)(this.t,this.l+x,this.t+y,this.l, _proxy_jslib_handle(this, 'domain', '', 0, 0));},setPosition:function(x,y) {return new (Rect)(x,this.w(),this.h(),y, _proxy_jslib_handle(this, 'domain', '', 0, 0));},boundWithin:function(v) {if(v.contains(this)||!v.canContain(this)){return this;}
var x=0,y=0;if(this.l<v.l){x=v.l-this.l;}else if(this.r>v.r){x=v.r-this.r;}
if(this.t<v.t){y=v.t-this.t;}else if(this.b>v.b){y=v.b-this.b;}
return this.offset(x,y);},setElementBounds:function(el) {this.getPositionVector().setElementPosition(el);this.getDimensionVector().setElementDimensions(el);return this;},getPositionVector:function() {return new (Vector2)(this.l,this.t, _proxy_jslib_handle(this, 'domain', '', 0, 0));},getDimensionVector:function() {return new (Vector2)(this.w(),this.h(),'pure');},convertTo:function(newDomain) {if( _proxy_jslib_handle(this, 'domain', '', 0, 0)==newDomain){return this;}
if(newDomain=='pure'){return new (Rect)(this.t,this.r,this.b,this.l,'pure');}
if( _proxy_jslib_handle(this, 'domain', '', 0, 0)=='pure'){Util.error('Unable to convert a pure rect to %q coordinates.',newDomain);return new (Rect)(0,0,0,0);}
var p=new (Vector2)(this.l,this.t, _proxy_jslib_handle(this, 'domain', '', 0, 0)).convertTo(newDomain);return new (Rect)(p.y,p.x+this.w(),p.y+this.h(),p.x,newDomain);},constrict:function(x,y) {if(typeof(y)=='undefined'){y=x;}
x=x||0;return new (Rect)(this.t+y,this.r-x,this.b-y,this.l+x, _proxy_jslib_handle(this, 'domain', '', 0, 0));},expandX:function() {return new (Rect)(this.t,Number.POSITIVE_INFINITY,this.b,Number.NEGATIVE_INFINITY);},expandY:function() {return new (Rect)(number.NEGATIVE_INFINITY,this.r,Number.POSITIVE_INFINITY,this.l);}});copy_properties(Rect,{newFromVectors:function(pos,dim) {return new (Rect)(pos.y,pos.x+dim.x,pos.y+dim.y,pos.x, _proxy_jslib_handle(pos, 'domain', '', 0, 0));},getElementBounds:function(el) {return Rect.newFromVectors(Vector2.getElementPosition(el),Vector2.getElementDimensions(el));},getViewportBounds:function() {return Rect.newFromVectors(Vector2.getScrollPosition(),Vector2.getViewportDimensions());},getDocumentBounds:function() {return Rect.newFromVectors(new (Vector2)(0,0,'document'),Vector2.getDocumentDimensions());}});

function rand32() {return Math.floor(Math.random()*4294967295);}

function Augment(name,generator) {this.name=name;this.generator=generator;this.properties=null;}
copy_properties(Augment.prototype,{augmentObject:function(target) {if(!target){return target;}
try{if(!target.__augment){target.__augment={};}
if(! _proxy_jslib_handle(target.__augment, (this.name), 0, 0)){ _proxy_jslib_assign('', target.__augment, (this.name), '=', (true));copy_properties(target,this.getProperties());}}catch(e){}
return target;},getProperties:function() {if(!this.properties){this.properties=this.generator();}
return this.properties;}});

var CSS={hasClass:function(element,className) {element=$(element);if(element&&className&&element.className){return new (RegExp)('\\b'+trim(className)+'\\b').test(element.className);}
return false;},addClass:function(element,className) {element=$(element);if(element&&className){if(!CSS.hasClass(element,className)){if(element.className){element.className+=' '+trim(className);}else{element.className=trim(className);}}}
return this;},removeClass:function(element,className) {element=$(element);if(element&&className&&element.className){className=trim(className);var regexp=new (RegExp)('\\b'+className+'\\b','g');element.className= _proxy_jslib_handle(element.className, 'replace', '', 1, 0)(regexp,'');}
return this;},conditionClass:function(element,className,shouldShow) {element=$(element);if(shouldShow){CSS.addClass(element,className);}else{CSS.removeClass(element,className);}},setClass:function(element,className) {element=$(element);element.className=className;return this;},toggleClass:function(element,className) {element=$(element);if(CSS.hasClass(element,className)){return CSS.removeClass(element,className);}else{return CSS.addClass(element,className);}},setStyle:function(element,name,value) { _proxy_jslib_assign('', element.style, (name), '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));return element;},getStyle:function(element,property) {element=$(element);function hyphenate(property) {return  _proxy_jslib_handle(property, 'replace', '', 1, 0)(/[A-Z]/g,function(match) {return'-'+match.toLowerCase();});}
if(window.getComputedStyle){return window.getComputedStyle(element,null).getPropertyValue(hyphenate(property));}
if(document.defaultView&&document.defaultView.getComputedStyle){var computedStyle=document.defaultView.getComputedStyle(element,null);if(computedStyle)
return computedStyle.getPropertyValue(hyphenate(property));if(property=="display")
return"none";Util.error("Can't retrieve requested style %q due to a bug in Safari",property);}
if(element.currentStyle){return  _proxy_jslib_handle(element.currentStyle, (property), 0, 0);}
return  _proxy_jslib_handle(element.style, (property), 0, 0);},setOpacity:function(element,opacity) {element=$(element);var opaque=(opacity==1);try{element.style.opacity=(opaque?'':''+opacity);}catch(ignored){}
try{element.style.filter=(opaque?'':'alpha(opacity='+(opacity*100)+')');}catch(ignored){}},getOpacity:function(element) {element=$(element);var opacity=CSS.getStyle(element,'filter');var val=null;if(opacity&&(val=/(\d+(?:\.\d+)?)/.exec(opacity))){return parseFloat(val.pop())/100;}else if(opacity=CSS.getStyle(element,'opacity')){return parseFloat(opacity);}else{return 1.0;}},Cursor:{kGrabbable:'grabbable',kGrabbing:'grabbing',kEditable:'editable',set:function(element,name) {element=$(element);element=element|| _proxy_jslib_handle(document, 'body', '', 0, 0);switch(name){case CSS.Cursor.kEditable:name='text';break;case CSS.Cursor.kGrabbable:if(ua.firefox()){name='-moz-grab';}else{name='move';}
break;case CSS.Cursor.kGrabbing:if(ua.firefox()){name='-moz-grabbing';}else{name='move';}
break;}
 _proxy_jslib_assign('', element.style, 'cursor', '=', (name));}}};

function getRadioFormValue(obj) {for(i=0;i<obj.length;i++){if( _proxy_jslib_handle(obj, (i), 0, 0).checked){return  _proxy_jslib_handle( _proxy_jslib_handle(obj, (i), 0, 0), 'value', '', 0, 0);}}
return null;}
function getElementsByTagNames(list,obj) {if(!obj)var obj=document;var tagNames=list.split(',');var resultArray=new (Array)();for(var i=0;i<tagNames.length;i++){var tags= _proxy_jslib_handle(obj, 'getElementsByTagName', '', 1, 0)( _proxy_jslib_handle(tagNames, (i), 0, 0));for(var j=0;j<tags.length;j++){resultArray.push( _proxy_jslib_handle(tags, (j), 0, 0));}}
var testNode=resultArray[0];if(!testNode)return[];if(testNode.sourceIndex){resultArray.sort(function(a,b) {return a.sourceIndex-b.sourceIndex;});}
else if(testNode.compareDocumentPosition){resultArray.sort(function(a,b) {return 3-(a.compareDocumentPosition(b)&6);});}
return resultArray;}
function get_all_form_inputs(root_element) {if(!root_element){root_element=document;}
return getElementsByTagNames('input,select,textarea,button',root_element);}
function get_form_select_value(select) {return  _proxy_jslib_handle( _proxy_jslib_handle(select.options, (select.selectedIndex), 0, 0), 'value', '', 0, 0);}
function set_form_select_value(select,value) {for(var i=0;i<select.options.length;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){if( _proxy_jslib_handle( _proxy_jslib_handle(select.options, (i), 0, 0), 'value', '', 0, 0)== _proxy_jslib_handle(null, 'value', value, 0, 0)){select.selectedIndex=i;break;}}}
function get_form_attr(form,attr) {var val= _proxy_jslib_handle(form, (attr), 0, 0);if(typeof val=='object'&&val.tagName=='INPUT'){var pn=val.parentNode,ns=val.nextSibling,node=val;pn.removeChild(node);val= _proxy_jslib_handle(form, (attr), 0, 0);ns?pn.insertBefore(node,ns):pn.appendChild(node);}
return val;}
function serialize_form_helper(data,name,value) {var match=/([^\]]+)\[([^\]]*)\](.*)/.exec(name);if(match){ _proxy_jslib_assign('', data, (match[1]), '=', ( _proxy_jslib_handle(data, (match[1]), 0, 0)||{}));if(match[2]==''){var i=0;while( _proxy_jslib_handle( _proxy_jslib_handle(data, (match[1]), 0, 0), (i), 0, 0)!=undefined){i++;}}else{i=match[2];}
if(match[3]==''){ _proxy_jslib_assign('',  _proxy_jslib_handle(data, (match[1]), 0, 0), (i), '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));}else{serialize_form_helper( _proxy_jslib_handle(data, (match[1]), 0, 0),i.concat(match[3]), _proxy_jslib_handle(null, 'value', value, 0, 0));}}else{ _proxy_jslib_assign('', data, (name), '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));}}
function serialize_form_fix(data) {var keys=[];for(var i in data){if(data instanceof Object){ _proxy_jslib_assign('', data, (i), '=', (serialize_form_fix( _proxy_jslib_handle(data, (i), 0, 0))));}
keys.push(i);}
var j=0,is_array=true;keys.sort().each(function(i) {if(i!=j++){is_array=false;}});if(is_array){var ret={};keys.each(function(i) { _proxy_jslib_assign('', ret, (i), '=', ( _proxy_jslib_handle(data, (i), 0, 0)));});return ret;}else{return data;}}
function serialize_form(obj) {var data={};var elements=obj.tagName=='FORM'?obj.elements:get_all_form_inputs(obj);for(var i=elements.length-1;i>=0;i--){if( _proxy_jslib_handle(elements, (i), 0, 0).name&&! _proxy_jslib_handle(elements, (i), 0, 0).disabled){if(! _proxy_jslib_handle(elements, (i), 0, 0).type||(( _proxy_jslib_handle(elements, (i), 0, 0).type=='radio'|| _proxy_jslib_handle(elements, (i), 0, 0).type=='checkbox')&& _proxy_jslib_handle(elements, (i), 0, 0).checked)|| _proxy_jslib_handle(elements, (i), 0, 0).type=='text'|| _proxy_jslib_handle(elements, (i), 0, 0).type=='password'|| _proxy_jslib_handle(elements, (i), 0, 0).type=='hidden'|| _proxy_jslib_handle(elements, (i), 0, 0).tagName=='TEXTAREA'|| _proxy_jslib_handle(elements, (i), 0, 0).tagName=='SELECT'){serialize_form_helper(data, _proxy_jslib_handle(elements, (i), 0, 0).name, _proxy_jslib_handle( _proxy_jslib_handle(elements, (i), 0, 0), 'value', '', 0, 0));}}}
return serialize_form_fix(data);}
function is_button(element) {var tagName=element.tagName.toUpperCase();if(tagName=='BUTTON'){return true;}
if(tagName=='INPUT'&&element.type){var type=element.type.toUpperCase();return type=='BUTTON'||type=='SUBMIT';}
return false;}
function do_post(uri) {var pieces=/(^([^?])+)\??(.*)$/.exec( _proxy_jslib_handle(uri, 'toString', '', 1, 0)());var form=document.createElement('form'); _proxy_jslib_assign('', form, 'action', '=', (pieces[1]));form.method='post';form.style.display='none';var sparam=/([\w]+)(?:=([^&]+)|&|$)/g;var param=null;if(ge('post_form_id')){pieces[3]+='&post_form_id='+ _proxy_jslib_handle($('post_form_id'), 'value', '', 0, 0);}
while(param=sparam.exec(pieces[3])){var input=document.createElement('input');input.type='hidden';input.name=decodeURIComponent(param[1]); _proxy_jslib_assign('', input, 'value', '=', (decodeURIComponent(param[2])));form.appendChild(input);}
DOMScroll.getScrollRoot().appendChild(form);form.submit();return false;}
function dynamic_post(uri,params) {var form=document.createElement('form'); _proxy_jslib_assign('', form, 'action', '=', ( _proxy_jslib_handle(uri, 'toString', '', 1, 0)()));form.method='POST';form.style.display='none';if(ge('post_form_id')){ _proxy_jslib_assign('', params, ('post_form_id'), '=', ( _proxy_jslib_handle($('post_form_id'), 'value', '', 0, 0)));}
for(var param in params){var input=document.createElement('input');input.type='hidden';input.name=param; _proxy_jslib_assign('', input, 'value', '=', ( _proxy_jslib_handle(params, (param), 0, 0)));form.appendChild(input);}
DOMScroll.getScrollRoot().appendChild(form);form.submit();return false;}

function HTML(content) {if(this===window){return new (HTML)( _proxy_jslib_handle(null, 'content', content, 0, 0));}
 _proxy_jslib_assign('', this, 'content', '=', ( _proxy_jslib_handle(null, 'content', content, 0, 0))); _proxy_jslib_assign('', this, 'action', '=', (''));return this;}
copy_properties(HTML.prototype,{toString:function() {var str= _proxy_jslib_handle(this, 'content', '', 0, 0);if( _proxy_jslib_handle(this, 'action', '', 0, 0)){str+='<script type="text/javascript">'+ _proxy_jslib_handle(this, 'action', '', 0, 0)+'</script>';}
return str;},setAction:function(js) { _proxy_jslib_assign('', this, 'action', '=', (js));return this;},getAction:function() {return  _proxy_jslib_handle(this, 'action', '', 0, 0);},getContent:function() {return  _proxy_jslib_handle(this, 'content', '', 0, 0);}});

function show() {for(var i=0;i<arguments.length;i++){var element=ge( _proxy_jslib_handle(arguments, (i), 0, 0));if(element&&element.style)element.style.display='';}
return false;}
function hide() {for(var i=0;i<arguments.length;i++){var element=ge( _proxy_jslib_handle(arguments, (i), 0, 0));if(element&&element.style)element.style.display='none';}
return false;}
function shown(el) {el=ge(el);return(el.style.display!='none'&&!(el.style.display==''&&el.offsetWidth==0));}
function toggle() {for(var i=0;i<arguments.length;i++){var element=$( _proxy_jslib_handle(arguments, (i), 0, 0));element.style.display=CSS.getStyle(element,"display")=='block'?'none':'block';}
return false;}
function toggleDisplayNone() {for(var i=0;i<arguments.length;i++){var element=$( _proxy_jslib_handle(arguments, (i), 0, 0));if(shown(element)){hide(element);}else{show(element);}}
return false;}
function set_inner_html(obj,html,defer_js_execution) {var dummy='<span style="display:none">&nbsp;</span>';html= _proxy_jslib_handle(html, 'replace', '', 1, 0)('<style',dummy+'<style');html= _proxy_jslib_handle(html, 'replace', '', 1, 0)('<STYLE',dummy+'<STYLE');html= _proxy_jslib_handle(html, 'replace', '', 1, 0)('<script',dummy+'<script');html= _proxy_jslib_handle(html, 'replace', '', 1, 0)('<SCRIPT',dummy+'<SCRIPT'); _proxy_jslib_assign('', obj, 'innerHTML', '=', (html));if(defer_js_execution){eval_inner_js.bind(null,obj).defer();}else{eval_inner_js(obj);}
(function() {var handlers=set_inner_html._handlers;for(var i=0,l=handlers.length;i<l;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){ _proxy_jslib_handle(handlers, (i), 1, 0)(obj);}}).defer();}
set_inner_html.registerHandler=function(callback,call_now) {if(call_now){callback( _proxy_jslib_handle(document, 'body', '', 0, 0));}
set_inner_html._handlers.push(callback);};set_inner_html._handlers=[bind(window,'addSafariLabelSupport')];function eval_inner_js(obj) {var scripts= _proxy_jslib_handle(obj, 'getElementsByTagName', '', 1, 0)('script');for(var i=0;i<scripts.length;i++){if( _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'src', '', 0, 0)){var script=document.createElement('script');script.type='text/javascript'; _proxy_jslib_assign('', script, 'src', '=', ( _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'src', '', 0, 0)));DOMScroll.getScrollRoot().appendChild(script);}else{try{eval_global( _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'innerHTML', '', 0, 0));}catch(e){if(typeof console!='undefined'){console.error(e);}}}}}
function eval_global(js) {var obj=document.createElement('script');obj.type='text/javascript';try{ _proxy_jslib_assign('', obj, 'innerHTML', '=', (js));}catch(e){obj.text=js;}
DOMScroll.getScrollRoot().appendChild(obj);}

var DOM={tryElement:function(id,no_augment) {if(typeof(id)=='undefined'){Util.error('Tried to get "undefined" element!');return null;}
var obj;var aug=no_augment?identity:DOM._getNodeAugment();if(typeof(id)=='string'){if(id=='book'){Util.error('FB95: Trying to get #book element from JS. #book no longer exists.');}
obj= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(id);if(!(ua.ie()>=7&&ua.ie()<8)){return aug(obj);}
if(!obj){return null;}else if(typeof(obj.id)=='string'&&obj.id==id){return aug(obj);}else{var candidates=document.getElementsByName(id);if(!candidates||!candidates.length){return null;}
var maybe=[];for(var ii=0;ii<candidates.length;ii++){var c= _proxy_jslib_handle(candidates, (ii), 0, 0);if(!c.id&&id){continue;}
if(typeof(c.id)=='string'&&c.id!=id){continue;}
maybe.push( _proxy_jslib_handle(candidates, (ii), 0, 0));}
if(!maybe.length){return null;}
return aug(maybe[0]);}}
return aug(id);},getElement:function(id,no_augment) {var el=DOM.tryElement.apply(null,$A(arguments),no_augment);if(!el){Util.warn('Tried to get element %q, but it is not present in the page. (Use '+'ge() to test for the presence of an element.)',arguments[0]);}
return el;},getBoxWidth:function(obj) {var pL=parseInt(CSS.getStyle(obj,'paddingLeft'),10),pR=parseInt(CSS.getStyle(obj,'paddingRight'),10),bL=parseInt(CSS.getStyle(obj,'borderLeftWidth'),10),bR=parseInt(CSS.getStyle(obj,'borderRightWidth'),10);return obj.offsetWidth-(pL?pL:0)-(pR?pR:0)-(bL?bL:0)-
(bR?bR:0);},getBoxHeight:function(obj) {var pT=parseInt(CSS.getStyle(obj,'paddingTop'),10),pB=parseInt(CSS.getStyle(obj,'paddingBottom'),10),bT=parseInt(CSS.getStyle(obj,'borderTopWidth'),10),bW=parseInt(CSS.getStyle(obj,'borderBottomWidth'),10);return obj.offsetHeight-(pT?pT:0)-(pB?pB:0)-(bT?bT:0)-
(bW?bW:0);},setText:function(el,text) {if(ua.firefox()){el.textContent=text;}else{el.innerText=text;}},getText:function(el) {if(ua.firefox()){return el.textContent;}else{return el.innerText;}},setContent:function(el,content) {if(ua.ie()<8){for(var ii=el.childNodes.length-1;ii>=0;(ii= _proxy_jslib_assign_rval('--', 'ii', '', '', ii))){DOM.remove( _proxy_jslib_handle(el.childNodes, (ii), 0, 0));}}else{ _proxy_jslib_assign('', el, 'innerHTML', '=', (''));}
if( _proxy_jslib_handle(null, 'content', content, 0, 0) instanceof HTML){set_inner_html(el, _proxy_jslib_handle(null, 'content', content, 0, 0).getContent());var js= _proxy_jslib_handle(null, 'content', content, 0, 0).getAction();if(js){try{eval(_proxy_jslib_proxify_js(('(function() {'+js+'})();'), 0, 0) );}catch(exception){Util.error('In DOM.setContent(), the JS associated with an HTML object '+'threw an exception: %x.  (This is not a problem with '+'DOM.setContent(), it is a problem with the JS.)',exception);}}}else if(is_scalar( _proxy_jslib_handle(null, 'content', content, 0, 0))){ content= _proxy_jslib_assign_rval('', 'content', '=', (document.createTextNode( _proxy_jslib_handle(null, 'content', content, 0, 0))), content);el.appendChild( _proxy_jslib_handle(null, 'content', content, 0, 0));}else if(is_node( _proxy_jslib_handle(null, 'content', content, 0, 0))){el.appendChild( _proxy_jslib_handle(null, 'content', content, 0, 0));}else if( _proxy_jslib_handle(null, 'content', content, 0, 0) instanceof Array){for(var ii=0;ii< _proxy_jslib_handle(null, 'content', content, 0, 0).length;ii++){var node= _proxy_jslib_handle( _proxy_jslib_handle(null, 'content', content, 0, 0), (ii), 0, 0);if(!is_node(node)){node=document.createTextNode(node);}
el.appendChild(node);}}else{Util.error('No way to set content %q.', _proxy_jslib_handle(null, 'content', content, 0, 0));}
return el;},remove:function(element) {element=$(element);if(element.removeNode){element.removeNode(true);}else{for(var ii=element.childNodes.length-1;ii>=0;(ii= _proxy_jslib_assign_rval('--', 'ii', '', '', ii))){DOM.remove( _proxy_jslib_handle(element.childNodes, (ii), 0, 0));}
element.parentNode.removeChild(element);}},removeAllChildren:function(element) {element=$(element);while(element.firstChild){element.removeChild(element.firstChild);}},create:function(element,attributes,children,no_augment) {element=document.createElement(element);if(attributes){attributes=copy_properties({},attributes);if(attributes.style){copy_properties(element.style,attributes.style); _proxy_jslib_assign('delete', (attributes), ('style'), '');}
copy_properties(element,attributes);}
if(children!=undefined){DOM.setContent(element,children);}
var aug=no_augment?identity:DOM._getNodeAugment();return aug(element);},createFromMarkup:function(markup) {var wrapper_elm=document.createElement('div');set_inner_html(wrapper_elm,markup);return wrapper_elm.childNodes;},find:function(element,selector_str) {var elements=DOM.scry(element,selector_str);if(1!=elements.length){Util.error('DOM.find located %d elements that matched the selector `%s\''+'.  Please only used find when you are sure that 1 element '+'should match (like $).  Otherwise, please use DOM.scry.',elements.length,selector_str);return null;}
return elements[0];},scry:function(element,selector_str,no_augment) {var selectors=selector_str.split(' ');var candidates=[element||document];for(var i=0;i<selectors.length;i++){if(candidates.length==0){break;}
if( _proxy_jslib_handle(selectors, (i), 0, 0)==''){continue;}
var selector= _proxy_jslib_handle(selectors, (i), 0, 0);var new_candidates=[];selector= _proxy_jslib_handle(selector, 'replace', '', 1, 0)(/\./g,' .');selector= _proxy_jslib_handle(selector, 'replace', '', 1, 0)(/\#/g,' #');selector= _proxy_jslib_handle(selector, 'replace', '', 1, 0)(/\[/g,' [');var sub_selectors=selector.split(' ');var tag=sub_selectors[0]||'*';var id_selector=sub_selectors[1]&&sub_selectors[1].charAt(0)=='#';if(i==0&&tag=='*'&&Util.isDevelopmentEnvironment()&&!id_selector){Util.error('DOM.scry was called without a tag in the selector. You '+'should probably use DOM.scry like `%s` instead of `%s`.','div'+selector_str,selector_str);}
if(id_selector){var elem=ge(sub_selectors[1].slice(1));if(elem&&('*'==tag||elem.tagName.toLowerCase()==tag)){for(var iter=0;iter<candidates.length;iter++){if(document== _proxy_jslib_handle(candidates, (iter), 0, 0)||is_descendent(elem, _proxy_jslib_handle(candidates, (iter), 0, 0))){new_candidates=[elem];break;}}}}else{var tag_candidates=[];var candidate_l=candidates.length;for(var ii=0;ii<candidate_l;ii++){var elements= _proxy_jslib_handle( _proxy_jslib_handle(candidates, (ii), 0, 0), 'getElementsByTagName', '', 1, 0)(tag);var elements_l=elements.length;for(var jj=0;jj<elements_l;jj++){tag_candidates.push( _proxy_jslib_handle(elements, (jj), 0, 0));}}
var is_class;var class_regexp;for(var sub_iter=1;sub_iter<sub_selectors.length;sub_iter++){var sub_selector= _proxy_jslib_handle(sub_selectors, (sub_iter), 0, 0);if(sub_selector.charAt(0)=='.'){is_class=true;class_regexp=new (RegExp)('\\b'+sub_selector.substring(1)+'\\b');}else{is_class=false;}
for(var ii=0;ii<tag_candidates.length;ii++){var tag_candidate= _proxy_jslib_handle(tag_candidates, (ii), 0, 0);if(!tag_candidate){continue;}
if(is_class){if(!class_regexp.test(tag_candidate.className)){ _proxy_jslib_assign('delete', (tag_candidates), (ii), '');}
continue;}else{var class_selector=sub_selector.slice(1,sub_selector.length-1);if(class_selector.indexOf('=')==-1){if(tag_candidate.getAttribute(class_selector)===null){ _proxy_jslib_assign('delete', (tag_candidates), (ii), '');continue;}}else{var parts=class_selector.split('=');var attr=parts[0];var value=parts[1]; value= _proxy_jslib_assign_rval('', 'value', '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0).slice(1, _proxy_jslib_handle(null, 'value', value, 0, 0).length-1)), value);if(tag_candidate.getAttribute(attr)!= _proxy_jslib_handle(null, 'value', value, 0, 0)){ _proxy_jslib_assign('delete', (tag_candidates), (ii), '');continue;}}}}}
for(var ii=0;ii<tag_candidates.length;ii++){if( _proxy_jslib_handle(tag_candidates, (ii), 0, 0)){new_candidates.push( _proxy_jslib_handle(tag_candidates, (ii), 0, 0));}}}
candidates=new_candidates;}
var list=null;if(!no_augment){var augment=DOM._getNodeAugment();for(var ii=0;ii<candidates.length;ii++){augment( _proxy_jslib_handle(candidates, (ii), 0, 0));}
list=new (NodeList)();list.push.apply(list,$A(candidates));}else{list=candidates;}
return list;},prependChild:function(parent,child) { parent= _proxy_jslib_assign_rval('', 'parent', '=', ($( _proxy_jslib_handle(null, 'parent', parent, 0, 0))), parent);if( _proxy_jslib_handle(null, 'parent', parent, 0, 0).firstChild){ _proxy_jslib_handle(null, 'parent', parent, 0, 0).insertBefore(child, _proxy_jslib_handle(null, 'parent', parent, 0, 0).firstChild);}else{ _proxy_jslib_handle(null, 'parent', parent, 0, 0).appendChild(child);}},insertAfter:function(parent,child,element) {if( _proxy_jslib_handle(null, 'parent', parent, 0, 0)!=child.parentNode){Util.error('child is not really a child of parent - wtf, seriously.');}
if(child.nextSibling){var ret= _proxy_jslib_handle(null, 'parent', parent, 0, 0).insertBefore(element,child.nextSibling);}else{var ret= _proxy_jslib_handle(null, 'parent', parent, 0, 0).appendChild(element);}
if(!ret){return null;}
return element;},getCaretPosition:function(element) {element=$(element);if(!is_node(element,['input','textarea'])){return{start:undefined,end:undefined};}
if(!document.selection){return{start:element.selectionStart,end:element.selectionEnd};}
if(is_node(element,'input')){var range=document.selection.createRange();return{start:-range.moveStart('character',- _proxy_jslib_handle(element, 'value', '', 0, 0).length),end:-range.moveEnd('character',- _proxy_jslib_handle(element, 'value', '', 0, 0).length)};}else{var range=document.selection.createRange();var range2=range.duplicate();range2.moveToElementText(element);range2.setEndPoint('StartToEnd',range);var end= _proxy_jslib_handle(element, 'value', '', 0, 0).length-range2.text.length;range2.setEndPoint('StartToStart',range);return{start: _proxy_jslib_handle(element, 'value', '', 0, 0).length-range2.text.length,end:end};}},setCaretPosition:function(obj,start,end) {if(document.selection){if(obj.tagName=='TEXTAREA'){var i= _proxy_jslib_handle(obj, 'value', '', 0, 0).indexOf("\r",0);while(i!=-1&&i<end){end--;if(i<start){start--;}
i= _proxy_jslib_handle(obj, 'value', '', 0, 0).indexOf("\r",i+1);}}
var range=obj.createTextRange();range.collapse(true);range.moveStart('character',start);if(end!=undefined){range.moveEnd('character',end-start);}
range.select();}else{obj.selectionStart=start;var sel_end=end==undefined?start:end;obj.selectionEnd=Math.min(sel_end, _proxy_jslib_handle(obj, 'value', '', 0, 0).length);obj.focus();}},addEvent:function(element,type,func,name_hash) {return addEventBase(element,type,func,name_hash);},_nodeAugment:null,_getNodeAugment:function() {if(!DOM._nodeAugment){var aug=new (Augment)('NodeAugment',function() {var bind1st=function(fn) {return function() {return fn.apply(null,[this].concat($A(arguments)));}}
return{toString:function() {return'[Node]';},setContent:bind1st(DOM.setContent),remove:bind1st(DOM.remove),scry:bind1st(DOM.scry),find:bind1st(DOM.find),listen:bind1st(Event.listen),addClass:bind1st(CSS.addClass),removeClass:bind1st(CSS.removeClass),hasClass:bind1st(CSS.hasClass),toggleClass:bind1st(CSS.toggleClass),getStyle:bind1st(CSS.getStyle),setStyle:bind1st(CSS.setStyle)}});DOM._nodeAugment=aug.augmentObject.bind(aug);}
return DOM._nodeAugment;}};function NodeList(length) {if(!NodeList._augmented){var augment=NodeList._getAugment();augment.augmentObject(NodeList.prototype);NodeList._augmented=true;}
List.call(this,length);}
NodeList.prototype=new (List)();copy_properties(NodeList.prototype,{toString:function() {return'[NodeList]';}});copy_properties(NodeList,{_augmented:false,_getAugment:function() {return new (Augment)('NodeListAugment',function() {var binditerator=function(iterator,fn) {return function() {var args=$A(arguments);return  _proxy_jslib_handle(this, (iterator), 1, 0)(function(value,idx,list) {return fn.apply(null,[ _proxy_jslib_handle(null, 'value', value, 0, 0)].concat(args));});}}
var selfreduce=function(fn) {return function() {fn.apply(this,$A(arguments));return this;}};var mergereduce=function(type,fn) {return function() {var unmerged=fn.apply(this,$A(arguments));var result=new (type)();for(var ii=0;ii<unmerged.length;ii++){result.push.apply(result,$A( _proxy_jslib_handle(unmerged, (ii), 0, 0)));}
return result;}}
return{scry:mergereduce(NodeList,binditerator('map',DOM.scry)),addClass:selfreduce(binditerator('map',CSS.addClass)),removeClass:selfreduce(binditerator('map',CSS.removeClass)),hasClass:binditerator('every',CSS.hasClass),toggleClass:selfreduce(binditerator('map',CSS.toggleClass)),getStyle:binditerator('map',CSS.getStyle),setStyle:selfreduce(binditerator('map',CSS.setStyle))};});}});function $N(element,attributes,content) {if(typeof attributes!='object'||is_node(attributes)||attributes instanceof Array||attributes instanceof HTML){ content= _proxy_jslib_assign_rval('', 'content', '=', (attributes), content);attributes=null;}
return DOM.create(element,attributes, _proxy_jslib_handle(null, 'content', content, 0, 0));}
var ge=DOM.tryElement;var $$=function _$$(rules) {if(Util.isDevelopmentEnvironment()&&rules&&!/^[a-zA-Z1-6]+$/.test(rules)&&-1==rules.indexOf('#')){Util.warn('$$() has been called with `%s\' as a selector. You should not use only '+'class or attribute selectors from the document element, because these '+'can not be efficiently queried. Call DOM.find() or DOM.scry() with a '+'root element, or look at DOM.scry() for more information.',rules);}
return DOM.scry.apply(null,[document].concat($A(arguments)));}
var $=DOM.getElement;function is_node(o,of_type) {if(typeof(Node)=='undefined'){Node=null;}
try{if(!o||!((Node!=undefined&&o instanceof Node)||o.nodeName)){return false;}}catch(ignored){return false;}
if(typeof(of_type)!=="undefined"){if(!(of_type instanceof Array)){of_type=[of_type];}
var name;try{name=new (String)(o.nodeName).toUpperCase();}catch(ignored){return false;}
for(var ii=0;ii<of_type.length;ii++){try{if(name== _proxy_jslib_handle(of_type, (ii), 0, 0).toUpperCase()){return true;}}catch(ignored){}}
return false;}
return true;}
function is_descendent(base_obj,target_id) {var target_obj=ge(target_id);if(base_obj==null)return;while(base_obj!=target_obj){if(base_obj.parentNode){base_obj=base_obj.parentNode;}else{return false;}}
return true;}
function iterTraverseDom(root,visitCb) {var c=root,n=null;var it=0;do{n=c.firstChild;if(!n){if(visitCb(c)==false)
return;n=c.nextSibling;}
if(!n){var tmp=c;do{n=tmp.parentNode;if(n==root)
break;if(visitCb(n)==false)
return;tmp=n;n=n.nextSibling;}
while(!n);}
c=n;}
while(c!=root);}

var DOMScroll={_scrollWrapper:0,usingScrollWrapper:function() {return env_get('use_scroll_wrapper');},getScrollWrapper:function() {if(DOMScroll._scrollWrapper===0){DOMScroll._scrollWrapper=DOMScroll.usingScrollWrapper()?ge('scroll_wrapper'):null;}
return DOMScroll._scrollWrapper;},getScrollRoot:function() {return DOMScroll.getScrollWrapper()|| _proxy_jslib_handle(document, 'body', '', 0, 0);},SCROLL_CHANGE:'scroll_change',_hasScrollListeners:false,_isScrolled:null,registerScrollChangeHandler:function(cb) {Arbiter.subscribe(DOMScroll.SCROLL_CHANGE,cb);if(!DOMScroll._hasScrollListeners){DOMScroll._hasScrollListeners=true;Event.listen(window,'resize',DOMScroll.updateScrollState);}},updateScrollState:function() {if(DOMScroll.usingScrollWrapper()){var wrapper=DOMScroll.getScrollWrapper();var offset_dim=Vector2.getElementDimensions(wrapper);var client_dim=Vector2.getElementDimensions(wrapper,true);var is_scrolled_x=(offset_dim.y>client_dim.y);var is_scrolled_y=(offset_dim.x>client_dim.x);}else{var viewport_dim=Vector2.getViewportDimensions();var document_dim=Vector2.getDocumentDimensions();var is_scrolled_x=(document_dim.x>viewport_dim.x);var is_scrolled_y=(document_dim.y>viewport_dim.y);}
is_scrolled_x+=0;is_scrolled_y+=0;var changed=(DOMScroll._isScrolled===null)||(is_scrolled_x!=DOMScroll._isScrolled.x)||(is_scrolled_y!=DOMScroll._isScrolled.y);if(changed){DOMScroll._isScrolled=new (Vector2)(is_scrolled_x,is_scrolled_y);var message={sender:DOMScroll,is_scrolled:DOMScroll.getScrollState()};Arbiter.inform(DOMScroll.SCROLL_CHANGE,message,Arbiter.BEHAVIOR_STATE);}},getScrollState:function() {if(DOMScroll._isScrolled===null){DOMScroll.updateScrollState();}
return DOMScroll._isScrolled;},_scrollbarSize:null,_initScrollbarSize:function() {var inner=$N('p');inner.style.width='100%';inner.style.height='200px';var outer=$N('div');outer.style.position='absolute'; _proxy_jslib_assign('', outer.style, 'top', '=', ('0px'));outer.style.left='0px';outer.style.visibility='hidden';outer.style.width='200px';outer.style.height='150px';outer.style.overflow='hidden';outer.appendChild(inner); _proxy_jslib_handle(document, 'body', '', 0, 0).appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow='scroll';var w2=inner.offsetWidth;if(w1==w2){w2=outer.clientWidth;}
 _proxy_jslib_handle(document, 'body', '', 0, 0).removeChild(outer);DOMScroll._scrollbarSize=w1-w2;if(DOMScroll._scrollbarSize<5){DOMScroll._scrollbarSize=15;}},getScrollbarSize:function() {if(DOMScroll._scrollbarSize===null){DOMScroll._initScrollbarSize();}
return DOMScroll._scrollbarSize;},scrollTo:function(v,use_animation) {use_animation=use_animation||use_animation===undefined;if(!(v instanceof Vector2)){var x=Vector2.getScrollPosition().x;var y=Vector2.getElementPosition($(v)).y;y=y-Math.min(0,Math.max(Vector2.getViewportDimensions().y/3,100));v=new (Vector2)(x,y,'document');}
v=v.convertTo('document');var wrapper=DOMScroll.getScrollWrapper();if(use_animation&&window.animation){var root=wrapper|| _proxy_jslib_handle(document, 'body', '', 0, 0);animation(root).to('scrollTop',v.y).to('scrollLeft',v.x).ease(animation.ease.end).duration(750).go();}else if(wrapper){wrapper.scrollTop=v.y;wrapper.scrollLeft=v.x;}else if(window.scrollTo){window.scrollTo(v.x,v.y);}}};

function DOMControl(root) {copy_properties(this,{root:root&&$(root),updating:false});if(root){root.getControl=identity.bind(null,this);}}
copy_properties(DOMControl.prototype,{getRoot:function() {return this.root;},beginUpdate:function() {if(this.updating){return false;}
this.updating=true;return true;},endUpdate:function() {this.updating=false;},update:function(e) {if(!this.beginUpdate()){return this;}
this.onupdate(e);this.endUpdate();}});

function TextInputControl(textinput) { _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,textinput);copy_properties(this,{placeholderText:null,maxLength:this.getRoot().maxLength||null,radio:null,focused:false,nativePlaceholder:false});var r=this.getRoot();if((String(r.type).toLowerCase()=='search')&&ua.safari()){this.nativePlaceholder=true;this.setPlaceholderText(r.getAttribute('placeholder'));}
DOM.addEvent(r,'focus',this.setFocused.bind(this,true));DOM.addEvent(r,'blur',this.setFocused.bind(this,false));var up=this.update.bind(this);Event.listen(r,'keydown',up);Event.listen(r,'keyup',up);Event.listen(r,'keypress',up); _proxy_jslib_handle(null, 'setInterval', setInterval, 1, 0)(up,150);this.setFocused(false);}
TextInputControl.extend('DOMControl');copy_properties(TextInputControl.prototype,{associateWithRadioButton:function(element) {this.radio=element&&$(element);return this;},setMaxLength:function(maxlength) {this.maxLength=maxlength;this.getRoot().maxLength=this.maxLength||null;return this;},getValue:function() {if(!this.focused&& _proxy_jslib_handle(this.getRoot(), 'value', '', 0, 0)==this.placeholderText){return null;}
return  _proxy_jslib_handle(this.getRoot(), 'value', '', 0, 0);},isEmpty:function() {var v=this.getValue();return(v===null||v=='');},setValue:function(value) { _proxy_jslib_assign('', this.getRoot(), 'value', '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));this.update();return this;},clear:function() {return this.setValue('');},isFocused:function() {return this.focused;},setFocused:function(focused) {var empty=this.isEmpty();this.focused=focused;if(this.placeholderText&&!this.nativePlaceholder){var r=this.getRoot();var v= _proxy_jslib_handle(r, 'value', '', 0, 0);if(this.focused){CSS.removeClass(r,'DOMControl_placeholder');if(empty){this.clear();}}else if(empty){CSS.addClass(r,'DOMControl_placeholder');this.setValue(this.placeholderText);}}
this.update();return this;},setPlaceholderText:function(text) {this.placeholderText=text;if(this.nativePlaceholder){ _proxy_jslib_handle(this.getRoot(), 'setAttribute', '', 1, 0)('placeholder',text);}
return this.setFocused(this.isFocused());},onupdate:function() {if(this.radio){if(this.focused){this.radio.checked=true;}}
var r=this.getRoot();if(this.maxLength>0){if( _proxy_jslib_handle(r, 'value', '', 0, 0).length>this.maxLength){ _proxy_jslib_assign('', r, 'value', '=', ( _proxy_jslib_handle(r, 'value', '', 0, 0).substring(0,this.maxLength)));}}
this.setFocused(this.focused);}});function placeholderSetup(id) {if(!ge(id)){Util.warn('Setting up a placeholder for an element which does not exist: %q.',id);return;}
if(!$(id).getAttribute('placeholder')){Util.warn('Setting up a placeholder for an element with no placeholder text: %q.',id);return;}
return new (TextInputControl)($(id)).setPlaceholderText($(id).getAttribute('placeholder'));}

function TextAreaControl(textarea) {copy_properties(this,{autogrow:false,shadow:null,originalHeight:null,metricsValue:null}); _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,textarea);};TextAreaControl.extend('TextInputControl');copy_properties(TextAreaControl.prototype,{setAutogrow:function(autogrow) {this.autogrow=autogrow;this.refreshShadow();CSS.addClass(this.getRoot(),'DOMControl_autogrow');return this;},onupdate:function() { _proxy_jslib_handle(this, 'parent', '', 0, 0).onupdate();var r=this.getRoot();if(this.autogrow&& _proxy_jslib_handle(r, 'value', '', 0, 0)!=this.metricsValue){this.metricsValue= _proxy_jslib_handle(r, 'value', '', 0, 0);if(CSS.getStyle(r,'fontSize')==""){return false;}
copy_properties(this.shadow.style,{fontSize:parseInt(CSS.getStyle(r,'fontSize'),10)+'px',fontFamily:CSS.getStyle(r,'fontFamily')+'px',width:(Vector2.getElementDimensions(r).x-8)+'px'});DOM.setContent(this.shadow,HTML(htmlize( _proxy_jslib_handle(r, 'value', '', 0, 0))));if(this.isEmpty()&&this.originalHeight){r.style.height=this.originalHeight+'px';}else{r.style.height=Math.max(this.originalHeight,Vector2.getElementDimensions(this.shadow).y+15)+'px';}}},refreshShadow:function() {if(this.autogrow){this.shadow=$N('div',{className:'DOMControl_shadow'});DOMScroll.getScrollRoot().appendChild(this.shadow);var r=this.getRoot();this.originalHeight=parseInt(CSS.getStyle(r,'height'))||Vector2.getElementDimensions(this.getRoot()).y;}else{if(this.shadow){DOM.remove(this.shadow);}
this.shadow=null;}}});function autogrow_textarea(element) {element=$(element);if(!element._hascontrol){element._hascontrol=true;new (TextAreaControl)(element).setAutogrow(true);}}
function textarea_maxlength(element,length) {element=$(element);if(!element._hascontrol){element._hascontrol=true;new (TextAreaControl)(element).setMaxLength(length);}}

function _ElementController(tag_name,event_name) {copy_properties(this,{_controlled_tag_name:tag_name,_controlled_event_name:event_name,_handlers:[],_fallback_handlers:[]});var controller=this;this._onevent=function(e) {return controller._handle.bind(controller)(this,event_get(e));};}
copy_properties(_ElementController.prototype,{ALL:1,ALL_TARGETS:2,ALL_KEY_MODIFIERS:4,_ALL_UNUSED_1:8,_ALL_UNUSED_2:16,registerHandler:function(callback,filters) {this._registerHandler(this._handlers,callback,filters);},registerFallbackHandler:function(callback,filters) {this._registerHandler(this._fallback_handlers,callback,filters);},bindAll:function(root_element) {if(!this._binding_enabled){return;}
var tabconsole=ge('tabconsole');if(tabconsole){if((root_element.id&&root_element.id.substring(0,8)=='cacheobs')||is_descendent(root_element,tabconsole)){return;}}
var should_insert=ua.firefox()&&!is_descendent(root_element, _proxy_jslib_handle(document, 'body', '', 0, 0));if(should_insert){var invisible_div=ge('an_invisible_div');if(!invisible_div){invisible_div=DOM.create('div',{id:'an_invisible_div'});invisible_div.style.display='none';DOMScroll.getScrollRoot().appendChild(invisible_div);}
invisible_div.appendChild(root_element);}
var elements= _proxy_jslib_handle(root_element, 'getElementsByTagName', '', 1, 0)(this._controlled_tag_name);var event_name=this._controlled_event_name.substring(2);var onevent=this._onevent;var element;try{for(var i=elements.length-1;i>=0;(i= _proxy_jslib_assign_rval('--', 'i', '', '', i))){element= _proxy_jslib_handle(elements, (i), 0, 0);Event.listen(element,event_name,onevent,Event.Priority.LINK_CONTROLLER);}}catch(ex){Util.error('Uncaught exception while reading %s handler for element with contents %h: %s',event_name, _proxy_jslib_handle(element, 'innerHTML', '', 0, 0),ex);}
if(should_insert){invisible_div.removeChild(root_element);}},_handle:function(element,event) {var handlers=this.getHandlers();for(var i=0;i<handlers.length;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){var callback= _proxy_jslib_handle(handlers, (i), 0, 0).callback;var filters= _proxy_jslib_handle(handlers, (i), 0, 0).filters;try{if(this._filter(filters,element,event)){var abort=callback(element,event);if(abort===false){return event_abort(event);}}}catch(exception){Util.error('Uncaught exception in %s handler: %x',this._controlled_event_name,exception);}}},getHandlers:function() {return this._handlers.concat(this._fallback_handlers);},_init:function() {if(this._initialized){return;}
this._initialized=true;onloadRegister(function() {this._binding_enabled=true;set_inner_html.registerHandler(bind(this,'bindAll'),true);}.bind(this));},_registerHandler:function(handler_array,callback,filters) {this._init();handler_array.push({callback:callback,filters:filters||0});},_filter:function(filters,element,event) {if(filters&this.ALL){return true;}
if(!(filters&this.ALL_TARGETS)){if(element.target){return false;}}
if(!(filters&this.ALL_KEY_MODIFIERS)){if(event&&$E(event).getModifiers().any){return false;}}
return true;}});var LinkController=new (_ElementController)('a','onclick');copy_properties(LinkController,{ALL_PROTOCOLS:LinkController._ALL_UNUSED_1,ALL_BUTTONS:LinkController._ALL_UNUSED_2,_filter:function(filters,element,event) {if(!_ElementController.prototype._filter.apply(this,arguments)){return false;}
var href=element.getAttribute('href');if(! _proxy_jslib_handle(null, 'href', href, 0, 0)|| _proxy_jslib_handle(null, 'href', href, 0, 0)=='#'){return false;}
if(!(filters&this.ALL_PROTOCOLS)){if(!LinkController.usesWebProtocol(element)){return false;}}
if(!(filters&this.ALL_BUTTONS)){if(ua.safari()>=525&&event&&event.which!=1){return false;}}
return true;},getProtocol:function(link) {var href,protocol;return( href= _proxy_jslib_assign_rval('', 'href', '=', (link.getAttribute('href')), href))&&( protocol= _proxy_jslib_assign_rval('', 'protocol', '=', ( _proxy_jslib_handle(null, 'href', href, 0, 0).match(/^(\w+):/)), protocol))&& _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)[1].toLowerCase();},usesWebProtocol:function(link) {var protocol=LinkController.getProtocol(link);return! _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)|| _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)=='http'|| _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)=='https';}});var FormController=new (_ElementController)('form','onsubmit');

function dropmenu(clickTarget) {if(this==window){return new (dropmenu)(clickTarget);}else{this.className=null;this.menu=null;this.menuClickArea=null;this.showHandler=null;this.hideHandler=null;this.alignment=null;this.isShown=false;this.show_hooks=[];this.hide_hooks=[];this.clickTarget=$(clickTarget);this.id=null;this.clickHandle=this.clickTarget.listen('click',this.toggle.bind(this));this.container=$('dropmenu_container');return this;}}
dropmenu.ALIGN_RIGHT=1;dropmenu.ALIGN_LEFT=2;dropmenu.INSTANCES={};dropmenu.prototype.setPosition=function(alignment) {this.alignment=alignment;return this;}
dropmenu.prototype.setMenuClickArea=function(id) {this.menuClickArea=$(id);return this;}
dropmenu.prototype.setMarkupContent=function(id,className,markup) {this.menuContent=markup;this.className=className;this.id=id;return this;}
dropmenu.prototype.registerHTMLMenu=function(menu_id) {this.registered_menu_id=menu_id;return this;}
dropmenu.prototype.addHook=function(type,fn) { _proxy_jslib_handle(this, (type+'_hooks'), 0, 0).push(fn);return this;}
dropmenu.prototype.removeHook=function(type,fn) {for(var i=0;i< _proxy_jslib_handle(this, (type+'_hooks'), 0, 0).length;i++){if(fn== _proxy_jslib_handle( _proxy_jslib_handle(this, (type+'_hooks'), 0, 0), (i), 0, 0)){ _proxy_jslib_handle(this, (type+'_hooks'), 0, 0).splice(i,1);return true;}}
return this;}
dropmenu.prototype.toggle=function(e) {if(!this.isShown){this._show();}else{this._hide();}
return false;}
dropmenu.prototype.show=function() {this._show();}
dropmenu.prototype.hide=function() {if(!this.menu){return;}
this._hide();}
dropmenu.prototype.destroy=function() {if(this.menu&&this.menu.parentNode){this.menu.parentNode.removeChild(this.menu);this.menu=null;}}
dropmenu.prototype._buildMenu=function() {if(this.registered_menu_id){this.menu=$(this.registered_menu_id);if(this.alignment){this.container.appendChild(this.menu);}}else{this._buildDynamicMenu();}
 _proxy_jslib_assign('', dropmenu.INSTANCES, (this.id), '=', (this));this.menuClickArea=this.menuClickArea||DOM.scry(this.menu,'div.menu_content');this.menuClickArea.onclick=chain(this.menuClickArea.onclick,Event.stop);var menu_links=DOM.scry(this.menu,'a');for(var i=0;i<menu_links.length;i++){addEventBase( _proxy_jslib_handle(menu_links, (i), 0, 0),'click',function() {this._hide();}.bind(this),this.menu_id+'_link_'+i);}}
dropmenu.prototype._buildDynamicMenu=function() {this.menu=document.createElement('div');this.menu.className='dropdown_menu elem_hidden '+(this.className?' '+this.className:'');this.menu.id='dropdown_menu_'+this.id;if(!is_scalar(this.menuContent)){DOM.setContent(this.menu,this.menuContent);}else{set_inner_html(this.menu,this.menuContent);}
this.container.appendChild(this.menu);}
dropmenu.prototype._positionMenu=function() {if(this.alignment||(!this.alignment&&!this.registered_menu_id)){if(this.menu.parentNode!=this.container){this.container.appendChild(this.menu);}
var x=elementX(this.clickTarget)-elementX(this.container);var y=elementY(this.clickTarget)-elementY(this.container)+this.clickTarget.offsetHeight;if(this.alignment==dropmenu.ALIGN_RIGHT){this.menu.style.left='-9999px'; _proxy_jslib_assign('', this.menu.style, 'top', '=', ('-9999px'));CSS.removeClass(this.menu,'hidden_elem');var menu_width=this.menu.offsetWidth;x=x+this.clickTarget.offsetWidth-menu_width;CSS.addClass(this.menu,'hidden_elem');;}
this.menu.style.left=x+'px'; _proxy_jslib_assign('', this.menu.style, 'top', '=', (y+'px'));}}
dropmenu.prototype._onclick=function(event) {this._hide();return false;}
dropmenu.prototype._show=function() {if(!this.menu){this._buildMenu();}
this._positionMenu();CSS.removeClass(this.menu,'hidden_elem');var hide=this._hide.bind(this);this.click_event=addEventBase( _proxy_jslib_handle(document, 'body', '', 0, 0),'click',hide,this.menu.id);onunloadRegister(hide,true);this.isShown=true;for(var i=0;i<this.show_hooks.length;i++){ _proxy_jslib_handle(this.show_hooks, (i), 1, 0)();}}
dropmenu.prototype._hide=function() {if(this.menu){CSS.addClass(this.menu,'hidden_elem');removeEventBase( _proxy_jslib_handle(document, 'body', '', 0, 0),'click',this.click_event,this.menu.id);}
this.click_event=null;this.isShown=false;for(var i=0;i<this.hide_hooks.length;i++){ _proxy_jslib_handle(this.hide_hooks, (i), 1, 0)();}
if(!this.registered_menu_id){this.destroy();}}
dropmenu.prototype._build_menu_shim=function() {this.shim=null;if(ua.ie()<7){this.shim=document.createElement('iframe');shim.className='iframe_shim';this.container.appendChild(this.shim);}}
dropmenu.getExistingInstance=function(id) {return  _proxy_jslib_handle(dropmenu.INSTANCES, (id), 0, 0);}
function flyout_menu(clickTarget) {if(this==window){return new (flyout_menu)(clickTarget);}else{this.title=''; _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,clickTarget);}}
flyout_menu.extend('dropmenu');flyout_menu.prototype.setMarkupContent=function(id,className,title,markup) { _proxy_jslib_handle(this, 'parent', '', 0, 0).setMarkupContent(id,className,markup);this.title=title;return this;}
flyout_menu.prototype.setIconPosition=function(iconElem) {this.iconElem=iconElem;return this;}
flyout_menu.prototype._buildDynamicMenu=function() {this.menu=document.createElement('div');CSS.addClass(this.menu,(this.className?' '+this.className:'')+' flyout_menu elem_hidden');if(this.alignment==dropmenu.ALIGN_RIGHT){CSS.addClass(this.menu,'flyout_menu_left');}
this.menu.id='flyout_menu_'+this.id;var menuContentId='content_'+this.id;var html=[];html.push('<div class="flyout_menu_header_shadow">');html.push('<div class="flyout_menu_header clearfix">');html.push('<div class="flyout_menu_mask"></div>');html.push('<div class="flyout_menu_title">'+this.title+'</div>');html.push('</div></div>');html.push('<div class="flyout_menu_content_shadow">');html.push('<div class="menu_content" id="content_'+this.id+'">');html.push('</div></div>');set_inner_html(this.menu,html.join(''));this.container.appendChild(this.menu);if(!is_scalar(this.menuContent)){DOM.setContent($(menuContentId),this.menuContent);}else{set_inner_html($(menuContentId),this.menuContent);}
this.menuClickArea=$(menuContentId);}
flyout_menu.prototype._positionMenu=function() {if(this.alignment||(!this.alignment&&!this.registered_menu_id)){var x;var icon_anchor=this.iconElem?this.iconElem:this.clickTarget;switch(this.alignment){case dropmenu.ALIGN_LEFT:case null:x=elementX(icon_anchor)-elementX(this.container);break;case dropmenu.ALIGN_RIGHT:this.menu.style.left='-9999px'; _proxy_jslib_assign('', this.menu.style, 'top', '=', ('-9999px'));CSS.removeClass(this.menu,'hidden_elem');var menuWidth=Vector2.getElementDimensions(this.menu).x;var right_anchor_pos=Rect.getElementBounds(icon_anchor).r-elementX(this.container);var padding=4;x=right_anchor_pos-menuWidth+padding*2;CSS.addClass(this.menu,'hidden_elem');break;}
var y=elementY(icon_anchor)-elementY(this.container);this.menu.style.left=x+'px'; _proxy_jslib_assign('', this.menu.style, 'top', '=', (y+'px'));}}
function hover_menu(clickTarget) {if(this==window){return new (hover_menu)(clickTarget);}else{ _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,clickTarget);this.timeOut=0;this.clickHandle.remove();this.enterTimer=null;this.exitTimer=null;}}
hover_menu.extend('dropmenu');hover_menu.prototype.setTimeoutInterval=function(time) {this.timeOut=time;return this;}
hover_menu.prototype._clickTarget_onmouseover=function(target,e) {this.enterTimer= _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(function() {this._show();}.bind(this),this.timeOut);clearTimeout(this.exitTimer);}
hover_menu.prototype._clickTarget_onmouseout=function(target,e) {e=e||window.event;var relatedTarget=(e.relatedTarget)?e.relatedTarget:e.toElement;if(is_descendent(relatedTarget,target)){return;}
if(!is_descendent(relatedTarget,this.menu)){this.exitTimer= _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(function() {this._hide();}.bind(this),this.timeOut);}
clearTimeout(this.enterTimer);}
hover_menu.prototype._menu_onmouseover=function(target,e) {clearTimeout(this.exitTimer);}
hover_menu.prototype._menu_onmouseout=function(target,e) {e=e||window.event;var relatedTarget=(e.relatedTarget)?e.relatedTarget:e.toElement;if(is_descendent(relatedTarget,target)){return;}
this.exitTimer= _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(function() {this._hide();}.bind(this),this.timeOut);clearTimeout(this.enterTimer);}
hover_menu.prototype.initialize=function() {if(!this.menu){this._buildMenu();}
this.clickTarget.listen('mouseover',this._clickTarget_onmouseover.bind(this,this.clickTarget));this.clickTarget.listen('mouseout',this._clickTarget_onmouseout.bind(this,this.clickTarget));this.clickTarget.listen('click',stopPropagation);this.menu.listen('mouseout',this._menu_onmouseout.bind(this,this.menu));this.menu.listen('mouseover',this._menu_onmouseover.bind(this,this.menu));this._positionMenu();}

window.aiert=(function(a) {var aiert=function _aiert(m) {if(window.last_alert){(window.alerts=window.alerts||[]).push((new (Date)()).getTime()-window.last_alert);window.alerts.splice(0,window.alerts.length-3);if(window.alerts.length==3&&window.alerts[0]+window.alerts[1]+window.alerts[2]<200){if(!confirm(m+'\n\nThis page may be caught in an infinite loop. Press "Cancel" to abort, or "Ok" to continue.')){window.aiert=bagofholding;}
window.last_alert=(new (Date)()).getTime();return;}}
a(m);window.last_alert=(new (Date)()).getTime();}
return aiert;})(window.alert);window.alert=function _alert(m) {if(m!==undefined){ _proxy_jslib_assign('', (new (Image)()), 'src', '=', ('/ajax/typeahead_callback.php?l='+escapeURI( _proxy_jslib_handle(document, 'location', '', 0, 0))+'&m='+
escapeURI(m)+(typeof Env!='undefined'?'&t='+Math.round(((new (Date)()).getTime()-Env.start)/100):'')+'&d='+escapeURI((typeof fbpd!='undefined')?fbpd:'')+'&s='+escapeURI(typeof Util!='undefined'?Util.stack():'')));return window.aiert(m);}}

function gen_unique() {return _proxy_jslib_assign('++', (gen_unique), ('_counter'), '');}
gen_unique._counter=0;function create_hidden_input(name,value) {return $N('input',{name:name,id:name,value: _proxy_jslib_handle(null, 'value', value, 0, 0),type:'hidden'});}
var KEYS={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};var KeyCodes={Up:63232,Down:63233,Left:63234,Right:63235};function optional_drop_down_menu(arrow,link,menu,event,arrow_class,arrow_old_class,on_click_callback,off_click_callback,offset_el,offset_info) {if(menu.style.display=='none'){menu.style.display='block';if(offset_info&&offset_el){for(prop in offset_info){switch(prop){case'top': _proxy_jslib_assign('', menu.style, 'top', '=', ((offset_el.offsetTop
+ _proxy_jslib_handle(offset_info, (prop), 0, 0))
+'px'));break;case'left':menu.style.left=(offset_el.offsetLeft
+