var xmlHttpRequest;
var id;
var url;
var js_req_path="";//注入 request.getContextPath();工程各17
function onload_js_req_path(req_path_str)
{
	if(js_req_path==""){
		js_req_path=req_path_str;
	}
}
function main_impeach(id_name,p_url)
{
	try{
		id=document.getElementById(id_name);
		url=p_url;
		view2();
	}catch(e){
		alert(e.toString());
	}
}

function view2(){	
	try{
		createXMLHttpRequest();
			xmlHttpRequest.open("post",url,true);			
			xmlHttpRequest.onreadystatechange = callback2;
			xmlHttpRequest.send(null);	
			return false;	
	}catch(e){
		alert(e.toString());
	}
}

function createXMLHttpRequest(){
	if(window.ActiveXObject){
		try{
		xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(e){
			alert("buxing le");
		}
	}else{
		try{
		xmlHttpRequest = new XMLHttpRequest();
		}catch(e){
			alert("buxing le");
		}
	}
}

function callback2(){
	try{
		if(xmlHttpRequest.readyState == 4){
			if(xmlHttpRequest.status == 200){
				//alert(xmlHttpRequest.responseText);
				var strAjax=xmlHttpRequest.responseText;
				if(strAjax.length<5){
					id.innerHTML ="";
				}else{
					id.innerHTML = strAjax;
				}
			}
		}else{
			if(xmlHttpRequest.readyState < 4){
				id.innerHTML = "<font color=red>loading...</font>";
			}
		}
	}catch(e){
		alert(e.toString()+"ajsx.js 61\u884c \u6768\u6d77\u8fd9\u91cc\u51fa\u9519\u4e86");
	}
}
function ajax_base_meaunit(p_type){ 
	var parenttype=p_type; 
	if(parenttype=='') 
	{ 
		document.getElementById("span_base_meaunit").innerHTML=''; 
	}else 
	{ 
		document.getElementById("span_base_meaunit").innerHTML=''; 
		main_impeach('span_base_meaunit',js_req_path+'/jieqing.do?method=setDisimpeach_select&shangji_id='+parenttype); 
	} 
} 


