window.pixmap = {
	directionIcon : null
	, panoIndex : null
	, gmarkerOldLatlng : null
	, gmarker : null
	, gmap : null
	, panoURL : '../krpano01/index.php'

//	, defaultLatlng : new GLatLng(37.57978663117985, 126.9770622253418) // °æº¹±Ã??
//	, defaultLatlng : new GLatLng(37.483325, 127.035165) // ¾çÀç¿ª
//	, defaultLatlng : new GLatLng(36.547581666667, 128.527173333333) // ¾Èµ¿ 1

	, defaultSize : 18
	, defaultIconImage : "images/mapIcon.png"

	, defaultIcon : null
	, defaultIconWidth : 16
	, defaultIconHeight : 16

	, defaultDegree : 360 / 16 // ºÐÇÒ °¢µµ

	, sourceGmarker : null // ¿øº» °ª
	, latlngs : []
	, polylines : []
	, polylineCongRoads : []

	, mapPopupWidth : 450
	, mapPopupHeight : 300

	, dir : 0
	, setDir : function(dir){
		if(isNaN(parseFloat(dir))){
			this.dir = 0;
		}else{
			this.dir = parseFloat(dir);
		}
	}

	, load : function(){
		//this.defaultLatlng = new GLatLng(36.547581666667, 128.527173333333) // ¾Èµ¿ 1
		this.logWrite("test");
//		this.defaultLatlng = new GLatLng(37.5264727671, 126.92285376);
//		this.defaultLatlng = new GLatLng(37.5314041677, 126.924773455);
//		this.defaultLatlng = ;
		this.defaultLatlng = new GLatLng(37.5237318319 , 126.927477831);

		if (GBrowserIsCompatible()) {
			this.gmap = new GMap2(document.getElementById("map"));
			this.testGMAP();
			this.setCenter(new GLatLng(37.5240318319 , 126.927477831), this.defaultSize);

			this.defaultIcon = this.getIcon();
			var gOptions = { icon:this.defaultIcon }; // new GMarkerOptions();

			this.gmarker = new GMarker( this.defaultLatlng, gOptions);
			this.gmarker.hide();
			this.gmap.addOverlay(this.gmarker);

			GEvent.addListener(this.gmap, "infowindowclose", function() {
				window.pixmap.closeInfoWindow();
			});

			this.addControls(this.gmap);
		}
		this.loadTemp();

		window.pixmap.openInfoWindowKr(this.defaultLatlng, 3899 );

	}

	, testGMAP : function(){
		GEvent.addListener(this.gmap, "zoomend", function(oldLevel, newLevel){
			var polylines = window.pixmap.polylines;
			if(window.pixmap.isValidZoomLevelView(this.getZoom()) && newLevel > oldLevel){
				getPolylines(this);
			}else{
				window.pixmap.polylineHide();
			}
		});
		GEvent.addListener(this.gmap, "moveend", function(){
			if(window.pixmap.isValidZoomLevelView(this.getZoom())){
				getPolylines(this);
			}else{
				window.pixmap.polylineHide();
			}
		});
	}

	, polylineHide : function(){
		var polylines = window.pixmap.polylines;
		if(polylines.length>0 && !polylines[0].isHidden()) {
			for(var i=0; i<polylines.length; i++){
				polylines[i].hide();
			}
		}
		polylines = window.pixmap.polylineCongRoads;
		if(polylines.length>0 && !polylines[0].isHidden()) {
			for(var i=0; i<polylines.length; i++){
				polylines[i].hide();
			}
		}
	}

	, isValidZoomLevelView : function(zoomLevel){
		if(zoomLevel > 16){
			return true;
		}else{
			return false;
		}
	}

	, openInfoWindow : function( latlng, imageIndex ){
		this.gmarker.show();
//		document.getElementById("ifrPano").src = this.panoURL+"?in="+imageIndex;

		this.gmap.openInfoWindowHtml(latlng, "<iframe id='ifrPano' style='margin:5px' src='"+this.panoURL+"?in="+imageIndex+"' border='0' frameborder='0' width='"+this.mapPopupWidth+"' height='"+this.mapPopupHeight+"'></iframe>");

//		GEvent.addListener(this.gmap.getInfoWindow(), "closeclick", function(){
//			window.pixmap.closeInfoWindow();
//		});
	}

	, openInfoWindowKr : function( latlng, imageIndex ){
		this.gmap.openInfoWindowHtml(latlng, "<iframe id='ifrPano' style='margin:5px' src='"+this.panoURL+"?in="+imageIndex+"' border='0' frameborder='0' width='"+this.mapPopupWidth+"' height='"+this.mapPopupHeight+"'></iframe>");
	}

	, closeInfoWindow : function() {
		cmd = window.pixmap;
		var ginfo = cmd.gmap.getInfoWindow();
		if ( ginfo ){
			cmd.restoreIcon();
		}else{
		}
	}

	, restoreIcon : function(){
		this.gmarker.hide();
		//this.gmarker.setImage(this.defaultIconImage);
	}

	, logWrite : function(msg, color) {
//		GLog.write(msg, color);
	}

	, loadTemp : function(){ // debug method
		//$("panValue").focus();
	}

	, getIcon : function(){
		var gIcon = new GIcon(new GIcon(G_DEFAULT_ICON), this.defaultIconImage);
		gIcon.iconSize = new GSize(this.defaultIconWidth, this.defaultIconHeight);
		gIcon.shadow = "none.png";
		gIcon.shadowSize = new GSize(20,20);
		gIcon.iconAnchor=new GPoint(10,10);

		return gIcon;
	}

	, addControls : function(gmap){
		// GSmallMapControl
		// GLargeMapControl // ÀÌµ¿ Å« ÁÜ
		// GSmallZoomControl // ÀÛÀº ÁÜ
		// GScaleControl // ÁöµµÀÇ ½ºÄÉÀÏ Ç¥½Ã
		// GMapTypeControl
		// GMenuMapTypeControl
		// GHierarchicalMapTypeControl
		// GOverviewMapControl // ¿ìÃø ÇÏ´Ü¿¡ smallmap

		this.gmap.addControl(new GLargeMapControl()); // ÀÌµ¿ ÄÁÆ®·Ñ
		this.gmap.addControl(new GScaleControl()); // ÁöµµÀÇ ½ºÄÉÀÏ Ç¥½Ã
		//this.gmap.addControl(new GOverviewMapControl()); // ¿ìÃø ÇÏ´Ü¿¡ smallmap
		this.gmap.setMapType(G_SATELLITE_MAP);
		//this.gmap.disableDoubleClickZoom();
		this.gmap.enableDoubleClickZoom();
		this.gmap.enableScrollWheelZoom();
		//this.gmap.scrollWheelZoomEnabled();
	}

	, iconChange2 : function(){
		setInterval(window.pixmap.iconChangeEvent, 300);
	}

	, gIconChangeIndex : 0

	, iconChangeEvent : function(){
		window.pixmap.iconChangeImageDegree();
	}

	, iconChangeImageDegree : function(){
		var degree = this.getPanValue();
		var msg = "";
		try{
			var numDegree = parseFloat(degree);

			if(isNaN( numDegree )){
				msg = "nan";
			}else{
				msg = this.degreeDiv(numDegree);
			}
		}catch(e){
			msg = e.message;
		}
	}

	, getPanValue : function(){
		return $("panValue").value;
	}

	, degreeDiv : function(num){//*
//		GLogWrite("num=" + num + " dir=" + this.dir);
		num += this.dir;
		while(num > 360){
			num -= 360;
		}
		while(num < 0){
			num += 360;
		}//*/
		var getPart = this.getDegreePart(num);
		this.setDegree(num);
		return getPart;
	}

	, setDegree : function(num){
		num = parseFloat(num) + parseFloat(this.dir);
		while(num > 360){
			num -= 360;
		}
		while(num < 0){
			num += 360;
		}
		var getPart = this.getDegreePart(num);
		//GLog.write("num=" + num + "; getPart=" + getPart + " this.dir=" + this.dir);
		this.setDegreePart(getPart);
	}

	, curDivPart : -999
	, setDegreePart : function(getPart) {
		if( this.curDivPart != getPart ) {
			this.gmarker.setImage(this.getImageName(getPart));
			this.curDivPart = getPart;
		}
		return getPart;
	}

	, gImageNames : new Array("00", "01", "02", "03"
		, "04", "05", "06", "07"
		, "08", "09", "10", "11"
		, "12", "13", "14", "15"
	)

	, getImageName : function(indexes) {
		return "images/mapDirection3/" + this.getImageIndex(indexes) + ".png";
	}

	, getImageIndex : function(indexes) {
		var indexes1 = indexes ; // -3
		if (indexes1 < 0) {
			return indexes1 + 16;
		} else {
			return indexes1;
		}
	}

	, getImageIndex___Backup : function(indexes) {
		var indexes1 = indexes - 3; // - 3 ??
		if (indexes1 < 0) {
			return indexes1 + 16;
		} else {
			return indexes1;
		}
	}

	, getImageNameBackup : function(indexes) {
		return "images/mapDirection2/" + this.gImageNames[indexes]+".png";
	}

	, getDegreePart : function(num){
		var divs = this.defaultDegree;
		var divValue = Math.ceil((num-divs/2) / divs);
		if(divValue<0){
			divValue += (360/divs);
		}
		return divValue;
	}

	, messageOut : function(msg){
		var testObj = $("panValueTest");
		testObj.innerHTML = msg;
	}

	, setCenter : function(glatlng, zoom){
		this.gmap.setCenter(glatlng, zoom);
	}

	, setCenter2 : function(glatlng){
		this.gmap.panTo(glatlng);
	}

	, setCenter3 : function(glatlng){
		this.gmap.panTo(glatlng);
	}

	, getCenter : function(){
		return this.gmap.getCenter();
	}

	, mapMove : function(gps_x, gps_y, imageURL){
		this.setCenter(new GLatLng(gps_x, gps_y));
		if(imageURL) this.gmarker.setImage(imageURL);
		this.gmarker.setLatLng(this.getCenter());
	}

	, mapMoveIcon : function(gps_x, gps_y, imageURL){
		if(imageURL) this.gmarker.setImage(imageURL);
		this.gmarker.setLatLng(new GLatLng(gps_x, gps_y));
	}

	, movePointer : function(gps_x, gps_y){
		var latlng = new GLatLng(gps_x, gps_y);
		this.moveDiffMap(latlng, this.gmarker);
		this.gmarker.setLatLng(latlng);
		//this.setCenter2(latlng);
	}

	, movePointerIcon : function(gps_x, gps_y, gps_dir){
		var latlng = this.getMapAdj(gps_x, gps_y);
		var bounds = this.gmap.getBounds();
		this.gmarker.setLatLng(latlng);
		this.gmarker.show();
		this.setDir(gps_dir);
		if(!this.isInMap(bounds, latlng)){
			this.setCenter2(latlng);
		}
		infoWindow = this.gmap.getInfoWindow();
		if( infoWindow ){
			this.moveWindowLatLng(latlng);
		}
	}

	, getMapAdj : function(lat, lng){
		return new GLatLng(lat, lng);
	}

	, isInMap : function(bounds, latlng){
		var sw = bounds.getSouthWest();
		var ne = null;
		if(Number(sw.lat()) < Number(latlng.lat())
			&& Number(sw.lng()) < Number(latlng.lng())
			) {
			ne = bounds.getNorthEast();
			if(Number(ne.lat()) > Number(latlng.lat())
				&& Number(ne.lng()) > Number(latlng.lng())
			){
				return true;
			}
		}
		return false;
	}

	, moveDiffMap : function(latlng, gmarker){
		var old = gmarker.getLatLng();
		var diffLat = old.lat() - latlng.lat();
		var diffLng = old.lng() - latlng.lng();
		//alert("new=" + latlng + "\nold=" + old + "\n" + diffLat + " " + diffLng);
		var center = this.gmap.getCenter();
		var newLat = center.lat() - diffLat;
		var newLng = center.lng() - diffLng;
		this.setCenter2(new GLatLng(newLat, newLng));
	}

	, moveWindowLatLng : function(latlng){
		var ginfo = this.gmap.getInfoWindow();
		// this.mapPopupWidth+"' height='"+this.mapPopupHeight
		try{
			var distance = latlng.distanceFrom(ginfo.getPoint(), 6378137 );
			//GLog.write("lat=" + latlng.lat() + " latlng=" + latlng.lng() + " distance=" + distance);
			if(distance > 2){ // m ´ÜÀ§
				ginfo.reset(latlng
					, null //ginfo.getTabs()
					, new GSize(this.mapPopupWidth+10, this.mapPopupHeight+10)
					, ginfo.getPixelOffset()
					, ginfo.getSelectedTab() );
				
				var gmapSize = this.gmap.getSize();
				var gmarkerPoint = this.gmarker.getPoint();

				var addWindowSize = 150;

				if(gmapSize.width > this.mapPopupWidth + addWindowSize
					&& gmapSize.height > this.mapPopupHeight + addWindowSize){ // addWindowSize ¸¸Å­ Å©´Ù¸é
					var popupTailHeight = 100;
					var popupWidthDiff = 50;
					var popupWidthLeft = this.mapPopupWidth/2 - popupWidthDiff;
					var popupWidthRight = this.mapPopupWidth - popupWidthLeft;

					var glb = this.gmap.getBounds();
					var sw = glb.getSouthWest();
					var ne = glb.getNorthEast();

					var latDiff = ne.lat() - sw.lat();
					var lngDiff = ne.lng() - sw.lng();

					var latPixelPerDistance = (latDiff/gmapSize.height);
					var lngPixelPerDistance = (lngDiff/gmapSize.width);

					var moveTrue = false;

					var glat = gmarkerPoint.lat() + (latPixelPerDistance * (this.mapPopupHeight + popupTailHeight));
					var glat2 = gmarkerPoint.lat() - (latPixelPerDistance * 20); // ÇÏ´Ü 20 ÀÌÀü¿¡ ¸Ê ÀÌµ¿
					var glng = gmarkerPoint.lng() - (lngPixelPerDistance * (popupWidthLeft) );
					var glng2 = parseFloat(gmarkerPoint.lng()) + parseFloat(lngPixelPerDistance * (popupWidthRight) );

					if ( ne.lat() < glat ){ // »ó´Ü È­¸éÀ» ³Ñ¾î°¡Áö ¾Ê¾ÒÀ½.
						moveTrue = true;
					}else if ( sw.lng() > glng ) {
						moveTrue = true;
					}else if ( ne.lng() < glng2 ) {
						moveTrue = true;
					}else if ( sw.lat() > glat2 ) {
						moveTrue = true;
					}

					if(moveTrue){ // move to center3
						var moveLat = parseFloat(gmarkerPoint.lat()) + ( latPixelPerDistance * ( this.mapPopupHeight + popupTailHeight ) / 2 );
						var moveLng = parseFloat(gmarkerPoint.lng()) + ( lngPixelPerDistance * popupWidthDiff );
//						GLog.write("moved");
						var latlng = new GLatLng(moveLat, moveLng);
//						GLog.write(gmarkerPoint);
//						GLog.write(latlng);
						this.setCenter3(latlng);
					}
				}
			}
		}catch(e){
		//	alert(e);
		}
	}

	, moveWindow___1 : function(gps_x, gps_y){
		var latlng = new GLatLng(gps_x, gps_y);
		var ginfo = this.gmap.getInfoWindow();

		try{
			ginfo.reset(latlng
				, null //ginfo.getTabs()
				, new GSize(410, 360)
				, ginfo.getPixelOffset()
				, ginfo.getSelectedTab() );
		}catch(e){}
	}

	, iconChangeImageLoop : function(){
		if(this.gIconChangeIndex >= 6){
			this.gIconChangeIndex = 0;
		}
		this.gmarker.setImage(this.getImageName(this.gIconChangeIndex++));
	}

	, polylineClear : function(){
		for(var i=0; i<this.polylines.length; i++){
			this.gmap.removeOverlay(this.polylines[i]);
		}
		for(var i=0; i<this.polylineCongRoads.length; i++){
			this.gmap.removeOverlay(this.polylineCongRoads[i]);
		}
		this.latlngs = [];
		this.polylines = [];
		this.polylineCongRoads = [];
	}
	, polyline : function(latlngs){
		this.latlngs.push(latlngs);
		var pl = new GPolyline(latlngs, "blue", 4, 0.5);
		this.polylines.push(pl);

		GEvent.addListener(pl, "click", function(ev){
			var info = window.pixmap.getPolylineIndex(ev.lat(), ev.lng(), this);
			if(info != null){
				//window.pixmap.openInfoWindow(new GLatLng(info.lat, info.lng), info.index);
				window.pixmap.openInfoWindowKr(new GLatLng(info.lat, info.lng), info.index);
				//panoControl("loadPano(xml_file=pano_img.php?in="+info.index+",300,fade");
			}else{
				alert("gps index not founded!");
			}
		});
		this.gmap.addOverlay(pl);
	}

	, polylineCongRoad : function(latlngs){
		this.latlngs.push(latlngs);
		var pl = new GPolyline(latlngs, "blue", 10, 0.6);
		this.polylineCongRoads.push(pl);
		this.gmap.addOverlay(pl);
	}

	, getPolylineIndex__backup : function(x, y){
		var adj = this.getPolylineClickAdj();
		var pointerAdj = this.getMarkerAdj();

		for(var j=0; j<this.latlngs.length; j++){
			for(var i=0; i<this.latlngs[j].length; i++){
				if ((Math.abs(this.latlngs[j][i].lat() - x)<adj)
					&& (Math.abs(this.latlngs[j][i].lng() - y)<adj)) {
					this.movePointerIcon(this.latlngs[j][i].lat()
							, this.latlngs[j][i].lng());

					return {lat:this.latlngs[j][i].lat()
						, lng:this.latlngs[j][i].lng()
						, index:this.latlngs[j][i].keyNum};
				}
			}
		}
		return null;
	}

	, getPolylineIndex : function(x, y, obj){
		var adj = this.getPolylineClickAdj();
		var pointerAdj = this.getMarkerAdj();

		if(obj != null){
			var minPointer = -1;
			var minDistance = 100000;
			var clickLatLng = new GLatLng(x, y);
//			GLog.write(clickLatLng);

			for(var i=0; i<obj.getVertexCount(); i++){
				var curDistance = obj.getVertex(i).distanceFrom(clickLatLng);
				if(curDistance < minDistance){
					minDistance = curDistance;
					minPointer = i;
				}
			}
			if(minPointer > -1){
				var vertex = obj.getVertex(minPointer);
				return this.__getVertexKeyNum(vertex);
			}
		}else{
			for(var j=0; j<this.latlngs.length; j++){
				for(var i=0; i<this.latlngs[j].length; i++){
					if ((Math.abs(this.latlngs[j][i].lat() - x)<adj)
						&& (Math.abs(this.latlngs[j][i].lng() - y)<adj)) {
						this.movePointerIcon(this.latlngs[j][i].lat()
								, this.latlngs[j][i].lng());

						return {lat:this.latlngs[j][i].lat()
							, lng:this.latlngs[j][i].lng()
							, index:this.latlngs[j][i].keyNum};
					}
				}
			}
		}
		return null;
	}

	, __getVertexKeyNum : function(latlng){
		var distanceZero = 0;
		for(var j=0; j<this.latlngs.length; j++){
			for(var i=0; i<this.latlngs[j].length; i++){
				if(distanceZero == this.latlngs[j][i].distanceFrom(latlng) ){
					return {lat:this.latlngs[j][i].lat()
						, lng:this.latlngs[j][i].lng()
						, index:this.latlngs[j][i].keyNum};
				}
			}
		}
		return null;
	}

	, getMarkerAdj : function(){
		var z = this.getZoomLevel();
		var adj = 0;
		switch(z){
			case 16 :
				adj = 0.0005;
				break;
			case 17 :
				adj = 0.00025;
				break;
			case 18 :
				adj = 0.000125;
				break;
			default :
				adj = 0.0005;
				break;
		}
		return adj;
	}

	, getPolylineClickAdj : function(){
		var z = this.getZoomLevel();
		var adj = 0;
		switch(z){
			case 16 :
				adj = 0.0002;
				break;
			case 17 :
				adj = 0.0001;
				break;
			case 18 :
				adj = 0.00005;
				break;
			default :
				adj = 0.0002;
				break;
		}
		return adj;
	}

	, getZoomLevel : function(){
		return this.gmap.getZoom();
	}

	, autoButtonStop : function(){
		document.getElementById("panoAutoPlay").style.display='';
		document.getElementById("panoAutoStop").style.display='none';
	}

	, autoButtonStart : function(){
		document.getElementById("panoAutoPlay").style.display='none';
		document.getElementById("panoAutoStop").style.display='';
	}
}

