//创建对象
function createXMLHttps()
{
    var ret = null;
    try {
        ret = new ActiveXObject('Msxml2.XMLHTTP');
    }
    catch (e) {
        try {
            ret = new ActiveXObject('Microsoft.XMLHTTP');
        }
        catch (ee) {
            ret = null;
        }
    }
    if (!ret && typeof XMLHttpRequest != 'undefined')
        ret = new XMLHttpRequest();
    return ret;
}


function ajax(URL,DIVID)
{
var DIVID=document.getElementById(DIVID);
if(DIVID)
{
	jiazai = 'yes';
    DIVID.innerHTML = '<img border=0 src='+filepath+'images/loading.gif>'
	var xmlhttp = createXMLHttps();
	xmlhttp.open("GET",URL,true);
	xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlhttp.setRequestHeader("charset","utf-8");
	xmlhttp.onreadystatechange = function()
	{
		//alert(xmlhttp.responseText);
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			DIVID.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.setRequestHeader("If-Modified-Since","0"); 
	xmlhttp.send(null);
}
}