Event.observe(window, 'load', function() {

	setInterval(function() {

		var url = '/sa_tb_rotator.php';
		var index = $('tb_href') ? $('tb_href').href.indexOf('id=') : 0;

		if ( index > 0 )
		{
			var prov_id = $('tb_href').href.substr(index + 3);
			url += '?excl=' + prov_id;
		}

		new Ajax.Request(url, {
			onSuccess: function (transport) {
				var data = transport.responseText;
				new Effect.Fade('tb_placeholder', {
					afterFinish: function () {
						$('tb_placeholder').update(data);
						new Effect.Appear('tb_placeholder');
					}
				});
			}
		});

	}, 5000)
});
