////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   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_27 19:46:20 by tews                                                                                              //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function InitBuff(arg_BuffNum,arg_ElementNum){var iIdx,jIdx;var aMiddle=new Array(arg_BuffNum);var iCount=0;var iMode=0;for(iIdx=0;iIdx < arg_BuffNum;iIdx++){aMiddle[iIdx]=new Array(2);for(jIdx=0;jIdx < arg_ElementNum;jIdx++){aMiddle[iIdx][jIdx]=new Array(2);var tmpMiddle_Buff=document.createElement("IMG");this.oBody.appendChild(tmpMiddle_Buff);tmpMiddle_Buff.outerHTML=" <img id=\"oMiddle_Buff_0"+iCount+"\" onload=\" "+this.id+"."+"OnLoadBuffImg("+iIdx+")\">";eval("aMiddle["+iIdx+"]["+jIdx+"][0]=oMiddle_Buff_0"+iCount+";");eval("with(aMiddle["+iIdx+"]["+jIdx+"][0]){"+"\n"+" with(style){"+"\n"+" position=\"absolute\";"+"\n"+" left=0;"+"\n"+" width=0;"+"\n"+" height=0;"+"\n"+" zIndex=100;"+"\n"+" visibility=\"visible\";"+"\n"+"}"+"\n"+"}");delete tmpMiddle_Buff;eval("aMiddle["+iIdx+"]["+jIdx+"][1]=false;");iCount++;}}return aMiddle;}function OnLoadBuffImg(arg_BuffNum){if(this.iImgCachedCount==1){this.iImgCachedCount=0;switch(this.iStatus){case "bsLeafLeft" :;case "bsLeafRight" : this.iImgCachedCount=0;return;case "bsShrink" : break;case "bsEnLarge" : break;case "bsReadyDefault" : switch(arg_BuffNum){case 0 : break;case 1 : try{this.oLPMiddleImg.src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo-(0.5 * giLeafDirect),0,0);this.oRPMiddleImg.src=oDecoder2.cdeGetTileName(0,this.iCurrPageNo+(0.5 * giLeafDirect),0,0);}catch(e){}finally{}break;case 2 :;break;}break;}}else{this.iImgCachedCount++;}}function CancelBuffering(){this.iImgCachedCount=0;}function CancelSliceBuffering(){this.SliceLeftImgToBlank(0);this.SliceRightImgToBlank(0);}function Buffering(arg_BuffNum,arg_PageNum,arg_LeftRight){this.aImgBuff[arg_BuffNum][arg_LeftRight][0].src=oDecoder2.cdeGetTileName(0,arg_PageNum,0,0);}function DoBuffering(arg_LR){var iLBufPage=this.iCurrPageNo+(4 * arg_LR)-(0.5 * giLeafDirect);var iRBufPage=this.iCurrPageNo+(4 * arg_LR)+(0.5 * giLeafDirect);if(this.IsLeafBounds(iLBufPage)){this.ID_Buff_Prev_Middle=setTimeout(this.id+"."+"Buffering("+0+","+iLBufPage+","+0+")",this.iBuff_DelayTime);}if(this.IsLeafBounds(iRBufPage)){this.ID_Buff_Prev_Middle=setTimeout(this.id+"."+"Buffering("+0+","+iRBufPage+","+1+")",this.iBuff_DelayTime);}}

