/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  January 6th 2009 7:36:37 AM PST                              */
/*      Machine:  10.16.140.108                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/97qxpm42mnksoos8.pkg.js h:hw8l754g                        */
/*       Locale:  en_US                                                        */
/*         Path:  js/97qxpm42mnksoos8.pkg.js                                   */


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.isInitialized()){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};

DOMStorage={_storage:{},_elements:{},_tokenCounter:1,_NOT_IN_DOM_CONST:1,_getElementStorage:function(elem) {var token;token=(elem.__FB_TOKEN||(elem.__FB_TOKEN=[DOMStorage._tokenCounter++]))[0]; _proxy_jslib_assign('', DOMStorage._elements, (token), '=', (elem));return  _proxy_jslib_handle(DOMStorage._storage, (token), 0, 0)||( _proxy_jslib_assign('', DOMStorage._storage, (token), '=', ({})));},_shouldDeleteData:function(element) {if(!element.nodeName){return false;}
try{if(null!=element.offsetParent){return false;}}catch(ex){}
if(document.documentElement.contains){return!document.documentElement.contains(element);}else{return(document.documentElement.compareDocumentPosition(element)&DOMStorage._NOT_IN_DOM_CONST);}},setData:function(element,key,value) {var element_store=DOMStorage._getElementStorage(element); _proxy_jslib_assign('', element_store, (key), '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));return element;},getData:function(element,key,default_value) {var element_store=DOMStorage._getElementStorage(element);var value= _proxy_jslib_handle(element_store, (key), 0, 0);if((default_value!==undefined)&&( _proxy_jslib_handle(null, 'value', value, 0, 0)===undefined)){ value= _proxy_jslib_assign_rval('', 'value', '=', ( _proxy_jslib_assign('', element_store, (key), '=', (default_value))), value);}
return  _proxy_jslib_handle(null, 'value', value, 0, 0);},removeData:function(element,key) {var element_store=DOMStorage._getElementStorage(element); _proxy_jslib_assign('delete', (element_store), (key), '');return element;},cleanup:function() {var elem_token,elem;for(elem_token in DOMStorage._elements){elem= _proxy_jslib_handle(DOMStorage._elements, (elem_token), 0, 0);if(DOMStorage._shouldDeleteData(elem)){ _proxy_jslib_assign('delete', (DOMStorage._storage), (elem_token), ''); _proxy_jslib_assign('delete', (DOMStorage._elements), (elem_token), '');}}}};

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={configurePage:function(reverse_map) {var links= _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('link');this._cssLinks=[];for(var ii=0;ii<links.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){if( _proxy_jslib_handle(links, (ii), 0, 0).rel!='stylesheet'){continue;}
for(var k in reverse_map){if( _proxy_jslib_handle( _proxy_jslib_handle(links, (ii), 0, 0), 'href', '', 0, 0).indexOf(k)!==-1){var name= _proxy_jslib_handle(reverse_map, (k), 0, 0)[0],permanent= _proxy_jslib_handle(reverse_map, (k), 0, 0)[1]; _proxy_jslib_assign('', this._cssLinkMap, (name), '=', (this._cssLinks.length));if(permanent){ _proxy_jslib_assign('', this._permanent, (name), '=', (true));}
 _proxy_jslib_assign('delete', (reverse_map), (k), '');break;}}
this._cssLinks.push( _proxy_jslib_handle(links, (ii), 0, 0));}},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._componentMap, ( _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,replace) {resources=arrayize(resources);if( _proxy_jslib_handle(null, 'replace', replace, 0, 0)){var map={};for(var ii=0;ii<resources.length;(ii= _proxy_jslib_assign_rval('++', 'ii', '', '', ii))){ _proxy_jslib_assign('', map, ( _proxy_jslib_handle(resources, (ii), 0, 0).name), '=', (true));}
for(var k in this._requested){if(!(k in this._permanent)&&!(k in map)){this._unloadResource(k);}}}
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(rsrc.permanent){ _proxy_jslib_assign('', this._permanent, (rsrc.name), '=', (true));}
if( _proxy_jslib_handle(this._loaded, (rsrc.name), 0, 0)){continue;}
if(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), _proxy_jslib_handle(will_request, (ii), 0, 0).name);}
if(!pending_request&&callback){this._invoke(callback);}},requestResource:function(type,source,name) {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=null;for(var jj=0;jj<this._cssLinks.length;(jj= _proxy_jslib_assign_rval('++', 'jj', '', '', jj))){if( _proxy_jslib_handle(this._cssLinks, (jj), 0, 0)._unused){link= _proxy_jslib_handle(this._cssLinks, (jj), 0, 0);if(name){ _proxy_jslib_assign('', this._cssLinkMap, (name), '=', (jj));}
break;}}
if(!link){var link=document.createElement('link');link.rel="stylesheet";link.type="text/css";link.media="all"; _proxy_jslib_assign('', link, 'href', '=', (source));this._cssLinks.push(link);h.appendChild(link);}else{ _proxy_jslib_assign('', link, 'href', '=', (source));}
link._unused=false;var id=Bootloader._getDivIdForCSSComponent(name);var div= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(id);if(!div){div=document.createElement('div');div.id=id; _proxy_jslib_handle(document, 'body', '', 0, 0).appendChild(div); _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(Bootloader._pollCSS.bind(Bootloader,name,Bootloader._CSS_POLL_EXPIRATION),Bootloader._CSS_POLL_INTERVAL,false);}
break;default:throw new (TypeError)("Bad resource type `"+type+"'.");}},_getDivIdForCSSComponent:function(name) {return'bootloader_'+ _proxy_jslib_handle(name, 'replace', '', 1, 0)(/[^a-z0-9]/ig,'_');},_pollCSS:function(name,remaining) {var id=Bootloader._getDivIdForCSSComponent(name);var div= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(id);if(!div){return;}
var expected='42';var done=div.offsetHeight==expected||div.currentStyle&& _proxy_jslib_handle(div.currentStyle, ('height'), 0, 0)==expected+'px'||window.getComputedStyle&&document.defaultView.getComputedStyle(div,null).getPropertyValue('height')==expected+'px';if(done||remaining<=0){Bootloader.done([name]);div.parentNode.removeChild(div);}else{ _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(Bootloader._pollCSS.bind(Bootloader,name,remaining-Bootloader._CSS_POLL_INTERVAL),Bootloader._CSS_POLL_INTERVAL,false);}},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._componentMap,map);},_unloadResource:function(name) {if(this._cssLinks&&(name in this._cssLinkMap)){var link_id= _proxy_jslib_handle(this._cssLinkMap, (name), 0, 0);var link= _proxy_jslib_handle(this._cssLinks, (link_id), 0, 0); _proxy_jslib_assign('', link, 'href', '=', (Bootloader._UNUSED_CSS_URL));link._unused=true; _proxy_jslib_assign('delete', (this._cssLinkMap), (name), ''); _proxy_jslib_assign('delete', (this._requested), (name), ''); _proxy_jslib_assign('delete', (this._loaded), (name), '');}},_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:{},_permanent:{},_loaded:{},_pending:[],_componentMap:{},_cssLinkMap:{},_cssLinks:[],_hardpoint:null,_CSS_POLL_EXPIRATION:5000,_CSS_POLL_INTERVAL:20,_UNUSED_CSS_URL:'javascript:void(0)'};

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;}
Event.prototype.kill=function() {this.stop();this.prevent();return false;}
Event.prototype.prevent=function() {this.returnValue=false;this.preventDefault&&this.preventDefault();}
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();}
Event.prevent=function(e) {return $E(e).prevent();}
Event._DOMSTORAGE_KEY='Event.listeners';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;}
var handlers=DOMStorage.getData(element,Event._DOMSTORAGE_KEY,{});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=DOMStorage.getData(element,Event._DOMSTORAGE_KEY);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(!DOMStorage.getData(this,Event._DOMSTORAGE_KEY)){throw new (Error)("Bad _listenHandler() context.");}
var type_handlers= _proxy_jslib_handle(DOMStorage.getData(this,Event._DOMSTORAGE_KEY), (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.returnValue===false){return false;}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;}
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=$E(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;}}
return event.keyCode;}

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',PROFILE_PUBLISHER:'profile/publisher',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;},_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));}

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 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 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;}

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;}});

