//切换城市盒子
function MapSwitchCityBoxBlock(showName,rootpath,switchFlag)
{
  var windowName = getBrowserVersion();//判断浏览器版本
  this.iCurrentCityCode = 0;
  this.strCurrentCityName = '';
  this.fCenterLng = 0.0;
  this.fCenterLat = 0.0;
  this.bgWidth = window.screen.availWidth - 21;
  this.bgHeight = window.screen.availHeight - 100;
  if(typeof(rootpath) == "undefined" || rootpath == null){
	  rootpath = rootpath_js+"/yxw/getBlockByIdAction.do?blockId="+switchFlag;
  }
  if(windowName=="safari"||windowName=="chrome"){//苹果浏览器\遨游浏览器
	  this.innerHTML = '<div id="divSwitchCityContent_block" style="background-color:white;position: absolute;height: 280px;width: 570px;z-index: 1000;">'
          + '<iframe id="ifrSwitchCity_weather" width="570px" height="280px" frameborder="0" scrolling="no" src="'+ rootpath +'"></iframe>'
          + '</div>';
  }else{
	  this.innerHTML = '<div id="divSwitchCityContent_block" style="background-color:white;position: absolute;height: 280px;width: 570px;z-index: 1000;">'
          + '<iframe id="ifrSwitchCity_weather" width="570px" height="280px" frameborder="0" scrolling="no" src="'+ rootpath +'"></iframe>'
          + '</div>';
  }
  this.get = function()
  {
    return this.innerHTML;
  }
    
  this.getCurrentCityCode = function( )
  {
    return this.iCurrentCityCode;
  }
  this.getCurrentCityName = function( )
  {
    return this.strCurrentCityName;
  }
  this.getCenterLng= function(  )
  {
    return this.fCenterLng;
  }
  this.getCenterLat= function(  )
  {
    return this.fCenterLat;
  }
  
  this.setCurrentCityCode = function(iCode)
  {
    this.iCurrentCityCode = iCode;
  }

  this.setCurrentCityName = function( strName )
  {
      this.strCurrentCityName = strName;
  }
    
  this.setCurrentCity = function(iCityID, strCityName)
  {
    this.iCurrentCityCode = iCityID;
    this.strCurrentCityName = strCityName;
  }
  
  this.setCenterLngLat = function( fLng, fLat )
  {
    this.fCenterLng = fLng;
    this.fCenterLat = fLat;
  }
}
