	//*****************************************************************
	//* 功    能：创建ajax对象
	//*****************************************************************
	function GetAjaxObject(){
	  var httprequest=false;
	  if(window.XMLHttpRequest){
		 httprequest=new XMLHttpRequest();
		 if(httprequest.overrideMimeType){
			httprequest.overrideMimeType('text/xml');
		 }
	  }
	  else if(window.ActiveXObject){
		 try{
			httprequest=new ActiveXObject("Msxml2.XMLHTTP");
			
		 }
		 catch(e){
		   try{
			  httprequest=new ActiveXObject("Microsoft.XMLHTTP");
		   }
		   catch(e){}
		 }  
	  }
	  return httprequest;
	}

	//*****************************************************************
	//* 功    能：非酒店商家列表实现
	//*****************************************************************
	function Company_List(cityId,classType,c_value,companyID){
		
		var ico_id=document.getElementById('ico'+classType).src;
		var board = document.getElementById('companyList'+classType);
		if(board.style.display =="none"){
			document.getElementById('ico'+classType).src='/images/m_list_06.gif';
			board.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loading......";
				try{					
					var xmlhttp=GetAjaxObject();
					var submitURL="/m_ajax.php?action=company&cityId="+escape(cityId)+"&classType="+escape(classType)+"&c_value="+escape(c_value)+"&companyID="+escape(companyID)+"&ranid="+Math.random();
					xmlhttp.open("GET",submitURL,true);
					xmlhttp.send(null);
					
					xmlhttp.onreadystatechange = function(){
						if(xmlhttp.readyState==4){//xmlhttp对象状态如果为完成
							if(xmlhttp.status==200){//如果服务器返回的状态码为200(成功)
								board.innerHTML = xmlhttp.responseText;	
							}
						}
					}		
				}catch(e){
					document.write("<div>异步抓取数据失败！</div>");
				}	
				
			board.style.display  ="";
		}else{
			document.getElementById('ico'+classType).src='/images/m_list_05.gif';
			board.style.display  ="none";
		}	
	}	
	
	//*****************************************************************
	//* 功    能：婚纱摄影首页列表实现
	//*****************************************************************
	function Company_PhotoList(cityId,c_value,companyID,classType,act){
	var ico_photo=document.getElementById('ico_photo').src;	
	var board = document.getElementById(act+'List');
	if(board.style.display =="none"){
			document.getElementById('ico_photo').src='/images/m_list_06.gif';
			board.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loading......";
			try{
				var xmlhttp=GetAjaxObject();
				var submitURL="/m_ajax.php?action="+escape(act)+"&cityId="+escape(cityId)+"&companyID="+escape(companyID)+"&c_value="+escape(c_value)+"&ranid="+Math.random();
				xmlhttp.open("GET",submitURL,true);
				xmlhttp.send(null);
				xmlhttp.onreadystatechange = function(){
					if(xmlhttp.readyState==4){//xmlhttp对象状态如果为完成
						if(xmlhttp.status==200){//如果服务器返回的状态码为200(成功)
							board.innerHTML = xmlhttp.responseText;	
							if(cityId==2){			//北京自动展开所有酒店
/*								clickNode('tab_6','img_6');
								clickNode('tab_5','img_5');
								clickNode('tab_4','img_4');
								clickNode('tab_3','img_3');
								clickNode('tab_0','img_0');*/
							}else{
								hotelStar=0;	
								if(act=='photo'){
									if(classType==27){
										hotelStar=1;
									}else if(classType==4){
										hotelStar=2;
									}else if(classType==15){
										hotelStar=3;
									}else if(classType==19){
										hotelStar=4;
									}
								}else if(act=='wedd'){
									if(classType==2){
										hotelStar=2;
									}else if(classType==34){
										hotelStar=1;
									}
								}
								if((hotelStar==1) || (hotelStar==2) ||(hotelStar==3) ||(hotelStar==4)){
									clickNode('tab_'+hotelStar,'img_'+hotelStar);
								}								
							}
						}
					}
				}		
			}catch(e){
				document.write("<div>异步抓取数据失败！</div>");
			}
		board.style.display  ="";
	}else{
		document.getElementById('ico_photo').src='/images/m_list_05.gif';
		board.style.display  ="none";
		}
	}	
	

	//*****************************************************************
	//* 功    能：酒店商家列表实现
	//*****************************************************************
	function Company_HotelList(cityId,hotelID,hotelStar){
	
	var ico_hotel=document.getElementById('ico_hotel').src;	
	var board = document.getElementById('hotelList');
	if(board.style.display =="none"){
			document.getElementById('ico_hotel').src='/images/m_list_06.gif';
			board.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loading......";
			try{
				var xmlhttp=GetAjaxObject();
				var submitURL="/m_ajax.php?action=hotel&cityId="+escape(cityId)+"&hotelID="+escape(hotelID)+"&ranid="+Math.random();
				xmlhttp.open("GET",submitURL,true);
				xmlhttp.send(null);
				xmlhttp.onreadystatechange = function(){
					if(xmlhttp.readyState==4){//xmlhttp对象状态如果为完成
						if(xmlhttp.status==200){//如果服务器返回的状态码为200(成功)
							board.innerHTML = xmlhttp.responseText;	
							if(cityId==2){			//北京自动展开所有酒店
/*								clickNode('tab_6','img_6');
								clickNode('tab_5','img_5');
								clickNode('tab_4','img_4');
								clickNode('tab_3','img_3');
								clickNode('tab_0','img_0');*/
							}else{
								if((hotelStar==5) || (hotelStar==4) ||(hotelStar==3) ||(hotelStar==0)){
									clickNode('tab_'+hotelStar,'img_'+hotelStar);
								}								
							}
						}
					}
				}		
			}catch(e){
				document.write("<div>异步抓取数据失败！</div>");
			}
		board.style.display  ="";
	}else{
		document.getElementById('ico_hotel').src='/images/m_list_05.gif';
		board.style.display  ="none";
		}
	}	
	

	//*****************************************************************
	//* 功    能：酒店列表星级点击展开实现
	//*****************************************************************
	
	function clickNode(tab,pic){
		var tab=document.getElementById(tab);
		var pic=document.getElementById(pic);
		if (tab.style.display=='none'){
			pic.src='/images/doc1.gif';
			tab.style.display='block';
		}else{
			pic.src='/images/doc2.gif';
			tab.style.display='none';
		}
	}
	
	
	//*****************************************************************
	//* 功    能：给firefox创建innerText对象(因为firefox不支持innerText)
	//*****************************************************************	
	function isIE(){ //ie? 
	   if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1) 
		return true; 
	   else 
		return false; 
	} 
	
	if(!isIE()){ //firefox innerText define
	   HTMLElement.prototype.__defineGetter__(     "innerText", 
		function(){
		 var anyString = "";
		 var childS = this.childNodes;
		 for(var i=0; i<childS.length; i++) {
		  if(childS[i].nodeType==1)
		   anyString += childS[i].tagName=="BR" ? '\n' : childS[i].innerText;
		  else if(childS[i].nodeType==3)
		   anyString += childS[i].nodeValue;
		 }
		 return anyString;
		} 
	   ); 
	   HTMLElement.prototype.__defineSetter__(     "innerText", 
		function(sText){ 
		 this.textContent=sText; 
		} 
	   ); 
	}	
	

	//*****************************************************************
	//* 功    能：等比略缩图片显示
	//*****************************************************************	
	function DrawImage(Img,width,height){   
	var image=new Image();   
	image.src=Img.src;   
	if(image.width>width||image.height>height){          //现有图片只有宽或高超了预设值就进行js控制 
	w=image.width/width; 
	h=image.height/height; 
	if(w>h){                                                                 //宽比高大 
	//定下宽度为width的宽度 
	Img.width=width; 
	//以下为计算高度 
	Img.height=image.height/w;
	
	}else{                                                                  //高比宽大 
	//定下宽度为height高度 
	Img.height=height; 
	//以下为计算高度 
	Img.width=image.width/h; 
	} 
	} 
	Img.style.marginTop=((80-Img.height)/2)+'px';
	}  
	
	
	//*****************************************************************
	//* 功    能：检测商城顶部搜索（是否选择了行业搜索 ）
	//*****************************************************************		
	function checkSearchType(){
		if(document.getElementById("classType").value==0){
			alert('请选择搜索行业');	
			document.getElementById("classType").focus();
			return false;
		}
		return true;
	}
	
	
	//*****************************************************************
	//* 功    能：滑动门
	//*****************************************************************			
	function setTab(m,n){
		var tli=document.getElementById("menu"+m).getElementsByTagName("li");
		var mli=document.getElementById("main"+m).getElementsByTagName("ul");
		for(i=0;i<tli.length;i++){
			tli[i].className=i==n?"hover":"";
			mli[i].style.display=i==n?"block":"none";
		}
	}
	


	function SetTab_navi(tab,id,cnt){
		var menus=document.getElementById(tab).getElementsByTagName("li");            
		for(i=0;i<cnt;i++){           
			i==id?menus[i].className="on":menus[i].className="";
			i==id?document.getElementById(tab+"-content"+i).className="block":document.getElementById(tab+"-content"+i).className="none";
		}
	}
