var smpu=new Array();
var smpd=new Array();
var smpe=new Array();
var smp00;
var smp01;
var smpY;
var smpZ;
var smpE;
var smpEX;
var smpEY;
var smpEZ;
var iMsw;
var iMsh;
var iMsEw;
var iMsEh;
var iSMDx;
var iSMDlx;
var iSMDex;
var iSMDy;
var iSMDly;
var iSMDey;
var iMFNum=0;
var iFMx=0;
var iFMy=0;
var iFMr=9;
var iFMEx=0;
var iFMEy=0;
var iFMEr=7;
var iFMZr=9;
var iOTFunction=0;
var iOv=new Array();
var oTimerTmp1;
var oTimerTmp2;
var oPlcrd=new Array();
var iPlcrd=new Array();
var iPlcrdX=new Array();
var iPlcrdY=new Array();
var oSlabel=new Array();
var oPlcrdIfno1;
var oPlcrdIfno2;
var iPlcrdIfno2;
var oCanvas;
var oCtx;
var oPolyLine=new Array();
var iPolyLine=new Array();
var sms_map_m_over;
var iMapViewW=-1;
var iMapViewH=-1;
var iPLAY_POLY_LINE_SPEED=1;
var smc00a;
var smc00b;
var smc01;
var smc02;
var smc03;
var smc04;
var smc05;
var smc06;
var smc07;
var smc08;
var smc09;
var smc10=new Array();
var smc11;
var smc12=new Array();
var smc13;
var CBClickEvent;
var CBRClickEvent;
var CBDBClickEvent;
var CBPlacardClickEvent;
var CBGetCursorXY;
var CBFlashMap;
var CBMapMove;
var CBPlacardK3Open;
setInterval("OnTimer()",10);
function GWMapViewInfo(){
this.iLayer=0;
this.iScale=0;
this.iRTx=0;
this.iRTy=0;
this.iLBx=0;
this.iLBy=0;
}
function GWMapIcon(_1,iw,ih,_4,_5){
this.soUrl=_1;
this.iow=iw;
this.ioh=ih;
this.iopx=_4;
this.iopy=_5;
}
function GWPolyLine(_6,_7,_8,_9){
this.StPoint=_6;
this.LtPoint=_6;
this.iLineWidth=_7;
this.sColor=_8;
this.AddPoint=OAddPoint;
if(typeof (_9)=="undefined"){
this.iType=0;
}else{
this.iType=_9;
}
function OAddPoint(_a){
_a.oPrePoint=this.LtPoint;
this.LtPoint.oNextPoint=_a;
this.LtPoint=_a;
}
}
function GWPoint(_b,_c,_d,_e){
this.iX=_b;
this.iY=_c;
this.iSize=_d;
this.sColor=_e;
this.oPrePoint;
this.oNextPoint;
}
var PLCRD_STATUS=new Array();
var oGPlcrd=new Array();
function GWPlcrd(_f,_10,_11,_12,ix,iy,_15,_16,_17,_18){
this.iStatus=0;
this.iKind=_f;
this.oIcon01=_10;
this.oIcon02=_11;
this.bCanClick=_12;
this.iLx=ix;
this.iLy=iy;
this.iLStr01=_15;
this.iLStr02=_16;
this.sVid=_17;
this.sTag=_18;
}
function GWMap(mp){
var _1a;
var _1b;
this.ShowDebugInfo=OShowDebugInfo;
this.ShowCrossPoint=OShowCrossPoint;
this.ShowScale=OShowScale;
this.ShowLayerControl=OShowLayerControl;
this.SselectMapLayer=OSselectMapLayer;
this.SetMapStartRXY=OSetMapStartRXY;
this.MoveToRXY=OMoveToRXY;
this.GetPlacardInfo=OGetPlacardInfo;
this.AddPlacard=OAddPlacard;
this.RemovePlacard=ORemovePlacard;
this.RemoveAllPlacard=ORemoveAllPlacard;
this.ReflashPlacard=OReflashPlacard;
this.AddPolyLine=OAddPolyLine;
this.RemovePolyLine=ORemovePolyLine;
this.RemoveAllPolyLine=ORemoveAllPolyLine;
this.ReflashPolyLine=OReflashPolyLine;
this.PlayPolyLine=OPlayPolyLine;
this.SetCBFunction=OSetCBFunction;
this.GetMapStatus=OGetMapStatus;
this.SetMapStatus=OSetMapStatus;
this.GetMapViewInfo=OGetMapViewInfo;
this.SetPlayPLSpeed=OSetPlayPLSpeed;
this.ClosePlacardK3=OClosePlacardK3;
this.ShowEagleEyeMap=OShowEagleEyeMap;
smp00=mp;
mp.style.overflow="hidden";
if(!mp.style.position){
mp.style.position="relative";
}
mp.style.MozUserSelect="none";
mp.unselectable="on";
mp.style.backgroundColor="#99B3CC";
smp01=document.createElement("div");
smp01.style.cssText="position:absolute; left:10px; top:10px;width:250px; height:20px;z-index:99;";
smp01.unselectable="on";
mp.appendChild(smp01);
OShowDebugInfo(SHOW_DEBUG_FLAG);
iMapViewW=smp00.clientWidth;
iMapViewH=smp00.clientHeight;
smc00a=document.createElement("img");
smc00a.style.cssText="position:absolute; left:"+((Math.floor(smp00.clientWidth/2)+1)-32)+"px; top:"+(Math.floor(smp00.clientHeight/2)+1)+"px;z-index:88;cursor:pointer;";
smc00a.style.visibility="hidden";
smc00a.src=MG_IMG_BASEURL+"CrossPointA.png";
mp.appendChild(smc00a);
smc00b=document.createElement("img");
smc00b.style.cssText="position:absolute; left:"+(Math.floor(smp00.clientWidth/2)+1)+"px; top:"+((Math.floor(smp00.clientHeight/2)+1)-32)+"px;z-index:88;cursor:pointer;";
smc00b.style.visibility="hidden";
smc00b.src=MG_IMG_BASEURL+"CrossPointB.png";
mp.appendChild(smc00b);
smc01=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic01.png",false);
ObjAttachEvent(smc01,"click",sm01c);
mp.appendChild(smc01);
smc02=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic02.png",false);
ObjAttachEvent(smc02,"click",sm02c);
mp.appendChild(smc02);
smc03=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic03.png",false);
ObjAttachEvent(smc03,"click",sm03c);
mp.appendChild(smc03);
smc04=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic04.png",false);
ObjAttachEvent(smc04,"click",sm04c);
mp.appendChild(smc04);
smc05=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic05.png",false);
ObjAttachEvent(smc05,"click",sm05c);
mp.appendChild(smc05);
smc06=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_M,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic06.png",false);
ObjAttachEvent(smc06,"click",sm10c);
mp.appendChild(smc06);
smc07=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_M,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic07.png",false);
ObjAttachEvent(smc07,"click",sm10c);
mp.appendChild(smc07);
smc08=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic08.png",false);
ObjAttachEvent(smc08,"click",sm08c);
mp.appendChild(smc08);
smc09=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_H,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic09.png",false);
ObjAttachEvent(smc09,"click",sm09c);
mp.appendChild(smc09);
for(_1a=MG_SMP_RLEVEL_MIN+1;_1a<MG_SMP_RLEVEL_MAX;_1a++){
smc10[_1a]=CLoadImageTransform(-100,-100,95,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_M,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic10.png",false);
ObjAttachEvent(smc10[_1a],"click",sm10c);
mp.appendChild(smc10[_1a]);
}
smc11=CLoadImageTransform(-100,-100,96,SCL_DIR_ICON_B*2+SCL_DIR_ICON_W,SCL_DIR_ICON_B*2+SCL_DIR_ICON_M,SCL_DIR_ICON_B,MG_IMG_BASEURL+"ic11.png",false);
ObjAttachEvent(smc11,"mousedown",sm11m);
mp.appendChild(smc11);
OShowScale(SHOW_SCALE_FLAG,SCL_DIR_ICON_X,SCL_DIR_ICON_Y);
for(_1a=0;_1a<LCL_BTN_ICON_N;_1a++){
sms_map_m_over=-1;
smc12[_1a]=document.createElement("div");
ObjAttachEvent(smc12[_1a],"click",sm12c);
ObjAttachEvent(smc12[_1a],"mouseover",sm12mov);
ObjAttachEvent(smc12[_1a],"mouseout",sm12mot);
mp.appendChild(smc12[_1a]);
}
OShowLayerControl(SHOW_LCTRL_FLAG,LCL_BTN_ICON_X,LCL_BTN_ICON_Y);
smc13=CLoadImageTransform(LOGO_LCTN_X,LOGO_LCTN_Y,89,LOGO_LCTN_W,LOGO_LCTN_H,0,MG_IMG_BASEURL+LOGO_LOGO_URL,SHOW_LOGO_FLAG,true,true,true);
mp.appendChild(smc13);
iMsw=Math.floor(mp.clientWidth/MG_SMP_WIDTH)+2;
iMsh=Math.floor(mp.clientHeight/MG_SMP_HEIGHT)+2;
smpZ=document.createElement("div");
smpZ.style.cssText="position:absolute; left:0px; top:0px;width:"+(iMsw*MG_SMP_WIDTH)+"px; height:"+(iMsh*MG_SMP_HEIGHT)+"px;z-index:0;";
mp.appendChild(smpZ);
smpX=document.createElement("div");
smpX.style.cssText="position:absolute; left:0px; top:0px;width:100%; height:100%; cursor:pointer; z-index:85;";
smpX.unselectable="on";
smpX.onclick=smc;
smpX.onmousedown=smd;
smpX.onmouseover=smo;
smpX.ondblclick=smdc;
if(CTRL_MOUSE_SCROLL_FLAG){
ObjAttachEvent2(smpX,"DOMMouseScroll","mousewheel",smw);
}
ObjAttachEvent(document,"mousemove",smm);
ObjAttachEvent(document,"mouseup",smu);
ObjAttachEvent(document,"contextmenu",smrc);
smpX.style.background="url("+MG_IMG_BASEURL+"sapce.png)";
mp.appendChild(smpX);
smpY=document.createElement("div");
smpY.style.cssText="position:absolute; left:0px; top:0px;width:100%; height:100%; cursor:pointer; z-index:98;";
smpY.unselectable="on";
smpY.onclick=smc2;
smpY.style.visibility=CTRL_ALL_ENEVT_FLAG?"hidden":"";
mp.appendChild(smpY);
for(_1a=0;_1a<iMsh;_1a++){
for(_1b=0;_1b<iMsw;_1b++){
smpu[_1a*iMsw+_1b]=document.createElement("div");
smpu[_1a*iMsw+_1b].style.cssText="position:absolute; left:"+(_1b*MG_SMP_WIDTH)+"px; top:"+(_1a*MG_SMP_HEIGHT)+"px; width:"+MG_SMP_WIDTH+"px; height:"+MG_SMP_HEIGHT+"px;z-index:3;";
smpZ.appendChild(smpu[_1a*iMsw+_1b]);
smpd[_1a*iMsw+_1b]=document.createElement("div");
smpd[_1a*iMsw+_1b].style.cssText="position:absolute; left:"+(_1b*MG_SMP_WIDTH)+"px; top:"+(_1a*MG_SMP_HEIGHT)+"px; width:"+MG_SMP_WIDTH+"px; height:"+MG_SMP_HEIGHT+"px;z-index:2;";
smpZ.appendChild(smpd[_1a*iMsw+_1b]);
}
}
for(_1a=0;_1a<MG_PlCRD_MAX;_1a++){
PLCRD_STATUS[_1a]=-1;
}
for(_1a=0;_1a<MG_PlCRD_SHOW_MAX;_1a++){
iPlcrd[_1a]=-1;
oPlcrd[_1a]=document.createElement("div");
oPlcrd[_1a].style.cssText="position:absolute;z-index:31;cursor:pointer;";
oPlcrd[_1a].style.visibility="hidden";
smpZ.appendChild(oPlcrd[_1a]);
oPlcrd[_1a+MG_PlCRD_SHOW_MAX]=document.createElement("div");
oPlcrd[_1a+MG_PlCRD_SHOW_MAX].style.cssText="position:absolute;z-index:30;cursor:pointer;";
oPlcrd[_1a+MG_PlCRD_SHOW_MAX].style.visibility="hidden";
smpZ.appendChild(oPlcrd[_1a+MG_PlCRD_SHOW_MAX]);
}
oPlcrdIfno1=document.createElement("div");
oPlcrdIfno1.style.cssText="position:absolute;z-index:31;cursor:pointer;";
oPlcrdIfno1.style.fontSize="15px";
oPlcrdIfno1.style.visibility="hidden";
oPlcrdIfno1.unselectable="on";
smpZ.appendChild(oPlcrdIfno1);
oPlcrdIfno2=document.createElement("div");
oPlcrdIfno2.style.cssText="position:absolute;z-index:86;";
oPlcrdIfno2.style.visibility="hidden";
oPlcrdIfno2.unselectable="on";
mp.appendChild(oPlcrdIfno2);
oCanvas=document.createElement("canvas");
oCanvas.style.cssText="position:absolute; left:0px; top:0px;z-index:25;";
oCanvas.width=smpZ.clientWidth;
oCanvas.height=smpZ.clientHeight;
oCanvas.style.visibility="hidden";
smpZ.appendChild(oCanvas);
if(typeof G_vmlCanvasManager!="undefined"){
G_vmlCanvasManager.initElement(oCanvas);
oCanvas=smpZ.lastChild;
}
oCtx=oCanvas.getContext("2d");
oCtx.clearRect(0,0,oCanvas.width,oCanvas.height);
ORemoveAllPolyLine();
smpE=document.createElement("div");
smpE.style.visibility="hidden";
smpE.unselectable="on";
mp.appendChild(smpE);
smpEZ=document.createElement("div");
smpE.appendChild(smpEZ);
smpEY=document.createElement("div");
smpEY.unselectable=smp00.unselectable;
smpE.appendChild(smpEY);
smpEX=document.createElement("div");
smpEX.style.cssText="position:absolute; left:0px; top:0px;width:100%; height:100%; cursor:pointer; z-index:85;";
smpEX.unselectable="on";
smpEX.onmousedown=smed;
smpEX.ondblclick=smedc;
if(CTRL_MOUSE_SCROLL_FLAG){
ObjAttachEvent2(smpEX,"DOMMouseScroll","mousewheel",smw);
}
smpEX.style.background="url("+MG_IMG_BASEURL+"sapce.png)";
smpE.appendChild(smpEX);
OShowEagleEyeMap(MG_EGL_EYE_SH,MG_EGL_EYE_LC,MG_EGL_EYE_MW,MG_EGL_EYE_MH,MG_EGL_EYE_DR);
OSetMapStartRXY(SMS_MAP_X,SMS_MAP_Y,SMS_MAP_R);
function OShowDebugInfo(bTF){
if(bTF==true){
SHOW_DEBUG_FLAG=true;
smp01.style.visibility="";
}else{
SHOW_DEBUG_FLAG=false;
smp01.style.visibility="hidden";
}
}
function OShowCrossPoint(bTF){
smc00a.style.visibility=bTF?"":"hidden";
smc00b.style.visibility=bTF?"":"hidden";
}
function ObjAttachEvent(_1e,_1f,_20){
if(_1e.addEventListener){
_1e.addEventListener(_1f,_20,false);
}else{
if(_1e.attachEvent){
_1e.attachEvent("on"+_1f,_20);
}else{
_1e["on"+_1f]=_20;
}
}
}
function ObjAttachEvent2(_21,_22,_23,_24){
if(_21.addEventListener){
_21.addEventListener(_22,_24,false);
}else{
if(_21.attachEvent){
_21.attachEvent("on"+_23,_24);
}else{
_21["on"+_23]=_24;
}
}
}
function OSetCBFunction(_25,_26){
switch(_25){
case "ClickEvent":
CBClickEvent=_26;
break;
case "RClickEvent":
CBRClickEvent=_26;
break;
case "DBClickEvent":
CBDBClickEvent=_26;
break;
case "PlacardClickEvent":
CBPlacardClickEvent=_26;
break;
case "GetCursorXY":
CBGetCursorXY=_26;
break;
case "FlashMap":
CBFlashMap=_26;
break;
case "MapMove":
CBMapMove=_26;
break;
case "PlacardK3Open":
CBPlacardK3Open=_26;
break;
default:
}
}
function OGetMapStatus(_27){
var _28;
if(typeof (_27)!="string"){
_27="0000000000000000000000000";
}else{
_27=_27+"0000000000000000000000000";
}
_28="MapX;"+GetCenterHX()+";";
_28=_28+"MapY;"+GetCenterHY()+";";
_28=_28+"MapR;"+iFMr+";";
_28=_28+"MapL;"+SMS_MAP_L+";";
if(_27.substr(0,1)=="1"){
_28=_28+"SCLF;"+SHOW_SCALE_FLAG+";";
_28=_28+"SCLX;"+SCL_DIR_ICON_X+";";
_28=_28+"SCLY;"+SCL_DIR_ICON_Y+";";
}
return escape(_28);
}
function OSetMapStatus(_29){
var _2a;
var _2b=new Array();
var _2c;
if(typeof (_29)!="string"){
return false;
}
try{
_2a=unescape(_29).split(";");
}
catch(err){
return false;
}
for(_2c=0;typeof (_2a[_2c])=="string"&&typeof (_2a[_2c+1])=="string";_2c+=2){
_2b[_2a[_2c]]=_2a[_2c+1];
}
if(typeof (_2b["MapL"])=="string"){
OSselectMapLayer(Math.floor(_2b["MapL"]));
}
if(typeof (_2b["MapX"])=="string"&&typeof (_2b["MapY"])=="string"&&typeof (_2b["MapR"])=="string"){
OMoveToRXY(_2b["MapX"]*1,_2b["MapY"]*1,Math.floor(_2b["MapR"]),false);
}
if(typeof (_2b["SCLF"])=="string"&&typeof (_2b["SCLX"])=="string"&&typeof (_2b["SCLY"])=="string"){
OShowScale(_2b["SCLF"]=="true",Math.floor(_2b["SCLX"]),Math.floor(_2b["SCLY"]));
}
}
function OGetMapViewInfo(_2d){
try{
_2d.iLayer=SMS_MAP_L;
_2d.iScale=iFMr;
_2d.iRTx=GetCenterHX(0);
_2d.iRTy=GetCenterHY(0);
_2d.iLBx=GetCenterHX(smp00.clientWidth);
_2d.iLBy=GetCenterHY(smp00.clientWidth);
}
catch(err){
return false;
}
}
function OSetPlayPLSpeed(_2e,_2f){
iPLAY_POLY_LINE_SPEED=_2e;
if(typeof (_2f)!="undefined"){
PLAY_POLY_LINE_TIMER=_2f;
}
}
function OClosePlacardK3(){
if(oPlcrdIfno2.style.visibility==""){
oGPlcrd[iPlcrd[iPlcrdIfno2]].iStatus=0;
oPlcrdIfno2.innerHTML="";
oPlcrdIfno2.style.visibility="hidden";
oPlcrd[iPlcrdIfno2].style.visibility="";
oPlcrd[iPlcrdIfno2+MG_PlCRD_SHOW_MAX].style.visibility="";
}
}
}
function smc(_30){
if(!_30){
_30=window.event;
}
if(CheckPLCRDClick(_30,true)==false){
if(typeof (CBClickEvent)=="function"){
CBClickEvent(GetCenterHX(GetMouseX(_30)-smp00.offsetLeft),GetCenterHY(GetMouseY(_30)-smp00.offsetTop),_30);
}
}
}
function smc2(_31){
if(CTRL_CLICK_STOP_PROGRESS){
OnTimer(true);
}
StopEvent(_31);
}
function smd(_32){
if(!_32){
_32=window.event;
}
if(CheckPLCRDClick(_32,false)==false){
iSMDx=GetMouseX(_32);
iSMDy=GetMouseY(_32);
iSMDlx=GetCenterHX();
iSMDly=GetCenterHY();
iMFNum=1;
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="smd = "+Math.floor(GetCenterHX())+" , "+Math.floor(GetCenterHY());
}
}
function smed(_33){
if(!_33){
_33=window.event;
}
iSMDx=GetMouseX(_33);
iSMDy=GetMouseY(_33);
iSMDlx=GetCenterHX();
iSMDly=GetCenterHY();
iMFNum=3;
}
function smu(){
if(iMFNum==3){
OMoveToRXY(iSMDex,iSMDey,iFMr,true);
}
iMFNum=0;
}
function smrc(_34){
if(!_34){
_34=window.event;
}
if(GetMouseX(_34)>=smp00.offsetLeft&&GetMouseX(_34)<=smp00.offsetLeft+smp00.clientWidth&&GetMouseY(_34)>=smp00.offsetTop&&GetMouseY(_34)<=smp00.offsetHeight+smp00.clientHeight){
if(smpY.style.visibility==""){
smc2(_34);
}else{
if(typeof (CBRClickEvent)=="function"){
CBRClickEvent(GetCenterHX(GetMouseX(_34)-smp00.offsetLeft),GetCenterHY(GetMouseY(_34)-smp00.offsetTop),_34);
}
}
StopEvent(_34);
return false;
}
}
function smm(_35){
var ix,iy;
if(!_35){
_35=window.event;
}
ix=GetMouseX(_35);
iy=GetMouseY(_35);
switch(iMFNum){
case 1:
smm01(_35,ix,iy);
break;
case 2:
sm10c(_35);
if(isNaN(_35.which)&&_35.button!=MOUSE_BTN_LEFT){
smu();
}
break;
case 3:
smm03(_35,ix,iy);
break;
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="smm = "+Math.floor(GetCenterHX())+" , "+Math.floor(GetCenterHY());
}
if(GetMouseX(_35)>=smp00.offsetLeft&&GetMouseX(_35)<=smp00.offsetLeft+smp00.clientWidth&&GetMouseY(_35)>=smp00.offsetTop&&GetMouseY(_35)<=smp00.offsetTop+smp00.clientHeight){
if(typeof (CBGetCursorXY)=="function"){
CBGetCursorXY(GetCenterHX(GetMouseX(_35)-smp00.offsetLeft),GetCenterHY(GetMouseY(_35)-smp00.offsetTop),_35);
}
}
}
function smm01(_38,ix,iy){
OMoveToRXY(iSMDlx+GetCenterHX(iSMDx)-GetCenterHX(ix),iSMDly+GetCenterHY(iSMDy)-GetCenterHY(iy),iFMr,false);
if(typeof (CBMapMove)=="function"){
CBMapMove(iFMr,GetCenterHX(0),GetCenterHY(0),GetCenterHX(smp00.clientWidth),GetCenterHY(smp00.clientWidth));
}
if(isNaN(_38.which)&&_38.button!=MOUSE_BTN_LEFT){
smu();
}
StopEvent(_38);
}
function smm03(_3b,ix,iy){
iSMDex=iSMDlx+(GetCenterHX(iSMDx)-GetCenterHX(ix))/((MG_MAP_LOCACTION_SW[iFMr]/MG_MAP_LOCACTION_W[iFMr])/(MG_MAP_LOCACTION_SW[iFMEr]/MG_MAP_LOCACTION_W[iFMEr]));
iSMDey=iSMDly+(GetCenterHY(iSMDy)-GetCenterHY(iy))/((MG_MAP_LOCACTION_SH[iFMr]/MG_MAP_LOCACTION_H[iFMr])/(MG_MAP_LOCACTION_SH[iFMEr]/MG_MAP_LOCACTION_H[iFMEr]));
OMoveToRXYE(iSMDex,iSMDey,iFMr,false);
if(isNaN(_3b.which)&&_3b.button!=MOUSE_BTN_LEFT){
smu();
}
StopEvent(_3b);
}
function smo(){
}
function smw(_3e){
var _3f=0;
var _40;
if(!_3e){
_3e=window.event;
}
if(_3e.wheelDelta){
_3f=_3e.wheelDelta/120;
if(window.opera){
_3f=-_3f;
}
}else{
if(_3e.detail){
_3f=-1*_3e.detail/3;
}
}
if(_3f<0){
_40=iFMr+1;
}else{
if(_3f>0){
_40=iFMr-1;
}else{
_40=iFMr;
}
}
if(_40!=iFMr){
OMoveToRXY(GetCenterHX(),GetCenterHY(),_40,false);
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="smw = "+iFMr+" , "+_3f;
}
StopEvent(_3e);
return false;
}
function smdc(_41){
if(!_41){
_41=window.event;
}
if(CheckPLCRDClick(_41,false)==false){
switch(MG_DBCLICK_TYPE){
case 2:
OMoveToRXY(GetCenterHX(GetMouseX(_41)-smp00.offsetLeft),GetCenterHY(GetMouseY(_41)-smp00.offsetTop),iFMr-1,false);
break;
default:
OMoveToRXY(GetCenterHX(GetMouseX(_41)-smp00.offsetLeft),GetCenterHY(GetMouseY(_41)-smp00.offsetTop),iFMr,true);
}
if(typeof (CBDBClickEvent)=="function"){
CBDBClickEvent(GetCenterHX(GetMouseX(_41)-smp00.offsetLeft),GetCenterHY(GetMouseY(_41)-smp00.offsetTop),_41);
}
}
}
function smedc(_42){
var ix;
var iy;
if(!_42){
_42=window.event;
}
ix=smp00.clientWidth/2-(smpE.clientWidth/2-(GetMouseX(_42)-smp00.offsetLeft-smpE.offsetLeft-2))/((MG_MAP_LOCACTION_SW[iFMr]/MG_MAP_LOCACTION_W[iFMr])/(MG_MAP_LOCACTION_SW[iFMEr]/MG_MAP_LOCACTION_W[iFMEr]));
iy=smp00.clientHeight/2-(smpE.clientHeight/2-(GetMouseY(_42)-smp00.offsetTop-smpE.offsetTop-2))/((MG_MAP_LOCACTION_SH[iFMr]/MG_MAP_LOCACTION_H[iFMr])/(MG_MAP_LOCACTION_SH[iFMEr]/MG_MAP_LOCACTION_H[iFMEr]));
OMoveToRXY(GetCenterHX(ix),GetCenterHY(iy),iFMr,true);
if(typeof (CBDBClickEvent)=="function"){
CBDBClickEvent(GetCenterHX(ix),GetCenterHY(iy),_42);
}
}
function sm01c(_45){
if(!_45){
_45=window.event;
}
OMoveToRXY(GetCenterHX(),GetCenterHY(smp00.clientHeight/6),iFMr,true);
}
function sm02c(_46){
if(!_46){
_46=window.event;
}
OMoveToRXY(GetCenterHX(),GetCenterHY(smp00.clientHeight*5/6),iFMr,true);
}
function sm03c(_47){
if(!_47){
_47=window.event;
}
OMoveToRXY(GetCenterHX(smp00.clientWidth/6),GetCenterHY(),iFMr,true);
}
function sm04c(_48){
if(!_48){
_48=window.event;
}
OMoveToRXY(GetCenterHX(smp00.clientWidth*5/6),GetCenterHY(),iFMr,true);
}
function sm05c(_49){
if(!_49){
_49=window.event;
}
OMoveToRXY(SMS_MAP_X,SMS_MAP_Y,SMS_MAP_R,true);
}
function sm08c(_4a){
if(!_4a){
_4a=window.event;
}
OMoveToRXY(GetCenterHX(),GetCenterHY(),iFMr-1,false);
}
function sm09c(_4b){
if(!_4b){
_4b=window.event;
}
OMoveToRXY(GetCenterHX(),GetCenterHY(),iFMr+1,false);
}
function sm10c(_4c){
var isy;
if(!_4c){
_4c=window.event;
}
isy=GetMapSCLLvl(_4c);
if(isy!=iFMr){
OMoveToRXY(GetCenterHX(),GetCenterHY(),isy,false);
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="sm10c = "+isy;
}
}
function sm11m(_4e){
iMFNum=2;
}
function sm12c(_4f){
var isy;
var lbx;
if(!_4f){
_4f=window.event;
}
lbx=LCL_BTN_ICON_X>=0?LCL_BTN_ICON_X:smp00.clientWidth+LCL_BTN_ICON_X-((LCL_BTN_ICON_W+LCL_BTN_ICON_B*2+LCL_BTN_ICON_S)*LCL_BTN_ICON_N-LCL_BTN_ICON_S);
isy=GetMouseX(_4f)-smp00.offsetLeft-lbx;
isy=Math.floor(isy/(LCL_BTN_ICON_B*2+LCL_BTN_ICON_W+LCL_BTN_ICON_S));
if(isy!=SMS_MAP_L){
OSselectMapLayer(isy);
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="sm12c = "+isy;
}
}
function sm12mov(_52){
var isy;
var lbx;
if(!_52){
_52=window.event;
}
lbx=LCL_BTN_ICON_X>=0?LCL_BTN_ICON_X:smp00.clientWidth+LCL_BTN_ICON_X-((LCL_BTN_ICON_W+LCL_BTN_ICON_B*2+LCL_BTN_ICON_S)*LCL_BTN_ICON_N-LCL_BTN_ICON_S);
isy=GetMouseX(_52)-smp00.offsetLeft-lbx;
isy=Math.floor(isy/(LCL_BTN_ICON_B*2+LCL_BTN_ICON_W+LCL_BTN_ICON_S));
if(isy!=SMS_MAP_L&&isy!=sms_map_m_over){
LoadImageTransform(smc12[isy],LCL_BTN_ICON_X+(LCL_BTN_ICON_W+LCL_BTN_ICON_B*2+LCL_BTN_ICON_S)*(LCL_BTN_ICON_X>=0?isy:(isy+1-LCL_BTN_ICON_N)),LCL_BTN_ICON_Y,97,LCL_BTN_ICON_W,LCL_BTN_ICON_H,LCL_BTN_ICON_B,MG_IMG_BASEURL+"lcl"+isy+"1.png",true,LCL_BTN_ICON_X<0,true);
sms_map_m_over=isy;
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="sm12mov = "+isy;
}
}
function sm12mot(_55){
if(sms_map_m_over>=0){
if(sms_map_m_over!=SMS_MAP_L){
LoadImageTransform(smc12[sms_map_m_over],LCL_BTN_ICON_X+(LCL_BTN_ICON_W+LCL_BTN_ICON_B*2+LCL_BTN_ICON_S)*(LCL_BTN_ICON_X>=0?sms_map_m_over:(sms_map_m_over+1-LCL_BTN_ICON_N)),LCL_BTN_ICON_Y,97,LCL_BTN_ICON_W,LCL_BTN_ICON_H,LCL_BTN_ICON_B,MG_IMG_BASEURL+"lcl"+sms_map_m_over+"0.png",true,LCL_BTN_ICON_X<0,true);
}
sms_map_m_over=-1;
}
if(SHOW_DEBUG_FLAG){
smp01.innerHTML="sm12mot";
}
}
function CheckPLCRDClick(_56,_57){
var isx;
var isy;
var _5a;
var iRV;
var _5c;
var _5d;
var _5e;
if(!_56){
_56=window.event;
}
isx=GetMouseX(_56)-smp00.offsetLeft-iFMx;
isy=GetMouseY(_56)-smp00.offsetTop-iFMy;
iRV=false;
_5e=false;
_5c=-1;
if(oPlcrdIfno1.style.visibility==""&&isx>=oPlcrdIfno1.offsetLeft&&isx<oPlcrdIfno1.offsetLeft+oPlcrdIfno1.clientWidth&&isy>=oPlcrdIfno1.offsetTop&&isy<oPlcrdIfno1.offsetTop+oPlcrdIfno1.clientHeight){
if(_57){
oPlcrdIfno1.style.visibility="hidden";
_5c=99999999;
_5e=true;
iRV=true;
}else{
return true;
}
}else{
for(_5a=MG_PlCRD_SHOW_MAX-1;_5a>=0;_5a--){
if(iPlcrd[_5a]>=0){
switch(oGPlcrd[iPlcrd[_5a]].iKind){
case 0:
case 1:
case 3:
if(iRV==false&&oGPlcrd[iPlcrd[_5a]].iStatus==0&&isx>=iPlcrdX[_5a]-oGPlcrd[iPlcrd[_5a]].oIcon01.iopx&&isx<iPlcrdX[_5a]-oGPlcrd[iPlcrd[_5a]].oIcon01.iopx+oPlcrd[_5a].clientWidth&&isy>=iPlcrdY[_5a]-oGPlcrd[iPlcrd[_5a]].oIcon01.iopy&&isy<iPlcrdY[_5a]-oGPlcrd[iPlcrd[_5a]].oIcon01.iopy+oPlcrd[_5a].clientHeight){
if(_57){
if(oGPlcrd[iPlcrd[_5a]].iKind==0||oGPlcrd[iPlcrd[_5a]].iKind==3){
oGPlcrd[iPlcrd[_5a]].iStatus=1;
oPlcrd[_5a].style.visibility="hidden";
oPlcrd[_5a+MG_PlCRD_SHOW_MAX].style.visibility="hidden";
if(oGPlcrd[iPlcrd[_5a]].iKind==0){
oPlcrdIfno1.innerHTML=GetHTMLPlacard(300,150,oGPlcrd[iPlcrd[_5a]].iLStr01);
oPlcrdIfno1.style.left=iPlcrdX[_5a];
oPlcrdIfno1.style.bottom=smpZ.clientHeight-iPlcrdY[_5a];
oPlcrdIfno1.style.visibility="";
oPlcrdIfno2.innerHTML="";
oPlcrdIfno2.style.visibility="hidden";
}else{
iPlcrdIfno2=_5a;
if(typeof (CBPlacardK3Open)=="function"){
CBPlacardK3Open(oPlcrdIfno2,iPlcrd[iPlcrdIfno2]);
}else{
oPlcrdIfno2.innerHTML=GetHTMLPlacard(300,150,oGPlcrd[iPlcrd[iPlcrdIfno2]].iLStr01);
}
oPlcrdIfno2.style.position="absolute";
oPlcrdIfno2.style.zIndex=86;
oPlcrdIfno2.style.left=GetCenterLX(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLx)+iFMx;
oPlcrdIfno2.style.bottom=smp00.clientHeight-GetCenterLY(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLy)-iFMy;
oPlcrdIfno2.style.visibility="";
oPlcrdIfno1.style.visibility="hidden";
}
_5e=true;
}
_5c=_5a;
}
iRV=true;
}
break;
}
}
}
}
if(_5e==true){
for(_5a=MG_PlCRD_SHOW_MAX-1;_5a>=0;_5a--){
if(iPlcrd[_5a]>=0){
switch(oGPlcrd[iPlcrd[_5a]].iKind){
case 0:
case 3:
if(_5c>=0&&_5c!=_5a&&oGPlcrd[iPlcrd[_5a]].iStatus==1){
oGPlcrd[iPlcrd[_5a]].iStatus=0;
oPlcrd[_5a].style.visibility="";
oPlcrd[_5a+MG_PlCRD_SHOW_MAX].style.visibility="";
if(_5c==99999999){
_5c=_5a;
}
}
}
}
}
}
if(_57){
if(_5c>=0&&typeof (CBPlacardClickEvent)=="function"){
CBPlacardClickEvent(iPlcrd[_5c],oGPlcrd[iPlcrd[_5c]].iStatus);
}
}
return iRV;
}
function GetMapSCLLvl(_5f){
var isy;
isy=SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4;
isy=GetMouseY(_5f)-smp00.offsetTop-isy;
if(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M==0){
isy=MG_SMP_LRL_MIN[SMS_MAP_L];
}else{
isy=Math.floor(isy/(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M))+MG_SMP_LRL_MIN[SMS_MAP_L];
}
return isy;
}
var StartX=3;
var StartY=1;
var StartR=-1;
function ChangeMapPic(_61,_62){
if(_61==0&&_62==0&&StartR==iFMr){
return;
}
StartX=StartX+_61;
StartY=StartY+_62;
StartR=iFMr;
ChangeMapPicT();
ChangeMapEArea();
}
function ChangeMapPicT(){
var _63;
var _64;
for(_63=0;_63<iMsh;_63++){
for(_64=0;_64<iMsw;_64++){
if(MG_MAP_LBDIR_U[SMS_MAP_L]!=""){
smpu[_63*iMsw+_64].style.background="url("+MG_MAP_BASEURL+MG_MAP_LBDIR_U[SMS_MAP_L]+iFMr+"/"+Math.floor((StartY+_63)/4+1)+"/"+Math.floor((StartX+_64)/5+1)+"/"+Math.floor((StartY+_63)/4+1)+"_"+Math.floor((StartX+_64)/5+1)+"_"+((StartY+_63)%4+1)+"_"+((StartX+_64)%5+1)+".png) no-repeat";
}
if(MG_MAP_LBDIR_D[SMS_MAP_L]!=""){
smpd[_63*iMsw+_64].style.background="url("+MG_MAP_BASEURL+MG_MAP_LBDIR_D[SMS_MAP_L]+iFMr+"/"+Math.floor((StartY+_63)/4+1)+"/"+Math.floor((StartX+_64)/5+1)+"/"+Math.floor((StartY+_63)/4+1)+"_"+Math.floor((StartX+_64)/5+1)+"_"+((StartY+_63)%4+1)+"_"+((StartX+_64)%5+1)+".png) no-repeat";
}
}
}
OReflashPlacard();
OReflashPolyLine();
if(typeof (CBFlashMap)=="function"){
CBFlashMap(iFMr,GetCenterHX(iFMx),GetCenterHY(iFMy),GetCenterHX(iFMx+iMsw*MG_SMP_WIDTH),GetCenterHY(iFMy+iMsh*MG_SMP_HEIGHT));
}
}
var StartEX=3;
var StartEY=1;
var StartER=-1;
function ChangeMapPicE(_65,_66){
if(_65==0&&_66==0&&StartER==iFMEr){
return;
}
StartEX=StartEX+_65;
StartEY=StartEY+_66;
StartER=iFMEr;
ChangeMapPicET();
}
function ChangeMapPicET(){
var _67;
var _68;
for(_67=0;_67<iMsEh;_67++){
for(_68=0;_68<iMsEw;_68++){
if(MG_MAP_LBDIR_E[SMS_MAP_L]!=""){
smpe[_67*iMsEw+_68].style.background="url("+MG_MAP_BASEURL+MG_MAP_LBDIR_E[SMS_MAP_L]+iFMEr+"/"+Math.floor((StartEY+_67)/4+1)+"/"+Math.floor((StartEX+_68)/5+1)+"/"+Math.floor((StartEY+_67)/4+1)+"_"+Math.floor((StartEX+_68)/5+1)+"_"+((StartEY+_67)%4+1)+"_"+((StartEX+_68)%5+1)+".png) no-repeat";
}
}
}
ChangeMapEArea();
}
function ChangeMapEArea(){
iLp1=Math.floor((MG_MAP_LOCACTION_SW[iFMr]/MG_MAP_LOCACTION_W[iFMr])/(MG_MAP_LOCACTION_SW[iFMEr]/MG_MAP_LOCACTION_W[iFMEr])*smp00.clientWidth);
iLp2=Math.floor((MG_MAP_LOCACTION_SH[iFMr]/MG_MAP_LOCACTION_H[iFMr])/(MG_MAP_LOCACTION_SH[iFMEr]/MG_MAP_LOCACTION_H[iFMEr])*smp00.clientHeight);
smpEY.style.cssText="position:absolute; left:"+Math.floor((smpE.clientWidth-iLp1)/2)+"; top:"+Math.floor((smpE.clientHeight-iLp2)/2)+"; width:"+iLp1+"px; height:"+iLp2+"px;z-index:10;border:1px solid gray;";
smpEY.style.overflow="hidden";
}
function StopEvent(_69){
if(window.event){
window.event.cancelBubble=true;
}
if(_69&&_69.stopPropagation){
_69.stopPropagation();
}
}
function GetCenterHX(iCx){
if(isNaN(iCx)){
iCx=Math.floor(smp00.clientWidth/2)+1;
}
return (StartX*MG_SMP_WIDTH+iCx-iFMx)/MG_MAP_LOCACTION_W[iFMr]*MG_MAP_LOCACTION_SW[iFMr]+MG_MAP_LOCACTION_SX[iFMr];
}
function GetCenterHY(iCy){
if(isNaN(iCy)){
iCy=(Math.floor(smp00.clientHeight/2)+1);
}
return (StartY*MG_SMP_HEIGHT+iCy-iFMy)/MG_MAP_LOCACTION_H[iFMr]*MG_MAP_LOCACTION_SH[iFMr]+MG_MAP_LOCACTION_SY[iFMr];
}
function GetCenterLX(iCx){
if(isNaN(iCx)){
iCx=0;
}
return (iCx-MG_MAP_LOCACTION_SX[iFMr])/MG_MAP_LOCACTION_SW[iFMr]*MG_MAP_LOCACTION_W[iFMr]-StartX*MG_SMP_WIDTH;
}
function GetCenterLY(iCy){
if(isNaN(iCy)){
iCy=0;
}
return (iCy-MG_MAP_LOCACTION_SY[iFMr])/MG_MAP_LOCACTION_SH[iFMr]*MG_MAP_LOCACTION_H[iFMr]-StartY*MG_SMP_HEIGHT;
}
function GetMouseX(_6e){
if(!_6e){
_6e=window.event;
}
return _6e.clientX+document.body.scrollLeft;
}
function GetMouseY(_6f){
if(!_6f){
_6f=window.event;
}
return _6f.clientY+document.body.scrollTop;
}
function OShowEagleEyeMap(iSH,iLC,iMW,iMH,iDR){
var _75;
var _76;
var _77;
if(isNaN(iSH)==false){
MG_EGL_EYE_SH=iSH;
}
if(isNaN(iLC)==false){
MG_EG_EYE_LC=iLC;
}
if(isNaN(iMW)==false){
MG_EGL_EYE_MW=iMW;
}
if(isNaN(iMH)==false){
MG_EGL_EYE_MH=iMH;
}
if(isNaN(iDR)==false){
MG_EGL_EYE_DR=iDR;
}
switch(MG_EG_EYE_LC){
case 1:
_77="left:0px; top:0px;";
break;
case 2:
_77="right:0px; top:0px;";
break;
case 3:
_77="left:0px; bottom:0px;";
break;
default:
_77="right:0px; bottom:0px;";
}
smpE.style.cssText="position:absolute; "+_77+"width:"+MG_EGL_EYE_MW+"px; height:"+MG_EGL_EYE_MH+"px;z-index:94;border:1px solid gray;";
smpE.style.visibility=MG_EGL_EYE_SH?"":"hidden";
smpE.style.overflow="hidden";
if(!smp00.style.position){
smp00.style.position="relative";
}
smp00.style.MozUserSelect="none";
smpE.unselectable=smp00.unselectable;
smpE.style.backgroundColor=smp00.style.backgroundColor;
iMsEw=Math.floor(MG_EGL_EYE_MW/MG_SMP_WIDTH)+2;
iMsEh=Math.floor(MG_EGL_EYE_MH/MG_SMP_HEIGHT)+2;
smpEZ.style.cssText="position:absolute; left:0px; top:0px;width:"+(iMsEw*MG_SMP_WIDTH)+"px; height:"+(iMsEh*MG_SMP_HEIGHT)+"px;z-index:0;";
for(_75=0;_75<iMsEh;_75++){
for(_76=0;_76<iMsEw;_76++){
if(typeof (smpe[_75*iMsEw+_76])=="undefined"){
smpe[_75*iMsEw+_76]=document.createElement("div");
smpe[_75*iMsEw+_76].style.cssText="position:absolute; left:"+(_76*MG_SMP_WIDTH)+"px; top:"+(_75*MG_SMP_HEIGHT)+"px; width:"+MG_SMP_WIDTH+"px; height:"+MG_SMP_HEIGHT+"px;z-index:3;";
smpEZ.appendChild(smpe[_75*iMsEw+_76]);
}else{
smpe[_75*iMsEw+_76].style.left=(_76*MG_SMP_WIDTH)+"px";
smpe[_75*iMsEw+_76].style.top=(_75*MG_SMP_HEIGHT)+"px";
smpe[_75*iMsEw+_76].style.hidden=false;
}
}
}
for(_75=iMsEw*iMsEh;typeof (smpe[_75])!="undefined";_75++){
smpe[_75].style.hidden=true;
}
}
function OMoveToRXY(fx,fy,ir,sm){
var iTx;
var iAx;
var iTy;
var iAy;
var _80=new Array();
if(ir>MG_SMP_LRL_MAX[SMS_MAP_L]){
ir=MG_SMP_LRL_MAX[SMS_MAP_L];
}
if(ir<MG_SMP_LRL_MIN[SMS_MAP_L]){
ir=MG_SMP_LRL_MIN[SMS_MAP_L];
}
if(sm==true){
OnTimer(true);
smpY.style.visibility="";
iOTFunction=1;
iOv[0]=fx;
iOv[1]=fy;
iOv[2]=ir;
iOv[3]=20;
iOv[4]=GetCenterHX();
iOv[5]=GetCenterHY();
iOv[6]=20/2;
}else{
iTx=(fx-MG_MAP_LOCACTION_SX[ir])/MG_MAP_LOCACTION_SW[ir]*MG_MAP_LOCACTION_W[ir]-(Math.floor(smp00.clientWidth/2)+1);
iAx=Math.floor(iTx/MG_SMP_WIDTH);
iFMx=iAx*MG_SMP_WIDTH-iTx;
smpZ.style.left=iFMx+"px";
iTy=(fy-MG_MAP_LOCACTION_SY[ir])/MG_MAP_LOCACTION_SH[ir]*MG_MAP_LOCACTION_H[ir]-(Math.floor(smp00.clientHeight/2)+1);
iAy=Math.floor(iTy/MG_SMP_HEIGHT);
iFMy=iAy*MG_SMP_HEIGHT-iTy;
smpZ.style.top=iFMy+"px";
if(iFMr!=ir){
iFMr=ir;
OShowScale(SHOW_SCALE_FLAG);
}
if(typeof (CBMapMove)=="function"){
CBMapMove(iFMr,GetCenterHX(0),GetCenterHY(0),GetCenterHX(smp00.clientWidth),GetCenterHY(smp00.clientWidth));
}
ChangeMapPic(iAx-StartX,iAy-StartY);
if(oPlcrdIfno2.style.visibility==""){
oPlcrdIfno2.style.position="absolute";
oPlcrdIfno2.style.zIndex=86;
oPlcrdIfno2.style.left=GetCenterLX(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLx)+iFMx;
oPlcrdIfno2.style.bottom=smp00.clientHeight-GetCenterLY(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLy)-iFMy;
}
OMoveToRXYE(fx,fy,ir,sm);
}
}
function OMoveToRXYE(fx,fy,ir,sm){
var iTx;
var iAx;
var iTy;
var iAy;
if(MG_EGL_EYE_SH&&iOTFunction!=1){
ir+=MG_EGL_EYE_DR;
if(ir>MG_SMP_LRL_MAX[SMS_MAP_L]){
ir=MG_SMP_LRL_MAX[SMS_MAP_L];
}
if(ir<MG_SMP_LRL_MIN[SMS_MAP_L]){
ir=MG_SMP_LRL_MIN[SMS_MAP_L];
}
iTx=(fx-MG_MAP_LOCACTION_SX[ir])/MG_MAP_LOCACTION_SW[ir]*MG_MAP_LOCACTION_W[ir]-(Math.floor(MG_EGL_EYE_MW/2)+1);
iAx=Math.floor(iTx/MG_SMP_WIDTH);
iFMEx=iAx*MG_SMP_WIDTH-iTx;
smpEZ.style.left=iFMEx+"px";
iTy=(fy-MG_MAP_LOCACTION_SY[ir])/MG_MAP_LOCACTION_SH[ir]*MG_MAP_LOCACTION_H[ir]-(Math.floor(MG_EGL_EYE_MH/2)+1);
iAy=Math.floor(iTy/MG_SMP_HEIGHT);
iFMEy=iAy*MG_SMP_HEIGHT-iTy;
smpEZ.style.top=iFMEy+"px";
if(iFMEr!=ir){
iFMEr=ir;
}
ChangeMapPicE(iAx-StartEX,iAy-StartEY);
}
}
function OShowScale(bTF,ix,iy){
SHOW_SCALE_FLAG=bTF;
if(isNaN(ix)==false&&isNaN(iy)==false){
SCL_DIR_ICON_X=ix;
SCL_DIR_ICON_Y=iy;
}
smc01.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc01.style.top=SCL_DIR_ICON_Y+"px";
smc02.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc02.style.top=(SCL_DIR_ICON_Y+SCL_DIR_ICON_B*4+SCL_DIR_ICON_H*2+SCL_DIR_ICON_S*2)+"px";
smc03.style.left=SCL_DIR_ICON_X+"px";
smc03.style.top=(SCL_DIR_ICON_Y+SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)+"px";
smc04.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*4+SCL_DIR_ICON_W*2+SCL_DIR_ICON_S*2)+"px";
smc04.style.top=(SCL_DIR_ICON_Y+SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)+"px";
smc05.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc05.style.top=(SCL_DIR_ICON_Y+SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)+"px";
smc06.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc06.style.top=(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4)+"px";
smc07.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc07.style.top=(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M)*(MG_SMP_LRL_MAX[SMS_MAP_L]-MG_SMP_LRL_MIN[SMS_MAP_L]))+"px";
smc08.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc08.style.top=(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*3)+"px";
smc09.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc09.style.top=(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M)*(MG_SMP_LRL_MAX[SMS_MAP_L]-MG_SMP_LRL_MIN[SMS_MAP_L]+1))+"px";
smc11.style.left=(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S)+"px";
smc11.style.top=(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M)*(iFMr-MG_SMP_LRL_MIN[SMS_MAP_L]))+"px";
smc01.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc02.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc03.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc04.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc05.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc06.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc07.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc08.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc09.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc11.style.visibility=SHOW_SCALE_FLAG?"":"hidden";
for(iLp1=MG_SMP_RLEVEL_MIN+1;iLp1<MG_SMP_RLEVEL_MAX;iLp1++){
smc10[iLp1].style.visibility=SHOW_SCALE_FLAG?"":"hidden";
smc10[iLp1].style.left=(iLp1>MG_SMP_LRL_MIN[SMS_MAP_L]&&iLp1<MG_SMP_LRL_MAX[SMS_MAP_L]?(SCL_DIR_ICON_X+SCL_DIR_ICON_B*2+SCL_DIR_ICON_W+SCL_DIR_ICON_S):"-100")+"px";
smc10[iLp1].style.top=(iLp1>MG_SMP_LRL_MIN[SMS_MAP_L]&&iLp1<MG_SMP_LRL_MAX[SMS_MAP_L]?(SCL_DIR_ICON_Y+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_H+SCL_DIR_ICON_S)*4+(SCL_DIR_ICON_B*2+SCL_DIR_ICON_M)*(iLp1-MG_SMP_LRL_MIN[SMS_MAP_L])):"-100")+"px";
}
}
function OSselectMapLayer(il){
SMS_MAP_L=il<LCL_BTN_ICON_N?(il<0?0:il):LCL_BTN_ICON_N-1;
OShowLayerControl(SHOW_LCTRL_FLAG);
if(iFMr>MG_SMP_LRL_MAX[SMS_MAP_L]){
OMoveToRXY(GetCenterHX(),GetCenterHY(),MG_SMP_LRL_MAX[SMS_MAP_L],true);
}else{
if(iFMr<MG_SMP_LRL_MIN[SMS_MAP_L]){
OMoveToRXY(GetCenterHX(),GetCenterHY(),MG_SMP_LRL_MIN[SMS_MAP_L],true);
}else{
ChangeMapPicT();
ChangeMapPicET();
}
}
OShowScale(SHOW_SCALE_FLAG);
}
function OShowLayerControl(bTF,ix,iy){
SHOW_LCTRL_FLAG=bTF;
if(isNaN(ix)==false&&isNaN(iy)==false){
LCL_BTN_ICON_X=ix;
LCL_BTN_ICON_Y=iy;
}
for(iLp1=0;iLp1<LCL_BTN_ICON_N;iLp1++){
LoadImageTransform(smc12[iLp1],LCL_BTN_ICON_X+(LCL_BTN_ICON_W+LCL_BTN_ICON_B*2+LCL_BTN_ICON_S)*(LCL_BTN_ICON_X>=0?iLp1:(iLp1+1-LCL_BTN_ICON_N)),LCL_BTN_ICON_Y,97,LCL_BTN_ICON_W,LCL_BTN_ICON_H,LCL_BTN_ICON_B,MG_IMG_BASEURL+"lcl"+iLp1+(iLp1==SMS_MAP_L?"2":"0")+".png",true,LCL_BTN_ICON_X<0,true);
}
}
function OnTimer(_90){
var _91;
var _92;
var _93;
switch(iOTFunction){
case 1:
iOv[3]=iOv[3]-1;
if(iOv[3]==0||isNaN(_90)==false){
iOTFunction=0;
OMoveToRXY(iOv[0],iOv[1],iOv[2],false);
smpY.style.visibility=CTRL_ALL_ENEVT_FLAG?"hidden":"";
}else{
if(iOv[3]%2==0){
_91=iOv[3]/2;
OMoveToRXY((iOv[0]*(iOv[6]-_91)+iOv[4]*_91)/iOv[6],(iOv[1]*(iOv[6]-_91)+iOv[5]*_91)/iOv[6],iOv[2],false);
}
}
break;
case 2:
if(isNaN(_90)==false){
iOv[2]=0;
oTimerTmp1=oTimerTmp2;
}
if((iPLAY_POLY_LINE_SPEED!=0||(iOv[2]==0&&oTimerTmp1==oTimerTmp2))&&iOv[3]++%PLAY_POLY_LINE_TIMER==0){
if(iOv[2]==0){
OMoveToRXY(oTimerTmp1.iX,oTimerTmp1.iY,iOv[4],false);
if(oTimerTmp1==oTimerTmp2){
smpY.style.visibility=CTRL_ALL_ENEVT_FLAG?"hidden":"";
iOTFunction=0;
}else{
if(iOv[0]==0){
iOv[5]=(Math.sqrt(Math.pow(oTimerTmp1.iX-oTimerTmp1.oNextPoint.iX,2)+Math.pow(oTimerTmp1.iY-oTimerTmp1.oNextPoint.iY,2))/iOv[1])+1;
}else{
iOv[5]=(Math.sqrt(Math.pow(GetCenterLX(oTimerTmp1.iX)-GetCenterLX(oTimerTmp1.oNextPoint.iX),2)+Math.pow(GetCenterLY(oTimerTmp1.iY)-GetCenterLY(oTimerTmp1.oNextPoint.iY),2))/iOv[1])+1;
}
iOv[2]=1;
}
}else{
if(iFMr!=iOv[4]){
iOv[4]=iFMr;
iOv[2]=(iOv[2]-1)/iOv[5];
if(iOv[0]==0){
iOv[5]=(Math.sqrt(Math.pow(oTimerTmp1.iX-oTimerTmp1.oNextPoint.iX,2)+Math.pow(oTimerTmp1.iY-oTimerTmp1.oNextPoint.iY,2))/iOv[1])+1;
}else{
iOv[5]=(Math.sqrt(Math.pow(GetCenterLX(oTimerTmp1.iX)-GetCenterLX(oTimerTmp1.oNextPoint.iX),2)+Math.pow(GetCenterLY(oTimerTmp1.iY)-GetCenterLY(oTimerTmp1.oNextPoint.iY),2))/iOv[1])+1;
}
iOv[2]=iOv[5]*iOv[2]+1;
}
iOv[2]+=iPLAY_POLY_LINE_SPEED;
if(iOv[2]<=1&&iPLAY_POLY_LINE_SPEED<0){
OMoveToRXY(oTimerTmp1.iX,oTimerTmp1.iY,iOv[4],false);
if(typeof (oTimerTmp1.oPrePoint)=="undefined"){
smpY.style.visibility=CTRL_ALL_ENEVT_FLAG?"hidden":"";
iOTFunction=0;
}else{
oTimerTmp1=oTimerTmp1.oPrePoint;
if(iOv[0]==0){
iOv[5]=(Math.sqrt(Math.pow(oTimerTmp1.iX-oTimerTmp1.oNextPoint.iX,2)+Math.pow(oTimerTmp1.iY-oTimerTmp1.oNextPoint.iY,2))/iOv[1])+1;
}else{
iOv[5]=(Math.sqrt(Math.pow(GetCenterLX(oTimerTmp1.iX)-GetCenterLX(oTimerTmp1.oNextPoint.iX),2)+Math.pow(GetCenterLY(oTimerTmp1.iY)-GetCenterLY(oTimerTmp1.oNextPoint.iY),2))/iOv[1])+1;
}
iOv[2]=iOv[5]+1;
}
}else{
if(iOv[2]>=iOv[5]+1&&iPLAY_POLY_LINE_SPEED>=0){
oTimerTmp1=oTimerTmp1.oNextPoint;
iOv[2]=0;
}else{
OMoveToRXY(oTimerTmp1.iX+(oTimerTmp1.oNextPoint.iX-oTimerTmp1.iX)*(iOv[2]-1)/iOv[5],oTimerTmp1.iY+(oTimerTmp1.oNextPoint.iY-oTimerTmp1.iY)*(iOv[2]-1)/iOv[5],iOv[4],false);
}
}
}
}
break;
}
if(iMapViewW>0&&iMapViewW!=smp00.clientWidth&&iMapViewH>0&&iMapViewH!=smp00.clientHeight){
iMapViewW=smp00.clientWidth;
iMapViewH=smp00.clientHeight;
smc00a.style.left=((Math.floor(smp00.clientWidth/2)+1)-32)+"px";
smc00a.style.top=(Math.floor(smp00.clientHeight/2)+1)+"px";
smc00b.style.left=(Math.floor(smp00.clientWidth/2)+1)+"px";
smc00b.style.top=((Math.floor(smp00.clientHeight/2)+1)-32)+"px";
iMsw=Math.floor(smp00.clientWidth/MG_SMP_WIDTH)+2;
iMsh=Math.floor(smp00.clientHeight/MG_SMP_HEIGHT)+2;
smpZ.style.width=(iMsw*MG_SMP_WIDTH)+"px";
smpZ.style.height=(iMsh*MG_SMP_HEIGHT)+"px";
for(_92=0;_92<iMsh;_92++){
for(_93=0;_93<iMsw;_93++){
if(typeof (smpu[_92*iMsw+_93])=="undefined"){
smpu[_92*iMsw+_93]=document.createElement("div");
smpu[_92*iMsw+_93].style.cssText="position:absolute; left:"+(_93*MG_SMP_WIDTH)+"px; top:"+(_92*MG_SMP_HEIGHT)+"px; width:"+MG_SMP_WIDTH+"px; height:"+MG_SMP_HEIGHT+"px;z-index:3;";
smpZ.appendChild(smpu[_92*iMsw+_93]);
smpd[_92*iMsw+_93]=document.createElement("div");
smpd[_92*iMsw+_93].style.cssText="position:absolute; left:"+(_93*MG_SMP_WIDTH)+"px; top:"+(_92*MG_SMP_HEIGHT)+"px; width:"+MG_SMP_WIDTH+"px; height:"+MG_SMP_HEIGHT+"px;z-index:2;";
smpZ.appendChild(smpd[_92*iMsw+_93]);
}else{
smpu[_92*iMsw+_93].style.left=(_93*MG_SMP_WIDTH)+"px";
smpu[_92*iMsw+_93].style.top=(_92*MG_SMP_HEIGHT)+"px";
smpu[_92*iMsw+_93].style.hidden=false;
smpd[_92*iMsw+_93].style.left=(_93*MG_SMP_WIDTH)+"px";
smpd[_92*iMsw+_93].style.top=(_92*MG_SMP_HEIGHT)+"px";
smpd[_92*iMsw+_93].style.hidden=false;
}
}
}
for(_92=iMsw*iMsh;typeof (smpu[_92])!="undefined";_92++){
smpu[_92].style.hidden=true;
smpd[_92].style.hidden=true;
}
if(typeof G_vmlCanvasManager!="undefined"){
oCanvas.style.visibility="hidden";
oCanvas=document.createElement("canvas");
oCanvas.style.cssText="position:absolute; left:0px; top:0px;z-index:25;";
oCanvas.width=smpZ.clientWidth;
oCanvas.height=smpZ.clientHeight;
oCanvas.style.visibility="hidden";
smpZ.appendChild(oCanvas);
G_vmlCanvasManager.initElement(oCanvas);
oCanvas=smpZ.lastChild;
oCtx=oCanvas.getContext("2d");
oCtx.clearRect(0,0,oCanvas.width,oCanvas.height);
}else{
oCanvas.width=smpZ.clientWidth;
oCanvas.height=smpZ.clientHeight;
}
ChangeMapPicT();
}
}
function OSetMapStartRXY(fx,fy,ir){
SMS_MAP_X=fx;
SMS_MAP_Y=fy;
SMS_MAP_R=ir;
OMoveToRXY(fx,fy,ir,false);
}
function OGetPlacardInfo(_97){
return oGPlcrd[_97];
}
function OAddPlacard(_98,_99,_9a,_9b,ix,iy,_9e,_9f,_a0,_a1){
var _a2;
var _a3;
for(_a3=0;_a3<MG_PlCRD_MAX;_a3++){
if(PLCRD_STATUS[_a3]==-1){
break;
}
}
if(_a3==MG_PlCRD_MAX){
return -1;
}
PLCRD_STATUS[_a3]=0;
if(typeof (_98)=="object"){
oGPlcrd[_a3]=_98;
}else{
oGPlcrd[_a3]=new GWPlcrd(_98,_99,_9a,_9b,ix,iy,_9e,_9f,_a0,_a1);
}
return _a3;
}
function ORemovePlacard(_a4){
PLCRD_STATUS[_a4]=-1;
}
function ORemoveAllPlacard(){
var _a5;
for(_a5=0;_a5<MG_PlCRD_MAX;_a5++){
ORemovePlacard(_a5);
}
}
function OReflashPlacard(){
var _a6;
var _a7;
var _a8;
var _a9;
for(_a6=0,_a7=0;_a6<MG_PlCRD_MAX&&_a7<MG_PlCRD_SHOW_MAX;_a6++){
if(PLCRD_STATUS[_a6]>=0){
iPlcrdX[_a7]=GetCenterLX(oGPlcrd[_a6].iLx);
iPlcrdY[_a7]=GetCenterLY(oGPlcrd[_a6].iLy);
if(iPlcrdX[_a7]>-500&&iPlcrdX[_a7]<smp00.clientWidth+500&&iPlcrdY[_a7]>-500&&iPlcrdY[_a7]<smp00.clientHeight+500){
iPlcrd[_a7++]=_a6;
}
}
}
for(;_a7<MG_PlCRD_SHOW_MAX;_a7++){
iPlcrd[_a7]=-1;
}
oPlcrdIfno1.style.visibility="hidden";
for(_a6=0,_a7=0;_a6<MG_PlCRD_SHOW_MAX;_a6++){
if(iPlcrd[_a6]<0){
oPlcrd[_a6].style.visibility="hidden";
oPlcrd[_a6+MG_PlCRD_SHOW_MAX].style.visibility="hidden";
}else{
oPlcrd[_a6].style.visibility="";
switch(oGPlcrd[iPlcrd[_a6]].iKind){
case 0:
case 1:
case 3:
LoadImageTransform(oPlcrd[_a6],iPlcrdX[_a6]-oGPlcrd[iPlcrd[_a6]].oIcon01.iopx,(iPlcrdY[_a6]-oGPlcrd[iPlcrd[_a6]].oIcon01.iopy),31,oGPlcrd[iPlcrd[_a6]].oIcon01.iow,oGPlcrd[iPlcrd[_a6]].oIcon01.ioh,0,oGPlcrd[iPlcrd[_a6]].oIcon01.soUrl,oGPlcrd[iPlcrd[_a6]].iStatus==0);
LoadImageTransform(oPlcrd[_a6+MG_PlCRD_SHOW_MAX],iPlcrdX[_a6]-oGPlcrd[iPlcrd[_a6]].oIcon02.iopx,(iPlcrdY[_a6]-oGPlcrd[iPlcrd[_a6]].oIcon02.iopy),30,oGPlcrd[iPlcrd[_a6]].oIcon02.iow,oGPlcrd[iPlcrd[_a6]].oIcon02.ioh,0,oGPlcrd[iPlcrd[_a6]].oIcon02.soUrl,oGPlcrd[iPlcrd[_a6]].iStatus==0);
if(oGPlcrd[iPlcrd[_a6]].iStatus==1){
if(oGPlcrd[iPlcrd[_a6]].iKind==0||oGPlcrd[iPlcrd[_a6]].iKind==1){
oPlcrdIfno1.innerHTML=GetHTMLPlacard(300,150,oGPlcrd[iPlcrd[_a6]].iLStr01);
oPlcrdIfno1.style.left=iPlcrdX[_a6];
oPlcrdIfno1.style.bottom=smpZ.clientHeight-iPlcrdY[_a6];
oPlcrdIfno1.style.visibility="";
oPlcrdIfno2.innerHTML="";
oPlcrdIfno2.style.visibility="hidden";
}else{
iPlcrdIfno2=_a6;
if(typeof (CBPlacardK3Open)=="function"){
CBPlacardK3Open(oPlcrdIfno2,iPlcrd[iPlcrdIfno2]);
}else{
oPlcrdIfno2.innerHTML=GetHTMLPlacard(300,150,oGPlcrd[iPlcrd[iPlcrdIfno2]].iLStr01);
}
oPlcrdIfno2.style.position="absolute";
oPlcrdIfno2.style.zIndex=86;
oPlcrdIfno2.style.left=GetCenterLX(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLx)+iFMx;
oPlcrdIfno2.style.bottom=smp00.clientHeight-GetCenterLY(oGPlcrd[iPlcrd[iPlcrdIfno2]].iLy)-iFMy;
oPlcrdIfno2.style.visibility="";
oPlcrdIfno1.style.visibility="hidden";
}
}
break;
case 2:
if(typeof (oSlabel[_a7])=="undefined"){
oSlabel[_a7]=document.createElement("label");
smpZ.appendChild(oSlabel[_a7]);
}
oSlabel[_a7].innerHTML=oGPlcrd[iPlcrd[_a6]].iLStr01;
_a8=0;
_a9=0;
switch(oGPlcrd[iPlcrd[_a6]].iLStr02){
case 2:
_a8=oSlabel[_a7].clientWidth/2;
break;
case 3:
_a8=oSlabel[_a7].clientWidth;
break;
case 4:
_a9=oSlabel[_a7].clientHeight/2;
break;
case 5:
_a8=oSlabel[_a7].clientWidth/2;
_a9=oSlabel[_a7].clientHeight/2;
break;
case 6:
_a8=oSlabel[_a7].clientWidth;
_a9=oSlabel[_a7].clientHeight/2;
break;
case 7:
_a9=oSlabel[_a7].clientHeight;
break;
case 8:
_a8=oSlabel[_a7].clientWidth/2;
_a9=oSlabel[_a7].clientHeight;
break;
case 9:
_a8=oSlabel[_a7].clientWidth;
_a9=oSlabel[_a7].clientHeight;
}
oSlabel[_a7++].style.cssText="position:absolute; left:"+(iPlcrdX[_a6]-_a8)+"px; top:"+(iPlcrdY[_a6]-_a9)+"px;z-index:31;cursor:pointer;";
oPlcrd[_a6].style.visibility="hidden";
oPlcrd[_a6+MG_PlCRD_SHOW_MAX].style.visibility="hidden";
break;
}
}
}
for(;typeof (oSlabel[_a7])!="undefined";_a7++){
oSlabel[_a7].style.visibility="hidden";
}
}
function OAddPolyLine(_aa){
var _ab;
var _ac;
for(_ac=0;_ac<MG_PlCRD_MAX;_ac++){
if(iPolyLine[_ac]==-1){
break;
}
}
if(_ac==MG_PlCRD_MAX){
return -1;
}
iPolyLine[_ac]=0;
oPolyLine[_ac]=_aa;
return _ac;
}
function ORemovePolyLine(_ad){
iPolyLine[_ad]=-1;
}
function ORemoveAllPolyLine(){
var _ae;
for(_ae=0;_ae<MG_PLINE_MAX;_ae++){
ORemovePolyLine(_ae);
}
}
function OReflashPolyLine(){
var _af;
var iX;
var iY;
var _b2;
var _b3;
_b3=0;
oCtx.clearRect(0,0,oCanvas.width,oCanvas.height);
for(_af=0;_af<MG_PLINE_MAX;_af++){
if(iPolyLine[_af]>=0){
_b3++;
oCtx.lineWidth=oPolyLine[_af].iLineWidth;
oCtx.strokeStyle=oPolyLine[_af].sColor;
oCtx.beginPath();
if(oPolyLine[_af].iType<3){
_b2=oPolyLine[_af].StPoint;
iX=GetCenterLX(_b2.iX);
iY=GetCenterLY(_b2.iY);
oCtx.moveTo(iX,iY);
while(_b2!=oPolyLine[_af].LtPoint){
_b2=_b2.oNextPoint;
iX=GetCenterLX(_b2.iX);
iY=GetCenterLY(_b2.iY);
oCtx.lineTo(iX,iY);
}
switch(oPolyLine[_af].iType){
case 1:
oCtx.closePath();
oCtx.strokeStyle=oPolyLine[_af].sColor;
oCtx.stroke();
break;
case 2:
oCtx.closePath();
oCtx.fillStyle=oPolyLine[_af].sColor;
oCtx.fill();
break;
default:
oCtx.strokeStyle=oPolyLine[_af].sColor;
oCtx.stroke();
}
}
_b2=oPolyLine[_af].StPoint;
iX=GetCenterLX(_b2.iX);
iY=GetCenterLY(_b2.iY);
if(!isNaN(_b2.iSize)){
switch(oPolyLine[_af].iType){
case 3:
case 4:
break;
default:
oCtx.beginPath();
oCtx.lineWidth=_b2.iSize;
if(typeof (_b2.sColor)!="undefined"){
oCtx.strokeStyle=_b2.sColor;
}else{
oCtx.strokeStyle=oPolyLine[_af].sColor;
}
oCtx.arc(iX,iY,_b2.iSize/2,0,Math.PI*2,true);
oCtx.closePath();
oCtx.stroke();
}
}
while(_b2!=oPolyLine[_af].LtPoint){
_b2=_b2.oNextPoint;
switch(oPolyLine[_af].iType){
case 3:
case 4:
oCtx.beginPath();
if(!isNaN(_b2.iSize)){
oCtx.lineWidth=_b2.iSize;
}else{
oCtx.lineWidth=oPolyLine[_af].iLineWidth;
}
if(oPolyLine[_af].iType==3){
if(typeof (_b2.sColor)!="undefined"){
oCtx.fillStyle=_b2.sColor;
}else{
oCtx.fillStyle=oPolyLine[_af].sColor;
}
oCtx.arc(iX,iY,Math.sqrt(Math.pow(GetCenterLX(_b2.iX)-iX,2)+Math.pow(GetCenterLY(_b2.iY)-iY,2)),0,Math.PI*2,true);
oCtx.fill();
}else{
if(typeof (_b2.sColor)!="undefined"){
oCtx.strokeStyle=_b2.sColor;
}else{
oCtx.strokeStyle=oPolyLine[_af].sColor;
}
oCtx.arc(iX,iY,Math.sqrt(Math.pow(GetCenterLX(_b2.iX)-iX,2)+Math.pow(GetCenterLY(_b2.iY)-iY,2)),0,Math.PI*2,true);
oCtx.closePath();
oCtx.stroke();
}
break;
default:
iX=GetCenterLX(_b2.iX);
iY=GetCenterLY(_b2.iY);
if(!isNaN(_b2.iSize)){
oCtx.beginPath();
oCtx.lineWidth=_b2.iSize;
if(typeof (_b2.sColor)!="undefined"){
oCtx.strokeStyle=_b2.sColor;
}else{
oCtx.strokeStyle=oPolyLine[_af].sColor;
}
oCtx.arc(iX,iY,_b2.iSize/2,0,Math.PI*2,true);
oCtx.closePath();
oCtx.stroke();
}
}
}
}
}
oCanvas.style.visibility=_b3>0?"":"hidden";
}
function OPlayPolyLine(_b4,_b5,_b6){
iPLAY_POLY_LINE_SPEED=1;
OnTimer(true);
smpY.style.visibility="";
iOTFunction=2;
iOv[0]=_b5;
iOv[1]=_b6;
iOv[2]=0;
iOv[3]=0;
iOv[4]=iFMr;
oTimerTmp1=_b4.StPoint;
oTimerTmp2=_b4.LtPoint;
}
var arNGVersion=navigator.appVersion.split("MSIE");
var iNGVersion=parseFloat(arNGVersion[1]);
function CLoadImageTransform(ix,iy,iz,iw,ih,ib,_bd,_be,_bf,_c0){
var _c1;
_c1=document.createElement("div");
LoadImageTransform(_c1,ix,iy,iz,iw,ih,ib,_bd,_be,_bf,_c0);
return _c1;
}
function LoadImageTransform(_c2,ix,iy,iz,iw,ih,ib,_c9,_ca,_cb,_cc){
_c2.style.cssText="position:absolute; "+(ix<0&&_cb==true?("right:"+(0-ix)):("left:"+ix))+"px; "+(iy<0&&_cc==true?("bottom:"+(0-iy)):("top:"+iy))+"px;"+(iw==0?"":"width:"+iw+"px; ")+(ih==0?"":"height:"+ih+"px; ")+"z-index:"+iz+";border:"+ib+"px solid black;cursor:pointer;"+(((iNGVersion>=5.5)&&(iNGVersion<7)&&(document.body.filters))?"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='"+_c9+"');":"");
_c2.style.visibility=_ca?"":"hidden";
_c2.style.fontSize="1px";
_c2.style.background=((iNGVersion>=5.5)&&(iNGVersion<7)&&(document.body.filters))?"":"url("+_c9+") no-repeat";
}
function GetHTMLPlacard(iw,ih,_cf){
var _d0;
_d0="<table width="+iw+" height="+ih+" border=0 cellpadding=0 cellspacing=0>";
_d0+="\t<tr height=0>";
_d0+="\t\t<td width=16></td>";
_d0+="\t\t<td width=20></td>";
_d0+="\t\t<td width=65535></td>";
_d0+="\t\t<td width=16></td>";
_d0+="\t</tr>";
_d0+="\t<tr>";
_d0+="\t\t<td width=16>";
_d0+="\t\t\t<img src="+MG_IMG_BASEURL+"pup_01.png></td>";
_d0+="\t\t<td colspan=3 background="+MG_IMG_BASEURL+"pup_02.png> </td>";
_d0+="\t\t<td width=16>";
_d0+="\t\t\t<img src="+MG_IMG_BASEURL+"pup_04.png></td>";
_d0+="\t</tr>";
_d0+="\t<tr height=100%>";
_d0+="\t\t<td background="+MG_IMG_BASEURL+"pup_05.png></td>";
_d0+="\t\t<td colspan=3 align=left valign=top bgcolor=#FFFFFF>"+_cf+"</td>";
_d0+="\t\t<td background="+MG_IMG_BASEURL+"pup_13.png></td>";
_d0+="\t</tr>";
_d0+="\t<tr>";
_d0+="\t\t<td colspan=2 rowspan=3 height=36><img src="+MG_IMG_BASEURL+"pup_08.png></td>";
_d0+="\t\t<td height=13 bgcolor=#FFFFFF></td>";
_d0+="\t\t<td rowspan=2 height=23 bgcolor=#FFFFFF></td>";
_d0+="\t\t<td height=13 background="+MG_IMG_BASEURL+"pup_13.png></td>";
_d0+="\t</tr>";
_d0+="\t<tr>";
_d0+="\t  <td height=10 bgcolor=#FFFFFF></td>";
_d0+="\t\t<td rowspan=2 height=23><img src="+MG_IMG_BASEURL+"pup_10.png></td>";
_d0+="\t</tr>";
_d0+="\t<tr>";
_d0+="\t\t<td colspan=2 height=13 background="+MG_IMG_BASEURL+"pup_11.png></td>";
_d0+="\t</tr>";
_d0+="</table>";
return _d0;
}

