/*
city:需要查询的城市
fileName:需要显示的文件
divPlace:需要显示文件对应的DIV地址
*/
function doGet(city,fileName,divPlace,flag)
	{
		
		if(window.XMLHttpRequest)
		{
			http_request=new XMLHttpRequest();
		}else if(window.ActiveXObject)
		{
			try
			{
				http_request=new ActiveXObject('Msxml2.XMLHTTP')
			}catch(e)
			{
				http_request=new ActiveXObject('Microsoft.XMLHTTP');
			}
		}
		if(http_request)
		{
			http_request.onreadystatechange=function(){
				if(http_request.readyState==4)
				{
					if(http_request.status==200)
					{
					   // document.getElementById(divPlace).innerHTML=http_request.responseText;
					  //  if(http_request.responseText!=null&&city=='tour'){
						    //doGet('hotel','hotelCommend.jsp','hotellist','查询酒店信息');
						//}
						//else if(http_request.responseText!=null&&city=='hotel'){
						//   doGet('CAN','bargainCAN.jsp','cabinlist','查询舱位信息');
						//}
						
						if(window.navigator.userAgent.indexOf("Firefox")>=1) //针对FF 
                        { 
						
                          document.getElementById(divPlace).innerHTML = http_request.responseText; 
                          var scripts = document.getElementById(divPlace).getElementsByTagName("script"); 
                          for(var i=0;i <scripts.length;i++) //一段一段执行script 
                            { 
                           eval(scripts[i].innerHTML); 
                            } 
                       }else if(window.navigator.userAgent.indexOf("MSIE")!=-1) 
                            { 
							
                              var httpText = http_request.responseText; 
                              httpText = httpText.replace(/ <script[^>]*>/gi," <script defer>")
							  //因为 <script defer>可以在IE上直接运行，所以把所有的script标签都替换成defer标记的script 
                            
                              document.getElementById(divPlace).innerHTML = httpText; 
                             
                            } 
                        if(flag)
						{
							doGetLow('SHA','./bargainFace/flightLow_Ajax.jsp','L_ContMy_x1','CAN,PEK,TAO,SZX,XMN')
						}

						
					}
				}
			}
			//document.getElementById("S_ContMy_x5").innerHTML='&nbsp;&nbsp;&nbsp;<font color="red">正在为您加载数据，请稍候......</font>'
		//	alert(fileName);
		    fileName=fileName+"?city="+city+"&te="+Math.random();
			http_request.open('GET',fileName,true);
			http_request.send(null);
		}
	}
	
	/*
city:需要查询的城市
fileName:需要显示的文件
divPlace:需要显示文件对应的DIV地址
*/
function doGetLow(city,fileName,divPlace,city2)
	{
		if(window.XMLHttpRequest)
		{
			http_request=new XMLHttpRequest();
		}else if(window.ActiveXObject)
		{
			try
			{
				http_request=new ActiveXObject('Msxml2.XMLHTTP')
			}catch(e)
			{
				http_request=new ActiveXObject('Microsoft.XMLHTTP');
			}
		}
		if(http_request)
		{
			http_request.onreadystatechange=function(){
				if(http_request.readyState==4)
				{
					if(http_request.status==200)
					{
							
					   // document.getElementById(divPlace).innerHTML=http_request.responseText;
					  //  if(http_request.responseText!=null&&city=='tour'){
						    //doGet('hotel','hotelCommend.jsp','hotellist','查询酒店信息');
						//}
						//else if(http_request.responseText!=null&&city=='hotel'){
						//   doGet('CAN','bargainCAN.jsp','cabinlist','查询舱位信息');
						//}
						
						if(window.navigator.userAgent.indexOf("Firefox")>=1) //针对FF 
                        { 
                          document.getElementById(divPlace).innerHTML = http_request.responseText; 
                          var scripts = document.getElementById(divPlace).getElementsByTagName("script"); 
                          for(var i=0;i <scripts.length;i++) //一段一段执行script 
                            { 
                           eval(scripts[i].innerHTML); 
                            } 
                       }else if(window.navigator.userAgent.indexOf("MSIE")!=-1) 
                            { 
                              var httpText = http_request.responseText; 
                              httpText = httpText.replace(/ <script[^>]*>/gi," <script defer>")
							  //因为 <script defer>可以在IE上直接运行，所以把所有的script标签都替换成defer标记的script 
                              document.getElementById(divPlace).innerHTML = httpText; 
                            } 


						
					}
				}
			}
			//document.getElementById("S_ContMy_x5").innerHTML='&nbsp;&nbsp;&nbsp;<font color="red">正在为您加载数据，请稍候......</font>'
		//	alert(fileName);
		    fileName=fileName+"?city="+city+"&city2="+city2;
			http_request.open('GET',fileName,true);
			http_request.send(null);
		}
	}
