var xmlhttp=null;
var fun_callback=null;  
function  createxmlhttpRequest()
{ 
	var newxmlhttp;
	
	if(window.xmlhttpRequest)
	{
	
		newxmlhttp=new xmlhttpRequest();	
	
	}
	else if(window.ActiveXObject)
	{
	
		newxmlhttp=new ActiveXObject("Microsoft.xmlhttp");
	
	}
	else
	{
		alert("无法建立请求对象！");	
	}
	return newxmlhttp;
}

function ajaxstart(url,func,israndom,paramstr,type,content)
{
		
		xmlhttp=createxmlhttpRequest();
		fun_callback=func;
		var ajaxurl;
		if(israndom==0)
		{
			 ajaxurl=url+"?rand="+Math.random()+"&"+paramstr;
		}
		else
		{
		   	 ajaxurl=url+"?"+paramstr;
		}
	
		if(type==""||type==null||"GET"==type.toUpperCase())
		{
				type="GET";content=null;
		}	
		else
		{
			  	type="POST";
		}
		xmlhttp.open(type,ajaxurl,true);
		if(content!=null)
		{
			xmlhttp.setRequestHeader("Content-Length",content.length);
			
		}
		xmlhttp.setrequestheader("cache-control","no-cache");  
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
		xmlhttp.setRequestHeader("Content-Type","text/xml;charset=gbk;"); 
		xmlhttp.onreadystatechange=callback;
		xmlhttp.send(content);
		
}
function callback()
{
	if(xmlhttp.readyState==4)
	{  
		if(xmlhttp.status==200)
		{
			var doc=xmlhttp.ResponseText;	
			fun_callback.call(this,doc);
		}
	}
}

/*  |xGv00|3846d27223b80c95419fc67bb2edc81a */
