﻿Type.registerNamespace("Infragistics.Web.UI");$IG.LayoutPaneProps=new function(){var a=$IG.ControlObjectProps.Count;this.ScrollLeft=[a++,0];this.ScrollTop=[a++,0];this.ScrollBars=[a++,1];this.Count=a};$IG.ContentPaneProps=new function(){var a=$IG.LayoutPaneProps.Count;this.ContentUrl=[a++,""];this.Count=a};$IG.LayoutPane=function(d,c,g,e,f,a,b){if(!f){f=new $IG.ObjectClientStateManager(g[0])}$IG.LayoutPane.initializeBase(this,[d,c,g,e,f,a,b])};$IG.LayoutPane.prototype={get_scrollLeft:function(){return this._get_value($IG.LayoutPaneProps.ScrollLeft)},set_scrollLeft:function(a){if(this._get_value($IG.LayoutPaneProps.ScrollLeft)!=a){this._set_value($IG.LayoutPaneProps.ScrollLeft,a)}this.getBody().scrollLeft=a},get_scrollTop:function(){return this._get_value($IG.LayoutPaneProps.ScrollTop)},set_scrollTop:function(a){if(this._get_value($IG.LayoutPaneProps.ScrollTop)!=a){this._set_value($IG.LayoutPaneProps.ScrollTop,a)}this.getBody().scrollTop=a},get_scrollBars:function(){return this._get_value($IG.LayoutPaneProps.ScrollBars)},set_scrollBars:function(a){this._set_value($IG.LayoutPaneProps.ScrollBars,a);if(a==3){a="hidden"}else{if(a==2){a="scroll"}else{if(a==1){a="auto"}else{a=""}}}this.getBody().style.overflow=a},get_contentUrl:function(){return this._get_value($IG.ContentPaneProps.ContentUrl)},set_contentUrl:function(b,a){this._set_value($IG.ContentPaneProps.ContentUrl,b);var c=this.get_iframe(b);if(c&&!a){c.src=b}},findChild:function(a){var b=$util.findChild(this.getBody(),a);if(!b){if(b=this.get_iframe()){try{b=b.contentWindow.document.getElementById(a)}catch(a){}}}return b},get_iframe:function(d){var c=this.getBody();var e=c?c.childNodes:null;if(!e){return null}var b=e.length;var a=(b>0)?e[0]:null;if(a&&a.nodeName=="#text"){a=e[1]}if(a&&a.nodeName!="IFRAME"){a=null}if(!a&&d){while(b-->0){c.removeChild(e[b])}a=document.createElement("IFRAME");a.marginHeight=a.marginWidth=a.frameBorder="0";a.style.width=a.style.height="100%";c.appendChild(a)}return a},getClientWidth:function(){if(this._width){return this._width}var a=this.getBody();var b=a.offsetWidth-$util.getOffset($util.getRuntimeStyle(a),true);return(b>0)?b:0},getClientHeight:function(){if(this._height){return this._height}var a=this.getBody();var b=a.offsetHeight-$util.getOffset($util.getRuntimeStyle(a));return(b>0)?b:0},getBody:function(){return this._DIV?this._DIV:this._element},_onInit:function(){var b=this.get_scrollLeft(),c=this.get_scrollTop(),a=this.getBody();if(b>0){a.scrollLeft=b}if(c>0){a.scrollTop=c}},_onSubmit:function(){this._set_value($IG.LayoutPaneProps.ScrollLeft,this.getBody().scrollLeft);this._set_value($IG.LayoutPaneProps.ScrollTop,this.getBody().scrollTop)}};$IG.LayoutPane.registerClass("Infragistics.Web.UI.LayoutPane",$IG.UIObject);