
	function setRubbish(pR, pAssoc, pDataType) {

		strError = "";
	
		doHttpRequest("HttpRubbish.asp", "action=add&assoc=" + pAssoc + "&dataType=" + pDataType); 
		
		if (strError == "") {
			objAdvert = document.getElementById("advert" + pR);
			objAdvert.style.display = "none";
		}
		
	}
	
	function removeRubbish(pR, pRubbish) { 

		strError = "";

		doHttpRequest("HttpRubbish.asp", "action=remove&rubbish=" + pRubbish); 

		if (strError == "") {
			objAdvert = document.getElementById("advert" + pR);
			objAdvert.style.display = "none";
			
			//reduce the count
			objRubbishTotal = document.getElementById('rubbishTotal');
			iRubbish = parseInt(objRubbishTotal.value) - 1;
			objRubbishTotal.value = iRubbish;
			objRubbishCount = document.getElementById('rubbishCount');
			objRubbishCount.innerHTML = iRubbish + " annonce(s)";
		}

	}			


