/**
 * This code was generated by JASPA-0.2.6-beta. 
 * Mon, 28 Dec 2009 17:29:04 +0000
 * Please visit http://jaspa.org.uk for more information. 
 */
var jaspa = {dom:{elements:{}},net:{},events:{}};
var org = {twitblock:{}};
jaspa.member=function(ob,name,sc,mode,setval){if(ob==null){if(mode===2){throw new ReferenceError('Failed to set property on non-object, '+name+' = '+setval);}throw new ReferenceError('Failed to access property of non-object, '+name);}var mm,pt,pc;f:do {if(ob instanceof Array&&!isNaN(Number(name))){mm=ob[name];if(mode===2){ob[name]=setval;}break f;}if(ob instanceof Function){if(!ob.$traits){mm=ob[name];if(mode===2){ob[name]=setval;}break f;}pt=ob;pc=ob;var isStatic=true;}else {if(!ob.__proto__||!ob.__proto__.$self){mm=ob[name];if(mode===2){ob[name]=setval;}break f;}pt=ob.__proto__;pc=pt.$self;var isStatic=false;}while(pt){var classAccess=pc.$traits[0];if((classAccess&128)&&ob[name]!==undefined){mm=ob[name];if(mode===2){ob[name]=setval;}break f;}var mem=pc.$traits[3][name];if(mem instanceof Array){var m=mem[0];var a=mem[1];if(mode===1&&!(m&1)){throw new ReferenceError('Member is not readable, '+name);}if(mode===2&&!(m&2)){throw new ReferenceError('Member is not writeable, '+name);}if(isStatic&&!(a&32)){throw new ReferenceError('Illegal attempt to access member statically, '+name);}if(!isStatic&&(a&32)){throw new ReferenceError('Illegal attempt to access static member, '+name);}if(!isStatic&&(a&512)){if(mode===2){var setFunc=jaspa.member(ob,'$set_'+name,sc,1);if(!setFunc instanceof Function){throw new ReferenceError('Failed to set overloaded member, '+name);}setFunc.call(ob,setval);return undefined;}if(mode===1){var getFunc=jaspa.member(ob,'$get_'+name,sc,1);if(!getFunc instanceof Function){throw new ReferenceError('Failed to access overloaded member, '+name);}mm=getFunc.call(ob);break f;}}if(a&2){mm=ob[name];if(mode===2){ob[name]=setval;}break f;}if(!sc.$traits){throw new ReferenceError('Illegal attempt to access non-public member, '+name);}if(a&1){if(sc!==pc){throw new ReferenceError('Illegal attempt to access private member, '+name);}name='$priv_'+name;mm=ob[name];if(mode===2){ob[name]=setval;}break f;}if(a&4){if(sc===pc){}else if(pc.prototype.isPrototypeOf(sc.prototype)){}else if(sc.prototype.isPrototypeOf(pc.prototype)){if(!sc.$traits[3][name]){throw new ReferenceError('Illegal attempt to access protected member in subclass, '+name);}}else {throw new ReferenceError('Illegal attempt to access protected member, '+name);}name='$prot_'+name;mm=ob[name];if(mode===2){ob[name]=setval;}break f;}if(sc.$traits[1]!==pc.$traits[1]){throw new ReferenceError('Illegal attempt to access internal member, '+name);}name='$intl_'+name;mm=ob[name];if(mode===2){ob[name]=setval;}break f;throw new ReferenceError('internal error accessing member, '+name);}if(isStatic){throw new ReferenceError('Unknown static member, '+name);}pt=pt.__proto__;if(!pt||!pt.$self){if(mode===2){ob[name]=setval;break f;}if(pt[name]!==undefined){mm=ob[name];break f;}throw new ReferenceError('Unknown member, '+name);}pc=pt.$self;}}while(false);if(mode===2){return setval;}if(mm instanceof Function){mm=jaspa.closure(ob,mm);}return mm;};jaspa.cast=function(f,nul,ob){if(ob instanceof f){return ob;}throw new TypeError('Type Coercion failed');};jaspa.castAs=function(ob,f,nul){if(ob&&ob.constructor===f){return ob;}return ob instanceof f?ob:nul;};
jaspa.events.EventTarget = function(){ this.__proto__ = jaspa.events.EventTarget.prototype; return jaspa.$status ? Object.apply(this,arguments) : this; };
jaspa.events.EventTarget.$traits = [ 2,'jaspa.events','EventTarget', {_listeners:[3,1,'jaspa.DynamicObject'],initEventBindings:[3,4,'Function'],toString:[3,258,'Function'],hasListeners:[3,2,'Function'],isSameListener:[3,1,'Function'],addEventListener:[3,2,'Function'],removeEventListener:[3,2,'Function'],dispatchEvent:[3,2,'Function'],fireEvent:[3,8,'Function']} ];
jaspa.events.EventTarget.prototype = new Object;
jaspa.events.EventTarget.prototype.$self = jaspa.events.EventTarget;
jaspa.events.EventTarget.prototype.$priv__listeners = null;
jaspa.events.EventTarget.prototype.$prot_initEventBindings = function(){};
jaspa.events.EventTarget.prototype.toString = function(){return '[Object EventTarget]';};
jaspa.events.EventTarget.prototype.hasListeners = function(){if(!this.$priv__listeners){return false;}for(var type = null in this.$priv__listeners){return true;}return false;};
jaspa.events.EventTarget.prototype.$priv_isSameListener = function(){var ListenerA = arguments[0];var ListenerB = arguments[1];return ListenerA===ListenerB||ListenerA.valueOf()===ListenerB.valueOf();};
jaspa.events.EventTarget.prototype.addEventListener = function(){var type = arguments[0];var Listener = arguments[1];var useCapture = arguments.length >= 3 ? arguments[2] : false;if(typeof Listener!=='function'){throw new TypeError('Listener is not a function, '+Listener);}if(this.$priv__listeners==null){this.$priv__listeners=new jaspa.DynamicObject;}if(this.$priv__listeners[type]==null){this.$priv__listeners[type]=[];}var i = useCapture?jaspa.events.Event.CAPTURING_PHASE:jaspa.events.Event.BUBBLING_PHASE;if(this.$priv__listeners[type][i]==null){this.$priv__listeners[type][i]=[];}for(var j = 0;j<this.$priv__listeners[type][i].length;j++){if(this.$priv_isSameListener(this.$priv__listeners[type][i][j],Listener)){return ;}}this.$priv__listeners[type][i].push(Listener);};
jaspa.events.EventTarget.prototype.removeEventListener = function(){var type = arguments[0];var Listener = arguments[1];var useCapture = arguments.length >= 3 ? arguments[2] : false;if(this.$priv__listeners==null||this.$priv__listeners[type]==null){return ;}var i = useCapture?jaspa.events.Event.CAPTURING_PHASE:jaspa.events.Event.BUBBLING_PHASE;var j = NaN;if(this.$priv__listeners[type][i]){for(j=0;j<this.$priv__listeners[type][i].length;j++){if(this.$priv_isSameListener(this.$priv__listeners[type][i][j],Listener)){this.$priv__listeners[type][i].splice(j,1);break;}}}for(i=0;i<this.$priv__listeners[type].length;i++){if(this.$priv__listeners[type][i]&&this.$priv__listeners[type][i].length){return ;}}delete this.$priv__listeners[type];};
jaspa.events.EventTarget.prototype.dispatchEvent = function(){var event = arguments[0];event.$intl__target=this;return this.$intl_fireEvent(event,jaspa.events.Event.AT_TARGET);};
jaspa.events.EventTarget.prototype.$intl_fireEvent = function(){var event = arguments[0];var phase = arguments[1];if(this.$priv__listeners==null){return true;}var index = jaspa.castAs(this.$priv__listeners[event.$get_type()],Array,null);var queue = [];if(!index||!index.length){return true;}if(phase===jaspa.events.Event.AT_TARGET){var a = jaspa.castAs(index[jaspa.events.Event.CAPTURING_PHASE],Array,null);var b = jaspa.castAs(index[jaspa.events.Event.BUBBLING_PHASE],Array,null);if(a){queue=queue.concat(a);}if(b){queue=queue.concat(b);}}else {queue=jaspa.castAs(index[phase],Array,null);}if(!queue||!queue.length){return true;}event.$intl__eventPhase=phase;event.$intl__currentTarget=this;for(var i = 0;i<queue.length;i++){queue[i](event);if(!event.$intl__propagating){return false;}}return true;};
jaspa.events.Event = function(){ this.__proto__ = jaspa.events.Event.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.events.Event.$traits = [ 2,'jaspa.events','Event', {CAPTURING_PHASE:[1,34,'Number'],AT_TARGET:[1,34,'Number'],BUBBLING_PHASE:[1,34,'Number'],_target:[3,8,'Object'],target:[1,514,'Object'],_currentTarget:[3,8,'Object'],currentTarget:[1,514,'Object'],_type:[3,8,'String'],type:[1,514,'String'],_bubbles:[3,8,'Boolean'],bubbles:[1,514,'Boolean'],_cancelable:[3,8,'Boolean'],cancelable:[1,514,'Boolean'],_eventPhase:[3,8,'Number'],eventPhase:[1,514,'Number'],_propagating:[3,8,'Boolean'],_defaulting:[3,8,'Boolean'],$get_target:[3,2,'Function'],$get_currentTarget:[3,2,'Function'],$get_type:[3,2,'Function'],$get_bubbles:[3,2,'Function'],$get_cancelable:[3,2,'Function'],$get_eventPhase:[3,2,'Function'],initEvent:[3,2,'Function'],preventDefault:[3,2,'Function'],stopPropagation:[3,2,'Function'],toString:[3,258,'Function']} ];
jaspa.events.Event.prototype = new Object;
jaspa.events.Event.prototype.$self = jaspa.events.Event;
jaspa.events.Event.CAPTURING_PHASE = 1;
jaspa.events.Event.AT_TARGET = 2;
jaspa.events.Event.BUBBLING_PHASE = 3;
jaspa.events.Event.prototype.$intl__target = null;
jaspa.events.Event.prototype.$intl__currentTarget = null;
jaspa.events.Event.prototype.$intl__type = '';
jaspa.events.Event.prototype.$intl__bubbles = true;
jaspa.events.Event.prototype.$intl__cancelable = true;
jaspa.events.Event.prototype.$intl__eventPhase = 0;
jaspa.events.Event.prototype.$intl__propagating = true;
jaspa.events.Event.prototype.$intl__defaulting = true;
jaspa.events.Event.prototype.$get_target = function(){return this.$intl__target;};
jaspa.events.Event.prototype.$get_currentTarget = function(){return this.$intl__currentTarget;};
jaspa.events.Event.prototype.$get_type = function(){return this.$intl__type;};
jaspa.events.Event.prototype.$get_bubbles = function(){return this.$intl__bubbles;};
jaspa.events.Event.prototype.$get_cancelable = function(){return this.$intl__cancelable;};
jaspa.events.Event.prototype.$get_eventPhase = function(){return this.$intl__eventPhase;};
jaspa.events.Event.prototype.$construct = function(){};
jaspa.events.Event.prototype.initEvent = function(){var type = arguments[0];var canBubble = arguments[1];var cancelable = arguments[2];this.$intl__type=type;this.$intl__bubbles=canBubble;this.$intl__cancelable=cancelable;};
jaspa.events.Event.prototype.preventDefault = function(){if(this.$intl__cancelable){this.$intl__defaulting=false;}};
jaspa.events.Event.prototype.stopPropagation = function(){this.$intl__propagating=false;};
jaspa.events.Event.prototype.toString = function(){return '[Event type:'+this.$intl__type+'; phase:'+this.$intl__eventPhase+']';};
jaspa.dom.XMLHttpRequest = function(){ this.__proto__ = jaspa.dom.XMLHttpRequest.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.XMLHttpRequest.$traits = [ 16,'jaspa.dom','XMLHttpRequest', {readyState:[1,514,'Number'],responseText:[1,514,'String'],responseXML:[1,514,'Object'],status:[1,514,'Number'],statusText:[1,514,'String'],UNSENT:[1,34,'Number'],OPENED:[1,34,'Number'],HEADERS_RECEIVED:[1,34,'Number'],LOADING:[1,34,'Number'],DONE:[1,34,'Number'],$get_readyState:[3,2,'Function'],$get_responseText:[3,2,'Function'],$get_responseXML:[3,2,'Function'],$get_status:[3,2,'Function'],$get_statusText:[3,2,'Function'],fireXMLHttpEvent:[3,1,'Function'],initNativeRequest:[3,65,'Function'],onreadystatechange:[3,4,'Function'],open:[3,2,'Function'],setRequestHeader:[3,2,'Function'],send:[3,2,'Function'],abort:[3,2,'Function'],getResponseHeader:[3,2,'Function'],getAllResponseHeaders:[3,2,'Function']} ];
jaspa.dom.XMLHttpRequest.prototype = new jaspa.events.EventTarget;
jaspa.dom.XMLHttpRequest.prototype.$self = jaspa.dom.XMLHttpRequest;
jaspa.dom.XMLHttpRequest.prototype.$construct=function(){};jaspa.dom.XMLHttpRequest.prototype.initNativeRequest=function(async){try{this.Req=new XMLHttpRequest();if(this.Req==null){throw 'no XMLHttpRequest';}}catch(e){try{this.Req=new ActiveXObject("Msxml2.XMLHTTP.4.0");if(this.Req==null){throw 'no Msxml2.XMLHTTP.4.0';}}catch(e){try{this.Req=new ActiveXObject("Msxml2.XMLHTTP");if(this.Req==null){throw 'no Msxml2.XMLHTTP';}}catch(e){try{this.Req=new ActiveXObject("microsoft.XMLHTTP");if(this.Req==null){throw 'no microsoft.XMLHTTP';}}catch(e){throw new Error('Failed to create an XMLHttpRequest instance');}}}}if(async){this.Req.onreadystatechange=jaspa.closure(this,this.onreadystatechange);}return this;};jaspa.dom.XMLHttpRequest.UNSENT=0;jaspa.dom.XMLHttpRequest.OPENED=1;jaspa.dom.XMLHttpRequest.HEADERS_RECEIVED=2;jaspa.dom.XMLHttpRequest.LOADING=3;jaspa.dom.XMLHttpRequest.DONE=4;jaspa.dom.XMLHttpRequest.prototype.Request=null;jaspa.dom.XMLHttpRequest.prototype.$get_readyState=function(){try{return this.Req.readyState;}catch(e){return 0;}};jaspa.dom.XMLHttpRequest.prototype.$get_status=function(){try{return this.Req.status;}catch(e){return 0;}};jaspa.dom.XMLHttpRequest.prototype.$get_statusText=function(){try{return this.Req.statusText;}catch(e){return '';}};jaspa.dom.XMLHttpRequest.prototype.$get_responseXML=function(){try{return this.Req.responseXML;}catch(e){return null;}};jaspa.dom.XMLHttpRequest.prototype.$get_responseText=function(){try{return this.Req.responseText;}catch(e){return '';}};jaspa.dom.XMLHttpRequest.prototype.onreadystatechange=function(){try{var type='UNSENT';switch(this.Req.readyState){case jaspa.dom.XMLHttpRequest.DONE:type=jaspa.events.XMLHttpEvent.DONE;break;case jaspa.dom.XMLHttpRequest.LOADING:type=jaspa.events.XMLHttpEvent.LOADING;break;case jaspa.dom.XMLHttpRequest.HEADERS_RECEIVED:type=jaspa.events.XMLHttpEvent.HEADERS_RECEIVED;break;case jaspa.dom.XMLHttpRequest.OPENED:type=jaspa.events.XMLHttpEvent.OPENED;break;default:return ;}this.$priv_fireXMLHttpEvent(type);}catch(e){}};jaspa.dom.XMLHttpRequest.prototype.$priv_fireXMLHttpEvent=function(type){try{var Evt=new jaspa.events.XMLHttpEvent();Evt.initEvent(type,false,false);return this.dispatchEvent(Evt);}catch(Er){return false;}};jaspa.dom.XMLHttpRequest.prototype.open=function(method,url,async,user,pass){try{this.abort();this.initNativeRequest(async);return this.Req.open(method,url,async,user,pass);}catch(e){var type=jaspa.events.XMLHttpEvent.ERROR;var u=window.location.protocol+'//'+window.location.hostname;if(url&&url.indexOf(u)!==0){type=jaspa.events.XMLHttpEvent.SECURITY_ERROR;}var Evt=new jaspa.events.XMLHttpEvent();Evt.initEvent(type,false,false);this.dispatchEvent(Evt);this.abort();}};jaspa.dom.XMLHttpRequest.prototype.setRequestHeader=function(header,value){try{return this.Req.setRequestHeader(header,value);}catch(e){}};jaspa.dom.XMLHttpRequest.prototype.send=function(Data){try{if(this.$get_readyState()!==jaspa.dom.XMLHttpRequest.OPENED){return ;}var r=this.Req.send(Data);this.onreadystatechange();return r;}catch(e){var Evt=new jaspa.events.XMLHttpEvent();Evt.initEvent(jaspa.events.XMLHttpEvent.ERROR,false,false);this.dispatchEvent(Evt);this.abort();}};jaspa.dom.XMLHttpRequest.prototype.abort=function(){try{var r=this.Req?this.Req.abort():false;}catch(e){r=false;}this.Req=null;return r;};jaspa.dom.XMLHttpRequest.prototype.getResponseHeader=function(header){try{return this.Req.getResponseHeader(header);}catch(e){return '';}};jaspa.dom.XMLHttpRequest.prototype.getAllResponseHeaders=function(){try{return this.Req.getAllResponseHeaders();}catch(e){return '';}};jaspa.dom.XMLHttpRequest.prototype.toString=function(){return '[Object XMLHttpRequest]';};
jaspa.events.DOMEvent = function(){ this.__proto__ = jaspa.events.DOMEvent.prototype; return jaspa.$status ? jaspa.events.Event.prototype.$construct.apply(this,arguments) : this; };
jaspa.events.DOMEvent.$traits = [ 2,'jaspa.events','DOMEvent', {DOM_READY:[1,34,'String'],NODE_READY:[1,34,'jaspa.Untyped']} ];
jaspa.events.DOMEvent.prototype = new jaspa.events.Event;
jaspa.events.DOMEvent.prototype.$self = jaspa.events.DOMEvent;
jaspa.events.DOMEvent.DOM_READY = 'DOMContentLoaded';
jaspa.events.DOMEvent.NODE_READY = 'DOMNodeReady';
jaspa.events.UIEvent = function(){ this.__proto__ = jaspa.events.UIEvent.prototype; return jaspa.$status ? jaspa.events.Event.prototype.$construct.apply(this,arguments) : this; };
jaspa.events.UIEvent.$traits = [ 2,'jaspa.events','UIEvent', {_detail:[3,8,'Number'],_view:[3,8,'jaspa.dom.AbstractView'],view:[1,514,'jaspa.dom.AbstractView'],$get_view:[3,2,'Function'],initUIEvent:[3,2,'Function']} ];
jaspa.events.UIEvent.prototype = new jaspa.events.DOMEvent;
jaspa.events.UIEvent.prototype.$self = jaspa.events.UIEvent;
jaspa.events.UIEvent.prototype.$intl__detail = NaN;
jaspa.events.UIEvent.prototype.$intl__view = null;
jaspa.events.UIEvent.prototype.$get_view = function(){return this.$intl__view;};
jaspa.events.UIEvent.prototype.initUIEvent = function(){var type = arguments[0];var canBubble = arguments[1];var cancelable = arguments[2];var view = arguments[3];var detail = arguments[4];jaspa.events.DOMEvent.prototype.initEvent.call(this,type,canBubble,cancelable);this.$intl__view=view;this.$intl__detail=detail;};
jaspa.dom.Node = function(){ this.__proto__ = jaspa.dom.Node.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.Node.$traits = [ 16,'jaspa.dom','Node', {ELEMENT_NODE:[1,40,'Number'],ATTRIBUTE_NODE:[1,40,'Number'],TEXT_NODE:[1,40,'Number'],CDATA_SECTION_NODE:[1,40,'Number'],ENTITY_REFERENCE_NODE:[1,40,'Number'],ENTITY_NODE:[1,40,'Number'],PROCESSING_INSTRUCTION_NODE:[1,40,'Number'],COMMENT_NODE:[1,40,'Number'],DOCUMENT_NODE:[1,40,'Number'],DOCUMENT_TYPE_NODE:[1,40,'Number'],DOCUMENT_FRAGMENT_NODE:[1,40,'Number'],NOTATION_NODE:[1,40,'Number'],nativeNode:[1,580,'jaspa.DynamicObject'],nodeType:[1,514,'Number'],nodeName:[1,514,'String'],nodeValue:[1,514,'String'],parentNode:[1,514,'jaspa.dom.Node'],childNodes:[1,514,'Array'],firstChild:[1,514,'jaspa.dom.Node'],lastChild:[1,514,'jaspa.dom.Node'],previousSibling:[1,514,'jaspa.dom.Node'],nextSibling:[1,514,'jaspa.dom.Node'],attributes:[1,514,'Object'],ownerDocument:[1,514,'jaspa.dom.Document'],$get_nativeNode:[3,68,'Function'],$get_nodeType:[3,2,'Function'],$get_nodeName:[3,2,'Function'],$get_nodeValue:[3,2,'Function'],$get_parentNode:[3,2,'Function'],$get_childNodes:[3,2,'Function'],$get_firstChild:[3,2,'Function'],$get_lastChild:[3,2,'Function'],$get_previousSibling:[3,2,'Function'],$get_nextSibling:[3,2,'Function'],$get_attributes:[3,2,'Function'],$get_ownerDocument:[3,2,'Function'],insertBefore:[3,2,'Function'],replaceChild:[3,2,'Function'],removeChild:[3,2,'Function'],appendChild:[3,2,'Function'],hasChildNodes:[3,2,'Function'],cloneNode:[3,2,'Function']} ];
jaspa.dom.Node.prototype = new jaspa.events.EventTarget;
jaspa.dom.Node.prototype.$self = jaspa.dom.Node;
jaspa.dom.Node.ELEMENT_NODE=1;jaspa.dom.Node.ATTRIBUTE_NODE=2;jaspa.dom.Node.TEXT_NODE=3;jaspa.dom.Node.CDATA_SECTION_NODE=4;jaspa.dom.Node.ENTITY_REFERENCE_NODE=5;jaspa.dom.Node.ENTITY_NODE=6;jaspa.dom.Node.PROCESSING_INSTRUCTION_NODE=7;jaspa.dom.Node.COMMENT_NODE=8;jaspa.dom.Node.DOCUMENT_NODE=9;jaspa.dom.Node.DOCUMENT_TYPE_NODE=10;jaspa.dom.Node.DOCUMENT_FRAGMENT_NODE=11;jaspa.dom.Node.NOTATION_NODE=12;jaspa.dom.Node.prototype.$construct=function(target){if(!target.nodeType){throw new Error('Node constructor argument is not a native node object; '+target);}this.nativeNode=target;};jaspa.dom.Node.prototype.nativeNode=null;jaspa.dom.Node.prototype.$prot_$get_nativeNode=function(){return this.nativeNode;};jaspa.dom.Node.prototype.$get_nodeType=function(){return this.nativeNode.nodeType;};jaspa.dom.Node.prototype.$get_nodeName=function(){return this.nativeNode.nodeName;};jaspa.dom.Node.prototype.$get_nodeValue=function(){return this.nativeNode.nodeValue;};jaspa.dom.Node.prototype.$get_parentNode=function(){return this.ownerDocument.wrapNode(this.nativeNode.parentNode);};jaspa.dom.Node.prototype.$get_childNodes=function(){var a=[];for(var i=0;i<this.nativeNode.childNodes.length;i++){a.push(this.ownerDocument.wrapNode(this.nativeNode.childNodes[i]));}return a;};jaspa.dom.Node.prototype.$get_firstChild=function(){return this.ownerDocument.wrapNode(this.nativeNode.firstChild);};jaspa.dom.Node.prototype.$get_lastChild=function(){return this.ownerDocument.wrapNode(this.nativeNode.lastChild);};jaspa.dom.Node.prototype.$get_previousSibling=function(){return this.ownerDocument.wrapNode(this.nativeNode.previousSibling);};jaspa.dom.Node.prototype.$get_nextSibling=function(){return this.ownerDocument.wrapNode(this.nativeNode.nextSibling);};jaspa.dom.Node.prototype.$get_attributes=function(){return this.nativeNode.attributes;};jaspa.dom.Node.prototype.ownerDocument=null;jaspa.dom.Node.prototype.$get_ownerDocument=function(){return this.ownerDocument;};jaspa.dom.Node.prototype.insertBefore=function(newChild,refChild){if(!newChild instanceof jaspa.dom.Node||!newChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.insertBefore: bad argument[0]');}if(!refChild instanceof jaspa.dom.Node||!refChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.insertBefore: bad argument[1]');}var retNode=this.nativeNode.insertBefore(newChild.nativeNode,refChild.nativeNode);return retNode?newChild:retNode;};jaspa.dom.Node.prototype.replaceChild=function(newChild,oldChild){if(!newChild instanceof jaspa.dom.Node||!newChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.replaceChild: bad argument[0]');}if(!oldChild instanceof jaspa.dom.Node||!oldChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.replaceChild: bad argument[1]');}var retNode=this.nativeNode.replaceChild(newChild.nativeNode,oldChild.nativeNode);return retNode?oldChild:retNode;};jaspa.dom.Node.prototype.removeChild=function(oldChild){if(!oldChild instanceof jaspa.dom.Node||!oldChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.removeChild: bad argument[0]');}var retNode=this.nativeNode.removeChild(oldChild.nativeNode);return retNode?oldChild:retNode;};jaspa.dom.Node.prototype.appendChild=function(newChild){if(!newChild instanceof jaspa.dom.Node||!newChild.nativeNode){throw new ReferenceError('jaspa.dom.Node.appendChild: bad argument[0]');}var retNode=this.nativeNode.appendChild(newChild.nativeNode);return retNode?newChild:retNode;};jaspa.dom.Node.prototype.hasChildNodes=function(){return this.nativeNode.hasChildNodes();};jaspa.dom.Node.prototype.cloneNode=function(deep){throw new Error('todo: jaspa.dom.Node.cloneNode');var newNode=this.nativeNode.cloneNode(deep);};jaspa.dom.Node.prototype.dispatchEvent=function(Evt){Evt.$intl__target=this;var El,path=[],elNative=this.nativeNode;while(elNative=elNative.parentNode){if(elNative===this.ownerDocument.nativeNode){path.push(this.ownerDocument);break;}El=this.ownerDocument.getElementByNativeNode(elNative);if(El&&El.hasListeners&&El.hasListeners()){path.push(El);}};var View=this.ownerDocument.$get_defaultView();if(View&&View.hasListeners&&View.hasListeners()){path.push(View);}var phase=jaspa.events.Event.CAPTURING_PHASE;for(var i=0;i<path.length;i++){El=path[i];if(!El.$intl_fireEvent(Evt,phase)){return false;}}phase=jaspa.events.Event.AT_TARGET;if(!this.$intl_fireEvent(Evt,phase)){return false;}if(Evt.$get_bubbles()){phase=jaspa.events.Event.BUBBLING_PHASE;while(--i>-1){El=path[i];if(!El.$intl_fireEvent(Evt,phase)){return false;}}}return true;};jaspa.dom.Node.prototype.toString=function(){return '[Object Node, type:'+this.nativeNode.nodeType+']';};
jaspa.dom.Element = function(){ this.__proto__ = jaspa.dom.Element.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.Element.$traits = [ 16,'jaspa.dom','Element', {tagName:[1,514,'String'],$get_tagName:[3,2,'Function'],getAttribute:[3,2,'Function'],setAttribute:[3,2,'Function'],getElementsByTagName:[3,2,'Function']} ];
jaspa.dom.Element.prototype = new jaspa.dom.Node;
jaspa.dom.Element.prototype.$self = jaspa.dom.Element;
jaspa.dom.Element.prototype.getAttribute=function(name){return this.nativeNode.getAttribute(name);};jaspa.dom.Element.prototype.setAttribute=function(name,value){return this.nativeNode.setAttribute(name,value);};jaspa.dom.Element.prototype.$get_tagName=function(){return this.nativeNode.tagName;};jaspa.dom.Element.prototype.getElementsByTagName=function(name){var arr=[];var nodeList=this.nativeNode.getElementsByTagName(name);for(var i=0;i<nodeList.length;i++){arr.push(this.ownerDocument.wrapNode(nodeList[i]));}return arr;};jaspa.dom.Element.prototype.toString=function(){var id=this.getAttribute('id');return '[Object Element, tagName:'+this.nativeNode.tagName+', id:'+id+']';};
jaspa.dom.Document = function(){ this.__proto__ = jaspa.dom.Document.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.Document.$traits = [ 16,'jaspa.dom','Document', {defaultView:[1,514,'jaspa.dom.AbstractView'],createElement:[3,2,'Function'],createTextNode:[3,2,'Function'],importNode:[3,2,'Function'],getElementById:[3,2,'Function'],$get_defaultView:[3,2,'Function'],registerElementClassByTagName:[3,2,'Function'],registerElementClassById:[3,2,'Function'],wrapNode:[3,66,'Function'],getElementByNativeNode:[3,66,'Function'],wrapElement:[3,65,'Function'],initDOMReadyEvent:[3,65,'Function'],initNodeEvent:[3,66,'Function']} ];
jaspa.dom.Document.prototype = new jaspa.dom.Node;
jaspa.dom.Document.prototype.$self = jaspa.dom.Document;
jaspa.dom.Document.prototype.tmpId=0;jaspa.dom.Document.prototype.$construct=function(){jaspa.dom.Node.prototype.$construct.apply(this,arguments);this.elReg={};this.elClassRegById={};this.elClassRegByTag={'*':jaspa.dom.Element};this.ownerDocument=this;this.$priv_initDOMReadyEvent();};jaspa.dom.Document.prototype.$get_defaultView=function(){return this.defaultView;};jaspa.dom.Document.prototype.createElement=function(tagName){var El=this.nativeNode.createElement(tagName);return this.wrapNode(El);};jaspa.dom.Document.prototype.createTextNode=function(data){var newNode=this.nativeNode.createTextNode(data);return this.wrapNode(newNode);};jaspa.dom.Document.prototype.importNode=function(Node,deep){var newNode=this.nativeNode.importNode(Node,deep);return this.wrapNode(newNode);};jaspa.dom.Document.prototype.getElementById=function(id){El=this.nativeNode.getElementById(id);return this.wrapNode(El);};jaspa.dom.Document.prototype.registerElementClassByTagName=function(tagName,elClass){if(!elClass||!elClass.prototype||!jaspa.dom.Element.prototype.isPrototypeOf(elClass.prototype)){throw new TypeError('argument is not a sub class of jaspa.dom.Element');}tagName=tagName.toLowerCase();this.elClassRegByTag[tagName]=elClass;};jaspa.dom.Document.prototype.registerElementClassById=function(id,elClass){if(!elClass||!elClass.prototype||!jaspa.dom.Element.prototype.isPrototypeOf(elClass.prototype)){throw new TypeError('argument is not a sub class of jaspa.dom.Element');}this.elClassRegById[id]=elClass;};jaspa.dom.Document.prototype.$priv_wrapElement=function(El,elClass){if(!El){return El;}var id=El.id;if(!elClass){var tag=El.tagName.toLowerCase();if(id&&this.elClassRegById[id]){elClass=this.elClassRegById[id];}else if(tag&&this.elClassRegByTag[tag]){elClass=this.elClassRegByTag[tag];}else if(this.elClassRegByTag['*']){elClass=this.elClassRegByTag['*'];}else {elClass=jaspa.dom.Element;}}if(!id){id='$el'+(++this.tmpId).toString();El.id=id;}else if(this.elReg[id]){if(this.elReg[id].$self===elClass||elClass.prototype.isPrototypeOf(this.elReg[id].__proto__)){return this.elReg[id];}}El=new elClass(El);this.elReg[id]=El;return El;};jaspa.dom.Document.prototype.wrapNode=function(Node,nodeClass){if(!Node){return Node;}switch(Node.nodeType){case 1:Node=this.$priv_wrapElement(Node,nodeClass);break;case 3:if(!nodeClass){nodeClass=jaspa.dom.TextNode;}Node=new nodeClass(Node);break;case 9:if(Node===this.nativeNode){return this;}if(!nodeClass){nodeClass=jaspa.dom.Document;}Node=new nodeClass(Node);break;default:if(!nodeClass){nodeClass=jaspa.dom.Node;}Node=new nodeClass(Node);}if(!Node.ownerDocument){Node.ownerDocument=this;Node.$prot_initEventBindings();var Evt=new jaspa.events.DOMEvent('DOMNodeReady');Evt.initEvent('DOMNodeReady',true,true);Node.dispatchEvent(Evt);}return Node;};jaspa.dom.Document.prototype.getElementByNativeNode=function(El){if(!El){return null;}if(!El.id){return null;}return this.elReg[El.id];};jaspa.dom.Document.prototype.$priv_initDOMReadyEvent=function(){if(this.nativeNode.addEventListener){this.initNodeEvent(this,jaspa.events.DOMEvent,'DOMContentLoaded',true);return ;}if(this.nativeNode.readyState!=null){var doc=this;var onReadyStateCheck=function(){switch(doc.nativeNode.readyState){case 'complete':case 'interactive':clearInterval(i);var Evt=new jaspa.events.DOMEvent;Evt.initEvent('DOMContentLoaded',true,false);doc.dispatchEvent(Evt);}};var i=setInterval(onReadyStateCheck,50);return ;}throw new Error('No event model available in document, '+doc);};jaspa.dom.Document.prototype.initNodeEvent=function(Node,eventClass,type,bubbles,cancelable){if(Node.__evts===undefined){Node.__evts={};}else if(Node.__evts[type]!==undefined){return ;}var Doc=this;if(!Node.nativeNode){throw new Error('Error on nativeNode ('+Node+') initializing event '+type);}var eventTarget=Node.nativeNode;if(eventTarget.addEventListener){var eventWrapper=function(event){var Evt=new eventClass;if(Evt.initMouseEvent){var relatedNode=event.relatedTarget?Doc.wrapNode(event.relatedTarget):null;Evt.initMouseEvent(event.type,bubbles,cancelable,event.view,event.detail,event.screenX,event.screenY,event.clientX,event.clientY,event.ctrlKey,event.altKey,event.shiftKey,event.metaKey,event.button,relatedNode);}else if(Evt.initKeyEvent){var keyCode=event.charCode?0:event.keyCode;Evt.initKeyEvent(type,bubbles,cancelable,event.view,event.ctrlKey,event.altKey,event.shiftKey,event.metaKey,keyCode,event.charCode);}else if(Evt.initUIEvent){Evt.initUIEvent(type,bubbles,cancelable,event.view,event.detail);}else {Evt.initEvent(type,bubbles,cancelable);}var Node=Doc.wrapNode(event.target);Node.dispatchEvent(Evt);if(!Evt.$intl__defaulting){event.preventDefault();}if(!Evt.$intl__propagating){event.stopPropagation();}};eventTarget.addEventListener(type,eventWrapper,false);}else if(eventTarget.attachEvent){var eventWrapper=function(){var Evt=new eventClass;if(Evt.initMouseEvent){if(!event.srcElement||event.srcElement.nodeType==null){return ;}var relatedNode=null;if(type==='mouseover'){relatedNode=Doc.wrapNode(event.fromElement);}else if(type==='mouseout'){relatedNode=Doc.wrapNode(event.toElement);}var metaKey=null;var button=event.button&1?0:event.button&4?1:event.button&2?2:null;Evt.initMouseEvent(type,bubbles,cancelable,Doc.defaultView,0,event.screenX,event.screenY,event.clientX,event.clientY,event.ctrlKey,event.altKey,event.shiftKey,metaKey,button,relatedNode);}else if(Evt.initKeyEvent){var charCode,keyCode;switch(type){case 'keyup':case 'keydown':keyCode=event.keyCode;charCode=0;break;case 'keypress':charCode=event.keyCode;keyCode=0;break;}var metaKey=null;Evt.initKeyEvent(type,bubbles,cancelable,Doc.defaultView,event.ctrlKey,event.altKey,event.shiftKey,metaKey,keyCode,charCode);}else if(Evt.initUIEvent){Evt.initUIEvent(type,bubbles,cancelable,Doc.defaultView,0);}else {Evt.initEvent(type,bubbles,cancelable);}var Node=Doc.wrapNode(event.srcElement);Node.dispatchEvent(Evt);if(!Evt.$intl__defaulting){event.returnValue=false;}if(!Evt.$intl__propagating){event.cancelBubble=true;}};eventTarget.attachEvent('on'+type,eventWrapper);}else {throw new Error('No event model available');}Node.__evts[type]=true;};jaspa.dom.Document.prototype.toString=function(){return '[Object Document]';};
jaspa.dom.CSSStyleDeclaration = function(){ this.__proto__ = jaspa.dom.CSSStyleDeclaration.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.CSSStyleDeclaration.$traits = [ 16,'jaspa.dom','CSSStyleDeclaration', {nativeStyle:[3,1,'Object'],backgroundAttachment:[3,514,'String'],backgroundColor:[3,514,'String'],backgroundImage:[3,514,'String'],backgroundRepeat:[3,514,'String'],borderCollapse:[3,514,'String'],borderColor:[3,514,'String'],borderStyle:[3,514,'String'],borderTopColor:[3,514,'String'],borderRightColor:[3,514,'String'],borderBottomColor:[3,514,'String'],borderLeftColor:[3,514,'String'],borderTopStyle:[3,514,'String'],borderRightStyle:[3,514,'String'],borderBottomStyle:[3,514,'String'],borderLeftStyle:[3,514,'String'],borderTopWidth:[3,514,'String'],borderRightWidth:[3,514,'String'],borderBottomWidth:[3,514,'String'],borderLeftWidth:[3,514,'String'],borderWidth:[3,514,'String'],bottom:[3,514,'String'],clear:[3,514,'String'],color:[3,514,'String'],cursor:[3,514,'String'],direction:[3,514,'String'],display:[3,514,'String'],fontFamily:[3,514,'String'],fontSize:[3,514,'String'],fontStyle:[3,514,'String'],height:[3,514,'String'],left:[3,514,'String'],letterSpacing:[3,514,'String'],lineHeight:[3,514,'String'],listStyleImage:[3,514,'String'],listStylePosition:[3,514,'String'],listStyleType:[3,514,'String'],margin:[3,514,'String'],marginTop:[3,514,'String'],marginRight:[3,514,'String'],marginBottom:[3,514,'String'],marginLeft:[3,514,'String'],minHeight:[3,514,'String'],overflow:[3,514,'String'],padding:[3,514,'String'],paddingTop:[3,514,'String'],paddingRight:[3,514,'String'],paddingBottom:[3,514,'String'],paddingLeft:[3,514,'String'],pageBreakAfter:[3,514,'String'],pageBreakBefore:[3,514,'String'],position:[3,514,'String'],right:[3,514,'String'],tableLayout:[3,514,'String'],textAlign:[3,514,'String'],textDecoration:[3,514,'String'],textIndent:[3,514,'String'],textTransform:[3,514,'String'],top:[3,514,'String'],unicodeBidi:[3,514,'String'],verticalAlign:[3,514,'String'],visibility:[3,514,'String'],whiteSpace:[3,514,'String'],width:[3,514,'String'],wordSpacing:[3,514,'String'],overflowX:[3,514,'String'],overflowY:[3,514,'String'],imeMode:[3,514,'String'],$get_backgroundAttachment:[3,2,'Function'],$set_backgroundAttachment:[3,2,'Function'],$get_backgroundColor:[3,2,'Function'],$set_backgroundColor:[3,2,'Function'],$get_backgroundImage:[3,2,'Function'],$set_backgroundImage:[3,2,'Function'],$get_backgroundRepeat:[3,2,'Function'],$set_backgroundRepeat:[3,2,'Function'],$get_borderCollapse:[3,2,'Function'],$set_borderCollapse:[3,2,'Function'],$get_borderColor:[3,2,'Function'],$set_borderColor:[3,2,'Function'],$get_borderStyle:[3,2,'Function'],$set_borderStyle:[3,2,'Function'],$get_borderTopColor:[3,2,'Function'],$set_borderTopColor:[3,2,'Function'],$get_borderRightColor:[3,2,'Function'],$set_borderRightColor:[3,2,'Function'],$get_borderBottomColor:[3,2,'Function'],$set_borderBottomColor:[3,2,'Function'],$get_borderLeftColor:[3,2,'Function'],$set_borderLeftColor:[3,2,'Function'],$get_borderTopStyle:[3,2,'Function'],$set_borderTopStyle:[3,2,'Function'],$get_borderRightStyle:[3,2,'Function'],$set_borderRightStyle:[3,2,'Function'],$get_borderBottomStyle:[3,2,'Function'],$set_borderBottomStyle:[3,2,'Function'],$get_borderLeftStyle:[3,2,'Function'],$set_borderLeftStyle:[3,2,'Function'],$get_borderTopWidth:[3,2,'Function'],$set_borderTopWidth:[3,2,'Function'],$get_borderRightWidth:[3,2,'Function'],$set_borderRightWidth:[3,2,'Function'],$get_borderBottomWidth:[3,2,'Function'],$set_borderBottomWidth:[3,2,'Function'],$get_borderLeftWidth:[3,2,'Function'],$set_borderLeftWidth:[3,2,'Function'],$get_borderWidth:[3,2,'Function'],$set_borderWidth:[3,2,'Function'],$get_bottom:[3,2,'Function'],$set_bottom:[3,2,'Function'],$get_clear:[3,2,'Function'],$set_clear:[3,2,'Function'],$get_color:[3,2,'Function'],$set_color:[3,2,'Function'],$get_cursor:[3,2,'Function'],$set_cursor:[3,2,'Function'],$get_direction:[3,2,'Function'],$set_direction:[3,2,'Function'],$get_display:[3,2,'Function'],$set_display:[3,2,'Function'],$get_fontFamily:[3,2,'Function'],$set_fontFamily:[3,2,'Function'],$get_fontSize:[3,2,'Function'],$set_fontSize:[3,2,'Function'],$get_fontStyle:[3,2,'Function'],$set_fontStyle:[3,2,'Function'],$get_height:[3,2,'Function'],$set_height:[3,2,'Function'],$get_left:[3,2,'Function'],$set_left:[3,2,'Function'],$get_letterSpacing:[3,2,'Function'],$set_letterSpacing:[3,2,'Function'],$get_lineHeight:[3,2,'Function'],$set_lineHeight:[3,2,'Function'],$get_listStyleImage:[3,2,'Function'],$set_listStyleImage:[3,2,'Function'],$get_listStylePosition:[3,2,'Function'],$set_listStylePosition:[3,2,'Function'],$get_listStyleType:[3,2,'Function'],$set_listStyleType:[3,2,'Function'],$get_margin:[3,2,'Function'],$set_margin:[3,2,'Function'],$get_marginTop:[3,2,'Function'],$set_marginTop:[3,2,'Function'],$get_marginRight:[3,2,'Function'],$set_marginRight:[3,2,'Function'],$get_marginBottom:[3,2,'Function'],$set_marginBottom:[3,2,'Function'],$get_marginLeft:[3,2,'Function'],$set_marginLeft:[3,2,'Function'],$get_minHeight:[3,2,'Function'],$set_minHeight:[3,2,'Function'],$get_overflow:[3,2,'Function'],$set_overflow:[3,2,'Function'],$get_padding:[3,2,'Function'],$set_padding:[3,2,'Function'],$get_paddingTop:[3,2,'Function'],$set_paddingTop:[3,2,'Function'],$get_paddingRight:[3,2,'Function'],$set_paddingRight:[3,2,'Function'],$get_paddingBottom:[3,2,'Function'],$set_paddingBottom:[3,2,'Function'],$get_paddingLeft:[3,2,'Function'],$set_paddingLeft:[3,2,'Function'],$get_pageBreakAfter:[3,2,'Function'],$set_pageBreakAfter:[3,2,'Function'],$get_pageBreakBefore:[3,2,'Function'],$set_pageBreakBefore:[3,2,'Function'],$get_position:[3,2,'Function'],$set_position:[3,2,'Function'],$get_right:[3,2,'Function'],$set_right:[3,2,'Function'],$get_tableLayout:[3,2,'Function'],$set_tableLayout:[3,2,'Function'],$get_textAlign:[3,2,'Function'],$set_textAlign:[3,2,'Function'],$get_textDecoration:[3,2,'Function'],$set_textDecoration:[3,2,'Function'],$get_textIndent:[3,2,'Function'],$set_textIndent:[3,2,'Function'],$get_textTransform:[3,2,'Function'],$set_textTransform:[3,2,'Function'],$get_top:[3,2,'Function'],$set_top:[3,2,'Function'],$get_unicodeBidi:[3,2,'Function'],$set_unicodeBidi:[3,2,'Function'],$get_verticalAlign:[3,2,'Function'],$set_verticalAlign:[3,2,'Function'],$get_visibility:[3,2,'Function'],$set_visibility:[3,2,'Function'],$get_whiteSpace:[3,2,'Function'],$set_whiteSpace:[3,2,'Function'],$get_width:[3,2,'Function'],$set_width:[3,2,'Function'],$get_wordSpacing:[3,2,'Function'],$set_wordSpacing:[3,2,'Function'],$get_overflowX:[3,2,'Function'],$set_overflowX:[3,2,'Function'],$get_overflowY:[3,2,'Function'],$set_overflowY:[3,2,'Function'],$get_imeMode:[3,2,'Function'],$set_imeMode:[3,2,'Function']} ];
jaspa.dom.CSSStyleDeclaration.prototype = new Object;
jaspa.dom.CSSStyleDeclaration.prototype.$self = jaspa.dom.CSSStyleDeclaration;
jaspa.dom.CSSStyleDeclaration.prototype.$construct=function(Style){this.nativeStyle=Style;};jaspa.dom.CSSStyleDeclaration.prototype.$get_backgroundAttachment=function(){return this.nativeStyle.backgroundAttachment;};jaspa.dom.CSSStyleDeclaration.prototype.$set_backgroundAttachment=function(s){this.nativeStyle.backgroundAttachment=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_backgroundColor=function(){return this.nativeStyle.backgroundColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_backgroundColor=function(s){this.nativeStyle.backgroundColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_backgroundImage=function(){return this.nativeStyle.backgroundImage;};jaspa.dom.CSSStyleDeclaration.prototype.$set_backgroundImage=function(s){this.nativeStyle.backgroundImage=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_backgroundRepeat=function(){return this.nativeStyle.backgroundRepeat;};jaspa.dom.CSSStyleDeclaration.prototype.$set_backgroundRepeat=function(s){this.nativeStyle.backgroundRepeat=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderCollapse=function(){return this.nativeStyle.borderCollapse;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderCollapse=function(s){this.nativeStyle.borderCollapse=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderColor=function(){return this.nativeStyle.borderColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderColor=function(s){this.nativeStyle.borderColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderStyle=function(){return this.nativeStyle.borderStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderStyle=function(s){this.nativeStyle.borderStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderTopColor=function(){return this.nativeStyle.borderTopColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderTopColor=function(s){this.nativeStyle.borderTopColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderRightColor=function(){return this.nativeStyle.borderRightColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderRightColor=function(s){this.nativeStyle.borderRightColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderBottomColor=function(){return this.nativeStyle.borderBottomColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderBottomColor=function(s){this.nativeStyle.borderBottomColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderLeftColor=function(){return this.nativeStyle.borderLeftColor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderLeftColor=function(s){this.nativeStyle.borderLeftColor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderTopStyle=function(){return this.nativeStyle.borderTopStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderTopStyle=function(s){this.nativeStyle.borderTopStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderRightStyle=function(){return this.nativeStyle.borderRightStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderRightStyle=function(s){this.nativeStyle.borderRightStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderBottomStyle=function(){return this.nativeStyle.borderBottomStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderBottomStyle=function(s){this.nativeStyle.borderBottomStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderLeftStyle=function(){return this.nativeStyle.borderLeftStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderLeftStyle=function(s){this.nativeStyle.borderLeftStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderTopWidth=function(){return this.nativeStyle.borderTopWidth;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderTopWidth=function(s){this.nativeStyle.borderTopWidth=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderRightWidth=function(){return this.nativeStyle.borderRightWidth;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderRightWidth=function(s){this.nativeStyle.borderRightWidth=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderBottomWidth=function(){return this.nativeStyle.borderBottomWidth;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderBottomWidth=function(s){this.nativeStyle.borderBottomWidth=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderLeftWidth=function(){return this.nativeStyle.borderLeftWidth;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderLeftWidth=function(s){this.nativeStyle.borderLeftWidth=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_borderWidth=function(){return this.nativeStyle.borderWidth;};jaspa.dom.CSSStyleDeclaration.prototype.$set_borderWidth=function(s){this.nativeStyle.borderWidth=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_bottom=function(){return this.nativeStyle.bottom;};jaspa.dom.CSSStyleDeclaration.prototype.$set_bottom=function(s){this.nativeStyle.bottom=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_clear=function(){return this.nativeStyle.clear;};jaspa.dom.CSSStyleDeclaration.prototype.$set_clear=function(s){this.nativeStyle.clear=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_color=function(){return this.nativeStyle.color;};jaspa.dom.CSSStyleDeclaration.prototype.$set_color=function(s){this.nativeStyle.color=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_cursor=function(){return this.nativeStyle.cursor;};jaspa.dom.CSSStyleDeclaration.prototype.$set_cursor=function(s){this.nativeStyle.cursor=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_direction=function(){return this.nativeStyle.direction;};jaspa.dom.CSSStyleDeclaration.prototype.$set_direction=function(s){this.nativeStyle.direction=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_display=function(){return this.nativeStyle.display;};jaspa.dom.CSSStyleDeclaration.prototype.$set_display=function(s){this.nativeStyle.display=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_fontFamily=function(){return this.nativeStyle.fontFamily;};jaspa.dom.CSSStyleDeclaration.prototype.$set_fontFamily=function(s){this.nativeStyle.fontFamily=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_fontSize=function(){return this.nativeStyle.fontSize;};jaspa.dom.CSSStyleDeclaration.prototype.$set_fontSize=function(s){this.nativeStyle.fontSize=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_fontStyle=function(){return this.nativeStyle.fontStyle;};jaspa.dom.CSSStyleDeclaration.prototype.$set_fontStyle=function(s){this.nativeStyle.fontStyle=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_height=function(){return this.nativeStyle.height;};jaspa.dom.CSSStyleDeclaration.prototype.$set_height=function(s){this.nativeStyle.height=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_left=function(){return this.nativeStyle.left;};jaspa.dom.CSSStyleDeclaration.prototype.$set_left=function(s){this.nativeStyle.left=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_letterSpacing=function(){return this.nativeStyle.letterSpacing;};jaspa.dom.CSSStyleDeclaration.prototype.$set_letterSpacing=function(s){this.nativeStyle.letterSpacing=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_lineHeight=function(){return this.nativeStyle.lineHeight;};jaspa.dom.CSSStyleDeclaration.prototype.$set_lineHeight=function(s){this.nativeStyle.lineHeight=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_listStyleImage=function(){return this.nativeStyle.listStyleImage;};jaspa.dom.CSSStyleDeclaration.prototype.$set_listStyleImage=function(s){this.nativeStyle.listStyleImage=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_listStylePosition=function(){return this.nativeStyle.listStylePosition;};jaspa.dom.CSSStyleDeclaration.prototype.$set_listStylePosition=function(s){this.nativeStyle.listStylePosition=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_listStyleType=function(){return this.nativeStyle.listStyleType;};jaspa.dom.CSSStyleDeclaration.prototype.$set_listStyleType=function(s){this.nativeStyle.listStyleType=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_margin=function(){return this.nativeStyle.margin;};jaspa.dom.CSSStyleDeclaration.prototype.$set_margin=function(s){this.nativeStyle.margin=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_marginTop=function(){return this.nativeStyle.marginTop;};jaspa.dom.CSSStyleDeclaration.prototype.$set_marginTop=function(s){this.nativeStyle.marginTop=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_marginRight=function(){return this.nativeStyle.marginRight;};jaspa.dom.CSSStyleDeclaration.prototype.$set_marginRight=function(s){this.nativeStyle.marginRight=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_marginBottom=function(){return this.nativeStyle.marginBottom;};jaspa.dom.CSSStyleDeclaration.prototype.$set_marginBottom=function(s){this.nativeStyle.marginBottom=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_marginLeft=function(){return this.nativeStyle.marginLeft;};jaspa.dom.CSSStyleDeclaration.prototype.$set_marginLeft=function(s){this.nativeStyle.marginLeft=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_minHeight=function(){return this.nativeStyle.minHeight;};jaspa.dom.CSSStyleDeclaration.prototype.$set_minHeight=function(s){this.nativeStyle.minHeight=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_overflow=function(){return this.nativeStyle.overflow;};jaspa.dom.CSSStyleDeclaration.prototype.$set_overflow=function(s){this.nativeStyle.overflow=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_padding=function(){return this.nativeStyle.padding;};jaspa.dom.CSSStyleDeclaration.prototype.$set_padding=function(s){this.nativeStyle.padding=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_paddingTop=function(){return this.nativeStyle.paddingTop;};jaspa.dom.CSSStyleDeclaration.prototype.$set_paddingTop=function(s){this.nativeStyle.paddingTop=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_paddingRight=function(){return this.nativeStyle.paddingRight;};jaspa.dom.CSSStyleDeclaration.prototype.$set_paddingRight=function(s){this.nativeStyle.paddingRight=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_paddingBottom=function(){return this.nativeStyle.paddingBottom;};jaspa.dom.CSSStyleDeclaration.prototype.$set_paddingBottom=function(s){this.nativeStyle.paddingBottom=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_paddingLeft=function(){return this.nativeStyle.paddingLeft;};jaspa.dom.CSSStyleDeclaration.prototype.$set_paddingLeft=function(s){this.nativeStyle.paddingLeft=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_pageBreakAfter=function(){return this.nativeStyle.pageBreakAfter;};jaspa.dom.CSSStyleDeclaration.prototype.$set_pageBreakAfter=function(s){this.nativeStyle.pageBreakAfter=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_pageBreakBefore=function(){return this.nativeStyle.pageBreakBefore;};jaspa.dom.CSSStyleDeclaration.prototype.$set_pageBreakBefore=function(s){this.nativeStyle.pageBreakBefore=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_position=function(){return this.nativeStyle.position;};jaspa.dom.CSSStyleDeclaration.prototype.$set_position=function(s){this.nativeStyle.position=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_right=function(){return this.nativeStyle.right;};jaspa.dom.CSSStyleDeclaration.prototype.$set_right=function(s){this.nativeStyle.right=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_tableLayout=function(){return this.nativeStyle.tableLayout;};jaspa.dom.CSSStyleDeclaration.prototype.$set_tableLayout=function(s){this.nativeStyle.tableLayout=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_textAlign=function(){return this.nativeStyle.textAlign;};jaspa.dom.CSSStyleDeclaration.prototype.$set_textAlign=function(s){this.nativeStyle.textAlign=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_textDecoration=function(){return this.nativeStyle.textDecoration;};jaspa.dom.CSSStyleDeclaration.prototype.$set_textDecoration=function(s){this.nativeStyle.textDecoration=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_textIndent=function(){return this.nativeStyle.textIndent;};jaspa.dom.CSSStyleDeclaration.prototype.$set_textIndent=function(s){this.nativeStyle.textIndent=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_textTransform=function(){return this.nativeStyle.textTransform;};jaspa.dom.CSSStyleDeclaration.prototype.$set_textTransform=function(s){this.nativeStyle.textTransform=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_top=function(){return this.nativeStyle.top;};jaspa.dom.CSSStyleDeclaration.prototype.$set_top=function(s){this.nativeStyle.top=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_unicodeBidi=function(){return this.nativeStyle.unicodeBidi;};jaspa.dom.CSSStyleDeclaration.prototype.$set_unicodeBidi=function(s){this.nativeStyle.unicodeBidi=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_verticalAlign=function(){return this.nativeStyle.verticalAlign;};jaspa.dom.CSSStyleDeclaration.prototype.$set_verticalAlign=function(s){this.nativeStyle.verticalAlign=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_visibility=function(){return this.nativeStyle.visibility;};jaspa.dom.CSSStyleDeclaration.prototype.$set_visibility=function(s){this.nativeStyle.visibility=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_whiteSpace=function(){return this.nativeStyle.whiteSpace;};jaspa.dom.CSSStyleDeclaration.prototype.$set_whiteSpace=function(s){this.nativeStyle.whiteSpace=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_width=function(){return this.nativeStyle.width;};jaspa.dom.CSSStyleDeclaration.prototype.$set_width=function(s){this.nativeStyle.width=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_wordSpacing=function(){return this.nativeStyle.wordSpacing;};jaspa.dom.CSSStyleDeclaration.prototype.$set_wordSpacing=function(s){this.nativeStyle.wordSpacing=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_overflowX=function(){return this.nativeStyle.overflowX;};jaspa.dom.CSSStyleDeclaration.prototype.$set_overflowX=function(s){this.nativeStyle.overflowX=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_overflowY=function(){return this.nativeStyle.overflowY;};jaspa.dom.CSSStyleDeclaration.prototype.$set_overflowY=function(s){this.nativeStyle.overflowY=s;};jaspa.dom.CSSStyleDeclaration.prototype.$get_imeMode=function(){return this.nativeStyle.imeMode;};jaspa.dom.CSSStyleDeclaration.prototype.$set_imeMode=function(s){this.nativeStyle.imeMode=s;};
jaspa.dom.AbstractView = function(){ this.__proto__ = jaspa.dom.AbstractView.prototype; return jaspa.$status ? Object.apply(this,arguments) : this; };
jaspa.dom.AbstractView.$traits = [ 8,'jaspa.dom','AbstractView', {document:[1,514,'jaspa.dom.Document'],$get_document:[3,2,'Function']} ];
jaspa.dom.AbstractView.prototype = new jaspa.events.EventTarget;
jaspa.dom.AbstractView.prototype.$self = jaspa.dom.AbstractView;
jaspa.dom.AbstractView.prototype.$get_document = function(){};
jaspa.Untyped=function(){throw new TypeError('You may not construct the Untyped class, it is for compiler use only');};
jaspa.events.MouseEvent = function(){ this.__proto__ = jaspa.events.MouseEvent.prototype; return jaspa.$status ? jaspa.events.Event.prototype.$construct.apply(this,arguments) : this; };
jaspa.events.MouseEvent.$traits = [ 66,'jaspa.events','MouseEvent', {CLICK:[1,34,'String'],MOUSE_DOWN:[1,34,'String'],MOUSE_UP:[1,34,'String'],MOUSE_OVER:[1,34,'String'],MOUSE_MOVE:[1,34,'String'],MOUSE_OUT:[1,34,'String'],BUTTON_LEFT:[1,34,'Number'],BUTTON_MIDDLE:[1,34,'Number'],BUTTON_RIGHT:[1,34,'Number'],_screenX:[3,8,'Number'],screenX:[1,514,'Number'],_screenY:[3,8,'Number'],screenY:[1,514,'Number'],_clientX:[3,8,'Number'],clientX:[1,514,'Number'],_clientY:[3,8,'Number'],clientY:[1,514,'Number'],_ctrlKey:[3,8,'Boolean'],ctrlKey:[1,514,'Boolean'],_shiftKey:[3,8,'Boolean'],shiftKey:[1,514,'Boolean'],_altKey:[3,8,'Boolean'],altKey:[1,514,'Boolean'],_metaKey:[3,8,'Boolean'],_button:[3,8,'Number'],button:[1,514,'Number'],_relatedTarget:[3,8,'jaspa.events.EventTarget'],relatedTarget:[1,514,'jaspa.events.EventTarget'],$get_screenX:[3,2,'Function'],$get_screenY:[3,2,'Function'],$get_clientX:[3,2,'Function'],$get_clientY:[3,2,'Function'],$get_ctrlKey:[3,2,'Function'],$get_shiftKey:[3,2,'Function'],$get_altKey:[3,2,'Function'],$get_button:[3,2,'Function'],$get_relatedTarget:[3,2,'Function'],initMouseEvent:[3,2,'Function'],toString:[3,258,'Function']} ];
jaspa.events.MouseEvent.prototype = new jaspa.events.UIEvent;
jaspa.events.MouseEvent.prototype.$self = jaspa.events.MouseEvent;
jaspa.events.MouseEvent.CLICK = 'click';
jaspa.events.MouseEvent.MOUSE_DOWN = 'mousedown';
jaspa.events.MouseEvent.MOUSE_UP = 'mouseup';
jaspa.events.MouseEvent.MOUSE_OVER = 'mouseover';
jaspa.events.MouseEvent.MOUSE_MOVE = 'mousemove';
jaspa.events.MouseEvent.MOUSE_OUT = 'mouseout';
jaspa.events.MouseEvent.BUTTON_LEFT = 0;
jaspa.events.MouseEvent.BUTTON_MIDDLE = 1;
jaspa.events.MouseEvent.BUTTON_RIGHT = 2;
jaspa.events.MouseEvent.prototype.$intl__screenX = NaN;
jaspa.events.MouseEvent.prototype.$intl__screenY = NaN;
jaspa.events.MouseEvent.prototype.$intl__clientX = NaN;
jaspa.events.MouseEvent.prototype.$intl__clientY = NaN;
jaspa.events.MouseEvent.prototype.$intl__ctrlKey = false;
jaspa.events.MouseEvent.prototype.$intl__shiftKey = false;
jaspa.events.MouseEvent.prototype.$intl__altKey = false;
jaspa.events.MouseEvent.prototype.$intl__metaKey = false;
jaspa.events.MouseEvent.prototype.$intl__button = NaN;
jaspa.events.MouseEvent.prototype.$intl__relatedTarget = null;
jaspa.events.MouseEvent.prototype.$get_screenX = function(){return this.$intl__screenX;};
jaspa.events.MouseEvent.prototype.$get_screenY = function(){return this.$intl__screenY;};
jaspa.events.MouseEvent.prototype.$get_clientX = function(){return this.$intl__clientY;};
jaspa.events.MouseEvent.prototype.$get_clientY = function(){return this.$intl__clientY;};
jaspa.events.MouseEvent.prototype.$get_ctrlKey = function(){return this.$intl__ctrlKey;};
jaspa.events.MouseEvent.prototype.$get_shiftKey = function(){return this.$intl__shiftKey;};
jaspa.events.MouseEvent.prototype.$get_altKey = function(){return this.$intl__altKey;};
jaspa.events.MouseEvent.prototype.$get_button = function(){return this.$intl__button;};
jaspa.events.MouseEvent.prototype.$get_relatedTarget = function(){return this.$intl__relatedTarget;};
jaspa.events.MouseEvent.prototype.initMouseEvent = function(){var type = arguments[0];var canBubble = arguments[1];var cancelable = arguments[2];var view = arguments[3];var detail = arguments[4];var screenX = arguments[5];var screenY = arguments[6];var clientX = arguments[7];var clientY = arguments[8];var ctrlKey = arguments[9];var altKey = arguments[10];var shiftKey = arguments[11];var metaKey = arguments[12];var button = arguments[13];var relatedTarget = arguments[14];jaspa.events.UIEvent.prototype.initUIEvent.call(this,type,canBubble,cancelable,view,detail);this.$intl__screenX=screenX;this.$intl__screenY=screenY;this.$intl__clientX=clientX;this.$intl__clientY=clientY;this.$intl__ctrlKey=ctrlKey;this.$intl__altKey=altKey;this.$intl__shiftKey=shiftKey;this.$intl__metaKey=metaKey;this.$intl__button=button;this.$intl__relatedTarget=relatedTarget;};
jaspa.events.MouseEvent.prototype.toString = function(){return '[MouseEvent type:'+this.$intl__type+'; phase:'+this.$intl__eventPhase+'; screen:'+this.$intl__screenX+','+this.$intl__screenY+'; client:'+this.$intl__clientX+','+this.$intl__clientY+']';};
jaspa.events.HTMLEvent = function(){ this.__proto__ = jaspa.events.HTMLEvent.prototype; return jaspa.$status ? jaspa.events.Event.prototype.$construct.apply(this,arguments) : this; };
jaspa.events.HTMLEvent.$traits = [ 2,'jaspa.events','HTMLEvent', {LOAD:[1,34,'String'],UNLOAD:[1,34,'String'],ABORT:[1,34,'String'],ERROR:[1,34,'String'],SELECT:[1,34,'String'],CHANGE:[1,34,'String'],SUBMIT:[1,34,'String'],RESET:[1,34,'String'],FOCUS:[1,34,'String'],BLUR:[1,34,'String'],RESIZE:[1,34,'String'],SCROLL:[1,34,'String']} ];
jaspa.events.HTMLEvent.prototype = new jaspa.events.DOMEvent;
jaspa.events.HTMLEvent.prototype.$self = jaspa.events.HTMLEvent;
jaspa.events.HTMLEvent.LOAD = 'load';
jaspa.events.HTMLEvent.UNLOAD = 'unload';
jaspa.events.HTMLEvent.ABORT = 'abort';
jaspa.events.HTMLEvent.ERROR = 'error';
jaspa.events.HTMLEvent.SELECT = 'select';
jaspa.events.HTMLEvent.CHANGE = 'change';
jaspa.events.HTMLEvent.SUBMIT = 'submit';
jaspa.events.HTMLEvent.RESET = 'reset';
jaspa.events.HTMLEvent.FOCUS = 'focus';
jaspa.events.HTMLEvent.BLUR = 'blur';
jaspa.events.HTMLEvent.RESIZE = 'resize';
jaspa.events.HTMLEvent.SCROLL = 'scroll';
jaspa.dom.TextNode = function(){ this.__proto__ = jaspa.dom.TextNode.prototype; return jaspa.$status ? jaspa.dom.Node.prototype.$construct.apply(this,arguments) : this; };
jaspa.dom.TextNode.$traits = [ 66,'jaspa.dom','TextNode', {toString:[3,258,'Function']} ];
jaspa.dom.TextNode.prototype = new jaspa.dom.Node;
jaspa.dom.TextNode.prototype.$self = jaspa.dom.TextNode;
jaspa.dom.TextNode.prototype.toString = function(){return '[Object TextNode]';};
org.twitblock.TwitBlockRequestToggler = function(){ this.__proto__ = org.twitblock.TwitBlockRequestToggler.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
org.twitblock.TwitBlockRequestToggler.$traits = [ 2,'org.twitblock','TwitBlockRequestToggler', {incId:[3,33,'Number'],elSpan:[3,1,'jaspa.dom.elements.HTMLElement'],linkClass:[3,1,'String'],doURL:[3,1,'String'],doLabel:[3,1,'String'],undoURL:[3,1,'String'],undoLabel:[3,1,'String'],initState:[3,2,'Function'],onDoClick:[3,1,'Function'],onDone:[3,1,'Function'],onUndoClick:[3,1,'Function'],onUndone:[3,1,'Function']} ];
org.twitblock.TwitBlockRequestToggler.prototype = new Object;
org.twitblock.TwitBlockRequestToggler.prototype.$self = org.twitblock.TwitBlockRequestToggler;
org.twitblock.TwitBlockRequestToggler.$priv_incId = 0;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_elSpan = null;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_linkClass = null;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_doURL = null;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_doLabel = null;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_undoURL = null;
org.twitblock.TwitBlockRequestToggler.prototype.$priv_undoLabel = null;
org.twitblock.TwitBlockRequestToggler.prototype.$construct = function(){var doURL = arguments[0];var undoURL = arguments[1];var doLabel = arguments[2];var undoLabel = arguments[3];this.$priv_doURL=doURL;this.$priv_doLabel=doLabel;this.$priv_undoURL=undoURL;this.$priv_undoLabel=undoLabel;};
org.twitblock.TwitBlockRequestToggler.prototype.initState = function(){var elLink = arguments[0];var toggled = arguments[1];this.$priv_linkClass=elLink.$get_className();if(toggled){elLink.addEventListener(jaspa.events.MouseEvent.CLICK,jaspa.closure(this,this.$priv_onUndoClick),false);elLink.$set_innerHTML(this.$priv_undoLabel);}else {elLink.addEventListener(jaspa.events.MouseEvent.CLICK,jaspa.closure(this,this.$priv_onDoClick),false);elLink.$set_innerHTML(this.$priv_doLabel);}};
org.twitblock.TwitBlockRequestToggler.prototype.$priv_onDoClick = function(){var Evt = arguments[0];Evt.preventDefault();var elLink = jaspa.castAs(Evt.$get_target(),jaspa.dom.elements.HTMLAnchorElement,null);var Reg = new RegExp('(\\d+)$');var r = Reg.exec(elLink.getAttribute('href'));var uid = String(r[1]);if(!this.$priv_elSpan){this.$priv_elSpan=jaspa.castAs(org.twitblock.TwitBlockApp.getApp().getDocument().createElement('span'),jaspa.dom.elements.HTMLElement,null);}this.$priv_elSpan.$set_innerHTML('doing..');elLink.$get_parentNode().replaceChild(this.$priv_elSpan,elLink);var Dat = new jaspa.net.URLVariables();jaspa.member(Dat,"uid",org.twitblock.TwitBlockRequestToggler,2,uid);var Req = new org.twitblock.TwitBlockRequest;Req.addEventListener(jaspa.events.XMLHttpEvent.DONE,jaspa.closure(this,this.$priv_onDone));Req.postUrl(this.$priv_doURL,Dat);return false;};
org.twitblock.TwitBlockRequestToggler.prototype.$priv_onDone = function(){var Evt = arguments[0];var Req = jaspa.castAs(Evt.$get_target(),org.twitblock.TwitBlockRequest,null);var uid = String(jaspa.member(Req.$get_data(),"id",org.twitblock.TwitBlockRequestToggler,1));var elLink = jaspa.castAs(org.twitblock.TwitBlockApp.getApp().getDocument().createElement('a'),jaspa.dom.elements.HTMLAnchorElement,null);elLink.$set_className(this.$priv_linkClass);elLink.setAttribute('href','#undo_'+uid);elLink.$set_innerHTML(this.$priv_undoLabel);this.$priv_elSpan.$get_parentNode().replaceChild(elLink,this.$priv_elSpan);elLink.addEventListener(jaspa.events.MouseEvent.CLICK,jaspa.closure(this,this.$priv_onUndoClick),false);};
org.twitblock.TwitBlockRequestToggler.prototype.$priv_onUndoClick = function(){var Evt = arguments[0];Evt.preventDefault();var elLink = jaspa.castAs(Evt.$get_target(),jaspa.dom.elements.HTMLAnchorElement,null);var Reg = new RegExp('(\\d+)$');var r = Reg.exec(elLink.getAttribute('href'));var uid = String(r[1]);if(!this.$priv_elSpan){this.$priv_elSpan=jaspa.castAs(org.twitblock.TwitBlockApp.getApp().getDocument().createElement('span'),jaspa.dom.elements.HTMLElement,null);}this.$priv_elSpan.$set_innerHTML('undoing..');elLink.$get_parentNode().replaceChild(this.$priv_elSpan,elLink);var Dat = new jaspa.net.URLVariables();jaspa.member(Dat,"uid",org.twitblock.TwitBlockRequestToggler,2,uid);var Req = new org.twitblock.TwitBlockRequest;Req.addEventListener(jaspa.events.XMLHttpEvent.DONE,jaspa.closure(this,this.$priv_onUndone));Req.postUrl(this.$priv_undoURL,Dat);return false;};
org.twitblock.TwitBlockRequestToggler.prototype.$priv_onUndone = function(){var Evt = arguments[0];var Req = jaspa.castAs(Evt.$get_target(),org.twitblock.TwitBlockRequest,null);var uid = String(jaspa.member(Req.$get_data(),"id",org.twitblock.TwitBlockRequestToggler,1));var elLink = jaspa.castAs(org.twitblock.TwitBlockApp.getApp().getDocument().createElement('a'),jaspa.dom.elements.HTMLAnchorElement,null);elLink.$set_className(this.$priv_linkClass);elLink.setAttribute('href','#redo_'+uid);elLink.$set_innerHTML(this.$priv_doLabel);this.$priv_elSpan.$get_parentNode().replaceChild(elLink,this.$priv_elSpan);elLink.addEventListener(jaspa.events.MouseEvent.CLICK,jaspa.closure(this,this.$priv_onDoClick),false);};
jaspa.events.XMLHttpEvent = function(){ this.__proto__ = jaspa.events.XMLHttpEvent.prototype; return jaspa.$status ? jaspa.events.Event.prototype.$construct.apply(this,arguments) : this; };
jaspa.events.XMLHttpEvent.$traits = [ 8,'jaspa.events','XMLHttpEvent', {UNSENT:[1,34,'String'],OPENED:[1,34,'String'],HEADERS_RECEIVED:[1,34,'String'],LOADING:[1,34,'String'],DONE:[1,34,'String'],ERROR:[1,34,'String'],SECURITY_ERROR:[1,34,'String'],target:[1,770,'jaspa.dom.XMLHttpRequest'],$get_target:[3,258,'Function']} ];
jaspa.events.XMLHttpEvent.prototype = new jaspa.events.Event;
jaspa.events.XMLHttpEvent.prototype.$self = jaspa.events.XMLHttpEvent;
jaspa.events.XMLHttpEvent.UNSENT = 'xmlhttp_unsent';
jaspa.events.XMLHttpEvent.OPENED = 'xmlhttp_opened';
jaspa.events.XMLHttpEvent.HEADERS_RECEIVED = 'xmlhttp_headers';
jaspa.events.XMLHttpEvent.LOADING = 'xmlhttp_loading';
jaspa.events.XMLHttpEvent.DONE = 'xmlhttp_done';
jaspa.events.XMLHttpEvent.ERROR = 'xmlhttp_error';
jaspa.events.XMLHttpEvent.SECURITY_ERROR = 'xmlhttp_security';
jaspa.events.XMLHttpEvent.prototype.$get_target = function(){return jaspa.castAs(this.$intl__target,jaspa.dom.XMLHttpRequest,null);};
org.twitblock.TwitBlockRequest = function(){ this.__proto__ = org.twitblock.TwitBlockRequest.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
org.twitblock.TwitBlockRequest.$traits = [ 2,'org.twitblock','TwitBlockRequest', {_data:[3,1,'Object'],data:[1,514,'Object'],$get_data:[3,2,'Function'],postUrl:[3,2,'Function'],getUrl:[3,2,'Function'],onError:[3,1,'Function'],onData:[3,1,'Function']} ];
org.twitblock.TwitBlockRequest.prototype = new jaspa.dom.XMLHttpRequest;
org.twitblock.TwitBlockRequest.prototype.$self = org.twitblock.TwitBlockRequest;
org.twitblock.TwitBlockRequest.prototype.$priv__data = null;
org.twitblock.TwitBlockRequest.prototype.$get_data = function(){return this.$priv__data;};
org.twitblock.TwitBlockRequest.prototype.$construct = function(){jaspa.dom.XMLHttpRequest.prototype.$construct.call(this);this.addEventListener(jaspa.events.XMLHttpEvent.DONE,jaspa.closure(this,this.$priv_onData),false);};
org.twitblock.TwitBlockRequest.prototype.postUrl = function(){var url = arguments[0];var vars = arguments[1];var postdata = vars.toString();jaspa.dom.XMLHttpRequest.prototype.open.call(this,'POST',url,true);jaspa.dom.XMLHttpRequest.prototype.setRequestHeader.call(this,'Content-Type','application/x-www-form-urlencoded');jaspa.dom.XMLHttpRequest.prototype.setRequestHeader.call(this,'Content-Length',postdata.length.toString());jaspa.dom.XMLHttpRequest.prototype.send.call(this,postdata);};
org.twitblock.TwitBlockRequest.prototype.getUrl = function(){var url = arguments[0];var vars = arguments[1];var query = vars.toString();if(query){url=url+'?'+query;}jaspa.dom.XMLHttpRequest.prototype.open.call(this,'GET',url,true);jaspa.dom.XMLHttpRequest.prototype.send.call(this);};
org.twitblock.TwitBlockRequest.prototype.$priv_onError = function(){var Evt = arguments[0];alert(":(");};
org.twitblock.TwitBlockRequest.prototype.$priv_onData = function(){var Evt = arguments[0];var Me = jaspa.castAs(Evt.$get_target(),org.twitblock.TwitBlockRequest,null);Me.$priv__data={};if(Me.$get_status()!==200){if(!Me.$get_status()){}else if(Me.$get_statusText()){alert("Response error:\n"+Me.$get_statusText());}else {alert("Response status "+Me.$get_status());alert(Me.$get_responseText());}return ;}if(Me.$get_responseText().indexOf('{',0)!==0){throw new Error('Response not JSON');}var src = '( function(){ return '+Me.$get_responseText()+'; } )();';var dat = jaspa.castAs(eval(src),Object,null);var i = NaN,s = null;Me.$priv__data=dat.data;if(dat.errors){var a = ['Error:'];for(i=0;i<dat.errors.length;i++){a.push(dat.errors[i].message);}alert(a.join('\n'));}var App = org.twitblock.TwitBlockApp.getApp();var Doc = App.getDocument();if(dat.html){for(s in dat.html){var El = Doc.getElementById(s);El.$set_innerHTML(String(dat.html[s]));}}};
jaspa.net.URLVariables = function(){ this.__proto__ = jaspa.net.URLVariables.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.net.URLVariables.$traits = [ 128,'jaspa.net','URLVariables', {decode:[3,2,'Function'],toString:[3,258,'Function'],addVariable:[3,2,'Function']} ];
jaspa.net.URLVariables.prototype = new Object;
jaspa.net.URLVariables.prototype.$self = jaspa.net.URLVariables;
jaspa.net.URLVariables.prototype.$construct = function(){var source = arguments.length >= 1 ? arguments[0] : '';if(source){this.decode(source);}};
jaspa.net.URLVariables.prototype.decode = function(){var source = arguments[0];var pair = null,pairs = source.split('&');for(var i = 0;i<pairs.length;i++){pair=String(pairs[i]).split('=');var n = decodeURIComponent(pair[0]);var v = decodeURIComponent(pair[1]);this.addVariable(n,v);}};
jaspa.net.URLVariables.prototype.toString = function(){var n = null,pair = null,pairs = [];for(n in this){if(n==='__proto__'||typeof jaspa.member(this,n,jaspa.net.URLVariables,1)==='function'){continue;}if(jaspa.member(jaspa.member(this,n,jaspa.net.URLVariables,1),"push",jaspa.net.URLVariables,1)){for(var i = 0;i<jaspa.member(jaspa.member(this,n,jaspa.net.URLVariables,1),"length",jaspa.net.URLVariables,1);i++){pair=encodeURIComponent(n)+'='+encodeURIComponent(jaspa.member(jaspa.member(this,n,jaspa.net.URLVariables,1),i,jaspa.net.URLVariables,1));pairs.push(pair);}}else {pair=encodeURIComponent(n)+'='+encodeURIComponent(jaspa.member(this,n,jaspa.net.URLVariables,1));pairs.push(pair);}}return pairs.join('&');};
jaspa.net.URLVariables.prototype.addVariable = function(){var name = arguments[0];var value = arguments[1];if(this.hasOwnProperty(name)){if(jaspa.member(jaspa.member(this,name,jaspa.net.URLVariables,1),"push",jaspa.net.URLVariables,1)){jaspa.member(jaspa.member(this,name,jaspa.net.URLVariables,1),"push",jaspa.net.URLVariables,1)(value);}else {jaspa.member(this,name,jaspa.net.URLVariables,2,[jaspa.member(this,name,jaspa.net.URLVariables,1),value]);}}else {jaspa.member(this,name,jaspa.net.URLVariables,2,value);}};
jaspa.dom.elements.HTMLElement = function(){ this.__proto__ = jaspa.dom.elements.HTMLElement.prototype; return jaspa.$status ? jaspa.dom.Node.prototype.$construct.apply(this,arguments) : this; };
jaspa.dom.elements.HTMLElement.$traits = [ 2,'jaspa.dom.elements','HTMLElement', {style:[1,514,'jaspa.dom.CSSStyleDeclaration'],ownerDocument:[1,770,'jaspa.dom.HTMLDocument'],innerHTML:[3,514,'String'],id:[3,514,'String'],title:[3,514,'String'],lang:[3,514,'String'],dir:[3,514,'String'],className:[3,514,'String'],$get_style:[3,2,'Function'],$get_ownerDocument:[3,258,'Function'],$get_innerHTML:[3,2,'Function'],$set_innerHTML:[3,2,'Function'],$get_id:[3,2,'Function'],$set_id:[3,2,'Function'],$get_title:[3,2,'Function'],$set_title:[3,2,'Function'],$get_lang:[3,2,'Function'],$set_lang:[3,2,'Function'],$get_dir:[3,2,'Function'],$set_dir:[3,2,'Function'],$get_className:[3,2,'Function'],$set_className:[3,2,'Function'],toString:[3,258,'Function']} ];
jaspa.dom.elements.HTMLElement.prototype = new jaspa.dom.Element;
jaspa.dom.elements.HTMLElement.prototype.$self = jaspa.dom.elements.HTMLElement;
jaspa.dom.elements.HTMLElement.prototype.$get_style = function(){return new jaspa.dom.CSSStyleDeclaration(this.nativeNode.style);};
jaspa.dom.elements.HTMLElement.prototype.$get_ownerDocument = function(){return jaspa.castAs(jaspa.dom.Element.prototype.$get_ownerDocument.call(this),jaspa.dom.HTMLDocument,null);};
jaspa.dom.elements.HTMLElement.prototype.$get_innerHTML = function(){return String(this.nativeNode.innerHTML);};
jaspa.dom.elements.HTMLElement.prototype.$set_innerHTML = function(){var html = arguments[0];this.$get_ownerDocument().setElementInnerHTML(this,html);};
jaspa.dom.elements.HTMLElement.prototype.$get_id = function(){return jaspa.castAs(this.nativeNode.id,String,null);};
jaspa.dom.elements.HTMLElement.prototype.$set_id = function(){var value = arguments[0];this.nativeNode.id=value;};
jaspa.dom.elements.HTMLElement.prototype.$get_title = function(){return String(this.nativeNode.title);};
jaspa.dom.elements.HTMLElement.prototype.$set_title = function(){var value = arguments[0];this.nativeNode.title=value;};
jaspa.dom.elements.HTMLElement.prototype.$get_lang = function(){return String(this.nativeNode.lang);};
jaspa.dom.elements.HTMLElement.prototype.$set_lang = function(){var value = arguments[0];this.nativeNode.lang=value;};
jaspa.dom.elements.HTMLElement.prototype.$get_dir = function(){return String(this.nativeNode.dir);};
jaspa.dom.elements.HTMLElement.prototype.$set_dir = function(){var value = arguments[0];this.nativeNode.dir=value;};
jaspa.dom.elements.HTMLElement.prototype.$get_className = function(){return String(this.nativeNode.className);};
jaspa.dom.elements.HTMLElement.prototype.$set_className = function(){var value = arguments[0];this.nativeNode.className=value;};
jaspa.dom.elements.HTMLElement.prototype.toString = function(){return '[Object HTMLElement('+this.nativeNode+')]';};
jaspa.dom.elements.HTMLMetaElement = function(){ this.__proto__ = jaspa.dom.elements.HTMLMetaElement.prototype; return jaspa.$status ? jaspa.dom.Node.prototype.$construct.apply(this,arguments) : this; };
jaspa.dom.elements.HTMLMetaElement.$traits = [ 2,'jaspa.dom.elements','HTMLMetaElement', {toString:[3,258,'Function']} ];
jaspa.dom.elements.HTMLMetaElement.prototype = new jaspa.dom.elements.HTMLElement;
jaspa.dom.elements.HTMLMetaElement.prototype.$self = jaspa.dom.elements.HTMLMetaElement;
jaspa.dom.elements.HTMLMetaElement.prototype.toString = function(){return '[Object HTMLMetaElement]';};
jaspa.dom.elements.HTMLBodyElement = function(){ this.__proto__ = jaspa.dom.elements.HTMLBodyElement.prototype; return jaspa.$status ? jaspa.dom.Node.prototype.$construct.apply(this,arguments) : this; };
jaspa.dom.elements.HTMLBodyElement.$traits = [ 2,'jaspa.dom.elements','HTMLBodyElement', {toString:[3,258,'Function']} ];
jaspa.dom.elements.HTMLBodyElement.prototype = new jaspa.dom.elements.HTMLElement;
jaspa.dom.elements.HTMLBodyElement.prototype.$self = jaspa.dom.elements.HTMLBodyElement;
jaspa.dom.elements.HTMLBodyElement.prototype.toString = function(){return '[Object HTMLBodyElement]';};
jaspa.dom.elements.HTMLAnchorElement = function(){ this.__proto__ = jaspa.dom.elements.HTMLAnchorElement.prototype; return jaspa.$status ? jaspa.dom.Node.prototype.$construct.apply(this,arguments) : this; };
jaspa.dom.elements.HTMLAnchorElement.$traits = [ 2,'jaspa.dom.elements','HTMLAnchorElement', {toString:[3,258,'Function']} ];
jaspa.dom.elements.HTMLAnchorElement.prototype = new jaspa.dom.elements.HTMLElement;
jaspa.dom.elements.HTMLAnchorElement.prototype.$self = jaspa.dom.elements.HTMLAnchorElement;
jaspa.dom.elements.HTMLAnchorElement.prototype.toString = function(){return '[Object HTMLAnchorElement]';};
jaspa.dom.HTMLDocument = function(){ this.__proto__ = jaspa.dom.HTMLDocument.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.HTMLDocument.$traits = [ 16,'jaspa.dom','HTMLDocument', {body:[1,514,'jaspa.dom.elements.HTMLBodyElement'],defaultView:[1,770,'jaspa.dom.HTMLView'],$get_body:[3,2,'Function'],$get_defaultView:[3,258,'Function'],getElementById:[3,258,'Function'],initMouseEvents:[3,66,'Function'],initKeyEvents:[3,66,'Function'],setElementInnerHTML:[3,66,'Function']} ];
jaspa.dom.HTMLDocument.prototype = new jaspa.dom.Document;
jaspa.dom.HTMLDocument.prototype.$self = jaspa.dom.HTMLDocument;
jaspa.dom.HTMLDocument.prototype.$construct=function(){jaspa.dom.Document.prototype.$construct.apply(this,arguments);this.elClassRegByTag['*']=jaspa.dom.elements.HTMLElement;var map={a:'HTMLAnchorElement',area:'HTMLAreaElement',base:'HTMLBaseElement',body:'HTMLBodyElement',br:'HTMLBrElement',caption:'HTMLTableCaptionElement',canvas:'HTMLCanvasElement',col:'HTMLTableColElement',div:'HTMLDivElement',dl:'HTMLDListElement',fieldset:'HTMLFieldSetElement',form:'HTMLFormElement',head:'HTMLHeadElement',h1:'HTMLHeadingElement',h2:'HTMLHeadingElement',h3:'HTMLHeadingElement',h4:'HTMLHeadingElement',h5:'HTMLHeadingElement',h6:'HTMLHeadingElement',hr:'HTMLHrElement',html:'HTMLHtmlElement',iframe:'HTMLIFrameElement',img:'HTMLImageElement',input:'HTMLInputElement',label:'HTMLLabelElement',legend:'HTMLLegendElement',link:'HTMLLinkElement',li:'HTMLListItemElement',map:'HTMLMapElement',meta:'HTMLMetaElement',object:'HTMLObjectElement',ol:'HTMLOListElement',optgroup:'HTMLOptGroupElement',option:'HTMLOptionElement',p:'HTMLParagraphElement',pre:'HTMLPreElement',q:'HTMLQuoteElement',script:'HTMLScriptElement',select:'HTMLSelectElement',style:'HTMLStyleElement',table:'HTMLTableElement',td:'HTMLTableCellElement',textarea:'HTMLTextAreaElement',th:'HTMLTableCellElement',title:'HTMLTitleElement',tr:'HTMLTableRowElement',ul:'HTMLUListElement'};for(var tag in map){if(jaspa.dom.elements[map[tag]]){this.elClassRegByTag[tag]=jaspa.dom.elements[map[tag]];}}if(jaspa.events.MouseEvent){this.initMouseEvents();}if(jaspa.events.KeyEvent){this.initKeyEvents();}};jaspa.dom.HTMLDocument.prototype.$get_body=function(){return this.nativeNode.body?this.wrapNode(this.nativeNode.body):null;};jaspa.dom.HTMLDocument.prototype.setElementInnerHTML=function(El,html,context){try{if(this.nativeNode.attachEvent){if(!context){context='div';}var elTmp=this.nativeNode.createElement(context);elTmp.innerHTML=html;El.nativeNode.innerHTML='';for(var i=0;i<elTmp.childNodes.length;i++){if(elTmp.childNodes[i].nodeType===1){var Child=elTmp.childNodes[i].cloneNode(true);}else {var Child=elTmp.childNodes[i];}El.nativeNode.appendChild(Child);}return El.nativeNode.innerHTML;}El.nativeNode.innerHTML=html;return html;}catch(Er){alert(Er.message+'\ninnerHTML bug setting the following: \n'+html);return '';}};jaspa.dom.HTMLDocument.prototype.toString=function(){return '[Object HTMLDocument]';};jaspa.dom.HTMLDocument.prototype.initMouseEvents=function(){var eventClass=jaspa.events.MouseEvent;this.initNodeEvent(this,eventClass,'click',true,true);this.initNodeEvent(this,eventClass,'mousedown',true,true);this.initNodeEvent(this,eventClass,'mouseup',true,true);this.initNodeEvent(this,eventClass,'mouseover',true,true);this.initNodeEvent(this,eventClass,'mousemove',true,false);this.initNodeEvent(this,eventClass,'mouseout',true,true);};jaspa.dom.HTMLDocument.prototype.initKeyEvents=function(){var eventClass=jaspa.events.KeyEvent;this.initNodeEvent(this,eventClass,'keypress',true,true);this.initNodeEvent(this,eventClass,'keydown',true,true);this.initNodeEvent(this,eventClass,'keyup',true,true);};
jaspa.dom.HTMLView = function(){ this.__proto__ = jaspa.dom.HTMLView.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
jaspa.dom.HTMLView.$traits = [ 16,'jaspa.dom','HTMLView', {document:[1,770,'jaspa.dom.HTMLDocument'],$get_document:[3,258,'Function'],getComputedStyle:[3,2,'Function']} ];
jaspa.dom.HTMLView.prototype = new jaspa.dom.AbstractView;
jaspa.dom.HTMLView.prototype.$self = jaspa.dom.HTMLView;
jaspa.dom.HTMLView.prototype.$construct=function(){this.document=new jaspa.dom.HTMLDocument(window.document);this.document.defaultView=this;};jaspa.dom.HTMLView.prototype.$get_document=function(){return this.document;};jaspa.dom.HTMLView.prototype.getComputedStyle=function(El){try{var elNode=El.nativeNode;var nativeStyle;if(elNode.currentStyle){nativeStyle=Node.currentStyle;}else {var win=this.document.nativeNode.defaultView;if(win&&win.getComputedStyle){nativeStyle=win.getComputedStyle(elNode,'');}}}catch(Er){nativeStyle=elNode.style;}return nativeStyle?new jaspa.dom.CSSStyleDeclaration(nativeStyle):null;};jaspa.dom.HTMLView.prototype.toString=function(){return '[Object HTMLView]';};
jaspa.DynamicObject=function(){};
jaspa.Undefined=function(){throw new TypeError('You may not construct the Undefined class, it is for compiler use only');};
jaspa.closure=function(b,f){if(typeof f!=='function'){throw new Error('Closure argument is not a function.\nNote that native functions are objects in IE.');}var c=function(){return f.apply(b,arguments);};c.apply=function(b,a){return f.apply(b,a);};c.call=function(b){var a=[];for(var i=1;i<arguments.length;i++){a.push(arguments[i]);}return f.apply(b,a);};c.valueOf=c.toString=function(){if(b.$closureId==null){b.$closureId=++jaspa.closureId;}if(f.$closureId==null){f.$closureId=++jaspa.closureId;}return '[Method Closure #'+b.$closureId.toString(16)+':'+f.$closureId.toString(16)+']';};return c;};jaspa.closureId=0;
org.twitblock.TwitBlockApp = function(){ this.__proto__ = org.twitblock.TwitBlockApp.prototype; return jaspa.$status ? this.$construct.apply(this,arguments) : this; };
org.twitblock.TwitBlockApp.$traits = [ 2,'org.twitblock','TwitBlockApp', {spamNames:[3,1,'Array'],spamScores:[3,1,'jaspa.DynamicObject'],spamChecked:[3,1,'Number'],tmpNodes:[3,1,'jaspa.DynamicObject'],Self:[3,1,'org.twitblock.TwitBlockApp'],View:[3,1,'jaspa.dom.HTMLView'],appStatus:[2,514,'String'],getDocument:[3,2,'Function'],$set_appStatus:[3,2,'Function'],getApp:[3,34,'Function'],scanFollowers:[3,2,'Function'],onInitFollowerScan:[3,1,'Function'],pollFollowerScanProgress:[3,1,'Function'],onFollowerScanProgress:[3,1,'Function'],showScanData:[3,1,'Function'],initBlockButton:[3,2,'Function'],initWhitelistButton:[3,2,'Function']} ];
org.twitblock.TwitBlockApp.prototype = new Object;
org.twitblock.TwitBlockApp.prototype.$self = org.twitblock.TwitBlockApp;
org.twitblock.TwitBlockApp.prototype.$priv_spamNames = null;
org.twitblock.TwitBlockApp.prototype.$priv_spamScores = null;
org.twitblock.TwitBlockApp.prototype.$priv_spamChecked = NaN;
org.twitblock.TwitBlockApp.prototype.$priv_tmpNodes = null;
org.twitblock.TwitBlockApp.prototype.$priv_Self = null;
org.twitblock.TwitBlockApp.prototype.$priv_View = null;
org.twitblock.TwitBlockApp.prototype.getDocument = function(){if(!this.$priv_View){this.$priv_View=new jaspa.dom.HTMLView;}return this.$priv_View.$get_document();};
org.twitblock.TwitBlockApp.prototype.$set_appStatus = function(){var message = arguments[0];var El = this.getDocument().getElementById('appstatus');El.$set_innerHTML(message);};
org.twitblock.TwitBlockApp.prototype.$construct = function(){};
org.twitblock.TwitBlockApp.getApp = function(){if(!this.$priv_Self){this.$priv_Self=new org.twitblock.TwitBlockApp;this.$priv_Self.$priv_tmpNodes=new jaspa.DynamicObject;}return this.$priv_Self;};
org.twitblock.TwitBlockApp.prototype.scanFollowers = function(){var forceNew = arguments[0];this.$priv_spamNames=[];this.$priv_spamScores=new jaspa.DynamicObject;this.$priv_spamChecked=0;this.$set_appStatus('<p>initializing scan ..</p>');var Dat = new jaspa.net.URLVariables();if(forceNew){jaspa.member(Dat,"forcenew",org.twitblock.TwitBlockApp,2,'1');}var Req = new org.twitblock.TwitBlockRequest;Req.addEventListener(jaspa.events.XMLHttpEvent.DONE,jaspa.closure(this,this.$priv_onInitFollowerScan));Req.postUrl('/services/json/init_follower_scan.php',Dat);};
org.twitblock.TwitBlockApp.prototype.$priv_onInitFollowerScan = function(){var Evt = arguments[0];var Req = jaspa.castAs(Evt.$get_target(),org.twitblock.TwitBlockRequest,null);if(!Req||!Req.$get_data()||!jaspa.member(Req.$get_data(),"scanning",org.twitblock.TwitBlockApp,1)){this.$set_appStatus('<p>Error, failed to initilize scan</p>');}if(jaspa.member(Req.$get_data(),"status",org.twitblock.TwitBlockApp,1)==='new'){setTimeout(jaspa.closure(this,this.$priv_pollFollowerScanProgress),3000);}else {this.$priv_pollFollowerScanProgress();}};
org.twitblock.TwitBlockApp.prototype.$priv_pollFollowerScanProgress = function(){var Dat = new jaspa.net.URLVariables();jaspa.member(Dat,"t",org.twitblock.TwitBlockApp,2,(new Date).getTime());var Req = new org.twitblock.TwitBlockRequest;Req.addEventListener(jaspa.events.XMLHttpEvent.DONE,jaspa.closure(this,this.$priv_onFollowerScanProgress));Req.getUrl('/services/json/poll_follower_scan.php',Dat);};
org.twitblock.TwitBlockApp.prototype.$priv_onFollowerScanProgress = function(){var Evt = arguments[0];var Req = jaspa.castAs(Evt.$get_target(),org.twitblock.TwitBlockRequest,null);if(!Req||!Req.$get_data()||jaspa.member(Req.$get_data(),"error",org.twitblock.TwitBlockApp,1)!==0){this.$set_appStatus('<p>Error during scan, sorry</p>');return ;}if(!jaspa.member(Req.$get_data(),"followers",org.twitblock.TwitBlockApp,1)){this.$set_appStatus('<p>You have no followers</p>');return ;}this.$priv_showScanData(jaspa.castAs(Req.$get_data(),Object,null));if(!jaspa.member(Req.$get_data(),"complete",org.twitblock.TwitBlockApp,1)){setTimeout(jaspa.closure(this,this.$priv_pollFollowerScanProgress),3000);}};
org.twitblock.TwitBlockApp.prototype.$priv_showScanData = function(){var data = arguments[0];if(!data.rows){throw new Error('Bad response data');}if(!data.complete&&this.$priv_spamChecked&&data.done===this.$priv_spamChecked){this.$set_appStatus("<p>The scan may be stuck.. bare with us, it's probably Twitter being slow.</p>");}this.$priv_spamChecked=jaspa.castAs(data.done,Number,0);this.$priv_spamNames=jaspa.castAs(data.names,Array,null);this.$priv_spamScores=jaspa.castAs(data.scores,Object,null);var Doc = this.getDocument();var tBody = Doc.getElementById('spamlist');var name = null,id = null,elRow = null,elNext = null;for(name in data.rows){id='spam@'+name;elRow=Doc.getElementById(id);if(!elRow){var score = jaspa.castAs(data.scores[name],Number,0);elNext=null;for(var i = 0;i<this.$priv_spamNames.length;i++){var n = String(this.$priv_spamNames[i]);if(this.$priv_spamScores[n]<=score){elNext=Doc.getElementById('spam@'+n);if(elNext){break;}}}elRow=jaspa.castAs(Doc.createElement('tr'),jaspa.dom.elements.HTMLElement,null);if(elNext){tBody.insertBefore(elRow,elNext);}else {tBody.appendChild(elRow);}elRow.$set_id(id);var cells = jaspa.castAs(data.rows[name],Array,null);for(var i = 0;i<cells.length;i++){var htCell = String(data.rows[name][i]);var elCell = jaspa.castAs(Doc.createElement('td'),jaspa.dom.elements.HTMLElement,null);elCell.$set_innerHTML(htCell);elRow.appendChild(elCell);var elLink = jaspa.castAs(elCell.getElementsByTagName('a')[0],jaspa.dom.elements.HTMLAnchorElement,null);if(elLink){var Butt = null;var regs = /\b(un)?(block|whitelist)\b/.exec(elLink.$get_className());if(regs&&regs[2]==='block'){Butt=new org.twitblock.TwitBlockRequestToggler('/services/json/block_user.php','/services/json/unblock_user.php','block','unblock');Butt.initState(elLink,regs[1]==='un');}else if(regs&&regs[2]==='whitelist'){Butt=new org.twitblock.TwitBlockRequestToggler('/services/json/whitelist_user.php','/services/json/unwhitelist_user.php','not spam','undo');Butt.initState(elLink,regs[1]==='un');}}}}}};
org.twitblock.TwitBlockApp.prototype.initBlockButton = function(){var elId = arguments[0];var isBlocked = arguments.length >= 2 ? arguments[1] : false;var Butt = null;var elLink = jaspa.castAs(this.getDocument().getElementById(elId),jaspa.dom.elements.HTMLAnchorElement,null);if(elLink){Butt=new org.twitblock.TwitBlockRequestToggler('/services/json/block_user.php','/services/json/unblock_user.php',elLink.$get_innerHTML(),'unblock');Butt.initState(elLink,isBlocked);}return Butt;};
org.twitblock.TwitBlockApp.prototype.initWhitelistButton = function(){var elId = arguments[0];var Butt = null;var elLink = jaspa.castAs(this.getDocument().getElementById(elId),jaspa.dom.elements.HTMLAnchorElement,null);if(elLink){Butt=new org.twitblock.TwitBlockRequestToggler('/services/json/whitelist_user.php','/services/json/unwhitelist_user.php',elLink.$get_innerHTML(),'undo');Butt.initState(elLink,false);}return Butt;};
if(typeof window!=='object'){throw new ReferenceError('No window object, this script is designed to run in a web browser');}jaspa.dom.Window=function(){throw new TypeError('You may not construct the Window class');};
jaspa.FuncArgs=function(){throw new TypeError('You may not construct the FuncArgs class, it is for compiler use only');};
jaspa.RestArgs=function(args,i){Array.call(this);while(i<args.length){this[this.length++]=args[i++];}};jaspa.RestArgs.prototype=new Array;
jaspa.Null=function(){throw new TypeError('You may not construct the Null class, it is for compiler use only');};
jaspa.$status = 1;
// Begin JASPA script, twitblockapp.as (Sun, 09 Aug 2009 14:32:34 +0000)
var App = org.twitblock.TwitBlockApp.getApp();
