/*
	示例
	var text = Sjax("paste.html", "", "get", "");
	create_date:2008.12.29
	author:stupidliao
*/
function Sjax(url, params, method, optName)
{
    var xhr = null;
    if(window.XMLHttpRequest)
    {
        xhr = new XMLHttpRequest();
    }
    else
    {
    	xhr = new ActiveXObject('Msxml2.XMLHTTP') || new ActiveXObject('Microsoft.XMLHTTP');
    }  
	if(method.toUpperCase() == "GET")
	{
		xhr.open(method, url + "?" + params + "&ajaxMethod=" + optName, false);
	}
	else
	{
		xhr.open(method, url, false);
	}
	xhr.setRequestHeader("QIDIANBBSSJAX-Ver","ver1.0");
	if(method.toUpperCase() == "GET")
	{
		xhr.send("");
	}
	else
	{
		xhr.setRequestHeader("content-type","application/x-www-form-urlencoded");
		xhr.send(params + "&ajaxMethod=" + optName);
	}
	return xhr.responseText;
}
