////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   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_07_29 21:19:10 by tews                                                                                              //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function PrepLeaf(){var sLSmallCurrPage=oDecoder2.cdeGetTileName(0,this.iCurrPageNo-(0.5 * giLeafDirect),0,0);var sRSmallCurrPage=oDecoder2.cdeGetTileName(0,this.iCurrPageNo+(0.5 * giLeafDirect),0,0);switch(this.iStatus){case "bsPrepLeafRight" : this.oLPImgLower.src=sLSmallCurrPage;this.oRPImgUpper.src=sRSmallCurrPage;break;case "bsPrepLeafLeft" : this.oLPImgUpper.src=sLSmallCurrPage;this.oRPImgLower.src=sRSmallCurrPage;break;case 23 :;case 24 : if(gbDoublePage){this.oLevelLeftImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo-(0.5 * giLeafDirect),0,"S");this.oLevelRightImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo+(0.5 * giLeafDirect),0,"S");}else{switch(this.tmpLargeDiv.id){case "oSliceRightDiv" : this.oLevelRightImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo,0,"S");this.oLevelLeftImg.src=oDecoder2.cdeGetTileName(this.fTargetPageNo,0,"S");break;case "oSliceLeftDiv" : this.oLevelLeftImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo,0,"S");this.oLevelRightImg.src=oDecoder2.cdeGetTileName(this.fTargetPageNo,0,"S");break;}}break;}}function OnLoadLeafImg(arg_ImgObj){var iMode;if(this.bLeafImgLoaded !=true){this.bLeafImgLoaded=true;return;}this.bLeafImgLoaded=false;switch(this.iStatus){case "bsPrepLeafRight" : this.PrepLeafRight();break;case "bsPrepLeafLeft" : this.PrepLeafLeft();break;case "bsLeafLeft" : case "bsLeafRight" : MgrSkin.oLeafLeft.tgTable.style.left=iBorder_L_Bg_Width;MgrSkin.oLeafRight.tgTable.style.right=iBorder_R_Bg_Width;oBook.oBasicLevelDiv.appendChild(MgrSkin.oLeafLeft.tgTable);oBook.oBasicLevelDiv.appendChild(MgrSkin.oLeafRight.tgTable);SDate=new Date();this.DoLeaf();break;case "bsShrink" : if(gbDoublePage !=true){ShowObj(this.oLPImgUpper);ShowObj(this.oRPImgUpper);iMode=this.iCurrPageNo % 2;if(iMode > 0){this.oEnLargeShrinkPos.x=this.oBookInfo.aLevelInfo[0][2]+Math.round((parseInt(this.oLevelBaseDiv.style.width)-(parseInt(this.oBookInfo.aLevelInfo[0][2])* 2))/2);this.oEnLargeShrinkPos.y=Math.round((parseInt(this.oLevelBaseDiv.style.height)-parseInt(this.oBookInfo.aLevelInfo[0][3]))/2);}else{this.oEnLargeShrinkPos.x=Math.round((parseInt(this.oLevelBaseDiv.style.width)-(parseInt(this.oBookInfo.aLevelInfo[0][2])* 2))/2);this.oEnLargeShrinkPos.y=Math.round((parseInt(this.oLevelBaseDiv.style.height)-parseInt(this.oBookInfo.aLevelInfo[0][3]))/2);}switch(this.tmpLargeDiv.id){case "oSliceRightDiv" : HideObj(this.oSliceRightDiv);this.oES_EffectImg=this.oLevelRightImg;this.oLevelRightImg.src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo,0,0);break;case "oSliceLeftDiv" : HideObj(this.oSliceLeftDiv);this.oES_EffectImg=this.oLevelLeftImg;this.oLevelLeftImg.src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo,0,0);break;}}else{ShowObj(this.oLPImgUpper);ShowObj(this.oRPImgUpper);this.oEnLargeShrinkPos.x=0;this.oEnLargeShrinkPos.y=0;HideObj(this.oSliceLeftDiv);HideObj(this.oSliceRightDiv);this.oESL_EffectImg=this.oLevelLeftImg;this.oESR_EffectImg=this.oLevelRightImg;this.oLevelLeftImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo-(0.5 * giLeafDirect),0,"S");this.oLevelRightImg.src=oDecoder2.cdeGetTileName(this.iCurrPageNo+(0.5 * giLeafDirect),0,"S");}break;}}function DoLeaf(){clearTimeout(this.ID_Create_Left_Link_Obj);clearTimeout(this.ID_Create_Right_Link_Obj);if(MgrLevel.ItemIndex !=0){MgrLevel.Levels[MgrLevel.ItemIndex].LevelHide(MgrLevel.ClickLR);MgrSkin.HideScrollBar();MgrLink.DestroyPageLinkObj(this.oCurrLevelDiv);MgrLevel.ItemIndex=0;}MgrLink.DestroyPageLinkObj(this.oBasicLevelDiv);switch(this.iStatus){case "bsLeafRight" : ShowObj(this.oLPImgUpper);ShowObj(this.oLPImgLower);ShowObj(this.oRPImgUpper);ShowObj(this.oRPImgLower);if((this.bDetail==true)&&(this.iTargetPageNo==(this.iCurrPageNo+(0.5*giLeafDirect)))){this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_End_Left()",1000);}else{this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_RL()",1);}this.DoBuffering(1);break;case "bsLeafLeft" : ShowObj(this.oLPImgUpper);ShowObj(this.oLPImgLower);ShowObj(this.oRPImgUpper);ShowObj(this.oRPImgLower);if((this.bDetail==true)&&(this.iTargetPageNo==(this.iCurrPageNo-(0.5*giLeafDirect)))){this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_End_Right()",1000);}else{this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_LR()",1);}this.DoBuffering(-1);break;}HideObj(MgrSkin.oToolTipDiv.tgTable);this.oCurrLevelDiv=this.oBasicLevelDiv;if(typeof(oMiniMap2)!="undefined"){oMiniMap2.dmiDoHide();}}function Leaf_RL(){clearTimeout(this.ID_Leaf_Middle);var iNewWidth=parseInt(this.oRPImgUpper.style.width);for(iIdx=0;iIdx < this.iPL_Step;iIdx++){iNewWidth=iNewWidth-this.iPL_Width;this.ID_Leaf_Middle=setTimeout(this.id+".SetObjWidth("+this.oRPImgUpper.id+","+iNewWidth+")",(iIdx+1)* this.iPL_DelayTime);}this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_LL()",iIdx * this.iPL_DelayTime);var EDate=new Date();}function Leaf_LL(){this.oRPImgUpper.style.width=0;clearTimeout(this.ID_Leaf_Middle);var iNewWidth=parseInt(this.oLPImgUpper.style.width);for(iIdx=0;iIdx < this.iPL_Step;iIdx++){iNewWidth=iNewWidth+this.iPL_Width;this.ID_Leaf_Middle=setTimeout(this.id+".SetObjWidth("+this.oLPImgUpper.id+","+iNewWidth+")",(iIdx+1)* this.iPL_DelayTime);}this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_End_Left()",iIdx * this.iPL_DelayTime);}function Leaf_LR(){clearTimeout(this.ID_Leaf_Middle);var iNewWidth=parseInt(this.oLPImgUpper.style.width);for(iIdx=0;iIdx < this.iPL_Step;iIdx++){iNewWidth=iNewWidth-this.iPL_Width;this.ID_Leaf_Middle=setTimeout(this.id+".SetObjWidth("+this.oLPImgUpper.id+","+iNewWidth+")",(iIdx+1)* this.iPL_DelayTime);}this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_RR()",iIdx * this.iPL_DelayTime);}function Leaf_RR(){this.oLPImgUpper.style.width=0;clearTimeout(this.ID_Leaf_Middle);var iNewWidth=parseInt(this.oRPImgUpper.style.width);for(iIdx=0;iIdx < this.iPL_Step;iIdx++){iNewWidth=iNewWidth+this.iPL_Width;this.ID_Leaf_Middle=setTimeout(this.id+".SetObjWidth("+this.oRPImgUpper.id+","+iNewWidth+")",(iIdx+1)* this.iPL_DelayTime);}this.ID_Leaf_Middle=setTimeout(this.id+"."+"Leaf_End_Right()",iIdx * this.iPL_DelayTime);}function Leaf_End_Left(){if(this.bMiddleImgMove){}else{}if(MgrLevel.ItemIndex !=0){MgrLevel.ItemIndex=0;}this.oLPImgUpper.style.width=parseInt(this.oBookInfo.aLevelInfo[0][2]);this.iCurrPageNo=this.fTargetPageNo;this.iStatus="bsReadyDefault";var LeftPageNo=this.iCurrPageNo-(0.5 * giLeafDirect);this.ID_Create_Left_Link_Obj=setTimeout("MgrLink.CreatePageLinkObj("+this.oCurrLevelDiv.id+","+LeftPageNo+","+MgrLevel.ItemIndex+")",10);var RightPageNo=this.iCurrPageNo+(0.5 * giLeafDirect);this.ID_Create_Right_Link_Obj=setTimeout("MgrLink.CreatePageLinkObj("+this.oCurrLevelDiv.id+","+RightPageNo+","+MgrLevel.ItemIndex+")",10);with(MgrSkin.oToolTipDiv){tgTable.style.visibility="hidden";}if(this.bDetail){if(this.iTargetPageNo > this.iCurrPageNo){if(giLeafDirect==1){MgrMouse.OnMouseUpBasicLevel(oRPDivUpper);}else{MgrMouse.OnMouseUpBasicLevel(oLPDivUpper);}}else{if(giLeafDirect==1){MgrMouse.OnMouseUpBasicLevel(oLPDivUpper);}else{MgrMouse.OnMouseUpBasicLevel(oRPDivUpper);}}}if(oController2 !=null){var ifileSize=oBook.oLPImgUpper.fileSize+oBook.oRPImgLower.fileSize;oController2.ccoDoLeaf(this.iCurrPageNo,MgrLevel.ItemIndex,ifileSize);}if(this.bAutoLeaf){clearTimeout(this.ID_Auto_Leaf);this.ID_Auto_Leaf=setTimeout("oBook.LeftPage()",this.iAutoLeaf_DelayTime);}}function Leaf_End_Right(){if(this.bMiddleImgMove){}else{}if(MgrLevel.ItemIndex !=0){MgrLevel.ItemIndex=0;}this.oRPImgUpper.style.width=parseInt(this.oBookInfo.aLevelInfo[0][2]);this.iCurrPageNo=this.fTargetPageNo;this.iStatus="bsReadyDefault";var LeftPageNo=this.iCurrPageNo-(0.5 * giLeafDirect);this.ID_Create_Left_Link_Obj=setTimeout("MgrLink.CreatePageLinkObj("+this.oCurrLevelDiv.id+","+LeftPageNo+","+MgrLevel.ItemIndex+")",10);var RightPageNo=this.iCurrPageNo+(0.5 * giLeafDirect);this.ID_Create_Right_Link_Obj=setTimeout("MgrLink.CreatePageLinkObj("+this.oCurrLevelDiv.id+","+RightPageNo+","+MgrLevel.ItemIndex+")",10);with(MgrSkin.oToolTipDiv){tgTable.style.visibility="hidden";}if(this.bDetail){if(this.iTargetPageNo > this.iCurrPageNo){if(giLeafDirect==1){MgrMouse.OnMouseUpBasicLevel(oRPDivUpper);}else{MgrMouse.OnMouseUpBasicLevel(oLPDivUpper);}}else{if(giLeafDirect==1){MgrMouse.OnMouseUpBasicLevel(oLPDivUpper);}else{MgrMouse.OnMouseUpBasicLevel(oRPDivUpper);}}}if(oController2 !=null){var ifileSize=oBook.oLPImgLower.fileSize+oBook.oRPImgUpper.fileSize;oController2.ccoDoLeaf(this.iCurrPageNo,MgrLevel.ItemIndex,ifileSize);}if(this.bAutoLeaf){clearTimeout(this.ID_Auto_Leaf);this.ID_Auto_Leaf=setTimeout("oBook.RightPage()",this.iAutoLeaf_DelayTime);}}function SetObjWidth(arg_Obj,arg_Width){if(arg_Width > this.oBookInfo.aLevelInfo[0][2]){arg_Width=this.oBookInfo.aLevelInfo[0][2];}arg_Obj.style.width=arg_Width;}function PrepLeafRight(){var sLSmallBuffPage=oDecoder2.cdeGetTileName(0,(this.fTargetPageNo-(0.5 * giLeafDirect)),0,0);var sRSmallBuffPage=oDecoder2.cdeGetTileName(0,(this.fTargetPageNo+(0.5 * giLeafDirect)),0,0);this.iStatus="bsLeafRight";this.oLPImgUpper.style.width=0;this.oRPImgUpper.style.width=this.oBookInfo.aLevelInfo[0][2];this.oLPImgUpper.src=sLSmallBuffPage;this.oRPImgLower.src=sRSmallBuffPage;}function PrepLeafLeft(){var sLSmallBuffPage=oDecoder2.cdeGetTileName(0,(this.fTargetPageNo-(0.5 * giLeafDirect)),0,0);var sRSmallBuffPage=oDecoder2.cdeGetTileName(0,(this.fTargetPageNo+(0.5 * giLeafDirect)),0,0);this.iStatus="bsLeafLeft";this.oLPImgUpper.style.width=this.oBookInfo.aLevelInfo[0][2];this.oRPImgUpper.style.width=0;this.oLPImgLower.src=sLSmallBuffPage;this.oRPImgUpper.src=sRSmallBuffPage;}

