////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   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:32 by tews                                                                                              //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function SkinObj(arg_ParentDiv,arg_id,arg_SkinDir,arg_Misc,arg_cssText,arg_AutoResize){this.id="o"+arg_id;this.AutoResize=arg_AutoResize;this.ParentDiv=arg_ParentDiv;this.SkinDir=arg_SkinDir;this.FileName=arg_id;this.Appendix="";this.bFirst=true;this.CssText=arg_cssText;this.tgTable=null;this.tgTD=null;this.tgImg=null;this.OnMouseOverCmn=OnMouseOverCmn;this.OnMouseOutCmn=OnMouseOutCmn;this.OnMouseOverSkinImg=OnMouseOverSkinImg;this.OnMouseOutSkinImg=OnMouseOutSkinImg;this.OnMouseDownSkinImg=OnMouseDownSkinImg;this.OnMouseUpSkinImg=OnMouseUpSkinImg;this.OnLoadSkinImg=OnLoadSkinImg;this.SetSkinObjDefault=SetSkinObjDefault;this.SetAppendix=SetAppendix;var tmpTable=document.createElement("Table");this.ParentDiv.appendChild(tmpTable);tmpTable.outerHTML="<table style=\"position:relative;\" id=\""+"tg"+this.FileName+"Table"+"\" "+arg_Misc+" lefmargin=\"0\" topmargin=\"0\" cellspacing=\"0\" cellpadding=\"0\" > "+"\n"+" <tr> "+"\n"+" <td align=\"center\" valign=\"middle\"> "+"\n"+" </td> "+"\n"+" </tr> "+"\n"+"</table> ";delete tmpTable;eval("var tmptgTable="+"tg"+this.FileName+"Table;");this.tgTable=tmptgTable;this.tgTable.style.cssText=this.CssText;var sEventHandler="";switch(arg_AutoResize){case "arWidth" : case "arHeight" : sEventHandler=" onmouseover=\""+this.id+".OnMouseOverCmn("+this.id+")\""+" onmouseout=\""+this.id+".OnMouseOutCmn("+this.id+")\""+" onmousedown=\""+this.id+".OnMouseDownSkinImg()\""+" onmouseup=\""+this.id+".OnMouseUpSkinImg()\"";break;case "arBG" : break;case "arToolTip" : break;case "arCursor" : break;default : sEventHandler=" onmouseover=\""+this.id+".OnMouseOverSkinImg()\""+" onmouseout=\""+this.id+".OnMouseOutSkinImg()\""+" onmousedown=\""+this.id+".OnMouseDownSkinImg()\""+" onmouseup=\""+this.id+".OnMouseUpSkinImg()\"";break;}var tmpImg=document.createElement("IMG");this.tgTable.rows(0).cells(0).appendChild(tmpImg);tmpImg.outerHTML=" <img id=\""+"tg"+this.FileName+"Img"+"\""+sEventHandler+"style=\"position:relative;\""+" onload=\""+"OnLoadSkinImg("+"tg"+this.FileName+"Table"+","+"tg"+this.FileName+"Img"+",'"+arg_AutoResize+"')\""+" >";eval("var tmptgImg="+"tg"+this.FileName+"Img;");this.tgImg=tmptgImg;delete tmptgImg;this.SetSkinObjDefault();}function OnLoadSkinImg(arg_Table,arg_Img,arg_AutoResize){if(this.bFirst){return;}switch(arg_AutoResize){case "arWidth" : arg_Table.style.width=arg_Img.width;break;case "arHeight" : arg_Table.style.height=arg_Img.height;break;case "arAll" : arg_Table.style.width=arg_Img.width;arg_Table.style.height=arg_Img.height;break;case "arToolTip" : arg_Table.style.width=arg_Img.width;arg_Table.style.height=arg_Img.height;break;case "arCursor" : arg_Table.style.width=arg_Img.width;arg_Table.style.height=arg_Img.height;break;case "arNone" : break;case "arBG" : arg_Table.style.width=arg_Img.width;arg_Table.style.background="url("+arg_Img.src+")";break;}}function SetSkinObjDefault(){this.bFirst=false;this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseOut.gif";}function SetAppendix(arg_Appendix){this.Appendix=arg_Appendix;}function OnMouseOverCmn(arg_Obj){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseOver.gif";MgrMouse.OnMouseOverScroll(arg_Obj);}function OnMouseOutCmn(arg_Obj){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseOut.gif";MgrMouse.OnMouseOutScroll(arg_Obj);}function OnMouseOverSkinImg(){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseOver.gif";}function OnMouseOutSkinImg(){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseOut.gif";}function OnMouseDownSkinImg(){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseDown.gif";}function OnMouseUpSkinImg(){this.tgImg.src=this.SkinDir+this.FileName+this.Appendix+"MouseUp.gif";}function MgrSkin(arg_BookBaseDiv,arg_BasicLevelDiv,arg_LevelBaseDiv,arg_SkinDir){this.id="MgrSkin";this.oBookBaseDiv=arg_BookBaseDiv;this.oBasicLevelDiv=arg_BasicLevelDiv;this.oLevelBaseDiv=arg_LevelBaseDiv;this.SkinDir=arg_SkinDir;this.oBookInfo=oBookInfo;this.ID_Scroll=null;this.iScrollSize=20;this.iScrollDelay=60;this.oLScroll;this.oTScroll;this.oRScroll;this.oBScroll;this.oDivisionLeft=null;this.oDivisionRight=null;this.oToolTipDiv=null;this.oMouseDiv=null;this.DoScrollLeft=DoScrollLeft;this.DoScrollTop=DoScrollTop;this.DoScrollRight=DoScrollRight;this.DoScrollBottom=DoScrollBottom;this.ShowHideScrollBar=ShowHideScrollBar;this.HideScrollBar=HideScrollBar;this.InitSkin=InitSkin;this.InitSkin();}function DoScrollLeft(){MgrLevel.DoContinueMoveLevelLeft();}function DoScrollTop(){MgrLevel.DoContinueMoveLevelTop();}function DoScrollRight(){MgrLevel.DoContinueMoveLevelRight();}function DoScrollBottom(){MgrLevel.DoContinueMoveLevelBottom();}function ShowHideScrollBar(arg_LevelDiv){var iLeft=parseInt(arg_LevelDiv.style.left);var iTop=parseInt(arg_LevelDiv.style.top);var iWidth=parseInt(arg_LevelDiv.style.width)+parseInt(arg_LevelDiv.style.left);var iHeight=parseInt(arg_LevelDiv.style.height)+parseInt(arg_LevelDiv.style.top);if(MgrLevel.ItemIndex==0){HideObj(this.oLScroll.tgTable);HideObj(this.oTScroll.tgTable);HideObj(this.oRScroll.tgTable);HideObj(this.oBScroll.tgTable);return;};if(iLeft < 0){ShowObj(this.oLScroll.tgTable);}else{HideObj(this.oLScroll.tgTable);}if(iTop < 0){ShowObj(this.oTScroll.tgTable);}else{HideObj(this.oTScroll.tgTable);}if(iWidth > parseInt(this.oLevelBaseDiv.style.width)){ShowObj(this.oRScroll.tgTable);}else{HideObj(this.oRScroll.tgTable);}if(iHeight> parseInt(this.oLevelBaseDiv.style.height)){ShowObj(this.oBScroll.tgTable);}else{HideObj(this.oBScroll.tgTable);}}function HideScrollBar(){HideObj(this.oLScroll.tgTable);HideObj(this.oTScroll.tgTable);HideObj(this.oRScroll.tgTable);HideObj(this.oBScroll.tgTable);}function CmnMouseOverScroll(arg_Obj){arg_Obj.tgImg.src=arg_Obj.SkinDir+arg_Obj.FileName+arg_Obj.Appendix+"MouseOver.gif";MgrMouse.OnMouseOverScroll(oLScroll);}function InitSkin(){var tmpHeight=parseInt(this.oBookBaseDiv.style.height);var sToolTip=GetRes("ScrollLeft",gaRes_Core);var tmpCssText="z-index:50;filter:alpha(opacity=60);visibility:hidden;position:absolute;left:0;height:100%;";var tmpMisc=" title=\""+sToolTip+"\""+"\n";oLScroll=new SkinObj(this.oLevelBaseDiv,"LScroll",this.SkinDir,tmpMisc,tmpCssText,"arWidth");this.oLScroll=oLScroll;this.oLScroll.tgImg.style.left=0;var sToolTip=GetRes("ScrollRight",gaRes_Core);var tmpCssText="z-index:50;filter:alpha(opacity=60);visibility:hidden;position:absolute;right:0;height:100%;";var tmpMisc=" title=\""+sToolTip+"\""+"\n";oRScroll=new SkinObj(this.oLevelBaseDiv,"RScroll",this.SkinDir,tmpMisc,tmpCssText,"arWidth");this.oRScroll=oRScroll;this.oRScroll.tgImg.style.right=0;var sToolTip=GetRes("ScrollTop",gaRes_Core);var tmpCssText="z-index:50;filter:alpha(opacity=60);visibility:hidden;text-align:center;position:absolute;left:0;top:0;width:100%;";var tmpMisc=" title=\""+sToolTip+"\""+"\n";oTScroll=new SkinObj(this.oLevelBaseDiv,"TScroll",this.SkinDir,tmpMisc,tmpCssText,"arHeight");this.oTScroll=oTScroll;var sToolTip=GetRes("ScrollBottom",gaRes_Core);var tmpCssText="z-index:50;filter:alpha(opacity=60);visibility:hidden;text-align:center;position:absolute;left:0;bottom:0;width:100%;";var tmpMisc=" title=\""+sToolTip+"\""+"\n";oBScroll=new SkinObj(this.oLevelBaseDiv,"BScroll",this.SkinDir,tmpMisc,tmpCssText,"arHeight");this.oBScroll=oBScroll;var stmp="RightPage()";var sToolTip="";switch(giLeafDirect){case-1 : sToolTip=GetRes("NextPage",gaRes_Core);break;case 1 : sToolTip=GetRes("PrevPage",gaRes_Core);break;}var tmpCssText="position:absolute;z-index:6000;left:"+iBorder_L_Bg_Width+";bottom:"+iBorder_B_Bg_Height+";overflow:hidden;cursor:hand;";var tmpMisc=" title=\""+sToolTip+"\" onmousedown=\""+"oBook."+stmp+"\"";oLeafLeft=new SkinObj(this.oBasicLevelDiv,"LeafLeft",this.SkinDir,tmpMisc,tmpCssText,"arAll");this.oLeafLeft=oLeafLeft;this.oLeafLeft.tgTable.tabindex=-1;this.oLeafLeft.tgImg.style.left=0;var stmp="LeftPage()";var sToolTip="";switch(giLeafDirect){case-1 : sToolTip=GetRes("PrevPage",gaRes_Core);break;case 1 : sToolTip=GetRes("NextPage",gaRes_Core);break;}var tmpCssText="position:absolute;z-index:6000;right:"+iBorder_R_Bg_Width+";bottom:"+iBorder_B_Bg_Height+";overflow:hidden;cursor:hand;";var tmpMisc=" title=\""+sToolTip+"\" onmousedown=\" "+"oBook."+stmp+"\"";oLeafRight=new SkinObj(this.oBasicLevelDiv,"LeafRight",this.SkinDir,tmpMisc,tmpCssText,"arAll");this.oLeafRight=oLeafRight;this.oLeafRight.tgTable.tabindex=1;this.oLeafRight.tgImg.style.left=0;var tmpCssText="position:absolute;top:0;z-index:15;filter:alpha(Opacity=0,FinishOpacity=30,Style=1,StartX=0,FinishX=70,StartY=400,FinishY=400);"+"height:"+parseInt(this.oBasicLevelDiv.style.height)+";"+"right:"+parseInt(this.oBasicLevelDiv.style.width)/ 2+";";var tmpMisc="";oDivisionLeft=new SkinObj(this.oBasicLevelDiv,"DivisionLeft",this.SkinDir,tmpMisc,tmpCssText,"arBG");this.oDivisionLeft=oDivisionLeft;this.oDivisionLeft.tgImg.style.left=0;var tmpCssText="position:absolute;top:0;z-index:15;filter:alpha(Opacity=0,FinishOpacity=100,Style=1,StartX=80,FinishX=0,StartY=400,FinishY=400);"+"height:"+parseInt(this.oBasicLevelDiv.style.height)+";"+"left:"+parseInt(this.oBasicLevelDiv.style.width)/ 2+";";var tmpMisc="";oDivisionRight=new SkinObj(this.oBasicLevelDiv,"DivisionRight",this.SkinDir,tmpMisc,tmpCssText,"arBG");this.oDivisionRight=oDivisionRight;this.oDivisionRight.tgImg.style.left=0;var tmpCssText="position:absolute;z-index:600;left:0;bottom:0;overflow:hidden;cursor:hand;";var tmpMisc="";oToolTipDiv=new SkinObj(this.oLevelBaseDiv,"ToolTip",this.SkinDir,tmpMisc,tmpCssText,"arToolTip");this.oToolTipDiv=oToolTipDiv;this.oToolTipDiv.tgTable.style.width=0;this.oToolTipDiv.tgTable.style.height=0;this.oToolTipDiv.tgImg.style.left=0;var tmpCssText="position:absolute;z-index:1000;left:0;bottom:0;overflow:hidden;";var tmpMisc="";oCursorDiv=new SkinObj(this.oBookBaseDiv,"Cursor",this.SkinDir,tmpMisc,tmpCssText,"arCursor");this.oCursorDiv=oCursorDiv;this.oCursorDiv.tgImg.src=gsSkinDir+gcBlankImgFileName;this.oCursorDiv.tgTable.style.width=0;this.oCursorDiv.tgTable.style.height=0;this.oCursorDiv.tgImg.style.left=0;}

