addEvent(window, 'load', externalLinks);

function addEvent(obj, evType, fn)
{ 
	if (obj.addEventListener)
	{ 
   	obj.addEventListener(evType, fn, true); 
   	return true; 
 	}
	else if (obj.attachEvent)
	{ 
   	var r = obj.attachEvent("on"+evType, fn); 
   	return r; 
 	}
	else
	{ 
   	return false; 
 	} 
}


function externalLinks()
{ 
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++)
	{ 
   	var anchor = anchors[i]; 
   	if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
		{
    		 anchor.target = "_blank"; 
		}
	} 
}

// function for striping tables
// CREDIT FOR THIS SCRIPT: Matthew Pennell
// URL: http://www.thewatchmakerproject.com

var Event = {
	add: function(obj,type,fn) {
		if (obj.attachEvent) {
			obj['e'+type+fn] = fn;
			obj[type+fn] = function() { obj['e'+type+fn](window.event); }
			obj.attachEvent('on'+type,obj[type+fn]);
		} else
		obj.addEventListener(type,fn,false);
	},
	remove: function(obj,type,fn) {
		if (obj.detachEvent) {
			obj.detachEvent('on'+type,obj[type+fn]);
			obj[type+fn] = null;
		} else
		obj.removeEventListener(type,fn,false);
	}
}

function $() {
	var elements = new Array();
	for (var i=0;i<arguments.length;i++) {
		var element = arguments[i];
		if (typeof element == 'string') element = document.getElementById(element);
		if (arguments.length == 1) return element;
		elements.push(element);
	}
	return elements;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/,"");
}

function addClassName(el,className) {
	removeClassName(el,className);
	el.className = (el.className + " " + className).trim();
}

function removeClassName(el,className) {
	el.className = el.className.replace(className,"").trim();
}

var ZebraTable = {
	bgcolor: '',
	classname: '',
	stripe: function(el) {
		if (!$(el)) return;
		var rows = $(el).getElementsByTagName('tr');
		for (var i=1,len=rows.length;i<len;i++) {
			if (i % 2 == 0) rows[i].className = 'alt';
			Event.add(rows[i],'mouseover',function() { ZebraTable.mouseover(this); });
			Event.add(rows[i],'mouseout',function() { ZebraTable.mouseout(this); });
		}
	},
	mouseover: function(row) {
		this.bgcolor = row.style.backgroundColor;
		this.classname = row.className;
		addClassName(row,'over');
	},
	mouseout: function(row) {
		removeClassName(row,'over');
		addClassName(row,this.classname);
		row.style.backgroundColor = this.bgcolor;
	}
}

window.onload = function() {
	ZebraTable.stripe('stripedTable1');
}


<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'http://www.ibiz.be/uploads/random1.jpg'
theImages[1] = 'http://www.ibiz.be/uploads/random2.jpg'
theImages[2] = 'http://www.ibiz.be/uploads/random3.jpg'
theImages[3] = 'http://www.ibiz.be/uploads/random4.jpg'
theImages[4] = 'http://www.ibiz.be/uploads/random5.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" class="floatTL" alt="Flyer.eu, drukwerk bestellen IS kinderspel">');
}

//  End -->

