/**
 * Split Pane
 * Library require: animate.js
 * @author Siri Chongasamethaworn (goonohc@gmail.com)
 * @version 1.0 March 15, 2008
 * @since March 15, 2008
 */
Library.load({'js/animate.js':['Graphics']});var SplitPane=function(aa){this.autosize=aa;addEvent(window,'load',this.init);window.splitPaneObj=this;};SplitPane.MSIE=navigator.userAgent.indexOf('MSIE')>=0;SplitPane.prototype={repaint:function(){if(navigator.userAgent.indexOf('MSIE 6')>=0)this.init();},init:function(){var ba=document.getElementsByTagName('TD');for(var i=0;i<ba.length;i++){var ca=ba[i].className+' ';if(ca.indexOf("splitpane-vdivider")!=-1){ba[i].style.padding='0px';ba[i].style.margin='0px';ba[i].style.zIndex='1000';ba[i].style.cursor=SplitPane.MSIE?'col-resize':'e-resize';ba[i].divider='vertical';ba[i].dividerWidth=ba[i].offsetWidth;ba[i].containerWidth=Graphics.findWidth(ba[i].parentNode);var da=previousSibling(ba[i]);var ea=nextSibling(ba[i]);if(da&&ea){ba[i].pTd=da;ba[i].nTd=ea;ba[i].onmousedown=function(e){this.mouseOffset=Graphics.mousePosition(e||window.event);this.startX=Graphics.findX(this);this.containerWidth=Graphics.findWidth(this.parentNode);if(this.containerWidth==0){var fa=document.getElementById('splitpane');this.containerWidth=fa.offsetWidth;}
this.dWidth=(this.dividerWidth/this.containerWidth)*100;this.style.width=this.dWidth+'%';this.pTd.minWidth=this.pTd.style.minWidth?this.pTd.style.minWidth.replace(/px/g,''):this.pTd.offsetWidth;this.pTd.maxWidth=this.pTd.style.maxWidth?this.pTd.style.maxWidth.replace(/px/g,''):this.containerWidth;this.nTd.minWidth=this.nTd.style.minWidth?this.nTd.style.minWidth.replace(/px/g,''):this.nTd.offsetWidth;this.nTd.maxWidth=this.nTd.style.maxWidth?this.nTd.style.maxWidth.replace(/px/g,''):this.containerWidth;var ga=this.pTd.minWidth-this.pTd.offsetWidth;var ha=this.nTd.offsetWidth-this.nTd.maxWidth;this.moveableLeft=ga>ha?ga:ha;var ia=this.pTd.maxWidth-this.pTd.offsetWidth;var ja=this.nTd.offsetWidth-this.nTd.minWidth;this.moveableRight=ia<ja?ia:ja;this.pTd.startWidth=this.pTd.offsetWidth;this.nTd.startWidth=this.nTd.offsetWidth;window.splitPaneObj.dragObject=this;addEvent(document,'mousemove',window.splitPaneObj.mouseMove);addEvent(document,'mouseup',window.splitPaneObj.mouseUp);};}}}},mouseMove:function(e){var ka=Graphics.mousePosition(e||window.event);var la=window.splitPaneObj.dragObject;if(la){if(la.divider=='vertical'&&ka.x!=la.mouseOffset.x){var ma=ka.x-la.startX;if((ma<la.moveableLeft&&la.moveableLeft!=0)||(ma>la.moveableRight&&la.moveableRight!=0))return false;var na=(((la.pTd.startWidth+ma)/la.containerWidth)*100);na=(na<0?0:na);var oa=na-la.dWidth;var pa=(100-la.dWidth)-na;la.pTd.style.width=(oa<0?0:oa)+'%';la.nTd.style.width=(pa<0?0:pa)+'%';}}
return false;},mouseUp:function(e){window.splitPaneObj.dragObject=null;removeEvent(document,'mousemove',window.splitPaneObj.mouseMove);removeEvent(document,'mouseup',window.splitPaneObj.mouseUp);}};var splitPane=new SplitPane(false);