var cSearchControl; var cSearchResultControl; var cEntityPopControl; var cThemePopControl; var cCommendPopControl; var cCityListControl; var cNavigationControl; var cDebugControl; var cPaneSearchControl; var cFromSearchControl; var cToSearchControl; var cPeripheralBusControl; var cBusStationControl; var cPeripheralSearchControl; var cRotaryPictureControl; var _PopLayer; var _PaneLayer; var _IconLayer; var _BusLayer; var _MarkLayer; var _EyeIconLayer; var _LayerLine; var DrawLineFlag = 0; var _BusCroods = ''; var vM = null; var vMe = null; var _isBeginSelectMark = false; var _isBeginScale = false; function fnLoadInit(){ if(typeof vEdushiMap =='undefined' || typeof veyeEdushiMap=='undefined' || typeof vEdushiMap.Body.NewMapLayer !='function' || typeof veyeEdushiMap.Body.NewMapLayer !='function' ) { setTimeout("fnLoadInit()",50); return; } vM = vEdushiMap; vMe = veyeEdushiMap; window.onresize=function(){ var h = fnGetWindowHeight(),w = fnGetWindowWidth(); $('EdushiMap').style.Width = w + 'px'; $('EdushiMap').style.Height = h + 'px'; document.body.style.Height = h + 'px'; vM.MapHeight(h-63); vM.MapWidth(w); $('divThemeMask').style.width = w - 390 + 'px'; $('divThemeClip').style.clip = 'rect(0 ' + (w - 390)*1 + 'px 22px 0)'; fnInitThemeList(); }; window.onresize(); _PopLayer = vM.NewMapLayer('Pop',269, 0); _IconLayer = vM.NewMapLayer('Icon', 268, 0); _PaneLayer = vM.NewMapLayer('Pane', 267, 0); _BusLayer = vM.NewMapLayer('Bus', 266, 0); _MarkLayer = vM.NewMapLayer('Mark', 265, 0); _EyeIconLayer = vMe.NewMapLayer('Icon', 264, 0); _LayerLine = vM.NewMapLayer('BusLine',263,0); var EyeZB = new fnZoomBar(); EyeZB.Init(); vM.onMapZoomChange = function(z){ EyeZB.ZoomBarSignPos(vM.Zoom()); vMe.FlatZoom(vM.Zoom()); if(_BusCroods == '')return; if(DrawLineFlag == 1) { vM.Body.DrawPolyLine(_LayerLine,vM.Body.ChangeCoords(_BusCroods,vM.Body.ZoomPer[vM.Zoom()]),2,"#FFFF00",0.8); } else if(DrawLineFlag == 2) { vM.Body.DrawPolyLine(_LayerLine,vM.Body.ChangeCoords(_BusCroods,vM.Body.ZoomPer[vM.Zoom()]),2,"#FFFF00",0.8); } }; vM.onPaneEnd = function (x1,y1,x2,y2,flg){ if(flg==0){ fnShowPaneSearch(x1,y1,x2,y2); } }; vM.onScaleEnd = function(dis){ //alert('本次测距总长: ' + dis + '。\r\n以上数据仅供参考,请以实际长度为准。'); }; vM.onMapMouseUp = function(e){ if (_isBeginSelectMark){ _Mark.Mark(vM.PointerX(),vM.PointerY(),''); } }; vM.onMapDblClick = function(e){ if (!_isBeginScale){ if (vM.Zoom() >0){ vM.MoveTo(vM.PointerX(),vM.PointerY()); vMe.MoveTo(vM.PointerX(),vM.PointerY()); vM.FlatZoom(0); } else{ vM.MoveTo(vM.PointerX(),vM.PointerY(),true); vMe.MoveTo(vM.PointerX(),vM.PointerY(),true); } } _isBeginScale = false; }; vMe.onMapMoveEnd = function(x,y,flg){ if(flg==0){vM.MoveTo(x,y,true);} }; vM.onMapMoveEnd = function(x,y,flg){ if(flg==0){vMe.MoveTo(x,y,true);} }; fnLoadHotKey(); fnLoadPopSearchListAD(); fnInitSearchResult(); fnInitPop(); fnAddMarkCss(); _Mark.Load(); if (typeof _PluginList != 'undefined') { for (var i=0; i<_PluginList.length; i++) { if (typeof _PluginList[i].Init == 'function') { _PluginList[i].Init(); } } } setTimeout("fnLoadRotaryPicture()", 3000); // ENetwork.DownloadScript('http://www.google-analytics.com/urchin.js',function(){ //$('BGLoading').style.display = 'none'; DefaultLoadNavigation(); } function DefaultLoadNavigation() { if(typeof(GlobalConfig._isOpenNavigation) != 'undefined') { if (GlobalConfig._isOpenNavigation && IsOpenNav()) { fnShowNav(); } } } function IsOpenNav(){ var Ecode='' Ecode=GlobalConfig._Url.replace(GlobalConfig._Node,'').replace('.',''); if(Ecode!=''&&Ecode!='localhost'){ return false;} var C_ID = fnRequest('cid'); if (C_ID != '' && C_ID*1 > 0) { return false; } var O_ID = fnRequest('oid'); if (/.+?\?\d+$/gi.test(window.document.location.href)) { O_ID = window.document.location.href.replace(/^.+?\?/gi, ''); } if (O_ID != '' && O_ID*1 > 0) { return false; } var title = fnRequest('title'); if(title=="") { title = fnRequest('tname'); } if(title=="") { return true; } var content = fnRequest('content'); var x = fnRequest('x'); if(x=="") { x = fnRequest('tx'); } if(x=="") { return true; } var y = fnRequest('y'); if (y=="") { y = fnRequest('ty'); } if(y=="") { return true; } return false; } function fnScrollBG(hp) { var h = $('BG').style.height.replace('px', '') * 1; h -= hp; if (h > 0) { $('BG').style.height = h + 'px'; setTimeout(function(){fnScrollBG(hp);}, 30); } else { $('BG').style.display = 'none'; } } function fnAddMarkCss() { var MarkCss=vM.$C('link'); MarkCss.rel='stylesheet'; MarkCss.type = 'text/css'; //MarkCss.href='http://localhost/MAP4.2/skins/zh-chs/4.2.0925/default/css/Mark.css'; MarkCss.href=GlobalConfig._CssPath+'Mark.css'; vM.Body.document.getElementsByTagName('head')[0].appendChild(MarkCss); } function fnInitPop(){ if (!cEntityPopControl){ cEntityPopControl = new EntityPopControl({Parent:vM}); cEntityPopControl.ID = vM.appendEntity(cEntityPopControl.Body, _PopLayer, false, 0, 0, 345,340,0,135, false); cEntityPopControl.onLoadComplete = function() { fnEaddGoto(''); fnOCGoto(); fnMarkGoto(); fnLoadQuickLink(); vM.onSpotClick = function(spot){ if (!_isBeginSelectMark){ fnShowEntityPop(spot.ID, spot.CenterX, spot.CenterY); } }; vM.onSpotLabelClick = function(spot){ if (!_isBeginSelectMark){ fnShowEntityPop(spot.ID, spot.CenterX, spot.CenterY); } }; vM.onSignClick = function(sign){ switch (sign.SortKey){ case 'bus': fnShowBusStation(sign.ID); break; case 'vir': window.open(GlobalConfig._WebRootPath + 'Vir/Vir.aspx?Image=' + escape(sign.Url), 'vir', 'width=520,height=400'); break; } }; vM.onContextMenuClick = function(key,wx,wy,mx,my,spot){ switch (key){ case 'spot': if(spot){ fnShowEntityPop(spot.ID, spot.CenterX, spot.CenterY); } break; case 'center': vM.MoveTo(mx,my,true); break; case 'zoomout': vM.FlatZoom(vM.Zoom()+1); break; case 'zoomin': vM.FlatZoom(vM.Zoom()-1); break; case 'start': fnShowFromHereSearch(); break; case 'end': fnShowToHereSearch(); break; case 'cirbus': fnShowPeripheralBus(); break; case 'cirsearch': fnShowPeripheralSearch(); break; case 'errors': if (spot){ fnShowDebugControl(vM.PointerX(),vM.PointerY(), spot.ID, spot.Title, 2); } else{ fnShowDebugControl(vM.PointerX(),vM.PointerY(), 0, '', 0); } break; case 'sign': if (spot){ _Mark.Mark(vM.PointerX(),vM.PointerY(),spot.Title); } else{ _Mark.Mark(vM.PointerX(),vM.PointerY(),''); } break; case 'about': alert('数字城市\r\nhttp://www.ecitymap.cn '); break; } }; } cEntityPopControl.MoveTo(0, 0); cEntityPopControl.onBusIDSearch = function(nID,sName) { cSearchResultControl.BusIDSearch(nID,sName); }; cEntityPopControl.onBusSEXYSearch = function(action,x,y,sKeyword) { cSearchResultControl.BusSEXYSearch(action,x,y,sKeyword); }; cEntityPopControl.onLocalNearBySearch = function(sKeyword,x,y,len) { cSearchResultControl.LocalNearBySearch(sKeyword,x,y,len); }; cEntityPopControl.onHistorySaved = function(type, spot) { fnSaveHistory(type, spot); }; cEntityPopControl.onSign = function(x, y,sName) { cEntityPopControl.Hide(); _Mark.Mark(x, y,sName); }; cEntityPopControl.onCavil = function(type,nID,sName,x, y) { cEntityPopControl.Hide(); fnShowDebugControl(x*1, y*1, nID, sName, type); }; } if (!cThemePopControl){ cThemePopControl = new ThemePopControl({Parent:vM}); cThemePopControl.ID = vM.appendEntity(cThemePopControl.Body, _PopLayer, false, 0, 0, 345,300,0,135, false); cThemePopControl.MoveTo(0, 0); cThemePopControl.onBusIDSearch = function(nID,sName) { cSearchResultControl.BusIDSearch(nID,sName); }; cThemePopControl.onBusSEXYSearch = function(action,x,y,sKeyword) { cSearchResultControl.BusSEXYSearch(action,x,y,sKeyword); }; cThemePopControl.onLocalNearBySearch = function(sKeyword,x,y,len) { cSearchResultControl.LocalNearBySearch(sKeyword,x,y,len); }; cThemePopControl.onHistorySaved = function(type, spot) { fnSaveHistory(type, spot); }; cThemePopControl.onSign = function(x, y,sName) { cThemePopControl.Hide(); _Mark.Mark(x, y,sName); }; cThemePopControl.onCavil = function(type,nID,sName,x, y) { cThemePopControl.Hide(); if (type != 1){ type = 0; } fnShowDebugControl(x*1, y*1, nID, sName, type); }; } if (!cCommendPopControl){ cCommendPopControl = new CommendPopControl({Parent:vM}); cCommendPopControl.ID = vM.appendEntity(cCommendPopControl.Body, _PopLayer, false, 0, 0, 398,300,0,135, false); cCommendPopControl.MoveTo(0, 0); } } function fnShowEntityPop(id,x,y){ vM.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); vMe.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); cEntityPopControl.CID = ''; if(cEntityPopControl.OID!=id){ cEntityPopControl.Hide(); setTimeout(function(){ vM.moveEntity(cEntityPopControl.ID, x*1, y*1); cEntityPopControl.ShowEntityPop(id); }, 100); } else{ vM.moveEntity(cEntityPopControl.ID, x*1, y*1); cEntityPopControl.Show(); } } function fnShowCompanyPop(id,x,y){ vM.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); vMe.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); cEntityPopControl.OID = ''; if(cEntityPopControl.CID!=id){ cEntityPopControl.Hide(); setTimeout(function(){ vM.moveEntity(cEntityPopControl.ID, x*1, y*1); cEntityPopControl.ShowComanyPop(id); }, 100); } else{ vM.moveEntity(cEntityPopControl.ID, x*1, y*1); cEntityPopControl.Show(); } } function fnShowThemePop(id,x,y){ vM.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); vMe.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); if(cThemePopControl.TID!=id){ cThemePopControl.Hide(); setTimeout(function(){ vM.moveEntity(cThemePopControl.ID, x*1, y*1); cThemePopControl.ShowThemePop(id); }, 100); } else{ vM.moveEntity(cThemePopControl.ID, x*1, y*1); cThemePopControl.Show(); } } function fnShowCommendPop(sTitle, sContent, x, y) { vM.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); vMe.MoveTo(x*1 + vM.GetMapPos(170), y*1, true); cCommendPopControl.Hide(); setTimeout(function(){ vM.moveEntity(cCommendPopControl.ID, x*1, y*1); cCommendPopControl.ShowCommendPop(sTitle, sContent); }, 100); } function fnShowSearchControl(){ if (!cSearchControl){ cSearchControl = new SearchControl(); $('Tool').appendChild(cSearchControl.Body); cSearchControl.Width = 303; cSearchControl.Height = 117; cSearchControl.ResumeLayout(); cSearchControl.onLocalSearch = function(sKeyword, iType, sAddress){ cSearchResultControl.LocalSearch(sKeyword, iType, sAddress); }; cSearchControl.onBusSearch = function(iType, param1, param2){ cSearchResultControl.BusSearch(iType, param1, param2); }; cSearchControl.onYellowPageSearch = function(sKeyword){ //window.open(GlobalConfig._LocalUrl + 'LocalSearch/?' + escape(sKeyword), '_blank', ''); window.open('http://' + GlobalConfig._AppDomain + '/yp/KeywordSearchList.aspx?Keyword=' + escape(sKeyword), '_blank', ''); }; } cSearchControl.Show(); } function fnInitSearchResult(){ if (!cSearchResultControl){ cSearchResultControl = new SearchResultControl(); $('DragWindow').appendChild(cSearchResultControl.Body); cSearchResultControl.Body.style.zIndex = 999; cSearchResultControl.Width = 303; cSearchResultControl.Height = 418; cSearchResultControl.ResumeLayout(); cSearchResultControl.MoveTo(0, 0); cSearchResultControl.onLoadComplete = function(){ fnShowSearchControl(); fnLoadRandomTopics(); fnLoadNews(); fnLoadEdushiAnnounce(); fnLoadPro(); fnDragControl($('DragWindow'), 20, 30); fnDragControl($('Tool'), 20, 30); fnUrlGoto(); }; cSearchResultControl.onEntityClick = function(oid,cid,x,y) { if(cid==0) { fnShowEntityPop(oid,x,y); } else { fnShowCompanyPop(cid,x,y); } }; cSearchResultControl.onThemeClick = function(tid,x,y) { fnShowThemePop(tid, x, y); }; cSearchResultControl.onVouchClick = function(title, content, x, y) { fnShowCommendPop(title, content, x, y); }; cSearchResultControl.onLocalDataLoad = function(arrLocalData, nBegin, nEnd){ _IconLayer.innerHTML = ''; _EyeIconLayer.innerHTML = ''; for (var i=nBegin; i 0) { fnAppendIcon(arrLocalData.x[i], arrLocalData.y[i], i+1, GlobalConfig._ImgPath + '12-22.gif', GlobalConfig._ImgPath + 'iconflash.gif', 'parent.fnShowCompanyPop('+arrLocalData.CompanyID[i]+', ' + arrLocalData.x[i] + ', ' + arrLocalData.y[i] + ');',27,37,13,27); } else { fnAppendIcon(arrLocalData.x[i], arrLocalData.y[i], i+1, GlobalConfig._ImgPath + '12-22.gif', GlobalConfig._ImgPath + 'iconflash.gif', 'parent.fnShowEntityPop('+arrLocalData.OwnerID[i]+', ' + arrLocalData.x[i] + ', ' + arrLocalData.y[i] + ');',27,37,13,27); } } }; cSearchResultControl.onClassDataLoad = function(arrClassData,nBegin,nEnd){ _IconLayer.innerHTML = ''; _EyeIconLayer.innerHTML = ''; var sImgUrl = GlobalConfig._PicUrl + GlobalConfig._Country+'/'+GlobalConfig._CityCode+'/'+GlobalConfig._L+'/themeImages/'; for (var i=nBegin; i 0) { var sThemeImage = sImgUrl + 'BBLCompany/' + arrClassData.ComIco[i]; var sThemeImage2 = sThemeImage; } else { var sThemeImage = sImgUrl + arrClassData.CommIco[i]; var sThemeImage2 = sImgUrl + arrClassData.FocusIco[i]; } fnAppendIcon(arrClassData.x[i], arrClassData.y[i], '', sThemeImage, sThemeImage2, 'parent.fnShowThemePop('+arrClassData.ID[i]+', ' + arrClassData.x[i] + ', ' + arrClassData.y[i] + ');',26,26,13,13); } }; cSearchResultControl.onBusDataLoad = function(arrBusData, type){ _BusLayer.innerHTML=''; _LayerLine.innerHTML = ''; _BusCroods = ''; if(arrBusData!=null) { var coords = []; var PopHtml='{$No}{$BusStationName}'; if(type==1){ var l=arrBusData.Bus_BN_UP_BS_StationName_Js.length; for(i=0;i'+ text +''; vM.appendEntity(p, _IconLayer, false, x, y, w,h,ew,eh, false); var pe = vMe.$C('div'); if (sEyeImg && sEyeImg.length > 0){ pe.innerHTML = '
'+ text +'
'; } else{ pe.innerHTML = p.innerHTML; } vMe.appendEntity(pe, _EyeIconLayer, false, x, y, w,h,ew,eh, false); } var _ClassTypeNum=1; //function ThemeMapsList(){} ThemeMapsList.ID=[272,274,379,392,403,410,411,412,413]; ThemeMapsList.TypeName=['教育培训','餐饮美食','婚庆服务','装饰装潢','公共自行车服务点','高校地图','西湖风景区','医院','火车票售票网点']; ThemeMapsList.FocusIco=['Yes20071123150909085280.gif','Yes20071123150819772443.gif','Yes2007112315060738133.gif','Yes20071123150538678860.gif','Yes20080515173932933998.gif','Yes20080701163858323352.gif','Yes20080630174002120983.gif','Yes20080703163621495165.gif','Yes20080703170656479258.gif']; ThemeMapsList.CommIco=['NO20071123155343850748.gif','NO20071123155358616880.gif','NO20071123155518850153.gif','NO2007112315553703825.gif','NO20080515173932933998.gif','NO20080701163858401102.gif','NO20080630174002198254.gif','NO20080703163621495165.gif','NO20080703170656511976.gif']; function fnLoadPro(){ var url= GlobalConfig._DataCenterUrl + 'CommMap/themeInfo.aspx?node='+GlobalConfig._Node+'&viewxml=&req=1&v=1.0'; ENetwork.DownloadScript(url,function(){ if(typeof ThemeMapsList=='undefined'||ThemeMapsList==null)return false; var t=''; for(i=ThemeMapsList.ID.length-1;i>=0;i--){ var sCommonIcon = GlobalConfig._PicUrl + GlobalConfig._Country+'/'+GlobalConfig._CityCode+'/'+GlobalConfig._L+'/themeImages/'+ThemeMapsList.CommIco[i]; var sFocusIcon = GlobalConfig._PicUrl + GlobalConfig._Country+'/'+GlobalConfig._CityCode+'/'+GlobalConfig._L+'/themeImages/'+ThemeMapsList.FocusIco[i]; t+= '
  • ' + ThemeMapsList.TypeName[i] + '
  • '; } $('ulThemeList').innerHTML = t; fnInitThemeList(); var tid = fnRequest('tid'); var tname = fnRequest('tname'); if (tid != '' & tname != '') { fnLoadProById(tid, unescape(tname)); } var tpop = fnRequest('tpop'); if (tpop != '') { fnShowThemePop(tpop, fnRequest('x')*1, fnRequest('y')*1); } }); } function fnLoadProById(Tid,Tname){ cSearchResultControl.ClassSearch(Tid, Tname); } function fnInitThemeList() { var ulThemeList = $('ulThemeList'); var iLen = ulThemeList.childNodes.length; var iMaxWidth = 0; var iClipWidth = fnGetWindowWidth()-390; var iStepWidth = 5; var hwScroll; for (var i=0; i 0) { ulThemeList.parentNode.style.left = '0px'; window.clearInterval(hwScroll); } else { ulThemeList.parentNode.style.left = (iLeft + iStepWidth) + 'px'; } }, 20); } $('btnThemeScrollRight').onmouseover = function(){ window.clearInterval(hwScroll); hwScroll = setInterval(function(){ var iLeft = ulThemeList.parentNode.style.left.replace('px', '')*1; if ((iLeft*-1 + iClipWidth + iStepWidth) >= iMaxWidth) { ulThemeList.parentNode.style.left = (iClipWidth - iMaxWidth) + 'px'; window.clearInterval(hwScroll); } else { ulThemeList.parentNode.style.left = (iLeft - iStepWidth) + 'px'; } }, 20); } $('btnThemeScrollLeft').onmouseout = function(){ window.clearInterval(hwScroll); } $('btnThemeScrollRight').onmouseout = function(){ window.clearInterval(hwScroll); } } function fnLoadQuickLink(){ getQuickLinkList(); // var url=GlobalConfig._EDataCenterUrl + 'Commmap/QuickLink.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0'; // var QuickLinkList = [ {Title:'E都市大本营',Flag:2,CompanyID:29586,OwnerID:0,x:15811,y:14588}, {Title:'汽车东站',Flag:2,CompanyID:11734,OwnerID:0,x:34036,y:31353}, {Title:'汽车南站',Flag:2,CompanyID:51031,OwnerID:0,x:18140,y:35890}, {Title:'汽车北站',Flag:2,CompanyID:47572,OwnerID:0,x:21832,y:9296}, {Title:'城站火车站',Flag:2,CompanyID:11667,OwnerID:0,x:19161,y:33521}, {Title:'杭州大厦',Flag:1,CompanyID:0,OwnerID:22089,x:21939,y:25001}, {Title:'解百商厦',Flag:1,CompanyID:0,OwnerID:27254,x:16313,y:29666}, {Title:'银泰武林店',Flag:2,CompanyID:7700,OwnerID:0,x:21166,y:26264}, {Title:'银泰西湖店',Flag:1,CompanyID:0,OwnerID:18925,x:14946,y:30809}, {Title:'四季青',Flag:1,CompanyID:0,OwnerID:12814,x:23121,y:34699}, {Title:'龙翔',Flag:1,CompanyID:0,OwnerID:25280,x:18138,y:28402}, {Title:'黄龙体育中心',Flag:2,CompanyID:8066,OwnerID:0,x:13015,y:21554}, {Title:'和平广场',Flag:1,CompanyID:0,OwnerID:15989,x:30818,y:24112}, {Title:'运河广场',Flag:1,CompanyID:0,OwnerID:7972,x:29386,y:13891}, {Title:'吴山广场',Flag:1,CompanyID:0,OwnerID:16977,x:12867,y:31462}, {Title:'武林广场',Flag:1,CompanyID:0,OwnerID:34440,x:21921,y:25579}, {Title:'西城广场',Flag:1,CompanyID:0,OwnerID:2248,x:7050,y:12866}, {Title:'下沙高教园',Flag:1,CompanyID:0,OwnerID:32633,x:91052,y:53022}, {Title:'浙大紫金港',Flag:1,CompanyID:0,OwnerID:34439,x:11345,y:7285}, {Title:'西湖',Flag:1,CompanyID:0,OwnerID:26286,x:15539,y:25966} ]; // var link = document.createElement('a'); // link.href = 'javascript:;'; // $('ulQickLinkList').appendChild(link); } function getQuickLinkList(){ for (var i=0; i'+d.Title[i]+''; if (d.AutoActive[i] == 1) { fnLoadNewsById(d.ID[i], d.Title[i]); } } $('divNews').innerHTML=''+t+'
    '; objup = new CBoardExhibition("objup", "divNews", 3, true, "up", 0, 2000); objup.ShowMsg(); fnUrlGoto(); }); } function fnLoadEdushiAnnounce(){ var url=GlobalConfig._DataCenterUrl + 'CommMap/Public.aspx?node=www.edushi.com&l='+GlobalConfig._L+'&v=1.0&req=1'; ENetwork.DownloadScript(url,function(){ if(typeof EdushiAnnounceList=='undefined' || !EdushiAnnounceList )return false; if (EdushiAnnounceList.length > 0) { var t=''; for(i=0;i' + EdushiAnnounceList[i].Title + ''; } else { t+='' + EdushiAnnounceList[i].Title + '     '; } } $('EdushiAnnounceText').innerHTML=''+t+'
    '; $('EdushiAnnounce').style.display = 'block'; objEdushiAnnounce = new CBoardExhibition("objEdushiAnnounce", "EdushiAnnounceText", 3, true, "up", 0, 2000); objEdushiAnnounce.ShowMsg(); } }); } function fnLoadNewsById(Tid,sTitle){ cSearchResultControl.NewsSearch(Tid,sTitle); } var _HistoryArray = []; function fnSaveHistory(type, spot){ fnFlashFont('txtHistoryFont', 'white', 'red'); var sFnName; if (type == 2) { spot.ID = spot.ComID; spot.OwnerName = spot.CompanyName; spot.OEddress = spot.ComEaddress; spot.CenterX = spot.ComX; spot.CenterY = spot.ComY; sFnName = 'fnShowCompanyPop'; } else if (type == 3) { spot.ID = spot.ComID; spot.OwnerName = spot.CompanyName; spot.OEddress = spot.ComEaddress; spot.CenterX = spot.ComX; spot.CenterY = spot.ComY; sFnName = 'fnShowThemePop'; } else { sFnName = 'fnShowEntityPop'; } if (_HistoryArray.length >= 1) { if (_HistoryArray[_HistoryArray.length-1] == type + '_' + spot.ID) { return; } } if (_HistoryArray.length >=20 ) { var arr = $('divHistoryList').getElementsByTagName('a'); $('divHistoryList').removeChild(arr[arr.length-1]); _HistoryArray.shift(); } _HistoryArray.push(type + '_' + spot.ID); $('divHistoryList').innerHTML = '> ' + spot.OwnerName + '' + $('divHistoryList').innerHTML; } function fnUrlGoto(){ var x = fnRequest('x'); if (x != '') { var y = fnRequest('y'); if (y != '') { vM.MoveTo(x, y, true); } } var q = fnRequest('q'); if (q != '') { cSearchResultControl.LocalSearch(unescape(q)); } var nq = fnRequest('nq'); if (nq != '') { cSearchResultControl.LocalNearBySearch(unescape(nq),x,y,1000); } var b = fnRequest('b'); if (b != '') { if (/^\w?\d+$/.test(b)) { cSearchResultControl.BusSearch(0, b, ''); } else { cSearchResultControl.BusSearch(1, unescape(b), ''); } } var s = fnRequest('s'); if (s != '') { cSearchResultControl.BusSearch(1, unescape(s), ''); } var b1 = fnRequest('b1'); if (b1 != '') { var b2 = fnRequest('b2'); if (b2 != '') { cSearchResultControl.BusSearch(2, b1, b2); } } } function fnEaddGoto(Ecode){ if(Ecode=='')Ecode=GlobalConfig._Url.replace(GlobalConfig._Node,'').replace('.',''); //Ecode='E13134'; if(Ecode!=''&&Ecode!='localhost'){ var url= GlobalConfig._DataCenterUrl + 'CommMap/CompanyInfo.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=3&e='+Ecode; ENetwork.DownloadScript(url,function(){ if (typeof ocType == 'undefined') { return; } if(ocType==1){ fnShowCompanyPop(c.ComID, c.ComX, c.ComY); }else if(ocType==2){ if(typeof o!='undefined'&&o!=null){ fnShowEntityPop(o.ID, o.CenterX, o.CenterY); } } }); } } function fnOCGoto(){ var url; var C_ID = fnRequest('cid'); if (C_ID != '' && C_ID*1 > 0) { url= GlobalConfig._EDataCenterUrl + 'CommMap/EntityInfo.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=1&id='+C_ID; ENetwork.DownloadScript(url,function(){ fnShowCompanyPop(c.ComID, c.ComX ,c.ComY); }); return; } var O_ID = fnRequest('oid'); if (/.+?\?\d+$/gi.test(window.document.location.href)) { O_ID = window.document.location.href.replace(/^.+?\?/gi, ''); } if (O_ID != '' && O_ID*1 > 0) { url= GlobalConfig._EDataCenterUrl + 'CommMap/EntityInfo.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=2&id='+O_ID; ENetwork.DownloadScript(url,function(){ if(typeof o!='undefined'&& o!=null) { fnShowEntityPop(o.ID, o.CenterX ,o.CenterY); } }); } } function fnMarkGoto(){ var title = fnRequest('title'); if(title=="") { title = fnRequest('tname'); } if(title=="") { return; } var content = fnRequest('content'); var x = fnRequest('x'); if(x=="") { x = fnRequest('tx'); } if(x=="") { return; } var y = fnRequest('y'); if (y=="") { y = fnRequest('ty'); } if(y=="") { return; } _Mark.Show('EMark',x,y,title,content); } function fnShowLayer(id, status) { $(id).style.display = status; } function fnLabel(){ if(vM.flgShowLabel){ vM.flgShowLabel=false; vM.ViewLabels(false); vM.Show(); }else{ vM.flgShowLabel=true; vM.ViewLabels(true); vM.Show(); } } function fnStation(){ if(vM.Body.SignsVisible['bus']){ vM.ViewSigns(false, 'bus'); vM.Show(); }else{ vM.ViewSigns(true, 'bus'); vM.Show(); } } function fnRoad(){ if(vM.Body.SignsVisible['road']){ vM.ViewSigns(false, 'road'); vM.Show(); }else{ vM.ViewSigns(true, 'road'); vM.Show(); } } function fnPack(){ if(vM.Body.SignsVisible['park']){ vM.ViewSigns(false, 'park'); vM.Show(); }else{ vM.ViewSigns(true, 'park'); vM.Show(); } } function fnSubWay(){ if(vM.Body.SignsVisible['subway']){ vM.ViewSigns(false, 'subway'); vM.Show(); }else{ vM.ViewSigns(true, 'subway'); vM.Show(); } } function fnShowli(o){ if(o.className=='action'){ o.className='unaction'; }else{ o.className='action'; } } function fnMarkLi(o){ if(o.id=="MarkHiddinall"){ $('MarkShowall').className='unaction'; }else{ $('MarkHiddinall').className='unaction'; } if(o.className!='action')o.className='action'; } function fnDisplayTool(id){ if ($(id).style.display == 'none') { $(id).style.display = 'block'; } else { $(id).style.display = 'none'; } } function fnLoadHotKey(){ var url= GlobalConfig._DataCenterUrl + 'CommMap/ad.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=4'; ENetwork.DownloadScript(url); } function fnLoadRotaryPicture(){ if (!cRotaryPictureControl){ cRotaryPictureControl = new RotaryPictureControl(); cRotaryPictureControl.Body.style.width = '241px'; cRotaryPictureControl.Body.style.height = '203px'; cRotaryPictureControl.Body.style.right = '1px'; cRotaryPictureControl.Body.style.bottom = '-203px'; cRotaryPictureControl.Body.style.zIndex = '3000'; cRotaryPictureControl.Body.style.position = 'absolute'; document.body.appendChild(cRotaryPictureControl.Body); cRotaryPictureControl.onDataLoadComplete = function(){ cRotaryPictureControl.Show(); fnShowRotaryPicture(); }; } else{ cRotaryPictureControl.Body.style.bottom = '-203px'; cRotaryPictureControl.Show(); } } function fnShowRotaryPicture(){ var b = cRotaryPictureControl.Body.style.bottom.replace('px', ''); b = parseInt(b); if (b < 0) { b += 10; if (b > 0) { b = 0; } cRotaryPictureControl.Body.style.bottom = b + 'px'; setTimeout("fnShowRotaryPicture()", 50); } } function fnLoadPopSearchListAD(){ var popadurl= GlobalConfig._DataCenterUrl + 'CommMap/ad.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=6'; ENetwork.DownloadScript(popadurl,function(){ if(typeof POPAd=='undefined'|| POPAd==null) { return false; } else { return true; } }); var searchlistadurl= GlobalConfig._DataCenterUrl + 'CommMap/ad.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=7'; ENetwork.DownloadScript(searchlistadurl,function(){ if(typeof SearchListAd =='undefined'|| SearchListAd ==null) { return false; } else { return true; } }); var C_ID = fnRequest('cid'); var O_ID = fnRequest('oid'); if (/.+?\?\d+$/gi.test(window.document.location.href)) { O_ID = window.document.location.href.replace(/^.+?\?/gi, ''); } if((C_ID!=''|| O_ID!='')&&(C_ID*1>0||O_ID*1>0)) { if(document.referrer!='') { window._isSourceUrl = true; var sourcepopadurl= GlobalConfig._DataCenterUrl + 'CommMap/ad.aspx?node='+GlobalConfig._Node+'&l='+GlobalConfig._L+'&v=1.0&req=8'; ENetwork.DownloadScript(sourcepopadurl,function(){ if(typeof SourceAd =='undefined'|| SourceAd ==null) { return false; } else { return true; } }); } } } function fnDragControl(o,w,h) { if (typeof o == "string") o = document.getElementById(o); o.orig_x = parseInt(o.style.left) - document.body.scrollLeft; o.orig_y = parseInt(o.style.top) - document.body.scrollTop; o.orig_index = o.style.zIndex; o.onmousedown = function(a) { this.style.cursor = "move"; this.style.zIndex = 10000; var d=document; if(!a)a=window.event; var x = a.clientX+d.body.scrollLeft-o.offsetLeft; var y = a.clientY+d.body.scrollTop-o.offsetTop; d.ondragstart = "return false;" d.onselectstart = "return false;" d.onselect = "document.selection.empty();" if (a.target) { fnSetDragFlag(a.target, 1, w, h) } if(o.setCapture) o.setCapture(); else if(window.captureEvents) window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); d.onmousemove = function(a) { if(!a)a=window.event; o.style.left = a.clientX+document.body.scrollLeft-x + 'px'; o.style.top = a.clientY+document.body.scrollTop-y + 'px'; o.orig_x = parseInt(o.style.left) - document.body.scrollLeft; o.orig_y = parseInt(o.style.top) - document.body.scrollTop; } d.onmouseup = function() { if(o.releaseCapture) o.releaseCapture(); else if(window.captureEvents) window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); d.onmousemove = null; d.onmouseup = null; d.ondragstart = null; d.onselectstart = null; d.onselect = null; o.style.cursor = "normal"; o.style.zIndex = o.orig_index; if (a.target) { fnSetDragFlag(a.target, 0, w, h) } } } } function fnSetDragFlag(t, flag, w, h) { if (flag == 1) { t.style.width = fnGetWindowWidth()*2 + 'px'; t.style.height = fnGetWindowHeight()*2 + 'px'; t.style.left = fnGetWindowWidth()*-1 + 'px';; t.style.top = fnGetWindowHeight()*-1 + 'px'; } else { t.style.width = w + 'px'; t.style.height = h + 'px'; t.style.left = 0; t.style.top = 0; } } function fnFlashFont(objId, sOldColor, color) { var obj = $(objId); obj.style.color = sOldColor; var iCount = 0; var iMaxCount = 5; var hwTimer = setInterval(function(){ if (iCount >= iMaxCount) { obj.style.color = sOldColor; window.clearInterval(hwTimer); } else { iCount++; obj.style.color == sOldColor ? obj.style.color = color : obj.style.color = sOldColor; } }, 100); }