// JavaScript Document
/*查询类型*/
	var xmlhttp;
	function createXMLHttp(){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");	
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
				xmlhttp = false;
			}
		}
		if (!xmlhttp && typeof XMLHttpRequest !="undefined"){
			try{
				xmlhttp = new XMLHttpRequest();	
			}catch(e){
				xmlhttp = false;
			}	
		}
	}
	
function CheckBrowser2(type)
{
  var app=navigator.appName;
  var verStr=navigator.appVersion;
  if (app.indexOf('Netscape') != -1) {
	 window.location="customer_list.php?type="+type;
  }else{
	 window.location="customer_list.php?type="+type;
  }
} 
	function showType(type){
		CheckBrowser2(type);
		createXMLHttp();
		url="ajax_type.php?type="+type;
		xmlhttp.open("POST",url,true);
		xmlhttp.onreadystatechange=writeType;
		xmlhttp.send(null);
	}
	function writeType(){
		if(xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("zp_mian").innerHTML=xmlhttp.responseText;
		}	
	}
/*查询行业*/


function CheckBrowser(trade)
{
  var app=navigator.appName;
  var verStr=navigator.appVersion;
  if (app.indexOf('Netscape') != -1) {
	 window.location="customer_list.php?trade="+trade;
  }else{
	 window.location="customer_list.php?trade="+trade;
  }
} 
	
	function showTrade(trade){
		CheckBrowser(trade);
		createXMLHttp();
		url="ajax_trade.php?trade=" + trade ;
		xmlhttp.open("POST",url,true);
		xmlhttp.onreadystatechange=writeTrade;
		xmlhttp.send(null);
		
	}
	function writeTrade(){
		
		if(xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("zp_mian").innerHTML=xmlhttp.responseText;
		}
	}
	/*showKey重点客户*/
function CheckBrowser3()
{
  var app=navigator.appName;
  var verStr=navigator.appVersion;
  if (app.indexOf('Netscape') != -1) {
	 window.location="customer_list.php?key=1";
  }else{
	 window.location="customer_list.php?key=1";
  }
} 

	
	function showKey(){
		CheckBrowser3();
		createXMLHttp();
		url="ajax_key.php";
		xmlhttp.open("POST",url,true);
		xmlhttp.onreadystatechange=writeKey;
		xmlhttp.send(null);
	}
	function writeKey(){
		if(xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("zp_mian").innerHTML=xmlhttp.responseText;
		}	
	}