var ase_oldOnLoad = window.onload;

if (typeof(window.onload) != "function") {
	window.onload = ase_mainInit;
} else {
	window.onload = function() {
		ase_oldOnLoad();
		ase_mainInit();
	}
}

function ase_mainInit () {
	var ads = new Array('top', 'top2', 'lgbottom', 'tile', 'sky', 'sec', 'sec3', 'sec5', 'bottom', 'sponsortxt1');
	
	for (i=0, n=ads.length; i<n; i++) {
		if (document.getElementById('ase_' + ads[i])) {
			if (document.getElementById('ase_' + ads[i]).offsetHeight > 32) {
				if (window.location.href.indexOf('networkcomputing') != -1) {
					n = document.createElement('P');
					n.className = 'text_ad_left';
					n.innerHTML = ' ANZEIGE';
				} else {
					n = document.createElement('SPAN');
					n.className = 'grey9';
					n.innerHTML = 'Anzeige';
				}
				document.getElementById('ase_' + ads[i]).parentNode.insertBefore(n, document.getElementById('ase_' + ads[i]));
			} else {
				if (document.getElementById('ase_line_' + ads[i])) {
					document.getElementById('ase_line_' + ads[i]).style.display = 'none';
				}
			}
		}
	}
}
