﻿//城市ID
CITY_UNDEFINED = 0;
CITY_BEIJING = 1;		//北京
CITY_MACAU = 2;			//澳门
CITY_NANNING = 3;		//南宁
CITY_JIUQUAN = 4;		//酒泉
CITY_TANGSHAN = 5;		//唐山
CITY_YANGZHOU = 6;		//扬州
CITY_SHANGHAI = 7;		//上海
CITY_SANYA = 8;			//三亚
CITY_PINGQUAN = 9;		//平泉
CITY_CHANGSHA = 10;		//长沙
CITY_CHONGQING = 11;	//重庆
CITY_NINGBO = 12;		//宁波
CITY_DUSHANZI = 13;		//独山子
CITY_ANFANG = 14;		//安防项目
CITY_HONGKONG = 15;		//香港


//IDX版本信息
IDX_VERSION_0 = 0;
IDX_VERSION_1 = 1;
IDX_VERSION_2 = 2;

IDX_VERSION_BEIJING = 0;
IDX_VERSION_MACAU = 0; 
IDX_VERSION_UNDEFINED = 1;
IDX_VERSION_DUSHANZI = 2;



//缓存的存放方式
CF_SINGLE = 0;	//使用大文件缓存
CF_MULTI = 1;	//使用多文件缓存

//远程控制的类型
REMOTE_CONTROL_DISABLE = 0;	//禁止使用缓存
REMOTE_CONTROL_UDP	= 1;	//使用UDP方式
REMOTE_CONTROL_PIPE = 2;	//使用管道方式(暂未实现)

//数据访问的方式
IO_TYPE_NET_FILE = 0;		//数据在服务器上以文件形式访问
IO_TYPE_NET_DBMS = 1;		//数据在服务器上以数据库形式访问
IO_TYPE_LOCAL_FILE = 2;		//直接访问本地数据
IO_TYPE_LOCAL_DBMS = 3;		//直接访问本地数据库(暂未实现)


