var tOnload = window.onload;

var tItems = new Array(
	new Array('http://withoutdestination.com', 'Search flights without destination!'),
	new Array('http://youstickit.com', 'Free note taking service with post-it notes!'),
	new Array('http://the-timing.nl', 'Go to my weblog'),
	new Array('http://connectionresetbypeer.net', 'Connection Reset By Peer error page'),
	new Array('http://photoshopped.nl', 'View a random photoshopped image here!')
);

window.onload = function() {
	var scripts = document.getElementsByTagName('script');
	for( var i=0; i<scripts.length; i++ ){
		if( scripts[i].getAttribute('src') == 'http://fokdat.nl/ring.js') {
			parentNode = scripts[i].parentNode;

			var rand = Math.floor(Math.random() * tItems.length);
			var item = tItems[rand];

			parentNode.innerHTML = parentNode.innerHTML + '<a href="'+item[0]+'">'+item[1]+'</a>';
		}
	}
	if( tOnload ){
		tOnload();
	}
};

