var _sCompat_=document.compatMode,bIsCSS1Compat="CSS1Compat"==_sCompat_,nWidthScroll=17,cstrPosMark="divPos",cstrOutMark="outer",cstrHideMark="divHide",cstrLayerMark="layer",cstrTableMark="viewTable",cstrTHeadMark="header",cstrFixDiv="fix_height";window.onresize=AdjustScroll2;addEvent(window,"beforeunload",__endIE6Resize);$(window).load(function(a){_loadSB2(a)});document.getBoxObjectFor&&addEvent(window,"pageshow",function(a){a.persisted&&_loadSB2(a)});
function _loadSB2(a){scrollBar2(a);AdjustScroll2(a);focus2(a)}function SetTdTop(a,b,d){a=a.rows;d=d?!0:!1;for(nRowUp=0;nRowUp<a.length;nRowUp++){var c=a[nRowUp].cells,f=c.length;for(nCellUp=0;nCellUp<f;nCellUp++)d?1<c[nCellUp].offsetTop&&(c[nCellUp].style.top=b-1+"px",c[nCellUp].style.top=b+1+"px"):c[nCellUp].style.top=b+"px"}}
function SetTdLeftPos(a,b){a=a.rows;for(nRowUp=0;nRowUp<a.length;nRowUp++){var d=a[nRowUp];for(nCellUp=0;nCellUp<d.cells.length;nCellUp++)d.cells[nCellUp].style.left=b+"px"}}function __resetScrollHeader(a,b){a.__bSBSetup__||(a.__bSBSetup__=!0,a.nOldLeftScrollPos=0,SetScrollHeader(a,b),a.__bSBSetup__=!1)}
function SetScrollHeader(a,b){var d=a.getElementsByTagName("THEAD");bIsCSS1Compat&&1==d.length&&cstrTHeadMark==d[0].id&&(d=d[0],SetTdLeftPos(d,(a.nOldLeftScrollPos||0)-a.scrollLeft),a.nOldLeftScrollPos=a.scrollLeft,SetTdLeftPos(d,0),SetTdTop(d,a.scrollTop-d.offsetTop,b),(b=a.HSibling)&&b.scrollTop!=a.scrollTop&&(b.scrollTop=a.scrollTop))}var __bSBSetup__=!1;function scrollBar2(a,b){__bInitDhtmlApi||initDHTMLAPI();isIE4?__setIESB2(a,b):__setFFSB2(a);__bSBSetup__=!0}
function __setIESB2(a,b){var d=getHeaderFixedObjs();a=d.divLayer;d=d.theadHeader;var c,f=a.length;for(c=0;c<f;c++){var g=GetFixDiv(a[c]),e=d[c],h=e.offsetHeight;e=e.parentNode;var k=e.parentNode;if(bIsCSS1Compat){var n=getHoriSibling(g.parentNode.parentNode),p=c==f-1;n&&!p&&(g.parentNode.parentNode.style.position=g.parentNode.style.position="static");k.style.height=e.offsetHeight-h+"px";k.style.width=e.offsetWidth+"px";g.style.width=e.offsetWidth+20+"px";k.scrollTop=h;g=k.parentNode;g.style.borderTopWidth=
h+1+"px";SetScrollHeader(g,b)}else k.style.height=e.offsetHeight,g=k.parentNode,g.style.height="auto",g.style.width="auto"}}var nVertExtra=10,nHoriExtra=16,nMinLimit=10,__oInterval=null,__nWinWidth=-1,__nWinHeight=-1,__bInAdjusting=!1;function __saveWinSizeInfo(){if(bIsCSS1Compat){var a=document.documentElement;__nWinWidth=a.clientWidth;__nWinHeight=a.clientHeight}}
function __AdjustScroll2(){if(!__bInAdjusting&&bIsCSS1Compat){var a=document.documentElement;__nWinWidth==a.clientWidth&&__nWinHeight==a.clientHeight||AdjustScroll2()}}function __fixIE6Resize(){__oInterval||(__oInterval=window.setInterval(__AdjustScroll2,1E3))}function __endIE6Resize(){__bInAdjusting=!0;__oInterval&&(window.clearInterval(__oInterval),__oInterval=null)}function AdjustScroll2(a){__bSBSetup__&&(__bInitDhtmlApi||initDHTMLAPI(),isIE4?__adjustIESB2(a):__adjustFFSB2(a))}
function getHoriSibling(a){for(var b=null;a&&"DIV"==a.tagName;){if("X1"==a.id||"X2"==a.id){b=a;break}a=a.parentNode}return b}
function __adjustIESB2(a){__bInAdjusting=!0;var b=getHeaderFixedObjs();a=b.divLayer;b=b.tableView;if(0>=b.length)__bInAdjusting=!1;else{var d=0,c=null,f,g=a.length;for(f=0;f<g;f++){var e=GetFixDiv(a[f]),h=b[f];h=h.parentNode;var k=!1,n=getHoriSibling(e.parentNode.parentNode),p=f==g-1,l=getClientHeight(),q=getDimensions(e),r=e.parentNode.parentNode,m=r.offsetTop;r=getAncestorSize(r,getClientWidth()-q.left-2*e.clientLeft-nHoriExtra,l-m-e.clientTop-nVertExtra);m=r.width;h.offsetWidth>m&&(!n||p)&&(e.style.width=
0>=m?nMinLimit:m,e.style.overflowX="auto",k=!0);var t=!1;n?(m=l-q.top-e.clientTop-nVertExtra,h.offsetHeight>m?(t=!0,p||(m-=nWidthScroll,e.style.overflowY="hidden",t=!1),e.style.height=0>=m?nMinLimit:m):e.style.height=h.offsetHeight+(k?nWidthScroll:0),!k&&d&&m>nMinLimit+nWidthScroll&&(c.style.posHeight+=nWidthScroll)):(m=r.height,h.offsetHeight>m?(e.style.height=0>=m?nMinLimit:m,t=!0,e.style.overflowY="auto"):(e.style.height=h.offsetHeight+(k?nWidthScroll:0),e.style.overflowY="hidden"));k||(e.style.width=
h.offsetWidth+(t?nWidthScroll:0),e.style.overflowX="hidden");d=getClientHeight();p&&d>l&&(e.style.posHeight+=d-l);(d=n)?(p&&(n=parseInt(e.style.borderTopWidth||0,10),e.parentNode.parentNode.runtimeStyle.height=e.parentNode.runtimeStyle.height=e.style.posHeight+n+"px",e.parentNode.parentNode.runtimeStyle.width=e.parentNode.runtimeStyle.width=e.style.width,e.HSibling=c,c.HSibling=e),c=e):c=null;setTimeout("__resetScrollHeader("+e.uniqueID+",false)",500,"JavaScript")}__bInAdjusting=!1;bIsCSS1Compat&&
(__saveWinSizeInfo(),__fixIE6Resize())}}function GetFixDiv(a){var b=a.parentNode;b&&"DIV"==b.tagName&&cstrFixDiv==b.id&&(a=b);return a}function getDimensions(a){for(var b=a.offsetWidth,d=a.offsetHeight,c=0,f=0;null!=a;a=a.offsetParent)c+=a.offsetTop,f+=a.offsetLeft;return{top:c,left:f,width:b,height:d}}
function __setFFSB2(a){a=getHeaderFixedTabs();var b,d=a.length;for(b=0;b<d;b++){var c=a[b],f=c.tHead,g=c.tBodies[0];c.style.overflow="hidden";c.style.display="block";c.rules="none";f.style.overflow="hidden";g.style.display="table-header-group";g.style.overflow="auto";addEvent(g,"scroll",FSBodyScroll(c))}}
function __adjustFFSB2(a){a=getHeaderFixedTabs();var b,d=a.length;for(b=0;b<d;b++){var c=a[b],f=c.parentNode.parentNode,g=getHoriSibling(f.parentNode.parentNode),e=b==d-1,h=getClientWidth(),k=getClientHeight(),n=getDimensions(c),p=c.tHead,l=c.tBodies[0],q=parseInt(c.cellSpacing,10);q=q?q:0;h=getAncestorSize(f.parentNode.parentNode,h-n.left-nHoriExtra,k-n.top-nVertExtra);nDummy=h.height-2;nDummy=Math.max(nDummy-p.offsetHeight,nMinLimit+nWidthScroll);l.style.height=l.offsetHeight>nDummy?nDummy+"px":
l.offsetHeight+Math.min(nDummy-l.offsetHeight,l.scrollHeight-l.clientHeight)+"px";nDummy=h.width-3;nDummy=Math.max(nDummy,nMinLimit+nWidthScroll);l.style.width=l.offsetWidth>nDummy?nDummy+"px":l.offsetWidth+Math.min(nDummy-l.offsetWidth,l.scrollWidth-l.clientWidth)+"px";p.style.width=l.offsetWidth-nWidthScroll+"px";c.style.width=l.offsetWidth+2*q+"px";(oPreSiblingX=g)?(g.style.width=c.offsetWidth,g.style.height=c.offsetHeight,e&&(f.HSibling=oPreSiblingLayer),oPreSiblingLayer=f):oPreSiblingLayer=null}}
function FSBodyScroll(a){var b=a.tHead,d=a.tBodies[0];return function(c){b.scrollLeft!=d.scrollLeft&&(b.scrollLeft=d.scrollLeft)}}function getHeaderFixedTabs(){var a=[],b=document.getElementsByTagName("TABLE"),d,c=b.length;for(d=0;d<c;d++){var f=b[d];if(f.id&&cstrTableMark==f.id){var g=f.parentNode;g.id&&cstrHideMark==g.id&&(g=g.parentNode,g.id&&cstrLayerMark==g.id&&(g=f.tHead,!g||!g.id||cstrTHeadMark!=g.id||1<f.tBodies.length||(a[a.length]=f)))}}return a}
function getHeaderFixedObjs(){var a=[],b=[],d=[],c=[],f=document.getElementsByTagName("TABLE"),g,e=f.length;for(g=0;g<e;g++){var h=f[g];if(h&&cstrTableMark==h.id){var k=h.parentNode;if(k&&cstrHideMark==k.id){var n=k.parentNode;if(n&&cstrLayerMark==n.id){var p=h.tHead;p&&cstrTHeadMark==p.id&&(a.push(n),b.push(k),d.push(h),c.push(p))}}}}return{theadHeader:c,tableView:d,divHide:b,divLayer:a}}
function getAncestorSize(a,b,d){var c=new function(){this.width=b;this.height=d},f=a.offsetWidth;""!=a.style.width&&30<f&&f<b&&(c.width=f);f=a.offsetHeight-2.5*nVertExtra;""!=a.style.height&&30<f&&f<d&&(c.height=f);return c};