CFG=
{
	/*服务器信息配置*/		
	DataServer: ['192.168.2.207', 80],
	LogServer: ['192.168.0.207', 80 ],
	IMServer: ['192.168.0.233', 8168 ],
	Host: location.hostname, 
	Port: location.port || 80, 


	/*控件访问数据的地址*/
	URL:
	[
		['EarthMap',    'vc_EarthMap',  'io.do?op=GetEarthMap&', 'E:/Seperate/ningbo/EarthDataBlue/'],
		['Model',       'vc_Model',     'io.do?op=GetModel&',    'E:/Seperate/ningbo/data/'],	
		['Texture',     'vc_Texture',   'io.do?op=GetTexture&',  'E:/Seperate/ningbo/data/'],
		['File',        'vc_File',      'vc_File',               'E:/diciti/ningbo/webapp/enterprise/ppt/path/']    
	],
	
	/*远程控制的通信协议类型*/
	RemoteControl:	REMOTE_CONTROL_DISABLE,	
	
	/*控件访问数据的方式*/
	IO: IO_TYPE_NET_FILE,
	
	/*IDX版本信息*/
	IdxVersion: IDX_VERSION_0,
	IdxVersionArray: 
	{
		Version0: [
				   	CITY_BEIJING, 
					CITY_MACAU
				  ],
		Version1: [
				   	CITY_NINGBO, 
					CITY_NANNING
				  ],
		Version2: [	CITY_UNDEFINED,
				   	CITY_DUSHANZI,
					CITY_ANFANG
				  ]
	},

	/*控件缓存信息*/
	CacheInfo:
	{
		CacheEnable:   true,
		CacheVersion:  39,
		CacheName:     'Cache1023',
		CacheFormat:   CF_SINGLE
	},

	/*需要更新的文件列表*/
	UpdateFile:
	[
		['mfc80.dll',           '8.0.50727.762',	0,  1],
		['msvcr80.dll',         '8.0.50727.1433',	0,  1],
		['msvcp80.dll',         '8.0.50727.1433',	0,  1],
		['dbghelp.dll',         '5,1,2600,2180',    0,  1],
		['jpeg62.dll',          '6,2,1961,25445',   0,  0],
		['Jpeg2K.dll',          '1,0,0,11',         0,  0],
		['ReadMriFile.dll',     '1,0,0,13',         0,  0],
		['MapEngine.dll',       '1,0,0,31',         0,  0],
		['EarthViewer.dll',     '1,0,0,168',        0,  0],
		['DebugReport.exe',     '1,0,0,3',          0,  0],
		['ChatClientNetWork.dll','1,0,0,21',        0,  0],
		['DicitiControl.dll',    '1,0,0,521',		1,  0]
	],
	
	DicitiLoader:
	{
		Version:    45,	    
		Progid:     'DICITI.DicitiLoader',
		Clsid:      'D2F6A8F9-DFFC-4dc8-A6A9-6200B4D15155',
		CodeBase:   '/updatefile/diciti.cab',
		HelpString:	'DicitiLoader Class'
	},
	
	DicitiControl:
	{
		Version:	null,
		Progid:		'DICITI.DicitiWebControl.1',
		Clsid:		'5390F460-F8D4-4962-9405-6BD64CC5AA9E',
		HelpString:	'DICITI 3D Control Web Version',
		Setup:		['DicitiWebPluginSetup.zip', 'DicitiWebPluginSetupEN.zip']
	},	
	DicitiControlLocal:
	{
		Version:	null,
		Progid:		'DICITI.DicitiLocalControl.1',
		Clsid:		'B5499668-4334-4c9b-8646-C5C84AB305EE',
		HelpString:	'DICITI 3D Control Local Version',
		Setup:		[],
		notUpdate:	true
	},		
	DicitiControlMacau:
	{
	
		Progid:		'DICITI.MacauControl.1',
		Clsid:		'CF074D5E-F743-4b27-A960-051FEE82B1E0',
		HelpString:	'Macau 3D Control',
		Setup:		['MacauControlSetup.exe'],
		notUpdate:	true
	},	
	DicitiControlNingbo:
	{
		Progid:		'DICITI.NingboControl.1',		
		Clsid:		'ACE625A5-7915-4542-9985-2699723AC06C',		
		HelpString:	'Ningbo 3D Control',
		Setup:		['NingboControlSetup.exe'],
		notUpdate:	true
	},
	DicitiControlNanning:
	{
		Progid:		'DICITI.NanningControl.1',		
		Clsid:		'2B3E64D6-2E87-432e-B6C6-3BFA83B94D82',		
		HelpString:	'Nanning 3D Control',
		Setup:		['NanningControlSetup.exe'],
		notUpdate:	true
	},
	
	SeparatVersion:	[
					 	[CITY_BEIJING, 'DicitiControl'],
					 	[CITY_NINGBO, 'DicitiControlNingbo'],
						[CITY_MACAU, 'DicitiControlMacau']
					],

	Timeout:		
	{
		Conn:   5,	 
		Send:   5,  	 
		Recv:   10		 
	},
	
	Timer:
	{
		Post:   60,		 
		Render: 10	 
	},
	
	Position:
	{
		China:		[-3148380.3025, 8435143.0005, 5899771.8848, 0.3139, -0.8137, -0.4891], 
		Beijing:	[-2182668.9213, 4402324.2853, 4112398.1764, 0.3406, -0.6870, -0.6418], 
		Macao:		[-2359768.8405, 5414983.2788, 2408012.5644, 0.7406, -0.6345, 0.2208], 
		Nanning:	[-1850625.7132, 5583022.3005, 2471996.2424, -0.0145, -0.9997, -0.0215], 
		Yangzhou:	[-2647915.0685, 4692516.4472, 3418734.3557, 0.4149, -0.7353, -0.5357],
		Tangshan:	[-2320323.5372, 4332265.4107, 4067135.5465, 0.8390, -0.5440, -0.0058],
		Shanghai:	[-2854031.2353, 4659616.7347, 3307048.0864, 0.4824, -0.8013, -0.3540],
		Sanya:		[-2029625.1579, 5725594.0840, 1997157.6601, 0.3146, -0.9472, -0.0613],
		Changsha:	[-2148972.8121, 5199958.8634, 3020530.5274, 0.3183, -0.9448, 0.0783],
		Chongqin:	[-1582130.9120, 5320573.2534, 3143719.8076, 0.2453, -0.9242, 0.2927],
		Ningbo:		[-2900443.9151, 4723182.7857, 3175079.6395, 0.5070, -0.8615, 0.0279],
		Dushanzi:	[404344.8633, 4545417.4452, 4456924.4410, -0.1007, -0.9944, -0.0319],
		Anfang:		[-2172953.7468, 4377248.0147, 4098762.1385, 0.8703, -0.3902, 0.3006],
		HK:			[-2417832.8756, 5384891.6975, 2419339.5652, 0.4354, -0.7484, 0.5003]					 
	},     
	
					
	TopURL:            '',
	SearchExtension:   1,
	PoiDistance:       200000,
	MinAltitude:       2,
	MaxWindowNum:      30,
	LogCount:          false,
	LogUpdate:         true
};


function cfg_init()
{
	CFG.DicitiLoader.CodeBase += "#version=1,0,0," + CFG.DicitiLoader.Version;
	CFG.DicitiLoader.Progid += "." + CFG.DicitiLoader.Version;
	CFG.TopURL = location.protocol + '//' + CFG.Host + ':' + CFG.Port + '/';
	
	var domain = document.domain.toLowerCase();
	switch(domain)
	{
		case "www.diciti.com":
		case "diciti.com":
		case "210.51.190.24":
		case "macau.diciti.com":
		case "security.diciti.com":
		{
			CFG.DataServer = ["210.51.190.24", 80];
			CFG.LogServer = CFG.DataServer;
			CFG.IMServer = CFG.DataServer;
			delete CFG.LogServer;
			CFG.LogCount = true;   
			//CFG.LogUpdate = false;
		}   
		break;	
		
		case "210.51.190.111":
		{
			CFG.DataServer = ["210.51.190.111", 80];
			CFG.LogServer = CFG.DataServer;
			CFG.IMServer = CFG.DataServer;
		}
		break;
	}
}

cfg_init();



