var xmlHttp;
var div_name
function createXMLHttpRequest() {

	if (window.ActiveXObject) {

		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");

	}

	else if (window.XMLHttpRequest) {

		xmlHttp = new XMLHttpRequest();

	}

}


function output_code() {

	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
				eval("document.all."+div_name+".innerHTML=xmlHttp.responseText;");
		} else {
				
			alert('There was a problem with the request.');
			
		}
	}

}



function get_prv_goods(url,l_name) {
	div_name = l_name;
	eval("document.all."+div_name+".innerHTML='Loading ...'");
	
	createXMLHttpRequest();

	if (!xmlHttp) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}

	xmlHttp.onreadystatechange = output_code;
	xmlHttp.open('GET', url, true);
	xmlHttp.send(null);

}



function get_top_month_ranking(url,l_name) {

	div_name = l_name;
	eval("document.all."+div_name+".innerHTML='Loading ...'");
	
	createXMLHttpRequest();

	if (!xmlHttp) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}

	xmlHttp.onreadystatechange = output_code;
	xmlHttp.open('GET', url, true);
	xmlHttp.send(null);
}
 