////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   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:58:08 by tews                                                                                              //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function Controller2(){this.id="oController2";this.iLR_Page=0;this.cOnShowContents=cOnShowContents;this.cOnWriteRCMail=cOnWriteRCMail;this.cOnScrollLeftThumbnail=cOnScrollLeftThumbnail;this.cOnScrollRightThumbnail=cOnScrollRightThumbnail;this.cOnMaximize=cOnMaximize;this.cOnRestore=cOnRestore;this.cOnMinimize=cOnMinimize;this.cOnAddBookMark=cOnAddBookMark;this.cOnShowBookMark=cOnShowBookMark;this.cOnPrint=cOnPrint;this.cOnRefresh=cOnRefresh;this.cOnClose=cOnClose;this.cOnGotoPage=cOnGotoPage;this.cOnFirstPage=cOnFirstPage;this.cOnRightPage=cOnRightPage;this.cOnLeftPage=cOnLeftPage;this.cOnLastPage=cOnLastPage;this.cOnAddTabBM=cOnAddTabBM;this.ccoAfterEnLarge=ccoAfterEnLarge;this.ccoAfterShrink=ccoAfterShrink;this.ccoDoEnLarge=ccoDoEnLarge;this.ccoDoShrink=ccoDoShrink;this.ccoDoLeaf=ccoDoLeaf;this.ccoDoLinkClick=ccoDoLinkClick;this.ccoDoScroll=ccoDoScroll;this.ccoInvalidPage=ccoInvalidPage;this.ccoToggle=ccoToggle;this.ccoToggleRestore=ccoToggleRestore;
 this.ccoShowScrap             = ccoShowScrap            ;
 
 }
 function ccoAfterEnLarge(arg_Page,arg_LR,arg_Level,arg_Byte,arg_X,arg_Y){
   //»ó´Ü¿¡ ÀÌºÎºÐ »ðÀÔ//////////
		try{
		var zoomPage = arg_Page;
		zoomInPageCRM(zoomPage);
		}catch(e){}
		/////////////////////////////
   
   if(!gbAllLoaded){return false;}var iPageNo=arg_Page;if(Math.floor(arg_Page)!=arg_Page){iPageNo=Math.floor(arg_Page);}if(typeof(oPageStatus2)!="undefined"){oPageStatus2.dpsSetPageNo(iPageNo);}if(typeof(oBookMark2)!="undefined"){oBookMark2.dbmSetPageNo(iPageNo);}if(typeof(oThumbNail2)!="undefined"){oThumbNail2.dthSetPageNo(iPageNo);}if(typeof(oStatistics2)!="undefined"){this.iLR_Page=arg_LR;if(oBook.cobIsDouble()==true){iPageNo=arg_LR * 0.5;}oStatistics2.dstSetPageView(iPageNo,arg_Level,arg_Byte);}if(typeof(oMiniMap2)!="undefined"){oMiniMap2.dmiDoShow();oMiniMap2.dmiDoRescale(arg_Page,arg_Level,arg_X,arg_Y);}}
   
   function ccoAfterShrink(arg_Page,arg_LR,arg_Level,arg_Byte,arg_X,arg_Y){
     //»ó´Ü¿¡ ÀÌºÎºÐ »ðÀÔ//////////
		try{
		var zoomPage = arg_Page;
		zoomOutPageCRM(zoomPage);
		}catch(e){}
		///////////////////////////////

     if(!gbAllLoaded){return false;}var itmpPageNo=0;var iPageNo=Math.floor(arg_Page);if((arg_Level==0)&&(arg_LR==1)){var iPageNo=Math.floor(arg_Page)-1;}if(typeof(oPageStatus2)!="undefined"){oPageStatus2.dpsSetPageNo(iPageNo);}if(typeof(oBookMark2)!="undefined"){oBookMark2.dbmSetPageNo(iPageNo);}if(typeof(oThumbNail2)!="undefined"){oThumbNail2.dthSetPageNo(iPageNo);}if(typeof(oStatistics2)!="undefined"){this.iLR_Page=arg_LR;if(oBook.cobIsDouble()==true){itmpPageNo=-(arg_LR * 0.5);}if(oBook.cobGetCurrLevelIdx()==0){itmpPageNo=0.5;}oStatistics2.dstSetPageView(iPageNo+itmpPageNo,arg_Level,arg_Byte);}if(typeof(oMiniMap2)!="undefined"){if(arg_Level==0){this.iLR_Page=0;oMiniMap2.dmiDoHide();}oMiniMap2.dmiDoRescale(arg_Page,arg_Level,arg_X,arg_Y);}}function ccoDoEnLarge(arg_LR){oBook.cobDoEnLarge(arg_LR);}function ccoDoShrink(){oBook.cobDoShrink();}
     
     function ccoDoLeaf(arg_Page,arg_Level,arg_Byte,arg_X,arg_Y){
       //»ó´Ü¿¡ ÀÌºÎºÐ »ðÀÔ//////////
		try{
		nextPageCRM();
		}catch(e){}
		//////////////////////////////

       if(!gbAllLoaded){return false;}this.iLR_Page=0;var iPageNo=Math.floor(oBook.cobGetCurrPage());if(typeof(oPageStatus2)!="undefined"){oPageStatus2.dpsSetPageNo(iPageNo);}if(typeof(oBookMark2)!="undefined"){oBookMark2.dbmSetPageNo(iPageNo);}if(typeof(oThumbNail2)!="undefined"){oThumbNail2.dthSetPageNo(iPageNo);}if(typeof(oStatistics2)!="undefined"){oStatistics2.dstSetPageView(arg_Page,0,arg_Byte);}if(typeof(oLLPageNo)!="undefined"){oLLPageNo.dpnSetPageNo(arg_Page-(0.5 * giLeafDirect));}if(typeof(oLRPageNo)!="undefined"){oLRPageNo.dpnSetPageNo(arg_Page+(0.5 * giLeafDirect));}if(typeof(oTabBookMark2)!="undefined"){oTabBookMark2.dtbUpdate();}}function ccoDoLinkClick(arg_Page,arg_LinkInfo,arg_Level){if(!gbAllLoaded){return false;}if(typeof(oStatistics2)!="undefined"){oStatistics2.dstSetLinkClick(arg_Page,arg_LinkInfo,arg_Level);}}function ccoDoScroll(arg_Left,arg_Top){if(!gbAllLoaded){return false;}if(typeof(oMiniMap2)!="undefined"){oMiniMap2.dmiDoScroll(arg_Left,arg_Top);}}function cOnShowContents(){if(!gbAllLoaded){return false;}}function cOnMaximize(){if(!gbAllLoaded){return false;}if(typeof(oMinMax2)!="undefined"){oMinMax2.dmmDoMaximize();}oBook.OnResize();}function cOnRestore(){if(!gbAllLoaded){return false;}if(typeof(oMinMax2)!="undefined"){oMinMax2.dmmDoRestore();}oBook.OnResize();}function cOnMinimize(){if(!gbAllLoaded){return false;}if(typeof(oMinMax2)!="undefined"){oMinMax2.dmmDoMinimize();}}function cOnAddBookMark(arg_LR){if(!gbAllLoaded){return false;}if(typeof(oBookMark2)!="undefined"){oBookMark2.dbmDoAdd(oBook.cobGetCurrPage(),arg_LR);}}function cOnShowBookMark(){if(!gbAllLoaded){return false;}}function cOnPrint(){if(!gbAllLoaded){return false;}var iCurrPageNo=oBook.cobGetCurrPage();var iCurrLevel=oBook.cobGetCurrLevelIdx();if(typeof(oPrinter2)!="undefined"){oPrinter2.dprDoPrint(iCurrPageNo,iCurrLevel);}if(typeof(oStatistics2)!="undefined"){oStatistics2.dstSetPrint(iCurrPageNo,iCurrLevel);}}function cOnClose(){if(!gbAllLoaded){return false;}window.close();}function cOnRefresh(){if(!gbAllLoaded){return false;}if(typeof(oStatistics2)!="undefined"){var iCurrPageNo=oBook.cobGetCurrPage();var iCurrLevel=oBook.cobGetCurrLevelIdx();oStatistics2.dstSetPageView(iCurrPageNo+(this.iLR_Page * 0.5),iCurrLevel,80000);oStatistics2.dstDoSubmit();}}function cOnWriteRCMail(){if(!gbAllLoaded){return false;}if(typeof(oRCMail2)!="undefined"){oRCMail2.drmDoWriteRCMail();}}function cOnScrollLeftThumbnail(){if(!gbAllLoaded){return false;}if(typeof(oThumbnail2)!="undefined"){oThumbnail2.dthDoScrollLeft();}}function cOnScrollRightThumbnail(){if(!gbAllLoaded){return false;}if(typeof(oThumbnail2)!="undefined"){oThumbnail2.dthDoScrollRight();}}function cOnGotoPage(arg_Page){if(!gbAllLoaded){return false;}if(String(event)=="null"){oBook.GotoPage(arg_Page);}else{if(event.keyCode !=0){if(event.keyCode==13){oBook.GotoPage(arg_Page);}}else{oBook.GotoPage(arg_Page);}}}function cOnFirstPage(){if(!gbAllLoaded){return false;}oBook.LLeftPage();}function cOnRightPage(){if(!gbAllLoaded){return false;}oBook.RightPage();}function cOnLeftPage(){if(!gbAllLoaded){return false;}oBook.LeftPage();}function cOnLastPage(){if(!gbAllLoaded){return false;}oBook.RRightPage();}function ccoInvalidPage(arg_Page){if(!gbAllLoaded){return false;}if(typeof(oPageStatus2)!="undefined"){oPageStatus2.dpsInvalidPage(arg_Page);}}function ccoToggle(arg_Page){if(!gbAllLoaded){return false;}if(typeof(oTabBookMark2)!="undefined"){oTabBookMark2.dtbToggle(arg_Page);}}function ccoToggleRestore(){if(typeof(oMinMax2)!="undefined"){if(oMinMax2.dmnIsRestore()){this.cOnRestore();}else{this.cOnMaximize();}}}function cOnAddTabBM(arg_LR){if(!gbAllLoaded){return false;}var iCurrPageNo=oBook.cobGetCurrPage();if(typeof(oTabBookMark2)!="undefined"){oTabBookMark2.dTabDoAdd(iCurrPageNo,arg_LR);}}
  
  function ccoShowScrap () {
    if ( typeof (oScrap2)  != "undefined" ) {  oScrap2.dscShowScrap();}
  }
 
 

