function ad(ads) {
	this.ads = ads;
	this.numads = this.ads.length;
	this.visible = 0;
	var me = this;	
	setInterval(function() {
		me.ads[me.visible].style.display = 'none';
		me.visible += 1;
		if (me.visible >= me.numads) {
			me.visible = 0;
		}
		me.ads[me.visible].style.display = 'inline';
	}, 5000)
}
