var timer = 1;

function showAd(obj) {
	id = obj.getAttribute('id').slice(7);
	if (timer) {
		window.clearTimeout(timer);
		timer = window.setTimeout("do_showAd('"+id+"')", 250);
		//alert('timer yes:'+timer);
	} else {
		//alert('timer no:'+timer);
	}
}

function do_showAd(id) {
	document.getElementById("banner_"+id).style.display = "none";
	document.getElementById("ad_"+id).style.display = "block";
	window.clearTimeout(timer);
}

function hideAd(obj) {
	id = obj.getAttribute('id').slice(3);
	if (timer) {
		window.clearTimeout(timer);
		timer = window.setTimeout("do_hideAd('"+id+"')", 250);
		//alert('timer yes:'+timer);
	} else {
		//alert('timer no:'+timer);
	}
}

function do_hideAd(id) {
	document.getElementById("ad_"+id).style.display = "none";
	document.getElementById("banner_"+id).style.display = "block";
	window.clearTimeout(timer);
}