var Spirit_rules = {

	'a' : function(el) {
		el.onfocus = function() {
			this.blur();
			if (el.getAttribute('rel') == 'external') {
				el.setAttribute('target', '_blank');
		   }
		}
	}, 

	'a#mail' : function(el) {
		el.onclick = function() {
			safeEmail('info', 'sportproof');
			return false;
		}
	},

	'img' : function(el) {
		el.setAttribute('galleryimg', 'no');
	}
}

Behaviour.register(Spirit_rules);

function init() {
	sIFR();
	startPage();
}

Behaviour.addLoadEvent(init);

//<![CDATA[
/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){

sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"_files/sifr_SportProof.swf", sColor:"#198b35", sWmode: "transparent"}));
};

//]]>

function safeEmail(user, domain) { 
	var e = user + unescape("%40") + domain + '.nl'; 
	var s=''
	location = 'mailto:' + e + '?subject=' + s;
}

// this array consists of the id attributes of the divs we wish to alternate between
var divs_to_fade = new Array('box-1', 'box-2', 'box-3');

// the starting index in the above array.  It should be set to the value of the div which doesn't have the CSS Display property set to "none"
var jan = 0;

// the number of milliseconds between swaps.  Default is five seconds.
var wait = 5000;

// the function that performs the fade
function swapFade() {
	Effect.Fade(divs_to_fade[jan], { duration:1, from:1.0, to:0.0 });
	jan++;
	if (jan == 3) jan = 0;
	Effect.Appear(divs_to_fade[jan], { duration:1, from:0.0, to:1.0 });
}
// the onload event handler that starts the fading.
function startPage() {
	setInterval('swapFade()',wait);
}