function wpstats_ajax(division,plugin_slug,period) {
var http;
try {
http=new XMLHttpRequest();
}
catch (e) {
try {
http=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
http=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
document.getElementById(division).innerHTML = '[click to see])';
return false;
}
}
}
divRes = document.getElementById(division);
divRes.innerHTML= '
';
var url = "http://anticariatultau.ro/blog/wp-content/plugins/wp-plugin-stats/wp-plugin-stats.php";
//http = newAjax();
var params = "period="+period+"&plugin_slug="+plugin_slug;
http.open("POST", url, true);
http.onreadystatechange = function() {
if(http.readyState == 4) {
divRes.innerHTML=''+http.responseText+'';
}
}
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
//http.setRequestHeader("Connection", "close");
http.send(params);
}
img = new Image();
img.src = 'http://anticariatultau.ro/blog/wp-content/plugins/wp-plugin-stats/wait.gif';