var src = new Array(); var href = new Array(); var types = new Array(); var preload = new Array(); var index = new Array(); var bindex = new Array(); var interval = new Array(); var max_banners_num = new Array(); var type; types[0] = "250x250"; interval["250x250"] = 10000; max_banners_num["250x250"] = 3; types[1] = "728x90"; interval["728x90"] = 10000; max_banners_num["728x90"] = 1; types[2] = "120x600_floating"; interval["120x600_floating"] = 10000; max_banners_num["120x600_floating"] = 1; for (i = 0; i <= types.length; i++) { src[types[i]] = new Array(); href[types[i]] = new Array(); }; src["250x250"][0] = "http://free-internet-casino-game.com/wp-content/uploads/2016/10/banners/crazy.gif"; href["250x250"][0] = "http://www.eur-gambling.net/?out=33"; src["250x250"][1] = "http://free-internet-casino-game.com/wp-content/uploads/2016/10/banners/jackpot.gif"; href["250x250"][1] = "http://www.eur-gambling.net/?out=33"; src["250x250"][2] = "http://www.100bonuscasinos.net/banners/2528.gif"; href["250x250"][2] = "http://www.eurgambling.net/?out=27"; src["728x90"][0] = "http://www.100bonuscasinos.net/banners/1515.gif"; href["728x90"][0] = "http://www.eurgambling.net/?out=27"; src["728x90"][1] = "http://free-internet-casino-game.com/wp-content/uploads/2016/10/banners/tanks.gif"; href["728x90"][1] = "http://www.eur-gambling.net/?out=33"; src["728x90"][2] = "http://free-internet-casino-game.com/wp-content/uploads/2016/10/banners/vul.gif"; href["728x90"][2] = "http://www.eur-gambling.net/?out=33"; function banners(type) { preload[type] = new Array(); index[type] = Math.floor(Math.random() * src[type].length); bindex[type]; for (i = 0; i < src[type].length; i++) { preload[type][i] = new Image(); preload[type][i].src = src[type][i]; } brun(type); setInterval("brun('" + type + "')",interval[type]); }; function brun(type) { index[type]++; if (index[type] >= href[type].length) { index[type] = 0; } bindex[type] = index[type]; for (i = 1; i <= max_banners_num[type]; i++) { bindex[type] -= 1; if (bindex[type] < 0) { bindex[type] = href[type].length - 1; } if (document.getElementById("href_" + type + "_" + i)) { document.getElementById("href_" + type + "_" + i).href = href[type][bindex[type]]; document.getElementById("src_" + type + "_" + i).src = preload[type][bindex[type]].src; } } }; function banload(){ for (j = 0; j < types.length; j++) { banners(types[j]); }; };