BBwObj={cls:'',bbwskin:'001',menukd:'full',colskd:'',currMenu:'',currPage:0,touchStartTime:0,currTouchSeq:0,menuDiv:undefined,addDiv:undefined,currDiv:undefined,httpScript:'',penColor:'#000000',penThick:1,defColor:'',hlgColor:'#9cff00',hlgThick:10,hlgAlpha:0.7,memobgColor:'#FFE99C',memofntColor:'#000000',memofntFamily:'돋움',memofntSize:'12',memoIdx:0,armemoObj:[],tempPt:[],bbwsData:[],memoData:[],currArea:undefined,downKind:0,tmpWidth:0,tmpHeight:0,areaWidth:0,areaHeight:0};BBwObj.onload_func2=function(){if(BBwObj.menukd==="full"||BBwObj.menukd==="memo"){if(document.getElementById('bbwpencolshow'))BBwObj.penColor=document.getElementById('bbwpencolshow').getAttribute("fill");if(document.getElementById('memobgcolshow'))BBwObj.memobgColor=document.getElementById('memobgcolshow').getAttribute("fill");if(document.getElementById('memofntcolshow'))BBwObj.memofntColor=document.getElementById('memofntcolshow').getAttribute("fill");if(document.getElementById('bbwline1thbtn'))document.getElementById('bbwline1thbtn').setAttribute("class","bbw_btnE001-down");BBwObj.menuDiv=document.getElementById('bbwmenu');}
BBwInfo.applyBBw=true;BBwObj.cls="5"+CataInfo.incview+"D"+BBwObj.bbwskin;BBwObj.do_afterMainFinish();}
BBwObj.do_afterMainFinish=function(){BBwObj.currPage=PageInfo.get_imagePage(PageInfo.currentPage);BBwObj.bbwsData=["",""];BBwObj.memoData=["",""];BBwObj.retrieve_data("all","open");}
BBwObj.after_retdata=function(scaller){var sevt="none";if(scaller==="turn"&&BBwObj.menuDiv&&BBwObj.menuDiv.style.visibility=="visible"&&BBwObj.currMenu!=="")sevt="auto";var memo=BBwObj.memoData[0]+BBwObj.memoData[1];if(memo!=="")BBwObj.show_memoData();var bbws=BBwObj.bbwsData[0]+BBwObj.bbwsData[1];if(bbws!==""||sevt==="auto")load_blackboard(true,sevt);}
BBwObj.prepare_turnover=function(){if(BBwObj.currMenu=="memoplus"){document.getElementById(BBwObj.currMenu+"btn").className=BBwObj.currMenu+"btn"+BBwObj.cls+" bbw_btnE001";BBwObj.currMenu="";}
if(bboardSvg){bboardSvg.prepare_turnover();unload_blackboard();}
else{if(Action.mainState==="blackboard")Action.restoreState();}
BBwObj.store_memoData();var nodes=memoDiv.childNodes;if(nodes.length>0){for(var i=nodes.length-1;i>=0;i--){memoDiv.removeChild(nodes[i]);}}
BBwObj.addDiv=undefined;BBwObj.currDiv=undefined;memoDiv.innerHTML="";BBwObj.armemoObj=[];BBwObj.memoData="";}
BBwObj.finish_turnover=function(){BBwObj.currPage=(BBwInfo.storeWhere==="db")?PageInfo.currentPage:PageInfo.get_imagePage(PageInfo.currentPage);BBwObj.bbwsData=["",""];BBwObj.memoData=["",""];BBwObj.retrieve_data("all","turn");}
BBwObj.onresize_func=function(){if(BBwObj.menuDiv.style.visibility=="visible")BBwObj.loc_bbwmenu();var obj,sid,divid,rx,ry;for(var i=0;i "+BBwObj.get_memoFirstLine(obj.cont)+"
":"onmousedown=\"BBwObj.memoTitleDown(event,'"+sid+"s');\">";s+="" +"
" +"";memoDiv.insertAdjacentHTML('beforeend',s);BBwObj.addDiv=document.getElementById(sid+"s");BBwObj.memoIdx++;} BBwObj.memoclosebtnClick=function(idx,ds){BBwObj.currDiv=document.getElementById(ds);if(BBwObj.currDiv.getAttribute("data-mem")=="1"){BBwObj.armemoObj.splice(idx,1);BBwObj.store_memoData();memoDiv.removeChild(BBwObj.currDiv);BBwObj.currDiv=undefined;} else{memoDiv.removeChild(BBwObj.addDiv);BBwObj.addDiv=undefined;} document.getElementById("memoplusbtn").className="memoplusbtn"+BBwObj.cls+" bbw_btnE001";BBwObj.currMenu="";if(Action.mainState==="blackboard")Action.restoreState();} BBwObj.memominbtnClick=function(n,s){var sDiv=document.getElementById(s+"s");var minmax=sDiv.getAttribute("data-minmax");var idx=parseInt(sDiv.getAttribute("data-idx"));if(minmax=="max"){var sval=document.getElementById(s+"t").value;if(sval=="")return;sDiv.className="bbw_memomin"+BBwObj.cls;sDiv.style.background="linear-gradient(to right, "+sDiv.style.backgroundColor+" 210px, #ffc600 30px)";document.getElementById(s+"p").className="bbw_memominp"+BBwObj.cls;document.getElementById(s+"p").innerHTML=BBwObj.get_memoFirstLine(sval);document.getElementById(s+"t").style.display="none";sDiv.setAttribute("data-minmax","min");document.getElementById("memoplusbtn").className="memoplusbtn"+BBwObj.cls+" bbw_btnE001";if(Action.mainState==="blackboard")Action.restoreState();BBwObj.currMenu="";} else{sDiv.className="bbw_memo"+BBwObj.cls;sDiv.style.background=BBwObj.armemoObj[idx].bgcol;document.getElementById(s+"p").className="bbw_memobtn"+BBwObj.cls;document.getElementById(s+"p").innerHTML="";document.getElementById(s+"t").style.display="inline";sDiv.setAttribute("data-minmax","max");}} BBwObj.memominbtnTouch=function(e,n,s){var now=new Date();var atime=now.getTime();var diffTime=atime-BBwObj.touchStartTime;if(diffTime<=300){e.preventDefault();BBwObj.memominbtnClick(n,s);return;} BBwObj.touchStartTime=atime;} BBwObj.memotxtFocus=function(idx,s){Action.keyDownBlock=true;Action.resizeLocking=true;} BBwObj.memotxtBlur=function(idx,s){BBwObj.currDiv=document.getElementById(s+"s");var memin=BBwObj.currDiv.getAttribute("data-mem");var idx=parseInt(BBwObj.currDiv.getAttribute("data-idx"));var sval=document.getElementById(s+"t").value;if(sval==""){if(memin=="0")return;BBwObj.armemoObj.splice(idx,1);memoDiv.removeChild(BBwObj.currDiv);BBwObj.currDiv=undefined;} else{if(memin=="0"){var currtArea=document.getElementById(s+"t");var tcolor=BBwObj.currDiv.style.backgroundColor;if(tcolor.substr(0,1)!=="#")tcolor=BBwObj.memobgColor;var nleft=parseInt(BBwObj.currDiv.style.left.replace("px",""));var ntop=parseInt(BBwObj.currDiv.style.top.replace("px",""));var cwidth=(BBwInfo.loc==="win")?stageWidth:ScreenInfo.smImageWidth;var cheight=(BBwInfo.loc==="win")?stageHeight:ScreenInfo.smImageHeight;var npage=BBwObj.currPage;if(BBwInfo.loc==="smcsync"){if(ScreenInfo.onesmc===false&&nleft>=smRect.centerPt.x){npage=BBwObj.currPage+1;nleft-=smRect.centerPt.x;} else{nleft-=smRect.x;} ntop-=smRect.y;} var obj=new memoObj(npage,nleft,ntop,tcolor,currtArea.style.fontFamily,currtArea.style.fontSize.replace("px",""),currtArea.style.color,cwidth,cheight,sval);BBwObj.armemoObj[idx]=obj;BBwObj.currDiv.setAttribute("data-mem","1");BBwObj.addDiv=undefined;} else{var obj=BBwObj.armemoObj[idx];var nleft=parseInt(BBwObj.currDiv.style.left.replace("px",""));var ntop=parseInt(BBwObj.currDiv.style.top.replace("px",""));if(BBwInfo.loc==="smcsync"){if(obj.npage===BBwObj.currPage&&nleft>smRect.centerPt.x)obj.npage+=1;else if(obj.npage===BBwObj.currPage+1&&nleft