function openWindow (earl,name,widgets){
	var url = earl;
	popupWin = window.open (url,name,widgets);
	popupWin.opener.top.name="opener";
	popupWin.focus();
}

function showAd(adID) {
	var thisAdDiv = document.getElementsByTagName('div');
	var adCounter = 0;
	
	for (var n = 0; n < thisAdDiv.length; n++) {
		if (thisAdDiv[n].className == 'adContainer') {
			adCounter++;
		}
	}
	
	for (var i = 0; i < adCounter; i++) {

		var thisAdContainer = document.getElementById('ad' + i);
		
		if (i != adID) {
			if (thisAdContainer.style.display == '') {
				new Effect.Fade('ad' + i, { queue: 'front'});
			}
		} else {
			if (thisAdContainer.style.display == '') {
				if (i != adID) {
					new Effect.Fade('ad' + i, { queue: 'front'});
				}
			} else {
				new Effect.Appear('ad' + i, { queue: 'end'});
			}
		}
	}
}