var global_banner_array = Array( Array('SPOT1', Array( '45|0' ) ) , Array('SPOT10', Array( '9|0', '12|0', '49|0' ) ) , Array('SPOT11', Array( '10|0' ) ) , Array('SPOT12', Array( ) ) , Array('SPOT13', Array( ) ) , Array('SPOT14', Array( ) ) , Array('SPOT15', Array( ) ) , Array('SPOT16', Array( ) ) , Array('SPOT2', Array( '46|0', '47|0' ) ) , Array('SPOT3', Array( '48|0' ) ) , Array('SPOT4', Array( ) ) , Array('SPOT5', Array( ) ) , Array('SPOT6', Array( '43|0' ) ) , Array('SPOT7', Array( '15|0' ) ) , Array('SPOT8', Array( '40|0', '41|0' ) ) , Array('SPOT9', Array( '1|0' ) ) ); function global_banner_initialize() { var objBanner= null; if (!document.getElementById) return; var linkarr = document.getElementsByTagName('a'); for (var i = 0; i < linkarr.length; i++) { var olink = linkarr[i]; if ( olink.getAttribute('spot') ) { for ( var j = 0; j < global_banner_array.length; j++ ) if ( global_banner_array[j][0] == olink.getAttribute('spot') ) { //alert(olink.getAttribute('spot')); if ( global_banner_array[j][1].length > 0 ) { var idx = Math.floor(Math.random() * global_banner_array[j][1].length); //alert(global_banner_array[j][1][idx]); szUrl = 'http://www.usvhercules.nl/banners/default.asp?bid=' + (global_banner_array[j][1][idx]).split('|')[0]; szUrlTarget = (global_banner_array[j][1][idx]).split('|')[1]; olink.innerHTML = ''; olink.setAttribute('target', (szUrlTarget == 1? '_self':'_blank')); olink.setAttribute('href', szUrl); objBanner = olink; } } } } if(objBanner == null) { olink.parentNode.style.display = 'none'; } } global_banner_initialize();