function test1(){
	window.pixmap.mapMove(37.4419, -122.1419);
}

function test2(){
	window.pixmap.mapMove(37.4410, -122.1410, "btnViewXML.gif");
}

function mapMove(GPS_X, GPS_Y, imageURL){
	window.pixmap.mapMove(GPS_X, GPS_Y, imageURL);
}

function panoControl(cmd, auto){
	window.ifrPano.panoControl(cmd, auto);
}
function panoControlAutoStop(cmd, auto){
	window.ifrPano.panoCmd.auto=false;
	window.ifrPano.panoControl(cmd, auto);
}
function panoNext(){
	window.ifrPano.panoCmd.panoNext();
}
function panoPrev(){
	window.ifrPano.panoCmd.panoPrev();
}

function checkExec180(){
	window.ifrPano.checkExec180();
}

function autoCourse(num){
	var indexCode = 0;
	switch(num){
		case 1:
			indexCode=189;
			break;
		case 2:
			indexCode=2689;
			break;
		case 3:
			indexCode=2945;
			break;
	}
	if(indexCode > 0){
		window.ifrPano.panoCmd.auto = true;
		autoButtonStart();
		panoControl("loadPano(xml_file=pano_img.php?in="+indexCode+",200,fade");
	}
}
function autoCourse2(objName){
	var objValue = $F(objName);
	if(objValue){
		window.ifrPano.panoCmd.auto = true;
		autoButtonStart();
		panoControl("loadPano(xml_file=pano_img.php?in=" + objValue + ", 200, fade");
	}else{
		alert("°ü±¤ ÄÚ½º¸¦ ¼±ÅÃÇØ¾ß ÇÕ´Ï´Ù.");
	}
}
function autoButtonStart(){
	window.pixmap.autoButtonStart();
}
function autoButtonStop(){
	window.pixmap.autoButtonStop();
}
function panoFullScreenLocal(){
	panoControl("fullscreen()");
}

