﻿
//显示右键
if( typeof showRightClick == 'undefined' )
    showRightClick=true;
//显示小地图
if( typeof _isLoadMiniMap == 'undefined' )
    _isLoadMiniMap = true;
//显示绽放条
if( typeof _isLoadZoomBar == 'undefined' )
    _isLoadZoomBar = true;

if (typeof _issuperMiniMap == 'undefined')
    _issuperMiniMap = false;

if (typeof _isNetStreet == 'undefined')
    _isNetStreet = 0;

if (typeof _isloadads == 'undefined')
    _isloadads = 1; //是否加载广告 0 不在 1 载

if (typeof _isloadgoogle == 'undefined')
    _isloadgoogle = 0; //是否加载谷歌地图 0 不在 1 载
if (typeof o_zoom == 'undefined')
    o_zoom = 4; //设置地图等级 默认为 4
if (typeof _maptype == 'undefined')
    _maptype = 3; //设置类型 默认为 4
var isAdminUser= false;
var Esc_config = {};
/*Esc_config-head*///该行不可删除后台辨别使用


Esc_config['hc'] = Esc_config['1'] = { domain: 'hc', province: 'GUANGXI', city: 1, cityid: 27, mapid: 2, x: 232120, y: 219206, mpx: 0.038725, mpy: 0.038725, ruler: 200, msize: 8, mapPath: 'http://pic.xdesc.com/hc/', mapRootPath: 'http://m.xdesc.com/', z: o_zoom, isLoadMiniMap: _isLoadMiniMap, isLoadZoomBar: _isLoadZoomBar, issuperMiniMap: _issuperMiniMap, isnetstreet: _isNetStreet, isloadads: _isloadads, isloadgoogle: _isloadgoogle, maptype:3, Glatitude: null , Glongitude: null  }; //xPicPath添加于2008-06-07　by 柳寒风

Esc_config['nn'] = Esc_config['2'] = { domain: 'nn', province: 'GUANGXI', city: 2, cityid: 172, mapid: 2, x: 232120, y: 219206, mpx: 0.038725, mpy: 0.038725, ruler: 200, msize: 8, mapPath: 'http://pic.xdesc.com/nn/', mapRootPath: 'http://m.xdesc.com/', z: o_zoom, isLoadMiniMap: _isLoadMiniMap, isLoadZoomBar: _isLoadZoomBar, issuperMiniMap: _issuperMiniMap, isnetstreet: _isNetStreet, isloadads: _isloadads, isloadgoogle: _isloadgoogle, maptype:4, Glatitude: 22.817642 , Glongitude: 108.365631  }; //xPicPath添加于2008-06-07　by 柳寒风

Esc_config['lz'] = Esc_config['3'] = { domain: 'lz', province: 'GUANGXI', city: 3, cityid: 177, mapid: 2, x: 232120, y: 219206, mpx: 0.038725, mpy: 0.038725, ruler: 200, msize: 8, mapPath: 'http://pic.xdesc.com/lz/', mapRootPath: 'http://m.xdesc.com/', z: o_zoom, isLoadMiniMap: _isLoadMiniMap, isLoadZoomBar: _isLoadZoomBar, issuperMiniMap: _issuperMiniMap, isnetstreet: _isNetStreet, isloadads: _isloadads, isloadgoogle: _isloadgoogle, maptype:4, Glatitude: 24.325468 , Glongitude: 109.415912  }; //xPicPath添加于2008-06-07　by 柳寒风

Esc_config['gl'] = Esc_config['4'] = { domain: 'gl', province: 'GUANGXI', city: 4, cityid: 178, mapid: 2, x: 232120, y: 219206, mpx: 0.038725, mpy: 0.038725, ruler: 200, msize: 8, mapPath: 'http://pic.xdesc.com/gl/', mapRootPath: 'http://m.xdesc.com/', z: o_zoom, isLoadMiniMap: _isLoadMiniMap, isLoadZoomBar: _isLoadZoomBar, issuperMiniMap: _issuperMiniMap, isnetstreet: _isNetStreet, isloadads: _isloadads, isloadgoogle: _isloadgoogle, maptype:4, Glatitude: 25.273566 , Glongitude: 110.290195  }; //xPicPath添加于2008-06-07　by 柳寒风



