function WindowControl(window)
{this.onLoad=new REvent();this.onResize=new REvent();this.onBlur=new REvent();this.onFocus=new REvent();this.onClick=new REvent();window.controlElement=this;window.onload=function(){this.controlElement.onLoad.trigger();};window.onresize=function(){this.controlElement.onResize.trigger();};window.onblur=function(){this.controlElement.onBlur.trigger();};window.onfocus=function(){this.controlElement.onFocus.trigger();};window.onclick=function(){this.controlElement.onClick.trigger();};}
WindowControl.statics=new Object();WindowControl.statics.getInstance=function()
{if(!WindowControl.statics.instance)
WindowControl.statics.instance=new WindowControl(window);return WindowControl.statics.instance;}
WindowControl.statics.getWindowHeight=function()
{if(self.innerHeight)
return self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)
return document.documentElement.clientHeight;else if(document.body)
return document.body.clientHeight;}
WindowControl.statics.getWindowWidth=function()
{if(self.innerHeight)
return self.innerWidth;else if(document.documentElement&&document.documentElement.clientHeight)
return document.documentElement.clientWidth;else if(document.body)
return document.body.clientWidth;}