obips.BrowserEventFramework=function(){};obips.BrowserEventFramework.EventRouter=function(b,a){if(b.eventRouter&&b.eventRouter[a]){return(b.eventRouter[a])}obips.BrowserEventFramework.EventRouter.baseConstructor.call(this);this.domElement=b;if(b.eventRouter==null){b.eventRouter=new Array()}b.eventRouter[a]=this;this.theEventType=a;saw.addEventListener(b,a.substr(2),obips.BrowserEventFramework.EventRouter.callback)};extend(obips.BrowserEventFramework.EventRouter,obips.Observable);obips.BrowserEventFramework.EventRouter.prototype.addEventListener=function(a){a.eventType=this.theEventType.substr(2);obips.BrowserEventFramework.EventRouter.superClass.addEventListener.call(this,a)};obips.BrowserEventFramework.EventRouter.callback=function(a){a=obips.BrowserEventFramework.normalizeEvent(a);var b="on"+a.type;var c=this.eventRouter[b];c.notify(a)};obips.BrowserEventFramework.EventRouter.getEventRouter=function(b,a){return(b.eventRouter&&b.eventRouter[a])?b.eventRouter[a]:null};obips.BrowserEventFramework.normalizeEvent=function(a){a=a||window.event||parent.event;if(a.srcElement&&!a.target){a.target=a.srcElement;a.relatedTarget=(a.target==a.fromElement)?a.toElement:a.fromElement}return a};obips.BrowserEventFramework.preventEventBrowserDefaultBehavior=function(a){saw.preventEventDefault(a)};obips.BrowserEventFramework.cancelBubble=function(a){a=obips.BrowserEventFramework.normalizeEvent(a);if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}a.returnValue=false};obips.BrowserEventFramework.getViewerFromElement=function(c,a){var b=c;while(b.parentNode&&!b[a]){b=b.parentNode}return b[a]};obips.BrowserEventFramework.getViewerFromEvent=function(a,b){a=obips.BrowserEventFramework.normalizeEvent(a);return obips.BrowserEventFramework.getViewerFromElement(a.target,b)};obips.BrowserEventFramework.queueResizeEvent=function(b){var a=b||200;window.setTimeout('{ if (window && window.obips) obips.BrowserEventFramework.EventRouter.getEventRouter(window,"onresize").notify(new obips.Observable.Event("resize") ) }',a)};obips.BrowserEventFramework.Resizable=function(a){obips.BrowserEventFramework.Resizable.baseConstructor.call(this);this.element=a;this.element.resizable=this};extend(obips.BrowserEventFramework.Resizable,obips.Observable);obips.BrowserEventFramework.Resizable.prototype.notifyResize=function(){this.notify(new obips.Observable.Event("onresize",null))};obips.BrowserEventFramework.Resizable.getResizable=function(c){var a=null;var b=c;while(b.resizable==null&&b.parentNode){b=b.parentNode}if(b.resizable){a=b.resizable}else{a=obips.BrowserEventFramework.EventRouter.getEventRouter(window,"onresize")}return a};new obips.BrowserEventFramework.EventRouter(document,"onmousedown");new obips.BrowserEventFramework.EventRouter(document,"oncontextmenu");new obips.BrowserEventFramework.EventRouter(window,"onresize");