function HTML(content) {if(this===window){return new (HTML)( _proxy_jslib_handle(null, 'content', content, 0, 0));}
this._content= _proxy_jslib_handle(null, 'content', content, 0, 0);this._defer=false;this._extra_action='';this._nodes=null;this._inline_js=bagofholding;this._has_option_elements=false;return this;}
copy_properties(HTML.prototype,{toString:function() {var str=this._content;if(this._extra_action){str+='<script type="text/javascript">'+this._extra_action
+'</scr'+'ipt>';}
return str;},setAction:function(js) {this._extra_action=js;return this;},getAction:function() {this._fillCache();var fn=function() {this._inline_js();eval_global(this._extra_action);}.bind(this);if(this.getDeferred()){return fn.defer.bind(fn);}else{return fn;}},setDeferred:function(defer) {this._defer=!!defer;return this;},getDeferred:function() {return this._defer;},getContent:function() {return this._content;},getNodes:function() {this._fillCache();return this._nodes;},hasOptionElements:function() {this._fillCache();return this._has_option_elements;},_fillCache:function() {if(null!==this._nodes){return;}
var html=this._content;if(html===null){return;}
html= _proxy_jslib_handle(html, 'replace', '', 1, 0)(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag) {return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+'></'+tag+'>';});var tags=html.trim().toLowerCase(),wrapper_elem=document.createElement('div');var wrap=(!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"])||(!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"])||(tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"])||(!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"])||((!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"])||(!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"])||(ua.ie()&&[1,"dummy-text<div>","</div>"])||[0,"",""]; _proxy_jslib_assign('', wrapper_elem, 'innerHTML', '=', (wrap[1]+html+wrap[2]));;while(wrap[0]--){wrapper_elem=wrapper_elem.lastChild;}
if(0!= _proxy_jslib_handle(wrapper_elem, 'getElementsByTagName', '', 1, 0)('option').length){this._has_option_elements=true;}
if(ua.ie()){var tbody;if(!tags.indexOf('<table')&&-1==tags.indexOf('<tbody')){tbody=wrapper_elem.firstChild&&wrapper_elem.firstChild.childNodes;}else if(wrap[1]=='<table>'&&-1==tags.indexOf('<tbody')){tbody=wrapper_elem.childNodes;}else{tbody=[];}
for(var ii=tbody.length-1;ii>=0;(ii= _proxy_jslib_assign_rval('--', 'ii', '', '', ii))){if( _proxy_jslib_handle(tbody, (ii), 0, 0).nodeName&& _proxy_jslib_handle(tbody, (ii), 0, 0).nodeName.toLowerCase()=='tbody'&& _proxy_jslib_handle(tbody, (ii), 0, 0).childNodes.length==0){ _proxy_jslib_handle(tbody, (ii), 0, 0).parentNode.removeChild( _proxy_jslib_handle(tbody, (ii), 0, 0));}}}
var scripts= _proxy_jslib_handle(wrapper_elem, 'getElementsByTagName', '', 1, 0)('script');var callbacks=[];for(var i=0;i<scripts.length;i++){if( _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'src', '', 0, 0)){callbacks.push(Bootloader.requestResource.bind(Bootloader,'js', _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'src', '', 0, 0)));}else{callbacks.push(eval_global.bind(null, _proxy_jslib_handle( _proxy_jslib_handle(scripts, (i), 0, 0), 'innerHTML', '', 0, 0)));}}
for(var i=scripts.length-1;i>=0;i--){ _proxy_jslib_handle(scripts, (i), 0, 0).parentNode.removeChild( _proxy_jslib_handle(scripts, (i), 0, 0));}
var extracted_js=function() {for(var ii=0;ii<callbacks.length;ii++){ _proxy_jslib_handle(callbacks, (ii), 1, 0)();}};this._nodes=to_array(wrapper_elem.childNodes);this._inline_js=extracted_js;}});

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;}))

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 escapeURI(u) {if(encodeURIComponent){return encodeURIComponent(u);}
if(escape){return escape(u);}}
function htmlspecialchars(text) {if(typeof(text)=='undefined'||text===null||! _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 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;}

function env_get(k) {return typeof( _proxy_jslib_handle(window, ('Env'), 0, 0))!='undefined'&& _proxy_jslib_handle(Env, (k), 0, 0);}
function muffinize(str) {var muffin_top='a';var muffin_bottom='d';var muffin=[muffin_top,muffin_bottom].join('')
return  _proxy_jslib_handle(str, 'replace', '', 1, 0)(/muffin/g,muffin);}
var Util={_suppress:false,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._suppress){return;}
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);}}},setSuppressed:function(suppress) {Util._suppress=suppress;},stack:function() {return _proxy_jslib_handle((new (Stack)()), 'toString', '', 1, 0)();},trace:function() {Util.log(Util.stack());}};

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=$E(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;}

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);}}};

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;}}};

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 adjustUABehaviors() {onloadRegister(addSafariLabelSupport);Arbiter.subscribe('DOM.contentAdded',function(type,data) {addSafariLabelSupport(data);},Arbiter.SUBSCRIBE_NEW);if(ua.ie()<7){try{ _proxy_jslib_handle(document, 'execCommand', '', 1, 0)('BackgroundImageCache',false,true);}catch(ignored){}}}
function addSafariLabelSupport(bases) {bases=bases||[ _proxy_jslib_handle(document, 'body', '', 0, 0)];if(ua.safari()<500){for(var ii=0;ii<labels.bases.length;ii++){var labels= _proxy_jslib_handle( _proxy_jslib_handle(bases, (ii), 0, 0), 'getElementsByTagName', '', 1, 0)('label');for(jj=0;jj<labels.length;jj++){Event.listen( _proxy_jslib_handle(labels, (jj), 0, 0),'click',addLabelAction);}}}}
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 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) {DOM.setContent(obj,HTML(html).setDeferred(!!defer_js_execution));}
function eval_global(js) {if('string'!=typeof(js)){throw new (Error)('JS sent to eval_global is not a string.  Only strings '+'are permitted.');}else if(''==js){return;}
var obj=document.createElement('script');obj.type='text/javascript';try{obj.appendChild(document.createTextNode(js));}catch(e){obj.text=js;}
 _proxy_jslib_handle(document, 'body', '', 0, 0).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;},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),true);if(elem&&('*'==tag||elem.tagName.toLowerCase()==tag)){for(var iter=0;iter<candidates.length;iter++){if(document== _proxy_jslib_handle(candidates, (iter), 0, 0)||DOM.contains( _proxy_jslib_handle(candidates, (iter), 0, 0),elem)){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;},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;}},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);window.CssManager&&CssManager.useElement(attributes);}
