Type.registerNamespace("Apaq.UI.Layout");Apaq.UI.Layout._registeredBoxes=new Array();Apaq.UI.Layout._boxPrefix="box_";Apaq.UI.Layout._topBoxPrefix="top_";Apaq.UI.Layout._leftBoxPrefix="left_";Apaq.UI.Layout._rightBoxPrefix="right_";Apaq.UI.Layout._bottomBoxPrefix="bottom_";Apaq.UI.Layout.registerBoxes=function(){var d;var c=1;do{d=$get(this._boxPrefix+c);if(d){Array.add(this._registeredBoxes,c);this.setupBox(c)}c++}while(d);if(Sys.WebForms){Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(Apaq.UI.Layout.onAjaxRequest);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(Apaq.UI.Layout.onAjaxRequest)}};Apaq.UI.Layout.setupBox=function(m){var n=$get(this._boxPrefix+m);var h=n.clientWidth;var o=n.clientHeight;var k=$get(this._topBoxPrefix+m);if(k!=null){k.style.width=h+"px"}var l=$get(this._bottomBoxPrefix+m);if(l!=null){l.style.width=h+"px"}var j=$get(this._leftBoxPrefix+m);if(j!=null){j.style.height=o+"px"}var p=$get(this._rightBoxPrefix+m);if(p!=null){p.style.height=o+"px"}};Apaq.UI.Layout.refresh=function(){for(boxId in this._registeredBoxes){this.setupBox(this._registeredBoxes[boxId])}};Apaq.UI.Layout.onAjaxRequest=function(c,d){Apaq.UI.Layout.refresh()};$addHandler(window,"load",Function.createDelegate(Apaq.UI.Layout,Apaq.UI.Layout.registerBoxes));