////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   This computer program is protected by copyright law and international treaties.                                                      //
//   Unauthorized reproduction or distribution of the program, or any portion of it, may result in severe civil and criminal penalties,   //
//   and will be prosecuted to the maximum extent possible under law.                                                                     //
//   Copyright(c) Digitomi Corp. All Right Reserved.                                                                                      //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   Last Update 2004_08_06 16:27:10 by tews                                                                                              //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function MgrBook(){this.id="oBook";this.oBookInfo=oBookInfo;this.BLScale=1;this.iDouble=giDouble;this.iDoubleCount=4;this.iCurrPageNo=0.5;this.iF_PageNo=0;this.iL_PageNo=this.oBookInfo.iPageCount-1;this.bStartPageLoading=true;this.oBody=null;this.oBookBaseDiv=null;this.oCurrLevelDiv=null;this.oBasicLevelDiv=null;this.oLPDivUpper=null;this.oRPDivUpper=null;this.oLPDivLower=null;this.oRPDivLower=null;this.oLevelBaseDiv=null;this.oBorderLeftBg=null;this.oBorderTopLeft=null;this.oBorderTopBg=null;this.oBorderTopRight=null;this.oBorderBottomLeft=null;this.oBorderBottomBg=null;this.oBorderBottomRight=null;this.oBorderRightBg=null;this.tmpLargeDiv=null;this.oES_EffectImg=null;this.oESL_EffectImg=null;this.oESR_EffectImg=null;this.EnLargeStartIdx=null;this.aImgBuff=null;this.bLeafImgLoaded=false;this.iImgCachedCount				=0;this.iNextLeafSPos=this.oBookInfo.aLevelInfo[0][2] * 2;this.iPrevLeafSPos=0;this.iStatus="bsReadyDefault";this.fTargetPageNo=-0.5;this.iTargetPageNo=-1;this.bAutoLeaf=false;this.iAutoLeaf_DelayTime=5000;this.iScrollSize=40;this.bCurrMiddleLoad=false;this.ID_Scroll=null;this.ID_Leaf_Middle=null;this.ID_EnLargeShrink=null;this.ID_Leaf_Large=null;this.ID_Create_Left_Link_Obj=null;this.ID_Create_Right_Link_Obj=null;this.ID_Auto_Leaf=null;this.iBuff_DelayTime=70;this.iPL_Step=8;this.iPL_DelayTime=20;this.iPL_Width=0;this.iStepScroll=10;this.iIntervalScroll=40;this.oEnLargeShrinkPos=new Point();this.oDragBasis=new Point();this.oDragStartDiv=new Point();this.bMouseDown=false;this.bDraged=false;this.bMiddleImgMove=false;this.bBusy=false;this.Initial=Initial;this.InitFeature=InitFeature;this.IsLeafBounds=IsLeafBounds;this.LLeftPage=LLeftPage;this.LeftPage=LeftPage;this.RRightPage=RRightPage;this.RightPage=RightPage;this.FirstPage=FirstPage;this.LastPage=LastPage;this.GetCurrPage=GetCurrPage;this.GetCurrLevel=GetCurrLevel;this.GetMaxLevel=GetMaxLevel;this.DoScroll=DoScroll;this.SetPageLeafStep=SetPageLeafStep;this.SetPageLeafDelayTime=SetPageLeafDelayTime;this.DoLeaf=DoLeaf;this.PrepLeaf=PrepLeaf;this.Leaf_RL=Leaf_RL;this.Leaf_LL=Leaf_LL;this.Leaf_LR=Leaf_LR;this.Leaf_RR=Leaf_RR;this.Leaf_End_Left=Leaf_End_Left;this.Leaf_End_Right=Leaf_End_Right;this.SetDoubleEnLargePos=SetDoubleEnLargePos;this.SetObjWidth=SetObjWidth;this.InitBuff=InitBuff;this.OnResize=OnResize;this.DoResize=DoResize;this.PosDetail=new Point();this.bDetail=false;this.GotoDetailPage=GotoDetailPage;this.GotoPage=GotoPage;this.Buffering=Buffering;this.DoBuffering=DoBuffering;this.CancelBuffering=CancelBuffering;this.CancelSliceBuffering=CancelSliceBuffering;this.PrepLeafLeft=PrepLeafLeft;this.PrepLeafRight=PrepLeafRight;this.OnLoadLeafImg=OnLoadLeafImg;this.OnLoadBuffImg=OnLoadBuffImg;this.OnMouseMoveDiv=OnMouseMoveDiv;this.OnMouseOverDiv=OnMouseOverDiv;this.OnMouseOutDiv=OnMouseOutDiv;this.OnLoadBorderImg=OnLoadBorderImg;this.cobSetBackGround=cobSetBackGround;this.cobGotoPage=cobGotoPage;this.cobDoEnLarge=cobDoEnLarge;this.cobDoShrink=cobDoShrink;this.cobGetCurrLevelIdx=cobGetCurrLevelIdx;this.cobGetMaxLevelIdx=cobGetMaxLevelIdx;this.cobGetCurrPage=cobGetCurrPage;this.cobGetLR=cobGetGetLR;this.cobIsDouble=cobIsDouble;this.cobSetAutoLeaf=cobSetAutoLeaf;this.cobSetAutoLeafTime=cobSetAutoLeafTime;}function SetPageLeafStep(arg_value){if(arg_value !=null){this.iPL_Step=parseInt(arg_value);this.iPL_Width=Math.ceil(parseInt(this.oBookInfo.aLevelInfo[0][2] /this.iPL_Step));}}function SetPageLeafDelayTime(arg_value){if(arg_value !=null)this.iPL_DelayTime=parseInt(arg_value);}function Initial(){var iMode;var iCeil;var tmpBorderTopLeft=document.createElement("Div");document.body.insertBefore(tmpBorderTopLeft);tmpBorderTopLeft.outerHTML=" <Div id=\"oBorderTopLeft\" tabindex=\"1\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;left:0;top:0;\">"+"\n"+" <img id=\"oBorderTopLeftImg\" src=\""+gsSkinDir+"BorderTopLeftMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\" >"+"\n"+" </Div>";delete tmpBorderTopLeft;var tmpBorderLeftBg=document.createElement("Div");document.body.insertBefore(tmpBorderLeftBg);tmpBorderLeftBg.outerHTML=" <Div id=\"oBorderLeftBg\" tabindex=\"0\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;left:0;\" onclick=\"oController2.ccoToggle(oBook.cobGetCurrPage()-(.5 * "+giLeafDirect+"))\" >"+"\n"+" <img id=\"oBorderLeftBgImg\" src=\""+gsSkinDir+"BorderLeftBgMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\" >"+"\n"+" </Div>";delete tmpBorderLeftBg;var tmpBorderTopRight=document.createElement("Div");document.body.insertBefore(tmpBorderTopRight);tmpBorderTopRight.outerHTML=" <Div id=\"oBorderTopRight\" tabindex=\"1\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;top:0;right:0;\">"+"\n"+" <img id=\"oBorderTopRightImg\" src=\""+gsSkinDir+"BorderTopRightMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\">"+"\n"+" </Div>";delete tmpBorderTopRight;var tmpBorderTopBg=document.createElement("Div");document.body.insertBefore(tmpBorderTopBg);tmpBorderTopBg.outerHTML=" <Div id=\"oBorderTopBg\" tabindex=\"0\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;top:0;\">"+"\n"+" <img id=\"oBorderTopBgImg\" src=\""+gsSkinDir+"BorderTopBgMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\" >"+"\n"+" </Div>";delete tmpBorderTopBg;var tmpBorderBottomLeft=document.createElement("Div");document.body.insertBefore(tmpBorderBottomLeft);tmpBorderBottomLeft.outerHTML=" <Div id=\"oBorderBottomLeft\" tabindex=\"0\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;left:0;bottom:0;\">"+"\n"+" <img id=\"oBorderBottomLeftImg\" src=\""+gsSkinDir+"BorderBottomLeftMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\" >"+"\n"+" </Div>";delete tmpBorderBottomLeft;var tmpBorderRightBg=document.createElement("Div");document.body.insertBefore(tmpBorderRightBg);tmpBorderRightBg.outerHTML=" <Div id=\"oBorderRightBg\" tabindex=\"0\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;right:0;\" onclick=\"oController2.ccoToggle(oBook.cobGetCurrPage()+(.5 * "+giLeafDirect+"))\">"+"\n"+" <img id=\"oBorderRightBgImg\" src=\""+gsSkinDir+"BorderRightBgMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\">"+"\n"+" </Div>";delete tmpBorderRightBg;var tmpBorderBottomRight=document.createElement("Div");document.body.insertBefore(tmpBorderBottomRight);tmpBorderBottomRight.outerHTML=" <Div id=\"oBorderBottomRight\" tabindex=\"1\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;bottom:0;right:0;\">"+"\n"+" <img id=\"oBorderBottomRightImg\" src=\""+gsSkinDir+"BorderBottomRightMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\">"+"\n"+" </Div>";delete tmpBorderBottomRight;var tmpBorderBottomBg=document.createElement("Div");document.body.insertBefore(tmpBorderBottomBg);tmpBorderBottomBg.outerHTML=" <Div id=\"oBorderBottomBg\" tabindex=\"0\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;bottom:0;\">"+"\n"+" <img id=\"oBorderBottomBgImg\" src=\""+gsSkinDir+"BorderBottomBgMouseOut.gif\" onload=\""+this.id+".OnLoadBorderImg(this.parentElement)\" >"+"\n"+" </Div>";delete tmpBorderBottomBg;SetScreenBufferDepth();if(giUF_PageNo !=-1){this.iF_PageNo=giUF_PageNo;}if(giUL_PageNo !=-1){this.iL_PageNo=giUL_PageNo;}if(giCurrPageNo==-1){this.iCurrPageNo=this.iF_PageNo+0.5;}else{iCeil=Math.ceil(giCurrPageNo);if(iCeil==giCurrPageNo){iMode=giCurrPageNo % 2;if(iMode > 0){this.iCurrPageNo=(giCurrPageNo-.5);}else{this.iCurrPageNo=(giCurrPageNo+.5);}}else{alert("Err : Invalid Page Call ");window.close();}}this.fTargetPageNo=this.iCurrPageNo;this.InitFeature();this.DoBuffering(0);this.iPL_Width=Math.ceil(parseInt(this.oBookInfo.aLevelInfo[0][2] /this.iPL_Step));}function IsLeafBounds(arg_iTargetPage){var result=false;if((arg_iTargetPage >=this.iF_PageNo)&&(arg_iTargetPage <=this.iL_PageNo)){result=true;}return result;}function LLeftPage(){switch(giLeafDirect){case-1 : this.LastPage();break;case 1 : this.FirstPage();break;}}function LeftPage(){var iTargetPage;switch(this.iDouble){case 1 : if(oBook.cobGetCurrLevelIdx()==0){iTargetPage=this.iCurrPageNo+(2 * giLeafDirect);this.GotoPage(iTargetPage);}else{if(MgrLevel.ClickLR==-1){iTargetPage=this.iCurrPageNo+(0.5 * giLeafDirect);}else{iTargetPage=this.iCurrPageNo+(1.5 * giLeafDirect);}this.GotoDetailPage(iTargetPage);}break;case 0 : iTargetPage=this.iCurrPageNo+(2 * giLeafDirect);if(oBook.cobGetCurrLevelIdx()==0){this.GotoPage(iTargetPage);}else{this.GotoDetailPage(iTargetPage);}break;}}function RightPage(){var iTargetPage;switch(this.iDouble){case 1 : if(oBook.cobGetCurrLevelIdx()==0){iTargetPage=this.iCurrPageNo-(2 * giLeafDirect);this.GotoPage(iTargetPage);}else{if(MgrLevel.ClickLR==1){iTargetPage=this.iCurrPageNo-(0.5 * giLeafDirect);}else{iTargetPage=this.iCurrPageNo-(1.5 * giLeafDirect);}this.GotoDetailPage(iTargetPage);}break;case 0 : iTargetPage=this.iCurrPageNo-(2 * giLeafDirect);if(oBook.cobGetCurrLevelIdx()==0){this.GotoPage(iTargetPage);}else{this.GotoDetailPage(iTargetPage);}break;}}function RRightPage(){switch(giLeafDirect){case-1 : this.FirstPage();break;case 1 : this.LastPage();break;}}function FirstPage(){var iTargetPage;switch(this.iDouble){case 1 : switch(this.iStatus){case "bsReadyDefault" : iTargetPage=this.iF_PageNo+0.5;if(this.iCurrPageNo==iTargetPage){oController2.ccoInvalidPage(iTargetPage-2);return;}break;case "bsReadyLevel" : iTargetPage=this.iF_PageNo;break;default : return;}break;case 0 : iTargetPage=this.iF_PageNo+0.5;if(this.iCurrPageNo==iTargetPage){oController2.ccoInvalidPage(iTargetPage-2);return;}break;}this.GotoPage(iTargetPage);}function LastPage(){var iTargetPage;switch(this.iDouble){case 1 : switch(this.iStatus){case "bsReadyDefault" : iTargetPage=this.iL_PageNo-0.5;if(this.iCurrPageNo==iTargetPage){oController2.ccoInvalidPage(iTargetPage+2);return;}break;case "bsReadyLevel" : iTargetPage=this.iL_PageNo;break;default : return;}break;case 0 : iTargetPage=this.iL_PageNo-0.5;if(this.iCurrPageNo==iTargetPage){oController2.ccoInvalidPage(iTargetPage-2);return;}break;}this.GotoPage(iTargetPage);}function GetCurrPage(){var iPageNo=iPageNo=this.iCurrPageNo;if(MgrLevel.ItemIndex !=0){iPageNo=this.iCurrPageNo+(0.5 * MgrLevel.ClickLR * giLeafDirect);}return iPageNo;}function GetCurrLevel(){return MgrLevel.ItemIndex;}function GetMaxLevel(){return this.oBookInfo.aLevelInfo.length-1}function DoScroll(arg_X,arg_Y){if(parseInt(MgrLevel.oLevelBaseDiv.style.width)< parseInt(this.oCurrLevelDiv.style.width)){var iMinLimit_X=parseInt(MgrLevel.oLevelBaseDiv.style.width)-parseInt(this.oCurrLevelDiv.style.width);var iMaxLimit_X=0;}else{var iMinLimit_X=Math.ceil((parseInt(MgrLevel.oLevelBaseDiv.style.width)-parseInt(this.oCurrLevelDiv.style.width))/ 2);var iMaxLimit_X=iMinLimit_X;}if(parseInt(MgrLevel.oLevelBaseDiv.style.height)< parseInt(this.oCurrLevelDiv.style.height)){var iMinLimit_Y=parseInt(MgrLevel.oLevelBaseDiv.style.height)-parseInt(this.oCurrLevelDiv.style.height);var iMaxLimit_Y=0;}else{var iMinLimit_Y=Math.ceil((parseInt(MgrLevel.oLevelBaseDiv.style.height)-parseInt(this.oCurrLevelDiv.style.height))/ 2);var iMaxLimit_Y=0;}if(arg_X > iMaxLimit_X){arg_X=iMaxLimit_X;}if(arg_Y > iMaxLimit_Y){arg_Y=iMaxLimit_Y;}if(arg_X < iMinLimit_X){arg_X=iMinLimit_X;}if(arg_Y < iMinLimit_Y){arg_Y=iMinLimit_Y;}this.oCurrLevelDiv.style.left=arg_X;this.oCurrLevelDiv.style.top=arg_Y;MgrSkin.ShowHideScrollBar(this.oCurrLevelDiv);}function cobSetBackGround(arg_Data){this.oBody.style.background=arg_Data;}function SetDoubleEnLargePos(arg_Click_XPos,arg_Click_YPos){var iDispWidth=this.oBookInfo.aLevelInfo[this.oBookInfo.aLevelInfo.length-1 ][2] * 2;var iDispHeight=this.oBookInfo.aLevelInfo[this.oBookInfo.aLevelInfo.length-1 ][3];var iBaseWidth=parseInt(this.oLevelBaseDiv.style.width);var iBaseHeight=parseInt(this.oLevelBaseDiv.style.height);var iDispClickXPoint=iDispWidth *(arg_Click_XPos /(this.oBookInfo.aLevelInfo[this.oBookInfo.aLevelInfo.length-1 ][2]));var iDispClickYPoint=iDispHeight *(arg_Click_YPos /(this.oBookInfo.aLevelInfo[0][3]));var iDispWidthHalf=iDispWidth / 2;var iBaseWidthHalf=iBaseWidth / 2;var iDispHeightHalf=iDispHeight / 2;var iBaseHeightHalf=iBaseHeight / 2;var iAdjustHeight;var iAdjustWidth;if(iBaseWidth >=iDispWidth){this.oEnLargeShrinkPos.x=Math.round((iBaseWidth-iDispWidth)/ 2);}else{if(iDispClickXPoint < iDispWidthHalf){if(iDispClickXPoint < iBaseWidthHalf){this.oEnLargeShrinkPos.x=0;}else{iAdjustWidth=iBaseWidthHalf-iDispClickXPoint;this.oEnLargeShrinkPos.x=Math.round(iAdjustWidth);}}else{if((iDispClickXPoint-iDispWidthHalf)> iBaseWidthHalf){this.oEnLargeShrinkPos.x=Math.round(iBaseWidth-iDispWidth);}else{iAdjustWidth=iBaseWidthHalf-iDispClickXPoint;this.oEnLargeShrinkPos.x=Math.round(iAdjustWidth);}}}if(iBaseHeight >=iDispHeight){this.oEnLargeShrinkPos.y=Math.round((iBaseHeight-iDispHeight)/ 2);}else{if(iDispClickYPoint < iDispHeightHalf){if(iDispClickYPoint < iBaseHeightHalf){this.oEnLargeShrinkPos.y=0;}else{iAdjustHeight=iBaseHeightHalf-iDispClickYPoint;this.oEnLargeShrinkPos.y=Math.round(iAdjustHeight);}}else{if((iDispHeight-iDispClickYPoint)< iBaseHeightHalf){this.oEnLargeShrinkPos.y=Math.round(iBaseHeight-iDispHeight);}else{iAdjustHeight=iDispHeight-iDispClickYPoint-iBaseHeightHalf;this.oEnLargeShrinkPos.y=Math.round((iBaseHeight-iDispHeight)+iAdjustHeight);}}}}function OnResize(){oBook.DoResize();}function DoResize(){with(this.oBookBaseDiv.style){left=0;top=0;width=parseInt(this.oBody.clientWidth);height=parseInt(this.oBody.clientHeight);}with(this.oBasicLevelDiv.style){width=this.oBookInfo.aLevelInfo[0][2] * 2+(iBorder_L_Bg_Width+iBorder_R_Bg_Width);height=this.oBookInfo.aLevelInfo[0][3]+(iBorder_T_Bg_Height+iBorder_B_Bg_Height);left=Math.round((parseInt(this.oBookBaseDiv.style.width)-parseInt(width))/2);top=Math.round((parseInt(this.oBookBaseDiv.style.height)-parseInt(height))/2);}with(this.oLevelBaseDiv.style){width=parseInt(this.oBookBaseDiv.style.width);height=parseInt(this.oBookBaseDiv.style.height);left=Math.round((parseInt(this.oBookBaseDiv.style.width)-parseInt(width))/2);top=Math.round((parseInt(this.oBookBaseDiv.style.height)-parseInt(height))/2);}if(parseInt(this.oLevelBaseDiv.style.width)< parseInt(this.oCurrLevelDiv.style.width)){var iMinLimit_X=parseInt(this.oLevelBaseDiv.style.width)-parseInt(this.oCurrLevelDiv.style.width);var iMaxLimit_X=0;}else{var iMinLimit_X=Math.ceil((parseInt(this.oLevelBaseDiv.style.width)-parseInt(this.oCurrLevelDiv.style.width))/ 2);var iMaxLimit_X=iMinLimit_X;}if(parseInt(this.oLevelBaseDiv.style.height)< parseInt(this.oCurrLevelDiv.style.height)){var iMinLimit_Y=parseInt(this.oLevelBaseDiv.style.height)-parseInt(this.oCurrLevelDiv.style.height);var iMaxLimit_Y=0;}else{var iMinLimit_Y=Math.ceil((parseInt(this.oLevelBaseDiv.style.height)-parseInt(this.oCurrLevelDiv.style.height))/ 2);var iMaxLimit_Y=0;}var iLeft=parseInt(this.oCurrLevelDiv.style.left);var iTop=parseInt(this.oCurrLevelDiv.style.top);if(iLeft > iMaxLimit_X){iLeft=iMaxLimit_X;}if(iTop > iMaxLimit_Y){iTop=iMaxLimit_Y;}if(iLeft < iMinLimit_X){iLeft=iMinLimit_X;}if(iTop < iMinLimit_Y){iTop=iMinLimit_Y;}this.oCurrLevelDiv.style.left=iLeft;this.oCurrLevelDiv.style.top=iTop;if(String(this.GetCurrLevel())=="undefined")return;switch(MgrLevel.ItemIndex){case 0 : var iTargetPageNum=this.iCurrPageNo;MgrLink.ResizeLinks(this.oCurrLevelDiv,oBook.iCurrPageNo,MgrLevel.ItemIndex);break;default : var iTargetPageNum=(this.iCurrPageNo+(0.5 * giLeafDirect * MgrLevel.ClickLR));MgrLink.ResizeLinks(this.oCurrLevelDiv,(oBook.iCurrPageNo+(0.5 * giLeafDirect)* MgrLevel.ClickLR),MgrLevel.ItemIndex);break;}MgrSkin.ShowHideScrollBar(this.oCurrLevelDiv);if(typeof(oMiniMap2)!="undefined"){oMiniMap2.dmiDoRescale(iTargetPageNum,this.GetCurrLevel(),-iLeft,-iTop);}}function GotoPage(arg_PageNo){var iTargetPage=parseFloat(arg_PageNo);if(this.bBusy)return;if(!(this.IsLeafBounds(iTargetPage))){oController2.ccoInvalidPage(iTargetPage);this.bAutoLeaf=false;return;}this.CancelBuffering();if(this.iDouble==1){switch(this.iStatus){case "bsReadyDefault" : if(iTargetPage==Math.round(iTargetPage)){if((iTargetPage % 2)> 0){iTargetPage+=-.5;}else{iTargetPage+=.5;}}else{if((Math.ceil(iTargetPage)% 2)> 0){}else{return;}}if(this.bStartPageLoading){this.bStartPageLoading=false;}else{if(iTargetPage==this.iCurrPageNo){if(MgrLevel.ItemIndex==0)return;}}switch(giLeafDirect){case-1 : if(arg_PageNo > this.iCurrPageNo)this.iStatus="bsPrepLeafLeft";else this.iStatus="bsPrepLeafRight";break;case 1 : if(arg_PageNo > this.iCurrPageNo)this.iStatus="bsPrepLeafRight";else this.iStatus="bsPrepLeafLeft";break;}break;case "bsReadyLevel" : if(iTargetPage > this.iCurrPageNo)this.iStatus=24;else this.iStatus=23;break;default : return;}}else{if(this.iStatus=="bsReadyLevel"){return;}if(iTargetPage==Math.round(iTargetPage)){if((iTargetPage % 2)> 0)iTargetPage+=-.5;else iTargetPage+=.5;}else{if((Math.ceil(iTargetPage)% 2)> 0){}else{return;}}if(this.bStartPageLoading){this.bStartPageLoading=false;}else{if(iTargetPage==this.iCurrPageNo)return;}switch(giLeafDirect){case-1 : switch(this.iStatus){case "bsReadyDefault" : if(iTargetPage > this.iCurrPageNo)this.iStatus="bsPrepLeafLeft";else this.iStatus="bsPrepLeafRight";break;case "bsReadyLevel" : if(iTargetPage > this.iCurrPageNo)this.iStatus=23;else this.iStatus=24;break;}break;case 1 : switch(this.iStatus){case "bsReadyDefault" : if(iTargetPage > this.iCurrPageNo)this.iStatus="bsPrepLeafRight";else this.iStatus="bsPrepLeafLeft";break;case "bsReadyLevel" : if(iTargetPage > this.iCurrPageNo)this.iStatus=24;else this.iStatus=23;break;}break;}}this.fTargetPageNo=iTargetPage;this.PrepLeaf();}function GotoDetailPage(){this.iTargetPageNo=arguments[0];this.PosDetail.x=arguments[1];this.PosDetail.y=arguments[2];if(typeof(this.iTargetPageNo)=="undefined"){return false;}if(typeof(this.PosDetail.x)=="undefined"){this.PosDetail.x=0;}if(typeof(this.PosDetail.y)=="undefined"){this.PosDetail.y=0;}this.bDetail=true;if(MgrLevel.ItemIndex==0){var iScale=MgrLevel.LevelInfo[0][3] / MgrLevel.LevelInfo[MgrLevel.Levels.length-1 ][3];this.PosDetail.x=parseInt(this.PosDetail.x * iScale);this.PosDetail.y=parseInt(this.PosDetail.y * iScale);if(this.iTargetPageNo==(this.iCurrPageNo-(0.5 * giLeafDirect))){MgrMouse.OnMouseUpBasicLevel(oLPDivUpper);}else if(this.iTargetPageNo==(this.iCurrPageNo+(0.5 * giLeafDirect))){MgrMouse.OnMouseUpBasicLevel(oRPDivUpper);}else{this.GotoPage(this.iTargetPageNo);}}else{if(this.iTargetPageNo==this.iCurrPageNo+(0.5 * giLeafDirect * MgrLevel.ClickLR)){if(oBook.PosDetail.x >(parseInt(this.oLevelBaseDiv.style.width)/ 2)){var iLeft=oBook.PosDetail.x-parseInt(this.oLevelBaseDiv.style.width)/ 2;}else{var iLeft=0;}var tmpLeft=-(parseInt(MgrLevel.oLevelBaseDiv.style.width)-parseInt(MgrLevel.LevelInfo[MgrLevel.ItemIndex][3]));if(iLeft > tmpLeft){iLeft=tmpLeft;}if(oBook.PosDetail.y >(parseInt(this.oLevelBaseDiv.style.height)/ 2)){var iTop=oBook.PosDetail.y-parseInt(this.oLevelBaseDiv.style.height)/ 2;}else{var iTop=0;}var tmpTop=-(parseInt(MgrLevel.oLevelBaseDiv.style.height)-parseInt(MgrLevel.LevelInfo[MgrLevel.ItemIndex][3]));if(iTop > tmpTop){iTop=tmpTop;}oBook.oCurrLevelDiv.style.left=-iLeft;oBook.oCurrLevelDiv.style.top=-iTop;oController2.ccoDoScroll(iLeft,iTop);this.bDetail=false;}else{this.GotoPage(this.iTargetPageNo);}}}function OnMouseMoveDiv(){if(!gbAllLoaded){return false;}MgrMouse.OnMouseMoveforCursor();}function OnMouseOverDiv(arg_ImgName){if(!gbAllLoaded){return false;}MgrMouse.OnMouseOverforCursor(arg_ImgName);}function OnMouseOutDiv(){if(!gbAllLoaded){return false;}MgrMouse.OnMouseOutforCursor();}function cobGotoPage(arg_Page){this.GotoPage(arg_Page);}function cobDoEnLarge(arg_LR){if(MgrLevel.ItemIndex==0){switch(arg_LR){case-1 : this.PosDetail.x=parseInt(this.oBasicLevelDiv.style.left)+(this.oBookInfo.aLevelInfo[MgrLevel.ItemIndex][2] / 2);this.PosDetail.y=parseInt(this.oBasicLevelDiv.style.top)+(this.oBookInfo.aLevelInfo[MgrLevel.ItemIndex][3] / 2);MgrLevel.DoEnLarge(this.oLPDivUpper);break;case 1 : this.PosDetail.x=parseInt(this.oBasicLevelDiv.style.left)+(this.oBookInfo.aLevelInfo[MgrLevel.ItemIndex][2] / 2)+(this.oBookInfo.aLevelInfo[MgrLevel.ItemIndex][2]);this.PosDetail.y=parseInt(this.oBasicLevelDiv.style.top)+(this.oBookInfo.aLevelInfo[MgrLevel.ItemIndex][3] / 2);MgrLevel.DoEnLarge(this.oRPDivUpper);break;}}else{if(MgrLevel.ClickLR !=arg_LR){return;}switch(arg_LR){case-1 : this.PosDetail.x=parseInt(MgrLevel.oLevelBaseDiv.style.width)/ 2;this.PosDetail.y=parseInt(MgrLevel.oLevelBaseDiv.style.height)/ 2;MgrLevel.DoEnLarge(MgrLevel.Levels[MgrLevel.ItemIndex].oL_TileDiv);break;case 1 : this.PosDetail.x=parseInt(MgrLevel.oLevelBaseDiv.style.width)/ 2;this.PosDetail.y=parseInt(MgrLevel.oLevelBaseDiv.style.height)/ 2;MgrLevel.DoEnLarge(MgrLevel.Levels[MgrLevel.ItemIndex].oR_TileDiv);break;}}}function cobDoShrink(){var iScale=MgrLevel.LevelInfo[0][3] / MgrLevel.LevelInfo[MgrLevel.Levels.length-1 ][3];switch(MgrLevel.ClickLR){case-1 : this.PosDetail.x=parseInt(MgrLevel.oLevelBaseDiv.style.left)+(parseInt(MgrLevel.oLevelBaseDiv.style.width)/ 2);this.PosDetail.y=parseInt(MgrLevel.oLevelBaseDiv.style.top)+(parseInt(MgrLevel.oLevelBaseDiv.style.height)/ 2);MgrLevel.DoShrink(MgrLevel.Levels[MgrLevel.ItemIndex].oL_TileDiv);break;case 0 : this.PosDetail.x=parseInt(MgrLevel.oLevelBaseDiv.style.left)+(parseInt(MgrLevel.oLevelBaseDiv.style.width)/ 2);this.PosDetail.y=parseInt(MgrLevel.oLevelBaseDiv.style.top)+(parseInt(MgrLevel.oLevelBaseDiv.style.height)/ 2);MgrLevel.DoShrink(MgrLevel.Levels[MgrLevel.ItemIndex].oC_TileDiv);break;case 1 : this.PosDetail.x=parseInt(MgrLevel.oLevelBaseDiv.style.left)+(parseInt(MgrLevel.oLevelBaseDiv.style.width)/ 2);this.PosDetail.y=parseInt(MgrLevel.oLevelBaseDiv.style.top)+(parseInt(MgrLevel.oLevelBaseDiv.style.height)/ 2);MgrLevel.DoShrink(MgrLevel.Levels[MgrLevel.ItemIndex].oR_TileDiv);break;}}function cobGetCurrLevelIdx(){return this.GetCurrLevel();}function cobGetMaxLevelIdx(){return this.GetMaxLevel();}function cobGetCurrPage(){return this.GetCurrPage();}function cobGetGetLR(){return MgrLevel.ClickLR;}function cobIsDouble(){var bResult=false;if(this.iDouble==0){bResult=true;}return bResult;}function cobSetAutoLeaf(arg_AutoLeaf){clearTimeout(this.ID_Auto_Leaf);this.bAutoLeaf=arg_AutoLeaf;}function cobSetAutoLeafTime(arg_DelayTime){this.iAutoLeaf_DelayTime=arg_DelayTime * 1000;}function mkBorder(arg_BorderName){var tmpBorder=document.createElement("Div");document.body.insertBefore(tmpBorder);tmpBorder.outerHTML=" <Div id=\"o"+arg_BorderName+"\" tabindex=\"1\" style=\"position:absolute;z-index:8;cursor:hand;visibility:hidden;left:0;top:0;\">"+"\n"+" <img id=\"o"+arg_BorderName+"Img\" src=\""+gsSkinDir+arg_BorderName+"MouseOut.gif\" onload=\""+this.id+"."+"OnLoadBorderImg("+arg_BorderName+")\" >"+"\n"+" </Div>";delete tmpBorder;}function OnLoadBorderImg(arg_Obj){if(arg_Obj.tabindex==0){arg_Obj.style.height=arg_Obj.children(0).height;arg_Obj.children(0).style.visibility="visible";}else{arg_Obj.style.width=arg_Obj.children(0).width;arg_Obj.children(0).style.visibility="visible";}}function InitFeature(){this.oBody=oBookDiv;var iValidScreenHeight=this.oBody.clientHeight;var iValidScreenWidth=this.oBody.clientWidth;var iDeviation_Width=iValidScreenWidth-(this.oBookInfo.aLevelInfo[0][2] * 2);var iDeviation_Height=iValidScreenHeight-this.oBookInfo.aLevelInfo[0][3];if((iDeviation_Width < 0)||(iDeviation_Height < 0)){var xBLScale=iValidScreenWidth /(this.oBookInfo.aLevelInfo[0][2] * 2);var yBLScale=iValidScreenHeight /(this.oBookInfo.aLevelInfo[0][3]);if(xBLScale > yBLScale){this.oBookInfo.aLevelInfo[0][3]=parseInt(yBLScale * this.oBookInfo.aLevelInfo[0][3]);this.oBookInfo.aLevelInfo[0][2]=parseInt(yBLScale * this.oBookInfo.aLevelInfo[0][2]);this.BLScale=yBLScale;if(GetCorpID()=="DaumDTV"){this.oBookInfo.aLevelInfo[0][3]=Math.ceil(this.oBookInfo.aLevelInfo[0][3] * 1.33);}}else{this.oBookInfo.aLevelInfo[0][2]=parseInt(xBLScale * this.oBookInfo.aLevelInfo[0][2]);this.oBookInfo.aLevelInfo[0][3]=parseInt(xBLScale * this.oBookInfo.aLevelInfo[0][3]);this.BLScale=xBLScale;if(GetCorpID()=="DaumDTV"){this.oBookInfo.aLevelInfo[0][3]=Math.ceil(this.oBookInfo.aLevelInfo[0][3] * 1.33);}}}var tmpBookBaseDiv=document.createElement("Div");this.oBody.appendChild(tmpBookBaseDiv);tmpBookBaseDiv.outerHTML=" <div id=\"oBookBaseDiv\" "+"\n"+" > </div> ";this.oBookBaseDiv=oBookBaseDiv;delete tmpBookBaseDiv;with(this.oBookBaseDiv.style){position="absolute";top=0;left=0;width=this.oBody.clientWidth;height=this.oBody.clientHeight;zIndex=0;overflow="hidden";}this.oBorderLeftBg=oBorderLeftBg;this.oBorderLeftBg.style.visibility="hidden";this.oBorderTopLeft=oBorderTopLeft;this.oBorderTopLeft.style.visibility="hidden";this.oBorderTopRight=oBorderTopRight;this.oBorderTopRight.style.visibility="hidden";this.oBorderTopBg=oBorderTopBg;this.oBorderTopBg.style.visibility="hidden";this.oBorderRightBg=oBorderRightBg;this.oBorderRightBg.style.visibility="hidden";this.oBorderBottomLeft=oBorderBottomLeft;this.oBorderBottomLeft.style.visibility="hidden";this.oBorderBottomRight=oBorderBottomRight;this.oBorderBottomRight.style.visibility="hidden";this.oBorderBottomBg=oBorderBottomBg;this.oBorderBottomBg.style.visibility="hidden";iBorder_TL_Height=this.oBorderTopLeft.children(0).height;iBorder_TR_Height=this.oBorderTopRight.children(0).height;iBorder_BL_Height=this.oBorderBottomLeft.children(0).height;iBorder_BR_Height=this.oBorderBottomRight.children(0).height;iBorder_L_Bg_Width=this.oBorderLeftBg.children(0).width;iBorder_R_Bg_Width=this.oBorderRightBg.children(0).width;iBorder_T_Bg_Height=this.oBorderTopBg.children(0).height;iBorder_B_Bg_Height=this.oBorderBottomBg.children(0).height;if(iBorder_TL_Height==30){iBorder_TL_Height=0;}if(iBorder_TR_Height==30){iBorder_TR_Height=0;}if(iBorder_BL_Height==30){iBorder_BL_Height=0;}if(iBorder_BR_Height==30){iBorder_BR_Height=0;}if(iBorder_L_Bg_Width==28){iBorder_L_Bg_Width=0;}if(iBorder_R_Bg_Width==28){iBorder_R_Bg_Width=0;}if(iBorder_T_Bg_Height==30){iBorder_T_Bg_Height=0;}if(iBorder_B_Bg_Height==30){iBorder_B_Bg_Height=0;}var tmpBasicLevelDiv=document.createElement("DIV");this.oBookBaseDiv.appendChild(tmpBasicLevelDiv);tmpBasicLevelDiv.outerHTML=" <div id=\"oBasicLevelDiv\" "+"\n"+"> </div> ";delete tmpBasicLevelDiv;this.oBasicLevelDiv=oBasicLevelDiv;with(this.oBasicLevelDiv){with(style){position="absolute";width=this.oBookInfo.aLevelInfo[0][2] * 2+iBorder_L_Bg_Width+iBorder_R_Bg_Width;height=this.oBookInfo.aLevelInfo[0][3]+iBorder_T_Bg_Height+iBorder_B_Bg_Height;left=Math.round((parseInt(this.oBookBaseDiv.style.width)-parseInt(width))/2);top=Math.round((parseInt(this.oBookBaseDiv.style.height)-parseInt(height))/2);overflow="hidden";zIndex=400;}title=GetRes("EnLarge",gaRes_Core);}this.oBasicLevelDiv.appendChild(oBorderTopLeft);this.oBasicLevelDiv.appendChild(oBorderLeftBg);this.oBasicLevelDiv.appendChild(oBorderTopRight);this.oBasicLevelDiv.appendChild(oBorderTopBg);this.oBasicLevelDiv.appendChild(oBorderBottomLeft);this.oBasicLevelDiv.appendChild(oBorderRightBg);this.oBasicLevelDiv.appendChild(oBorderBottomRight);this.oBasicLevelDiv.appendChild(oBorderBottomBg);this.oBorderLeftBg.style.top=iBorder_TL_Height;this.oBorderLeftBg.style.height=this.oBookInfo.aLevelInfo[0][3]+(iBorder_T_Bg_Height+iBorder_B_Bg_Height)-(iBorder_TL_Height+iBorder_BL_Height);this.oBorderLeftBg.children(0).width=iBorder_L_Bg_Width;this.oBorderLeftBg.children(0).height=this.oBookInfo.aLevelInfo[0][3]+(iBorder_T_Bg_Height+iBorder_B_Bg_Height)-(iBorder_TL_Height+iBorder_BL_Height);this.oBorderRightBg.style.top=iBorder_TL_Height;this.oBorderRightBg.style.height=this.oBookInfo.aLevelInfo[0][3]+(iBorder_T_Bg_Height+iBorder_B_Bg_Height)-(iBorder_TR_Height+iBorder_BR_Height);this.oBorderRightBg.children(0).width=iBorder_R_Bg_Width;this.oBorderRightBg.children(0).height=this.oBookInfo.aLevelInfo[0][3]+(iBorder_T_Bg_Height+iBorder_B_Bg_Height)-(iBorder_TR_Height+iBorder_BR_Height);iBorder_T_Bg_Width=this.oBookInfo.aLevelInfo[0][2] * 2;this.oBorderTopBg.style.left=iBorder_L_Bg_Width;this.oBorderTopBg.style.width=this.oBookInfo.aLevelInfo[0][2] * 2;this.oBorderTopBg.children(0).height=iBorder_T_Bg_Height;this.oBorderTopBg.children(0).width=this.oBookInfo.aLevelInfo[0][2] * 2;iBorderBottom_Bg_Width=this.oBookInfo.aLevelInfo[0][2] * 2;this.oBorderBottomBg.style.left=iBorder_R_Bg_Width;this.oBorderBottomBg.style.width=this.oBookInfo.aLevelInfo[0][2] * 2;this.oBorderBottomBg.children(0).height=iBorder_B_Bg_Height;this.oBorderBottomBg.children(0).width=this.oBookInfo.aLevelInfo[0][2] * 2;var tmpLPDivUpper=document.createElement("DIV");this.oBasicLevelDiv.appendChild(tmpLPDivUpper);tmpLPDivUpper.outerHTML=" <div id=\"oLPDivUpper\" "+"\n"+" onmousemove=\" "+this.id+"."+"OnMouseMoveDiv()\" "+"\n"+" onmouseover=\" "+this.id+"."+"OnMouseOverDiv('Cursor_PlusLeft.gif')\" "+"\n"+" onmouseout=\" "+this.id+"."+"OnMouseOutDiv()\" "+"\n"+" onmouseup=\" "+"MgrMouse"+"."+"OnMouseUpBasicLevel("+"oLPDivUpper)\" "+"\n"+" ></div>";delete tmpLPDivUpper;this.oLPDivUpper=oLPDivUpper;this.oLPDivUpper.tabindex=-1;with(this.oLPDivUpper){with(style){position="absolute";zIndex=12;left=iBorder_L_Bg_Width;top=iBorder_T_Bg_Height;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];overflow="hidden";}}var tmpLPImgUpper=document.createElement("IMG");this.oLPDivUpper.appendChild(tmpLPImgUpper);tmpLPImgUpper.outerHTML=" <img id=\"oLPImgUpper\" "+"\n"+" onload=\" "+this.id+"."+"OnLoadLeafImg(this)\" >";delete tmpLPImgUpper;this.oLPImgUpper=oLPImgUpper;with(this.oLPImgUpper){with(style){position="absolute";cursor="hand";right=0;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];zIndex=0;}src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo-(0.5 * giLeafDirect),0,0);}var tmpLPDivLower=document.createElement("DIV");this.oBasicLevelDiv.appendChild(tmpLPDivLower);tmpLPDivLower.outerHTML=" <div id=\"oLPDivLower\" "+"\n"+" onmousemove=\" "+this.id+"."+"OnMouseMoveDiv()\" "+"\n"+" onmouseover=\" "+this.id+"."+"OnMouseOverDiv('Cursor_PlusLeft.gif')\" "+"\n"+" onmouseout=\" "+this.id+"."+"OnMouseOutDiv()\" "+"\n"+" onmouseup=\" "+"MgrMouse"+"."+"OnMouseUpBasicLevel("+"oLPDivLower)\" "+"\n"+" ></div>";delete tmpLPImgLower;this.oLPDivLower=oLPDivLower;this.oLPDivLower.tabindex=-1;with(this.oLPDivLower){with(style){position="absolute";zIndex=11;left=iBorder_L_Bg_Width;top=iBorder_T_Bg_Height;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];overflow="hidden";}}var tmpLPImgLower=document.createElement("IMG");oLPDivLower.appendChild(tmpLPImgLower);tmpLPImgLower.outerHTML=" <img id=\"oLPImgLower\" "+"\n"+" onload=\" "+this.id+"."+"OnLoadLeafImg(this)\" >";delete tmpLPImgLower;this.oLPImgLower=oLPImgLower;with(this.oLPImgLower){with(style){position="absolute";cursor="hand";right=0;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];zIndex=0;}src=gsSkinDir+gcBlankImgFileName;}var tmpRPDivUpper=document.createElement("DIV");this.oBasicLevelDiv.appendChild(tmpRPDivUpper);tmpRPDivUpper.outerHTML=" <div id=\"oRPDivUpper\" "+"\n"+" onmousemove=\" "+this.id+"."+"OnMouseMoveDiv()\" "+"\n"+" onmouseover=\" "+this.id+"."+"OnMouseOverDiv('Cursor_PlusRight.gif')\" "+"\n"+" onmouseout=\" "+this.id+"."+"OnMouseOutDiv()\" "+"\n"+" onmouseup=\" "+"MgrMouse"+"."+"OnMouseUpBasicLevel("+"oRPDivUpper)\" "+"\n"+" ></div>";delete tmpRPDivUpper;this.oRPDivUpper=oRPDivUpper;this.oRPDivUpper.tabindex=1;with(this.oRPDivUpper){with(style){position="absolute";zIndex=12;right=iBorder_R_Bg_Width;top=iBorder_T_Bg_Height;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];overflow="hidden";}}var tmpRPImgUpper=document.createElement("IMG");this.oRPDivUpper.appendChild(tmpRPImgUpper);tmpRPImgUpper.outerHTML=" <img id=\"oRPImgUpper\" "+"\n"+" onload=\" "+this.id+"."+"OnLoadLeafImg(this)\" >";delete tmpRPImgUpper;this.oRPImgUpper=oRPImgUpper;with(this.oRPImgUpper){with(style){position="absolute";cursor="hand";left=0;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];zIndex=0;}src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo+(0.5 * giLeafDirect),0,0);}var tmpRPDivLower=document.createElement("DIV");this.oBasicLevelDiv.appendChild(tmpRPDivLower);tmpRPDivLower.outerHTML=" <div id=\"oRPDivLower\" "+"\n"+" onmousemove=\" "+this.id+"."+"OnMouseMoveDiv()\" "+"\n"+" onmouseover=\" "+this.id+"."+"OnMouseOverDiv('Cursor_PlusRight.gif')\" "+"\n"+" onmouseout=\" "+this.id+"."+"OnMouseOutDiv()\" "+"\n"+" onmouseup=\" "+"MgrMouse"+"."+"OnMouseUpBasicLevel("+"oRPDivLower)\" "+"\n"+" ></div>";delete tmpRPDivLower;this.oRPDivLower=oRPDivLower;this.oRPDivLower.tabindex=1;with(this.oRPDivLower){with(style){position="absolute";zIndex=11;top=iBorder_T_Bg_Height;right=iBorder_R_Bg_Width;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];overflow="hidden";}}var tmpRPImgLower=document.createElement("IMG");this.oRPDivLower.appendChild(tmpRPImgLower);tmpRPImgLower.outerHTML=" <img id=\"oRPImgLower\" "+"\n"+" onload=\" "+this.id+"."+"OnLoadLeafImg(this)\" >";delete tmpRPImgLower;this.oRPImgLower=oRPImgLower;with(oRPImgLower){with(style){position="absolute";cursor="hand";left=0;width=this.oBookInfo.aLevelInfo[0][2];height=this.oBookInfo.aLevelInfo[0][3];zIndex=0;}src=gsSkinDir+gcBlankImgFileName;}var tmpLevelBaseDiv=document.createElement("DIV");this.oBookBaseDiv.appendChild(tmpLevelBaseDiv);tmpLevelBaseDiv.outerHTML="<div id=\"oLevelBaseDiv\" "+"\n"+" onMouseWheel=\" "+"MgrMouse.OnMouseWheelLevel()\"></div>";delete tmpLevelBaseDiv;this.oLevelBaseDiv=oLevelBaseDiv;with(this.oLevelBaseDiv){with(style){position="absolute";left=0;top=0;width=this.oBookBaseDiv.style.width;height=this.oBookBaseDiv.style.height;zIndex=500;visibility="hidden";overflow="hidden";}title=GetRes("EnLarge",gaRes_Core)+"/"+GetRes("Shrink",gaRes_Core);}this.aImgBuff=this.InitBuff(gcMiddleBufNum,2);this.oCurrLevelDiv=this.oBasicLevelDiv;document.body.focus();window.onresize=this.OnResize;}

