var AniGuide = {
	mapObj : null,
	mapPath : 'http://cyber3.jeju.go.kr/sds/eroot',
	envPath : 'http://cyber3.jeju.go.kr/sds/web/sdsgis/newpattern',
	envColor : 'cyberjeju111', 
	loadingImagePath : 'http://cyber3.jeju.go.kr/sds/web/sdsgis/WebGisImg/loading.bmp',
	logoImagePath : 'http://cyber3.jeju.go.kr/sds/web/sdsgis/WebGisImg/logo.bmp',
	initX : 0, 
	initY : 0, 
	initScale : 0, 
	initCaption : '', 

	initialize : function() {
		this.mapObj = document.all.anyGuide;
		this.mapObj.bOldVersion = 0

		this.mapObj.backgroundColor = this.mapObj.ColorHexatoRGB('ffffff');
		this.mapObj.URLmapPath = this.mapPath;

		this.mapObj.ResetLayerCount(41);

		// ¹è°æ»ö ¼³Á¤
		this.mapObj.EnvironmentLoad(this.envPath+'/'+this.envColor+'.ag2');

		// ·Î°í¼³Á¤
		this.mapObj.ChangeLogo(this.logoImagePath);
		this.mapObj.nLogoLocate(0);
		// ·ÎµùÀÌ¹ÌÁö
		this.mapObj.SetUserProgress(this.loadingImagePath);
		this.mapObj.bProgress = true;
		this.mapObj.nAutoScroll = 1000;
		// ¹¹Áö??
		this.mapObj.SetHighSpeedUser(false);
		this.mapObj.SetTooltipTime(100);
		this.mapObj.SetTooltip(452244, 56544, 0, 0, true);
		this.mapObj.SymbolText(0,452244, 0,1);

		this.mapObj.MapRefresh();
	},

	onload : function() {
		if(!document.all) {
			$('webgis').style.display = 'none';
			return true;
		}
		this.initialize();

		setTimeout(function() {
			this.goPosScale(this.initX, this.initY, this.initScale, this.initCaption)
		}.bind(this), 100);

		return true;
	}, 
	zoom : function(level) {
		switch(parseInt(level)) {
			case 1:
				this.goScale(481000);
				break;
			case 2:
				this.goScale(257000);
				break;
			case 3:
				this.goScale(96000);
				break;
			case 4:
				this.goScale(58000);
				break;
			case 5:
				this.goScale(32000);
				break;
			case 6:
				this.goScale(16000);
				break;
			case 7:
				this.goScale(9000);
				break;
			case 8:
				this.goScale(5000);
				break;
			case 9:
				this.goScale(3000);
				break;
			case 10:
				this.goScale(1000);
				break;
		}
	}, 
	print : function() {
		$('webgis_print').innerHTML = '<img src="' + this.mapObj.MapPrintFile(500, 400) + '"/>';
		$('webgis').hide();
		window.print();
		$('webgis_print').hide();
		$('webgis').show();
	},
	mouseMode : function(value) {
		this.mapObj.mouseMode = value;
	}, 
	initView : function() {
		this.goPosScale(this.initX, this.initY, this.initScale, this.initCaption);
	},
	goPosScale : function(x, y, scale, str) {
		this.mapObj.GoPosScale(x, y, 0, str, scale);
	},
	goScale : function(scale) {
		this.mapObj.GoScale(scale);
	},
	refresh : function() {
		this.mapObj.MapRefresh();
	}
}

document.write('<OBJECT classid="clsid:49233226-72EC-11D6-918E-0050DA8B1AD6" codebase="http://cyber3.jeju.go.kr/sds/web/sdsgis/ocx/anyGuide.ocx#version=2.1.2.3" id="anyGuide" style="width:500px;height:400px;">');
document.write('<param name="_Version" value="65536">');
document.write('<param name="_ExtentX" value="2646">');
document.write('<param name="_ExtentY" value="1323">');
document.write('<param name="_StockProps" value="0">');
document.write('<param name="StartOption" value="">');
document.write('<param name="URLmapPath" value="">');
document.write('</OBJECT>');

