﻿function SimpleAjax(url){
	var m_xmlReq=null;
	var m_OnSucceed=function(){};
	if(window.ActiveXObject){
	    try{
	        m_xmlReq = new ActiveXObject('Msxml2.XMLHTTP'); 
	    }catch(e){
	        try{
	            m_xmlReq = new ActiveXObject('Microsoft.XMLHTTP');
	        }catch(e){}
	    }
	}
	else if(window.XMLHttpRequest){
	    m_xmlReq = new XMLHttpRequest();
	}
	
	this.OnSucceed=function(succeed){
		m_OnSucceed=succeed;
	}
	
	this.post=function(d){
	    if(!m_xmlReq)  return;
	    m_xmlReq.open('POST',url,false);
	    m_xmlReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
	    m_xmlReq.send(d);
	    return eval(m_xmlReq.responseText);
	}
}


