// JavaScript Document
function InitAjax()
{
var ajax=false;
try {
ajax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ajax = false;
}
}
if (!ajax && typeof XMLHttpRequest!='undefined') {
ajax = new XMLHttpRequest();
}
return ajax;
}

function showAd(cate_id)
{
	var url = 'index.php';
	var pars = '?action=showad&cate_id=' + cate_id;
	

	var xmlhttp = new InitAjax();
    xmlhttp.open("GET",url + pars,true);
    xmlhttp.onreadystatechange=function(){
    if (4 == xmlhttp.readyState && 200 == xmlhttp.status)
    {
       var tmp = xmlhttp.responseText;
	   
	   $('ad_' + cate_id).innerHTML = tmp;

	 
		
	}
	}
	 xmlhttp.send(null);

}
