remove duplicates
Posted: Sun Oct 14, 2012 6:39 pm
Code: Select all
var outlist = [];
function showads(number) {
for (i=0; i<number; i++) {
temp = '<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=cpa07-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=';
temp += amazonads[Math.floor(Math.random()*amazonads.length)];
temp += '" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
document.write(temp);
}
}
the main array is simply the Amazon ASINS code for the game ad being shown, the script simply pastes it all together