var isBusyZollW = false;
var httpZollWen = createRequestObject();

function getZollW(id, sprache) {
	
	if (isBusyZollW) {
		// aborting previous update
		httpZollWen.onreadystatechange = function() {}
		httpZollWen.abort();
	}

	// setting html-element
	//document.getElementById("ZollHinweis").innerHTML = "";
	
	// start request
	httpZollWen.open("POST", "/content.zollhinweis.inc.asp?ArtikelID="+id);
	httpZollWen.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	//isBusyZollW = true;
	httpZollWen.onreadystatechange = handleZollWResponse;
	httpZollWen.send("id="+id);
	document.getElementById('ZollHinweis').style.display='inline';
}


function handleZollWResponse() {

	if (httpZollWen.readyState == 4) {
		// success!
		isBusyZollW = false;
		document.getElementById("ZollHinweis").innerHTML = httpZollWen.responseText;
	}
}

function createRequestObject() {
	var ro;
	try {
		ro = new XMLHttpRequest();
	} catch (error)	{
		try {
			ro = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (error) {
			return false;
		}
	}
	return ro;
}

