function $evel(code){
	if(!!(window.attachEvent && !window.opera)){ 
		//ie 
		execScript(code); 
	}else{ 
		//not ie 
		window.eval(code);
		
	}
}
function createXMLHttpRequest(){
    var xmlHttp=false;
    try{
        xmlHttp = new XMLHttpRequest();//好像IE7.0开始支持这种方式了
    }
    catch(trymicrosoft){
        try{
                xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }//No.1
        catch(othermicrosoft){
            try{xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")}
            catch(failed){}
        }//No.1
    }
   return xmlHttp;
}

function ajaxRequest(eRequestType,eArgs){
	var url='/ajax.st?type='+eRequestType+'&n='+Math.random();

	var xmlDoc=createXMLHttpRequest();
	var param="";
	for (i=0;i<eArgs.length;i++){
		eval=eArgs[i];
		param+='&eajaxargs='+encodeURIComponent(eval);
	}
	xmlDoc.onreadystatechange = function(){
		if(xmlDoc.readyState!=4) 
			return;
		if(xmlDoc.status==200){
			var data=xmlDoc.responseXML;
			if(data) 
				analysisResults(data); 
		}
	};
	xmlDoc.open("POST", url,false);
	xmlDoc.setRequestHeader("Content-Type",
			"application/x-www-form-urlencoded;");
	xmlDoc.send(param.substring(1));

}
function ajaxJq(eRequestType,eArgs){
	var param="";
	for (i=0;i<eArgs.length;i++){
		eval=eArgs[i];
		param+='&eajaxargs='+encodeURIComponent(eval);
	}
	$.ajax({
	    url: '/ajax.st?type='+eRequestType+'&n='+Math.random(),    //请求的url地址
	    dataType: "xml",   //返回格式为json
	    async: false, //请求是否异步，默认为异步，这也是ajax重要特性
	    data:param.substring(1),// { "id": "value" },    //参数值
	    type: "GET",   //请求方式
	    beforeSend: function() {
	        //请求前的处理
	    },
	    success: function(req) {
	    	analysisResults(req)
	    },
	    complete: function() {
	        //请求完成的处理
	    },
	    error: function() {
	        //请求出错处理
	    }
	});

	
}
function analysisResults(data){
	nodes=data.documentElement.childNodes;
	for(i=0;i<nodes.length;	i++){
		if(nodes[i].nodeName=='jsre'){
	    	var txtxt=nodes[i].text || nodes[i].textContent;
	    	//txtxt="catalog='6,集控制模块及仪表:16,数据通讯模块及仪表 :17,其他配套模块仪表 :18,气体仪表'";
	    	$.globalEval(txtxt);
		}
	}
}

function search(_J_e_c_str,name){
	document.getElementById("e_c_table").innerHTML="";
	_J_e_c_arr=_J_e_c_str.split("|");
	if(name){
		item_str="";
		for(var i=0;i<_J_e_c_arr.length;i++){
		
			if(_J_e_c_arr[i].split(":")[1].indexOf(name)!=-1){
			item_str=item_str+","+_J_e_c_arr[i];
			}
		}

		item_str=item_str.substring(1);
		_J_e_c_arr=item_str.split(",");
	}


	var j=_J_e_c_arr.length;
	var x_s=(Math.floor(j/3)+(j%3==0?0:1))*3;
	_J_e_table="<table>";
	for (var i=0;i<x_s;i++){
		if (i==0)_J_e_table=_J_e_table+"<tr>";
		if(i!=0&&i%3==0)_J_e_table=_J_e_table+"</tr><tr>";
		_J_e_h_checkbox="";
		_J_e_h_checkboxlabel="";
		if(_J_e_c_arr[i]){
			_J_e_c_two=_J_e_c_arr[i].split(":");
			_J_e_h_checkbox="<input type='checkbox' id='keys"+i+"' name='keys_input' value="+_J_e_c_two[0]+">";
			_J_e_h_checkboxlabel="<input type='text'  id='title_"+i+"'	value='"+_J_e_c_two[1]+"'		style='background:#ffffff;border:none;cursor: pointer; align: center;' readonly='true'>"
		}
		_J_e_table=_J_e_table+"<td class='e_c_box_td1'>"+_J_e_h_checkbox+" </td><td class='e_c_box_td2'>"+_J_e_h_checkboxlabel+"</td>";
		
	}
	_J_e_table=_J_e_table+"</tr></table>";
	document.getElementById("e_c_table").innerHTML=_J_e_table;

}
function Catalog(){
	ajaxJq(1,arguments)
}
function CatalogSub(){
	ajaxJq(2,arguments)
}
function find(){
	ajaxRequest(3,arguments)
}	
function find2(){
	ajaxRequest(4,arguments)
}
function loginMsg(){
	ajaxRequest(5,arguments)
}
function reg(){
	ajaxRequest(6,arguments)
}
function addrecordbynews(){
	ajaxRequest(7,arguments)
}
function viewrecordbynews(){
	ajaxRequest(8,arguments)
}
function viewathornews(){
	ajaxRequest(9,arguments)
}
function addrecordbyproduct(){
	ajaxRequest(10,arguments)
}
function viewrecordbyproduct(){
	ajaxRequest(11,arguments)
}
function viewathorproduct(){
	ajaxRequest(12,arguments)
}
function addrecordbydownload(){
	ajaxRequest(13,arguments)
}
function viewrecordbydownload(){
	ajaxRequest(14,arguments)
}
function viewathordownload(){
	ajaxRequest(15,arguments)
}
function addrecordsellproduct(){
	ajaxRequest(16,arguments)
}
function viewathorsellproduct(){
	ajaxRequest(17,arguments)
}
function showproduct(){
	ajaxRequest(18,arguments)
}
function getclicknum(){
	ajaxRequest(19,arguments)
}
function getdownloadlistbyproduct(){
	ajaxRequest(20,arguments)
}
function ordernum(){
	ajaxRequest(21,arguments)
}
function assessment(){
	ajaxJq(22,arguments)
}

