﻿var o__config={};
o__config['qj']=o__config['1']=o__config['3d.eqj.cn']={domain:'3d.eqj.cn',blogPath:'http://eboke.eqj.cn/',province:'YUNNAN',city:22,mapid:1,x:541461,y:549471,mpx:0.31475,mpy:0.43738,ruler:200};

var infoDomain='iclass.eqj.cn/';
var o_mapPath='http://3dpic.eqj.cn/';
var o_filePath='http://3d.eqj.cn/image/';

var city=0;
var province='';
var o_filter=[];
var o_nav=null;
var o_strlist=[];
var o__customValue=null;
var host=document.location.href.toLowerCase().split('/')[2];
var arr=host.split('.');
var domain=arr[0]!='en'?arr[0]:arr[1];
if(typeof(o_mapid)=='undefined'||typeof(o_mapid)!='number')var o_mapid=0;
var useNav=true;

var o_swfData=[
{id:1,name:'电信枢纽大楼',x:541900,y:541564,src:'/qjeye/telecom.swf',type:'qj_0'},
{id:2,name:'石林国际大酒店',x:538480,y:545348,src:'/qjeye/sl.swf',type:'qj_0'},
{id:3,name:'官房大酒店',x:539472,y:548876,src:'/qjeye/gh.swf',type:'qj_0'},
{id:4,name:'红石大厦',x:543880,y:548232,src:'/qjeye/hs.swf',type:'qj_0'},
{id:5,name:'三江神女雕塑',x:544768,y:546708,src:'/qjeye/sj.swf',type:'qj_0'},
{id:4,name:'诸葛亮七擒孟获浮雕',x:557024,y:540688,src:'/qjeye/jg.swf',type:'qj_0'},
{id:4,name:'金麟大酒店',x:549432,y:544512,src:'/qjeye/jl.swf',type:'qj_0'},
{id:4,name:'曲靖会堂',x:540184,y:549952,src:'/qjeye/qj.swf',type:'qj_0'},
{id:4,name:'公安科技大楼',x:540964,y:534892,src:'/qjeye/ga.swf',type:'qj_0'},
];

function setFilter(filter){
	if(!filter)filter=o_filter;
	for(var i=0;i<filter.length;i++){
		var item=filter[i];
		delete o__customValue[item];
	}
}

function setConfig(key){
	var flag=true;
	if(key&&o__config[key]){
		o__customValue=o__config[key];
		o_mapid=o__customValue.mapid;
	}
	else if(o__config[host]){
		o__customValue=o__config[host];
		o_mapid=o__customValue.mapid;
	}
	else if(o__config[domain]){
		o__customValue=o__config[domain];
		o_mapid=o__customValue.mapid;
	}
	else if(o__config[o_mapid]){
		flag=false;
		o__customValue=o__config[o_mapid];
	}
	else{return;
		o__customValue=o__config['gz'];
	}
	o_mapid=o__customValue.mapid;
	city=o__customValue.city;
	province=o__customValue.province;
	setFilter();
	//var dir='zh_cn';
	//if(typeof(o_locale)=='string')dir=o_locale;
	if(!key&&flag)document.write('<script src="/js/data/zh_cn/qj.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 setDocDomain(){
	var host=document.location.href.toLowerCase().split('/')[2];
	var arr=host.split('.').reverse();
	document.domain=arr[1]+'.'+arr[0];
}
function setLocaleParam(){
	localeParam={locale:'zh_cn',ext1:'',ext2:'_zh_cn'};
	if(typeof(locale)=='string')localeParam.locale=locale;
	localeParam.ext1=localeParam.locale=='zh_cn'?'':'_'+localeParam.locale;
	localeParam.ext2='_'+localeParam.locale;
}
function setNav(){
	if(useNav&&o_nav)document.write(o_nav);
	else document.getElementById('divMapNav').style.display='none';
}
function setHot(index){
	if(o_strlist[index])document.write(o_strlist[index]);
}
function setTitle(){
	if(o_strlist['city'])document.write('<title>曲靖电信-'+o_strlist['city']+'站</title>');
	else document.write('<title>曲靖电信</title>');
}
function setLogo(){
	document.write('<img src="/images/logo/'+o__customValue.domain+localeParam.ext1+'.gif" border="0" width="146" height="89" />');
}
setLocaleParam()
setConfig();
