

//拼写相关的线路返回去信息
function comShowWayList(type)
{
	var WayList;
	var Temp;
	var aryTemp;
	var strTmp;

	//机场到宾馆
	if ( type == 1 )
	{
		WayList = AirToHotelName;
		Temp = "AirToHotelWay";
	}

	//宾馆到会场
	if ( type == 2 )
	{
		WayList = HotelToPlaceName;
		Temp = "HotelToPlaceWay";
	}

	//机场到会场
	if ( type == 3 )
	{
		WayList = AirToPlaceName;
		Temp = "AirToPlaceWay";
	}

	//数量
	aryTemp = WayList.split(",");

	//打开信息返回区
	_panelShow('p3','pm3');

	//开始拼写返回区内容
	_el("info_count").style.display = "none";
	_el("info_bus").style.display="none";

	//统计信息
	_el("info_cue").style.display = "block";
	strTmp  = '<span style="color:gray;"> Search in Beijing,Results:';
	strTmp += '<span style="color:red">' + aryTemp.length + '</span></span>'
	_el("info_cue").innerHTML = strTmp;

	//返回区信息
	strTmp = '<TABLE width="100%">'
	for ( var i=0; i<aryTemp.length; i++ )
	{
		strTmp += '<TR onmouseover="this.bgColor=\'#F1F1F1\'" style="CURSOR: default; HEIGHT:25px"'
		strTmp += ' onclick="comDrawWay(' + Temp + (i+1) + ')" onmouseout="this.bgColor=\'\'">'
		
		strTmp += '<TD vAlign=center width="1%">'
		strTmp += '<IMG height=18 src="images/' + (i+1) + '.gif" width=16></TD>'
		
		strTmp += '<TD style="WHITE-SPACE: normal" vAlign=center>'
		
		strTmp += '<DIV style="DISPLAY: block; FONT-SIZE: 11px; MARGIN-BOTTOM: 3px; '
		strTmp += ' FONT-FAMILY: Arial">' + aryTemp[i] + '</DIV></TD></TR>'
	}
	strTmp += '</TABLE>'
	_el("output").innerHTML = strTmp;
}

function comDrawWay(a)
{

	if ( a=="" || a==null )
	{
		alert("The distance between two places is less than 1km, Please walk to the destination.");
		return;
	}

	var xmlDoc = _getDomFromString(a);
	mapc.clearAll();
	var bound = new Bounds();
	mapc.map.loadDataXML(xmlDoc,bound);
	var _all_f=new FeatureNode();
	_all_f.type="R";
	_all_f.bounds=bound;
	mapc.adjustMapFitFeature(_all_f);
	//mapc.map.zoomTo(mapc.getLevelIndex()-1);
}




//取回XML对象
function _getDomFromString(a) //(xmlstring)
{
	try
	{
		if(typeof ActiveXObject!="undefined"&&typeof GetObject!="undefined")
		{
			var b=new ActiveXObject("Microsoft.XMLDOM");
			b.loadXML(a);
			return b
		}
		else if(typeof DOMParser!="undefined")
		{
			return(new DOMParser()).parseFromString(a,"text/xml")
		}
		else
		{
			alert("不支持DOM");
		}
		 
	}
	catch(c)
	{
		alert(c.toString());
	}
}