//以下为网街配置参数
Esc_config['hc-netstreet'] = Esc_config['2'] = { domain: 'hc', province: 'GUANGXI', city: 1-1, cityid: 27, mapid: 2, x: 139072, y: 134572, mpx: 0.038725, mpy: 0.038725, ruler: 200,  msize: 8, mapPath: 'http://pic.xdesc.com/hcwj/', mapRootPath: 'http://m.xdesc.com/', z: 3,  isLoadMiniMap: _isLoadMiniMap, isLoadZoomBar: _isLoadZoomBar, issuperMiniMap: _issuperMiniMap, isnetstreet: _isNetStreet, isloadads: _isloadads, isloadgoogle: 0, maptype: 3 , Glatitude: null, Glongitude: null }; //xPicPath添加于2008-06-07　by 柳寒风


//南宁 22.817642,108.365631

//桂林 25.273566,110.290195

//柳州 24.325468,109.415912

/*Esc_config-end*///该行不可删除 后台辨别使用


var city=0;
var province='';
var o_filter=[];
var o_nav=null;
var o_strlist=[];
var Esc_customValue=null;
//var o_mapPath='';
var o_filePath='http://image.m.cn/';
var host=host?host:document.location.host;
var domain=domain?domain:host.split('.')[0]; 
if(!Esc_config[domain])
{
    domain='hc';
}
if(typeof(o_mapid)=='undefined'||typeof(o_mapid)!='number')var o_mapid=0;
var useNav=false;

function setFilter(filter){
	if(!filter)filter=o_filter;
	for(var i=0;i<filter.length;i++){
		var item=filter[i];
		delete Esc_customValue[item];
	}
}

function setConfig(key){
    var flag = true;
    if (key && Esc_config[key]) {
        if (_isNetStreet && key.indexOf('-netstreet') < 0) key += '-netstreet'; //判断是否是网街 设置Esc_config
       
		Esc_customValue=Esc_config[key];
		o_mapid=Esc_customValue.mapid;
	}
	else if(Esc_config[domain]){
		Esc_customValue=Esc_config[domain];
		o_mapid=Esc_customValue.mapid;
	}
	else if(Esc_config[o_mapid]){
		flag=false;
		Esc_customValue=Esc_config[o_mapid];
	}
	else{
		Esc_customValue=Esc_config['hc'];
    }
  
   //标识最初中心点
    Esc_customValue.basex = Esc_customValue.x;
    Esc_customValue.basey = Esc_customValue.y;
	
	o_mapid=Esc_customValue.mapid;
	city=Esc_customValue.city;
	province=Esc_customValue.province;
	setFilter();
	//o_mapPath='/resource/mappic/';
	var dir='zh_cn';
	if(!key&&flag)document.write('<script src="/js/data/'+dir+'/'+domain+'.js"></script>');
}
function setDomain(i){
	if(typeof(i)!='number')i=0;
	var arr=host.split('.');
	if(i>arr.length) {
		alert('domain err');
		return;
	}
	domain=arr[i];
}
function setNav(){
	if(o_nav)
	{
	    document.write(o_nav);
	    if(true==useNav)
	    {
	        document.getElementById('divMapNav').style.display='';
	    }else
	    {
	        document.getElementById('divMapNav').style.display='none';
	    }
	}
	else
	{
	    document.getElementById('divMapNav').style.display='none';
	}
}
function setHot(index){
	if(o_strlist[index])document.write(o_strlist[index]);
}
function setTitle(){
    try
    {
	    if(o_strlist['city'])document.title='E商城-'+o_strlist['city']+'站';
	    else document.title='E商城三维地图';
	}catch(e)
	{
	    alert("message:"+e.message);
	}
}
function setLogo(type){
    if(type!=null&&type=="admin")
    {
        document.write('<img src=../images/logo/'+domain+'.gif border="0" width="146" height="89" />');
    }
    else
    {
        document.write('<img src=images/logo/'+domain+'.gif border="0" width="146" height="89" />');
    }
}
setConfig(domain);