if(children!=undefined){DOM.setContent(element,children);}
var aug=no_augment?identity:DOM._getNodeAugment();return aug(element);},setID:function(element,id) {element.id=id;window.CssManager&&CssManager.useID(id);},prependContent:function(parent,content) {if(!is_node( _proxy_jslib_handle(null, 'parent', parent, 0, 0))){throw new (Error)('DOM.prependContent: reference element is not a node');}
var append_fn=function(fragment) {if( _proxy_jslib_handle(null, 'parent', parent, 0, 0).firstChild){ _proxy_jslib_handle(null, 'parent', parent, 0, 0).insertBefore(fragment, _proxy_jslib_handle(null, 'parent', parent, 0, 0).firstChild);}else{ _proxy_jslib_handle(null, 'parent', parent, 0, 0).appendChild(fragment);}};return DOM._addContent( _proxy_jslib_handle(null, 'content', content, 0, 0),append_fn);},insertAfter:function(reference_element,content) {if(!is_node(reference_element)||!reference_element.parentNode){throw new (Error)('DOM.insertAfter: reference element is not a node');}
var append_fn=function(fragment) {if(reference_element.nextSibling){reference_element.parentNode.insertBefore(fragment,reference_element.nextSibling);}else{reference_element.parentNode.appendChild(fragment);}};return DOM._addContent( _proxy_jslib_handle(null, 'content', content, 0, 0),append_fn);},insertBefore:function(content,reference_element) {if(!is_node(reference_element)||!reference_element.parentNode){throw new (Error)('DOM.insertBefore: reference element is not a node');}
var append_fn=function(fragment) {reference_element.parentNode.insertBefore(fragment,reference_element);};return DOM._addContent( _proxy_jslib_handle(null, 'content', content, 0, 0),append_fn);},setContent:function(el,content) {if(!is_node(el)){throw new (Error)('DOM.setContent: reference element is not a node');}
DOM.removeAllChildren(el);return DOM.appendContent(el, _proxy_jslib_handle(null, 'content', content, 0, 0));},appendContent:function(reference_element,content) {if(!is_node(reference_element)){throw new (Error)('DOM.appendContent: reference element is not a node');}
var append_fn=function(fragment) {reference_element.appendChild(fragment);};return DOM._addContent( _proxy_jslib_handle(null, 'content', content, 0, 0),append_fn);},replace:function(reference_element,content) {if(!is_node(reference_element)||!reference_element.parentNode){throw new (Error)('DOM.replace: reference element must be a node with a'+' parent');}
var append_fn=function(fragment) {reference_element.parentNode.replaceChild(fragment,reference_element);};DOM._addContent( _proxy_jslib_handle(null, 'content', content, 0, 0),append_fn);},_gettingCaretPosition:false,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{if(!DOM._gettingCaretPosition){DOM._gettingCaretPosition=true;element.focus();DOM._gettingCaretPosition=false;}
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) {obj=$(obj);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();}},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,true);while(element.firstChild){element.removeChild(element.firstChild);}},contains:function(outer_obj,inner_obj) {outer_obj=ge(outer_obj,true);inner_obj=ge(inner_obj,true);if(!outer_obj||!inner_obj||outer_obj.nodeType!=DOM.NODE_TYPES.ELEMENT||inner_obj.nodeType!=DOM.NODE_TYPES.ELEMENT){return false;}
return outer_obj.contains(inner_obj);},NODE_TYPES:{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION_NODE:12},_addContent:function(content,append_fn) {var item,elements=[],callbacks=[];var fragment=document.createDocumentFragment();if(!( _proxy_jslib_handle(null, 'content', content, 0, 0) instanceof Array)){ content= _proxy_jslib_assign_rval('', 'content', '=', ([ _proxy_jslib_handle(null, 'content', content, 0, 0)]), content);}
for(var ii=0;ii< _proxy_jslib_handle(null, 'content', content, 0, 0).length;ii++){item= _proxy_jslib_handle( _proxy_jslib_handle(null, 'content', content, 0, 0), (ii), 0, 0);if(item instanceof HTML){callbacks.push(item.getAction());var new_nodes=item.getNodes();for(var jj=0;jj<new_nodes.length;jj++){var cloned_item=(ua.ie()&&item.hasOptionElements())? _proxy_jslib_handle(new_nodes, (jj), 0, 0): _proxy_jslib_handle(new_nodes, (jj), 0, 0).cloneNode(true);elements.push(cloned_item);fragment.appendChild(cloned_item);}}else if(is_scalar(item)){var text=document.createTextNode(item);elements.push(text);fragment.appendChild(text);}else if(is_node(item)){elements.push(item);fragment.appendChild(item);}else if(item instanceof Array){Util.error('DOM._addContent: Nested arrays not supported');}else if(item!==null){Util.error('DOM._addContent: No way to set content %q.',item);}}
append_fn(fragment);for(var ii=0;ii<callbacks.length;ii++){ _proxy_jslib_handle(callbacks, (ii), 1, 0)();}
if(0<elements.length){Arbiter.inform('DOM.contentJustAdded',elements);Arbiter.inform.bind(Arbiter,'DOM.contentAdded',elements).defer();}
return elements;},_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),prependContent:bind1st(DOM.prependContent),appendContent:bind1st(DOM.appendContent),replace:bind1st( _proxy_jslib_handle(DOM, 'replace', '', 0, 0)),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;}
if(window.Node&&Node.prototype&&!Node.prototype.contains){Node.prototype.contains=function(arg) {return this===arg||!!(this.compareDocumentPosition(arg)&16);}}

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'));}
addEventBase(r,'focus',this.setFocused.bind(this,true));addEventBase(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'),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);}}

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)){className=trim(className);if(element.className){element.className+=' '+className;}else{element.className=className;}
window.CssManager&&CssManager.useClasses(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,true);element.className=className;window.CssManager&&CssManager.useClasses(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 _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,$E(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(!root_element||root_element.nodeType!=DOM.NODE_TYPES.ELEMENT){return;}
var tabconsole=ge('tabconsole');if(tabconsole){if((root_element.id&&root_element.id.substring(0,8)=='cacheobs')||DOM.contains(tabconsole,root_element)){return;}}
var should_insert=ua.firefox()&&!DOM.contains( _proxy_jslib_handle(document, 'body', '', 0, 0),root_element);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 element,event_name=this._controlled_event_name.substring(2),onevent=this._onevent,elements= _proxy_jslib_handle(root_element, 'getElementsByTagName', '', 1, 0)(this._controlled_tag_name);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);}
if(is_node(root_element,this._controlled_tag_name)){Event.listen(root_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.kill(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.bindAll( _proxy_jslib_handle(document, 'body', '', 0, 0));Arbiter.subscribe('DOM.contentAdded',function(type,data) {for(var ii=0;ii<data.length;ii++){this.bindAll( _proxy_jslib_handle(data, (ii), 0, 0));}}.bind(this),Arbiter.SUBSCRIBE_NEW);}.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 AsyncSignal(uri,data) {this.data=data||{};this.uri=uri;this.handler=null;}
AsyncSignal.prototype.setHandler=function(h) {this.handler=h;return this;}
AsyncSignal.prototype.send=function() {var h=this.handler,d=this.data,u=this.uri,s=[],i=new (Image)(),a= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('post_form_id');d.asyncSignal=true;if(a){d.post_form_id= _proxy_jslib_handle(a, 'value', '', 0, 0);}
for(var k in d){s.push(encodeURIComponent(k)+'='+encodeURIComponent( _proxy_jslib_handle(d, (k), 0, 0)));}
if(u.indexOf('?')==-1){u+='?';}
u+=s.join('&');if(h){i.onload=i.onerror=(function(i,h) {return function() {h((i.height==1));}})(i,h);}
 _proxy_jslib_assign('', i, 'src', '=', (u));return this;}

function setCookie(cookieName,cookieValue,nMilliSecs) {if(nMilliSecs){var thisMoment=new (Date)();var expire=new (Date)();expire.setTime(thisMoment.getTime()+nMilliSecs);}
 _proxy_jslib_assign('', document, 'cookie', '=', (cookieName+"="+encodeURIComponent(cookieValue)+"; "+
(nMilliSecs?"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 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
+ _proxy_jslib_handle(offset_info, (prop), 0, 0))
+'px';break;case'right':menu.style.left=(offset_el.offsetLeft
+offset_el.offsetWidth
- _proxy_jslib_handle(offset_info, (prop), 0, 0)
-menu.offsetWidth)
+'px';break;case'bottom': _proxy_jslib_assign('', menu.style, 'top', '=', ((offset_el.offsetTop
+offset_el.offsetHeight
- _proxy_jslib_handle(offset_info, (prop), 0, 0)
-menu.offsetHeight)
+'px'));break;}}}
if(arrow){var old_arrow_classname=arrow_old_class?arrow_old_class:arrow.className;}
if(link){CSS.addClass(link,'active')}
if(arrow){CSS.setClass(arrow,arrow_class?arrow_class:'global_menu_arrow_active');}
var justChanged=true;var shim=ge(menu.id+'_iframe');if(shim){ _proxy_jslib_assign('', shim.style, 'top', '=', ( _proxy_jslib_handle(menu.style, 'top', '', 0, 0)));shim.style.right=menu.style.right;shim.style.display='block';shim.style.width=(menu.offsetWidth+2)+'px';shim.style.height=(menu.offsetHeight+2)+'px';}
menu.offclick=function(e) {if(!justChanged){hide(this);if(link){CSS.removeClass(link,'active');}
if(arrow){CSS.setClass(arrow,old_arrow_classname);}
var shim=ge(menu.id+'_iframe');if(shim){shim.style.display='none';shim.style.width=menu.offsetWidth+'px';shim.style.height=menu.offsetHeight+'px';}
if(off_click_callback){off_click_callback(e);}
removeEventBase(document,'click',this.offclick,menu.id);}else{justChanged=false;}}.bind(menu);if(on_click_callback){on_click_callback();}
addEventBase(document,'click',menu.offclick,menu.id);onunloadRegister(menu.offclick,true);}
return false;}
function getTableRowShownDisplayProperty() {if(ua.ie()<8){return'inline';}else{return'table-row';}}
function showTableRow() {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=getTableRowShownDisplayProperty();}
return false;}
function getParentRow(el) {el=ge(el);while(el.tagName&&el.tagName!="TR"){el=el.parentNode;}
return el;}
function adjustImage(obj) {var block=obj.parentNode;while(CSS.getStyle(block,'display')!='block'&&block.parentNode){block=block.parentNode;}
var width=block.offsetWidth;if(obj.offsetWidth>width){try{if(ua.ie()<8){var img_div=document.createElement('div');img_div.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+ _proxy_jslib_handle( _proxy_jslib_handle(obj, 'src', '', 0, 0), 'replace', '', 1, 0)('"','%22')+'", sizingMethod="scale")';img_div.style.width=width+'px';img_div.style.height=Math.floor(((width/obj.offsetWidth)*obj.offsetHeight))+'px';if(obj.parentNode.tagName=='A'){ _proxy_jslib_assign('', img_div.style, 'cursor', '=', ('pointer'));}
obj.parentNode.insertBefore(img_div,obj);obj.parentNode.removeChild(obj);}else{throw 1;}}catch(e){obj.style.width=width+'px';}}
CSS.removeClass(obj,'img_loading');}
function imageConstrainSize(src,maxX,maxY,placeholderid) {var image=new (Image)();image.onload=function() {if(image.width>0&&image.height>0){var width=image.width;var height=image.height;if(width>maxX||height>maxY){var desired_ratio=maxY/maxX;var actual_ratio=height/width;if(actual_ratio>desired_ratio){width=width*(maxY/height);height=maxY;}else{height=height*(maxX/width);width=maxX;}}
var placeholder=ge(placeholderid);if(placeholder){var newimage=document.createElement('img'); _proxy_jslib_assign('', newimage, 'src', '=', ( _proxy_jslib_handle(null, 'src', src, 0, 0)));newimage.width=width;newimage.height=height;placeholder.parentNode.insertBefore(newimage,placeholder);placeholder.parentNode.removeChild(placeholder);}}}
 _proxy_jslib_assign('', image, 'src', '=', ( _proxy_jslib_handle(null, 'src', src, 0, 0)));}