function load() {
	window.pixmap.load();
	var arr = new Array();
//	arr.push("../v01/line.xml/list_all_2.xml");

	for(var x=0; x<arr.length; x++){
	GDownloadUrl(arr[x], function(data, responseCode) {
		if(responseCode>=200 && responseCode<300){
			var xml = GXml.parse(data);

			var lists = xml.documentElement.getElementsByTagName("panoLists");
			for (var i = 0; i < lists.length; i++) {
				var latlngs = [];
				var spotLists = lists[i].childNodes;
				for(var j=0; j < spotLists.length; j++){
					var latlng = new GLatLng(parseFloat(spotLists[j].getAttribute("lat"))
						, parseFloat(spotLists[j].getAttribute("lng")));
					latlng.keyNum = spotLists[j].getAttribute("num");
					latlngs.push(latlng);
				}
				window.pixmap.polyline(latlngs);
			}
		}
	});
	}

}

function getPolylines(gmap){
	var arr = new Array();
	var arrCongRoad = new Array();
	if(gmap == null){
		var param1 = "";
	}else{
		var bounds = gmap.getBounds();
		var sw = bounds.getSouthWest();
		var ne = bounds.getNorthEast();
		var param1 = "swlat="+sw.lat();
		param1 += "&swlng="+sw.lng();
		param1 += "&nelat="+ne.lat();
		param1 += "&nelng="+ne.lng();
	}

	arr.push("./mapAreaMarkListXML.php?" + param1);
	for (var x=0; x<arr.length; x++) {
		GDownloadUrl(arr[x], function(data, responseCode) {
			if(responseCode>=200 && responseCode<300){
				var xml = GXml.parse(data);
				window.pixmap.polylineClear();
				var lists = xml.documentElement.getElementsByTagName("panoLists");
				for (var i = 0; i < lists.length; i++) {
					var latlngs = [];
					var spotLists = lists[i].childNodes;
					for(var j=0; j < spotLists.length; j++){
						var latlng = new GLatLng(parseFloat(spotLists[j].getAttribute("lat"))
							, parseFloat(spotLists[j].getAttribute("lng")));
						latlng.keyNum = spotLists[j].getAttribute("num");
						latlngs.push(latlng);
					}
					window.pixmap.polyline(latlngs);
					//window.pixmap.marker(latlngs);
				}
			}
		});
	}


/*	arrCongRoad.push("./congRoadListData.php?" + param1);
	for (var x=0; x<arr.length; x++) {
		GDownloadUrl(arr[x], function(data, responseCode) {
			if(responseCode>=200 && responseCode<300){
				var xml = GXml.parse(data);
				window.pixmap.polylineClear();
				var lists = xml.documentElement.getElementsByTagName("panoLists");
				for (var i = 0; i < lists.length; i++) {
					var latlngs = [];
					var spotLists = lists[i].childNodes;
					for(var j=0; j < spotLists.length; j++){
						var latlng = new GLatLng(parseFloat(spotLists[j].getAttribute("lat"))
							, parseFloat(spotLists[j].getAttribute("lng")));
						latlng.keyNum = spotLists[j].getAttribute("num");
						latlngs.push(latlng);
					}
					window.pixmap.polylineCongRoad(latlngs);
				}
			}
		});
	}//*/
}

