banners = [{"site":92,"program":"sx","code":""},{"site":92,"program":"sx","code":""},{"site":92,"program":"sx","code":""},{"site":92,"program":"sx","code":""},{"site":92,"program":"sx","code":""},{"site":4,"program":"hb","code":""},{"site":4,"program":"hb","code":""},{"site":4,"program":"hb","code":""},{"site":4,"program":"hb","code":""},{"site":4,"program":"hb","code":""},{"site":10,"program":"pb","code":""},{"site":10,"program":"pb","code":""},{"site":10,"program":"pb","code":""},{"site":10,"program":"pb","code":""},{"site":10,"program":"pb","code":""},{"site":9,"program":"gt","code":""},{"site":9,"program":"gt","code":""},{"site":9,"program":"gt","code":""},{"site":9,"program":"gt","code":""},{"site":9,"program":"gt","code":""}];function rand(min,max){var argc=arguments.length;if(argc===0){min=0;max=2147483647;}else if(argc===1){throw new Error('Warning: rand() expects exactly 2 parameters, 1 given');} return Math.floor(Math.random()*(max-min+1))+min;} function count(mixed_var,mode){var key,cnt=0;if(mixed_var===null){return 0;}else if(mixed_var.constructor!==Array&&mixed_var.constructor!==Object){return 1;} if(mode==='COUNT_RECURSIVE'){mode=1;} if(mode!=1){mode=0;} for(key in mixed_var){cnt++;if(mode==1&&mixed_var[key]&&(mixed_var[key].constructor===Array||mixed_var[key].constructor===Object)){cnt+=count(mixed_var[key],1);}} return cnt;} function in_array(needle,haystack,argStrict){var key='',strict=!!argStrict;if(strict){for(key in haystack){if(haystack[key]===needle){return true;}}}else{for(key in haystack){if(haystack[key]==needle){return true;}}} return false;} displayed=0; while (displayed < bannerNumber && count(banners) != 0) { r = rand(0,(count(banners)-1)); banner = banners[r]; p = eval('bannerConfig.'+banner.program); if (p.exclude && in_array(banner.site,p.exclude)) { banners.splice(r,1); continue; } document.write(''+banner.code+''); banners.splice(r,1); displayed++; }