function require_password_confirmation(onsuccess,oncancel) {if((!getCookie('sid')||getCookie('sid')=='0')||getCookie('pk')){onsuccess();return;}
require_password_confirmation.onsuccess=onsuccess;require_password_confirmation.oncancel=oncancel;(new (pop_dialog)()).show_ajax_dialog('/ajax/password_check_dialog.php');}
function search_validate(search_input_id) {var search_input=$(search_input_id);if( _proxy_jslib_handle(search_input, 'value', '', 0, 0)!=""&& _proxy_jslib_handle(search_input, 'value', '', 0, 0)!=search_input.getAttribute('placeholder')){return true;}else{search_input.focus();return false;}}
function abTest(data,inline) {AsyncRequest.pingURI('/ajax/abtest.php',{data:data,"post_form_id":null},true);if(!inline){return true;}}
function ac(metadata) {new (AsyncSignal)('/ajax/ac.php',{'meta':metadata}).send();return true;}
function alc(metadata) {AsyncRequest.pingURI('/ajax/alc.php',{'meta':metadata},true);return true;}
function scribe_log(category,message) {AsyncRequest.pingURI('/ajax/scribe_log.php',{'category':category,'message':message,'post_form_id':null},true);}
function image_has_loaded(obj) {try{if((obj.mimeType!=null&&obj.complete&&obj.mimeType!='')||(obj.naturalHeight!=null&&obj.complete&&obj.naturalHeight!=0)){return true;}else if(ua.safari()<3){var new_image=new (Image)(); _proxy_jslib_assign('', new_image, 'src', '=', ( _proxy_jslib_handle(obj, 'src', '', 0, 0)));if(new_image.complete==true){return true;}
(new_image= _proxy_jslib_assign_rval('delete', 'new_image', '', '', new_image));}}catch(exception){return true;}}
function image_has_failed(obj) {if((obj.complete==null&&obj.width==20&&obj.height==20)||(obj.mimeType!=null&&obj.complete&&obj.mimeType=='')||(obj.naturalHeight!=null&&obj.complete&&obj.naturalHeight==0)){return true;}}
function show_search_profile(user_id) {var async=new (AsyncRequest)().setURI('/ajax/search_profile.php').setData({id:user_id}).setMethod('GET').setReadOnly(true);new (Dialog)().setAsync(async).setButtons(Dialog.CLOSE).setContentWidth(490).show();}
function _search_profile_link_handler(link) {var uri=new (URI)( _proxy_jslib_handle(link, 'href', '', 0, 0));if(uri.getPath()=='/s.php'){var query=uri.getQueryData();if(query.k==100000080){show_search_profile(query.id);return false;}}}
onloadRegister(function() {LinkController.registerHandler(_search_profile_link_handler);});function warn_if_unsaved(form_id) {var form=ge(form_id);if(!form){Util.error("warn_if_unsaved couldn't find form in order to save its "
+"original state.  This is probably because you called "
+"render_start_form_with_unsaved_warning to render a form, "
+"but then didn't echo it into page.  To get around this, you "
+"can call render_start_form, and then call warn_if_unsaved "
+"yourself once you've caused the form to appear.");return;}
if(!_unsaved_forms_to_check_for){_unsaved_forms_to_check_for={};LinkController.registerHandler(_check_for_unsaved_forms);}
form.original_state=serialize_form(form); _proxy_jslib_assign('', _unsaved_forms_to_check_for, (form_id), '=', (true));}
function _check_for_unsaved_forms(link) {for(var form_id in _unsaved_forms_to_check_for){var form=ge(form_id);if(form&&form.original_state&&!are_equal(form.original_state,serialize_form(form))){var href= _proxy_jslib_handle(link, 'href', '', 0, 0);var submit=_find_first_submit_button(form);var buttons=[];if(submit){buttons.push({name:'save',label:_tx("Save"),handler:function() {submit.click();}});}
buttons.push({name:'dont_save',label:_tx("Don't Save"),className:'inputaux',handler:function() { _proxy_jslib_assign('',  _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '=', ( _proxy_jslib_handle(null, 'href', href, 0, 0)));}});buttons.push(Dialog.CANCEL);new (Dialog)().setTitle(_tx("Unsaved Changes")).setBody(_tx("Some of your changes have not been saved.  Would you like to save your changes now?")).setButtons(buttons).setModal().show();return false;}}}
function _find_first_submit_button(root_element) {var inputs= _proxy_jslib_handle(root_element, 'getElementsByTagName', '', 1, 0)('input');for(var i=0;i<inputs.length;(i= _proxy_jslib_assign_rval('++', 'i', '', '', i))){if( _proxy_jslib_handle(inputs, (i), 0, 0).type.toUpperCase()=='SUBMIT'){return  _proxy_jslib_handle(inputs, (i), 0, 0);}}
return null;}
_unsaved_forms_to_check_for=undefined;function textLimit(ta,count) {var text=ge(ta);if( _proxy_jslib_handle(text, 'value', '', 0, 0).length>count){ _proxy_jslib_assign('', text, 'value', '=', ( _proxy_jslib_handle(text, 'value', '', 0, 0).substring(0,count)));if(arguments.length>2){$(arguments[2]).style.display='block';}}}
function textLimitStrict(text_id,limit,message_id,count_id,submit_id) {var text=ge(text_id);if(text){var len= _proxy_jslib_handle(text, 'value', '', 0, 0).length;var diff=len-limit;if(diff>0){if(diff>25000){ _proxy_jslib_assign('', text, 'value', '=', ( _proxy_jslib_handle(text, 'value', '', 0, 0).substring(0,limit+25000)));diff=25000;}
$(message_id).style.display='block'; _proxy_jslib_assign('', $(count_id), 'innerHTML', '=', (diff));$(submit_id).disabled=true;}else if(len==0){$(message_id).style.display='none';$(submit_id).disabled=true; _proxy_jslib_assign('', $(count_id), 'innerHTML', '=', (1));}else{if( _proxy_jslib_handle($(count_id), 'innerHTML', '', 0, 0)!=0){ _proxy_jslib_assign('', $(count_id), 'innerHTML', '=', (0));$(message_id).style.display='none';$(submit_id).disabled=false;}}}}
function city_selector_onfound(input,obj) { _proxy_jslib_assign('', input, 'value', '=', (obj?obj.i:-1));}
function city_selector_onselect(success) {if( _proxy_jslib_handle(window, (success), 0, 0)){ _proxy_jslib_handle(window, (success), 1, 0)();}}
ua.populate();_bootstrapEventHandlers();adjustUABehaviors();if(navigator&&navigator.userAgent&& _proxy_jslib_handle(document, 'domain', '', 0, 0).toLowerCase().indexOf('facebook.com')!=-1&&!(parseInt((/Gecko\/([0-9]+)/.exec(navigator.userAgent)||[]).pop())<=20060508)){ _proxy_jslib_assign('', document, 'domain', '=', ('facebook.com'));}

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 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 animation(obj) {if(obj==undefined){Util.error("Creating animation on non-existant object");return;}
if(this==window){return new (animation)(obj);}else{this.obj=obj;this._reset_state();this.queue=[];this.last_attr=null;}}
animation.resolution=20;animation.offset=0;animation.prototype._reset_state=function() {this.state={attrs:{},duration:500}}
animation.prototype.stop=function() {this._reset_state();this.queue=[];return this;}
animation.prototype._build_container=function() {if(this.container_div){this._refresh_container();return;}
if(this.obj.firstChild&&this.obj.firstChild.__animation_refs){this.container_div=this.obj.firstChild;this.container_div.__animation_refs++;this._refresh_container();return;}
var container=document.createElement('div');container.style.padding='0px';container.style.margin='0px';container.style.border='0px';container.__animation_refs=1;var children=this.obj.childNodes;while(children.length){container.appendChild(children[0]);}
this.obj.appendChild(container);this.obj.style.overflow='hidden';this.container_div=container;this._refresh_container();}
animation.prototype._refresh_container=function() {this.container_div.style.height='auto';this.container_div.style.width='auto';this.container_div.style.height=this.container_div.offsetHeight+'px';this.container_div.style.width=this.container_div.offsetWidth+'px';}
animation.prototype._destroy_container=function() {if(!this.container_div){return;}
if(! _proxy_jslib_assign('--', (this.container_div), ('__animation_refs'), '')){var children=this.container_div.childNodes;while(children.length){this.obj.appendChild(children[0]);}
this.obj.removeChild(this.container_div);}
this.container_div=null;}
animation.ATTR_TO=1;animation.ATTR_BY=2;animation.ATTR_FROM=3;animation.prototype._attr=function(attr,value,mode) {attr= _proxy_jslib_handle(attr, 'replace', '', 1, 0)(/-[a-z]/gi,function(l) {return l.substring(1).toUpperCase();});var auto=false;switch(attr){case'background':this._attr('backgroundColor', _proxy_jslib_handle(null, 'value', value, 0, 0),mode);return this;case'margin': value= _proxy_jslib_assign_rval('', 'value', '=', (animation.parse_group( _proxy_jslib_handle(null, 'value', value, 0, 0))), value);this._attr('marginBottom', _proxy_jslib_handle(null, 'value', value, 0, 0)[0],mode);this._attr('marginLeft', _proxy_jslib_handle(null, 'value', value, 0, 0)[1],mode);this._attr('marginRight', _proxy_jslib_handle(null, 'value', value, 0, 0)[2],mode);this._attr('marginTop', _proxy_jslib_handle(null, 'value', value, 0, 0)[3],mode);return this;case'padding': value= _proxy_jslib_assign_rval('', 'value', '=', (animation.parse_group( _proxy_jslib_handle(null, 'value', value, 0, 0))), value);this._attr('paddingBottom', _proxy_jslib_handle(null, 'value', value, 0, 0)[0],mode);this._attr('paddingLeft', _proxy_jslib_handle(null, 'value', value, 0, 0)[1],mode);this._attr('paddingRight', _proxy_jslib_handle(null, 'value', value, 0, 0)[2],mode);this._attr('paddingTop', _proxy_jslib_handle(null, 'value', value, 0, 0)[3],mode);return this;case'backgroundColor':case'borderColor':case'color': value= _proxy_jslib_assign_rval('', 'value', '=', (animation.parse_color( _proxy_jslib_handle(null, 'value', value, 0, 0))), value);break;case'opacity': value= _proxy_jslib_assign_rval('', 'value', '=', (parseFloat( _proxy_jslib_handle(null, 'value', value, 0, 0),10)), value);break;case'height':case'width':if( _proxy_jslib_handle(null, 'value', value, 0, 0)=='auto'){auto=true;}else{ value= _proxy_jslib_assign_rval('', 'value', '=', (parseInt( _proxy_jslib_handle(null, 'value', value, 0, 0),10)), value);}
break;case'borderWidth':case'lineHeight':case'fontSize':case'marginBottom':case'marginLeft':case'marginRight':case'marginTop':case'paddingBottom':case'paddingLeft':case'paddingRight':case'paddingTop':case'bottom':case'left':case'right':case'top':case'scrollTop':case'scrollLeft': value= _proxy_jslib_assign_rval('', 'value', '=', (parseInt( _proxy_jslib_handle(null, 'value', value, 0, 0),10)), value);break;default:throw new (Error)(attr+' is not a supported attribute!');}
if( _proxy_jslib_handle(this.state.attrs, (attr), 0, 0)===undefined){ _proxy_jslib_assign('', this.state.attrs, (attr), '=', ({}));}
if(auto){ _proxy_jslib_handle(this.state.attrs, (attr), 0, 0).auto=true;}
switch(mode){case animation.ATTR_FROM: _proxy_jslib_handle(this.state.attrs, (attr), 0, 0).start= _proxy_jslib_handle(null, 'value', value, 0, 0);break;case animation.ATTR_BY: _proxy_jslib_handle(this.state.attrs, (attr), 0, 0).by=true;case animation.ATTR_TO: _proxy_jslib_assign('',  _proxy_jslib_handle(this.state.attrs, (attr), 0, 0), 'value', '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));break;}}
animation.prototype.to=function(attr,value) {if( _proxy_jslib_handle(null, 'value', value, 0, 0)===undefined){this._attr(this.last_attr,attr,animation.ATTR_TO);}else{this._attr(attr, _proxy_jslib_handle(null, 'value', value, 0, 0),animation.ATTR_TO);this.last_attr=attr;}
return this;}
animation.prototype.by=function(attr,value) {if( _proxy_jslib_handle(null, 'value', value, 0, 0)===undefined){this._attr(this.last_attr,attr,animation.ATTR_BY);}else{this._attr(attr, _proxy_jslib_handle(null, 'value', value, 0, 0),animation.ATTR_BY);this.last_attr=attr;}
return this;}
animation.prototype.from=function(attr,value) {if( _proxy_jslib_handle(null, 'value', value, 0, 0)===undefined){this._attr(this.last_attr,attr,animation.ATTR_FROM);}else{this._attr(attr, _proxy_jslib_handle(null, 'value', value, 0, 0),animation.ATTR_FROM);this.last_attr=attr;}
return this;}
animation.prototype.duration=function(duration) {this.state.duration=duration?duration:0;return this;}
animation.prototype.checkpoint=function(distance,callback) {if(distance===undefined){distance=1;}
this.state.checkpoint=distance;this.queue.push(this.state);this._reset_state();this.state.checkpointcb=callback;return this;}
animation.prototype.blind=function() {this.state.blind=true;return this;}
animation.prototype.hide=function() {this.state.hide=true;return this;}
animation.prototype.show=function() {this.state.show=true;return this;}
animation.prototype.ease=function(ease) {this.state.ease=ease;return this;}
animation.prototype.go=function() {var time=(new (Date)()).getTime();this.queue.push(this.state);for(var i=0;i<this.queue.length;i++){ _proxy_jslib_handle(this.queue, (i), 0, 0).start=time-animation.offset;if( _proxy_jslib_handle(this.queue, (i), 0, 0).checkpoint){time+= _proxy_jslib_handle(this.queue, (i), 0, 0).checkpoint* _proxy_jslib_handle(this.queue, (i), 0, 0).duration;}}
animation.push(this);return this;}
animation.prototype._frame=function(time) {var done=true;var still_needs_container=false;var whacky_firefox=false;for(var i=0;i<this.queue.length;i++){var cur= _proxy_jslib_handle(this.queue, (i), 0, 0);if(cur.start>time){done=false;continue;}
if(cur.checkpointcb){this._callback(cur.checkpointcb,time-cur.start);cur.checkpointcb=null;}
if(cur.started===undefined){if(cur.show){this.obj.style.display='block';}
for(var a in cur.attrs){if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).start!==undefined){continue;}
switch(a){case'backgroundColor':case'borderColor':case'color':var val=animation.parse_color(CSS.getStyle(this.obj,a=='borderColor'?'borderLeftColor':a));if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[0]=Math.min(255,Math.max(0, _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[0]+val[0])); _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[1]=Math.min(255,Math.max(0, _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[1]+val[1])); _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[2]=Math.min(255,Math.max(0, _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)[2]+val[2]));}
break;case'opacity':var val=CSS.getOpacity(this.obj);if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_assign('',  _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '=', (Math.min(1,Math.max(0, _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)+val))));}
break;case'height':var val=DOM.getBoxHeight(this.obj);if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_assign('',  _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '+=', (val));}
break;case'width':var val=DOM.getBoxWidth(this.obj);if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_assign('',  _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '+=', (val));}
break;case'scrollLeft':case'scrollTop':var val=(this.obj== _proxy_jslib_handle(document, 'body', '', 0, 0))?( _proxy_jslib_handle(document.documentElement, (a), 0, 0)|| _proxy_jslib_handle( _proxy_jslib_handle(document, 'body', '', 0, 0), (a), 0, 0)): _proxy_jslib_handle(this.obj, (a), 0, 0);if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_assign('',  _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '+=', (val));}
 _proxy_jslib_assign('', cur, ('last'+a), '=', (val));break;default:var val=parseInt(CSS.getStyle(this.obj,a),10);if( _proxy_jslib_handle(cur.attrs, (a), 0, 0).by){ _proxy_jslib_assign('',  _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '+=', (val));}
break;}
 _proxy_jslib_handle(cur.attrs, (a), 0, 0).start=val;}
if((cur.attrs.height&&cur.attrs.height.auto)||(cur.attrs.width&&cur.attrs.width.auto)){if(ua.firefox()<3){whacky_firefox=true;}
this._destroy_container();for(var a in{height:1,width:1,fontSize:1,borderLeftWidth:1,borderRightWidth:1,borderTopWidth:1,borderBottomWidth:1,paddingLeft:1,paddingRight:1,paddingTop:1,paddingBottom:1}){if( _proxy_jslib_handle(cur.attrs, (a), 0, 0)){ _proxy_jslib_assign('', this.obj.style, (a), '=', ( _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)+(typeof  _proxy_jslib_handle( _proxy_jslib_handle(cur.attrs, (a), 0, 0), 'value', '', 0, 0)=='number'?'px':'')));}}
if(cur.attrs.height&&cur.attrs.height.auto){ _proxy_jslib_assign('', cur.attrs.height, 'value', '=', (DOM.getBoxHeight(this.obj)));}
if(cur.attrs.width&&cur.attrs.width.auto){ _proxy_jslib_as